mathjs 10.4.1 → 10.4.2
Sign up to get free protection for your applications and to get access to all the features.
- package/HISTORY.md +17 -0
- package/docs/datatypes/units.md +2 -2
- package/docs/reference/functions/format.md +3 -0
- package/examples/node_modules/.bin/acorn +12 -0
- package/examples/node_modules/.bin/acorn.cmd +17 -0
- package/examples/node_modules/.bin/acorn.ps1 +28 -0
- package/examples/node_modules/.bin/browserslist +12 -0
- package/examples/node_modules/.bin/browserslist.cmd +17 -0
- package/examples/node_modules/.bin/browserslist.ps1 +28 -0
- package/examples/node_modules/.bin/envinfo +2 -5
- package/examples/node_modules/.bin/envinfo.cmd +6 -6
- package/examples/node_modules/.bin/envinfo.ps1 +12 -2
- package/examples/node_modules/.bin/import-local-fixture +2 -5
- package/examples/node_modules/.bin/import-local-fixture.cmd +6 -6
- package/examples/node_modules/.bin/import-local-fixture.ps1 +12 -2
- package/examples/node_modules/.bin/node-which +2 -5
- package/examples/node_modules/.bin/node-which.cmd +6 -6
- package/examples/node_modules/.bin/node-which.ps1 +12 -2
- package/examples/node_modules/.bin/resolve +12 -0
- package/examples/node_modules/.bin/resolve.cmd +17 -0
- package/examples/node_modules/.bin/resolve.ps1 +28 -0
- package/examples/node_modules/.bin/terser +12 -0
- package/examples/node_modules/.bin/terser.cmd +17 -0
- package/examples/node_modules/.bin/terser.ps1 +28 -0
- package/examples/node_modules/.bin/webpack +12 -0
- package/examples/node_modules/.bin/webpack-cli +2 -5
- package/examples/node_modules/.bin/webpack-cli.cmd +6 -6
- package/examples/node_modules/.bin/webpack-cli.ps1 +12 -2
- package/examples/node_modules/.bin/webpack.cmd +17 -0
- package/examples/node_modules/.bin/webpack.ps1 +28 -0
- package/examples/node_modules/.package-lock.json +1407 -0
- package/examples/node_modules/@discoveryjs/json-ext/README.md +2 -1
- package/examples/node_modules/@discoveryjs/json-ext/dist/json-ext.js +147 -164
- package/examples/node_modules/@discoveryjs/json-ext/dist/json-ext.min.js +1 -1
- package/examples/node_modules/@discoveryjs/json-ext/dist/version.js +1 -0
- package/examples/node_modules/@discoveryjs/json-ext/index.d.ts +31 -0
- package/examples/node_modules/@discoveryjs/json-ext/package.json +53 -90
- package/examples/node_modules/@discoveryjs/json-ext/src/index.js +1 -1
- package/examples/node_modules/@discoveryjs/json-ext/src/parse-chunked.js +89 -44
- package/examples/node_modules/@discoveryjs/json-ext/src/stringify-info.js +11 -4
- package/examples/node_modules/@discoveryjs/json-ext/src/stringify-stream.js +17 -3
- package/examples/node_modules/@discoveryjs/json-ext/src/utils.js +6 -5
- package/examples/node_modules/@discoveryjs/json-ext/src/version.js +1 -0
- package/examples/node_modules/@types/eslint/LICENSE +21 -0
- package/examples/node_modules/@types/eslint/README.md +16 -0
- package/examples/node_modules/@types/eslint/helpers.d.ts +3 -0
- package/examples/node_modules/@types/eslint/index.d.ts +953 -0
- package/examples/node_modules/@types/eslint/package.json +65 -0
- package/examples/node_modules/@types/eslint/rules/best-practices.d.ts +931 -0
- package/examples/node_modules/@types/eslint/rules/deprecated.d.ts +267 -0
- package/examples/node_modules/@types/eslint/rules/ecmascript-6.d.ts +502 -0
- package/examples/node_modules/@types/eslint/rules/index.d.ts +21 -0
- package/examples/node_modules/@types/eslint/rules/node-commonjs.d.ts +133 -0
- package/examples/node_modules/@types/eslint/rules/possible-errors.d.ts +484 -0
- package/examples/node_modules/@types/eslint/rules/strict-mode.d.ts +11 -0
- package/examples/node_modules/@types/eslint/rules/stylistic-issues.d.ts +1893 -0
- package/examples/node_modules/@types/eslint/rules/variables.d.ts +187 -0
- package/examples/node_modules/@types/eslint/use-at-your-own-risk.d.ts +8 -0
- package/examples/node_modules/@types/eslint-scope/LICENSE +21 -0
- package/examples/node_modules/@types/eslint-scope/README.md +84 -0
- package/examples/node_modules/@types/eslint-scope/index.d.ts +64 -0
- package/examples/node_modules/@types/eslint-scope/package.json +28 -0
- package/examples/node_modules/@types/estree/LICENSE +21 -0
- package/examples/node_modules/@types/estree/README.md +16 -0
- package/examples/node_modules/@types/estree/flow.d.ts +174 -0
- package/examples/node_modules/@types/estree/index.d.ts +595 -0
- package/examples/node_modules/@types/estree/package.json +25 -0
- package/examples/node_modules/@types/json-schema/LICENSE +21 -0
- package/examples/node_modules/@types/json-schema/README.md +16 -0
- package/examples/node_modules/@types/json-schema/index.d.ts +758 -0
- package/examples/node_modules/@types/json-schema/package.json +40 -0
- package/examples/node_modules/@types/node/LICENSE +21 -0
- package/examples/node_modules/@types/node/README.md +16 -0
- package/examples/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/examples/node_modules/@types/node/assert.d.ts +912 -0
- package/examples/node_modules/@types/node/async_hooks.d.ts +501 -0
- package/examples/node_modules/@types/node/buffer.d.ts +2232 -0
- package/examples/node_modules/@types/node/child_process.d.ts +1366 -0
- package/examples/node_modules/@types/node/cluster.d.ts +414 -0
- package/examples/node_modules/@types/node/console.d.ts +412 -0
- package/examples/node_modules/@types/node/constants.d.ts +18 -0
- package/examples/node_modules/@types/node/crypto.d.ts +3307 -0
- package/examples/node_modules/@types/node/dgram.d.ts +545 -0
- package/examples/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
- package/examples/node_modules/@types/node/dns/promises.d.ts +370 -0
- package/examples/node_modules/@types/node/dns.d.ts +659 -0
- package/examples/node_modules/@types/node/domain.d.ts +169 -0
- package/examples/node_modules/@types/node/events.d.ts +651 -0
- package/examples/node_modules/@types/node/fs/promises.d.ts +1091 -0
- package/examples/node_modules/@types/node/fs.d.ts +3869 -0
- package/examples/node_modules/@types/node/globals.d.ts +284 -0
- package/examples/node_modules/@types/node/globals.global.d.ts +1 -0
- package/examples/node_modules/@types/node/http.d.ts +1396 -0
- package/examples/node_modules/@types/node/http2.d.ts +2100 -0
- package/examples/node_modules/@types/node/https.d.ts +391 -0
- package/examples/node_modules/@types/node/index.d.ts +129 -0
- package/examples/node_modules/@types/node/inspector.d.ts +2744 -0
- package/examples/node_modules/@types/node/module.d.ts +114 -0
- package/examples/node_modules/@types/node/net.d.ts +784 -0
- package/examples/node_modules/@types/node/os.d.ts +455 -0
- package/examples/node_modules/@types/node/package.json +220 -0
- package/examples/node_modules/@types/node/path.d.ts +180 -0
- package/examples/node_modules/@types/node/perf_hooks.d.ts +557 -0
- package/examples/node_modules/@types/node/process.d.ts +1481 -0
- package/examples/node_modules/@types/node/punycode.d.ts +117 -0
- package/examples/node_modules/@types/node/querystring.d.ts +131 -0
- package/examples/node_modules/@types/node/readline.d.ts +650 -0
- package/examples/node_modules/@types/node/repl.d.ts +424 -0
- package/examples/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/examples/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/examples/node_modules/@types/node/stream/web.d.ts +330 -0
- package/examples/node_modules/@types/node/stream.d.ts +1249 -0
- package/examples/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/examples/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/examples/node_modules/@types/node/timers.d.ts +94 -0
- package/examples/node_modules/@types/node/tls.d.ts +1020 -0
- package/examples/node_modules/@types/node/trace_events.d.ts +161 -0
- package/examples/node_modules/@types/node/tty.d.ts +204 -0
- package/examples/node_modules/@types/node/url.d.ts +891 -0
- package/examples/node_modules/@types/node/util.d.ts +1594 -0
- package/examples/node_modules/@types/node/v8.d.ts +378 -0
- package/examples/node_modules/@types/node/vm.d.ts +507 -0
- package/examples/node_modules/@types/node/wasi.d.ts +158 -0
- package/examples/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/examples/node_modules/@types/node/zlib.d.ts +517 -0
- package/examples/node_modules/@webassemblyjs/ast/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/ast/README.md +167 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/clone.js +3 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/definitions.js +668 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/index.js +7 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/node-helpers.js +84 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/node-path.js +137 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/nodes.js +925 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/signatures.js +199 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/transform/ast-module-to-module-context/index.js +378 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/transform/denormalize-type-references/index.js +76 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/transform/wast-identifier-to-index/index.js +216 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/traverse.js +96 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-all-lock/pnpm-lock.yaml → @webassemblyjs/ast/esm/types/basic.js} +0 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-all-lock/yarn.lock → @webassemblyjs/ast/esm/types/nodes.js} +0 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-npm-and-pnpm/pnpm-lock.yaml → @webassemblyjs/ast/esm/types/traverse.js} +0 -0
- package/examples/node_modules/@webassemblyjs/ast/esm/utils.js +265 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/clone.js +10 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/definitions.js +668 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/index.js +127 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/node-helpers.js +107 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/node-path.js +144 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/nodes.js +1144 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/signatures.js +207 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/transform/ast-module-to-module-context/index.js +389 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/transform/denormalize-type-references/index.js +83 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/transform/wast-identifier-to-index/index.js +225 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/traverse.js +105 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-npm-and-yarn/yarn.lock → @webassemblyjs/ast/lib/types/basic.js} +0 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-pnpm-lock/pnpm-lock.yaml → @webassemblyjs/ast/lib/types/nodes.js} +0 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/pnpm-lock.yaml → @webassemblyjs/ast/lib/types/traverse.js} +0 -0
- package/examples/node_modules/@webassemblyjs/ast/lib/utils.js +306 -0
- package/examples/node_modules/@webassemblyjs/ast/package.json +32 -0
- package/examples/node_modules/@webassemblyjs/ast/scripts/generateNodeUtils.js +219 -0
- package/examples/node_modules/@webassemblyjs/ast/scripts/generateTypeDefinitions.js +47 -0
- package/examples/node_modules/@webassemblyjs/ast/scripts/util.js +38 -0
- package/examples/node_modules/@webassemblyjs/floating-point-hex-parser/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/floating-point-hex-parser/README.md +34 -0
- package/examples/node_modules/@webassemblyjs/floating-point-hex-parser/esm/index.js +42 -0
- package/examples/node_modules/@webassemblyjs/floating-point-hex-parser/lib/index.js +49 -0
- package/examples/node_modules/@webassemblyjs/floating-point-hex-parser/package.json +24 -0
- package/examples/node_modules/@webassemblyjs/helper-api-error/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/helper-api-error/esm/index.js +47 -0
- package/examples/node_modules/@webassemblyjs/helper-api-error/lib/index.js +62 -0
- package/examples/node_modules/@webassemblyjs/helper-api-error/package.json +18 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/esm/compare.js +65 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/esm/index.js +67 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/lib/compare.js +73 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/lib/index.js +78 -0
- package/examples/node_modules/@webassemblyjs/helper-buffer/package.json +24 -0
- package/examples/node_modules/@webassemblyjs/helper-numbers/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/helper-numbers/esm/index.js +91 -0
- package/examples/node_modules/@webassemblyjs/helper-numbers/lib/index.js +116 -0
- package/examples/node_modules/@webassemblyjs/helper-numbers/package.json +25 -0
- package/examples/node_modules/@webassemblyjs/helper-numbers/src/index.js +105 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/esm/index.js +391 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/esm/section.js +31 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js +406 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js +38 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-bytecode/package.json +20 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/esm/create.js +107 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/esm/index.js +3 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/esm/remove.js +36 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/esm/resize.js +78 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/lib/create.js +121 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/lib/index.js +35 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/lib/remove.js +45 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/lib/resize.js +90 -0
- package/examples/node_modules/@webassemblyjs/helper-wasm-section/package.json +29 -0
- package/examples/node_modules/@webassemblyjs/ieee754/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/ieee754/esm/index.js +33 -0
- package/examples/node_modules/@webassemblyjs/ieee754/lib/index.js +52 -0
- package/examples/node_modules/@webassemblyjs/ieee754/package.json +23 -0
- package/examples/node_modules/@webassemblyjs/ieee754/src/index.js +47 -0
- package/examples/node_modules/@webassemblyjs/leb128/LICENSE.txt +194 -0
- package/examples/node_modules/@webassemblyjs/leb128/esm/bits.js +145 -0
- package/examples/node_modules/@webassemblyjs/leb128/esm/bufs.js +218 -0
- package/examples/node_modules/@webassemblyjs/leb128/esm/index.js +34 -0
- package/examples/node_modules/@webassemblyjs/leb128/esm/leb.js +316 -0
- package/examples/node_modules/@webassemblyjs/leb128/lib/bits.js +156 -0
- package/examples/node_modules/@webassemblyjs/leb128/lib/bufs.js +236 -0
- package/examples/node_modules/@webassemblyjs/leb128/lib/index.js +59 -0
- package/examples/node_modules/@webassemblyjs/leb128/lib/leb.js +332 -0
- package/examples/node_modules/@webassemblyjs/leb128/package.json +23 -0
- package/examples/node_modules/@webassemblyjs/utf8/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/utf8/esm/decoder.js +95 -0
- package/examples/node_modules/@webassemblyjs/utf8/esm/encoder.js +46 -0
- package/examples/node_modules/@webassemblyjs/utf8/esm/index.js +2 -0
- package/examples/node_modules/@webassemblyjs/utf8/lib/decoder.js +102 -0
- package/examples/node_modules/@webassemblyjs/utf8/lib/encoder.js +53 -0
- package/examples/node_modules/@webassemblyjs/utf8/lib/index.js +21 -0
- package/examples/node_modules/@webassemblyjs/utf8/package.json +20 -0
- package/examples/node_modules/@webassemblyjs/utf8/src/decoder.js +86 -0
- package/examples/node_modules/@webassemblyjs/utf8/src/encoder.js +44 -0
- package/examples/node_modules/@webassemblyjs/utf8/src/index.js +4 -0
- package/examples/node_modules/@webassemblyjs/utf8/test/index.js +13 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/README.md +86 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/esm/apply.js +299 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/esm/index.js +114 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/lib/apply.js +311 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/lib/index.js +133 -0
- package/examples/node_modules/@webassemblyjs/wasm-edit/package.json +33 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/esm/encoder/index.js +301 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/esm/index.js +51 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/lib/encoder/index.js +357 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/lib/index.js +64 -0
- package/examples/node_modules/@webassemblyjs/wasm-gen/package.json +27 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/esm/index.js +41 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/esm/leb128.js +47 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/lib/index.js +50 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/lib/leb128.js +56 -0
- package/examples/node_modules/@webassemblyjs/wasm-opt/package.json +26 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/README.md +28 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/esm/decoder.js +1776 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/esm/index.js +247 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-yarn-and-pnpm/yarn.lock → @webassemblyjs/wasm-parser/esm/types/decoder.js} +0 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js +1792 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/lib/index.js +257 -0
- package/examples/node_modules/{webpack-cli/lib/utils/__tests__/test-yarn-lock/yarn.lock → @webassemblyjs/wasm-parser/lib/types/decoder.js} +0 -0
- package/examples/node_modules/@webassemblyjs/wasm-parser/package.json +44 -0
- package/examples/node_modules/@webassemblyjs/wast-printer/LICENSE +21 -0
- package/examples/node_modules/@webassemblyjs/wast-printer/README.md +17 -0
- package/examples/node_modules/@webassemblyjs/wast-printer/esm/index.js +904 -0
- package/examples/node_modules/@webassemblyjs/wast-printer/lib/index.js +915 -0
- package/examples/node_modules/@webassemblyjs/wast-printer/package.json +36 -0
- package/examples/node_modules/@webpack-cli/configtest/README.md +27 -0
- package/examples/node_modules/@webpack-cli/configtest/lib/index.js +18 -25
- package/examples/node_modules/@webpack-cli/configtest/package.json +14 -36
- package/examples/node_modules/@webpack-cli/info/README.md +6 -5
- package/examples/node_modules/@webpack-cli/info/lib/index.js +57 -38
- package/examples/node_modules/@webpack-cli/info/package.json +19 -37
- package/examples/node_modules/@webpack-cli/serve/README.md +4 -0
- package/examples/node_modules/@webpack-cli/serve/lib/index.js +214 -41
- package/examples/node_modules/@webpack-cli/serve/lib/types.d.ts +62 -19
- package/examples/node_modules/@webpack-cli/serve/lib/types.js +21 -2
- package/examples/node_modules/@webpack-cli/serve/package.json +15 -36
- package/examples/node_modules/@xtuc/ieee754/LICENSE +28 -0
- package/examples/node_modules/@xtuc/ieee754/README.md +51 -0
- package/examples/node_modules/@xtuc/ieee754/dist/.gitkeep +0 -0
- package/examples/node_modules/@xtuc/ieee754/dist/index.cjs.js +96 -0
- package/examples/node_modules/@xtuc/ieee754/index.js +84 -0
- package/examples/node_modules/@xtuc/ieee754/package.json +42 -0
- package/examples/node_modules/@xtuc/long/LICENSE +202 -0
- package/examples/node_modules/@xtuc/long/README.md +257 -0
- package/examples/node_modules/@xtuc/long/dist/long.js +2 -0
- package/examples/node_modules/@xtuc/long/dist/long.js.map +1 -0
- package/examples/node_modules/@xtuc/long/index.d.ts +429 -0
- package/examples/node_modules/@xtuc/long/index.js +1 -0
- package/examples/node_modules/@xtuc/long/package.json +36 -0
- package/examples/node_modules/@xtuc/long/src/long.js +1405 -0
- package/examples/node_modules/acorn/CHANGELOG.md +788 -0
- package/examples/node_modules/acorn/LICENSE +21 -0
- package/examples/node_modules/acorn/README.md +280 -0
- package/examples/node_modules/acorn/bin/acorn +4 -0
- package/examples/node_modules/acorn/dist/acorn.d.ts +214 -0
- package/examples/node_modules/acorn/dist/acorn.js +5619 -0
- package/examples/node_modules/acorn/dist/acorn.mjs +5588 -0
- package/examples/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
- package/examples/node_modules/acorn/dist/bin.js +91 -0
- package/examples/node_modules/acorn/package.json +46 -0
- package/examples/node_modules/acorn-import-assertions/README.md +15 -0
- package/examples/node_modules/acorn-import-assertions/lib/index.js +287 -0
- package/examples/node_modules/acorn-import-assertions/lib/index.mjs +242 -0
- package/examples/node_modules/acorn-import-assertions/package.json +49 -0
- package/examples/node_modules/acorn-import-assertions/src/index.js +242 -0
- package/examples/node_modules/ajv/.tonic_example.js +20 -0
- package/examples/node_modules/ajv/LICENSE +22 -0
- package/examples/node_modules/ajv/README.md +1497 -0
- package/examples/node_modules/ajv/dist/ajv.bundle.js +7189 -0
- package/examples/node_modules/ajv/dist/ajv.min.js +3 -0
- package/examples/node_modules/ajv/dist/ajv.min.js.map +1 -0
- package/examples/node_modules/ajv/lib/ajv.d.ts +397 -0
- package/examples/node_modules/ajv/lib/ajv.js +506 -0
- package/examples/node_modules/ajv/lib/cache.js +26 -0
- package/examples/node_modules/ajv/lib/compile/async.js +90 -0
- package/examples/node_modules/ajv/lib/compile/equal.js +5 -0
- package/examples/node_modules/ajv/lib/compile/error_classes.js +34 -0
- package/examples/node_modules/ajv/lib/compile/formats.js +142 -0
- package/examples/node_modules/ajv/lib/compile/index.js +387 -0
- package/examples/node_modules/ajv/lib/compile/resolve.js +270 -0
- package/examples/node_modules/ajv/lib/compile/rules.js +66 -0
- package/examples/node_modules/ajv/lib/compile/schema_obj.js +9 -0
- package/examples/node_modules/ajv/lib/compile/ucs2length.js +20 -0
- package/examples/node_modules/ajv/lib/compile/util.js +239 -0
- package/examples/node_modules/ajv/lib/data.js +49 -0
- package/examples/node_modules/ajv/lib/definition_schema.js +37 -0
- package/examples/node_modules/ajv/lib/dot/_limit.jst +113 -0
- package/examples/node_modules/ajv/lib/dot/_limitItems.jst +12 -0
- package/examples/node_modules/ajv/lib/dot/_limitLength.jst +12 -0
- package/examples/node_modules/ajv/lib/dot/_limitProperties.jst +12 -0
- package/examples/node_modules/ajv/lib/dot/allOf.jst +32 -0
- package/examples/node_modules/ajv/lib/dot/anyOf.jst +46 -0
- package/examples/node_modules/ajv/lib/dot/coerce.def +51 -0
- package/examples/node_modules/ajv/lib/dot/comment.jst +9 -0
- package/examples/node_modules/ajv/lib/dot/const.jst +11 -0
- package/examples/node_modules/ajv/lib/dot/contains.jst +55 -0
- package/examples/node_modules/ajv/lib/dot/custom.jst +191 -0
- package/examples/node_modules/ajv/lib/dot/defaults.def +47 -0
- package/examples/node_modules/ajv/lib/dot/definitions.def +203 -0
- package/examples/node_modules/ajv/lib/dot/dependencies.jst +79 -0
- package/examples/node_modules/ajv/lib/dot/enum.jst +30 -0
- package/examples/node_modules/ajv/lib/dot/errors.def +194 -0
- package/examples/node_modules/ajv/lib/dot/format.jst +106 -0
- package/examples/node_modules/ajv/lib/dot/if.jst +73 -0
- package/examples/node_modules/ajv/lib/dot/items.jst +98 -0
- package/examples/node_modules/ajv/lib/dot/missing.def +39 -0
- package/examples/node_modules/ajv/lib/dot/multipleOf.jst +22 -0
- package/examples/node_modules/ajv/lib/dot/not.jst +43 -0
- package/examples/node_modules/ajv/lib/dot/oneOf.jst +54 -0
- package/examples/node_modules/ajv/lib/dot/pattern.jst +14 -0
- package/examples/node_modules/ajv/lib/dot/properties.jst +245 -0
- package/examples/node_modules/ajv/lib/dot/propertyNames.jst +52 -0
- package/examples/node_modules/ajv/lib/dot/ref.jst +85 -0
- package/examples/node_modules/ajv/lib/dot/required.jst +108 -0
- package/examples/node_modules/ajv/lib/dot/uniqueItems.jst +62 -0
- package/examples/node_modules/ajv/lib/dot/validate.jst +276 -0
- package/examples/node_modules/ajv/lib/dotjs/README.md +3 -0
- package/examples/node_modules/ajv/lib/dotjs/_limit.js +163 -0
- package/examples/node_modules/ajv/lib/dotjs/_limitItems.js +80 -0
- package/examples/node_modules/ajv/lib/dotjs/_limitLength.js +85 -0
- package/examples/node_modules/ajv/lib/dotjs/_limitProperties.js +80 -0
- package/examples/node_modules/ajv/lib/dotjs/allOf.js +42 -0
- package/examples/node_modules/ajv/lib/dotjs/anyOf.js +73 -0
- package/examples/node_modules/ajv/lib/dotjs/comment.js +14 -0
- package/examples/node_modules/ajv/lib/dotjs/const.js +56 -0
- package/examples/node_modules/ajv/lib/dotjs/contains.js +81 -0
- package/examples/node_modules/ajv/lib/dotjs/custom.js +228 -0
- package/examples/node_modules/ajv/lib/dotjs/dependencies.js +168 -0
- package/examples/node_modules/ajv/lib/dotjs/enum.js +66 -0
- package/examples/node_modules/ajv/lib/dotjs/format.js +150 -0
- package/examples/node_modules/ajv/lib/dotjs/if.js +103 -0
- package/examples/node_modules/ajv/lib/dotjs/index.js +33 -0
- package/examples/node_modules/ajv/lib/dotjs/items.js +140 -0
- package/examples/node_modules/ajv/lib/dotjs/multipleOf.js +80 -0
- package/examples/node_modules/ajv/lib/dotjs/not.js +84 -0
- package/examples/node_modules/ajv/lib/dotjs/oneOf.js +73 -0
- package/examples/node_modules/ajv/lib/dotjs/pattern.js +75 -0
- package/examples/node_modules/ajv/lib/dotjs/properties.js +335 -0
- package/examples/node_modules/ajv/lib/dotjs/propertyNames.js +81 -0
- package/examples/node_modules/ajv/lib/dotjs/ref.js +124 -0
- package/examples/node_modules/ajv/lib/dotjs/required.js +270 -0
- package/examples/node_modules/ajv/lib/dotjs/uniqueItems.js +86 -0
- package/examples/node_modules/ajv/lib/dotjs/validate.js +482 -0
- package/examples/node_modules/ajv/lib/keyword.js +146 -0
- package/examples/node_modules/ajv/lib/refs/data.json +17 -0
- package/examples/node_modules/ajv/lib/refs/json-schema-draft-04.json +149 -0
- package/examples/node_modules/ajv/lib/refs/json-schema-draft-06.json +154 -0
- package/examples/node_modules/ajv/lib/refs/json-schema-draft-07.json +168 -0
- package/examples/node_modules/ajv/lib/refs/json-schema-secure.json +94 -0
- package/examples/node_modules/ajv/package.json +106 -0
- package/examples/node_modules/ajv/scripts/.eslintrc.yml +3 -0
- package/examples/node_modules/ajv/scripts/bundle.js +61 -0
- package/examples/node_modules/ajv/scripts/compile-dots.js +73 -0
- package/examples/node_modules/ajv/scripts/info +10 -0
- package/examples/node_modules/ajv/scripts/prepare-tests +12 -0
- package/examples/node_modules/ajv/scripts/publish-built-version +32 -0
- package/examples/node_modules/ajv/scripts/travis-gh-pages +23 -0
- package/examples/node_modules/ajv-keywords/LICENSE +21 -0
- package/examples/node_modules/ajv-keywords/README.md +836 -0
- package/examples/node_modules/ajv-keywords/ajv-keywords.d.ts +7 -0
- package/examples/node_modules/ajv-keywords/index.js +35 -0
- package/examples/node_modules/ajv-keywords/keywords/_formatLimit.js +101 -0
- package/examples/node_modules/ajv-keywords/keywords/_util.js +15 -0
- package/examples/node_modules/ajv-keywords/keywords/allRequired.js +18 -0
- package/examples/node_modules/ajv-keywords/keywords/anyRequired.js +24 -0
- package/examples/node_modules/ajv-keywords/keywords/deepProperties.js +54 -0
- package/examples/node_modules/ajv-keywords/keywords/deepRequired.js +57 -0
- package/examples/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst +116 -0
- package/examples/node_modules/ajv-keywords/keywords/dot/patternRequired.jst +33 -0
- package/examples/node_modules/ajv-keywords/keywords/dot/switch.jst +71 -0
- package/examples/node_modules/ajv-keywords/keywords/dotjs/README.md +3 -0
- package/examples/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js +178 -0
- package/examples/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js +58 -0
- package/examples/node_modules/ajv-keywords/keywords/dotjs/switch.js +129 -0
- package/examples/node_modules/ajv-keywords/keywords/dynamicDefaults.js +72 -0
- package/examples/node_modules/ajv-keywords/keywords/formatMaximum.js +3 -0
- package/examples/node_modules/ajv-keywords/keywords/formatMinimum.js +3 -0
- package/examples/node_modules/ajv-keywords/keywords/index.js +22 -0
- package/examples/node_modules/ajv-keywords/keywords/instanceof.js +58 -0
- package/examples/node_modules/ajv-keywords/keywords/oneRequired.js +24 -0
- package/examples/node_modules/ajv-keywords/keywords/patternRequired.js +21 -0
- package/examples/node_modules/ajv-keywords/keywords/prohibited.js +24 -0
- package/examples/node_modules/ajv-keywords/keywords/range.js +36 -0
- package/examples/node_modules/ajv-keywords/keywords/regexp.js +36 -0
- package/examples/node_modules/ajv-keywords/keywords/select.js +79 -0
- package/examples/node_modules/ajv-keywords/keywords/switch.js +38 -0
- package/examples/node_modules/ajv-keywords/keywords/transform.js +80 -0
- package/examples/node_modules/ajv-keywords/keywords/typeof.js +32 -0
- package/examples/node_modules/ajv-keywords/keywords/uniqueItemProperties.js +59 -0
- package/examples/node_modules/ajv-keywords/package.json +53 -0
- package/examples/node_modules/browserslist/LICENSE +20 -0
- package/examples/node_modules/browserslist/README.md +66 -0
- package/examples/node_modules/browserslist/browser.js +50 -0
- package/examples/node_modules/browserslist/cli.js +152 -0
- package/examples/node_modules/browserslist/error.d.ts +7 -0
- package/examples/node_modules/browserslist/error.js +12 -0
- package/examples/node_modules/browserslist/index.d.ts +178 -0
- package/examples/node_modules/browserslist/index.js +1235 -0
- package/examples/node_modules/browserslist/node.js +393 -0
- package/examples/node_modules/browserslist/package.json +41 -0
- package/examples/node_modules/browserslist/update-db.js +317 -0
- package/examples/node_modules/buffer-from/LICENSE +21 -0
- package/examples/node_modules/buffer-from/index.js +72 -0
- package/examples/node_modules/buffer-from/package.json +19 -0
- package/examples/node_modules/buffer-from/readme.md +69 -0
- package/examples/node_modules/caniuse-lite/LICENSE +395 -0
- package/examples/node_modules/caniuse-lite/README.md +92 -0
- package/examples/node_modules/caniuse-lite/data/agents.js +1 -0
- package/examples/node_modules/caniuse-lite/data/browserVersions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/browsers.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/aac.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/accelerometer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ambient-light.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/apng.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/array-find-index.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/array-find.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/array-flat.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/array-includes.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/asmjs.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/async-functions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/audio-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/audio.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/audiotracks.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/autofocus.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/auxclick.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/av1.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/avif.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-attachment.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/background-sync.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/battery-status.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/beacon.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/bigint.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/bloburls.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/border-image.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/border-radius.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/brotli.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/calc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/canvas-text.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/canvas.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ch-unit.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/classlist.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/clipboard.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/colr-v1.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/colr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/console-basic.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/console-time.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/const.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/contenteditable.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/cors.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/credential-management.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/cryptography.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-all.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-animation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-any-link.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-appearance.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-autofill.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-canvas.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-color-function.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-containment.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-counters.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-element-function.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-env-function.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-filters.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-first-line.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-fixed.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-gradients.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-grid.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-has.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-hyphenate.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-image-set.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-masks.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-nesting.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-opacity.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-overflow.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-page-break.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-reflections.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-regions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-resize.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-scroll-timeline.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-sel2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-sel3.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-selection.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-shapes.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-sticky.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-table.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-touch-action-2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-transitions.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-variables.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-when-else.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css-zoom.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-attr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-colors.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/currentcolor.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/custom-elements.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/customevent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/datalist.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dataset.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/datauri.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/decorators.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/details.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dialog.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dnssec.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/do-not-track.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/document-policy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/documenthead.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dom-range.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/domfocusin-domfocusout-events.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dommatrix.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/download.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/dragndrop.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/element-closest.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/element-from-point.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/eme.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/eot.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es5.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-class.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-generators.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-module.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-number.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/es6.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/eventsource.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/feature-policy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/fetch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/fileapi.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/filereader.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/filereadersync.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/filesystem.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/flac.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/flexbox.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/flow-root.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/focusoptions-preventscroll.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-feature.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-kerning.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-loading.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-metrics-overrides.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-smooth.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-variant-east-asian.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/fontface.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/form-attribute.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/form-validation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/forms.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/fullscreen.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/gamepad.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/geolocation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/gyroscope.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/hashchange.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/heif.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/hevc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/hidden.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/history.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/html5semantic.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/http2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/http3.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/imagecapture.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ime.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/import-maps.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/imports.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/indexeddb.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/inline-block.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/innertext.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-color.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-datetime.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-event.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-minlength.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-number.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-pattern.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-range.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-search.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/input-selection.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/internationalization.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/jpegxl.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/jpegxr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/json.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/lazyload.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/let.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/localecompare.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/magnetometer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/matchesselector.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/matchmedia.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mathml.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/maxlength.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/media-attribute.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/media-fragments.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/media-session-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mediasource.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/menu.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/meter.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/midi.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mp3.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mpeg4.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/multicolumn.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mutation-events.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/nav-timing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/navigator-language.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/netinfo.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/notifications.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/object-entries.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/object-fit.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/object-observe.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/object-values.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/objectrtc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/offline-apps.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ogv.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/online-status.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/opus.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/outline.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/passwordrules.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/path2d.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/payment-request.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/permissions-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/picture.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ping.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/png-alpha.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pointer-events.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pointer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/pointerlock.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/portals.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/private-class-fields.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/private-methods-and-accessors.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/progress.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/promise-finally.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/promises.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/proximity.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/proxy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/public-class-fields.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/push-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/queryselector.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rellist.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rem.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/resource-timing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ruby.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/run-in.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/script-async.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/script-defer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sdch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/selection-api.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/server-timing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/setimmediate.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sha-2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/shadowdom.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sni.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/spdy.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sql-storage.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/srcset.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/stream.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/streams.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/style-scoped.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-css.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-filters.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-html.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-html5.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-img.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg-smil.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/svg.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/sxg.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/template-literals.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/template.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/temporal.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/testfeat.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-decoration.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-overflow.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-stroke.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/text-underline-offset.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/textcontent.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/textencoder.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/tls1-1.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/tls1-2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/tls1-3.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/token-binding.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/touch.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/transforms2d.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/transforms3d.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/trusted-types.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/ttf.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/typedarrays.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/u2f.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/url.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/use-strict.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/user-select-none.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/user-timing.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/vector-effect.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/vibration.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/video.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/videotracks.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/viewport-units.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wai-aria.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wake-lock.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wasm.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wav.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wbr-element.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/web-animation.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/web-serial.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/web-share.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webauthn.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webgl.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webgl2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webgpu.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webhid.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webm.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webnfc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webp.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/websockets.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webusb.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webvr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webvtt.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webworkers.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/webxr.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/will-change.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/woff.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/woff2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/word-break.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/wordwrap.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/xhr2.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/xhtml.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -0
- package/examples/node_modules/caniuse-lite/data/features.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AX.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/AZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BB.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BJ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/BZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CV.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CX.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/CZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DJ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/DZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/EC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/EE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/EG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ER.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ES.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ET.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FJ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/FR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GB.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GP.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GQ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/GY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/HK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/HN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/HR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/HT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/HU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ID.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IQ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/IT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/JE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/JM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/JO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/JP.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KP.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/KZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LB.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LV.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/LY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ME.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ML.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MP.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MQ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MV.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MX.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/MZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NP.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/NZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/OM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/PY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/QA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/RE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/RO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/RS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/RU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/RW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SB.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ST.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SV.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/SZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TD.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TH.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TJ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TK.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TL.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TO.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TR.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TV.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/TZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/UA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/UG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/US.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/UY.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/UZ.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VC.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VG.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VI.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VN.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/VU.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/WF.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/WS.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/YE.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/YT.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ZA.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ZM.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/ZW.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-af.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-an.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-as.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-eu.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-na.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-oc.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-sa.js +1 -0
- package/examples/node_modules/caniuse-lite/data/regions/alt-ww.js +1 -0
- package/examples/node_modules/caniuse-lite/dist/lib/statuses.js +9 -0
- package/examples/node_modules/caniuse-lite/dist/lib/supported.js +9 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/agents.js +47 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/browserVersions.js +1 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/browsers.js +1 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/feature.js +48 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/features.js +6 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/index.js +4 -0
- package/examples/node_modules/caniuse-lite/dist/unpacker/region.js +22 -0
- package/examples/node_modules/caniuse-lite/package.json +34 -0
- package/examples/node_modules/chrome-trace-event/CHANGES.md +26 -0
- package/examples/node_modules/chrome-trace-event/LICENSE.txt +23 -0
- package/examples/node_modules/chrome-trace-event/README.md +31 -0
- package/examples/node_modules/chrome-trace-event/dist/trace-event.d.ts +52 -0
- package/examples/node_modules/chrome-trace-event/dist/trace-event.js +170 -0
- package/examples/node_modules/chrome-trace-event/dist/trace-event.js.map +1 -0
- package/examples/node_modules/chrome-trace-event/package.json +38 -0
- package/examples/node_modules/clone-deep/package.json +17 -48
- package/examples/node_modules/colorette/README.md +54 -22
- package/examples/node_modules/colorette/index.cjs +213 -71
- package/examples/node_modules/colorette/index.d.ts +91 -47
- package/examples/node_modules/colorette/index.js +142 -68
- package/examples/node_modules/colorette/package.json +17 -51
- package/examples/node_modules/commander/CHANGELOG.md +339 -360
- package/examples/node_modules/commander/Readme.md +254 -743
- package/examples/node_modules/commander/index.js +1003 -1996
- package/examples/node_modules/commander/package.json +24 -86
- package/examples/node_modules/commander/typings/index.d.ts +153 -470
- package/examples/node_modules/cross-spawn/package.json +40 -71
- package/examples/node_modules/electron-to-chromium/CHANGELOG.md +14 -0
- package/examples/node_modules/electron-to-chromium/LICENSE +5 -0
- package/examples/node_modules/electron-to-chromium/README.md +186 -0
- package/examples/node_modules/electron-to-chromium/chromium-versions.js +45 -0
- package/examples/node_modules/electron-to-chromium/chromium-versions.json +1 -0
- package/examples/node_modules/electron-to-chromium/full-chromium-versions.js +1833 -0
- package/examples/node_modules/electron-to-chromium/full-chromium-versions.json +1 -0
- package/examples/node_modules/electron-to-chromium/full-versions.js +1335 -0
- package/examples/node_modules/electron-to-chromium/full-versions.json +1 -0
- package/examples/node_modules/electron-to-chromium/index.js +36 -0
- package/examples/node_modules/electron-to-chromium/package.json +42 -0
- package/examples/node_modules/electron-to-chromium/versions.js +89 -0
- package/examples/node_modules/electron-to-chromium/versions.json +1 -0
- package/examples/node_modules/enhanced-resolve/LICENSE +20 -0
- package/examples/node_modules/enhanced-resolve/README.md +167 -0
- package/examples/node_modules/enhanced-resolve/lib/AliasFieldPlugin.js +96 -0
- package/examples/node_modules/enhanced-resolve/lib/AliasPlugin.js +120 -0
- package/examples/node_modules/enhanced-resolve/lib/AppendPlugin.js +47 -0
- package/examples/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js +477 -0
- package/examples/node_modules/enhanced-resolve/lib/CloneBasenamePlugin.js +45 -0
- package/examples/node_modules/enhanced-resolve/lib/ConditionalPlugin.js +59 -0
- package/examples/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js +96 -0
- package/examples/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js +170 -0
- package/examples/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js +63 -0
- package/examples/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js +149 -0
- package/examples/node_modules/enhanced-resolve/lib/FileExistsPlugin.js +58 -0
- package/examples/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js +171 -0
- package/examples/node_modules/enhanced-resolve/lib/JoinRequestPartPlugin.js +64 -0
- package/examples/node_modules/enhanced-resolve/lib/JoinRequestPlugin.js +41 -0
- package/examples/node_modules/enhanced-resolve/lib/LogInfoPlugin.js +50 -0
- package/examples/node_modules/enhanced-resolve/lib/MainFieldPlugin.js +81 -0
- package/examples/node_modules/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.js +9 -0
- package/examples/node_modules/enhanced-resolve/lib/ModulesInHierarchicalDirectoriesPlugin.js +80 -0
- package/examples/node_modules/enhanced-resolve/lib/ModulesInRootPlugin.js +47 -0
- package/examples/node_modules/enhanced-resolve/lib/NextPlugin.js +33 -0
- package/examples/node_modules/enhanced-resolve/lib/ParsePlugin.js +74 -0
- package/examples/node_modules/enhanced-resolve/lib/PnpPlugin.js +103 -0
- package/examples/node_modules/enhanced-resolve/lib/Resolver.js +500 -0
- package/examples/node_modules/enhanced-resolve/lib/ResolverFactory.js +661 -0
- package/examples/node_modules/enhanced-resolve/lib/RestrictionsPlugin.js +65 -0
- package/examples/node_modules/enhanced-resolve/lib/ResultPlugin.js +42 -0
- package/examples/node_modules/enhanced-resolve/lib/RootsPlugin.js +62 -0
- package/examples/node_modules/enhanced-resolve/lib/SelfReferencePlugin.js +80 -0
- package/examples/node_modules/enhanced-resolve/lib/SymlinkPlugin.js +88 -0
- package/examples/node_modules/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.js +95 -0
- package/examples/node_modules/enhanced-resolve/lib/TryNextPlugin.js +41 -0
- package/examples/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js +99 -0
- package/examples/node_modules/enhanced-resolve/lib/UseFilePlugin.js +49 -0
- package/examples/node_modules/enhanced-resolve/lib/createInnerContext.js +37 -0
- package/examples/node_modules/enhanced-resolve/lib/forEachBail.js +25 -0
- package/examples/node_modules/enhanced-resolve/lib/getInnerRequest.js +27 -0
- package/examples/node_modules/enhanced-resolve/lib/getPaths.js +37 -0
- package/examples/node_modules/enhanced-resolve/lib/index.js +131 -0
- package/examples/node_modules/enhanced-resolve/lib/util/entrypoints.js +667 -0
- package/examples/node_modules/enhanced-resolve/lib/util/identifier.js +26 -0
- package/examples/node_modules/enhanced-resolve/lib/util/path.js +221 -0
- package/examples/node_modules/enhanced-resolve/lib/util/process-browser.js +16 -0
- package/examples/node_modules/enhanced-resolve/package.json +70 -0
- package/examples/node_modules/enhanced-resolve/types.d.ts +506 -0
- package/examples/node_modules/envinfo/dist/cli.js +1 -1
- package/examples/node_modules/envinfo/dist/envinfo.js +1 -1
- package/examples/node_modules/envinfo/package.json +55 -89
- package/examples/node_modules/es-module-lexer/LICENSE +10 -0
- package/examples/node_modules/es-module-lexer/README.md +251 -0
- package/examples/node_modules/es-module-lexer/dist/lexer.asm.js +1 -0
- package/examples/node_modules/es-module-lexer/dist/lexer.cjs +1 -0
- package/examples/node_modules/es-module-lexer/dist/lexer.js +2 -0
- package/examples/node_modules/es-module-lexer/lexer.js +899 -0
- package/examples/node_modules/es-module-lexer/package.json +53 -0
- package/examples/node_modules/es-module-lexer/types/lexer.d.ts +86 -0
- package/examples/node_modules/escalade/dist/index.js +22 -0
- package/examples/node_modules/escalade/dist/index.mjs +22 -0
- package/examples/node_modules/escalade/index.d.ts +3 -0
- package/examples/node_modules/escalade/license +9 -0
- package/examples/node_modules/escalade/package.json +61 -0
- package/examples/node_modules/escalade/readme.md +211 -0
- package/examples/node_modules/escalade/sync/index.d.ts +2 -0
- package/examples/node_modules/escalade/sync/index.js +18 -0
- package/examples/node_modules/escalade/sync/index.mjs +18 -0
- package/examples/node_modules/eslint-scope/CHANGELOG.md +70 -0
- package/examples/node_modules/eslint-scope/LICENSE +22 -0
- package/examples/node_modules/eslint-scope/README.md +54 -0
- package/examples/node_modules/eslint-scope/lib/definition.js +86 -0
- package/examples/node_modules/eslint-scope/lib/index.js +165 -0
- package/examples/node_modules/eslint-scope/lib/pattern-visitor.js +152 -0
- package/examples/node_modules/eslint-scope/lib/reference.js +167 -0
- package/examples/node_modules/eslint-scope/lib/referencer.js +629 -0
- package/examples/node_modules/eslint-scope/lib/scope-manager.js +247 -0
- package/examples/node_modules/eslint-scope/lib/scope.js +748 -0
- package/examples/node_modules/eslint-scope/lib/variable.js +88 -0
- package/examples/node_modules/eslint-scope/package.json +48 -0
- package/examples/node_modules/esrecurse/.babelrc +3 -0
- package/examples/node_modules/esrecurse/README.md +171 -0
- package/examples/node_modules/esrecurse/esrecurse.js +117 -0
- package/examples/node_modules/esrecurse/gulpfile.babel.js +92 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/.jshintrc +16 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD +19 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/README.md +153 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/estraverse.js +805 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/gulpfile.js +70 -0
- package/examples/node_modules/esrecurse/node_modules/estraverse/package.json +40 -0
- package/examples/node_modules/esrecurse/package.json +52 -0
- package/examples/node_modules/estraverse/.jshintrc +16 -0
- package/examples/node_modules/estraverse/LICENSE.BSD +19 -0
- package/examples/node_modules/estraverse/README.md +153 -0
- package/examples/node_modules/estraverse/estraverse.js +782 -0
- package/examples/node_modules/estraverse/gulpfile.js +70 -0
- package/examples/node_modules/estraverse/package.json +40 -0
- package/examples/node_modules/events/.airtap.yml +15 -0
- package/examples/node_modules/events/.github/FUNDING.yml +12 -0
- package/examples/node_modules/events/.travis.yml +18 -0
- package/examples/node_modules/events/History.md +118 -0
- package/examples/node_modules/events/LICENSE +22 -0
- package/examples/node_modules/events/Readme.md +50 -0
- package/examples/node_modules/events/events.js +497 -0
- package/examples/node_modules/events/package.json +37 -0
- package/examples/node_modules/events/security.md +10 -0
- package/examples/node_modules/events/tests/add-listeners.js +111 -0
- package/examples/node_modules/events/tests/check-listener-leaks.js +101 -0
- package/examples/node_modules/events/tests/common.js +104 -0
- package/examples/node_modules/events/tests/errors.js +13 -0
- package/examples/node_modules/events/tests/events-list.js +28 -0
- package/examples/node_modules/events/tests/events-once.js +234 -0
- package/examples/node_modules/events/tests/index.js +64 -0
- package/examples/node_modules/events/tests/legacy-compat.js +16 -0
- package/examples/node_modules/events/tests/listener-count.js +37 -0
- package/examples/node_modules/events/tests/listeners-side-effects.js +56 -0
- package/examples/node_modules/events/tests/listeners.js +168 -0
- package/examples/node_modules/events/tests/max-listeners.js +47 -0
- package/examples/node_modules/events/tests/method-names.js +35 -0
- package/examples/node_modules/events/tests/modify-in-emit.js +90 -0
- package/examples/node_modules/events/tests/num-args.js +60 -0
- package/examples/node_modules/events/tests/once.js +83 -0
- package/examples/node_modules/events/tests/prepend.js +31 -0
- package/examples/node_modules/events/tests/remove-all-listeners.js +133 -0
- package/examples/node_modules/events/tests/remove-listeners.js +212 -0
- package/examples/node_modules/events/tests/set-max-listeners-side-effects.js +31 -0
- package/examples/node_modules/events/tests/special-event-names.js +45 -0
- package/examples/node_modules/events/tests/subclass.js +66 -0
- package/examples/node_modules/events/tests/symbols.js +25 -0
- package/examples/node_modules/execa/index.d.ts +12 -2
- package/examples/node_modules/execa/index.js +14 -4
- package/examples/node_modules/execa/lib/command.js +25 -5
- package/examples/node_modules/execa/lib/error.js +2 -0
- package/examples/node_modules/execa/lib/kill.js +7 -4
- package/examples/node_modules/execa/lib/stream.js +1 -1
- package/examples/node_modules/execa/package.json +72 -100
- package/examples/node_modules/execa/readme.md +16 -3
- package/examples/node_modules/fast-deep-equal/LICENSE +21 -0
- package/examples/node_modules/fast-deep-equal/README.md +96 -0
- package/examples/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
- package/examples/node_modules/fast-deep-equal/es6/index.js +72 -0
- package/examples/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
- package/examples/node_modules/fast-deep-equal/es6/react.js +79 -0
- package/examples/node_modules/fast-deep-equal/index.d.ts +4 -0
- package/examples/node_modules/fast-deep-equal/index.js +46 -0
- package/examples/node_modules/fast-deep-equal/package.json +61 -0
- package/examples/node_modules/fast-deep-equal/react.d.ts +2 -0
- package/examples/node_modules/fast-deep-equal/react.js +53 -0
- package/examples/node_modules/fast-json-stable-stringify/.eslintrc.yml +26 -0
- package/examples/node_modules/fast-json-stable-stringify/.github/FUNDING.yml +1 -0
- package/examples/node_modules/fast-json-stable-stringify/.travis.yml +8 -0
- package/examples/node_modules/fast-json-stable-stringify/LICENSE +21 -0
- package/examples/node_modules/fast-json-stable-stringify/README.md +131 -0
- package/examples/node_modules/fast-json-stable-stringify/benchmark/index.js +31 -0
- package/examples/node_modules/fast-json-stable-stringify/benchmark/test.json +137 -0
- package/examples/node_modules/fast-json-stable-stringify/example/key_cmp.js +7 -0
- package/examples/node_modules/fast-json-stable-stringify/example/nested.js +3 -0
- package/examples/node_modules/fast-json-stable-stringify/example/str.js +3 -0
- package/examples/node_modules/fast-json-stable-stringify/example/value_cmp.js +7 -0
- package/examples/node_modules/fast-json-stable-stringify/index.d.ts +4 -0
- package/examples/node_modules/fast-json-stable-stringify/index.js +59 -0
- package/examples/node_modules/fast-json-stable-stringify/package.json +52 -0
- package/examples/node_modules/fast-json-stable-stringify/test/cmp.js +13 -0
- package/examples/node_modules/fast-json-stable-stringify/test/nested.js +44 -0
- package/examples/node_modules/fast-json-stable-stringify/test/str.js +46 -0
- package/examples/node_modules/fast-json-stable-stringify/test/to-json.js +22 -0
- package/examples/node_modules/fastest-levenshtein/package.json +33 -60
- package/examples/node_modules/find-up/package.json +51 -83
- package/examples/node_modules/function-bind/package.json +23 -54
- package/examples/node_modules/get-stream/index.d.ts +1 -1
- package/examples/node_modules/get-stream/package.json +45 -77
- package/examples/node_modules/get-stream/readme.md +1 -1
- package/examples/node_modules/glob-to-regexp/.travis.yml +4 -0
- package/examples/node_modules/glob-to-regexp/README.md +75 -0
- package/examples/node_modules/glob-to-regexp/index.js +130 -0
- package/examples/node_modules/glob-to-regexp/package.json +23 -0
- package/examples/node_modules/glob-to-regexp/test.js +235 -0
- package/examples/node_modules/graceful-fs/LICENSE +15 -0
- package/examples/node_modules/graceful-fs/README.md +143 -0
- package/examples/node_modules/graceful-fs/clone.js +23 -0
- package/examples/node_modules/graceful-fs/graceful-fs.js +429 -0
- package/examples/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/examples/node_modules/graceful-fs/package.json +50 -0
- package/examples/node_modules/graceful-fs/polyfills.js +348 -0
- package/examples/node_modules/has/package.json +21 -46
- package/examples/node_modules/has-flag/index.d.ts +39 -0
- package/examples/node_modules/has-flag/index.js +8 -0
- package/examples/node_modules/has-flag/license +9 -0
- package/examples/node_modules/has-flag/package.json +46 -0
- package/examples/node_modules/has-flag/readme.md +89 -0
- package/examples/node_modules/human-signals/package.json +27 -59
- package/examples/node_modules/import-local/index.js +9 -4
- package/examples/node_modules/import-local/package.json +50 -81
- package/examples/node_modules/import-local/readme.md +7 -8
- package/examples/node_modules/interpret/package.json +24 -67
- package/examples/node_modules/is-core-module/.eslintrc +0 -1
- package/examples/node_modules/is-core-module/.nycrc +0 -4
- package/examples/node_modules/is-core-module/CHANGELOG.md +69 -0
- package/examples/node_modules/is-core-module/README.md +6 -3
- package/examples/node_modules/is-core-module/core.json +85 -16
- package/examples/node_modules/is-core-module/index.js +1 -1
- package/examples/node_modules/is-core-module/package.json +67 -92
- package/examples/node_modules/is-core-module/test/index.js +47 -0
- package/examples/node_modules/is-plain-object/package.json +26 -68
- package/examples/node_modules/is-stream/index.d.ts +0 -1
- package/examples/node_modules/is-stream/index.js +1 -2
- package/examples/node_modules/is-stream/license +1 -1
- package/examples/node_modules/is-stream/package.json +40 -71
- package/examples/node_modules/is-stream/readme.md +12 -9
- package/examples/node_modules/isexe/package.json +16 -45
- package/examples/node_modules/isobject/package.json +24 -69
- package/examples/node_modules/jest-worker/LICENSE +21 -0
- package/examples/node_modules/jest-worker/README.md +247 -0
- package/examples/node_modules/jest-worker/build/Farm.d.ts +29 -0
- package/examples/node_modules/jest-worker/build/Farm.js +206 -0
- package/examples/node_modules/jest-worker/build/FifoQueue.d.ts +18 -0
- package/examples/node_modules/jest-worker/build/FifoQueue.js +171 -0
- package/examples/node_modules/jest-worker/build/PriorityQueue.d.ts +41 -0
- package/examples/node_modules/jest-worker/build/PriorityQueue.js +188 -0
- package/examples/node_modules/jest-worker/build/WorkerPool.d.ts +13 -0
- package/examples/node_modules/jest-worker/build/WorkerPool.js +49 -0
- package/examples/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +21 -0
- package/examples/node_modules/jest-worker/build/base/BaseWorkerPool.js +201 -0
- package/examples/node_modules/jest-worker/build/index.d.ts +49 -0
- package/examples/node_modules/jest-worker/build/index.js +223 -0
- package/examples/node_modules/jest-worker/build/types.d.ts +143 -0
- package/examples/node_modules/jest-worker/build/types.js +39 -0
- package/examples/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +51 -0
- package/examples/node_modules/jest-worker/build/workers/ChildProcessWorker.js +333 -0
- package/examples/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +34 -0
- package/examples/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +344 -0
- package/examples/node_modules/jest-worker/build/workers/messageParent.d.ts +8 -0
- package/examples/node_modules/jest-worker/build/workers/messageParent.js +38 -0
- package/examples/node_modules/jest-worker/build/workers/processChild.d.ts +7 -0
- package/examples/node_modules/jest-worker/build/workers/processChild.js +148 -0
- package/examples/node_modules/jest-worker/build/workers/threadChild.d.ts +7 -0
- package/examples/node_modules/jest-worker/build/workers/threadChild.js +159 -0
- package/examples/node_modules/jest-worker/package.json +38 -0
- package/examples/node_modules/json-parse-better-errors/CHANGELOG.md +46 -0
- package/examples/node_modules/json-parse-better-errors/LICENSE.md +7 -0
- package/examples/node_modules/json-parse-better-errors/README.md +46 -0
- package/examples/node_modules/json-parse-better-errors/index.js +38 -0
- package/examples/node_modules/json-parse-better-errors/package.json +45 -0
- package/examples/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
- package/examples/node_modules/json-schema-traverse/.travis.yml +8 -0
- package/examples/node_modules/json-schema-traverse/LICENSE +21 -0
- package/examples/node_modules/json-schema-traverse/README.md +83 -0
- package/examples/node_modules/json-schema-traverse/index.js +89 -0
- package/examples/node_modules/json-schema-traverse/package.json +43 -0
- package/examples/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/examples/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/examples/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- package/examples/node_modules/kind-of/package.json +27 -83
- package/examples/node_modules/loader-runner/LICENSE +21 -0
- package/examples/node_modules/loader-runner/README.md +53 -0
- package/examples/node_modules/loader-runner/lib/LoaderLoadingError.js +11 -0
- package/examples/node_modules/loader-runner/lib/LoaderRunner.js +415 -0
- package/examples/node_modules/loader-runner/lib/loadLoader.js +54 -0
- package/examples/node_modules/loader-runner/package.json +45 -0
- package/examples/node_modules/locate-path/package.json +43 -75
- package/examples/node_modules/merge-stream/package.json +10 -45
- package/examples/node_modules/mime-db/HISTORY.md +507 -0
- package/examples/node_modules/mime-db/LICENSE +23 -0
- package/examples/node_modules/mime-db/README.md +100 -0
- package/examples/node_modules/mime-db/db.json +8519 -0
- package/examples/node_modules/mime-db/index.js +12 -0
- package/examples/node_modules/mime-db/package.json +60 -0
- package/examples/node_modules/mime-types/HISTORY.md +397 -0
- package/examples/node_modules/mime-types/LICENSE +23 -0
- package/examples/node_modules/mime-types/README.md +113 -0
- package/examples/node_modules/mime-types/index.js +188 -0
- package/examples/node_modules/mime-types/package.json +44 -0
- package/examples/node_modules/mimic-fn/package.json +40 -72
- package/examples/node_modules/neo-async/LICENSE +22 -0
- package/examples/node_modules/neo-async/README.md +273 -0
- package/examples/node_modules/neo-async/all.js +3 -0
- package/examples/node_modules/neo-async/allLimit.js +3 -0
- package/examples/node_modules/neo-async/allSeries.js +3 -0
- package/examples/node_modules/neo-async/angelFall.js +3 -0
- package/examples/node_modules/neo-async/any.js +3 -0
- package/examples/node_modules/neo-async/anyLimit.js +3 -0
- package/examples/node_modules/neo-async/anySeries.js +3 -0
- package/examples/node_modules/neo-async/apply.js +3 -0
- package/examples/node_modules/neo-async/applyEach.js +3 -0
- package/examples/node_modules/neo-async/applyEachSeries.js +3 -0
- package/examples/node_modules/neo-async/async.js +9184 -0
- package/examples/node_modules/neo-async/async.min.js +80 -0
- package/examples/node_modules/neo-async/asyncify.js +3 -0
- package/examples/node_modules/neo-async/auto.js +3 -0
- package/examples/node_modules/neo-async/autoInject.js +3 -0
- package/examples/node_modules/neo-async/cargo.js +3 -0
- package/examples/node_modules/neo-async/compose.js +3 -0
- package/examples/node_modules/neo-async/concat.js +3 -0
- package/examples/node_modules/neo-async/concatLimit.js +3 -0
- package/examples/node_modules/neo-async/concatSeries.js +3 -0
- package/examples/node_modules/neo-async/constant.js +3 -0
- package/examples/node_modules/neo-async/createLogger.js +3 -0
- package/examples/node_modules/neo-async/detect.js +3 -0
- package/examples/node_modules/neo-async/detectLimit.js +3 -0
- package/examples/node_modules/neo-async/detectSeries.js +3 -0
- package/examples/node_modules/neo-async/dir.js +3 -0
- package/examples/node_modules/neo-async/doDuring.js +3 -0
- package/examples/node_modules/neo-async/doUntil.js +3 -0
- package/examples/node_modules/neo-async/doWhilst.js +3 -0
- package/examples/node_modules/neo-async/during.js +3 -0
- package/examples/node_modules/neo-async/each.js +3 -0
- package/examples/node_modules/neo-async/eachLimit.js +3 -0
- package/examples/node_modules/neo-async/eachOf.js +3 -0
- package/examples/node_modules/neo-async/eachOfLimit.js +3 -0
- package/examples/node_modules/neo-async/eachOfSeries.js +3 -0
- package/examples/node_modules/neo-async/eachSeries.js +3 -0
- package/examples/node_modules/neo-async/ensureAsync.js +3 -0
- package/examples/node_modules/neo-async/every.js +3 -0
- package/examples/node_modules/neo-async/everyLimit.js +3 -0
- package/examples/node_modules/neo-async/everySeries.js +3 -0
- package/examples/node_modules/neo-async/fast.js +3 -0
- package/examples/node_modules/neo-async/filter.js +3 -0
- package/examples/node_modules/neo-async/filterLimit.js +3 -0
- package/examples/node_modules/neo-async/filterSeries.js +3 -0
- package/examples/node_modules/neo-async/find.js +3 -0
- package/examples/node_modules/neo-async/findLimit.js +3 -0
- package/examples/node_modules/neo-async/findSeries.js +3 -0
- package/examples/node_modules/neo-async/foldl.js +3 -0
- package/examples/node_modules/neo-async/foldr.js +3 -0
- package/examples/node_modules/neo-async/forEach.js +3 -0
- package/examples/node_modules/neo-async/forEachLimit.js +3 -0
- package/examples/node_modules/neo-async/forEachOf.js +3 -0
- package/examples/node_modules/neo-async/forEachOfLimit.js +3 -0
- package/examples/node_modules/neo-async/forEachOfSeries.js +3 -0
- package/examples/node_modules/neo-async/forEachSeries.js +3 -0
- package/examples/node_modules/neo-async/forever.js +3 -0
- package/examples/node_modules/neo-async/groupBy.js +3 -0
- package/examples/node_modules/neo-async/groupByLimit.js +3 -0
- package/examples/node_modules/neo-async/groupBySeries.js +3 -0
- package/examples/node_modules/neo-async/inject.js +3 -0
- package/examples/node_modules/neo-async/iterator.js +3 -0
- package/examples/node_modules/neo-async/log.js +3 -0
- package/examples/node_modules/neo-async/map.js +3 -0
- package/examples/node_modules/neo-async/mapLimit.js +3 -0
- package/examples/node_modules/neo-async/mapSeries.js +3 -0
- package/examples/node_modules/neo-async/mapValues.js +3 -0
- package/examples/node_modules/neo-async/mapValuesLimit.js +3 -0
- package/examples/node_modules/neo-async/mapValuesSeries.js +3 -0
- package/examples/node_modules/neo-async/memoize.js +3 -0
- package/examples/node_modules/neo-async/nextTick.js +3 -0
- package/examples/node_modules/neo-async/omit.js +3 -0
- package/examples/node_modules/neo-async/omitLimit.js +3 -0
- package/examples/node_modules/neo-async/omitSeries.js +3 -0
- package/examples/node_modules/neo-async/package.json +57 -0
- package/examples/node_modules/neo-async/parallel.js +3 -0
- package/examples/node_modules/neo-async/parallelLimit.js +3 -0
- package/examples/node_modules/neo-async/pick.js +3 -0
- package/examples/node_modules/neo-async/pickLimit.js +3 -0
- package/examples/node_modules/neo-async/pickSeries.js +3 -0
- package/examples/node_modules/neo-async/priorityQueue.js +3 -0
- package/examples/node_modules/neo-async/queue.js +3 -0
- package/examples/node_modules/neo-async/race.js +3 -0
- package/examples/node_modules/neo-async/reduce.js +3 -0
- package/examples/node_modules/neo-async/reduceRight.js +3 -0
- package/examples/node_modules/neo-async/reflect.js +3 -0
- package/examples/node_modules/neo-async/reflectAll.js +3 -0
- package/examples/node_modules/neo-async/reject.js +3 -0
- package/examples/node_modules/neo-async/rejectLimit.js +3 -0
- package/examples/node_modules/neo-async/rejectSeries.js +3 -0
- package/examples/node_modules/neo-async/retry.js +3 -0
- package/examples/node_modules/neo-async/retryable.js +3 -0
- package/examples/node_modules/neo-async/safe.js +3 -0
- package/examples/node_modules/neo-async/select.js +3 -0
- package/examples/node_modules/neo-async/selectLimit.js +3 -0
- package/examples/node_modules/neo-async/selectSeries.js +3 -0
- package/examples/node_modules/neo-async/seq.js +3 -0
- package/examples/node_modules/neo-async/series.js +3 -0
- package/examples/node_modules/neo-async/setImmediate.js +3 -0
- package/examples/node_modules/neo-async/some.js +3 -0
- package/examples/node_modules/neo-async/someLimit.js +3 -0
- package/examples/node_modules/neo-async/someSeries.js +3 -0
- package/examples/node_modules/neo-async/sortBy.js +3 -0
- package/examples/node_modules/neo-async/sortByLimit.js +3 -0
- package/examples/node_modules/neo-async/sortBySeries.js +3 -0
- package/examples/node_modules/neo-async/timeout.js +3 -0
- package/examples/node_modules/neo-async/times.js +3 -0
- package/examples/node_modules/neo-async/timesLimit.js +3 -0
- package/examples/node_modules/neo-async/timesSeries.js +3 -0
- package/examples/node_modules/neo-async/transform.js +3 -0
- package/examples/node_modules/neo-async/transformLimit.js +3 -0
- package/examples/node_modules/neo-async/transformSeries.js +3 -0
- package/examples/node_modules/neo-async/tryEach.js +3 -0
- package/examples/node_modules/neo-async/unmemoize.js +3 -0
- package/examples/node_modules/neo-async/until.js +3 -0
- package/examples/node_modules/neo-async/waterfall.js +3 -0
- package/examples/node_modules/neo-async/whilst.js +3 -0
- package/examples/node_modules/neo-async/wrapSync.js +3 -0
- package/examples/node_modules/node-releases/LICENSE +21 -0
- package/examples/node_modules/node-releases/README.md +31 -0
- package/examples/node_modules/node-releases/data/processed/envs.json +1 -0
- package/examples/node_modules/node-releases/data/release-schedule/release-schedule.json +1 -0
- package/examples/node_modules/node-releases/package.json +18 -0
- package/examples/node_modules/npm-run-path/package.json +42 -74
- package/examples/node_modules/onetime/package.json +41 -73
- package/examples/node_modules/p-limit/package.json +50 -82
- package/examples/node_modules/p-locate/package.json +51 -83
- package/examples/node_modules/p-try/package.json +40 -72
- package/examples/node_modules/path-exists/package.json +37 -69
- package/examples/node_modules/path-key/package.json +37 -70
- package/examples/node_modules/path-parse/index.js +17 -35
- package/examples/node_modules/path-parse/package.json +13 -41
- package/examples/node_modules/picocolors/LICENSE +15 -0
- package/examples/node_modules/picocolors/README.md +21 -0
- package/examples/node_modules/picocolors/package.json +25 -0
- package/examples/node_modules/picocolors/picocolors.browser.js +4 -0
- package/examples/node_modules/picocolors/picocolors.d.ts +5 -0
- package/examples/node_modules/picocolors/picocolors.js +58 -0
- package/examples/node_modules/picocolors/types.ts +30 -0
- package/examples/node_modules/pkg-dir/package.json +54 -86
- package/examples/node_modules/punycode/LICENSE-MIT.txt +20 -0
- package/examples/node_modules/punycode/README.md +122 -0
- package/examples/node_modules/punycode/package.json +58 -0
- package/examples/node_modules/punycode/punycode.es6.js +441 -0
- package/examples/node_modules/punycode/punycode.js +440 -0
- package/examples/node_modules/randombytes/.travis.yml +15 -0
- package/examples/node_modules/randombytes/.zuul.yml +1 -0
- package/examples/node_modules/randombytes/LICENSE +21 -0
- package/examples/node_modules/randombytes/README.md +14 -0
- package/examples/node_modules/randombytes/browser.js +50 -0
- package/examples/node_modules/randombytes/index.js +1 -0
- package/examples/node_modules/randombytes/package.json +36 -0
- package/examples/node_modules/randombytes/test.js +81 -0
- package/examples/node_modules/rechoir/README.md +9 -0
- package/examples/node_modules/rechoir/lib/extension.js +35 -10
- package/examples/node_modules/rechoir/package.json +24 -67
- package/examples/node_modules/resolve/.eslintrc +34 -8
- package/examples/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/examples/node_modules/resolve/appveyor.yml +4 -2
- package/examples/node_modules/resolve/async.js +3 -0
- package/examples/node_modules/resolve/bin/resolve +50 -0
- package/examples/node_modules/resolve/lib/async.js +10 -1
- package/examples/node_modules/resolve/lib/core.js +1 -2
- package/examples/node_modules/resolve/lib/core.json +85 -16
- package/examples/node_modules/resolve/lib/homedir.js +24 -0
- package/examples/node_modules/resolve/lib/node-modules-paths.js +1 -1
- package/examples/node_modules/resolve/lib/sync.js +14 -5
- package/examples/node_modules/resolve/package.json +60 -78
- package/examples/node_modules/resolve/readme.markdown +35 -13
- package/examples/node_modules/resolve/sync.js +3 -0
- package/examples/node_modules/resolve/test/home_paths.js +127 -0
- package/examples/node_modules/resolve/test/home_paths_sync.js +114 -0
- package/examples/node_modules/resolve/test/mock_sync.js +2 -4
- package/examples/node_modules/resolve/test/node_path.js +1 -1
- package/examples/node_modules/resolve/test/resolver/invalid_main/package.json +1 -1
- package/examples/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
- package/examples/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
- package/examples/node_modules/resolve/test/resolver.js +99 -3
- package/examples/node_modules/resolve/test/resolver_sync.js +310 -23
- package/examples/node_modules/resolve-cwd/package.json +41 -73
- package/examples/node_modules/resolve-from/package.json +34 -66
- package/examples/node_modules/safe-buffer/LICENSE +21 -0
- package/examples/node_modules/safe-buffer/README.md +584 -0
- package/examples/node_modules/safe-buffer/index.d.ts +187 -0
- package/examples/node_modules/safe-buffer/index.js +65 -0
- package/examples/node_modules/safe-buffer/package.json +51 -0
- package/examples/node_modules/schema-utils/LICENSE +20 -0
- package/examples/node_modules/schema-utils/README.md +290 -0
- package/examples/node_modules/schema-utils/declarations/ValidationError.d.ts +74 -0
- package/examples/node_modules/schema-utils/declarations/index.d.ts +3 -0
- package/examples/node_modules/schema-utils/declarations/keywords/absolutePath.d.ts +10 -0
- package/examples/node_modules/schema-utils/declarations/util/Range.d.ts +79 -0
- package/examples/node_modules/schema-utils/declarations/util/hints.d.ts +3 -0
- package/examples/node_modules/schema-utils/declarations/validate.d.ts +37 -0
- package/examples/node_modules/schema-utils/dist/ValidationError.js +1271 -0
- package/examples/node_modules/schema-utils/dist/index.js +11 -0
- package/examples/node_modules/schema-utils/dist/keywords/absolutePath.js +93 -0
- package/examples/node_modules/schema-utils/dist/util/Range.js +163 -0
- package/examples/node_modules/schema-utils/dist/util/hints.js +105 -0
- package/examples/node_modules/schema-utils/dist/validate.js +163 -0
- package/examples/node_modules/schema-utils/package.json +78 -0
- package/examples/node_modules/serialize-javascript/LICENSE +27 -0
- package/examples/node_modules/serialize-javascript/README.md +142 -0
- package/examples/node_modules/serialize-javascript/index.js +268 -0
- package/examples/node_modules/serialize-javascript/package.json +36 -0
- package/examples/node_modules/shallow-clone/package.json +20 -57
- package/examples/node_modules/shebang-command/package.json +32 -64
- package/examples/node_modules/shebang-regex/package.json +33 -65
- package/examples/node_modules/signal-exit/README.md +1 -1
- package/examples/node_modules/signal-exit/index.js +169 -130
- package/examples/node_modules/signal-exit/package.json +24 -52
- package/examples/node_modules/source-map/CHANGELOG.md +301 -0
- package/examples/node_modules/source-map/LICENSE +28 -0
- package/examples/node_modules/source-map/README.md +742 -0
- package/examples/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/examples/node_modules/source-map/dist/source-map.js +3233 -0
- package/examples/node_modules/source-map/dist/source-map.min.js +2 -0
- package/examples/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/examples/node_modules/source-map/lib/array-set.js +121 -0
- package/examples/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/examples/node_modules/source-map/lib/base64.js +67 -0
- package/examples/node_modules/source-map/lib/binary-search.js +111 -0
- package/examples/node_modules/source-map/lib/mapping-list.js +79 -0
- package/examples/node_modules/source-map/lib/quick-sort.js +114 -0
- package/examples/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/examples/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/examples/node_modules/source-map/lib/source-node.js +413 -0
- package/examples/node_modules/source-map/lib/util.js +488 -0
- package/examples/node_modules/source-map/package.json +73 -0
- package/examples/node_modules/source-map/source-map.d.ts +98 -0
- package/examples/node_modules/source-map/source-map.js +8 -0
- package/examples/node_modules/source-map-support/LICENSE.md +21 -0
- package/examples/node_modules/source-map-support/README.md +284 -0
- package/examples/node_modules/source-map-support/browser-source-map-support.js +114 -0
- package/examples/node_modules/source-map-support/package.json +31 -0
- package/examples/node_modules/source-map-support/register-hook-require.js +1 -0
- package/examples/node_modules/source-map-support/register.js +1 -0
- package/examples/node_modules/source-map-support/source-map-support.js +625 -0
- package/examples/node_modules/strip-final-newline/package.json +38 -70
- package/examples/node_modules/supports-color/browser.js +24 -0
- package/examples/node_modules/supports-color/index.js +152 -0
- package/examples/node_modules/supports-color/license +9 -0
- package/examples/node_modules/supports-color/package.json +58 -0
- package/examples/node_modules/supports-color/readme.md +77 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
- package/examples/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/examples/node_modules/tapable/LICENSE +21 -0
- package/examples/node_modules/tapable/README.md +296 -0
- package/examples/node_modules/tapable/lib/AsyncParallelBailHook.js +85 -0
- package/examples/node_modules/tapable/lib/AsyncParallelHook.js +37 -0
- package/examples/node_modules/tapable/lib/AsyncSeriesBailHook.js +42 -0
- package/examples/node_modules/tapable/lib/AsyncSeriesHook.js +37 -0
- package/examples/node_modules/tapable/lib/AsyncSeriesLoopHook.js +37 -0
- package/examples/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js +47 -0
- package/examples/node_modules/tapable/lib/Hook.js +175 -0
- package/examples/node_modules/tapable/lib/HookCodeFactory.js +468 -0
- package/examples/node_modules/tapable/lib/HookMap.js +61 -0
- package/examples/node_modules/tapable/lib/MultiHook.js +54 -0
- package/examples/node_modules/tapable/lib/SyncBailHook.js +51 -0
- package/examples/node_modules/tapable/lib/SyncHook.js +46 -0
- package/examples/node_modules/tapable/lib/SyncLoopHook.js +46 -0
- package/examples/node_modules/tapable/lib/SyncWaterfallHook.js +57 -0
- package/examples/node_modules/tapable/lib/index.js +19 -0
- package/examples/node_modules/tapable/lib/util-browser.js +16 -0
- package/examples/node_modules/tapable/package.json +44 -0
- package/examples/node_modules/tapable/tapable.d.ts +116 -0
- package/examples/node_modules/terser/CHANGELOG.md +480 -0
- package/examples/node_modules/terser/LICENSE +29 -0
- package/examples/node_modules/terser/PATRONS.md +15 -0
- package/examples/node_modules/terser/README.md +1374 -0
- package/examples/node_modules/terser/bin/package.json +10 -0
- package/examples/node_modules/terser/bin/terser +21 -0
- package/examples/node_modules/terser/bin/uglifyjs +10 -0
- package/examples/node_modules/terser/dist/.gitkeep +0 -0
- package/examples/node_modules/terser/dist/bundle.min.js +28332 -0
- package/examples/node_modules/terser/dist/package.json +10 -0
- package/examples/node_modules/terser/lib/ast.js +1858 -0
- package/examples/node_modules/terser/lib/cli.js +479 -0
- package/examples/node_modules/terser/lib/compress/common.js +296 -0
- package/examples/node_modules/terser/lib/compress/compressor-flags.js +63 -0
- package/examples/node_modules/terser/lib/compress/drop-side-effect-free.js +350 -0
- package/examples/node_modules/terser/lib/compress/evaluate.js +461 -0
- package/examples/node_modules/terser/lib/compress/index.js +4667 -0
- package/examples/node_modules/terser/lib/compress/inference.js +948 -0
- package/examples/node_modules/terser/lib/compress/native-objects.js +184 -0
- package/examples/node_modules/terser/lib/compress/reduce-vars.js +675 -0
- package/examples/node_modules/terser/lib/compress/tighten-body.js +1461 -0
- package/examples/node_modules/terser/lib/equivalent-to.js +313 -0
- package/examples/node_modules/terser/lib/minify.js +335 -0
- package/examples/node_modules/terser/lib/mozilla-ast.js +1376 -0
- package/examples/node_modules/terser/lib/output.js +2347 -0
- package/examples/node_modules/terser/lib/parse.js +3362 -0
- package/examples/node_modules/terser/lib/propmangle.js +376 -0
- package/examples/node_modules/terser/lib/scope.js +1042 -0
- package/examples/node_modules/terser/lib/size.js +490 -0
- package/examples/node_modules/terser/lib/sourcemap.js +114 -0
- package/examples/node_modules/terser/lib/transform.js +318 -0
- package/examples/node_modules/terser/lib/utils/first_in_statement.js +50 -0
- package/examples/node_modules/terser/lib/utils/index.js +302 -0
- package/examples/node_modules/terser/main.js +27 -0
- package/examples/node_modules/terser/node_modules/source-map/CHANGELOG.md +344 -0
- package/examples/node_modules/terser/node_modules/source-map/LICENSE +28 -0
- package/examples/node_modules/terser/node_modules/source-map/README.md +822 -0
- package/examples/node_modules/terser/node_modules/source-map/dist/source-map.js +3351 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/array-set.js +100 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/base64-vlq.js +111 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/base64.js +18 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/binary-search.js +107 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/mapping-list.js +80 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/mappings.wasm +0 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/read-wasm.js +40 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/source-map-consumer.js +1254 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/source-map-generator.js +413 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/source-node.js +404 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/util.js +546 -0
- package/examples/node_modules/terser/node_modules/source-map/lib/wasm.js +107 -0
- package/examples/node_modules/terser/node_modules/source-map/package.json +90 -0
- package/examples/node_modules/terser/node_modules/source-map/source-map.d.ts +369 -0
- package/examples/node_modules/terser/node_modules/source-map/source-map.js +8 -0
- package/examples/node_modules/terser/package.json +152 -0
- package/examples/node_modules/terser/tools/domprops.js +7771 -0
- package/examples/node_modules/terser/tools/exit.cjs +7 -0
- package/examples/node_modules/terser/tools/props.html +55 -0
- package/examples/node_modules/terser/tools/terser.d.ts +207 -0
- package/examples/node_modules/terser-webpack-plugin/LICENSE +20 -0
- package/examples/node_modules/terser-webpack-plugin/README.md +742 -0
- package/examples/node_modules/terser-webpack-plugin/dist/index.js +798 -0
- package/examples/node_modules/terser-webpack-plugin/dist/minify.js +50 -0
- package/examples/node_modules/terser-webpack-plugin/dist/options.json +164 -0
- package/examples/node_modules/terser-webpack-plugin/dist/utils.js +687 -0
- package/examples/node_modules/terser-webpack-plugin/package.json +114 -0
- package/examples/node_modules/terser-webpack-plugin/types/index.d.ts +329 -0
- package/examples/node_modules/terser-webpack-plugin/types/minify.d.ts +17 -0
- package/examples/node_modules/terser-webpack-plugin/types/utils.d.ts +100 -0
- package/examples/node_modules/uri-js/LICENSE +11 -0
- package/examples/node_modules/uri-js/README.md +203 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.d.ts +59 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.js +1443 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.js.map +1 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.min.d.ts +59 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.min.js +3 -0
- package/examples/node_modules/uri-js/dist/es5/uri.all.min.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/index.d.ts +1 -0
- package/examples/node_modules/uri-js/dist/esnext/index.js +17 -0
- package/examples/node_modules/uri-js/dist/esnext/index.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-iri.d.ts +3 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-iri.js +3 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-iri.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-uri.d.ts +4 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-uri.js +42 -0
- package/examples/node_modules/uri-js/dist/esnext/regexps-uri.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/http.d.ts +3 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/http.js +28 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/http.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/https.d.ts +3 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/https.js +9 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/https.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts +12 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/mailto.js +148 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/mailto.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts +7 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js +23 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn.d.ts +10 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn.js +49 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/urn.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/ws.d.ts +7 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/ws.js +41 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/ws.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/wss.d.ts +3 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/wss.js +9 -0
- package/examples/node_modules/uri-js/dist/esnext/schemes/wss.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/uri.d.ts +59 -0
- package/examples/node_modules/uri-js/dist/esnext/uri.js +480 -0
- package/examples/node_modules/uri-js/dist/esnext/uri.js.map +1 -0
- package/examples/node_modules/uri-js/dist/esnext/util.d.ts +6 -0
- package/examples/node_modules/uri-js/dist/esnext/util.js +36 -0
- package/examples/node_modules/uri-js/dist/esnext/util.js.map +1 -0
- package/examples/node_modules/uri-js/package.json +77 -0
- package/examples/node_modules/uri-js/yarn.lock +2558 -0
- package/examples/node_modules/watchpack/LICENSE +20 -0
- package/examples/node_modules/watchpack/README.md +149 -0
- package/examples/node_modules/watchpack/lib/DirectoryWatcher.js +785 -0
- package/examples/node_modules/watchpack/lib/LinkResolver.js +107 -0
- package/examples/node_modules/watchpack/lib/getWatcherManager.js +52 -0
- package/examples/node_modules/watchpack/lib/reducePlan.js +138 -0
- package/examples/node_modules/watchpack/lib/watchEventSource.js +335 -0
- package/examples/node_modules/watchpack/lib/watchpack.js +383 -0
- package/examples/node_modules/watchpack/package.json +49 -0
- package/examples/node_modules/webpack/LICENSE +20 -0
- package/examples/node_modules/webpack/README.md +711 -0
- package/examples/node_modules/webpack/SECURITY.md +9 -0
- package/examples/node_modules/webpack/bin/webpack.js +163 -0
- package/examples/node_modules/webpack/hot/dev-server.js +61 -0
- package/examples/node_modules/webpack/hot/emitter.js +2 -0
- package/examples/node_modules/webpack/hot/lazy-compilation-node.js +40 -0
- package/examples/node_modules/webpack/hot/lazy-compilation-web.js +74 -0
- package/examples/node_modules/webpack/hot/log-apply-result.js +44 -0
- package/examples/node_modules/webpack/hot/log.js +59 -0
- package/examples/node_modules/webpack/hot/only-dev-server.js +102 -0
- package/examples/node_modules/webpack/hot/poll.js +37 -0
- package/examples/node_modules/webpack/hot/signal.js +62 -0
- package/examples/node_modules/webpack/lib/APIPlugin.js +253 -0
- package/examples/node_modules/webpack/lib/AbstractMethodError.js +49 -0
- package/examples/node_modules/webpack/lib/AsyncDependenciesBlock.js +106 -0
- package/examples/node_modules/webpack/lib/AsyncDependencyToInitialChunkError.js +31 -0
- package/examples/node_modules/webpack/lib/AutomaticPrefetchPlugin.js +65 -0
- package/examples/node_modules/webpack/lib/BannerPlugin.js +123 -0
- package/examples/node_modules/webpack/lib/Cache.js +161 -0
- package/examples/node_modules/webpack/lib/CacheFacade.js +345 -0
- package/examples/node_modules/webpack/lib/CaseSensitiveModulesWarning.js +71 -0
- package/examples/node_modules/webpack/lib/Chunk.js +820 -0
- package/examples/node_modules/webpack/lib/ChunkGraph.js +1727 -0
- package/examples/node_modules/webpack/lib/ChunkGroup.js +584 -0
- package/examples/node_modules/webpack/lib/ChunkRenderError.js +31 -0
- package/examples/node_modules/webpack/lib/ChunkTemplate.js +138 -0
- package/examples/node_modules/webpack/lib/CleanPlugin.js +420 -0
- package/examples/node_modules/webpack/lib/CodeGenerationError.js +29 -0
- package/examples/node_modules/webpack/lib/CodeGenerationResults.js +155 -0
- package/examples/node_modules/webpack/lib/CommentCompilationWarning.js +33 -0
- package/examples/node_modules/webpack/lib/CompatibilityPlugin.js +152 -0
- package/examples/node_modules/webpack/lib/Compilation.js +5292 -0
- package/examples/node_modules/webpack/lib/Compiler.js +1217 -0
- package/examples/node_modules/webpack/lib/ConcatenationScope.js +159 -0
- package/examples/node_modules/webpack/lib/ConcurrentCompilationError.js +18 -0
- package/examples/node_modules/webpack/lib/ConditionalInitFragment.js +112 -0
- package/examples/node_modules/webpack/lib/ConstPlugin.js +497 -0
- package/examples/node_modules/webpack/lib/ContextExclusionPlugin.js +32 -0
- package/examples/node_modules/webpack/lib/ContextModule.js +1147 -0
- package/examples/node_modules/webpack/lib/ContextModuleFactory.js +437 -0
- package/examples/node_modules/webpack/lib/ContextReplacementPlugin.js +157 -0
- package/examples/node_modules/webpack/lib/DefinePlugin.js +601 -0
- package/examples/node_modules/webpack/lib/DelegatedModule.js +239 -0
- package/examples/node_modules/webpack/lib/DelegatedModuleFactoryPlugin.js +91 -0
- package/examples/node_modules/webpack/lib/DelegatedPlugin.js +43 -0
- package/examples/node_modules/webpack/lib/DependenciesBlock.js +107 -0
- package/examples/node_modules/webpack/lib/Dependency.js +348 -0
- package/examples/node_modules/webpack/lib/DependencyTemplate.js +57 -0
- package/examples/node_modules/webpack/lib/DependencyTemplates.js +67 -0
- package/examples/node_modules/webpack/lib/DllEntryPlugin.js +55 -0
- package/examples/node_modules/webpack/lib/DllModule.js +157 -0
- package/examples/node_modules/webpack/lib/DllModuleFactory.js +37 -0
- package/examples/node_modules/webpack/lib/DllPlugin.js +68 -0
- package/examples/node_modules/webpack/lib/DllReferencePlugin.js +162 -0
- package/examples/node_modules/webpack/lib/DynamicEntryPlugin.js +79 -0
- package/examples/node_modules/webpack/lib/EntryOptionPlugin.js +93 -0
- package/examples/node_modules/webpack/lib/EntryPlugin.js +67 -0
- package/examples/node_modules/webpack/lib/Entrypoint.js +101 -0
- package/examples/node_modules/webpack/lib/EnvironmentPlugin.js +63 -0
- package/examples/node_modules/webpack/lib/ErrorHelpers.js +61 -0
- package/examples/node_modules/webpack/lib/EvalDevToolModulePlugin.js +117 -0
- package/examples/node_modules/webpack/lib/EvalSourceMapDevToolPlugin.js +206 -0
- package/examples/node_modules/webpack/lib/ExportsInfo.js +1523 -0
- package/examples/node_modules/webpack/lib/ExportsInfoApiPlugin.js +71 -0
- package/examples/node_modules/webpack/lib/ExternalModule.js +758 -0
- package/examples/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js +254 -0
- package/examples/node_modules/webpack/lib/ExternalsPlugin.js +37 -0
- package/examples/node_modules/webpack/lib/FileSystemInfo.js +3559 -0
- package/examples/node_modules/webpack/lib/FlagAllModulesAsUsedPlugin.js +55 -0
- package/examples/node_modules/webpack/lib/FlagDependencyExportsPlugin.js +417 -0
- package/examples/node_modules/webpack/lib/FlagDependencyUsagePlugin.js +347 -0
- package/examples/node_modules/webpack/lib/FlagEntryExportAsUsedPlugin.js +53 -0
- package/examples/node_modules/webpack/lib/Generator.js +149 -0
- package/examples/node_modules/webpack/lib/GraphHelpers.js +37 -0
- package/examples/node_modules/webpack/lib/HarmonyLinkingError.js +16 -0
- package/examples/node_modules/webpack/lib/HookWebpackError.js +93 -0
- package/examples/node_modules/webpack/lib/HotModuleReplacementPlugin.js +778 -0
- package/examples/node_modules/webpack/lib/HotUpdateChunk.js +19 -0
- package/examples/node_modules/webpack/lib/IgnoreErrorModuleFactory.js +39 -0
- package/examples/node_modules/webpack/lib/IgnorePlugin.js +83 -0
- package/examples/node_modules/webpack/lib/IgnoreWarningsPlugin.js +39 -0
- package/examples/node_modules/webpack/lib/InitFragment.js +161 -0
- package/examples/node_modules/webpack/lib/InvalidDependenciesModuleWarning.js +44 -0
- package/examples/node_modules/webpack/lib/JavascriptMetaInfoPlugin.js +68 -0
- package/examples/node_modules/webpack/lib/LibManifestPlugin.js +115 -0
- package/examples/node_modules/webpack/lib/LibraryTemplatePlugin.js +48 -0
- package/examples/node_modules/webpack/lib/LoaderOptionsPlugin.js +71 -0
- package/examples/node_modules/webpack/lib/LoaderTargetPlugin.js +37 -0
- package/examples/node_modules/webpack/lib/MainTemplate.js +329 -0
- package/examples/node_modules/webpack/lib/Module.js +1091 -0
- package/examples/node_modules/webpack/lib/ModuleBuildError.js +77 -0
- package/examples/node_modules/webpack/lib/ModuleDependencyError.js +40 -0
- package/examples/node_modules/webpack/lib/ModuleDependencyWarning.js +45 -0
- package/examples/node_modules/webpack/lib/ModuleError.js +61 -0
- package/examples/node_modules/webpack/lib/ModuleFactory.js +50 -0
- package/examples/node_modules/webpack/lib/ModuleFilenameHelpers.js +277 -0
- package/examples/node_modules/webpack/lib/ModuleGraph.js +856 -0
- package/examples/node_modules/webpack/lib/ModuleGraphConnection.js +191 -0
- package/examples/node_modules/webpack/lib/ModuleHashingError.js +29 -0
- package/examples/node_modules/webpack/lib/ModuleInfoHeaderPlugin.js +255 -0
- package/examples/node_modules/webpack/lib/ModuleNotFoundError.js +86 -0
- package/examples/node_modules/webpack/lib/ModuleParseError.js +109 -0
- package/examples/node_modules/webpack/lib/ModuleProfile.js +107 -0
- package/examples/node_modules/webpack/lib/ModuleRestoreError.js +42 -0
- package/examples/node_modules/webpack/lib/ModuleStoreError.js +42 -0
- package/examples/node_modules/webpack/lib/ModuleTemplate.js +142 -0
- package/examples/node_modules/webpack/lib/ModuleWarning.js +61 -0
- package/examples/node_modules/webpack/lib/MultiCompiler.js +582 -0
- package/examples/node_modules/webpack/lib/MultiStats.js +166 -0
- package/examples/node_modules/webpack/lib/MultiWatching.js +77 -0
- package/examples/node_modules/webpack/lib/NoEmitOnErrorsPlugin.js +28 -0
- package/examples/node_modules/webpack/lib/NoModeWarning.js +22 -0
- package/examples/node_modules/webpack/lib/NodeStuffInWebError.js +34 -0
- package/examples/node_modules/webpack/lib/NodeStuffPlugin.js +186 -0
- package/examples/node_modules/webpack/lib/NormalModule.js +1411 -0
- package/examples/node_modules/webpack/lib/NormalModuleFactory.js +1118 -0
- package/examples/node_modules/webpack/lib/NormalModuleReplacementPlugin.js +71 -0
- package/examples/node_modules/webpack/lib/NullFactory.js +23 -0
- package/examples/node_modules/webpack/lib/OptimizationStages.js +10 -0
- package/examples/node_modules/webpack/lib/OptionsApply.js +11 -0
- package/examples/node_modules/webpack/lib/Parser.js +38 -0
- package/examples/node_modules/webpack/lib/PrefetchPlugin.js +50 -0
- package/examples/node_modules/webpack/lib/ProgressPlugin.js +613 -0
- package/examples/node_modules/webpack/lib/ProvidePlugin.js +101 -0
- package/examples/node_modules/webpack/lib/RawModule.js +152 -0
- package/examples/node_modules/webpack/lib/RecordIdsPlugin.js +238 -0
- package/examples/node_modules/webpack/lib/RequestShortener.js +34 -0
- package/examples/node_modules/webpack/lib/RequireJsStuffPlugin.js +77 -0
- package/examples/node_modules/webpack/lib/ResolverFactory.js +151 -0
- package/examples/node_modules/webpack/lib/RuntimeGlobals.js +381 -0
- package/examples/node_modules/webpack/lib/RuntimeModule.js +213 -0
- package/examples/node_modules/webpack/lib/RuntimePlugin.js +444 -0
- package/examples/node_modules/webpack/lib/RuntimeTemplate.js +1041 -0
- package/examples/node_modules/webpack/lib/SelfModuleFactory.js +21 -0
- package/examples/node_modules/webpack/lib/SingleEntryPlugin.js +8 -0
- package/examples/node_modules/webpack/lib/SizeFormatHelpers.js +27 -0
- package/examples/node_modules/webpack/lib/SourceMapDevToolModuleOptionsPlugin.js +57 -0
- package/examples/node_modules/webpack/lib/SourceMapDevToolPlugin.js +560 -0
- package/examples/node_modules/webpack/lib/Stats.js +84 -0
- package/examples/node_modules/webpack/lib/Template.js +419 -0
- package/examples/node_modules/webpack/lib/TemplatedPathPlugin.js +346 -0
- package/examples/node_modules/webpack/lib/UnhandledSchemeError.js +33 -0
- package/examples/node_modules/webpack/lib/UnsupportedFeatureWarning.js +32 -0
- package/examples/node_modules/webpack/lib/UseStrictPlugin.js +56 -0
- package/examples/node_modules/webpack/lib/WarnCaseSensitiveModulesPlugin.js +53 -0
- package/examples/node_modules/webpack/lib/WarnDeprecatedOptionPlugin.js +54 -0
- package/examples/node_modules/webpack/lib/WarnNoModeSetPlugin.js +25 -0
- package/examples/node_modules/webpack/lib/WatchIgnorePlugin.js +132 -0
- package/examples/node_modules/webpack/lib/Watching.js +479 -0
- package/examples/node_modules/webpack/lib/WebpackError.js +61 -0
- package/examples/node_modules/webpack/lib/WebpackIsIncludedPlugin.js +85 -0
- package/examples/node_modules/webpack/lib/WebpackOptionsApply.js +700 -0
- package/examples/node_modules/webpack/lib/WebpackOptionsDefaulter.js +19 -0
- package/examples/node_modules/webpack/lib/asset/AssetGenerator.js +464 -0
- package/examples/node_modules/webpack/lib/asset/AssetModulesPlugin.js +223 -0
- package/examples/node_modules/webpack/lib/asset/AssetParser.js +56 -0
- package/examples/node_modules/webpack/lib/asset/AssetSourceGenerator.js +71 -0
- package/examples/node_modules/webpack/lib/asset/AssetSourceParser.js +31 -0
- package/examples/node_modules/webpack/lib/asset/RawDataUrlModule.js +148 -0
- package/examples/node_modules/webpack/lib/async-modules/AwaitDependenciesInitFragment.js +69 -0
- package/examples/node_modules/webpack/lib/async-modules/InferAsyncModulesPlugin.js +55 -0
- package/examples/node_modules/webpack/lib/buildChunkGraph.js +1401 -0
- package/examples/node_modules/webpack/lib/cache/AddBuildDependenciesPlugin.js +33 -0
- package/examples/node_modules/webpack/lib/cache/AddManagedPathsPlugin.js +35 -0
- package/examples/node_modules/webpack/lib/cache/IdleFileCachePlugin.js +227 -0
- package/examples/node_modules/webpack/lib/cache/MemoryCachePlugin.js +57 -0
- package/examples/node_modules/webpack/lib/cache/MemoryWithGcCachePlugin.js +129 -0
- package/examples/node_modules/webpack/lib/cache/PackFileCacheStrategy.js +1426 -0
- package/examples/node_modules/webpack/lib/cache/ResolverCachePlugin.js +354 -0
- package/examples/node_modules/webpack/lib/cache/getLazyHashedEtag.js +81 -0
- package/examples/node_modules/webpack/lib/cache/mergeEtags.js +74 -0
- package/examples/node_modules/webpack/lib/cli.js +655 -0
- package/examples/node_modules/webpack/lib/config/browserslistTargetHandler.js +333 -0
- package/examples/node_modules/webpack/lib/config/defaults.js +1309 -0
- package/examples/node_modules/webpack/lib/config/normalization.js +529 -0
- package/examples/node_modules/webpack/lib/config/target.js +348 -0
- package/examples/node_modules/webpack/lib/container/ContainerEntryDependency.js +47 -0
- package/examples/node_modules/webpack/lib/container/ContainerEntryModule.js +283 -0
- package/examples/node_modules/webpack/lib/container/ContainerEntryModuleFactory.js +27 -0
- package/examples/node_modules/webpack/lib/container/ContainerExposedDependency.js +52 -0
- package/examples/node_modules/webpack/lib/container/ContainerPlugin.js +105 -0
- package/examples/node_modules/webpack/lib/container/ContainerReferencePlugin.js +142 -0
- package/examples/node_modules/webpack/lib/container/FallbackDependency.js +51 -0
- package/examples/node_modules/webpack/lib/container/FallbackItemDependency.js +30 -0
- package/examples/node_modules/webpack/lib/container/FallbackModule.js +173 -0
- package/examples/node_modules/webpack/lib/container/FallbackModuleFactory.js +27 -0
- package/examples/node_modules/webpack/lib/container/ModuleFederationPlugin.js +92 -0
- package/examples/node_modules/webpack/lib/container/RemoteModule.js +171 -0
- package/examples/node_modules/webpack/lib/container/RemoteRuntimeModule.js +128 -0
- package/examples/node_modules/webpack/lib/container/RemoteToExternalDependency.js +30 -0
- package/examples/node_modules/webpack/lib/container/options.js +91 -0
- package/examples/node_modules/webpack/lib/css/CssExportsGenerator.js +139 -0
- package/examples/node_modules/webpack/lib/css/CssGenerator.js +109 -0
- package/examples/node_modules/webpack/lib/css/CssLoadingRuntimeModule.js +440 -0
- package/examples/node_modules/webpack/lib/css/CssModulesPlugin.js +462 -0
- package/examples/node_modules/webpack/lib/css/CssParser.js +618 -0
- package/examples/node_modules/webpack/lib/css/walkCssTokens.js +659 -0
- package/examples/node_modules/webpack/lib/debug/ProfilingPlugin.js +454 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDDefineDependency.js +221 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDDefineDependencyParserPlugin.js +354 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDPlugin.js +216 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireArrayDependency.js +99 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireContextDependency.js +53 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireDependenciesBlock.js +22 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +279 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireDependency.js +174 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRequireItemDependency.js +35 -0
- package/examples/node_modules/webpack/lib/dependencies/AMDRuntimeModules.js +48 -0
- package/examples/node_modules/webpack/lib/dependencies/CachedConstDependency.js +106 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsDependencyHelpers.js +49 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsExportRequireDependency.js +374 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsExportsDependency.js +160 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsExportsParserPlugin.js +336 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsFullRequireDependency.js +136 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsImportsParserPlugin.js +388 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsPlugin.js +280 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsRequireContextDependency.js +55 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsRequireDependency.js +34 -0
- package/examples/node_modules/webpack/lib/dependencies/CommonJsSelfReferenceDependency.js +141 -0
- package/examples/node_modules/webpack/lib/dependencies/ConstDependency.js +108 -0
- package/examples/node_modules/webpack/lib/dependencies/ContextDependency.js +147 -0
- package/examples/node_modules/webpack/lib/dependencies/ContextDependencyHelpers.js +232 -0
- package/examples/node_modules/webpack/lib/dependencies/ContextDependencyTemplateAsId.js +61 -0
- package/examples/node_modules/webpack/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +59 -0
- package/examples/node_modules/webpack/lib/dependencies/ContextElementDependency.js +77 -0
- package/examples/node_modules/webpack/lib/dependencies/CreateScriptUrlDependency.js +66 -0
- package/examples/node_modules/webpack/lib/dependencies/CriticalDependencyWarning.js +25 -0
- package/examples/node_modules/webpack/lib/dependencies/CssExportDependency.js +85 -0
- package/examples/node_modules/webpack/lib/dependencies/CssImportDependency.js +75 -0
- package/examples/node_modules/webpack/lib/dependencies/CssLocalIdentifierDependency.js +119 -0
- package/examples/node_modules/webpack/lib/dependencies/CssSelfLocalIdentifierDependency.js +101 -0
- package/examples/node_modules/webpack/lib/dependencies/CssUrlDependency.js +132 -0
- package/examples/node_modules/webpack/lib/dependencies/DelegatedSourceDependency.js +30 -0
- package/examples/node_modules/webpack/lib/dependencies/DllEntryDependency.js +47 -0
- package/examples/node_modules/webpack/lib/dependencies/DynamicExports.js +69 -0
- package/examples/node_modules/webpack/lib/dependencies/EntryDependency.js +30 -0
- package/examples/node_modules/webpack/lib/dependencies/ExportsInfoDependency.js +143 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyAcceptDependency.js +134 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyAcceptImportDependency.js +37 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyCompatibilityDependency.js +91 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyDetectionParserPlugin.js +97 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportDependencyParserPlugin.js +185 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportExpressionDependency.js +190 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportHeaderDependency.js +65 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +1271 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportInitFragment.js +168 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExportSpecifierDependency.js +111 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyExports.js +40 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyImportDependency.js +359 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyImportDependencyParserPlugin.js +256 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyImportSideEffectDependency.js +80 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js +331 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyModulesPlugin.js +121 -0
- package/examples/node_modules/webpack/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +27 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportContextDependency.js +52 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportDependency.js +101 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportEagerDependency.js +69 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaContextDependency.js +35 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +252 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaContextPlugin.js +59 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaHotAcceptDependency.js +35 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaHotDeclineDependency.js +36 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportMetaPlugin.js +203 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportParserPlugin.js +267 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportPlugin.js +82 -0
- package/examples/node_modules/webpack/lib/dependencies/ImportWeakDependency.js +67 -0
- package/examples/node_modules/webpack/lib/dependencies/JsonExportsDependency.js +103 -0
- package/examples/node_modules/webpack/lib/dependencies/LoaderDependency.js +27 -0
- package/examples/node_modules/webpack/lib/dependencies/LoaderImportDependency.js +28 -0
- package/examples/node_modules/webpack/lib/dependencies/LoaderPlugin.js +261 -0
- package/examples/node_modules/webpack/lib/dependencies/LocalModule.js +44 -0
- package/examples/node_modules/webpack/lib/dependencies/LocalModuleDependency.js +69 -0
- package/examples/node_modules/webpack/lib/dependencies/LocalModulesHelpers.js +50 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleDecoratorDependency.js +129 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleDependency.js +81 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleDependencyTemplateAsId.js +34 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +38 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleHotAcceptDependency.js +35 -0
- package/examples/node_modules/webpack/lib/dependencies/ModuleHotDeclineDependency.js +36 -0
- package/examples/node_modules/webpack/lib/dependencies/NullDependency.js +40 -0
- package/examples/node_modules/webpack/lib/dependencies/PrefetchDependency.js +24 -0
- package/examples/node_modules/webpack/lib/dependencies/ProvidedDependency.js +122 -0
- package/examples/node_modules/webpack/lib/dependencies/PureExpressionDependency.js +128 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireContextDependency.js +31 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireContextDependencyParserPlugin.js +58 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireContextPlugin.js +150 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireEnsureDependenciesBlock.js +22 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +121 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireEnsureDependency.js +101 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireEnsureItemDependency.js +33 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireEnsurePlugin.js +66 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireHeaderDependency.js +57 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireIncludeDependency.js +74 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireIncludeDependencyParserPlugin.js +77 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireIncludePlugin.js +42 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireResolveContextDependency.js +50 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireResolveDependency.js +51 -0
- package/examples/node_modules/webpack/lib/dependencies/RequireResolveHeaderDependency.js +63 -0
- package/examples/node_modules/webpack/lib/dependencies/RuntimeRequirementsDependency.js +77 -0
- package/examples/node_modules/webpack/lib/dependencies/StaticExportsDependency.js +66 -0
- package/examples/node_modules/webpack/lib/dependencies/SystemPlugin.js +140 -0
- package/examples/node_modules/webpack/lib/dependencies/SystemRuntimeModule.js +35 -0
- package/examples/node_modules/webpack/lib/dependencies/URLDependency.js +158 -0
- package/examples/node_modules/webpack/lib/dependencies/URLPlugin.js +114 -0
- package/examples/node_modules/webpack/lib/dependencies/UnsupportedDependency.js +69 -0
- package/examples/node_modules/webpack/lib/dependencies/WebAssemblyExportImportedDependency.js +79 -0
- package/examples/node_modules/webpack/lib/dependencies/WebAssemblyImportDependency.js +100 -0
- package/examples/node_modules/webpack/lib/dependencies/WebpackIsIncludedDependency.js +80 -0
- package/examples/node_modules/webpack/lib/dependencies/WorkerDependency.js +89 -0
- package/examples/node_modules/webpack/lib/dependencies/WorkerPlugin.js +416 -0
- package/examples/node_modules/webpack/lib/dependencies/getFunctionExpression.js +55 -0
- package/examples/node_modules/webpack/lib/dependencies/processExportInfo.js +65 -0
- package/examples/node_modules/webpack/lib/electron/ElectronTargetPlugin.js +68 -0
- package/examples/node_modules/webpack/lib/errors/BuildCycleError.js +27 -0
- package/examples/node_modules/webpack/lib/esm/ExportWebpackRequireRuntimeModule.js +29 -0
- package/examples/node_modules/webpack/lib/esm/ModuleChunkFormatPlugin.js +202 -0
- package/examples/node_modules/webpack/lib/esm/ModuleChunkLoadingPlugin.js +76 -0
- package/examples/node_modules/webpack/lib/esm/ModuleChunkLoadingRuntimeModule.js +242 -0
- package/examples/node_modules/webpack/lib/formatLocation.js +68 -0
- package/examples/node_modules/webpack/lib/hmr/HotModuleReplacement.runtime.js +394 -0
- package/examples/node_modules/webpack/lib/hmr/HotModuleReplacementRuntimeModule.js +42 -0
- package/examples/node_modules/webpack/lib/hmr/JavascriptHotModuleReplacement.runtime.js +462 -0
- package/examples/node_modules/webpack/lib/hmr/LazyCompilationPlugin.js +418 -0
- package/examples/node_modules/webpack/lib/hmr/lazyCompilationBackend.js +143 -0
- package/examples/node_modules/webpack/lib/ids/ChunkModuleIdRangePlugin.js +80 -0
- package/examples/node_modules/webpack/lib/ids/DeterministicChunkIdsPlugin.js +70 -0
- package/examples/node_modules/webpack/lib/ids/DeterministicModuleIdsPlugin.js +93 -0
- package/examples/node_modules/webpack/lib/ids/HashedModuleIdsPlugin.js +77 -0
- package/examples/node_modules/webpack/lib/ids/IdHelpers.js +477 -0
- package/examples/node_modules/webpack/lib/ids/NamedChunkIdsPlugin.js +81 -0
- package/examples/node_modules/webpack/lib/ids/NamedModuleIdsPlugin.js +58 -0
- package/examples/node_modules/webpack/lib/ids/NaturalChunkIdsPlugin.js +33 -0
- package/examples/node_modules/webpack/lib/ids/NaturalModuleIdsPlugin.js +39 -0
- package/examples/node_modules/webpack/lib/ids/OccurrenceChunkIdsPlugin.js +80 -0
- package/examples/node_modules/webpack/lib/ids/OccurrenceModuleIdsPlugin.js +159 -0
- package/examples/node_modules/webpack/lib/ids/SyncModuleIdsPlugin.js +140 -0
- package/examples/node_modules/webpack/lib/index.js +579 -0
- package/examples/node_modules/webpack/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +154 -0
- package/examples/node_modules/webpack/lib/javascript/BasicEvaluatedExpression.js +480 -0
- package/examples/node_modules/webpack/lib/javascript/ChunkHelpers.js +33 -0
- package/examples/node_modules/webpack/lib/javascript/CommonJsChunkFormatPlugin.js +172 -0
- package/examples/node_modules/webpack/lib/javascript/EnableChunkLoadingPlugin.js +118 -0
- package/examples/node_modules/webpack/lib/javascript/JavascriptGenerator.js +225 -0
- package/examples/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js +1370 -0
- package/examples/node_modules/webpack/lib/javascript/JavascriptParser.js +3776 -0
- package/examples/node_modules/webpack/lib/javascript/JavascriptParserHelpers.js +107 -0
- package/examples/node_modules/webpack/lib/javascript/StartupHelpers.js +132 -0
- package/examples/node_modules/webpack/lib/json/JsonData.js +41 -0
- package/examples/node_modules/webpack/lib/json/JsonGenerator.js +191 -0
- package/examples/node_modules/webpack/lib/json/JsonModulesPlugin.js +50 -0
- package/examples/node_modules/webpack/lib/json/JsonParser.js +57 -0
- package/examples/node_modules/webpack/lib/library/AbstractLibraryPlugin.js +297 -0
- package/examples/node_modules/webpack/lib/library/AmdLibraryPlugin.js +162 -0
- package/examples/node_modules/webpack/lib/library/AssignLibraryPlugin.js +375 -0
- package/examples/node_modules/webpack/lib/library/EnableLibraryPlugin.js +248 -0
- package/examples/node_modules/webpack/lib/library/ExportPropertyLibraryPlugin.js +113 -0
- package/examples/node_modules/webpack/lib/library/JsonpLibraryPlugin.js +88 -0
- package/examples/node_modules/webpack/lib/library/ModuleLibraryPlugin.js +104 -0
- package/examples/node_modules/webpack/lib/library/SystemLibraryPlugin.js +233 -0
- package/examples/node_modules/webpack/lib/library/UmdLibraryPlugin.js +324 -0
- package/examples/node_modules/webpack/lib/logging/Logger.js +163 -0
- package/examples/node_modules/webpack/lib/logging/createConsoleLogger.js +228 -0
- package/examples/node_modules/webpack/lib/logging/runtime.js +46 -0
- package/examples/node_modules/webpack/lib/logging/truncateArgs.js +82 -0
- package/examples/node_modules/webpack/lib/node/CommonJsChunkLoadingPlugin.js +105 -0
- package/examples/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js +60 -0
- package/examples/node_modules/webpack/lib/node/NodeSourcePlugin.js +19 -0
- package/examples/node_modules/webpack/lib/node/NodeTargetPlugin.js +81 -0
- package/examples/node_modules/webpack/lib/node/NodeTemplatePlugin.js +33 -0
- package/examples/node_modules/webpack/lib/node/NodeWatchFileSystem.js +194 -0
- package/examples/node_modules/webpack/lib/node/ReadFileChunkLoadingRuntimeModule.js +291 -0
- package/examples/node_modules/webpack/lib/node/ReadFileCompileAsyncWasmPlugin.js +107 -0
- package/examples/node_modules/webpack/lib/node/ReadFileCompileWasmPlugin.js +93 -0
- package/examples/node_modules/webpack/lib/node/RequireChunkLoadingRuntimeModule.js +238 -0
- package/examples/node_modules/webpack/lib/node/nodeConsole.js +143 -0
- package/examples/node_modules/webpack/lib/optimize/AggressiveMergingPlugin.js +92 -0
- package/examples/node_modules/webpack/lib/optimize/AggressiveSplittingPlugin.js +329 -0
- package/examples/node_modules/webpack/lib/optimize/ConcatenatedModule.js +1879 -0
- package/examples/node_modules/webpack/lib/optimize/EnsureChunkConditionsPlugin.js +85 -0
- package/examples/node_modules/webpack/lib/optimize/FlagIncludedChunksPlugin.js +118 -0
- package/examples/node_modules/webpack/lib/optimize/InnerGraph.js +346 -0
- package/examples/node_modules/webpack/lib/optimize/InnerGraphPlugin.js +368 -0
- package/examples/node_modules/webpack/lib/optimize/LimitChunkCountPlugin.js +256 -0
- package/examples/node_modules/webpack/lib/optimize/MangleExportsPlugin.js +177 -0
- package/examples/node_modules/webpack/lib/optimize/MergeDuplicateChunksPlugin.js +115 -0
- package/examples/node_modules/webpack/lib/optimize/MinChunkSizePlugin.js +113 -0
- package/examples/node_modules/webpack/lib/optimize/MinMaxSizeWarning.js +30 -0
- package/examples/node_modules/webpack/lib/optimize/ModuleConcatenationPlugin.js +866 -0
- package/examples/node_modules/webpack/lib/optimize/RealContentHashPlugin.js +408 -0
- package/examples/node_modules/webpack/lib/optimize/RemoveEmptyChunksPlugin.js +57 -0
- package/examples/node_modules/webpack/lib/optimize/RemoveParentModulesPlugin.js +121 -0
- package/examples/node_modules/webpack/lib/optimize/RuntimeChunkPlugin.js +44 -0
- package/examples/node_modules/webpack/lib/optimize/SideEffectsFlagPlugin.js +337 -0
- package/examples/node_modules/webpack/lib/optimize/SplitChunksPlugin.js +1723 -0
- package/examples/node_modules/webpack/lib/performance/AssetsOverSizeLimitWarning.js +32 -0
- package/examples/node_modules/webpack/lib/performance/EntrypointsOverSizeLimitWarning.js +35 -0
- package/examples/node_modules/webpack/lib/performance/NoAsyncChunksWarning.js +20 -0
- package/examples/node_modules/webpack/lib/performance/SizeLimitsPlugin.js +165 -0
- package/examples/node_modules/webpack/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +44 -0
- package/examples/node_modules/webpack/lib/prefetch/ChunkPrefetchPreloadPlugin.js +95 -0
- package/examples/node_modules/webpack/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +52 -0
- package/examples/node_modules/webpack/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +49 -0
- package/examples/node_modules/webpack/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +43 -0
- package/examples/node_modules/webpack/lib/rules/BasicEffectRulePlugin.js +39 -0
- package/examples/node_modules/webpack/lib/rules/BasicMatcherRulePlugin.js +47 -0
- package/examples/node_modules/webpack/lib/rules/ObjectMatcherRulePlugin.js +47 -0
- package/examples/node_modules/webpack/lib/rules/RuleSetCompiler.js +379 -0
- package/examples/node_modules/webpack/lib/rules/UseEffectRulePlugin.js +194 -0
- package/examples/node_modules/webpack/lib/runtime/AsyncModuleRuntimeModule.js +156 -0
- package/examples/node_modules/webpack/lib/runtime/AutoPublicPathRuntimeModule.js +69 -0
- package/examples/node_modules/webpack/lib/runtime/ChunkNameRuntimeModule.js +27 -0
- package/examples/node_modules/webpack/lib/runtime/CompatGetDefaultExportRuntimeModule.js +37 -0
- package/examples/node_modules/webpack/lib/runtime/CompatRuntimeModule.js +78 -0
- package/examples/node_modules/webpack/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +66 -0
- package/examples/node_modules/webpack/lib/runtime/CreateScriptRuntimeModule.js +36 -0
- package/examples/node_modules/webpack/lib/runtime/CreateScriptUrlRuntimeModule.js +36 -0
- package/examples/node_modules/webpack/lib/runtime/DefinePropertyGettersRuntimeModule.js +39 -0
- package/examples/node_modules/webpack/lib/runtime/EnsureChunkRuntimeModule.js +54 -0
- package/examples/node_modules/webpack/lib/runtime/GetChunkFilenameRuntimeModule.js +282 -0
- package/examples/node_modules/webpack/lib/runtime/GetFullHashRuntimeModule.js +29 -0
- package/examples/node_modules/webpack/lib/runtime/GetMainFilenameRuntimeModule.js +44 -0
- package/examples/node_modules/webpack/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +76 -0
- package/examples/node_modules/webpack/lib/runtime/GlobalRuntimeModule.js +47 -0
- package/examples/node_modules/webpack/lib/runtime/HasOwnPropertyRuntimeModule.js +32 -0
- package/examples/node_modules/webpack/lib/runtime/HelperRuntimeModule.js +18 -0
- package/examples/node_modules/webpack/lib/runtime/LoadScriptRuntimeModule.js +158 -0
- package/examples/node_modules/webpack/lib/runtime/MakeNamespaceObjectRuntimeModule.js +36 -0
- package/examples/node_modules/webpack/lib/runtime/OnChunksLoadedRuntimeModule.js +76 -0
- package/examples/node_modules/webpack/lib/runtime/PublicPathRuntimeModule.js +30 -0
- package/examples/node_modules/webpack/lib/runtime/RelativeUrlRuntimeModule.js +41 -0
- package/examples/node_modules/webpack/lib/runtime/RuntimeIdRuntimeModule.js +28 -0
- package/examples/node_modules/webpack/lib/runtime/StartupChunkDependenciesPlugin.js +74 -0
- package/examples/node_modules/webpack/lib/runtime/StartupChunkDependenciesRuntimeModule.js +67 -0
- package/examples/node_modules/webpack/lib/runtime/StartupEntrypointRuntimeModule.js +50 -0
- package/examples/node_modules/webpack/lib/runtime/SystemContextRuntimeModule.js +25 -0
- package/examples/node_modules/webpack/lib/schemes/DataUriPlugin.js +56 -0
- package/examples/node_modules/webpack/lib/schemes/FileUriPlugin.js +49 -0
- package/examples/node_modules/webpack/lib/schemes/HttpUriPlugin.js +1118 -0
- package/examples/node_modules/webpack/lib/serialization/ArraySerializer.js +22 -0
- package/examples/node_modules/webpack/lib/serialization/BinaryMiddleware.js +950 -0
- package/examples/node_modules/webpack/lib/serialization/DateObjectSerializer.js +16 -0
- package/examples/node_modules/webpack/lib/serialization/ErrorObjectSerializer.js +27 -0
- package/examples/node_modules/webpack/lib/serialization/FileMiddleware.js +665 -0
- package/examples/node_modules/webpack/lib/serialization/MapObjectSerializer.js +31 -0
- package/examples/node_modules/webpack/lib/serialization/NullPrototypeObjectSerializer.js +33 -0
- package/examples/node_modules/webpack/lib/serialization/ObjectMiddleware.js +734 -0
- package/examples/node_modules/webpack/lib/serialization/PlainObjectSerializer.js +80 -0
- package/examples/node_modules/webpack/lib/serialization/RegExpObjectSerializer.js +17 -0
- package/examples/node_modules/webpack/lib/serialization/Serializer.js +46 -0
- package/examples/node_modules/webpack/lib/serialization/SerializerMiddleware.js +153 -0
- package/examples/node_modules/webpack/lib/serialization/SetObjectSerializer.js +24 -0
- package/examples/node_modules/webpack/lib/serialization/SingleItemMiddleware.js +34 -0
- package/examples/node_modules/webpack/lib/serialization/types.js +13 -0
- package/examples/node_modules/webpack/lib/sharing/ConsumeSharedFallbackDependency.js +30 -0
- package/examples/node_modules/webpack/lib/sharing/ConsumeSharedModule.js +251 -0
- package/examples/node_modules/webpack/lib/sharing/ConsumeSharedPlugin.js +319 -0
- package/examples/node_modules/webpack/lib/sharing/ConsumeSharedRuntimeModule.js +360 -0
- package/examples/node_modules/webpack/lib/sharing/ProvideForSharedDependency.js +34 -0
- package/examples/node_modules/webpack/lib/sharing/ProvideSharedDependency.js +63 -0
- package/examples/node_modules/webpack/lib/sharing/ProvideSharedModule.js +184 -0
- package/examples/node_modules/webpack/lib/sharing/ProvideSharedModuleFactory.js +35 -0
- package/examples/node_modules/webpack/lib/sharing/ProvideSharedPlugin.js +237 -0
- package/examples/node_modules/webpack/lib/sharing/SharePlugin.js +92 -0
- package/examples/node_modules/webpack/lib/sharing/ShareRuntimeModule.js +141 -0
- package/examples/node_modules/webpack/lib/sharing/resolveMatchedConfigs.js +91 -0
- package/examples/node_modules/webpack/lib/sharing/utils.js +90 -0
- package/examples/node_modules/webpack/lib/stats/DefaultStatsFactoryPlugin.js +2398 -0
- package/examples/node_modules/webpack/lib/stats/DefaultStatsPresetPlugin.js +326 -0
- package/examples/node_modules/webpack/lib/stats/DefaultStatsPrinterPlugin.js +1380 -0
- package/examples/node_modules/webpack/lib/stats/StatsFactory.js +292 -0
- package/examples/node_modules/webpack/lib/stats/StatsPrinter.js +249 -0
- package/examples/node_modules/webpack/lib/util/ArrayHelpers.js +44 -0
- package/examples/node_modules/webpack/lib/util/ArrayQueue.js +111 -0
- package/examples/node_modules/webpack/lib/util/AsyncQueue.js +373 -0
- package/examples/node_modules/webpack/lib/util/Hash.js +35 -0
- package/examples/node_modules/webpack/lib/util/IterableHelpers.js +46 -0
- package/examples/node_modules/webpack/lib/util/LazyBucketSortedSet.js +236 -0
- package/examples/node_modules/webpack/lib/util/LazySet.js +208 -0
- package/examples/node_modules/webpack/lib/util/MapHelpers.js +22 -0
- package/examples/node_modules/webpack/lib/util/ParallelismFactorCalculator.js +59 -0
- package/examples/node_modules/webpack/lib/util/Queue.js +51 -0
- package/examples/node_modules/webpack/lib/util/Semaphore.js +54 -0
- package/examples/node_modules/webpack/lib/util/SetHelpers.js +94 -0
- package/examples/node_modules/webpack/lib/util/SortableSet.js +160 -0
- package/examples/node_modules/webpack/lib/util/StackedCacheMap.js +110 -0
- package/examples/node_modules/webpack/lib/util/StackedMap.js +166 -0
- package/examples/node_modules/webpack/lib/util/StringXor.js +55 -0
- package/examples/node_modules/webpack/lib/util/TupleQueue.js +61 -0
- package/examples/node_modules/webpack/lib/util/TupleSet.js +150 -0
- package/examples/node_modules/webpack/lib/util/URLAbsoluteSpecifier.js +87 -0
- package/examples/node_modules/webpack/lib/util/WeakTupleMap.js +171 -0
- package/examples/node_modules/webpack/lib/util/binarySearchBounds.js +86 -0
- package/examples/node_modules/webpack/lib/util/cleverMerge.js +568 -0
- package/examples/node_modules/webpack/lib/util/comparators.js +459 -0
- package/examples/node_modules/webpack/lib/util/compileBooleanMatcher.js +206 -0
- package/examples/node_modules/webpack/lib/util/create-schema-validation.js +28 -0
- package/examples/node_modules/webpack/lib/util/createHash.js +171 -0
- package/examples/node_modules/webpack/lib/util/deprecation.js +264 -0
- package/examples/node_modules/webpack/lib/util/deterministicGrouping.js +508 -0
- package/examples/node_modules/webpack/lib/util/extractUrlAndGlobal.js +18 -0
- package/examples/node_modules/webpack/lib/util/findGraphRoots.js +229 -0
- package/examples/node_modules/webpack/lib/util/fs.js +337 -0
- package/examples/node_modules/webpack/lib/util/hash/BatchedHash.js +68 -0
- package/examples/node_modules/webpack/lib/util/hash/md4.js +20 -0
- package/examples/node_modules/webpack/lib/util/hash/wasm-hash.js +163 -0
- package/examples/node_modules/webpack/lib/util/hash/xxhash64.js +20 -0
- package/examples/node_modules/webpack/lib/util/identifier.js +377 -0
- package/examples/node_modules/webpack/lib/util/internalSerializables.js +211 -0
- package/examples/node_modules/webpack/lib/util/makeSerializable.js +30 -0
- package/examples/node_modules/webpack/lib/util/memoize.js +32 -0
- package/examples/node_modules/webpack/lib/util/nonNumericOnlyHash.js +22 -0
- package/examples/node_modules/webpack/lib/util/numberHash.js +45 -0
- package/examples/node_modules/webpack/lib/util/objectToMap.js +15 -0
- package/examples/node_modules/webpack/lib/util/processAsyncTree.js +62 -0
- package/examples/node_modules/webpack/lib/util/propertyAccess.js +78 -0
- package/examples/node_modules/webpack/lib/util/registerExternalSerializer.js +337 -0
- package/examples/node_modules/webpack/lib/util/runtime.js +623 -0
- package/examples/node_modules/webpack/lib/util/semver.js +484 -0
- package/examples/node_modules/webpack/lib/util/serialization.js +128 -0
- package/examples/node_modules/webpack/lib/util/smartGrouping.js +206 -0
- package/examples/node_modules/webpack/lib/util/source.js +61 -0
- package/examples/node_modules/webpack/lib/validateSchema.js +175 -0
- package/examples/node_modules/webpack/lib/wasm/EnableWasmLoadingPlugin.js +118 -0
- package/examples/node_modules/webpack/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +78 -0
- package/examples/node_modules/webpack/lib/wasm-async/AsyncWebAssemblyGenerator.js +53 -0
- package/examples/node_modules/webpack/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +194 -0
- package/examples/node_modules/webpack/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +198 -0
- package/examples/node_modules/webpack/lib/wasm-async/AsyncWebAssemblyParser.js +75 -0
- package/examples/node_modules/webpack/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +16 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +372 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WasmFinalizeExportsPlugin.js +82 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyGenerator.js +501 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyInInitialChunkError.js +106 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +216 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyModulesPlugin.js +142 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyParser.js +192 -0
- package/examples/node_modules/webpack/lib/wasm-sync/WebAssemblyUtils.js +65 -0
- package/examples/node_modules/webpack/lib/web/FetchCompileAsyncWasmPlugin.js +62 -0
- package/examples/node_modules/webpack/lib/web/FetchCompileWasmPlugin.js +71 -0
- package/examples/node_modules/webpack/lib/web/JsonpChunkLoadingPlugin.js +91 -0
- package/examples/node_modules/webpack/lib/web/JsonpChunkLoadingRuntimeModule.js +450 -0
- package/examples/node_modules/webpack/lib/web/JsonpTemplatePlugin.js +38 -0
- package/examples/node_modules/webpack/lib/webpack.js +171 -0
- package/examples/node_modules/webpack/lib/webworker/ImportScriptsChunkLoadingPlugin.js +94 -0
- package/examples/node_modules/webpack/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +238 -0
- package/examples/node_modules/webpack/lib/webworker/WebWorkerTemplatePlugin.js +25 -0
- package/examples/node_modules/webpack/module.d.ts +215 -0
- package/examples/node_modules/webpack/package.json +242 -0
- package/examples/node_modules/webpack/schemas/WebpackOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/WebpackOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/WebpackOptions.json +5321 -0
- package/examples/node_modules/webpack/schemas/_container.json +155 -0
- package/examples/node_modules/webpack/schemas/_sharing.json +118 -0
- package/examples/node_modules/webpack/schemas/plugins/BannerPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/BannerPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/BannerPlugin.json +103 -0
- package/examples/node_modules/webpack/schemas/plugins/DllPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/DllPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/DllPlugin.json +36 -0
- package/examples/node_modules/webpack/schemas/plugins/DllReferencePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/DllReferencePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/DllReferencePlugin.json +206 -0
- package/examples/node_modules/webpack/schemas/plugins/HashedModuleIdsPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/HashedModuleIdsPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/HashedModuleIdsPlugin.json +44 -0
- package/examples/node_modules/webpack/schemas/plugins/IgnorePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/IgnorePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/IgnorePlugin.json +34 -0
- package/examples/node_modules/webpack/schemas/plugins/JsonModulesPluginParser.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/JsonModulesPluginParser.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/JsonModulesPluginParser.json +12 -0
- package/examples/node_modules/webpack/schemas/plugins/LoaderOptionsPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/LoaderOptionsPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/LoaderOptionsPlugin.json +27 -0
- package/examples/node_modules/webpack/schemas/plugins/ProgressPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/ProgressPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/ProgressPlugin.json +65 -0
- package/examples/node_modules/webpack/schemas/plugins/SourceMapDevToolPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/SourceMapDevToolPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/SourceMapDevToolPlugin.json +143 -0
- package/examples/node_modules/webpack/schemas/plugins/WatchIgnorePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/WatchIgnorePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/WatchIgnorePlugin.json +25 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetGeneratorOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetGeneratorOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetGeneratorOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetInlineGeneratorOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetInlineGeneratorOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetInlineGeneratorOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetParserOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetParserOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetParserOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetResourceGeneratorOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/asset/AssetResourceGeneratorOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerPlugin.json +286 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerReferencePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerReferencePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ContainerReferencePlugin.json +128 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ExternalsType.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ExternalsType.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ExternalsType.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ModuleFederationPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ModuleFederationPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/container/ModuleFederationPlugin.json +513 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssGeneratorOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssGeneratorOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssGeneratorOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssParserOptions.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssParserOptions.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/css/CssParserOptions.json +3 -0
- package/examples/node_modules/webpack/schemas/plugins/debug/ProfilingPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/debug/ProfilingPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/debug/ProfilingPlugin.json +12 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceChunkIdsPlugin.json +11 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/ids/OccurrenceModuleIdsPlugin.json +11 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/AggressiveSplittingPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/AggressiveSplittingPlugin.json +23 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/LimitChunkCountPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/LimitChunkCountPlugin.json +21 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/MinChunkSizePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/MinChunkSizePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/optimize/MinChunkSizePlugin.json +20 -0
- package/examples/node_modules/webpack/schemas/plugins/schemes/HttpUriPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/schemes/HttpUriPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/schemes/HttpUriPlugin.json +74 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ConsumeSharedPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ConsumeSharedPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ConsumeSharedPlugin.json +120 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ProvideSharedPlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ProvideSharedPlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/ProvideSharedPlugin.json +94 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/SharePlugin.check.d.ts +7 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/SharePlugin.check.js +6 -0
- package/examples/node_modules/webpack/schemas/plugins/sharing/SharePlugin.json +133 -0
- package/examples/node_modules/webpack/types.d.ts +13072 -0
- package/examples/node_modules/webpack-cli/README.md +45 -14
- package/examples/node_modules/webpack-cli/bin/cli.js +9 -32
- package/examples/node_modules/webpack-cli/lib/bootstrap.js +12 -15
- package/examples/node_modules/webpack-cli/lib/index.js +3 -3
- package/examples/node_modules/webpack-cli/lib/plugins/CLIPlugin.js +101 -68
- package/examples/node_modules/webpack-cli/lib/utils/dynamic-import-loader.js +7 -7
- package/examples/node_modules/webpack-cli/lib/webpack-cli.js +2093 -1553
- package/examples/node_modules/webpack-cli/node_modules/commander/CHANGELOG.md +440 -0
- package/examples/node_modules/webpack-cli/node_modules/commander/LICENSE +22 -0
- package/examples/node_modules/webpack-cli/node_modules/commander/Readme.md +917 -0
- package/examples/node_modules/{commander → webpack-cli/node_modules/commander}/esm.mjs +0 -0
- package/examples/node_modules/webpack-cli/node_modules/commander/index.js +2217 -0
- package/examples/node_modules/{commander → webpack-cli/node_modules/commander}/package-support.json +0 -0
- package/examples/node_modules/webpack-cli/node_modules/commander/package.json +68 -0
- package/examples/node_modules/webpack-cli/node_modules/commander/typings/index.d.ts +627 -0
- package/examples/node_modules/webpack-cli/package.json +30 -63
- package/examples/node_modules/webpack-merge/CHANGELOG.md +5 -0
- package/examples/node_modules/webpack-merge/README.md +3 -3
- package/examples/node_modules/webpack-merge/dist/index.d.ts +4 -4
- package/examples/node_modules/webpack-merge/dist/index.js +8 -7
- package/examples/node_modules/webpack-merge/dist/index.js.map +1 -1
- package/examples/node_modules/webpack-merge/dist/join-arrays.js +7 -6
- package/examples/node_modules/webpack-merge/dist/join-arrays.js.map +1 -1
- package/examples/node_modules/webpack-merge/dist/types.d.ts +1 -0
- package/examples/node_modules/webpack-merge/dist/unique.js +5 -4
- package/examples/node_modules/webpack-merge/dist/unique.js.map +1 -1
- package/examples/node_modules/webpack-merge/dist/utils.d.ts +1 -1
- package/examples/node_modules/webpack-merge/package.json +37 -65
- package/examples/node_modules/webpack-sources/LICENSE +21 -0
- package/examples/node_modules/webpack-sources/README.md +228 -0
- package/examples/node_modules/webpack-sources/lib/CachedSource.js +274 -0
- package/examples/node_modules/webpack-sources/lib/CompatSource.js +66 -0
- package/examples/node_modules/webpack-sources/lib/ConcatSource.js +319 -0
- package/examples/node_modules/webpack-sources/lib/OriginalSource.js +135 -0
- package/examples/node_modules/webpack-sources/lib/PrefixSource.js +114 -0
- package/examples/node_modules/webpack-sources/lib/RawSource.js +81 -0
- package/examples/node_modules/webpack-sources/lib/ReplaceSource.js +467 -0
- package/examples/node_modules/webpack-sources/lib/SizeOnlySource.js +42 -0
- package/examples/node_modules/webpack-sources/lib/Source.js +38 -0
- package/examples/node_modules/webpack-sources/lib/SourceMapSource.js +247 -0
- package/examples/node_modules/webpack-sources/lib/helpers/createMappingsSerializer.js +206 -0
- package/examples/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js +129 -0
- package/examples/node_modules/webpack-sources/lib/helpers/getGeneratedSourceInfo.js +33 -0
- package/examples/node_modules/webpack-sources/lib/helpers/getName.js +14 -0
- package/examples/node_modules/webpack-sources/lib/helpers/getSource.js +17 -0
- package/examples/node_modules/webpack-sources/lib/helpers/readMappings.js +116 -0
- package/examples/node_modules/webpack-sources/lib/helpers/splitIntoLines.js +21 -0
- package/examples/node_modules/webpack-sources/lib/helpers/splitIntoPotentialTokens.js +41 -0
- package/examples/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js +102 -0
- package/examples/node_modules/webpack-sources/lib/helpers/streamChunks.js +36 -0
- package/examples/node_modules/webpack-sources/lib/helpers/streamChunksOfCombinedSourceMap.js +329 -0
- package/examples/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js +34 -0
- package/examples/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js +412 -0
- package/examples/node_modules/webpack-sources/lib/index.js +30 -0
- package/examples/node_modules/webpack-sources/package.json +58 -0
- package/examples/node_modules/which/package.json +22 -55
- package/examples/node_modules/wildcard/package.json +22 -51
- package/lib/browser/math.js +6 -6
- package/lib/browser/math.js.map +1 -1
- package/lib/cjs/expression/embeddedDocs/function/matrix/forEach.js +1 -1
- package/lib/cjs/expression/node/FunctionNode.js +30 -8
- package/lib/cjs/function/arithmetic/sign.js +4 -0
- package/lib/cjs/function/string/format.js +3 -0
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/type/unit/Unit.js +67 -79
- package/lib/cjs/utils/string.js +17 -4
- package/lib/cjs/version.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/matrix/forEach.js +1 -1
- package/lib/esm/expression/node/FunctionNode.js +29 -9
- package/lib/esm/function/arithmetic/sign.js +4 -0
- package/lib/esm/function/string/format.js +3 -0
- package/lib/esm/type/unit/Unit.js +67 -79
- package/lib/esm/utils/string.js +18 -4
- package/lib/esm/version.js +1 -1
- package/package.json +2 -2
- package/examples/node_modules/@discoveryjs/json-ext/CHANGELOG.md +0 -42
- package/examples/node_modules/@webpack-cli/configtest/CHANGELOG.md +0 -18
- package/examples/node_modules/@webpack-cli/configtest/LICENSE +0 -20
- package/examples/node_modules/@webpack-cli/info/CHANGELOG.md +0 -61
- package/examples/node_modules/@webpack-cli/info/LICENSE +0 -20
- package/examples/node_modules/@webpack-cli/serve/CHANGELOG.md +0 -93
- package/examples/node_modules/@webpack-cli/serve/LICENSE +0 -20
- package/examples/node_modules/@webpack-cli/serve/lib/startDevServer.d.ts +0 -12
- package/examples/node_modules/@webpack-cli/serve/lib/startDevServer.js +0 -113
- package/examples/node_modules/ansi-colors/LICENSE +0 -21
- package/examples/node_modules/ansi-colors/README.md +0 -315
- package/examples/node_modules/ansi-colors/index.js +0 -177
- package/examples/node_modules/ansi-colors/package.json +0 -152
- package/examples/node_modules/ansi-colors/symbols.js +0 -70
- package/examples/node_modules/ansi-colors/types/index.d.ts +0 -161
- package/examples/node_modules/enquirer/CHANGELOG.md +0 -135
- package/examples/node_modules/enquirer/LICENSE +0 -21
- package/examples/node_modules/enquirer/README.md +0 -1752
- package/examples/node_modules/enquirer/index.d.ts +0 -151
- package/examples/node_modules/enquirer/index.js +0 -250
- package/examples/node_modules/enquirer/lib/ansi.js +0 -116
- package/examples/node_modules/enquirer/lib/combos.js +0 -75
- package/examples/node_modules/enquirer/lib/completer.js +0 -52
- package/examples/node_modules/enquirer/lib/interpolate.js +0 -266
- package/examples/node_modules/enquirer/lib/keypress.js +0 -243
- package/examples/node_modules/enquirer/lib/placeholder.js +0 -63
- package/examples/node_modules/enquirer/lib/prompt.js +0 -485
- package/examples/node_modules/enquirer/lib/prompts/autocomplete.js +0 -113
- package/examples/node_modules/enquirer/lib/prompts/basicauth.js +0 -41
- package/examples/node_modules/enquirer/lib/prompts/confirm.js +0 -13
- package/examples/node_modules/enquirer/lib/prompts/editable.js +0 -136
- package/examples/node_modules/enquirer/lib/prompts/form.js +0 -196
- package/examples/node_modules/enquirer/lib/prompts/index.js +0 -28
- package/examples/node_modules/enquirer/lib/prompts/input.js +0 -55
- package/examples/node_modules/enquirer/lib/prompts/invisible.js +0 -11
- package/examples/node_modules/enquirer/lib/prompts/list.js +0 -36
- package/examples/node_modules/enquirer/lib/prompts/multiselect.js +0 -11
- package/examples/node_modules/enquirer/lib/prompts/numeral.js +0 -1
- package/examples/node_modules/enquirer/lib/prompts/password.js +0 -18
- package/examples/node_modules/enquirer/lib/prompts/quiz.js +0 -37
- package/examples/node_modules/enquirer/lib/prompts/scale.js +0 -237
- package/examples/node_modules/enquirer/lib/prompts/select.js +0 -139
- package/examples/node_modules/enquirer/lib/prompts/snippet.js +0 -185
- package/examples/node_modules/enquirer/lib/prompts/sort.js +0 -37
- package/examples/node_modules/enquirer/lib/prompts/survey.js +0 -163
- package/examples/node_modules/enquirer/lib/prompts/text.js +0 -1
- package/examples/node_modules/enquirer/lib/prompts/toggle.js +0 -109
- package/examples/node_modules/enquirer/lib/render.js +0 -33
- package/examples/node_modules/enquirer/lib/roles.js +0 -46
- package/examples/node_modules/enquirer/lib/state.js +0 -69
- package/examples/node_modules/enquirer/lib/styles.js +0 -144
- package/examples/node_modules/enquirer/lib/symbols.js +0 -66
- package/examples/node_modules/enquirer/lib/theme.js +0 -11
- package/examples/node_modules/enquirer/lib/timer.js +0 -38
- package/examples/node_modules/enquirer/lib/types/array.js +0 -658
- package/examples/node_modules/enquirer/lib/types/auth.js +0 -29
- package/examples/node_modules/enquirer/lib/types/boolean.js +0 -88
- package/examples/node_modules/enquirer/lib/types/index.js +0 -7
- package/examples/node_modules/enquirer/lib/types/number.js +0 -86
- package/examples/node_modules/enquirer/lib/types/string.js +0 -185
- package/examples/node_modules/enquirer/lib/utils.js +0 -268
- package/examples/node_modules/enquirer/package.json +0 -148
- package/examples/node_modules/is-core-module/.eslintignore +0 -1
- package/examples/node_modules/is-core-module/.github/FUNDING.yml +0 -12
- package/examples/node_modules/is-core-module/.github/workflows/node-4+.yml +0 -54
- package/examples/node_modules/is-core-module/.github/workflows/node-iojs.yml +0 -58
- package/examples/node_modules/is-core-module/.github/workflows/node-pretest.yml +0 -26
- package/examples/node_modules/is-core-module/.github/workflows/node-zero.yml +0 -58
- package/examples/node_modules/is-core-module/.github/workflows/rebase.yml +0 -15
- package/examples/node_modules/is-core-module/.github/workflows/require-allow-edits.yml +0 -14
- package/examples/node_modules/path-parse/.travis.yml +0 -9
- package/examples/node_modules/path-parse/test.js +0 -77
- package/examples/node_modules/resolve/.eslintignore +0 -1
- package/examples/node_modules/resolve/test/.eslintrc +0 -5
- package/examples/node_modules/signal-exit/CHANGELOG.md +0 -35
- package/examples/node_modules/v8-compile-cache/CHANGELOG.md +0 -53
- package/examples/node_modules/v8-compile-cache/LICENSE +0 -21
- package/examples/node_modules/v8-compile-cache/README.md +0 -55
- package/examples/node_modules/v8-compile-cache/package.json +0 -66
- package/examples/node_modules/v8-compile-cache/v8-compile-cache.js +0 -371
- package/examples/node_modules/webpack-cli/CHANGELOG.md +0 -501
- package/examples/node_modules/webpack-cli/LICENSE +0 -20
- package/examples/node_modules/webpack-cli/lib/utils/__tests__/get-package-manager.test.js +0 -108
- package/examples/node_modules/webpack-cli/lib/utils/__tests__/prompt-installation.test.js +0 -118
- package/examples/node_modules/webpack-cli/lib/utils/capitalize-first-letter.js +0 -9
- package/examples/node_modules/webpack-cli/lib/utils/get-package-manager.js +0 -65
- package/examples/node_modules/webpack-cli/lib/utils/index.js +0 -49
- package/examples/node_modules/webpack-cli/lib/utils/logger.js +0 -11
- package/examples/node_modules/webpack-cli/lib/utils/package-exists.js +0 -9
- package/examples/node_modules/webpack-cli/lib/utils/prompt-installation.js +0 -58
- package/examples/node_modules/webpack-cli/lib/utils/run-command.js +0 -13
- package/examples/node_modules/webpack-cli/lib/utils/to-kebab-case.js +0 -5
@@ -0,0 +1,3776 @@
|
|
1
|
+
/*
|
2
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
3
|
+
Author Tobias Koppers @sokra
|
4
|
+
*/
|
5
|
+
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
const { Parser: AcornParser } = require("acorn");
|
9
|
+
const { importAssertions } = require("acorn-import-assertions");
|
10
|
+
const { SyncBailHook, HookMap } = require("tapable");
|
11
|
+
const vm = require("vm");
|
12
|
+
const Parser = require("../Parser");
|
13
|
+
const StackedMap = require("../util/StackedMap");
|
14
|
+
const binarySearchBounds = require("../util/binarySearchBounds");
|
15
|
+
const memoize = require("../util/memoize");
|
16
|
+
const BasicEvaluatedExpression = require("./BasicEvaluatedExpression");
|
17
|
+
|
18
|
+
/** @typedef {import("acorn").Options} AcornOptions */
|
19
|
+
/** @typedef {import("estree").ArrayExpression} ArrayExpressionNode */
|
20
|
+
/** @typedef {import("estree").BinaryExpression} BinaryExpressionNode */
|
21
|
+
/** @typedef {import("estree").BlockStatement} BlockStatementNode */
|
22
|
+
/** @typedef {import("estree").SequenceExpression} SequenceExpressionNode */
|
23
|
+
/** @typedef {import("estree").CallExpression} CallExpressionNode */
|
24
|
+
/** @typedef {import("estree").ClassDeclaration} ClassDeclarationNode */
|
25
|
+
/** @typedef {import("estree").ClassExpression} ClassExpressionNode */
|
26
|
+
/** @typedef {import("estree").Comment} CommentNode */
|
27
|
+
/** @typedef {import("estree").ConditionalExpression} ConditionalExpressionNode */
|
28
|
+
/** @typedef {import("estree").Declaration} DeclarationNode */
|
29
|
+
/** @typedef {import("estree").PrivateIdentifier} PrivateIdentifierNode */
|
30
|
+
/** @typedef {import("estree").PropertyDefinition} PropertyDefinitionNode */
|
31
|
+
/** @typedef {import("estree").Expression} ExpressionNode */
|
32
|
+
/** @typedef {import("estree").Identifier} IdentifierNode */
|
33
|
+
/** @typedef {import("estree").IfStatement} IfStatementNode */
|
34
|
+
/** @typedef {import("estree").LabeledStatement} LabeledStatementNode */
|
35
|
+
/** @typedef {import("estree").Literal} LiteralNode */
|
36
|
+
/** @typedef {import("estree").LogicalExpression} LogicalExpressionNode */
|
37
|
+
/** @typedef {import("estree").ChainExpression} ChainExpressionNode */
|
38
|
+
/** @typedef {import("estree").MemberExpression} MemberExpressionNode */
|
39
|
+
/** @typedef {import("estree").MetaProperty} MetaPropertyNode */
|
40
|
+
/** @typedef {import("estree").MethodDefinition} MethodDefinitionNode */
|
41
|
+
/** @typedef {import("estree").ModuleDeclaration} ModuleDeclarationNode */
|
42
|
+
/** @typedef {import("estree").NewExpression} NewExpressionNode */
|
43
|
+
/** @typedef {import("estree").Node} AnyNode */
|
44
|
+
/** @typedef {import("estree").Program} ProgramNode */
|
45
|
+
/** @typedef {import("estree").Statement} StatementNode */
|
46
|
+
/** @typedef {import("estree").ImportDeclaration} ImportDeclarationNode */
|
47
|
+
/** @typedef {import("estree").ExportNamedDeclaration} ExportNamedDeclarationNode */
|
48
|
+
/** @typedef {import("estree").ExportDefaultDeclaration} ExportDefaultDeclarationNode */
|
49
|
+
/** @typedef {import("estree").ExportAllDeclaration} ExportAllDeclarationNode */
|
50
|
+
/** @typedef {import("estree").Super} SuperNode */
|
51
|
+
/** @typedef {import("estree").TaggedTemplateExpression} TaggedTemplateExpressionNode */
|
52
|
+
/** @typedef {import("estree").TemplateLiteral} TemplateLiteralNode */
|
53
|
+
/** @typedef {import("estree").ThisExpression} ThisExpressionNode */
|
54
|
+
/** @typedef {import("estree").UnaryExpression} UnaryExpressionNode */
|
55
|
+
/** @typedef {import("estree").VariableDeclarator} VariableDeclaratorNode */
|
56
|
+
/** @template T @typedef {import("tapable").AsArray<T>} AsArray<T> */
|
57
|
+
/** @typedef {import("../Parser").ParserState} ParserState */
|
58
|
+
/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */
|
59
|
+
/** @typedef {{declaredScope: ScopeInfo, freeName: string | true, tagInfo: TagInfo | undefined}} VariableInfoInterface */
|
60
|
+
/** @typedef {{ name: string | VariableInfo, rootInfo: string | VariableInfo, getMembers: () => string[] }} GetInfoResult */
|
61
|
+
|
62
|
+
const EMPTY_ARRAY = [];
|
63
|
+
const ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = 0b01;
|
64
|
+
const ALLOWED_MEMBER_TYPES_EXPRESSION = 0b10;
|
65
|
+
const ALLOWED_MEMBER_TYPES_ALL = 0b11;
|
66
|
+
|
67
|
+
// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API
|
68
|
+
|
69
|
+
const parser = AcornParser.extend(importAssertions);
|
70
|
+
|
71
|
+
class VariableInfo {
|
72
|
+
/**
|
73
|
+
* @param {ScopeInfo} declaredScope scope in which the variable is declared
|
74
|
+
* @param {string | true} freeName which free name the variable aliases, or true when none
|
75
|
+
* @param {TagInfo | undefined} tagInfo info about tags
|
76
|
+
*/
|
77
|
+
constructor(declaredScope, freeName, tagInfo) {
|
78
|
+
this.declaredScope = declaredScope;
|
79
|
+
this.freeName = freeName;
|
80
|
+
this.tagInfo = tagInfo;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
/** @typedef {string | ScopeInfo | VariableInfo} ExportedVariableInfo */
|
85
|
+
/** @typedef {LiteralNode | string | null | undefined} ImportSource */
|
86
|
+
/** @typedef {Omit<AcornOptions, "sourceType" | "ecmaVersion"> & { sourceType: "module" | "script" | "auto", ecmaVersion?: AcornOptions["ecmaVersion"] }} ParseOptions */
|
87
|
+
|
88
|
+
/**
|
89
|
+
* @typedef {Object} TagInfo
|
90
|
+
* @property {any} tag
|
91
|
+
* @property {any} data
|
92
|
+
* @property {TagInfo | undefined} next
|
93
|
+
*/
|
94
|
+
|
95
|
+
/**
|
96
|
+
* @typedef {Object} ScopeInfo
|
97
|
+
* @property {StackedMap<string, VariableInfo | ScopeInfo>} definitions
|
98
|
+
* @property {boolean | "arrow"} topLevelScope
|
99
|
+
* @property {boolean} inShorthand
|
100
|
+
* @property {boolean} isStrict
|
101
|
+
* @property {boolean} isAsmJs
|
102
|
+
* @property {boolean} inTry
|
103
|
+
*/
|
104
|
+
|
105
|
+
const joinRanges = (startRange, endRange) => {
|
106
|
+
if (!endRange) return startRange;
|
107
|
+
if (!startRange) return endRange;
|
108
|
+
return [startRange[0], endRange[1]];
|
109
|
+
};
|
110
|
+
|
111
|
+
const objectAndMembersToName = (object, membersReversed) => {
|
112
|
+
let name = object;
|
113
|
+
for (let i = membersReversed.length - 1; i >= 0; i--) {
|
114
|
+
name = name + "." + membersReversed[i];
|
115
|
+
}
|
116
|
+
return name;
|
117
|
+
};
|
118
|
+
|
119
|
+
const getRootName = expression => {
|
120
|
+
switch (expression.type) {
|
121
|
+
case "Identifier":
|
122
|
+
return expression.name;
|
123
|
+
case "ThisExpression":
|
124
|
+
return "this";
|
125
|
+
case "MetaProperty":
|
126
|
+
return `${expression.meta.name}.${expression.property.name}`;
|
127
|
+
default:
|
128
|
+
return undefined;
|
129
|
+
}
|
130
|
+
};
|
131
|
+
|
132
|
+
/** @type {AcornOptions} */
|
133
|
+
const defaultParserOptions = {
|
134
|
+
ranges: true,
|
135
|
+
locations: true,
|
136
|
+
ecmaVersion: "latest",
|
137
|
+
sourceType: "module",
|
138
|
+
// https://github.com/tc39/proposal-hashbang
|
139
|
+
allowHashBang: true,
|
140
|
+
onComment: null
|
141
|
+
};
|
142
|
+
|
143
|
+
// regexp to match at least one "magic comment"
|
144
|
+
const webpackCommentRegExp = new RegExp(/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/);
|
145
|
+
|
146
|
+
const EMPTY_COMMENT_OPTIONS = {
|
147
|
+
options: null,
|
148
|
+
errors: null
|
149
|
+
};
|
150
|
+
|
151
|
+
class JavascriptParser extends Parser {
|
152
|
+
/**
|
153
|
+
* @param {"module" | "script" | "auto"} sourceType default source type
|
154
|
+
*/
|
155
|
+
constructor(sourceType = "auto") {
|
156
|
+
super();
|
157
|
+
this.hooks = Object.freeze({
|
158
|
+
/** @type {HookMap<SyncBailHook<[UnaryExpressionNode], BasicEvaluatedExpression | undefined | null>>} */
|
159
|
+
evaluateTypeof: new HookMap(() => new SyncBailHook(["expression"])),
|
160
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], BasicEvaluatedExpression | undefined | null>>} */
|
161
|
+
evaluate: new HookMap(() => new SyncBailHook(["expression"])),
|
162
|
+
/** @type {HookMap<SyncBailHook<[IdentifierNode | ThisExpressionNode | MemberExpressionNode | MetaPropertyNode], BasicEvaluatedExpression | undefined | null>>} */
|
163
|
+
evaluateIdentifier: new HookMap(() => new SyncBailHook(["expression"])),
|
164
|
+
/** @type {HookMap<SyncBailHook<[IdentifierNode | ThisExpressionNode | MemberExpressionNode], BasicEvaluatedExpression | undefined | null>>} */
|
165
|
+
evaluateDefinedIdentifier: new HookMap(
|
166
|
+
() => new SyncBailHook(["expression"])
|
167
|
+
),
|
168
|
+
/** @type {HookMap<SyncBailHook<[CallExpressionNode, BasicEvaluatedExpression | undefined], BasicEvaluatedExpression | undefined | null>>} */
|
169
|
+
evaluateCallExpressionMember: new HookMap(
|
170
|
+
() => new SyncBailHook(["expression", "param"])
|
171
|
+
),
|
172
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode | DeclarationNode | PrivateIdentifierNode, number], boolean | void>>} */
|
173
|
+
isPure: new HookMap(
|
174
|
+
() => new SyncBailHook(["expression", "commentsStartPosition"])
|
175
|
+
),
|
176
|
+
/** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */
|
177
|
+
preStatement: new SyncBailHook(["statement"]),
|
178
|
+
|
179
|
+
/** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */
|
180
|
+
blockPreStatement: new SyncBailHook(["declaration"]),
|
181
|
+
/** @type {SyncBailHook<[StatementNode | ModuleDeclarationNode], boolean | void>} */
|
182
|
+
statement: new SyncBailHook(["statement"]),
|
183
|
+
/** @type {SyncBailHook<[IfStatementNode], boolean | void>} */
|
184
|
+
statementIf: new SyncBailHook(["statement"]),
|
185
|
+
/** @type {SyncBailHook<[ExpressionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
186
|
+
classExtendsExpression: new SyncBailHook([
|
187
|
+
"expression",
|
188
|
+
"classDefinition"
|
189
|
+
]),
|
190
|
+
/** @type {SyncBailHook<[MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
191
|
+
classBodyElement: new SyncBailHook(["element", "classDefinition"]),
|
192
|
+
/** @type {SyncBailHook<[ExpressionNode, MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
193
|
+
classBodyValue: new SyncBailHook([
|
194
|
+
"expression",
|
195
|
+
"element",
|
196
|
+
"classDefinition"
|
197
|
+
]),
|
198
|
+
/** @type {HookMap<SyncBailHook<[LabeledStatementNode], boolean | void>>} */
|
199
|
+
label: new HookMap(() => new SyncBailHook(["statement"])),
|
200
|
+
/** @type {SyncBailHook<[ImportDeclarationNode, ImportSource], boolean | void>} */
|
201
|
+
import: new SyncBailHook(["statement", "source"]),
|
202
|
+
/** @type {SyncBailHook<[ImportDeclarationNode, ImportSource, string, string], boolean | void>} */
|
203
|
+
importSpecifier: new SyncBailHook([
|
204
|
+
"statement",
|
205
|
+
"source",
|
206
|
+
"exportName",
|
207
|
+
"identifierName"
|
208
|
+
]),
|
209
|
+
/** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode], boolean | void>} */
|
210
|
+
export: new SyncBailHook(["statement"]),
|
211
|
+
/** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, ImportSource], boolean | void>} */
|
212
|
+
exportImport: new SyncBailHook(["statement", "source"]),
|
213
|
+
/** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, DeclarationNode], boolean | void>} */
|
214
|
+
exportDeclaration: new SyncBailHook(["statement", "declaration"]),
|
215
|
+
/** @type {SyncBailHook<[ExportDefaultDeclarationNode, DeclarationNode], boolean | void>} */
|
216
|
+
exportExpression: new SyncBailHook(["statement", "declaration"]),
|
217
|
+
/** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, string, string, number | undefined], boolean | void>} */
|
218
|
+
exportSpecifier: new SyncBailHook([
|
219
|
+
"statement",
|
220
|
+
"identifierName",
|
221
|
+
"exportName",
|
222
|
+
"index"
|
223
|
+
]),
|
224
|
+
/** @type {SyncBailHook<[ExportNamedDeclarationNode | ExportAllDeclarationNode, ImportSource, string, string, number | undefined], boolean | void>} */
|
225
|
+
exportImportSpecifier: new SyncBailHook([
|
226
|
+
"statement",
|
227
|
+
"source",
|
228
|
+
"identifierName",
|
229
|
+
"exportName",
|
230
|
+
"index"
|
231
|
+
]),
|
232
|
+
/** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */
|
233
|
+
preDeclarator: new SyncBailHook(["declarator", "statement"]),
|
234
|
+
/** @type {SyncBailHook<[VariableDeclaratorNode, StatementNode], boolean | void>} */
|
235
|
+
declarator: new SyncBailHook(["declarator", "statement"]),
|
236
|
+
/** @type {HookMap<SyncBailHook<[DeclarationNode], boolean | void>>} */
|
237
|
+
varDeclaration: new HookMap(() => new SyncBailHook(["declaration"])),
|
238
|
+
/** @type {HookMap<SyncBailHook<[DeclarationNode], boolean | void>>} */
|
239
|
+
varDeclarationLet: new HookMap(() => new SyncBailHook(["declaration"])),
|
240
|
+
/** @type {HookMap<SyncBailHook<[DeclarationNode], boolean | void>>} */
|
241
|
+
varDeclarationConst: new HookMap(() => new SyncBailHook(["declaration"])),
|
242
|
+
/** @type {HookMap<SyncBailHook<[DeclarationNode], boolean | void>>} */
|
243
|
+
varDeclarationVar: new HookMap(() => new SyncBailHook(["declaration"])),
|
244
|
+
/** @type {HookMap<SyncBailHook<[IdentifierNode], boolean | void>>} */
|
245
|
+
pattern: new HookMap(() => new SyncBailHook(["pattern"])),
|
246
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], boolean | void>>} */
|
247
|
+
canRename: new HookMap(() => new SyncBailHook(["initExpression"])),
|
248
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], boolean | void>>} */
|
249
|
+
rename: new HookMap(() => new SyncBailHook(["initExpression"])),
|
250
|
+
/** @type {HookMap<SyncBailHook<[import("estree").AssignmentExpression], boolean | void>>} */
|
251
|
+
assign: new HookMap(() => new SyncBailHook(["expression"])),
|
252
|
+
/** @type {HookMap<SyncBailHook<[import("estree").AssignmentExpression, string[]], boolean | void>>} */
|
253
|
+
assignMemberChain: new HookMap(
|
254
|
+
() => new SyncBailHook(["expression", "members"])
|
255
|
+
),
|
256
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], boolean | void>>} */
|
257
|
+
typeof: new HookMap(() => new SyncBailHook(["expression"])),
|
258
|
+
/** @type {SyncBailHook<[ExpressionNode], boolean | void>} */
|
259
|
+
importCall: new SyncBailHook(["expression"]),
|
260
|
+
/** @type {SyncBailHook<[ExpressionNode], boolean | void>} */
|
261
|
+
topLevelAwait: new SyncBailHook(["expression"]),
|
262
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], boolean | void>>} */
|
263
|
+
call: new HookMap(() => new SyncBailHook(["expression"])),
|
264
|
+
/** Something like "a.b()" */
|
265
|
+
/** @type {HookMap<SyncBailHook<[CallExpressionNode, string[]], boolean | void>>} */
|
266
|
+
callMemberChain: new HookMap(
|
267
|
+
() => new SyncBailHook(["expression", "members"])
|
268
|
+
),
|
269
|
+
/** Something like "a.b().c.d" */
|
270
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode, string[], CallExpressionNode, string[]], boolean | void>>} */
|
271
|
+
memberChainOfCallMemberChain: new HookMap(
|
272
|
+
() =>
|
273
|
+
new SyncBailHook([
|
274
|
+
"expression",
|
275
|
+
"calleeMembers",
|
276
|
+
"callExpression",
|
277
|
+
"members"
|
278
|
+
])
|
279
|
+
),
|
280
|
+
/** Something like "a.b().c.d()"" */
|
281
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode, string[], CallExpressionNode, string[]], boolean | void>>} */
|
282
|
+
callMemberChainOfCallMemberChain: new HookMap(
|
283
|
+
() =>
|
284
|
+
new SyncBailHook([
|
285
|
+
"expression",
|
286
|
+
"calleeMembers",
|
287
|
+
"innerCallExpression",
|
288
|
+
"members"
|
289
|
+
])
|
290
|
+
),
|
291
|
+
/** @type {SyncBailHook<[ChainExpressionNode], boolean | void>} */
|
292
|
+
optionalChaining: new SyncBailHook(["optionalChaining"]),
|
293
|
+
/** @type {HookMap<SyncBailHook<[NewExpressionNode], boolean | void>>} */
|
294
|
+
new: new HookMap(() => new SyncBailHook(["expression"])),
|
295
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode], boolean | void>>} */
|
296
|
+
expression: new HookMap(() => new SyncBailHook(["expression"])),
|
297
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode, string[]], boolean | void>>} */
|
298
|
+
expressionMemberChain: new HookMap(
|
299
|
+
() => new SyncBailHook(["expression", "members"])
|
300
|
+
),
|
301
|
+
/** @type {HookMap<SyncBailHook<[ExpressionNode, string[]], boolean | void>>} */
|
302
|
+
unhandledExpressionMemberChain: new HookMap(
|
303
|
+
() => new SyncBailHook(["expression", "members"])
|
304
|
+
),
|
305
|
+
/** @type {SyncBailHook<[ExpressionNode], boolean | void>} */
|
306
|
+
expressionConditionalOperator: new SyncBailHook(["expression"]),
|
307
|
+
/** @type {SyncBailHook<[ExpressionNode], boolean | void>} */
|
308
|
+
expressionLogicalOperator: new SyncBailHook(["expression"]),
|
309
|
+
/** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */
|
310
|
+
program: new SyncBailHook(["ast", "comments"]),
|
311
|
+
/** @type {SyncBailHook<[ProgramNode, CommentNode[]], boolean | void>} */
|
312
|
+
finish: new SyncBailHook(["ast", "comments"])
|
313
|
+
});
|
314
|
+
this.sourceType = sourceType;
|
315
|
+
/** @type {ScopeInfo} */
|
316
|
+
this.scope = undefined;
|
317
|
+
/** @type {ParserState} */
|
318
|
+
this.state = undefined;
|
319
|
+
this.comments = undefined;
|
320
|
+
this.semicolons = undefined;
|
321
|
+
/** @type {(StatementNode|ExpressionNode)[]} */
|
322
|
+
this.statementPath = undefined;
|
323
|
+
this.prevStatement = undefined;
|
324
|
+
this.currentTagData = undefined;
|
325
|
+
this._initializeEvaluating();
|
326
|
+
}
|
327
|
+
|
328
|
+
_initializeEvaluating() {
|
329
|
+
this.hooks.evaluate.for("Literal").tap("JavascriptParser", _expr => {
|
330
|
+
const expr = /** @type {LiteralNode} */ (_expr);
|
331
|
+
|
332
|
+
switch (typeof expr.value) {
|
333
|
+
case "number":
|
334
|
+
return new BasicEvaluatedExpression()
|
335
|
+
.setNumber(expr.value)
|
336
|
+
.setRange(expr.range);
|
337
|
+
case "bigint":
|
338
|
+
return new BasicEvaluatedExpression()
|
339
|
+
.setBigInt(expr.value)
|
340
|
+
.setRange(expr.range);
|
341
|
+
case "string":
|
342
|
+
return new BasicEvaluatedExpression()
|
343
|
+
.setString(expr.value)
|
344
|
+
.setRange(expr.range);
|
345
|
+
case "boolean":
|
346
|
+
return new BasicEvaluatedExpression()
|
347
|
+
.setBoolean(expr.value)
|
348
|
+
.setRange(expr.range);
|
349
|
+
}
|
350
|
+
if (expr.value === null) {
|
351
|
+
return new BasicEvaluatedExpression().setNull().setRange(expr.range);
|
352
|
+
}
|
353
|
+
if (expr.value instanceof RegExp) {
|
354
|
+
return new BasicEvaluatedExpression()
|
355
|
+
.setRegExp(expr.value)
|
356
|
+
.setRange(expr.range);
|
357
|
+
}
|
358
|
+
});
|
359
|
+
this.hooks.evaluate.for("NewExpression").tap("JavascriptParser", _expr => {
|
360
|
+
const expr = /** @type {NewExpressionNode} */ (_expr);
|
361
|
+
const callee = expr.callee;
|
362
|
+
if (
|
363
|
+
callee.type !== "Identifier" ||
|
364
|
+
callee.name !== "RegExp" ||
|
365
|
+
expr.arguments.length > 2 ||
|
366
|
+
this.getVariableInfo("RegExp") !== "RegExp"
|
367
|
+
)
|
368
|
+
return;
|
369
|
+
|
370
|
+
let regExp, flags;
|
371
|
+
const arg1 = expr.arguments[0];
|
372
|
+
|
373
|
+
if (arg1) {
|
374
|
+
if (arg1.type === "SpreadElement") return;
|
375
|
+
|
376
|
+
const evaluatedRegExp = this.evaluateExpression(arg1);
|
377
|
+
|
378
|
+
if (!evaluatedRegExp) return;
|
379
|
+
|
380
|
+
regExp = evaluatedRegExp.asString();
|
381
|
+
|
382
|
+
if (!regExp) return;
|
383
|
+
} else {
|
384
|
+
return new BasicEvaluatedExpression()
|
385
|
+
.setRegExp(new RegExp(""))
|
386
|
+
.setRange(expr.range);
|
387
|
+
}
|
388
|
+
|
389
|
+
const arg2 = expr.arguments[1];
|
390
|
+
|
391
|
+
if (arg2) {
|
392
|
+
if (arg2.type === "SpreadElement") return;
|
393
|
+
|
394
|
+
const evaluatedFlags = this.evaluateExpression(arg2);
|
395
|
+
|
396
|
+
if (!evaluatedFlags) return;
|
397
|
+
|
398
|
+
if (!evaluatedFlags.isUndefined()) {
|
399
|
+
flags = evaluatedFlags.asString();
|
400
|
+
|
401
|
+
if (
|
402
|
+
flags === undefined ||
|
403
|
+
!BasicEvaluatedExpression.isValidRegExpFlags(flags)
|
404
|
+
)
|
405
|
+
return;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
|
409
|
+
return new BasicEvaluatedExpression()
|
410
|
+
.setRegExp(flags ? new RegExp(regExp, flags) : new RegExp(regExp))
|
411
|
+
.setRange(expr.range);
|
412
|
+
});
|
413
|
+
this.hooks.evaluate
|
414
|
+
.for("LogicalExpression")
|
415
|
+
.tap("JavascriptParser", _expr => {
|
416
|
+
const expr = /** @type {LogicalExpressionNode} */ (_expr);
|
417
|
+
|
418
|
+
const left = this.evaluateExpression(expr.left);
|
419
|
+
if (!left) return;
|
420
|
+
let returnRight = false;
|
421
|
+
/** @type {boolean|undefined} */
|
422
|
+
let allowedRight;
|
423
|
+
if (expr.operator === "&&") {
|
424
|
+
const leftAsBool = left.asBool();
|
425
|
+
if (leftAsBool === false) return left.setRange(expr.range);
|
426
|
+
returnRight = leftAsBool === true;
|
427
|
+
allowedRight = false;
|
428
|
+
} else if (expr.operator === "||") {
|
429
|
+
const leftAsBool = left.asBool();
|
430
|
+
if (leftAsBool === true) return left.setRange(expr.range);
|
431
|
+
returnRight = leftAsBool === false;
|
432
|
+
allowedRight = true;
|
433
|
+
} else if (expr.operator === "??") {
|
434
|
+
const leftAsNullish = left.asNullish();
|
435
|
+
if (leftAsNullish === false) return left.setRange(expr.range);
|
436
|
+
if (leftAsNullish !== true) return;
|
437
|
+
returnRight = true;
|
438
|
+
} else return;
|
439
|
+
const right = this.evaluateExpression(expr.right);
|
440
|
+
if (!right) return;
|
441
|
+
if (returnRight) {
|
442
|
+
if (left.couldHaveSideEffects()) right.setSideEffects();
|
443
|
+
return right.setRange(expr.range);
|
444
|
+
}
|
445
|
+
|
446
|
+
const asBool = right.asBool();
|
447
|
+
|
448
|
+
if (allowedRight === true && asBool === true) {
|
449
|
+
return new BasicEvaluatedExpression()
|
450
|
+
.setRange(expr.range)
|
451
|
+
.setTruthy();
|
452
|
+
} else if (allowedRight === false && asBool === false) {
|
453
|
+
return new BasicEvaluatedExpression().setRange(expr.range).setFalsy();
|
454
|
+
}
|
455
|
+
});
|
456
|
+
|
457
|
+
const valueAsExpression = (value, expr, sideEffects) => {
|
458
|
+
switch (typeof value) {
|
459
|
+
case "boolean":
|
460
|
+
return new BasicEvaluatedExpression()
|
461
|
+
.setBoolean(value)
|
462
|
+
.setSideEffects(sideEffects)
|
463
|
+
.setRange(expr.range);
|
464
|
+
case "number":
|
465
|
+
return new BasicEvaluatedExpression()
|
466
|
+
.setNumber(value)
|
467
|
+
.setSideEffects(sideEffects)
|
468
|
+
.setRange(expr.range);
|
469
|
+
case "bigint":
|
470
|
+
return new BasicEvaluatedExpression()
|
471
|
+
.setBigInt(value)
|
472
|
+
.setSideEffects(sideEffects)
|
473
|
+
.setRange(expr.range);
|
474
|
+
case "string":
|
475
|
+
return new BasicEvaluatedExpression()
|
476
|
+
.setString(value)
|
477
|
+
.setSideEffects(sideEffects)
|
478
|
+
.setRange(expr.range);
|
479
|
+
}
|
480
|
+
};
|
481
|
+
|
482
|
+
this.hooks.evaluate
|
483
|
+
.for("BinaryExpression")
|
484
|
+
.tap("JavascriptParser", _expr => {
|
485
|
+
const expr = /** @type {BinaryExpressionNode} */ (_expr);
|
486
|
+
|
487
|
+
const handleConstOperation = fn => {
|
488
|
+
const left = this.evaluateExpression(expr.left);
|
489
|
+
if (!left || !left.isCompileTimeValue()) return;
|
490
|
+
|
491
|
+
const right = this.evaluateExpression(expr.right);
|
492
|
+
if (!right || !right.isCompileTimeValue()) return;
|
493
|
+
|
494
|
+
const result = fn(
|
495
|
+
left.asCompileTimeValue(),
|
496
|
+
right.asCompileTimeValue()
|
497
|
+
);
|
498
|
+
return valueAsExpression(
|
499
|
+
result,
|
500
|
+
expr,
|
501
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
502
|
+
);
|
503
|
+
};
|
504
|
+
|
505
|
+
const isAlwaysDifferent = (a, b) =>
|
506
|
+
(a === true && b === false) || (a === false && b === true);
|
507
|
+
|
508
|
+
const handleTemplateStringCompare = (left, right, res, eql) => {
|
509
|
+
const getPrefix = parts => {
|
510
|
+
let value = "";
|
511
|
+
for (const p of parts) {
|
512
|
+
const v = p.asString();
|
513
|
+
if (v !== undefined) value += v;
|
514
|
+
else break;
|
515
|
+
}
|
516
|
+
return value;
|
517
|
+
};
|
518
|
+
const getSuffix = parts => {
|
519
|
+
let value = "";
|
520
|
+
for (let i = parts.length - 1; i >= 0; i--) {
|
521
|
+
const v = parts[i].asString();
|
522
|
+
if (v !== undefined) value = v + value;
|
523
|
+
else break;
|
524
|
+
}
|
525
|
+
return value;
|
526
|
+
};
|
527
|
+
const leftPrefix = getPrefix(left.parts);
|
528
|
+
const rightPrefix = getPrefix(right.parts);
|
529
|
+
const leftSuffix = getSuffix(left.parts);
|
530
|
+
const rightSuffix = getSuffix(right.parts);
|
531
|
+
const lenPrefix = Math.min(leftPrefix.length, rightPrefix.length);
|
532
|
+
const lenSuffix = Math.min(leftSuffix.length, rightSuffix.length);
|
533
|
+
if (
|
534
|
+
leftPrefix.slice(0, lenPrefix) !==
|
535
|
+
rightPrefix.slice(0, lenPrefix) ||
|
536
|
+
leftSuffix.slice(-lenSuffix) !== rightSuffix.slice(-lenSuffix)
|
537
|
+
) {
|
538
|
+
return res
|
539
|
+
.setBoolean(!eql)
|
540
|
+
.setSideEffects(
|
541
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
542
|
+
);
|
543
|
+
}
|
544
|
+
};
|
545
|
+
|
546
|
+
const handleStrictEqualityComparison = eql => {
|
547
|
+
const left = this.evaluateExpression(expr.left);
|
548
|
+
if (!left) return;
|
549
|
+
const right = this.evaluateExpression(expr.right);
|
550
|
+
if (!right) return;
|
551
|
+
const res = new BasicEvaluatedExpression();
|
552
|
+
res.setRange(expr.range);
|
553
|
+
|
554
|
+
const leftConst = left.isCompileTimeValue();
|
555
|
+
const rightConst = right.isCompileTimeValue();
|
556
|
+
|
557
|
+
if (leftConst && rightConst) {
|
558
|
+
return res
|
559
|
+
.setBoolean(
|
560
|
+
eql ===
|
561
|
+
(left.asCompileTimeValue() === right.asCompileTimeValue())
|
562
|
+
)
|
563
|
+
.setSideEffects(
|
564
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
565
|
+
);
|
566
|
+
}
|
567
|
+
|
568
|
+
if (left.isArray() && right.isArray()) {
|
569
|
+
return res
|
570
|
+
.setBoolean(!eql)
|
571
|
+
.setSideEffects(
|
572
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
573
|
+
);
|
574
|
+
}
|
575
|
+
if (left.isTemplateString() && right.isTemplateString()) {
|
576
|
+
return handleTemplateStringCompare(left, right, res, eql);
|
577
|
+
}
|
578
|
+
|
579
|
+
const leftPrimitive = left.isPrimitiveType();
|
580
|
+
const rightPrimitive = right.isPrimitiveType();
|
581
|
+
|
582
|
+
if (
|
583
|
+
// Primitive !== Object or
|
584
|
+
// compile-time object types are never equal to something at runtime
|
585
|
+
(leftPrimitive === false &&
|
586
|
+
(leftConst || rightPrimitive === true)) ||
|
587
|
+
(rightPrimitive === false &&
|
588
|
+
(rightConst || leftPrimitive === true)) ||
|
589
|
+
// Different nullish or boolish status also means not equal
|
590
|
+
isAlwaysDifferent(left.asBool(), right.asBool()) ||
|
591
|
+
isAlwaysDifferent(left.asNullish(), right.asNullish())
|
592
|
+
) {
|
593
|
+
return res
|
594
|
+
.setBoolean(!eql)
|
595
|
+
.setSideEffects(
|
596
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
597
|
+
);
|
598
|
+
}
|
599
|
+
};
|
600
|
+
|
601
|
+
const handleAbstractEqualityComparison = eql => {
|
602
|
+
const left = this.evaluateExpression(expr.left);
|
603
|
+
if (!left) return;
|
604
|
+
const right = this.evaluateExpression(expr.right);
|
605
|
+
if (!right) return;
|
606
|
+
const res = new BasicEvaluatedExpression();
|
607
|
+
res.setRange(expr.range);
|
608
|
+
|
609
|
+
const leftConst = left.isCompileTimeValue();
|
610
|
+
const rightConst = right.isCompileTimeValue();
|
611
|
+
|
612
|
+
if (leftConst && rightConst) {
|
613
|
+
return res
|
614
|
+
.setBoolean(
|
615
|
+
eql ===
|
616
|
+
// eslint-disable-next-line eqeqeq
|
617
|
+
(left.asCompileTimeValue() == right.asCompileTimeValue())
|
618
|
+
)
|
619
|
+
.setSideEffects(
|
620
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
621
|
+
);
|
622
|
+
}
|
623
|
+
|
624
|
+
if (left.isArray() && right.isArray()) {
|
625
|
+
return res
|
626
|
+
.setBoolean(!eql)
|
627
|
+
.setSideEffects(
|
628
|
+
left.couldHaveSideEffects() || right.couldHaveSideEffects()
|
629
|
+
);
|
630
|
+
}
|
631
|
+
if (left.isTemplateString() && right.isTemplateString()) {
|
632
|
+
return handleTemplateStringCompare(left, right, res, eql);
|
633
|
+
}
|
634
|
+
};
|
635
|
+
|
636
|
+
if (expr.operator === "+") {
|
637
|
+
const left = this.evaluateExpression(expr.left);
|
638
|
+
if (!left) return;
|
639
|
+
const right = this.evaluateExpression(expr.right);
|
640
|
+
if (!right) return;
|
641
|
+
const res = new BasicEvaluatedExpression();
|
642
|
+
if (left.isString()) {
|
643
|
+
if (right.isString()) {
|
644
|
+
res.setString(left.string + right.string);
|
645
|
+
} else if (right.isNumber()) {
|
646
|
+
res.setString(left.string + right.number);
|
647
|
+
} else if (
|
648
|
+
right.isWrapped() &&
|
649
|
+
right.prefix &&
|
650
|
+
right.prefix.isString()
|
651
|
+
) {
|
652
|
+
// "left" + ("prefix" + inner + "postfix")
|
653
|
+
// => ("leftPrefix" + inner + "postfix")
|
654
|
+
res.setWrapped(
|
655
|
+
new BasicEvaluatedExpression()
|
656
|
+
.setString(left.string + right.prefix.string)
|
657
|
+
.setRange(joinRanges(left.range, right.prefix.range)),
|
658
|
+
right.postfix,
|
659
|
+
right.wrappedInnerExpressions
|
660
|
+
);
|
661
|
+
} else if (right.isWrapped()) {
|
662
|
+
// "left" + ([null] + inner + "postfix")
|
663
|
+
// => ("left" + inner + "postfix")
|
664
|
+
res.setWrapped(
|
665
|
+
left,
|
666
|
+
right.postfix,
|
667
|
+
right.wrappedInnerExpressions
|
668
|
+
);
|
669
|
+
} else {
|
670
|
+
// "left" + expr
|
671
|
+
// => ("left" + expr + "")
|
672
|
+
res.setWrapped(left, null, [right]);
|
673
|
+
}
|
674
|
+
} else if (left.isNumber()) {
|
675
|
+
if (right.isString()) {
|
676
|
+
res.setString(left.number + right.string);
|
677
|
+
} else if (right.isNumber()) {
|
678
|
+
res.setNumber(left.number + right.number);
|
679
|
+
} else {
|
680
|
+
return;
|
681
|
+
}
|
682
|
+
} else if (left.isBigInt()) {
|
683
|
+
if (right.isBigInt()) {
|
684
|
+
res.setBigInt(left.bigint + right.bigint);
|
685
|
+
}
|
686
|
+
} else if (left.isWrapped()) {
|
687
|
+
if (left.postfix && left.postfix.isString() && right.isString()) {
|
688
|
+
// ("prefix" + inner + "postfix") + "right"
|
689
|
+
// => ("prefix" + inner + "postfixRight")
|
690
|
+
res.setWrapped(
|
691
|
+
left.prefix,
|
692
|
+
new BasicEvaluatedExpression()
|
693
|
+
.setString(left.postfix.string + right.string)
|
694
|
+
.setRange(joinRanges(left.postfix.range, right.range)),
|
695
|
+
left.wrappedInnerExpressions
|
696
|
+
);
|
697
|
+
} else if (
|
698
|
+
left.postfix &&
|
699
|
+
left.postfix.isString() &&
|
700
|
+
right.isNumber()
|
701
|
+
) {
|
702
|
+
// ("prefix" + inner + "postfix") + 123
|
703
|
+
// => ("prefix" + inner + "postfix123")
|
704
|
+
res.setWrapped(
|
705
|
+
left.prefix,
|
706
|
+
new BasicEvaluatedExpression()
|
707
|
+
.setString(left.postfix.string + right.number)
|
708
|
+
.setRange(joinRanges(left.postfix.range, right.range)),
|
709
|
+
left.wrappedInnerExpressions
|
710
|
+
);
|
711
|
+
} else if (right.isString()) {
|
712
|
+
// ("prefix" + inner + [null]) + "right"
|
713
|
+
// => ("prefix" + inner + "right")
|
714
|
+
res.setWrapped(left.prefix, right, left.wrappedInnerExpressions);
|
715
|
+
} else if (right.isNumber()) {
|
716
|
+
// ("prefix" + inner + [null]) + 123
|
717
|
+
// => ("prefix" + inner + "123")
|
718
|
+
res.setWrapped(
|
719
|
+
left.prefix,
|
720
|
+
new BasicEvaluatedExpression()
|
721
|
+
.setString(right.number + "")
|
722
|
+
.setRange(right.range),
|
723
|
+
left.wrappedInnerExpressions
|
724
|
+
);
|
725
|
+
} else if (right.isWrapped()) {
|
726
|
+
// ("prefix1" + inner1 + "postfix1") + ("prefix2" + inner2 + "postfix2")
|
727
|
+
// ("prefix1" + inner1 + "postfix1" + "prefix2" + inner2 + "postfix2")
|
728
|
+
res.setWrapped(
|
729
|
+
left.prefix,
|
730
|
+
right.postfix,
|
731
|
+
left.wrappedInnerExpressions &&
|
732
|
+
right.wrappedInnerExpressions &&
|
733
|
+
left.wrappedInnerExpressions
|
734
|
+
.concat(left.postfix ? [left.postfix] : [])
|
735
|
+
.concat(right.prefix ? [right.prefix] : [])
|
736
|
+
.concat(right.wrappedInnerExpressions)
|
737
|
+
);
|
738
|
+
} else {
|
739
|
+
// ("prefix" + inner + postfix) + expr
|
740
|
+
// => ("prefix" + inner + postfix + expr + [null])
|
741
|
+
res.setWrapped(
|
742
|
+
left.prefix,
|
743
|
+
null,
|
744
|
+
left.wrappedInnerExpressions &&
|
745
|
+
left.wrappedInnerExpressions.concat(
|
746
|
+
left.postfix ? [left.postfix, right] : [right]
|
747
|
+
)
|
748
|
+
);
|
749
|
+
}
|
750
|
+
} else {
|
751
|
+
if (right.isString()) {
|
752
|
+
// left + "right"
|
753
|
+
// => ([null] + left + "right")
|
754
|
+
res.setWrapped(null, right, [left]);
|
755
|
+
} else if (right.isWrapped()) {
|
756
|
+
// left + (prefix + inner + "postfix")
|
757
|
+
// => ([null] + left + prefix + inner + "postfix")
|
758
|
+
res.setWrapped(
|
759
|
+
null,
|
760
|
+
right.postfix,
|
761
|
+
right.wrappedInnerExpressions &&
|
762
|
+
(right.prefix ? [left, right.prefix] : [left]).concat(
|
763
|
+
right.wrappedInnerExpressions
|
764
|
+
)
|
765
|
+
);
|
766
|
+
} else {
|
767
|
+
return;
|
768
|
+
}
|
769
|
+
}
|
770
|
+
if (left.couldHaveSideEffects() || right.couldHaveSideEffects())
|
771
|
+
res.setSideEffects();
|
772
|
+
res.setRange(expr.range);
|
773
|
+
return res;
|
774
|
+
} else if (expr.operator === "-") {
|
775
|
+
return handleConstOperation((l, r) => l - r);
|
776
|
+
} else if (expr.operator === "*") {
|
777
|
+
return handleConstOperation((l, r) => l * r);
|
778
|
+
} else if (expr.operator === "/") {
|
779
|
+
return handleConstOperation((l, r) => l / r);
|
780
|
+
} else if (expr.operator === "**") {
|
781
|
+
return handleConstOperation((l, r) => l ** r);
|
782
|
+
} else if (expr.operator === "===") {
|
783
|
+
return handleStrictEqualityComparison(true);
|
784
|
+
} else if (expr.operator === "==") {
|
785
|
+
return handleAbstractEqualityComparison(true);
|
786
|
+
} else if (expr.operator === "!==") {
|
787
|
+
return handleStrictEqualityComparison(false);
|
788
|
+
} else if (expr.operator === "!=") {
|
789
|
+
return handleAbstractEqualityComparison(false);
|
790
|
+
} else if (expr.operator === "&") {
|
791
|
+
return handleConstOperation((l, r) => l & r);
|
792
|
+
} else if (expr.operator === "|") {
|
793
|
+
return handleConstOperation((l, r) => l | r);
|
794
|
+
} else if (expr.operator === "^") {
|
795
|
+
return handleConstOperation((l, r) => l ^ r);
|
796
|
+
} else if (expr.operator === ">>>") {
|
797
|
+
return handleConstOperation((l, r) => l >>> r);
|
798
|
+
} else if (expr.operator === ">>") {
|
799
|
+
return handleConstOperation((l, r) => l >> r);
|
800
|
+
} else if (expr.operator === "<<") {
|
801
|
+
return handleConstOperation((l, r) => l << r);
|
802
|
+
} else if (expr.operator === "<") {
|
803
|
+
return handleConstOperation((l, r) => l < r);
|
804
|
+
} else if (expr.operator === ">") {
|
805
|
+
return handleConstOperation((l, r) => l > r);
|
806
|
+
} else if (expr.operator === "<=") {
|
807
|
+
return handleConstOperation((l, r) => l <= r);
|
808
|
+
} else if (expr.operator === ">=") {
|
809
|
+
return handleConstOperation((l, r) => l >= r);
|
810
|
+
}
|
811
|
+
});
|
812
|
+
this.hooks.evaluate
|
813
|
+
.for("UnaryExpression")
|
814
|
+
.tap("JavascriptParser", _expr => {
|
815
|
+
const expr = /** @type {UnaryExpressionNode} */ (_expr);
|
816
|
+
|
817
|
+
const handleConstOperation = fn => {
|
818
|
+
const argument = this.evaluateExpression(expr.argument);
|
819
|
+
if (!argument || !argument.isCompileTimeValue()) return;
|
820
|
+
const result = fn(argument.asCompileTimeValue());
|
821
|
+
return valueAsExpression(
|
822
|
+
result,
|
823
|
+
expr,
|
824
|
+
argument.couldHaveSideEffects()
|
825
|
+
);
|
826
|
+
};
|
827
|
+
|
828
|
+
if (expr.operator === "typeof") {
|
829
|
+
switch (expr.argument.type) {
|
830
|
+
case "Identifier": {
|
831
|
+
const res = this.callHooksForName(
|
832
|
+
this.hooks.evaluateTypeof,
|
833
|
+
expr.argument.name,
|
834
|
+
expr
|
835
|
+
);
|
836
|
+
if (res !== undefined) return res;
|
837
|
+
break;
|
838
|
+
}
|
839
|
+
case "MetaProperty": {
|
840
|
+
const res = this.callHooksForName(
|
841
|
+
this.hooks.evaluateTypeof,
|
842
|
+
getRootName(expr.argument),
|
843
|
+
expr
|
844
|
+
);
|
845
|
+
if (res !== undefined) return res;
|
846
|
+
break;
|
847
|
+
}
|
848
|
+
case "MemberExpression": {
|
849
|
+
const res = this.callHooksForExpression(
|
850
|
+
this.hooks.evaluateTypeof,
|
851
|
+
expr.argument,
|
852
|
+
expr
|
853
|
+
);
|
854
|
+
if (res !== undefined) return res;
|
855
|
+
break;
|
856
|
+
}
|
857
|
+
case "ChainExpression": {
|
858
|
+
const res = this.callHooksForExpression(
|
859
|
+
this.hooks.evaluateTypeof,
|
860
|
+
expr.argument.expression,
|
861
|
+
expr
|
862
|
+
);
|
863
|
+
if (res !== undefined) return res;
|
864
|
+
break;
|
865
|
+
}
|
866
|
+
case "FunctionExpression": {
|
867
|
+
return new BasicEvaluatedExpression()
|
868
|
+
.setString("function")
|
869
|
+
.setRange(expr.range);
|
870
|
+
}
|
871
|
+
}
|
872
|
+
const arg = this.evaluateExpression(expr.argument);
|
873
|
+
if (arg.isUnknown()) return;
|
874
|
+
if (arg.isString()) {
|
875
|
+
return new BasicEvaluatedExpression()
|
876
|
+
.setString("string")
|
877
|
+
.setRange(expr.range);
|
878
|
+
}
|
879
|
+
if (arg.isWrapped()) {
|
880
|
+
return new BasicEvaluatedExpression()
|
881
|
+
.setString("string")
|
882
|
+
.setSideEffects()
|
883
|
+
.setRange(expr.range);
|
884
|
+
}
|
885
|
+
if (arg.isUndefined()) {
|
886
|
+
return new BasicEvaluatedExpression()
|
887
|
+
.setString("undefined")
|
888
|
+
.setRange(expr.range);
|
889
|
+
}
|
890
|
+
if (arg.isNumber()) {
|
891
|
+
return new BasicEvaluatedExpression()
|
892
|
+
.setString("number")
|
893
|
+
.setRange(expr.range);
|
894
|
+
}
|
895
|
+
if (arg.isBigInt()) {
|
896
|
+
return new BasicEvaluatedExpression()
|
897
|
+
.setString("bigint")
|
898
|
+
.setRange(expr.range);
|
899
|
+
}
|
900
|
+
if (arg.isBoolean()) {
|
901
|
+
return new BasicEvaluatedExpression()
|
902
|
+
.setString("boolean")
|
903
|
+
.setRange(expr.range);
|
904
|
+
}
|
905
|
+
if (arg.isConstArray() || arg.isRegExp() || arg.isNull()) {
|
906
|
+
return new BasicEvaluatedExpression()
|
907
|
+
.setString("object")
|
908
|
+
.setRange(expr.range);
|
909
|
+
}
|
910
|
+
if (arg.isArray()) {
|
911
|
+
return new BasicEvaluatedExpression()
|
912
|
+
.setString("object")
|
913
|
+
.setSideEffects(arg.couldHaveSideEffects())
|
914
|
+
.setRange(expr.range);
|
915
|
+
}
|
916
|
+
} else if (expr.operator === "!") {
|
917
|
+
const argument = this.evaluateExpression(expr.argument);
|
918
|
+
if (!argument) return;
|
919
|
+
const bool = argument.asBool();
|
920
|
+
if (typeof bool !== "boolean") return;
|
921
|
+
return new BasicEvaluatedExpression()
|
922
|
+
.setBoolean(!bool)
|
923
|
+
.setSideEffects(argument.couldHaveSideEffects())
|
924
|
+
.setRange(expr.range);
|
925
|
+
} else if (expr.operator === "~") {
|
926
|
+
return handleConstOperation(v => ~v);
|
927
|
+
} else if (expr.operator === "+") {
|
928
|
+
return handleConstOperation(v => +v);
|
929
|
+
} else if (expr.operator === "-") {
|
930
|
+
return handleConstOperation(v => -v);
|
931
|
+
}
|
932
|
+
});
|
933
|
+
this.hooks.evaluateTypeof.for("undefined").tap("JavascriptParser", expr => {
|
934
|
+
return new BasicEvaluatedExpression()
|
935
|
+
.setString("undefined")
|
936
|
+
.setRange(expr.range);
|
937
|
+
});
|
938
|
+
this.hooks.evaluate.for("Identifier").tap("JavascriptParser", expr => {
|
939
|
+
if (/** @type {IdentifierNode} */ (expr).name === "undefined") {
|
940
|
+
return new BasicEvaluatedExpression()
|
941
|
+
.setUndefined()
|
942
|
+
.setRange(expr.range);
|
943
|
+
}
|
944
|
+
});
|
945
|
+
/**
|
946
|
+
* @param {string} exprType expression type name
|
947
|
+
* @param {function(ExpressionNode): GetInfoResult | undefined} getInfo get info
|
948
|
+
* @returns {void}
|
949
|
+
*/
|
950
|
+
const tapEvaluateWithVariableInfo = (exprType, getInfo) => {
|
951
|
+
/** @type {ExpressionNode | undefined} */
|
952
|
+
let cachedExpression = undefined;
|
953
|
+
/** @type {GetInfoResult | undefined} */
|
954
|
+
let cachedInfo = undefined;
|
955
|
+
this.hooks.evaluate.for(exprType).tap("JavascriptParser", expr => {
|
956
|
+
const expression = /** @type {MemberExpressionNode} */ (expr);
|
957
|
+
|
958
|
+
const info = getInfo(expr);
|
959
|
+
if (info !== undefined) {
|
960
|
+
return this.callHooksForInfoWithFallback(
|
961
|
+
this.hooks.evaluateIdentifier,
|
962
|
+
info.name,
|
963
|
+
name => {
|
964
|
+
cachedExpression = expression;
|
965
|
+
cachedInfo = info;
|
966
|
+
},
|
967
|
+
name => {
|
968
|
+
const hook = this.hooks.evaluateDefinedIdentifier.get(name);
|
969
|
+
if (hook !== undefined) {
|
970
|
+
return hook.call(expression);
|
971
|
+
}
|
972
|
+
},
|
973
|
+
expression
|
974
|
+
);
|
975
|
+
}
|
976
|
+
});
|
977
|
+
this.hooks.evaluate
|
978
|
+
.for(exprType)
|
979
|
+
.tap({ name: "JavascriptParser", stage: 100 }, expr => {
|
980
|
+
const info = cachedExpression === expr ? cachedInfo : getInfo(expr);
|
981
|
+
if (info !== undefined) {
|
982
|
+
return new BasicEvaluatedExpression()
|
983
|
+
.setIdentifier(info.name, info.rootInfo, info.getMembers)
|
984
|
+
.setRange(expr.range);
|
985
|
+
}
|
986
|
+
});
|
987
|
+
this.hooks.finish.tap("JavascriptParser", () => {
|
988
|
+
// Cleanup for GC
|
989
|
+
cachedExpression = cachedInfo = undefined;
|
990
|
+
});
|
991
|
+
};
|
992
|
+
tapEvaluateWithVariableInfo("Identifier", expr => {
|
993
|
+
const info = this.getVariableInfo(
|
994
|
+
/** @type {IdentifierNode} */ (expr).name
|
995
|
+
);
|
996
|
+
if (
|
997
|
+
typeof info === "string" ||
|
998
|
+
(info instanceof VariableInfo && typeof info.freeName === "string")
|
999
|
+
) {
|
1000
|
+
return { name: info, rootInfo: info, getMembers: () => [] };
|
1001
|
+
}
|
1002
|
+
});
|
1003
|
+
tapEvaluateWithVariableInfo("ThisExpression", expr => {
|
1004
|
+
const info = this.getVariableInfo("this");
|
1005
|
+
if (
|
1006
|
+
typeof info === "string" ||
|
1007
|
+
(info instanceof VariableInfo && typeof info.freeName === "string")
|
1008
|
+
) {
|
1009
|
+
return { name: info, rootInfo: info, getMembers: () => [] };
|
1010
|
+
}
|
1011
|
+
});
|
1012
|
+
this.hooks.evaluate.for("MetaProperty").tap("JavascriptParser", expr => {
|
1013
|
+
const metaProperty = /** @type {MetaPropertyNode} */ (expr);
|
1014
|
+
|
1015
|
+
return this.callHooksForName(
|
1016
|
+
this.hooks.evaluateIdentifier,
|
1017
|
+
getRootName(expr),
|
1018
|
+
metaProperty
|
1019
|
+
);
|
1020
|
+
});
|
1021
|
+
tapEvaluateWithVariableInfo("MemberExpression", expr =>
|
1022
|
+
this.getMemberExpressionInfo(
|
1023
|
+
/** @type {MemberExpressionNode} */ (expr),
|
1024
|
+
ALLOWED_MEMBER_TYPES_EXPRESSION
|
1025
|
+
)
|
1026
|
+
);
|
1027
|
+
|
1028
|
+
this.hooks.evaluate.for("CallExpression").tap("JavascriptParser", _expr => {
|
1029
|
+
const expr = /** @type {CallExpressionNode} */ (_expr);
|
1030
|
+
if (
|
1031
|
+
expr.callee.type !== "MemberExpression" ||
|
1032
|
+
expr.callee.property.type !==
|
1033
|
+
(expr.callee.computed ? "Literal" : "Identifier")
|
1034
|
+
) {
|
1035
|
+
return;
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
// type Super also possible here
|
1039
|
+
const param = this.evaluateExpression(
|
1040
|
+
/** @type {ExpressionNode} */ (expr.callee.object)
|
1041
|
+
);
|
1042
|
+
if (!param) return;
|
1043
|
+
const property =
|
1044
|
+
expr.callee.property.type === "Literal"
|
1045
|
+
? `${expr.callee.property.value}`
|
1046
|
+
: expr.callee.property.name;
|
1047
|
+
const hook = this.hooks.evaluateCallExpressionMember.get(property);
|
1048
|
+
if (hook !== undefined) {
|
1049
|
+
return hook.call(expr, param);
|
1050
|
+
}
|
1051
|
+
});
|
1052
|
+
this.hooks.evaluateCallExpressionMember
|
1053
|
+
.for("indexOf")
|
1054
|
+
.tap("JavascriptParser", (expr, param) => {
|
1055
|
+
if (!param.isString()) return;
|
1056
|
+
if (expr.arguments.length === 0) return;
|
1057
|
+
const [arg1, arg2] = expr.arguments;
|
1058
|
+
if (arg1.type === "SpreadElement") return;
|
1059
|
+
const arg1Eval = this.evaluateExpression(arg1);
|
1060
|
+
if (!arg1Eval.isString()) return;
|
1061
|
+
const arg1Value = arg1Eval.string;
|
1062
|
+
|
1063
|
+
let result;
|
1064
|
+
if (arg2) {
|
1065
|
+
if (arg2.type === "SpreadElement") return;
|
1066
|
+
const arg2Eval = this.evaluateExpression(arg2);
|
1067
|
+
if (!arg2Eval.isNumber()) return;
|
1068
|
+
result = param.string.indexOf(arg1Value, arg2Eval.number);
|
1069
|
+
} else {
|
1070
|
+
result = param.string.indexOf(arg1Value);
|
1071
|
+
}
|
1072
|
+
return new BasicEvaluatedExpression()
|
1073
|
+
.setNumber(result)
|
1074
|
+
.setSideEffects(param.couldHaveSideEffects())
|
1075
|
+
.setRange(expr.range);
|
1076
|
+
});
|
1077
|
+
this.hooks.evaluateCallExpressionMember
|
1078
|
+
.for("replace")
|
1079
|
+
.tap("JavascriptParser", (expr, param) => {
|
1080
|
+
if (!param.isString()) return;
|
1081
|
+
if (expr.arguments.length !== 2) return;
|
1082
|
+
if (expr.arguments[0].type === "SpreadElement") return;
|
1083
|
+
if (expr.arguments[1].type === "SpreadElement") return;
|
1084
|
+
let arg1 = this.evaluateExpression(expr.arguments[0]);
|
1085
|
+
let arg2 = this.evaluateExpression(expr.arguments[1]);
|
1086
|
+
if (!arg1.isString() && !arg1.isRegExp()) return;
|
1087
|
+
const arg1Value = arg1.regExp || arg1.string;
|
1088
|
+
if (!arg2.isString()) return;
|
1089
|
+
const arg2Value = arg2.string;
|
1090
|
+
return new BasicEvaluatedExpression()
|
1091
|
+
.setString(param.string.replace(arg1Value, arg2Value))
|
1092
|
+
.setSideEffects(param.couldHaveSideEffects())
|
1093
|
+
.setRange(expr.range);
|
1094
|
+
});
|
1095
|
+
["substr", "substring", "slice"].forEach(fn => {
|
1096
|
+
this.hooks.evaluateCallExpressionMember
|
1097
|
+
.for(fn)
|
1098
|
+
.tap("JavascriptParser", (expr, param) => {
|
1099
|
+
if (!param.isString()) return;
|
1100
|
+
let arg1;
|
1101
|
+
let result,
|
1102
|
+
str = param.string;
|
1103
|
+
switch (expr.arguments.length) {
|
1104
|
+
case 1:
|
1105
|
+
if (expr.arguments[0].type === "SpreadElement") return;
|
1106
|
+
arg1 = this.evaluateExpression(expr.arguments[0]);
|
1107
|
+
if (!arg1.isNumber()) return;
|
1108
|
+
result = str[fn](arg1.number);
|
1109
|
+
break;
|
1110
|
+
case 2: {
|
1111
|
+
if (expr.arguments[0].type === "SpreadElement") return;
|
1112
|
+
if (expr.arguments[1].type === "SpreadElement") return;
|
1113
|
+
arg1 = this.evaluateExpression(expr.arguments[0]);
|
1114
|
+
const arg2 = this.evaluateExpression(expr.arguments[1]);
|
1115
|
+
if (!arg1.isNumber()) return;
|
1116
|
+
if (!arg2.isNumber()) return;
|
1117
|
+
result = str[fn](arg1.number, arg2.number);
|
1118
|
+
break;
|
1119
|
+
}
|
1120
|
+
default:
|
1121
|
+
return;
|
1122
|
+
}
|
1123
|
+
return new BasicEvaluatedExpression()
|
1124
|
+
.setString(result)
|
1125
|
+
.setSideEffects(param.couldHaveSideEffects())
|
1126
|
+
.setRange(expr.range);
|
1127
|
+
});
|
1128
|
+
});
|
1129
|
+
|
1130
|
+
/**
|
1131
|
+
* @param {"cooked" | "raw"} kind kind of values to get
|
1132
|
+
* @param {TemplateLiteralNode} templateLiteralExpr TemplateLiteral expr
|
1133
|
+
* @returns {{quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[]}} Simplified template
|
1134
|
+
*/
|
1135
|
+
const getSimplifiedTemplateResult = (kind, templateLiteralExpr) => {
|
1136
|
+
/** @type {BasicEvaluatedExpression[]} */
|
1137
|
+
const quasis = [];
|
1138
|
+
/** @type {BasicEvaluatedExpression[]} */
|
1139
|
+
const parts = [];
|
1140
|
+
|
1141
|
+
for (let i = 0; i < templateLiteralExpr.quasis.length; i++) {
|
1142
|
+
const quasiExpr = templateLiteralExpr.quasis[i];
|
1143
|
+
const quasi = quasiExpr.value[kind];
|
1144
|
+
|
1145
|
+
if (i > 0) {
|
1146
|
+
const prevExpr = parts[parts.length - 1];
|
1147
|
+
const expr = this.evaluateExpression(
|
1148
|
+
templateLiteralExpr.expressions[i - 1]
|
1149
|
+
);
|
1150
|
+
const exprAsString = expr.asString();
|
1151
|
+
if (
|
1152
|
+
typeof exprAsString === "string" &&
|
1153
|
+
!expr.couldHaveSideEffects()
|
1154
|
+
) {
|
1155
|
+
// We can merge quasi + expr + quasi when expr
|
1156
|
+
// is a const string
|
1157
|
+
|
1158
|
+
prevExpr.setString(prevExpr.string + exprAsString + quasi);
|
1159
|
+
prevExpr.setRange([prevExpr.range[0], quasiExpr.range[1]]);
|
1160
|
+
// We unset the expression as it doesn't match to a single expression
|
1161
|
+
prevExpr.setExpression(undefined);
|
1162
|
+
continue;
|
1163
|
+
}
|
1164
|
+
parts.push(expr);
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
const part = new BasicEvaluatedExpression()
|
1168
|
+
.setString(quasi)
|
1169
|
+
.setRange(quasiExpr.range)
|
1170
|
+
.setExpression(quasiExpr);
|
1171
|
+
quasis.push(part);
|
1172
|
+
parts.push(part);
|
1173
|
+
}
|
1174
|
+
return {
|
1175
|
+
quasis,
|
1176
|
+
parts
|
1177
|
+
};
|
1178
|
+
};
|
1179
|
+
|
1180
|
+
this.hooks.evaluate
|
1181
|
+
.for("TemplateLiteral")
|
1182
|
+
.tap("JavascriptParser", _node => {
|
1183
|
+
const node = /** @type {TemplateLiteralNode} */ (_node);
|
1184
|
+
|
1185
|
+
const { quasis, parts } = getSimplifiedTemplateResult("cooked", node);
|
1186
|
+
if (parts.length === 1) {
|
1187
|
+
return parts[0].setRange(node.range);
|
1188
|
+
}
|
1189
|
+
return new BasicEvaluatedExpression()
|
1190
|
+
.setTemplateString(quasis, parts, "cooked")
|
1191
|
+
.setRange(node.range);
|
1192
|
+
});
|
1193
|
+
this.hooks.evaluate
|
1194
|
+
.for("TaggedTemplateExpression")
|
1195
|
+
.tap("JavascriptParser", _node => {
|
1196
|
+
const node = /** @type {TaggedTemplateExpressionNode} */ (_node);
|
1197
|
+
const tag = this.evaluateExpression(node.tag);
|
1198
|
+
|
1199
|
+
if (tag.isIdentifier() && tag.identifier === "String.raw") {
|
1200
|
+
const { quasis, parts } = getSimplifiedTemplateResult(
|
1201
|
+
"raw",
|
1202
|
+
node.quasi
|
1203
|
+
);
|
1204
|
+
return new BasicEvaluatedExpression()
|
1205
|
+
.setTemplateString(quasis, parts, "raw")
|
1206
|
+
.setRange(node.range);
|
1207
|
+
}
|
1208
|
+
});
|
1209
|
+
|
1210
|
+
this.hooks.evaluateCallExpressionMember
|
1211
|
+
.for("concat")
|
1212
|
+
.tap("JavascriptParser", (expr, param) => {
|
1213
|
+
if (!param.isString() && !param.isWrapped()) return;
|
1214
|
+
|
1215
|
+
let stringSuffix = null;
|
1216
|
+
let hasUnknownParams = false;
|
1217
|
+
const innerExpressions = [];
|
1218
|
+
for (let i = expr.arguments.length - 1; i >= 0; i--) {
|
1219
|
+
const arg = expr.arguments[i];
|
1220
|
+
if (arg.type === "SpreadElement") return;
|
1221
|
+
const argExpr = this.evaluateExpression(arg);
|
1222
|
+
if (
|
1223
|
+
hasUnknownParams ||
|
1224
|
+
(!argExpr.isString() && !argExpr.isNumber())
|
1225
|
+
) {
|
1226
|
+
hasUnknownParams = true;
|
1227
|
+
innerExpressions.push(argExpr);
|
1228
|
+
continue;
|
1229
|
+
}
|
1230
|
+
|
1231
|
+
const value = argExpr.isString()
|
1232
|
+
? argExpr.string
|
1233
|
+
: "" + argExpr.number;
|
1234
|
+
|
1235
|
+
const newString = value + (stringSuffix ? stringSuffix.string : "");
|
1236
|
+
const newRange = [
|
1237
|
+
argExpr.range[0],
|
1238
|
+
(stringSuffix || argExpr).range[1]
|
1239
|
+
];
|
1240
|
+
stringSuffix = new BasicEvaluatedExpression()
|
1241
|
+
.setString(newString)
|
1242
|
+
.setSideEffects(
|
1243
|
+
(stringSuffix && stringSuffix.couldHaveSideEffects()) ||
|
1244
|
+
argExpr.couldHaveSideEffects()
|
1245
|
+
)
|
1246
|
+
.setRange(newRange);
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
if (hasUnknownParams) {
|
1250
|
+
const prefix = param.isString() ? param : param.prefix;
|
1251
|
+
const inner =
|
1252
|
+
param.isWrapped() && param.wrappedInnerExpressions
|
1253
|
+
? param.wrappedInnerExpressions.concat(innerExpressions.reverse())
|
1254
|
+
: innerExpressions.reverse();
|
1255
|
+
return new BasicEvaluatedExpression()
|
1256
|
+
.setWrapped(prefix, stringSuffix, inner)
|
1257
|
+
.setRange(expr.range);
|
1258
|
+
} else if (param.isWrapped()) {
|
1259
|
+
const postfix = stringSuffix || param.postfix;
|
1260
|
+
const inner = param.wrappedInnerExpressions
|
1261
|
+
? param.wrappedInnerExpressions.concat(innerExpressions.reverse())
|
1262
|
+
: innerExpressions.reverse();
|
1263
|
+
return new BasicEvaluatedExpression()
|
1264
|
+
.setWrapped(param.prefix, postfix, inner)
|
1265
|
+
.setRange(expr.range);
|
1266
|
+
} else {
|
1267
|
+
const newString =
|
1268
|
+
param.string + (stringSuffix ? stringSuffix.string : "");
|
1269
|
+
return new BasicEvaluatedExpression()
|
1270
|
+
.setString(newString)
|
1271
|
+
.setSideEffects(
|
1272
|
+
(stringSuffix && stringSuffix.couldHaveSideEffects()) ||
|
1273
|
+
param.couldHaveSideEffects()
|
1274
|
+
)
|
1275
|
+
.setRange(expr.range);
|
1276
|
+
}
|
1277
|
+
});
|
1278
|
+
this.hooks.evaluateCallExpressionMember
|
1279
|
+
.for("split")
|
1280
|
+
.tap("JavascriptParser", (expr, param) => {
|
1281
|
+
if (!param.isString()) return;
|
1282
|
+
if (expr.arguments.length !== 1) return;
|
1283
|
+
if (expr.arguments[0].type === "SpreadElement") return;
|
1284
|
+
let result;
|
1285
|
+
const arg = this.evaluateExpression(expr.arguments[0]);
|
1286
|
+
if (arg.isString()) {
|
1287
|
+
result = param.string.split(arg.string);
|
1288
|
+
} else if (arg.isRegExp()) {
|
1289
|
+
result = param.string.split(arg.regExp);
|
1290
|
+
} else {
|
1291
|
+
return;
|
1292
|
+
}
|
1293
|
+
return new BasicEvaluatedExpression()
|
1294
|
+
.setArray(result)
|
1295
|
+
.setSideEffects(param.couldHaveSideEffects())
|
1296
|
+
.setRange(expr.range);
|
1297
|
+
});
|
1298
|
+
this.hooks.evaluate
|
1299
|
+
.for("ConditionalExpression")
|
1300
|
+
.tap("JavascriptParser", _expr => {
|
1301
|
+
const expr = /** @type {ConditionalExpressionNode} */ (_expr);
|
1302
|
+
|
1303
|
+
const condition = this.evaluateExpression(expr.test);
|
1304
|
+
const conditionValue = condition.asBool();
|
1305
|
+
let res;
|
1306
|
+
if (conditionValue === undefined) {
|
1307
|
+
const consequent = this.evaluateExpression(expr.consequent);
|
1308
|
+
const alternate = this.evaluateExpression(expr.alternate);
|
1309
|
+
if (!consequent || !alternate) return;
|
1310
|
+
res = new BasicEvaluatedExpression();
|
1311
|
+
if (consequent.isConditional()) {
|
1312
|
+
res.setOptions(consequent.options);
|
1313
|
+
} else {
|
1314
|
+
res.setOptions([consequent]);
|
1315
|
+
}
|
1316
|
+
if (alternate.isConditional()) {
|
1317
|
+
res.addOptions(alternate.options);
|
1318
|
+
} else {
|
1319
|
+
res.addOptions([alternate]);
|
1320
|
+
}
|
1321
|
+
} else {
|
1322
|
+
res = this.evaluateExpression(
|
1323
|
+
conditionValue ? expr.consequent : expr.alternate
|
1324
|
+
);
|
1325
|
+
if (condition.couldHaveSideEffects()) res.setSideEffects();
|
1326
|
+
}
|
1327
|
+
res.setRange(expr.range);
|
1328
|
+
return res;
|
1329
|
+
});
|
1330
|
+
this.hooks.evaluate
|
1331
|
+
.for("ArrayExpression")
|
1332
|
+
.tap("JavascriptParser", _expr => {
|
1333
|
+
const expr = /** @type {ArrayExpressionNode} */ (_expr);
|
1334
|
+
|
1335
|
+
const items = expr.elements.map(element => {
|
1336
|
+
return (
|
1337
|
+
element !== null &&
|
1338
|
+
element.type !== "SpreadElement" &&
|
1339
|
+
this.evaluateExpression(element)
|
1340
|
+
);
|
1341
|
+
});
|
1342
|
+
if (!items.every(Boolean)) return;
|
1343
|
+
return new BasicEvaluatedExpression()
|
1344
|
+
.setItems(items)
|
1345
|
+
.setRange(expr.range);
|
1346
|
+
});
|
1347
|
+
this.hooks.evaluate
|
1348
|
+
.for("ChainExpression")
|
1349
|
+
.tap("JavascriptParser", _expr => {
|
1350
|
+
const expr = /** @type {ChainExpressionNode} */ (_expr);
|
1351
|
+
/** @type {ExpressionNode[]} */
|
1352
|
+
const optionalExpressionsStack = [];
|
1353
|
+
/** @type {ExpressionNode|SuperNode} */
|
1354
|
+
let next = expr.expression;
|
1355
|
+
|
1356
|
+
while (
|
1357
|
+
next.type === "MemberExpression" ||
|
1358
|
+
next.type === "CallExpression"
|
1359
|
+
) {
|
1360
|
+
if (next.type === "MemberExpression") {
|
1361
|
+
if (next.optional) {
|
1362
|
+
// SuperNode can not be optional
|
1363
|
+
optionalExpressionsStack.push(
|
1364
|
+
/** @type {ExpressionNode} */ (next.object)
|
1365
|
+
);
|
1366
|
+
}
|
1367
|
+
next = next.object;
|
1368
|
+
} else {
|
1369
|
+
if (next.optional) {
|
1370
|
+
// SuperNode can not be optional
|
1371
|
+
optionalExpressionsStack.push(
|
1372
|
+
/** @type {ExpressionNode} */ (next.callee)
|
1373
|
+
);
|
1374
|
+
}
|
1375
|
+
next = next.callee;
|
1376
|
+
}
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
while (optionalExpressionsStack.length > 0) {
|
1380
|
+
const expression = optionalExpressionsStack.pop();
|
1381
|
+
const evaluated = this.evaluateExpression(expression);
|
1382
|
+
|
1383
|
+
if (evaluated && evaluated.asNullish()) {
|
1384
|
+
return evaluated.setRange(_expr.range);
|
1385
|
+
}
|
1386
|
+
}
|
1387
|
+
return this.evaluateExpression(expr.expression);
|
1388
|
+
});
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
getRenameIdentifier(expr) {
|
1392
|
+
const result = this.evaluateExpression(expr);
|
1393
|
+
if (result && result.isIdentifier()) {
|
1394
|
+
return result.identifier;
|
1395
|
+
}
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
/**
|
1399
|
+
* @param {ClassExpressionNode | ClassDeclarationNode} classy a class node
|
1400
|
+
* @returns {void}
|
1401
|
+
*/
|
1402
|
+
walkClass(classy) {
|
1403
|
+
if (classy.superClass) {
|
1404
|
+
if (!this.hooks.classExtendsExpression.call(classy.superClass, classy)) {
|
1405
|
+
this.walkExpression(classy.superClass);
|
1406
|
+
}
|
1407
|
+
}
|
1408
|
+
if (classy.body && classy.body.type === "ClassBody") {
|
1409
|
+
for (const classElement of /** @type {TODO} */ (classy.body.body)) {
|
1410
|
+
if (!this.hooks.classBodyElement.call(classElement, classy)) {
|
1411
|
+
if (classElement.computed && classElement.key) {
|
1412
|
+
this.walkExpression(classElement.key);
|
1413
|
+
}
|
1414
|
+
if (classElement.value) {
|
1415
|
+
if (
|
1416
|
+
!this.hooks.classBodyValue.call(
|
1417
|
+
classElement.value,
|
1418
|
+
classElement,
|
1419
|
+
classy
|
1420
|
+
)
|
1421
|
+
) {
|
1422
|
+
const wasTopLevel = this.scope.topLevelScope;
|
1423
|
+
this.scope.topLevelScope = false;
|
1424
|
+
this.walkExpression(classElement.value);
|
1425
|
+
this.scope.topLevelScope = wasTopLevel;
|
1426
|
+
}
|
1427
|
+
}
|
1428
|
+
}
|
1429
|
+
}
|
1430
|
+
}
|
1431
|
+
}
|
1432
|
+
|
1433
|
+
// Pre walking iterates the scope for variable declarations
|
1434
|
+
preWalkStatements(statements) {
|
1435
|
+
for (let index = 0, len = statements.length; index < len; index++) {
|
1436
|
+
const statement = statements[index];
|
1437
|
+
this.preWalkStatement(statement);
|
1438
|
+
}
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
// Block pre walking iterates the scope for block variable declarations
|
1442
|
+
blockPreWalkStatements(statements) {
|
1443
|
+
for (let index = 0, len = statements.length; index < len; index++) {
|
1444
|
+
const statement = statements[index];
|
1445
|
+
this.blockPreWalkStatement(statement);
|
1446
|
+
}
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
// Walking iterates the statements and expressions and processes them
|
1450
|
+
walkStatements(statements) {
|
1451
|
+
for (let index = 0, len = statements.length; index < len; index++) {
|
1452
|
+
const statement = statements[index];
|
1453
|
+
this.walkStatement(statement);
|
1454
|
+
}
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
preWalkStatement(statement) {
|
1458
|
+
this.statementPath.push(statement);
|
1459
|
+
if (this.hooks.preStatement.call(statement)) {
|
1460
|
+
this.prevStatement = this.statementPath.pop();
|
1461
|
+
return;
|
1462
|
+
}
|
1463
|
+
switch (statement.type) {
|
1464
|
+
case "BlockStatement":
|
1465
|
+
this.preWalkBlockStatement(statement);
|
1466
|
+
break;
|
1467
|
+
case "DoWhileStatement":
|
1468
|
+
this.preWalkDoWhileStatement(statement);
|
1469
|
+
break;
|
1470
|
+
case "ForInStatement":
|
1471
|
+
this.preWalkForInStatement(statement);
|
1472
|
+
break;
|
1473
|
+
case "ForOfStatement":
|
1474
|
+
this.preWalkForOfStatement(statement);
|
1475
|
+
break;
|
1476
|
+
case "ForStatement":
|
1477
|
+
this.preWalkForStatement(statement);
|
1478
|
+
break;
|
1479
|
+
case "FunctionDeclaration":
|
1480
|
+
this.preWalkFunctionDeclaration(statement);
|
1481
|
+
break;
|
1482
|
+
case "IfStatement":
|
1483
|
+
this.preWalkIfStatement(statement);
|
1484
|
+
break;
|
1485
|
+
case "LabeledStatement":
|
1486
|
+
this.preWalkLabeledStatement(statement);
|
1487
|
+
break;
|
1488
|
+
case "SwitchStatement":
|
1489
|
+
this.preWalkSwitchStatement(statement);
|
1490
|
+
break;
|
1491
|
+
case "TryStatement":
|
1492
|
+
this.preWalkTryStatement(statement);
|
1493
|
+
break;
|
1494
|
+
case "VariableDeclaration":
|
1495
|
+
this.preWalkVariableDeclaration(statement);
|
1496
|
+
break;
|
1497
|
+
case "WhileStatement":
|
1498
|
+
this.preWalkWhileStatement(statement);
|
1499
|
+
break;
|
1500
|
+
case "WithStatement":
|
1501
|
+
this.preWalkWithStatement(statement);
|
1502
|
+
break;
|
1503
|
+
}
|
1504
|
+
this.prevStatement = this.statementPath.pop();
|
1505
|
+
}
|
1506
|
+
|
1507
|
+
blockPreWalkStatement(statement) {
|
1508
|
+
this.statementPath.push(statement);
|
1509
|
+
if (this.hooks.blockPreStatement.call(statement)) {
|
1510
|
+
this.prevStatement = this.statementPath.pop();
|
1511
|
+
return;
|
1512
|
+
}
|
1513
|
+
switch (statement.type) {
|
1514
|
+
case "ImportDeclaration":
|
1515
|
+
this.blockPreWalkImportDeclaration(statement);
|
1516
|
+
break;
|
1517
|
+
case "ExportAllDeclaration":
|
1518
|
+
this.blockPreWalkExportAllDeclaration(statement);
|
1519
|
+
break;
|
1520
|
+
case "ExportDefaultDeclaration":
|
1521
|
+
this.blockPreWalkExportDefaultDeclaration(statement);
|
1522
|
+
break;
|
1523
|
+
case "ExportNamedDeclaration":
|
1524
|
+
this.blockPreWalkExportNamedDeclaration(statement);
|
1525
|
+
break;
|
1526
|
+
case "VariableDeclaration":
|
1527
|
+
this.blockPreWalkVariableDeclaration(statement);
|
1528
|
+
break;
|
1529
|
+
case "ClassDeclaration":
|
1530
|
+
this.blockPreWalkClassDeclaration(statement);
|
1531
|
+
break;
|
1532
|
+
}
|
1533
|
+
this.prevStatement = this.statementPath.pop();
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
walkStatement(statement) {
|
1537
|
+
this.statementPath.push(statement);
|
1538
|
+
if (this.hooks.statement.call(statement) !== undefined) {
|
1539
|
+
this.prevStatement = this.statementPath.pop();
|
1540
|
+
return;
|
1541
|
+
}
|
1542
|
+
switch (statement.type) {
|
1543
|
+
case "BlockStatement":
|
1544
|
+
this.walkBlockStatement(statement);
|
1545
|
+
break;
|
1546
|
+
case "ClassDeclaration":
|
1547
|
+
this.walkClassDeclaration(statement);
|
1548
|
+
break;
|
1549
|
+
case "DoWhileStatement":
|
1550
|
+
this.walkDoWhileStatement(statement);
|
1551
|
+
break;
|
1552
|
+
case "ExportDefaultDeclaration":
|
1553
|
+
this.walkExportDefaultDeclaration(statement);
|
1554
|
+
break;
|
1555
|
+
case "ExportNamedDeclaration":
|
1556
|
+
this.walkExportNamedDeclaration(statement);
|
1557
|
+
break;
|
1558
|
+
case "ExpressionStatement":
|
1559
|
+
this.walkExpressionStatement(statement);
|
1560
|
+
break;
|
1561
|
+
case "ForInStatement":
|
1562
|
+
this.walkForInStatement(statement);
|
1563
|
+
break;
|
1564
|
+
case "ForOfStatement":
|
1565
|
+
this.walkForOfStatement(statement);
|
1566
|
+
break;
|
1567
|
+
case "ForStatement":
|
1568
|
+
this.walkForStatement(statement);
|
1569
|
+
break;
|
1570
|
+
case "FunctionDeclaration":
|
1571
|
+
this.walkFunctionDeclaration(statement);
|
1572
|
+
break;
|
1573
|
+
case "IfStatement":
|
1574
|
+
this.walkIfStatement(statement);
|
1575
|
+
break;
|
1576
|
+
case "LabeledStatement":
|
1577
|
+
this.walkLabeledStatement(statement);
|
1578
|
+
break;
|
1579
|
+
case "ReturnStatement":
|
1580
|
+
this.walkReturnStatement(statement);
|
1581
|
+
break;
|
1582
|
+
case "SwitchStatement":
|
1583
|
+
this.walkSwitchStatement(statement);
|
1584
|
+
break;
|
1585
|
+
case "ThrowStatement":
|
1586
|
+
this.walkThrowStatement(statement);
|
1587
|
+
break;
|
1588
|
+
case "TryStatement":
|
1589
|
+
this.walkTryStatement(statement);
|
1590
|
+
break;
|
1591
|
+
case "VariableDeclaration":
|
1592
|
+
this.walkVariableDeclaration(statement);
|
1593
|
+
break;
|
1594
|
+
case "WhileStatement":
|
1595
|
+
this.walkWhileStatement(statement);
|
1596
|
+
break;
|
1597
|
+
case "WithStatement":
|
1598
|
+
this.walkWithStatement(statement);
|
1599
|
+
break;
|
1600
|
+
}
|
1601
|
+
this.prevStatement = this.statementPath.pop();
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
/**
|
1605
|
+
* Walks a statements that is nested within a parent statement
|
1606
|
+
* and can potentially be a non-block statement.
|
1607
|
+
* This enforces the nested statement to never be in ASI position.
|
1608
|
+
* @param {StatementNode} statement the nested statement
|
1609
|
+
* @returns {void}
|
1610
|
+
*/
|
1611
|
+
walkNestedStatement(statement) {
|
1612
|
+
this.prevStatement = undefined;
|
1613
|
+
this.walkStatement(statement);
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
// Real Statements
|
1617
|
+
preWalkBlockStatement(statement) {
|
1618
|
+
this.preWalkStatements(statement.body);
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
walkBlockStatement(statement) {
|
1622
|
+
this.inBlockScope(() => {
|
1623
|
+
const body = statement.body;
|
1624
|
+
const prev = this.prevStatement;
|
1625
|
+
this.blockPreWalkStatements(body);
|
1626
|
+
this.prevStatement = prev;
|
1627
|
+
this.walkStatements(body);
|
1628
|
+
});
|
1629
|
+
}
|
1630
|
+
|
1631
|
+
walkExpressionStatement(statement) {
|
1632
|
+
this.walkExpression(statement.expression);
|
1633
|
+
}
|
1634
|
+
|
1635
|
+
preWalkIfStatement(statement) {
|
1636
|
+
this.preWalkStatement(statement.consequent);
|
1637
|
+
if (statement.alternate) {
|
1638
|
+
this.preWalkStatement(statement.alternate);
|
1639
|
+
}
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
walkIfStatement(statement) {
|
1643
|
+
const result = this.hooks.statementIf.call(statement);
|
1644
|
+
if (result === undefined) {
|
1645
|
+
this.walkExpression(statement.test);
|
1646
|
+
this.walkNestedStatement(statement.consequent);
|
1647
|
+
if (statement.alternate) {
|
1648
|
+
this.walkNestedStatement(statement.alternate);
|
1649
|
+
}
|
1650
|
+
} else {
|
1651
|
+
if (result) {
|
1652
|
+
this.walkNestedStatement(statement.consequent);
|
1653
|
+
} else if (statement.alternate) {
|
1654
|
+
this.walkNestedStatement(statement.alternate);
|
1655
|
+
}
|
1656
|
+
}
|
1657
|
+
}
|
1658
|
+
|
1659
|
+
preWalkLabeledStatement(statement) {
|
1660
|
+
this.preWalkStatement(statement.body);
|
1661
|
+
}
|
1662
|
+
|
1663
|
+
walkLabeledStatement(statement) {
|
1664
|
+
const hook = this.hooks.label.get(statement.label.name);
|
1665
|
+
if (hook !== undefined) {
|
1666
|
+
const result = hook.call(statement);
|
1667
|
+
if (result === true) return;
|
1668
|
+
}
|
1669
|
+
this.walkNestedStatement(statement.body);
|
1670
|
+
}
|
1671
|
+
|
1672
|
+
preWalkWithStatement(statement) {
|
1673
|
+
this.preWalkStatement(statement.body);
|
1674
|
+
}
|
1675
|
+
|
1676
|
+
walkWithStatement(statement) {
|
1677
|
+
this.walkExpression(statement.object);
|
1678
|
+
this.walkNestedStatement(statement.body);
|
1679
|
+
}
|
1680
|
+
|
1681
|
+
preWalkSwitchStatement(statement) {
|
1682
|
+
this.preWalkSwitchCases(statement.cases);
|
1683
|
+
}
|
1684
|
+
|
1685
|
+
walkSwitchStatement(statement) {
|
1686
|
+
this.walkExpression(statement.discriminant);
|
1687
|
+
this.walkSwitchCases(statement.cases);
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
walkTerminatingStatement(statement) {
|
1691
|
+
if (statement.argument) this.walkExpression(statement.argument);
|
1692
|
+
}
|
1693
|
+
|
1694
|
+
walkReturnStatement(statement) {
|
1695
|
+
this.walkTerminatingStatement(statement);
|
1696
|
+
}
|
1697
|
+
|
1698
|
+
walkThrowStatement(statement) {
|
1699
|
+
this.walkTerminatingStatement(statement);
|
1700
|
+
}
|
1701
|
+
|
1702
|
+
preWalkTryStatement(statement) {
|
1703
|
+
this.preWalkStatement(statement.block);
|
1704
|
+
if (statement.handler) this.preWalkCatchClause(statement.handler);
|
1705
|
+
if (statement.finializer) this.preWalkStatement(statement.finializer);
|
1706
|
+
}
|
1707
|
+
|
1708
|
+
walkTryStatement(statement) {
|
1709
|
+
if (this.scope.inTry) {
|
1710
|
+
this.walkStatement(statement.block);
|
1711
|
+
} else {
|
1712
|
+
this.scope.inTry = true;
|
1713
|
+
this.walkStatement(statement.block);
|
1714
|
+
this.scope.inTry = false;
|
1715
|
+
}
|
1716
|
+
if (statement.handler) this.walkCatchClause(statement.handler);
|
1717
|
+
if (statement.finalizer) this.walkStatement(statement.finalizer);
|
1718
|
+
}
|
1719
|
+
|
1720
|
+
preWalkWhileStatement(statement) {
|
1721
|
+
this.preWalkStatement(statement.body);
|
1722
|
+
}
|
1723
|
+
|
1724
|
+
walkWhileStatement(statement) {
|
1725
|
+
this.walkExpression(statement.test);
|
1726
|
+
this.walkNestedStatement(statement.body);
|
1727
|
+
}
|
1728
|
+
|
1729
|
+
preWalkDoWhileStatement(statement) {
|
1730
|
+
this.preWalkStatement(statement.body);
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
walkDoWhileStatement(statement) {
|
1734
|
+
this.walkNestedStatement(statement.body);
|
1735
|
+
this.walkExpression(statement.test);
|
1736
|
+
}
|
1737
|
+
|
1738
|
+
preWalkForStatement(statement) {
|
1739
|
+
if (statement.init) {
|
1740
|
+
if (statement.init.type === "VariableDeclaration") {
|
1741
|
+
this.preWalkStatement(statement.init);
|
1742
|
+
}
|
1743
|
+
}
|
1744
|
+
this.preWalkStatement(statement.body);
|
1745
|
+
}
|
1746
|
+
|
1747
|
+
walkForStatement(statement) {
|
1748
|
+
this.inBlockScope(() => {
|
1749
|
+
if (statement.init) {
|
1750
|
+
if (statement.init.type === "VariableDeclaration") {
|
1751
|
+
this.blockPreWalkVariableDeclaration(statement.init);
|
1752
|
+
this.prevStatement = undefined;
|
1753
|
+
this.walkStatement(statement.init);
|
1754
|
+
} else {
|
1755
|
+
this.walkExpression(statement.init);
|
1756
|
+
}
|
1757
|
+
}
|
1758
|
+
if (statement.test) {
|
1759
|
+
this.walkExpression(statement.test);
|
1760
|
+
}
|
1761
|
+
if (statement.update) {
|
1762
|
+
this.walkExpression(statement.update);
|
1763
|
+
}
|
1764
|
+
const body = statement.body;
|
1765
|
+
if (body.type === "BlockStatement") {
|
1766
|
+
// no need to add additional scope
|
1767
|
+
const prev = this.prevStatement;
|
1768
|
+
this.blockPreWalkStatements(body.body);
|
1769
|
+
this.prevStatement = prev;
|
1770
|
+
this.walkStatements(body.body);
|
1771
|
+
} else {
|
1772
|
+
this.walkNestedStatement(body);
|
1773
|
+
}
|
1774
|
+
});
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
preWalkForInStatement(statement) {
|
1778
|
+
if (statement.left.type === "VariableDeclaration") {
|
1779
|
+
this.preWalkVariableDeclaration(statement.left);
|
1780
|
+
}
|
1781
|
+
this.preWalkStatement(statement.body);
|
1782
|
+
}
|
1783
|
+
|
1784
|
+
walkForInStatement(statement) {
|
1785
|
+
this.inBlockScope(() => {
|
1786
|
+
if (statement.left.type === "VariableDeclaration") {
|
1787
|
+
this.blockPreWalkVariableDeclaration(statement.left);
|
1788
|
+
this.walkVariableDeclaration(statement.left);
|
1789
|
+
} else {
|
1790
|
+
this.walkPattern(statement.left);
|
1791
|
+
}
|
1792
|
+
this.walkExpression(statement.right);
|
1793
|
+
const body = statement.body;
|
1794
|
+
if (body.type === "BlockStatement") {
|
1795
|
+
// no need to add additional scope
|
1796
|
+
const prev = this.prevStatement;
|
1797
|
+
this.blockPreWalkStatements(body.body);
|
1798
|
+
this.prevStatement = prev;
|
1799
|
+
this.walkStatements(body.body);
|
1800
|
+
} else {
|
1801
|
+
this.walkNestedStatement(body);
|
1802
|
+
}
|
1803
|
+
});
|
1804
|
+
}
|
1805
|
+
|
1806
|
+
preWalkForOfStatement(statement) {
|
1807
|
+
if (statement.await && this.scope.topLevelScope === true) {
|
1808
|
+
this.hooks.topLevelAwait.call(statement);
|
1809
|
+
}
|
1810
|
+
if (statement.left.type === "VariableDeclaration") {
|
1811
|
+
this.preWalkVariableDeclaration(statement.left);
|
1812
|
+
}
|
1813
|
+
this.preWalkStatement(statement.body);
|
1814
|
+
}
|
1815
|
+
|
1816
|
+
walkForOfStatement(statement) {
|
1817
|
+
this.inBlockScope(() => {
|
1818
|
+
if (statement.left.type === "VariableDeclaration") {
|
1819
|
+
this.blockPreWalkVariableDeclaration(statement.left);
|
1820
|
+
this.walkVariableDeclaration(statement.left);
|
1821
|
+
} else {
|
1822
|
+
this.walkPattern(statement.left);
|
1823
|
+
}
|
1824
|
+
this.walkExpression(statement.right);
|
1825
|
+
const body = statement.body;
|
1826
|
+
if (body.type === "BlockStatement") {
|
1827
|
+
// no need to add additional scope
|
1828
|
+
const prev = this.prevStatement;
|
1829
|
+
this.blockPreWalkStatements(body.body);
|
1830
|
+
this.prevStatement = prev;
|
1831
|
+
this.walkStatements(body.body);
|
1832
|
+
} else {
|
1833
|
+
this.walkNestedStatement(body);
|
1834
|
+
}
|
1835
|
+
});
|
1836
|
+
}
|
1837
|
+
|
1838
|
+
// Declarations
|
1839
|
+
preWalkFunctionDeclaration(statement) {
|
1840
|
+
if (statement.id) {
|
1841
|
+
this.defineVariable(statement.id.name);
|
1842
|
+
}
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
walkFunctionDeclaration(statement) {
|
1846
|
+
const wasTopLevel = this.scope.topLevelScope;
|
1847
|
+
this.scope.topLevelScope = false;
|
1848
|
+
this.inFunctionScope(true, statement.params, () => {
|
1849
|
+
for (const param of statement.params) {
|
1850
|
+
this.walkPattern(param);
|
1851
|
+
}
|
1852
|
+
if (statement.body.type === "BlockStatement") {
|
1853
|
+
this.detectMode(statement.body.body);
|
1854
|
+
const prev = this.prevStatement;
|
1855
|
+
this.preWalkStatement(statement.body);
|
1856
|
+
this.prevStatement = prev;
|
1857
|
+
this.walkStatement(statement.body);
|
1858
|
+
} else {
|
1859
|
+
this.walkExpression(statement.body);
|
1860
|
+
}
|
1861
|
+
});
|
1862
|
+
this.scope.topLevelScope = wasTopLevel;
|
1863
|
+
}
|
1864
|
+
|
1865
|
+
blockPreWalkImportDeclaration(statement) {
|
1866
|
+
const source = statement.source.value;
|
1867
|
+
this.hooks.import.call(statement, source);
|
1868
|
+
for (const specifier of statement.specifiers) {
|
1869
|
+
const name = specifier.local.name;
|
1870
|
+
switch (specifier.type) {
|
1871
|
+
case "ImportDefaultSpecifier":
|
1872
|
+
if (
|
1873
|
+
!this.hooks.importSpecifier.call(statement, source, "default", name)
|
1874
|
+
) {
|
1875
|
+
this.defineVariable(name);
|
1876
|
+
}
|
1877
|
+
break;
|
1878
|
+
case "ImportSpecifier":
|
1879
|
+
if (
|
1880
|
+
!this.hooks.importSpecifier.call(
|
1881
|
+
statement,
|
1882
|
+
source,
|
1883
|
+
specifier.imported.name,
|
1884
|
+
name
|
1885
|
+
)
|
1886
|
+
) {
|
1887
|
+
this.defineVariable(name);
|
1888
|
+
}
|
1889
|
+
break;
|
1890
|
+
case "ImportNamespaceSpecifier":
|
1891
|
+
if (!this.hooks.importSpecifier.call(statement, source, null, name)) {
|
1892
|
+
this.defineVariable(name);
|
1893
|
+
}
|
1894
|
+
break;
|
1895
|
+
default:
|
1896
|
+
this.defineVariable(name);
|
1897
|
+
}
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
|
1901
|
+
enterDeclaration(declaration, onIdent) {
|
1902
|
+
switch (declaration.type) {
|
1903
|
+
case "VariableDeclaration":
|
1904
|
+
for (const declarator of declaration.declarations) {
|
1905
|
+
switch (declarator.type) {
|
1906
|
+
case "VariableDeclarator": {
|
1907
|
+
this.enterPattern(declarator.id, onIdent);
|
1908
|
+
break;
|
1909
|
+
}
|
1910
|
+
}
|
1911
|
+
}
|
1912
|
+
break;
|
1913
|
+
case "FunctionDeclaration":
|
1914
|
+
this.enterPattern(declaration.id, onIdent);
|
1915
|
+
break;
|
1916
|
+
case "ClassDeclaration":
|
1917
|
+
this.enterPattern(declaration.id, onIdent);
|
1918
|
+
break;
|
1919
|
+
}
|
1920
|
+
}
|
1921
|
+
|
1922
|
+
blockPreWalkExportNamedDeclaration(statement) {
|
1923
|
+
let source;
|
1924
|
+
if (statement.source) {
|
1925
|
+
source = statement.source.value;
|
1926
|
+
this.hooks.exportImport.call(statement, source);
|
1927
|
+
} else {
|
1928
|
+
this.hooks.export.call(statement);
|
1929
|
+
}
|
1930
|
+
if (statement.declaration) {
|
1931
|
+
if (
|
1932
|
+
!this.hooks.exportDeclaration.call(statement, statement.declaration)
|
1933
|
+
) {
|
1934
|
+
const prev = this.prevStatement;
|
1935
|
+
this.preWalkStatement(statement.declaration);
|
1936
|
+
this.prevStatement = prev;
|
1937
|
+
this.blockPreWalkStatement(statement.declaration);
|
1938
|
+
let index = 0;
|
1939
|
+
this.enterDeclaration(statement.declaration, def => {
|
1940
|
+
this.hooks.exportSpecifier.call(statement, def, def, index++);
|
1941
|
+
});
|
1942
|
+
}
|
1943
|
+
}
|
1944
|
+
if (statement.specifiers) {
|
1945
|
+
for (
|
1946
|
+
let specifierIndex = 0;
|
1947
|
+
specifierIndex < statement.specifiers.length;
|
1948
|
+
specifierIndex++
|
1949
|
+
) {
|
1950
|
+
const specifier = statement.specifiers[specifierIndex];
|
1951
|
+
switch (specifier.type) {
|
1952
|
+
case "ExportSpecifier": {
|
1953
|
+
const name = specifier.exported.name;
|
1954
|
+
if (source) {
|
1955
|
+
this.hooks.exportImportSpecifier.call(
|
1956
|
+
statement,
|
1957
|
+
source,
|
1958
|
+
specifier.local.name,
|
1959
|
+
name,
|
1960
|
+
specifierIndex
|
1961
|
+
);
|
1962
|
+
} else {
|
1963
|
+
this.hooks.exportSpecifier.call(
|
1964
|
+
statement,
|
1965
|
+
specifier.local.name,
|
1966
|
+
name,
|
1967
|
+
specifierIndex
|
1968
|
+
);
|
1969
|
+
}
|
1970
|
+
break;
|
1971
|
+
}
|
1972
|
+
}
|
1973
|
+
}
|
1974
|
+
}
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
walkExportNamedDeclaration(statement) {
|
1978
|
+
if (statement.declaration) {
|
1979
|
+
this.walkStatement(statement.declaration);
|
1980
|
+
}
|
1981
|
+
}
|
1982
|
+
|
1983
|
+
blockPreWalkExportDefaultDeclaration(statement) {
|
1984
|
+
const prev = this.prevStatement;
|
1985
|
+
this.preWalkStatement(statement.declaration);
|
1986
|
+
this.prevStatement = prev;
|
1987
|
+
this.blockPreWalkStatement(statement.declaration);
|
1988
|
+
if (
|
1989
|
+
statement.declaration.id &&
|
1990
|
+
statement.declaration.type !== "FunctionExpression" &&
|
1991
|
+
statement.declaration.type !== "ClassExpression"
|
1992
|
+
) {
|
1993
|
+
this.hooks.exportSpecifier.call(
|
1994
|
+
statement,
|
1995
|
+
statement.declaration.id.name,
|
1996
|
+
"default",
|
1997
|
+
undefined
|
1998
|
+
);
|
1999
|
+
}
|
2000
|
+
}
|
2001
|
+
|
2002
|
+
walkExportDefaultDeclaration(statement) {
|
2003
|
+
this.hooks.export.call(statement);
|
2004
|
+
if (
|
2005
|
+
statement.declaration.id &&
|
2006
|
+
statement.declaration.type !== "FunctionExpression" &&
|
2007
|
+
statement.declaration.type !== "ClassExpression"
|
2008
|
+
) {
|
2009
|
+
if (
|
2010
|
+
!this.hooks.exportDeclaration.call(statement, statement.declaration)
|
2011
|
+
) {
|
2012
|
+
this.walkStatement(statement.declaration);
|
2013
|
+
}
|
2014
|
+
} else {
|
2015
|
+
// Acorn parses `export default function() {}` as `FunctionDeclaration` and
|
2016
|
+
// `export default class {}` as `ClassDeclaration`, both with `id = null`.
|
2017
|
+
// These nodes must be treated as expressions.
|
2018
|
+
if (
|
2019
|
+
statement.declaration.type === "FunctionDeclaration" ||
|
2020
|
+
statement.declaration.type === "ClassDeclaration"
|
2021
|
+
) {
|
2022
|
+
this.walkStatement(statement.declaration);
|
2023
|
+
} else {
|
2024
|
+
this.walkExpression(statement.declaration);
|
2025
|
+
}
|
2026
|
+
if (!this.hooks.exportExpression.call(statement, statement.declaration)) {
|
2027
|
+
this.hooks.exportSpecifier.call(
|
2028
|
+
statement,
|
2029
|
+
statement.declaration,
|
2030
|
+
"default",
|
2031
|
+
undefined
|
2032
|
+
);
|
2033
|
+
}
|
2034
|
+
}
|
2035
|
+
}
|
2036
|
+
|
2037
|
+
blockPreWalkExportAllDeclaration(statement) {
|
2038
|
+
const source = statement.source.value;
|
2039
|
+
const name = statement.exported ? statement.exported.name : null;
|
2040
|
+
this.hooks.exportImport.call(statement, source);
|
2041
|
+
this.hooks.exportImportSpecifier.call(statement, source, null, name, 0);
|
2042
|
+
}
|
2043
|
+
|
2044
|
+
preWalkVariableDeclaration(statement) {
|
2045
|
+
if (statement.kind !== "var") return;
|
2046
|
+
this._preWalkVariableDeclaration(statement, this.hooks.varDeclarationVar);
|
2047
|
+
}
|
2048
|
+
|
2049
|
+
blockPreWalkVariableDeclaration(statement) {
|
2050
|
+
if (statement.kind === "var") return;
|
2051
|
+
const hookMap =
|
2052
|
+
statement.kind === "const"
|
2053
|
+
? this.hooks.varDeclarationConst
|
2054
|
+
: this.hooks.varDeclarationLet;
|
2055
|
+
this._preWalkVariableDeclaration(statement, hookMap);
|
2056
|
+
}
|
2057
|
+
|
2058
|
+
_preWalkVariableDeclaration(statement, hookMap) {
|
2059
|
+
for (const declarator of statement.declarations) {
|
2060
|
+
switch (declarator.type) {
|
2061
|
+
case "VariableDeclarator": {
|
2062
|
+
if (!this.hooks.preDeclarator.call(declarator, statement)) {
|
2063
|
+
this.enterPattern(declarator.id, (name, decl) => {
|
2064
|
+
let hook = hookMap.get(name);
|
2065
|
+
if (hook === undefined || !hook.call(decl)) {
|
2066
|
+
hook = this.hooks.varDeclaration.get(name);
|
2067
|
+
if (hook === undefined || !hook.call(decl)) {
|
2068
|
+
this.defineVariable(name);
|
2069
|
+
}
|
2070
|
+
}
|
2071
|
+
});
|
2072
|
+
}
|
2073
|
+
break;
|
2074
|
+
}
|
2075
|
+
}
|
2076
|
+
}
|
2077
|
+
}
|
2078
|
+
|
2079
|
+
walkVariableDeclaration(statement) {
|
2080
|
+
for (const declarator of statement.declarations) {
|
2081
|
+
switch (declarator.type) {
|
2082
|
+
case "VariableDeclarator": {
|
2083
|
+
const renameIdentifier =
|
2084
|
+
declarator.init && this.getRenameIdentifier(declarator.init);
|
2085
|
+
if (renameIdentifier && declarator.id.type === "Identifier") {
|
2086
|
+
const hook = this.hooks.canRename.get(renameIdentifier);
|
2087
|
+
if (hook !== undefined && hook.call(declarator.init)) {
|
2088
|
+
// renaming with "var a = b;"
|
2089
|
+
const hook = this.hooks.rename.get(renameIdentifier);
|
2090
|
+
if (hook === undefined || !hook.call(declarator.init)) {
|
2091
|
+
this.setVariable(declarator.id.name, renameIdentifier);
|
2092
|
+
}
|
2093
|
+
break;
|
2094
|
+
}
|
2095
|
+
}
|
2096
|
+
if (!this.hooks.declarator.call(declarator, statement)) {
|
2097
|
+
this.walkPattern(declarator.id);
|
2098
|
+
if (declarator.init) this.walkExpression(declarator.init);
|
2099
|
+
}
|
2100
|
+
break;
|
2101
|
+
}
|
2102
|
+
}
|
2103
|
+
}
|
2104
|
+
}
|
2105
|
+
|
2106
|
+
blockPreWalkClassDeclaration(statement) {
|
2107
|
+
if (statement.id) {
|
2108
|
+
this.defineVariable(statement.id.name);
|
2109
|
+
}
|
2110
|
+
}
|
2111
|
+
|
2112
|
+
walkClassDeclaration(statement) {
|
2113
|
+
this.walkClass(statement);
|
2114
|
+
}
|
2115
|
+
|
2116
|
+
preWalkSwitchCases(switchCases) {
|
2117
|
+
for (let index = 0, len = switchCases.length; index < len; index++) {
|
2118
|
+
const switchCase = switchCases[index];
|
2119
|
+
this.preWalkStatements(switchCase.consequent);
|
2120
|
+
}
|
2121
|
+
}
|
2122
|
+
|
2123
|
+
walkSwitchCases(switchCases) {
|
2124
|
+
this.inBlockScope(() => {
|
2125
|
+
const len = switchCases.length;
|
2126
|
+
|
2127
|
+
// we need to pre walk all statements first since we can have invalid code
|
2128
|
+
// import A from "module";
|
2129
|
+
// switch(1) {
|
2130
|
+
// case 1:
|
2131
|
+
// console.log(A); // should fail at runtime
|
2132
|
+
// case 2:
|
2133
|
+
// const A = 1;
|
2134
|
+
// }
|
2135
|
+
for (let index = 0; index < len; index++) {
|
2136
|
+
const switchCase = switchCases[index];
|
2137
|
+
|
2138
|
+
if (switchCase.consequent.length > 0) {
|
2139
|
+
const prev = this.prevStatement;
|
2140
|
+
this.blockPreWalkStatements(switchCase.consequent);
|
2141
|
+
this.prevStatement = prev;
|
2142
|
+
}
|
2143
|
+
}
|
2144
|
+
|
2145
|
+
for (let index = 0; index < len; index++) {
|
2146
|
+
const switchCase = switchCases[index];
|
2147
|
+
|
2148
|
+
if (switchCase.test) {
|
2149
|
+
this.walkExpression(switchCase.test);
|
2150
|
+
}
|
2151
|
+
if (switchCase.consequent.length > 0) {
|
2152
|
+
this.walkStatements(switchCase.consequent);
|
2153
|
+
}
|
2154
|
+
}
|
2155
|
+
});
|
2156
|
+
}
|
2157
|
+
|
2158
|
+
preWalkCatchClause(catchClause) {
|
2159
|
+
this.preWalkStatement(catchClause.body);
|
2160
|
+
}
|
2161
|
+
|
2162
|
+
walkCatchClause(catchClause) {
|
2163
|
+
this.inBlockScope(() => {
|
2164
|
+
// Error binding is optional in catch clause since ECMAScript 2019
|
2165
|
+
if (catchClause.param !== null) {
|
2166
|
+
this.enterPattern(catchClause.param, ident => {
|
2167
|
+
this.defineVariable(ident);
|
2168
|
+
});
|
2169
|
+
this.walkPattern(catchClause.param);
|
2170
|
+
}
|
2171
|
+
const prev = this.prevStatement;
|
2172
|
+
this.blockPreWalkStatement(catchClause.body);
|
2173
|
+
this.prevStatement = prev;
|
2174
|
+
this.walkStatement(catchClause.body);
|
2175
|
+
});
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
walkPattern(pattern) {
|
2179
|
+
switch (pattern.type) {
|
2180
|
+
case "ArrayPattern":
|
2181
|
+
this.walkArrayPattern(pattern);
|
2182
|
+
break;
|
2183
|
+
case "AssignmentPattern":
|
2184
|
+
this.walkAssignmentPattern(pattern);
|
2185
|
+
break;
|
2186
|
+
case "MemberExpression":
|
2187
|
+
this.walkMemberExpression(pattern);
|
2188
|
+
break;
|
2189
|
+
case "ObjectPattern":
|
2190
|
+
this.walkObjectPattern(pattern);
|
2191
|
+
break;
|
2192
|
+
case "RestElement":
|
2193
|
+
this.walkRestElement(pattern);
|
2194
|
+
break;
|
2195
|
+
}
|
2196
|
+
}
|
2197
|
+
|
2198
|
+
walkAssignmentPattern(pattern) {
|
2199
|
+
this.walkExpression(pattern.right);
|
2200
|
+
this.walkPattern(pattern.left);
|
2201
|
+
}
|
2202
|
+
|
2203
|
+
walkObjectPattern(pattern) {
|
2204
|
+
for (let i = 0, len = pattern.properties.length; i < len; i++) {
|
2205
|
+
const prop = pattern.properties[i];
|
2206
|
+
if (prop) {
|
2207
|
+
if (prop.computed) this.walkExpression(prop.key);
|
2208
|
+
if (prop.value) this.walkPattern(prop.value);
|
2209
|
+
}
|
2210
|
+
}
|
2211
|
+
}
|
2212
|
+
|
2213
|
+
walkArrayPattern(pattern) {
|
2214
|
+
for (let i = 0, len = pattern.elements.length; i < len; i++) {
|
2215
|
+
const element = pattern.elements[i];
|
2216
|
+
if (element) this.walkPattern(element);
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
|
2220
|
+
walkRestElement(pattern) {
|
2221
|
+
this.walkPattern(pattern.argument);
|
2222
|
+
}
|
2223
|
+
|
2224
|
+
walkExpressions(expressions) {
|
2225
|
+
for (const expression of expressions) {
|
2226
|
+
if (expression) {
|
2227
|
+
this.walkExpression(expression);
|
2228
|
+
}
|
2229
|
+
}
|
2230
|
+
}
|
2231
|
+
|
2232
|
+
walkExpression(expression) {
|
2233
|
+
switch (expression.type) {
|
2234
|
+
case "ArrayExpression":
|
2235
|
+
this.walkArrayExpression(expression);
|
2236
|
+
break;
|
2237
|
+
case "ArrowFunctionExpression":
|
2238
|
+
this.walkArrowFunctionExpression(expression);
|
2239
|
+
break;
|
2240
|
+
case "AssignmentExpression":
|
2241
|
+
this.walkAssignmentExpression(expression);
|
2242
|
+
break;
|
2243
|
+
case "AwaitExpression":
|
2244
|
+
this.walkAwaitExpression(expression);
|
2245
|
+
break;
|
2246
|
+
case "BinaryExpression":
|
2247
|
+
this.walkBinaryExpression(expression);
|
2248
|
+
break;
|
2249
|
+
case "CallExpression":
|
2250
|
+
this.walkCallExpression(expression);
|
2251
|
+
break;
|
2252
|
+
case "ChainExpression":
|
2253
|
+
this.walkChainExpression(expression);
|
2254
|
+
break;
|
2255
|
+
case "ClassExpression":
|
2256
|
+
this.walkClassExpression(expression);
|
2257
|
+
break;
|
2258
|
+
case "ConditionalExpression":
|
2259
|
+
this.walkConditionalExpression(expression);
|
2260
|
+
break;
|
2261
|
+
case "FunctionExpression":
|
2262
|
+
this.walkFunctionExpression(expression);
|
2263
|
+
break;
|
2264
|
+
case "Identifier":
|
2265
|
+
this.walkIdentifier(expression);
|
2266
|
+
break;
|
2267
|
+
case "ImportExpression":
|
2268
|
+
this.walkImportExpression(expression);
|
2269
|
+
break;
|
2270
|
+
case "LogicalExpression":
|
2271
|
+
this.walkLogicalExpression(expression);
|
2272
|
+
break;
|
2273
|
+
case "MetaProperty":
|
2274
|
+
this.walkMetaProperty(expression);
|
2275
|
+
break;
|
2276
|
+
case "MemberExpression":
|
2277
|
+
this.walkMemberExpression(expression);
|
2278
|
+
break;
|
2279
|
+
case "NewExpression":
|
2280
|
+
this.walkNewExpression(expression);
|
2281
|
+
break;
|
2282
|
+
case "ObjectExpression":
|
2283
|
+
this.walkObjectExpression(expression);
|
2284
|
+
break;
|
2285
|
+
case "SequenceExpression":
|
2286
|
+
this.walkSequenceExpression(expression);
|
2287
|
+
break;
|
2288
|
+
case "SpreadElement":
|
2289
|
+
this.walkSpreadElement(expression);
|
2290
|
+
break;
|
2291
|
+
case "TaggedTemplateExpression":
|
2292
|
+
this.walkTaggedTemplateExpression(expression);
|
2293
|
+
break;
|
2294
|
+
case "TemplateLiteral":
|
2295
|
+
this.walkTemplateLiteral(expression);
|
2296
|
+
break;
|
2297
|
+
case "ThisExpression":
|
2298
|
+
this.walkThisExpression(expression);
|
2299
|
+
break;
|
2300
|
+
case "UnaryExpression":
|
2301
|
+
this.walkUnaryExpression(expression);
|
2302
|
+
break;
|
2303
|
+
case "UpdateExpression":
|
2304
|
+
this.walkUpdateExpression(expression);
|
2305
|
+
break;
|
2306
|
+
case "YieldExpression":
|
2307
|
+
this.walkYieldExpression(expression);
|
2308
|
+
break;
|
2309
|
+
}
|
2310
|
+
}
|
2311
|
+
|
2312
|
+
walkAwaitExpression(expression) {
|
2313
|
+
if (this.scope.topLevelScope === true)
|
2314
|
+
this.hooks.topLevelAwait.call(expression);
|
2315
|
+
this.walkExpression(expression.argument);
|
2316
|
+
}
|
2317
|
+
|
2318
|
+
walkArrayExpression(expression) {
|
2319
|
+
if (expression.elements) {
|
2320
|
+
this.walkExpressions(expression.elements);
|
2321
|
+
}
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
walkSpreadElement(expression) {
|
2325
|
+
if (expression.argument) {
|
2326
|
+
this.walkExpression(expression.argument);
|
2327
|
+
}
|
2328
|
+
}
|
2329
|
+
|
2330
|
+
walkObjectExpression(expression) {
|
2331
|
+
for (
|
2332
|
+
let propIndex = 0, len = expression.properties.length;
|
2333
|
+
propIndex < len;
|
2334
|
+
propIndex++
|
2335
|
+
) {
|
2336
|
+
const prop = expression.properties[propIndex];
|
2337
|
+
this.walkProperty(prop);
|
2338
|
+
}
|
2339
|
+
}
|
2340
|
+
|
2341
|
+
walkProperty(prop) {
|
2342
|
+
if (prop.type === "SpreadElement") {
|
2343
|
+
this.walkExpression(prop.argument);
|
2344
|
+
return;
|
2345
|
+
}
|
2346
|
+
if (prop.computed) {
|
2347
|
+
this.walkExpression(prop.key);
|
2348
|
+
}
|
2349
|
+
if (prop.shorthand && prop.value && prop.value.type === "Identifier") {
|
2350
|
+
this.scope.inShorthand = prop.value.name;
|
2351
|
+
this.walkIdentifier(prop.value);
|
2352
|
+
this.scope.inShorthand = false;
|
2353
|
+
} else {
|
2354
|
+
this.walkExpression(prop.value);
|
2355
|
+
}
|
2356
|
+
}
|
2357
|
+
|
2358
|
+
walkFunctionExpression(expression) {
|
2359
|
+
const wasTopLevel = this.scope.topLevelScope;
|
2360
|
+
this.scope.topLevelScope = false;
|
2361
|
+
const scopeParams = expression.params;
|
2362
|
+
|
2363
|
+
// Add function name in scope for recursive calls
|
2364
|
+
if (expression.id) {
|
2365
|
+
scopeParams.push(expression.id.name);
|
2366
|
+
}
|
2367
|
+
|
2368
|
+
this.inFunctionScope(true, scopeParams, () => {
|
2369
|
+
for (const param of expression.params) {
|
2370
|
+
this.walkPattern(param);
|
2371
|
+
}
|
2372
|
+
if (expression.body.type === "BlockStatement") {
|
2373
|
+
this.detectMode(expression.body.body);
|
2374
|
+
const prev = this.prevStatement;
|
2375
|
+
this.preWalkStatement(expression.body);
|
2376
|
+
this.prevStatement = prev;
|
2377
|
+
this.walkStatement(expression.body);
|
2378
|
+
} else {
|
2379
|
+
this.walkExpression(expression.body);
|
2380
|
+
}
|
2381
|
+
});
|
2382
|
+
this.scope.topLevelScope = wasTopLevel;
|
2383
|
+
}
|
2384
|
+
|
2385
|
+
walkArrowFunctionExpression(expression) {
|
2386
|
+
const wasTopLevel = this.scope.topLevelScope;
|
2387
|
+
this.scope.topLevelScope = wasTopLevel ? "arrow" : false;
|
2388
|
+
this.inFunctionScope(false, expression.params, () => {
|
2389
|
+
for (const param of expression.params) {
|
2390
|
+
this.walkPattern(param);
|
2391
|
+
}
|
2392
|
+
if (expression.body.type === "BlockStatement") {
|
2393
|
+
this.detectMode(expression.body.body);
|
2394
|
+
const prev = this.prevStatement;
|
2395
|
+
this.preWalkStatement(expression.body);
|
2396
|
+
this.prevStatement = prev;
|
2397
|
+
this.walkStatement(expression.body);
|
2398
|
+
} else {
|
2399
|
+
this.walkExpression(expression.body);
|
2400
|
+
}
|
2401
|
+
});
|
2402
|
+
this.scope.topLevelScope = wasTopLevel;
|
2403
|
+
}
|
2404
|
+
|
2405
|
+
/**
|
2406
|
+
* @param {SequenceExpressionNode} expression the sequence
|
2407
|
+
*/
|
2408
|
+
walkSequenceExpression(expression) {
|
2409
|
+
if (!expression.expressions) return;
|
2410
|
+
// We treat sequence expressions like statements when they are one statement level
|
2411
|
+
// This has some benefits for optimizations that only work on statement level
|
2412
|
+
const currentStatement = this.statementPath[this.statementPath.length - 1];
|
2413
|
+
if (
|
2414
|
+
currentStatement === expression ||
|
2415
|
+
(currentStatement.type === "ExpressionStatement" &&
|
2416
|
+
currentStatement.expression === expression)
|
2417
|
+
) {
|
2418
|
+
const old = this.statementPath.pop();
|
2419
|
+
for (const expr of expression.expressions) {
|
2420
|
+
this.statementPath.push(expr);
|
2421
|
+
this.walkExpression(expr);
|
2422
|
+
this.statementPath.pop();
|
2423
|
+
}
|
2424
|
+
this.statementPath.push(old);
|
2425
|
+
} else {
|
2426
|
+
this.walkExpressions(expression.expressions);
|
2427
|
+
}
|
2428
|
+
}
|
2429
|
+
|
2430
|
+
walkUpdateExpression(expression) {
|
2431
|
+
this.walkExpression(expression.argument);
|
2432
|
+
}
|
2433
|
+
|
2434
|
+
walkUnaryExpression(expression) {
|
2435
|
+
if (expression.operator === "typeof") {
|
2436
|
+
const result = this.callHooksForExpression(
|
2437
|
+
this.hooks.typeof,
|
2438
|
+
expression.argument,
|
2439
|
+
expression
|
2440
|
+
);
|
2441
|
+
if (result === true) return;
|
2442
|
+
if (expression.argument.type === "ChainExpression") {
|
2443
|
+
const result = this.callHooksForExpression(
|
2444
|
+
this.hooks.typeof,
|
2445
|
+
expression.argument.expression,
|
2446
|
+
expression
|
2447
|
+
);
|
2448
|
+
if (result === true) return;
|
2449
|
+
}
|
2450
|
+
}
|
2451
|
+
this.walkExpression(expression.argument);
|
2452
|
+
}
|
2453
|
+
|
2454
|
+
walkLeftRightExpression(expression) {
|
2455
|
+
this.walkExpression(expression.left);
|
2456
|
+
this.walkExpression(expression.right);
|
2457
|
+
}
|
2458
|
+
|
2459
|
+
walkBinaryExpression(expression) {
|
2460
|
+
this.walkLeftRightExpression(expression);
|
2461
|
+
}
|
2462
|
+
|
2463
|
+
walkLogicalExpression(expression) {
|
2464
|
+
const result = this.hooks.expressionLogicalOperator.call(expression);
|
2465
|
+
if (result === undefined) {
|
2466
|
+
this.walkLeftRightExpression(expression);
|
2467
|
+
} else {
|
2468
|
+
if (result) {
|
2469
|
+
this.walkExpression(expression.right);
|
2470
|
+
}
|
2471
|
+
}
|
2472
|
+
}
|
2473
|
+
|
2474
|
+
walkAssignmentExpression(expression) {
|
2475
|
+
if (expression.left.type === "Identifier") {
|
2476
|
+
const renameIdentifier = this.getRenameIdentifier(expression.right);
|
2477
|
+
if (renameIdentifier) {
|
2478
|
+
if (
|
2479
|
+
this.callHooksForInfo(
|
2480
|
+
this.hooks.canRename,
|
2481
|
+
renameIdentifier,
|
2482
|
+
expression.right
|
2483
|
+
)
|
2484
|
+
) {
|
2485
|
+
// renaming "a = b;"
|
2486
|
+
if (
|
2487
|
+
!this.callHooksForInfo(
|
2488
|
+
this.hooks.rename,
|
2489
|
+
renameIdentifier,
|
2490
|
+
expression.right
|
2491
|
+
)
|
2492
|
+
) {
|
2493
|
+
this.setVariable(
|
2494
|
+
expression.left.name,
|
2495
|
+
this.getVariableInfo(renameIdentifier)
|
2496
|
+
);
|
2497
|
+
}
|
2498
|
+
return;
|
2499
|
+
}
|
2500
|
+
}
|
2501
|
+
this.walkExpression(expression.right);
|
2502
|
+
this.enterPattern(expression.left, (name, decl) => {
|
2503
|
+
if (!this.callHooksForName(this.hooks.assign, name, expression)) {
|
2504
|
+
this.walkExpression(expression.left);
|
2505
|
+
}
|
2506
|
+
});
|
2507
|
+
return;
|
2508
|
+
}
|
2509
|
+
if (expression.left.type.endsWith("Pattern")) {
|
2510
|
+
this.walkExpression(expression.right);
|
2511
|
+
this.enterPattern(expression.left, (name, decl) => {
|
2512
|
+
if (!this.callHooksForName(this.hooks.assign, name, expression)) {
|
2513
|
+
this.defineVariable(name);
|
2514
|
+
}
|
2515
|
+
});
|
2516
|
+
this.walkPattern(expression.left);
|
2517
|
+
} else if (expression.left.type === "MemberExpression") {
|
2518
|
+
const exprName = this.getMemberExpressionInfo(
|
2519
|
+
expression.left,
|
2520
|
+
ALLOWED_MEMBER_TYPES_EXPRESSION
|
2521
|
+
);
|
2522
|
+
if (exprName) {
|
2523
|
+
if (
|
2524
|
+
this.callHooksForInfo(
|
2525
|
+
this.hooks.assignMemberChain,
|
2526
|
+
exprName.rootInfo,
|
2527
|
+
expression,
|
2528
|
+
exprName.getMembers()
|
2529
|
+
)
|
2530
|
+
) {
|
2531
|
+
return;
|
2532
|
+
}
|
2533
|
+
}
|
2534
|
+
this.walkExpression(expression.right);
|
2535
|
+
this.walkExpression(expression.left);
|
2536
|
+
} else {
|
2537
|
+
this.walkExpression(expression.right);
|
2538
|
+
this.walkExpression(expression.left);
|
2539
|
+
}
|
2540
|
+
}
|
2541
|
+
|
2542
|
+
walkConditionalExpression(expression) {
|
2543
|
+
const result = this.hooks.expressionConditionalOperator.call(expression);
|
2544
|
+
if (result === undefined) {
|
2545
|
+
this.walkExpression(expression.test);
|
2546
|
+
this.walkExpression(expression.consequent);
|
2547
|
+
if (expression.alternate) {
|
2548
|
+
this.walkExpression(expression.alternate);
|
2549
|
+
}
|
2550
|
+
} else {
|
2551
|
+
if (result) {
|
2552
|
+
this.walkExpression(expression.consequent);
|
2553
|
+
} else if (expression.alternate) {
|
2554
|
+
this.walkExpression(expression.alternate);
|
2555
|
+
}
|
2556
|
+
}
|
2557
|
+
}
|
2558
|
+
|
2559
|
+
walkNewExpression(expression) {
|
2560
|
+
const result = this.callHooksForExpression(
|
2561
|
+
this.hooks.new,
|
2562
|
+
expression.callee,
|
2563
|
+
expression
|
2564
|
+
);
|
2565
|
+
if (result === true) return;
|
2566
|
+
this.walkExpression(expression.callee);
|
2567
|
+
if (expression.arguments) {
|
2568
|
+
this.walkExpressions(expression.arguments);
|
2569
|
+
}
|
2570
|
+
}
|
2571
|
+
|
2572
|
+
walkYieldExpression(expression) {
|
2573
|
+
if (expression.argument) {
|
2574
|
+
this.walkExpression(expression.argument);
|
2575
|
+
}
|
2576
|
+
}
|
2577
|
+
|
2578
|
+
walkTemplateLiteral(expression) {
|
2579
|
+
if (expression.expressions) {
|
2580
|
+
this.walkExpressions(expression.expressions);
|
2581
|
+
}
|
2582
|
+
}
|
2583
|
+
|
2584
|
+
walkTaggedTemplateExpression(expression) {
|
2585
|
+
if (expression.tag) {
|
2586
|
+
this.walkExpression(expression.tag);
|
2587
|
+
}
|
2588
|
+
if (expression.quasi && expression.quasi.expressions) {
|
2589
|
+
this.walkExpressions(expression.quasi.expressions);
|
2590
|
+
}
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
walkClassExpression(expression) {
|
2594
|
+
this.walkClass(expression);
|
2595
|
+
}
|
2596
|
+
|
2597
|
+
/**
|
2598
|
+
* @param {ChainExpressionNode} expression expression
|
2599
|
+
*/
|
2600
|
+
walkChainExpression(expression) {
|
2601
|
+
const result = this.hooks.optionalChaining.call(expression);
|
2602
|
+
|
2603
|
+
if (result === undefined) {
|
2604
|
+
if (expression.expression.type === "CallExpression") {
|
2605
|
+
this.walkCallExpression(expression.expression);
|
2606
|
+
} else {
|
2607
|
+
this.walkMemberExpression(expression.expression);
|
2608
|
+
}
|
2609
|
+
}
|
2610
|
+
}
|
2611
|
+
|
2612
|
+
_walkIIFE(functionExpression, options, currentThis) {
|
2613
|
+
const getVarInfo = argOrThis => {
|
2614
|
+
const renameIdentifier = this.getRenameIdentifier(argOrThis);
|
2615
|
+
if (renameIdentifier) {
|
2616
|
+
if (
|
2617
|
+
this.callHooksForInfo(
|
2618
|
+
this.hooks.canRename,
|
2619
|
+
renameIdentifier,
|
2620
|
+
argOrThis
|
2621
|
+
)
|
2622
|
+
) {
|
2623
|
+
if (
|
2624
|
+
!this.callHooksForInfo(
|
2625
|
+
this.hooks.rename,
|
2626
|
+
renameIdentifier,
|
2627
|
+
argOrThis
|
2628
|
+
)
|
2629
|
+
) {
|
2630
|
+
return this.getVariableInfo(renameIdentifier);
|
2631
|
+
}
|
2632
|
+
}
|
2633
|
+
}
|
2634
|
+
this.walkExpression(argOrThis);
|
2635
|
+
};
|
2636
|
+
const { params, type } = functionExpression;
|
2637
|
+
const arrow = type === "ArrowFunctionExpression";
|
2638
|
+
const renameThis = currentThis ? getVarInfo(currentThis) : null;
|
2639
|
+
const varInfoForArgs = options.map(getVarInfo);
|
2640
|
+
const wasTopLevel = this.scope.topLevelScope;
|
2641
|
+
this.scope.topLevelScope = wasTopLevel && arrow ? "arrow" : false;
|
2642
|
+
const scopeParams = params.filter(
|
2643
|
+
(identifier, idx) => !varInfoForArgs[idx]
|
2644
|
+
);
|
2645
|
+
|
2646
|
+
// Add function name in scope for recursive calls
|
2647
|
+
if (functionExpression.id) {
|
2648
|
+
scopeParams.push(functionExpression.id.name);
|
2649
|
+
}
|
2650
|
+
|
2651
|
+
this.inFunctionScope(true, scopeParams, () => {
|
2652
|
+
if (renameThis && !arrow) {
|
2653
|
+
this.setVariable("this", renameThis);
|
2654
|
+
}
|
2655
|
+
for (let i = 0; i < varInfoForArgs.length; i++) {
|
2656
|
+
const varInfo = varInfoForArgs[i];
|
2657
|
+
if (!varInfo) continue;
|
2658
|
+
if (!params[i] || params[i].type !== "Identifier") continue;
|
2659
|
+
this.setVariable(params[i].name, varInfo);
|
2660
|
+
}
|
2661
|
+
if (functionExpression.body.type === "BlockStatement") {
|
2662
|
+
this.detectMode(functionExpression.body.body);
|
2663
|
+
const prev = this.prevStatement;
|
2664
|
+
this.preWalkStatement(functionExpression.body);
|
2665
|
+
this.prevStatement = prev;
|
2666
|
+
this.walkStatement(functionExpression.body);
|
2667
|
+
} else {
|
2668
|
+
this.walkExpression(functionExpression.body);
|
2669
|
+
}
|
2670
|
+
});
|
2671
|
+
this.scope.topLevelScope = wasTopLevel;
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
walkImportExpression(expression) {
|
2675
|
+
let result = this.hooks.importCall.call(expression);
|
2676
|
+
if (result === true) return;
|
2677
|
+
|
2678
|
+
this.walkExpression(expression.source);
|
2679
|
+
}
|
2680
|
+
|
2681
|
+
walkCallExpression(expression) {
|
2682
|
+
const isSimpleFunction = fn => {
|
2683
|
+
return fn.params.every(p => p.type === "Identifier");
|
2684
|
+
};
|
2685
|
+
if (
|
2686
|
+
expression.callee.type === "MemberExpression" &&
|
2687
|
+
expression.callee.object.type.endsWith("FunctionExpression") &&
|
2688
|
+
!expression.callee.computed &&
|
2689
|
+
(expression.callee.property.name === "call" ||
|
2690
|
+
expression.callee.property.name === "bind") &&
|
2691
|
+
expression.arguments.length > 0 &&
|
2692
|
+
isSimpleFunction(expression.callee.object)
|
2693
|
+
) {
|
2694
|
+
// (function(…) { }.call/bind(?, …))
|
2695
|
+
this._walkIIFE(
|
2696
|
+
expression.callee.object,
|
2697
|
+
expression.arguments.slice(1),
|
2698
|
+
expression.arguments[0]
|
2699
|
+
);
|
2700
|
+
} else if (
|
2701
|
+
expression.callee.type.endsWith("FunctionExpression") &&
|
2702
|
+
isSimpleFunction(expression.callee)
|
2703
|
+
) {
|
2704
|
+
// (function(…) { }(…))
|
2705
|
+
this._walkIIFE(expression.callee, expression.arguments, null);
|
2706
|
+
} else {
|
2707
|
+
if (expression.callee.type === "MemberExpression") {
|
2708
|
+
const exprInfo = this.getMemberExpressionInfo(
|
2709
|
+
expression.callee,
|
2710
|
+
ALLOWED_MEMBER_TYPES_CALL_EXPRESSION
|
2711
|
+
);
|
2712
|
+
if (exprInfo && exprInfo.type === "call") {
|
2713
|
+
const result = this.callHooksForInfo(
|
2714
|
+
this.hooks.callMemberChainOfCallMemberChain,
|
2715
|
+
exprInfo.rootInfo,
|
2716
|
+
expression,
|
2717
|
+
exprInfo.getCalleeMembers(),
|
2718
|
+
exprInfo.call,
|
2719
|
+
exprInfo.getMembers()
|
2720
|
+
);
|
2721
|
+
if (result === true) return;
|
2722
|
+
}
|
2723
|
+
}
|
2724
|
+
const callee = this.evaluateExpression(expression.callee);
|
2725
|
+
if (callee.isIdentifier()) {
|
2726
|
+
const result1 = this.callHooksForInfo(
|
2727
|
+
this.hooks.callMemberChain,
|
2728
|
+
callee.rootInfo,
|
2729
|
+
expression,
|
2730
|
+
callee.getMembers()
|
2731
|
+
);
|
2732
|
+
if (result1 === true) return;
|
2733
|
+
const result2 = this.callHooksForInfo(
|
2734
|
+
this.hooks.call,
|
2735
|
+
callee.identifier,
|
2736
|
+
expression
|
2737
|
+
);
|
2738
|
+
if (result2 === true) return;
|
2739
|
+
}
|
2740
|
+
|
2741
|
+
if (expression.callee) {
|
2742
|
+
if (expression.callee.type === "MemberExpression") {
|
2743
|
+
// because of call context we need to walk the call context as expression
|
2744
|
+
this.walkExpression(expression.callee.object);
|
2745
|
+
if (expression.callee.computed === true)
|
2746
|
+
this.walkExpression(expression.callee.property);
|
2747
|
+
} else {
|
2748
|
+
this.walkExpression(expression.callee);
|
2749
|
+
}
|
2750
|
+
}
|
2751
|
+
if (expression.arguments) this.walkExpressions(expression.arguments);
|
2752
|
+
}
|
2753
|
+
}
|
2754
|
+
|
2755
|
+
walkMemberExpression(expression) {
|
2756
|
+
const exprInfo = this.getMemberExpressionInfo(
|
2757
|
+
expression,
|
2758
|
+
ALLOWED_MEMBER_TYPES_ALL
|
2759
|
+
);
|
2760
|
+
if (exprInfo) {
|
2761
|
+
switch (exprInfo.type) {
|
2762
|
+
case "expression": {
|
2763
|
+
const result1 = this.callHooksForInfo(
|
2764
|
+
this.hooks.expression,
|
2765
|
+
exprInfo.name,
|
2766
|
+
expression
|
2767
|
+
);
|
2768
|
+
if (result1 === true) return;
|
2769
|
+
const members = exprInfo.getMembers();
|
2770
|
+
const result2 = this.callHooksForInfo(
|
2771
|
+
this.hooks.expressionMemberChain,
|
2772
|
+
exprInfo.rootInfo,
|
2773
|
+
expression,
|
2774
|
+
members
|
2775
|
+
);
|
2776
|
+
if (result2 === true) return;
|
2777
|
+
this.walkMemberExpressionWithExpressionName(
|
2778
|
+
expression,
|
2779
|
+
exprInfo.name,
|
2780
|
+
exprInfo.rootInfo,
|
2781
|
+
members.slice(),
|
2782
|
+
() =>
|
2783
|
+
this.callHooksForInfo(
|
2784
|
+
this.hooks.unhandledExpressionMemberChain,
|
2785
|
+
exprInfo.rootInfo,
|
2786
|
+
expression,
|
2787
|
+
members
|
2788
|
+
)
|
2789
|
+
);
|
2790
|
+
return;
|
2791
|
+
}
|
2792
|
+
case "call": {
|
2793
|
+
const result = this.callHooksForInfo(
|
2794
|
+
this.hooks.memberChainOfCallMemberChain,
|
2795
|
+
exprInfo.rootInfo,
|
2796
|
+
expression,
|
2797
|
+
exprInfo.getCalleeMembers(),
|
2798
|
+
exprInfo.call,
|
2799
|
+
exprInfo.getMembers()
|
2800
|
+
);
|
2801
|
+
if (result === true) return;
|
2802
|
+
// Fast skip over the member chain as we already called memberChainOfCallMemberChain
|
2803
|
+
// and call computed property are literals anyway
|
2804
|
+
this.walkExpression(exprInfo.call);
|
2805
|
+
return;
|
2806
|
+
}
|
2807
|
+
}
|
2808
|
+
}
|
2809
|
+
this.walkExpression(expression.object);
|
2810
|
+
if (expression.computed === true) this.walkExpression(expression.property);
|
2811
|
+
}
|
2812
|
+
|
2813
|
+
walkMemberExpressionWithExpressionName(
|
2814
|
+
expression,
|
2815
|
+
name,
|
2816
|
+
rootInfo,
|
2817
|
+
members,
|
2818
|
+
onUnhandled
|
2819
|
+
) {
|
2820
|
+
if (expression.object.type === "MemberExpression") {
|
2821
|
+
// optimize the case where expression.object is a MemberExpression too.
|
2822
|
+
// we can keep info here when calling walkMemberExpression directly
|
2823
|
+
const property =
|
2824
|
+
expression.property.name || `${expression.property.value}`;
|
2825
|
+
name = name.slice(0, -property.length - 1);
|
2826
|
+
members.pop();
|
2827
|
+
const result = this.callHooksForInfo(
|
2828
|
+
this.hooks.expression,
|
2829
|
+
name,
|
2830
|
+
expression.object
|
2831
|
+
);
|
2832
|
+
if (result === true) return;
|
2833
|
+
this.walkMemberExpressionWithExpressionName(
|
2834
|
+
expression.object,
|
2835
|
+
name,
|
2836
|
+
rootInfo,
|
2837
|
+
members,
|
2838
|
+
onUnhandled
|
2839
|
+
);
|
2840
|
+
} else if (!onUnhandled || !onUnhandled()) {
|
2841
|
+
this.walkExpression(expression.object);
|
2842
|
+
}
|
2843
|
+
if (expression.computed === true) this.walkExpression(expression.property);
|
2844
|
+
}
|
2845
|
+
|
2846
|
+
walkThisExpression(expression) {
|
2847
|
+
this.callHooksForName(this.hooks.expression, "this", expression);
|
2848
|
+
}
|
2849
|
+
|
2850
|
+
walkIdentifier(expression) {
|
2851
|
+
this.callHooksForName(this.hooks.expression, expression.name, expression);
|
2852
|
+
}
|
2853
|
+
|
2854
|
+
/**
|
2855
|
+
* @param {MetaPropertyNode} metaProperty meta property
|
2856
|
+
*/
|
2857
|
+
walkMetaProperty(metaProperty) {
|
2858
|
+
this.hooks.expression.for(getRootName(metaProperty)).call(metaProperty);
|
2859
|
+
}
|
2860
|
+
|
2861
|
+
callHooksForExpression(hookMap, expr, ...args) {
|
2862
|
+
return this.callHooksForExpressionWithFallback(
|
2863
|
+
hookMap,
|
2864
|
+
expr,
|
2865
|
+
undefined,
|
2866
|
+
undefined,
|
2867
|
+
...args
|
2868
|
+
);
|
2869
|
+
}
|
2870
|
+
|
2871
|
+
/**
|
2872
|
+
* @template T
|
2873
|
+
* @template R
|
2874
|
+
* @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
|
2875
|
+
* @param {MemberExpressionNode} expr expression info
|
2876
|
+
* @param {function(string, string | ScopeInfo | VariableInfo, function(): string[]): any} fallback callback when variable in not handled by hooks
|
2877
|
+
* @param {function(string): any} defined callback when variable is defined
|
2878
|
+
* @param {AsArray<T>} args args for the hook
|
2879
|
+
* @returns {R} result of hook
|
2880
|
+
*/
|
2881
|
+
callHooksForExpressionWithFallback(
|
2882
|
+
hookMap,
|
2883
|
+
expr,
|
2884
|
+
fallback,
|
2885
|
+
defined,
|
2886
|
+
...args
|
2887
|
+
) {
|
2888
|
+
const exprName = this.getMemberExpressionInfo(
|
2889
|
+
expr,
|
2890
|
+
ALLOWED_MEMBER_TYPES_EXPRESSION
|
2891
|
+
);
|
2892
|
+
if (exprName !== undefined) {
|
2893
|
+
const members = exprName.getMembers();
|
2894
|
+
return this.callHooksForInfoWithFallback(
|
2895
|
+
hookMap,
|
2896
|
+
members.length === 0 ? exprName.rootInfo : exprName.name,
|
2897
|
+
fallback &&
|
2898
|
+
(name => fallback(name, exprName.rootInfo, exprName.getMembers)),
|
2899
|
+
defined && (() => defined(exprName.name)),
|
2900
|
+
...args
|
2901
|
+
);
|
2902
|
+
}
|
2903
|
+
}
|
2904
|
+
|
2905
|
+
/**
|
2906
|
+
* @template T
|
2907
|
+
* @template R
|
2908
|
+
* @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
|
2909
|
+
* @param {string} name key in map
|
2910
|
+
* @param {AsArray<T>} args args for the hook
|
2911
|
+
* @returns {R} result of hook
|
2912
|
+
*/
|
2913
|
+
callHooksForName(hookMap, name, ...args) {
|
2914
|
+
return this.callHooksForNameWithFallback(
|
2915
|
+
hookMap,
|
2916
|
+
name,
|
2917
|
+
undefined,
|
2918
|
+
undefined,
|
2919
|
+
...args
|
2920
|
+
);
|
2921
|
+
}
|
2922
|
+
|
2923
|
+
/**
|
2924
|
+
* @template T
|
2925
|
+
* @template R
|
2926
|
+
* @param {HookMap<SyncBailHook<T, R>>} hookMap hooks that should be called
|
2927
|
+
* @param {ExportedVariableInfo} info variable info
|
2928
|
+
* @param {AsArray<T>} args args for the hook
|
2929
|
+
* @returns {R} result of hook
|
2930
|
+
*/
|
2931
|
+
callHooksForInfo(hookMap, info, ...args) {
|
2932
|
+
return this.callHooksForInfoWithFallback(
|
2933
|
+
hookMap,
|
2934
|
+
info,
|
2935
|
+
undefined,
|
2936
|
+
undefined,
|
2937
|
+
...args
|
2938
|
+
);
|
2939
|
+
}
|
2940
|
+
|
2941
|
+
/**
|
2942
|
+
* @template T
|
2943
|
+
* @template R
|
2944
|
+
* @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
|
2945
|
+
* @param {ExportedVariableInfo} info variable info
|
2946
|
+
* @param {function(string): any} fallback callback when variable in not handled by hooks
|
2947
|
+
* @param {function(): any} defined callback when variable is defined
|
2948
|
+
* @param {AsArray<T>} args args for the hook
|
2949
|
+
* @returns {R} result of hook
|
2950
|
+
*/
|
2951
|
+
callHooksForInfoWithFallback(hookMap, info, fallback, defined, ...args) {
|
2952
|
+
let name;
|
2953
|
+
if (typeof info === "string") {
|
2954
|
+
name = info;
|
2955
|
+
} else {
|
2956
|
+
if (!(info instanceof VariableInfo)) {
|
2957
|
+
if (defined !== undefined) {
|
2958
|
+
return defined();
|
2959
|
+
}
|
2960
|
+
return;
|
2961
|
+
}
|
2962
|
+
let tagInfo = info.tagInfo;
|
2963
|
+
while (tagInfo !== undefined) {
|
2964
|
+
const hook = hookMap.get(tagInfo.tag);
|
2965
|
+
if (hook !== undefined) {
|
2966
|
+
this.currentTagData = tagInfo.data;
|
2967
|
+
const result = hook.call(...args);
|
2968
|
+
this.currentTagData = undefined;
|
2969
|
+
if (result !== undefined) return result;
|
2970
|
+
}
|
2971
|
+
tagInfo = tagInfo.next;
|
2972
|
+
}
|
2973
|
+
if (info.freeName === true) {
|
2974
|
+
if (defined !== undefined) {
|
2975
|
+
return defined();
|
2976
|
+
}
|
2977
|
+
return;
|
2978
|
+
}
|
2979
|
+
name = info.freeName;
|
2980
|
+
}
|
2981
|
+
const hook = hookMap.get(name);
|
2982
|
+
if (hook !== undefined) {
|
2983
|
+
const result = hook.call(...args);
|
2984
|
+
if (result !== undefined) return result;
|
2985
|
+
}
|
2986
|
+
if (fallback !== undefined) {
|
2987
|
+
return fallback(name);
|
2988
|
+
}
|
2989
|
+
}
|
2990
|
+
|
2991
|
+
/**
|
2992
|
+
* @template T
|
2993
|
+
* @template R
|
2994
|
+
* @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
|
2995
|
+
* @param {string} name key in map
|
2996
|
+
* @param {function(string): any} fallback callback when variable in not handled by hooks
|
2997
|
+
* @param {function(): any} defined callback when variable is defined
|
2998
|
+
* @param {AsArray<T>} args args for the hook
|
2999
|
+
* @returns {R} result of hook
|
3000
|
+
*/
|
3001
|
+
callHooksForNameWithFallback(hookMap, name, fallback, defined, ...args) {
|
3002
|
+
return this.callHooksForInfoWithFallback(
|
3003
|
+
hookMap,
|
3004
|
+
this.getVariableInfo(name),
|
3005
|
+
fallback,
|
3006
|
+
defined,
|
3007
|
+
...args
|
3008
|
+
);
|
3009
|
+
}
|
3010
|
+
|
3011
|
+
/**
|
3012
|
+
* @deprecated
|
3013
|
+
* @param {any} params scope params
|
3014
|
+
* @param {function(): void} fn inner function
|
3015
|
+
* @returns {void}
|
3016
|
+
*/
|
3017
|
+
inScope(params, fn) {
|
3018
|
+
const oldScope = this.scope;
|
3019
|
+
this.scope = {
|
3020
|
+
topLevelScope: oldScope.topLevelScope,
|
3021
|
+
inTry: false,
|
3022
|
+
inShorthand: false,
|
3023
|
+
isStrict: oldScope.isStrict,
|
3024
|
+
isAsmJs: oldScope.isAsmJs,
|
3025
|
+
definitions: oldScope.definitions.createChild()
|
3026
|
+
};
|
3027
|
+
|
3028
|
+
this.undefineVariable("this");
|
3029
|
+
|
3030
|
+
this.enterPatterns(params, (ident, pattern) => {
|
3031
|
+
this.defineVariable(ident);
|
3032
|
+
});
|
3033
|
+
|
3034
|
+
fn();
|
3035
|
+
|
3036
|
+
this.scope = oldScope;
|
3037
|
+
}
|
3038
|
+
|
3039
|
+
inFunctionScope(hasThis, params, fn) {
|
3040
|
+
const oldScope = this.scope;
|
3041
|
+
this.scope = {
|
3042
|
+
topLevelScope: oldScope.topLevelScope,
|
3043
|
+
inTry: false,
|
3044
|
+
inShorthand: false,
|
3045
|
+
isStrict: oldScope.isStrict,
|
3046
|
+
isAsmJs: oldScope.isAsmJs,
|
3047
|
+
definitions: oldScope.definitions.createChild()
|
3048
|
+
};
|
3049
|
+
|
3050
|
+
if (hasThis) {
|
3051
|
+
this.undefineVariable("this");
|
3052
|
+
}
|
3053
|
+
|
3054
|
+
this.enterPatterns(params, (ident, pattern) => {
|
3055
|
+
this.defineVariable(ident);
|
3056
|
+
});
|
3057
|
+
|
3058
|
+
fn();
|
3059
|
+
|
3060
|
+
this.scope = oldScope;
|
3061
|
+
}
|
3062
|
+
|
3063
|
+
inBlockScope(fn) {
|
3064
|
+
const oldScope = this.scope;
|
3065
|
+
this.scope = {
|
3066
|
+
topLevelScope: oldScope.topLevelScope,
|
3067
|
+
inTry: oldScope.inTry,
|
3068
|
+
inShorthand: false,
|
3069
|
+
isStrict: oldScope.isStrict,
|
3070
|
+
isAsmJs: oldScope.isAsmJs,
|
3071
|
+
definitions: oldScope.definitions.createChild()
|
3072
|
+
};
|
3073
|
+
|
3074
|
+
fn();
|
3075
|
+
|
3076
|
+
this.scope = oldScope;
|
3077
|
+
}
|
3078
|
+
|
3079
|
+
detectMode(statements) {
|
3080
|
+
const isLiteral =
|
3081
|
+
statements.length >= 1 &&
|
3082
|
+
statements[0].type === "ExpressionStatement" &&
|
3083
|
+
statements[0].expression.type === "Literal";
|
3084
|
+
if (isLiteral && statements[0].expression.value === "use strict") {
|
3085
|
+
this.scope.isStrict = true;
|
3086
|
+
}
|
3087
|
+
if (isLiteral && statements[0].expression.value === "use asm") {
|
3088
|
+
this.scope.isAsmJs = true;
|
3089
|
+
}
|
3090
|
+
}
|
3091
|
+
|
3092
|
+
enterPatterns(patterns, onIdent) {
|
3093
|
+
for (const pattern of patterns) {
|
3094
|
+
if (typeof pattern !== "string") {
|
3095
|
+
this.enterPattern(pattern, onIdent);
|
3096
|
+
} else if (pattern) {
|
3097
|
+
onIdent(pattern);
|
3098
|
+
}
|
3099
|
+
}
|
3100
|
+
}
|
3101
|
+
|
3102
|
+
enterPattern(pattern, onIdent) {
|
3103
|
+
if (!pattern) return;
|
3104
|
+
switch (pattern.type) {
|
3105
|
+
case "ArrayPattern":
|
3106
|
+
this.enterArrayPattern(pattern, onIdent);
|
3107
|
+
break;
|
3108
|
+
case "AssignmentPattern":
|
3109
|
+
this.enterAssignmentPattern(pattern, onIdent);
|
3110
|
+
break;
|
3111
|
+
case "Identifier":
|
3112
|
+
this.enterIdentifier(pattern, onIdent);
|
3113
|
+
break;
|
3114
|
+
case "ObjectPattern":
|
3115
|
+
this.enterObjectPattern(pattern, onIdent);
|
3116
|
+
break;
|
3117
|
+
case "RestElement":
|
3118
|
+
this.enterRestElement(pattern, onIdent);
|
3119
|
+
break;
|
3120
|
+
case "Property":
|
3121
|
+
if (pattern.shorthand && pattern.value.type === "Identifier") {
|
3122
|
+
this.scope.inShorthand = pattern.value.name;
|
3123
|
+
this.enterIdentifier(pattern.value, onIdent);
|
3124
|
+
this.scope.inShorthand = false;
|
3125
|
+
} else {
|
3126
|
+
this.enterPattern(pattern.value, onIdent);
|
3127
|
+
}
|
3128
|
+
break;
|
3129
|
+
}
|
3130
|
+
}
|
3131
|
+
|
3132
|
+
enterIdentifier(pattern, onIdent) {
|
3133
|
+
if (!this.callHooksForName(this.hooks.pattern, pattern.name, pattern)) {
|
3134
|
+
onIdent(pattern.name, pattern);
|
3135
|
+
}
|
3136
|
+
}
|
3137
|
+
|
3138
|
+
enterObjectPattern(pattern, onIdent) {
|
3139
|
+
for (
|
3140
|
+
let propIndex = 0, len = pattern.properties.length;
|
3141
|
+
propIndex < len;
|
3142
|
+
propIndex++
|
3143
|
+
) {
|
3144
|
+
const prop = pattern.properties[propIndex];
|
3145
|
+
this.enterPattern(prop, onIdent);
|
3146
|
+
}
|
3147
|
+
}
|
3148
|
+
|
3149
|
+
enterArrayPattern(pattern, onIdent) {
|
3150
|
+
for (
|
3151
|
+
let elementIndex = 0, len = pattern.elements.length;
|
3152
|
+
elementIndex < len;
|
3153
|
+
elementIndex++
|
3154
|
+
) {
|
3155
|
+
const element = pattern.elements[elementIndex];
|
3156
|
+
this.enterPattern(element, onIdent);
|
3157
|
+
}
|
3158
|
+
}
|
3159
|
+
|
3160
|
+
enterRestElement(pattern, onIdent) {
|
3161
|
+
this.enterPattern(pattern.argument, onIdent);
|
3162
|
+
}
|
3163
|
+
|
3164
|
+
enterAssignmentPattern(pattern, onIdent) {
|
3165
|
+
this.enterPattern(pattern.left, onIdent);
|
3166
|
+
}
|
3167
|
+
|
3168
|
+
/**
|
3169
|
+
* @param {ExpressionNode} expression expression node
|
3170
|
+
* @returns {BasicEvaluatedExpression | undefined} evaluation result
|
3171
|
+
*/
|
3172
|
+
evaluateExpression(expression) {
|
3173
|
+
try {
|
3174
|
+
const hook = this.hooks.evaluate.get(expression.type);
|
3175
|
+
if (hook !== undefined) {
|
3176
|
+
const result = hook.call(expression);
|
3177
|
+
if (result !== undefined) {
|
3178
|
+
if (result) {
|
3179
|
+
result.setExpression(expression);
|
3180
|
+
}
|
3181
|
+
return result;
|
3182
|
+
}
|
3183
|
+
}
|
3184
|
+
} catch (e) {
|
3185
|
+
console.warn(e);
|
3186
|
+
// ignore error
|
3187
|
+
}
|
3188
|
+
return new BasicEvaluatedExpression()
|
3189
|
+
.setRange(expression.range)
|
3190
|
+
.setExpression(expression);
|
3191
|
+
}
|
3192
|
+
|
3193
|
+
parseString(expression) {
|
3194
|
+
switch (expression.type) {
|
3195
|
+
case "BinaryExpression":
|
3196
|
+
if (expression.operator === "+") {
|
3197
|
+
return (
|
3198
|
+
this.parseString(expression.left) +
|
3199
|
+
this.parseString(expression.right)
|
3200
|
+
);
|
3201
|
+
}
|
3202
|
+
break;
|
3203
|
+
case "Literal":
|
3204
|
+
return expression.value + "";
|
3205
|
+
}
|
3206
|
+
throw new Error(
|
3207
|
+
expression.type + " is not supported as parameter for require"
|
3208
|
+
);
|
3209
|
+
}
|
3210
|
+
|
3211
|
+
parseCalculatedString(expression) {
|
3212
|
+
switch (expression.type) {
|
3213
|
+
case "BinaryExpression":
|
3214
|
+
if (expression.operator === "+") {
|
3215
|
+
const left = this.parseCalculatedString(expression.left);
|
3216
|
+
const right = this.parseCalculatedString(expression.right);
|
3217
|
+
if (left.code) {
|
3218
|
+
return {
|
3219
|
+
range: left.range,
|
3220
|
+
value: left.value,
|
3221
|
+
code: true,
|
3222
|
+
conditional: false
|
3223
|
+
};
|
3224
|
+
} else if (right.code) {
|
3225
|
+
return {
|
3226
|
+
range: [
|
3227
|
+
left.range[0],
|
3228
|
+
right.range ? right.range[1] : left.range[1]
|
3229
|
+
],
|
3230
|
+
value: left.value + right.value,
|
3231
|
+
code: true,
|
3232
|
+
conditional: false
|
3233
|
+
};
|
3234
|
+
} else {
|
3235
|
+
return {
|
3236
|
+
range: [left.range[0], right.range[1]],
|
3237
|
+
value: left.value + right.value,
|
3238
|
+
code: false,
|
3239
|
+
conditional: false
|
3240
|
+
};
|
3241
|
+
}
|
3242
|
+
}
|
3243
|
+
break;
|
3244
|
+
case "ConditionalExpression": {
|
3245
|
+
const consequent = this.parseCalculatedString(expression.consequent);
|
3246
|
+
const alternate = this.parseCalculatedString(expression.alternate);
|
3247
|
+
const items = [];
|
3248
|
+
if (consequent.conditional) {
|
3249
|
+
items.push(...consequent.conditional);
|
3250
|
+
} else if (!consequent.code) {
|
3251
|
+
items.push(consequent);
|
3252
|
+
} else {
|
3253
|
+
break;
|
3254
|
+
}
|
3255
|
+
if (alternate.conditional) {
|
3256
|
+
items.push(...alternate.conditional);
|
3257
|
+
} else if (!alternate.code) {
|
3258
|
+
items.push(alternate);
|
3259
|
+
} else {
|
3260
|
+
break;
|
3261
|
+
}
|
3262
|
+
return {
|
3263
|
+
range: undefined,
|
3264
|
+
value: "",
|
3265
|
+
code: true,
|
3266
|
+
conditional: items
|
3267
|
+
};
|
3268
|
+
}
|
3269
|
+
case "Literal":
|
3270
|
+
return {
|
3271
|
+
range: expression.range,
|
3272
|
+
value: expression.value + "",
|
3273
|
+
code: false,
|
3274
|
+
conditional: false
|
3275
|
+
};
|
3276
|
+
}
|
3277
|
+
return {
|
3278
|
+
range: undefined,
|
3279
|
+
value: "",
|
3280
|
+
code: true,
|
3281
|
+
conditional: false
|
3282
|
+
};
|
3283
|
+
}
|
3284
|
+
|
3285
|
+
/**
|
3286
|
+
* @param {string | Buffer | PreparsedAst} source the source to parse
|
3287
|
+
* @param {ParserState} state the parser state
|
3288
|
+
* @returns {ParserState} the parser state
|
3289
|
+
*/
|
3290
|
+
parse(source, state) {
|
3291
|
+
let ast;
|
3292
|
+
let comments;
|
3293
|
+
const semicolons = new Set();
|
3294
|
+
if (source === null) {
|
3295
|
+
throw new Error("source must not be null");
|
3296
|
+
}
|
3297
|
+
if (Buffer.isBuffer(source)) {
|
3298
|
+
source = source.toString("utf-8");
|
3299
|
+
}
|
3300
|
+
if (typeof source === "object") {
|
3301
|
+
ast = /** @type {ProgramNode} */ (source);
|
3302
|
+
comments = source.comments;
|
3303
|
+
} else {
|
3304
|
+
comments = [];
|
3305
|
+
ast = JavascriptParser._parse(source, {
|
3306
|
+
sourceType: this.sourceType,
|
3307
|
+
onComment: comments,
|
3308
|
+
onInsertedSemicolon: pos => semicolons.add(pos)
|
3309
|
+
});
|
3310
|
+
}
|
3311
|
+
|
3312
|
+
const oldScope = this.scope;
|
3313
|
+
const oldState = this.state;
|
3314
|
+
const oldComments = this.comments;
|
3315
|
+
const oldSemicolons = this.semicolons;
|
3316
|
+
const oldStatementPath = this.statementPath;
|
3317
|
+
const oldPrevStatement = this.prevStatement;
|
3318
|
+
this.scope = {
|
3319
|
+
topLevelScope: true,
|
3320
|
+
inTry: false,
|
3321
|
+
inShorthand: false,
|
3322
|
+
isStrict: false,
|
3323
|
+
isAsmJs: false,
|
3324
|
+
definitions: new StackedMap()
|
3325
|
+
};
|
3326
|
+
/** @type {ParserState} */
|
3327
|
+
this.state = state;
|
3328
|
+
this.comments = comments;
|
3329
|
+
this.semicolons = semicolons;
|
3330
|
+
this.statementPath = [];
|
3331
|
+
this.prevStatement = undefined;
|
3332
|
+
if (this.hooks.program.call(ast, comments) === undefined) {
|
3333
|
+
this.detectMode(ast.body);
|
3334
|
+
this.preWalkStatements(ast.body);
|
3335
|
+
this.prevStatement = undefined;
|
3336
|
+
this.blockPreWalkStatements(ast.body);
|
3337
|
+
this.prevStatement = undefined;
|
3338
|
+
this.walkStatements(ast.body);
|
3339
|
+
}
|
3340
|
+
this.hooks.finish.call(ast, comments);
|
3341
|
+
this.scope = oldScope;
|
3342
|
+
/** @type {ParserState} */
|
3343
|
+
this.state = oldState;
|
3344
|
+
this.comments = oldComments;
|
3345
|
+
this.semicolons = oldSemicolons;
|
3346
|
+
this.statementPath = oldStatementPath;
|
3347
|
+
this.prevStatement = oldPrevStatement;
|
3348
|
+
return state;
|
3349
|
+
}
|
3350
|
+
|
3351
|
+
evaluate(source) {
|
3352
|
+
const ast = JavascriptParser._parse("(" + source + ")", {
|
3353
|
+
sourceType: this.sourceType,
|
3354
|
+
locations: false
|
3355
|
+
});
|
3356
|
+
if (ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement") {
|
3357
|
+
throw new Error("evaluate: Source is not a expression");
|
3358
|
+
}
|
3359
|
+
return this.evaluateExpression(ast.body[0].expression);
|
3360
|
+
}
|
3361
|
+
|
3362
|
+
/**
|
3363
|
+
* @param {ExpressionNode | DeclarationNode | PrivateIdentifierNode | null | undefined} expr an expression
|
3364
|
+
* @param {number} commentsStartPos source position from which annotation comments are checked
|
3365
|
+
* @returns {boolean} true, when the expression is pure
|
3366
|
+
*/
|
3367
|
+
isPure(expr, commentsStartPos) {
|
3368
|
+
if (!expr) return true;
|
3369
|
+
const result = this.hooks.isPure
|
3370
|
+
.for(expr.type)
|
3371
|
+
.call(expr, commentsStartPos);
|
3372
|
+
if (typeof result === "boolean") return result;
|
3373
|
+
switch (expr.type) {
|
3374
|
+
case "ClassDeclaration":
|
3375
|
+
case "ClassExpression": {
|
3376
|
+
if (expr.body.type !== "ClassBody") return false;
|
3377
|
+
if (expr.superClass && !this.isPure(expr.superClass, expr.range[0])) {
|
3378
|
+
return false;
|
3379
|
+
}
|
3380
|
+
const items =
|
3381
|
+
/** @type {(MethodDefinitionNode | PropertyDefinitionNode)[]} */ (
|
3382
|
+
expr.body.body
|
3383
|
+
);
|
3384
|
+
return items.every(
|
3385
|
+
item =>
|
3386
|
+
(!item.computed ||
|
3387
|
+
!item.key ||
|
3388
|
+
this.isPure(item.key, item.range[0])) &&
|
3389
|
+
(!item.static ||
|
3390
|
+
!item.value ||
|
3391
|
+
this.isPure(
|
3392
|
+
item.value,
|
3393
|
+
item.key ? item.key.range[1] : item.range[0]
|
3394
|
+
))
|
3395
|
+
);
|
3396
|
+
}
|
3397
|
+
|
3398
|
+
case "FunctionDeclaration":
|
3399
|
+
case "FunctionExpression":
|
3400
|
+
case "ArrowFunctionExpression":
|
3401
|
+
case "Literal":
|
3402
|
+
case "PrivateIdentifier":
|
3403
|
+
return true;
|
3404
|
+
|
3405
|
+
case "VariableDeclaration":
|
3406
|
+
return expr.declarations.every(decl =>
|
3407
|
+
this.isPure(decl.init, decl.range[0])
|
3408
|
+
);
|
3409
|
+
|
3410
|
+
case "ConditionalExpression":
|
3411
|
+
return (
|
3412
|
+
this.isPure(expr.test, commentsStartPos) &&
|
3413
|
+
this.isPure(expr.consequent, expr.test.range[1]) &&
|
3414
|
+
this.isPure(expr.alternate, expr.consequent.range[1])
|
3415
|
+
);
|
3416
|
+
|
3417
|
+
case "SequenceExpression":
|
3418
|
+
return expr.expressions.every(expr => {
|
3419
|
+
const pureFlag = this.isPure(expr, commentsStartPos);
|
3420
|
+
commentsStartPos = expr.range[1];
|
3421
|
+
return pureFlag;
|
3422
|
+
});
|
3423
|
+
|
3424
|
+
case "CallExpression": {
|
3425
|
+
const pureFlag =
|
3426
|
+
expr.range[0] - commentsStartPos > 12 &&
|
3427
|
+
this.getComments([commentsStartPos, expr.range[0]]).some(
|
3428
|
+
comment =>
|
3429
|
+
comment.type === "Block" &&
|
3430
|
+
/^\s*(#|@)__PURE__\s*$/.test(comment.value)
|
3431
|
+
);
|
3432
|
+
if (!pureFlag) return false;
|
3433
|
+
commentsStartPos = expr.callee.range[1];
|
3434
|
+
return expr.arguments.every(arg => {
|
3435
|
+
if (arg.type === "SpreadElement") return false;
|
3436
|
+
const pureFlag = this.isPure(arg, commentsStartPos);
|
3437
|
+
commentsStartPos = arg.range[1];
|
3438
|
+
return pureFlag;
|
3439
|
+
});
|
3440
|
+
}
|
3441
|
+
}
|
3442
|
+
const evaluated = this.evaluateExpression(expr);
|
3443
|
+
return !evaluated.couldHaveSideEffects();
|
3444
|
+
}
|
3445
|
+
|
3446
|
+
getComments(range) {
|
3447
|
+
const [rangeStart, rangeEnd] = range;
|
3448
|
+
const compare = (comment, needle) => comment.range[0] - needle;
|
3449
|
+
let idx = binarySearchBounds.ge(this.comments, rangeStart, compare);
|
3450
|
+
let commentsInRange = [];
|
3451
|
+
while (this.comments[idx] && this.comments[idx].range[1] <= rangeEnd) {
|
3452
|
+
commentsInRange.push(this.comments[idx]);
|
3453
|
+
idx++;
|
3454
|
+
}
|
3455
|
+
|
3456
|
+
return commentsInRange;
|
3457
|
+
}
|
3458
|
+
|
3459
|
+
/**
|
3460
|
+
* @param {number} pos source code position
|
3461
|
+
* @returns {boolean} true when a semicolon has been inserted before this position, false if not
|
3462
|
+
*/
|
3463
|
+
isAsiPosition(pos) {
|
3464
|
+
const currentStatement = this.statementPath[this.statementPath.length - 1];
|
3465
|
+
if (currentStatement === undefined) throw new Error("Not in statement");
|
3466
|
+
return (
|
3467
|
+
// Either asking directly for the end position of the current statement
|
3468
|
+
(currentStatement.range[1] === pos && this.semicolons.has(pos)) ||
|
3469
|
+
// Or asking for the start position of the current statement,
|
3470
|
+
// here we have to check multiple things
|
3471
|
+
(currentStatement.range[0] === pos &&
|
3472
|
+
// is there a previous statement which might be relevant?
|
3473
|
+
this.prevStatement !== undefined &&
|
3474
|
+
// is the end position of the previous statement an ASI position?
|
3475
|
+
this.semicolons.has(this.prevStatement.range[1]))
|
3476
|
+
);
|
3477
|
+
}
|
3478
|
+
|
3479
|
+
/**
|
3480
|
+
* @param {number} pos source code position
|
3481
|
+
* @returns {void}
|
3482
|
+
*/
|
3483
|
+
unsetAsiPosition(pos) {
|
3484
|
+
this.semicolons.delete(pos);
|
3485
|
+
}
|
3486
|
+
|
3487
|
+
isStatementLevelExpression(expr) {
|
3488
|
+
const currentStatement = this.statementPath[this.statementPath.length - 1];
|
3489
|
+
return (
|
3490
|
+
expr === currentStatement ||
|
3491
|
+
(currentStatement.type === "ExpressionStatement" &&
|
3492
|
+
currentStatement.expression === expr)
|
3493
|
+
);
|
3494
|
+
}
|
3495
|
+
|
3496
|
+
getTagData(name, tag) {
|
3497
|
+
const info = this.scope.definitions.get(name);
|
3498
|
+
if (info instanceof VariableInfo) {
|
3499
|
+
let tagInfo = info.tagInfo;
|
3500
|
+
while (tagInfo !== undefined) {
|
3501
|
+
if (tagInfo.tag === tag) return tagInfo.data;
|
3502
|
+
tagInfo = tagInfo.next;
|
3503
|
+
}
|
3504
|
+
}
|
3505
|
+
}
|
3506
|
+
|
3507
|
+
tagVariable(name, tag, data) {
|
3508
|
+
const oldInfo = this.scope.definitions.get(name);
|
3509
|
+
/** @type {VariableInfo} */
|
3510
|
+
let newInfo;
|
3511
|
+
if (oldInfo === undefined) {
|
3512
|
+
newInfo = new VariableInfo(this.scope, name, {
|
3513
|
+
tag,
|
3514
|
+
data,
|
3515
|
+
next: undefined
|
3516
|
+
});
|
3517
|
+
} else if (oldInfo instanceof VariableInfo) {
|
3518
|
+
newInfo = new VariableInfo(oldInfo.declaredScope, oldInfo.freeName, {
|
3519
|
+
tag,
|
3520
|
+
data,
|
3521
|
+
next: oldInfo.tagInfo
|
3522
|
+
});
|
3523
|
+
} else {
|
3524
|
+
newInfo = new VariableInfo(oldInfo, true, {
|
3525
|
+
tag,
|
3526
|
+
data,
|
3527
|
+
next: undefined
|
3528
|
+
});
|
3529
|
+
}
|
3530
|
+
this.scope.definitions.set(name, newInfo);
|
3531
|
+
}
|
3532
|
+
|
3533
|
+
defineVariable(name) {
|
3534
|
+
const oldInfo = this.scope.definitions.get(name);
|
3535
|
+
// Don't redefine variable in same scope to keep existing tags
|
3536
|
+
if (oldInfo instanceof VariableInfo && oldInfo.declaredScope === this.scope)
|
3537
|
+
return;
|
3538
|
+
this.scope.definitions.set(name, this.scope);
|
3539
|
+
}
|
3540
|
+
|
3541
|
+
undefineVariable(name) {
|
3542
|
+
this.scope.definitions.delete(name);
|
3543
|
+
}
|
3544
|
+
|
3545
|
+
isVariableDefined(name) {
|
3546
|
+
const info = this.scope.definitions.get(name);
|
3547
|
+
if (info === undefined) return false;
|
3548
|
+
if (info instanceof VariableInfo) {
|
3549
|
+
return info.freeName === true;
|
3550
|
+
}
|
3551
|
+
return true;
|
3552
|
+
}
|
3553
|
+
|
3554
|
+
/**
|
3555
|
+
* @param {string} name variable name
|
3556
|
+
* @returns {ExportedVariableInfo} info for this variable
|
3557
|
+
*/
|
3558
|
+
getVariableInfo(name) {
|
3559
|
+
const value = this.scope.definitions.get(name);
|
3560
|
+
if (value === undefined) {
|
3561
|
+
return name;
|
3562
|
+
} else {
|
3563
|
+
return value;
|
3564
|
+
}
|
3565
|
+
}
|
3566
|
+
|
3567
|
+
/**
|
3568
|
+
* @param {string} name variable name
|
3569
|
+
* @param {ExportedVariableInfo} variableInfo new info for this variable
|
3570
|
+
* @returns {void}
|
3571
|
+
*/
|
3572
|
+
setVariable(name, variableInfo) {
|
3573
|
+
if (typeof variableInfo === "string") {
|
3574
|
+
if (variableInfo === name) {
|
3575
|
+
this.scope.definitions.delete(name);
|
3576
|
+
} else {
|
3577
|
+
this.scope.definitions.set(
|
3578
|
+
name,
|
3579
|
+
new VariableInfo(this.scope, variableInfo, undefined)
|
3580
|
+
);
|
3581
|
+
}
|
3582
|
+
} else {
|
3583
|
+
this.scope.definitions.set(name, variableInfo);
|
3584
|
+
}
|
3585
|
+
}
|
3586
|
+
|
3587
|
+
parseCommentOptions(range) {
|
3588
|
+
const comments = this.getComments(range);
|
3589
|
+
if (comments.length === 0) {
|
3590
|
+
return EMPTY_COMMENT_OPTIONS;
|
3591
|
+
}
|
3592
|
+
let options = {};
|
3593
|
+
let errors = [];
|
3594
|
+
for (const comment of comments) {
|
3595
|
+
const { value } = comment;
|
3596
|
+
if (value && webpackCommentRegExp.test(value)) {
|
3597
|
+
// try compile only if webpack options comment is present
|
3598
|
+
try {
|
3599
|
+
const val = vm.runInNewContext(`(function(){return {${value}};})()`);
|
3600
|
+
Object.assign(options, val);
|
3601
|
+
} catch (e) {
|
3602
|
+
e.comment = comment;
|
3603
|
+
errors.push(e);
|
3604
|
+
}
|
3605
|
+
}
|
3606
|
+
}
|
3607
|
+
return { options, errors };
|
3608
|
+
}
|
3609
|
+
|
3610
|
+
/**
|
3611
|
+
* @param {MemberExpressionNode} expression a member expression
|
3612
|
+
* @returns {{ members: string[], object: ExpressionNode | SuperNode }} member names (reverse order) and remaining object
|
3613
|
+
*/
|
3614
|
+
extractMemberExpressionChain(expression) {
|
3615
|
+
/** @type {AnyNode} */
|
3616
|
+
let expr = expression;
|
3617
|
+
const members = [];
|
3618
|
+
while (expr.type === "MemberExpression") {
|
3619
|
+
if (expr.computed) {
|
3620
|
+
if (expr.property.type !== "Literal") break;
|
3621
|
+
members.push(`${expr.property.value}`);
|
3622
|
+
} else {
|
3623
|
+
if (expr.property.type !== "Identifier") break;
|
3624
|
+
members.push(expr.property.name);
|
3625
|
+
}
|
3626
|
+
expr = expr.object;
|
3627
|
+
}
|
3628
|
+
return {
|
3629
|
+
members,
|
3630
|
+
object: expr
|
3631
|
+
};
|
3632
|
+
}
|
3633
|
+
|
3634
|
+
/**
|
3635
|
+
* @param {string} varName variable name
|
3636
|
+
* @returns {{name: string, info: VariableInfo | string}} name of the free variable and variable info for that
|
3637
|
+
*/
|
3638
|
+
getFreeInfoFromVariable(varName) {
|
3639
|
+
const info = this.getVariableInfo(varName);
|
3640
|
+
let name;
|
3641
|
+
if (info instanceof VariableInfo) {
|
3642
|
+
name = info.freeName;
|
3643
|
+
if (typeof name !== "string") return undefined;
|
3644
|
+
} else if (typeof info !== "string") {
|
3645
|
+
return undefined;
|
3646
|
+
} else {
|
3647
|
+
name = info;
|
3648
|
+
}
|
3649
|
+
return { info, name };
|
3650
|
+
}
|
3651
|
+
|
3652
|
+
/** @typedef {{ type: "call", call: CallExpressionNode, calleeName: string, rootInfo: string | VariableInfo, getCalleeMembers: () => string[], name: string, getMembers: () => string[]}} CallExpressionInfo */
|
3653
|
+
/** @typedef {{ type: "expression", rootInfo: string | VariableInfo, name: string, getMembers: () => string[]}} ExpressionExpressionInfo */
|
3654
|
+
|
3655
|
+
/**
|
3656
|
+
* @param {MemberExpressionNode} expression a member expression
|
3657
|
+
* @param {number} allowedTypes which types should be returned, presented in bit mask
|
3658
|
+
* @returns {CallExpressionInfo | ExpressionExpressionInfo | undefined} expression info
|
3659
|
+
*/
|
3660
|
+
getMemberExpressionInfo(expression, allowedTypes) {
|
3661
|
+
const { object, members } = this.extractMemberExpressionChain(expression);
|
3662
|
+
switch (object.type) {
|
3663
|
+
case "CallExpression": {
|
3664
|
+
if ((allowedTypes & ALLOWED_MEMBER_TYPES_CALL_EXPRESSION) === 0)
|
3665
|
+
return undefined;
|
3666
|
+
let callee = object.callee;
|
3667
|
+
let rootMembers = EMPTY_ARRAY;
|
3668
|
+
if (callee.type === "MemberExpression") {
|
3669
|
+
({ object: callee, members: rootMembers } =
|
3670
|
+
this.extractMemberExpressionChain(callee));
|
3671
|
+
}
|
3672
|
+
const rootName = getRootName(callee);
|
3673
|
+
if (!rootName) return undefined;
|
3674
|
+
const result = this.getFreeInfoFromVariable(rootName);
|
3675
|
+
if (!result) return undefined;
|
3676
|
+
const { info: rootInfo, name: resolvedRoot } = result;
|
3677
|
+
const calleeName = objectAndMembersToName(resolvedRoot, rootMembers);
|
3678
|
+
return {
|
3679
|
+
type: "call",
|
3680
|
+
call: object,
|
3681
|
+
calleeName,
|
3682
|
+
rootInfo,
|
3683
|
+
getCalleeMembers: memoize(() => rootMembers.reverse()),
|
3684
|
+
name: objectAndMembersToName(`${calleeName}()`, members),
|
3685
|
+
getMembers: memoize(() => members.reverse())
|
3686
|
+
};
|
3687
|
+
}
|
3688
|
+
case "Identifier":
|
3689
|
+
case "MetaProperty":
|
3690
|
+
case "ThisExpression": {
|
3691
|
+
if ((allowedTypes & ALLOWED_MEMBER_TYPES_EXPRESSION) === 0)
|
3692
|
+
return undefined;
|
3693
|
+
const rootName = getRootName(object);
|
3694
|
+
if (!rootName) return undefined;
|
3695
|
+
|
3696
|
+
const result = this.getFreeInfoFromVariable(rootName);
|
3697
|
+
if (!result) return undefined;
|
3698
|
+
const { info: rootInfo, name: resolvedRoot } = result;
|
3699
|
+
return {
|
3700
|
+
type: "expression",
|
3701
|
+
name: objectAndMembersToName(resolvedRoot, members),
|
3702
|
+
rootInfo,
|
3703
|
+
getMembers: memoize(() => members.reverse())
|
3704
|
+
};
|
3705
|
+
}
|
3706
|
+
}
|
3707
|
+
}
|
3708
|
+
|
3709
|
+
/**
|
3710
|
+
* @param {MemberExpressionNode} expression an expression
|
3711
|
+
* @returns {{ name: string, rootInfo: ExportedVariableInfo, getMembers: () => string[]}} name info
|
3712
|
+
*/
|
3713
|
+
getNameForExpression(expression) {
|
3714
|
+
return this.getMemberExpressionInfo(
|
3715
|
+
expression,
|
3716
|
+
ALLOWED_MEMBER_TYPES_EXPRESSION
|
3717
|
+
);
|
3718
|
+
}
|
3719
|
+
|
3720
|
+
/**
|
3721
|
+
* @param {string} code source code
|
3722
|
+
* @param {ParseOptions} options parsing options
|
3723
|
+
* @returns {ProgramNode} parsed ast
|
3724
|
+
*/
|
3725
|
+
static _parse(code, options) {
|
3726
|
+
const type = options ? options.sourceType : "module";
|
3727
|
+
/** @type {AcornOptions} */
|
3728
|
+
const parserOptions = {
|
3729
|
+
...defaultParserOptions,
|
3730
|
+
allowReturnOutsideFunction: type === "script",
|
3731
|
+
...options,
|
3732
|
+
sourceType: type === "auto" ? "module" : type
|
3733
|
+
};
|
3734
|
+
|
3735
|
+
/** @type {AnyNode} */
|
3736
|
+
let ast;
|
3737
|
+
let error;
|
3738
|
+
let threw = false;
|
3739
|
+
try {
|
3740
|
+
ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions));
|
3741
|
+
} catch (e) {
|
3742
|
+
error = e;
|
3743
|
+
threw = true;
|
3744
|
+
}
|
3745
|
+
|
3746
|
+
if (threw && type === "auto") {
|
3747
|
+
parserOptions.sourceType = "script";
|
3748
|
+
if (!("allowReturnOutsideFunction" in options)) {
|
3749
|
+
parserOptions.allowReturnOutsideFunction = true;
|
3750
|
+
}
|
3751
|
+
if (Array.isArray(parserOptions.onComment)) {
|
3752
|
+
parserOptions.onComment.length = 0;
|
3753
|
+
}
|
3754
|
+
try {
|
3755
|
+
ast = /** @type {AnyNode} */ (parser.parse(code, parserOptions));
|
3756
|
+
threw = false;
|
3757
|
+
} catch (e) {
|
3758
|
+
// we use the error from first parse try
|
3759
|
+
// so nothing to do here
|
3760
|
+
}
|
3761
|
+
}
|
3762
|
+
|
3763
|
+
if (threw) {
|
3764
|
+
throw error;
|
3765
|
+
}
|
3766
|
+
|
3767
|
+
return /** @type {ProgramNode} */ (ast);
|
3768
|
+
}
|
3769
|
+
}
|
3770
|
+
|
3771
|
+
module.exports = JavascriptParser;
|
3772
|
+
module.exports.ALLOWED_MEMBER_TYPES_ALL = ALLOWED_MEMBER_TYPES_ALL;
|
3773
|
+
module.exports.ALLOWED_MEMBER_TYPES_EXPRESSION =
|
3774
|
+
ALLOWED_MEMBER_TYPES_EXPRESSION;
|
3775
|
+
module.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION =
|
3776
|
+
ALLOWED_MEMBER_TYPES_CALL_EXPRESSION;
|