diff --git a/.eslintrc.js b/.eslintrc.js index 533142160..c69d2b749 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,6 +21,7 @@ module.exports = { 'coverage', '_tmp', 'cache', + 'wasm', '/test/*/samples/**/*.*', '!/test/*/samples/**/_config.js', '!/test/*/samples/**/rollup.config.js', diff --git a/.github/workflows/clean-cache.yml b/.github/workflows/clean-cache.yml index 7a085d8c7..17e217152 100644 --- a/.github/workflows/clean-cache.yml +++ b/.github/workflows/clean-cache.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cleanup run: | gh extension install actions/gh-actions-cache diff --git a/.github/workflows/repl-artefacts.yml b/.github/workflows/repl-artefacts.yml index 43034ba93..4fac89145 100644 --- a/.github/workflows/repl-artefacts.yml +++ b/.github/workflows/repl-artefacts.yml @@ -15,15 +15,34 @@ jobs: upload: permissions: pull-requests: write # for peter-evans/find-comment and peter-evans/create-or-update-comment - # TODO SWC re-enable for rollup-swc once it is working - if: ${{ (github.event.pull_request.head.repo.full_name == 'rollup/rollup' || contains( toJson(github.event.pull_request.labels), 'x⁸ ⚙️ build repl artefacts' )) && github.head_ref != 'rollup-swc' }} + if: ${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' || contains( toJson(github.event.pull_request.labels), 'x⁸ ⚙️ build repl artefacts' ) }} runs-on: ubuntu-latest name: Upload steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: refs/pull/${{ github.event.number }}/merge + - name: Install Toolchain + uses: dtolnay/rust-toolchain@stable + #TODO: remove after or before merging rollup-swc + if: ${{github.head_ref == 'rollup-swc'}} + with: + toolchain: nightly + targets: x86_64-unknown-linux-gnu + - name: Cache cargo + uses: actions/cache@v3 + #TODO: remove after or before merging rollup-swc + if: ${{github.head_ref == 'rollup-swc'}} + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + .cargo-cache + rust/target/ + key: cargo-cache-${{ hashFiles('rust/Cargo.lock') }} + restore-keys: cargo-cache - name: Setup Node uses: actions/setup-node@v3 with: @@ -38,6 +57,12 @@ jobs: if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci --ignore-scripts - name: Build artefacts + #TODO: remove after or before merging rollup-swc + if: ${{ github.head_ref == 'rollup-swc' }} + run: npm exec -- concurrently -c green,blue,yellow 'npm:build:napi -- --release' 'npm run build:wasm' 'npm:build:cjs' && npm run build:copy-native && npm run build:bootstrap + #TODO: remove after or before merging rollup-swc + - name: Build artefacts + if: ${{ github.head_ref != 'rollup-swc' }} run: npm run build:cjs && npm run build:bootstrap - name: Upload "${{ github.event.number }}/rollup.browser.js" to bucket uses: zdurham/s3-upload-github-action@master @@ -61,6 +86,19 @@ jobs: S3_KEY: ${{ github.event.number }}/rollup.browser.js.map AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - name: Upload "${{ github.event.number }}/bindings_wasm_bg.wasm" to bucket + uses: zdurham/s3-upload-github-action@master + #TODO: remove after or before merging rollup-swc + if: ${{github.head_ref == 'rollup-swc'}} + with: + args: --cache-control max-age=300,public + env: + FILE: browser/dist/bindings_wasm_bg.wasm + AWS_REGION: ${{ secrets.AWS_REGION }} + S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + S3_KEY: ${{ github.event.number }}/bindings_wasm_bg.wasm + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Find Comment uses: peter-evans/find-comment@v2 id: findComment diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 330ddfb64..8d4a2cb45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: name: Node 18 + Coverage (Linux) steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node @@ -50,7 +50,7 @@ jobs: name: Node 16 + Extra Tests (Linux) steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3 with: @@ -82,7 +82,7 @@ jobs: name: Node ${{ matrix.node }} (Linux) steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3 with: @@ -110,7 +110,7 @@ jobs: name: Node ${{ matrix.node }} (macOS) steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3 with: @@ -141,7 +141,7 @@ jobs: name: Node ${{ matrix.node }} (Windows) steps: - name: Checkout Commit - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index cbce95e0a..b71b81985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,58 @@ # rollup changelog +## 3.29.2 + +_2023-09-15_ + +### Bug Fixes + +- Export `TreeshakingPreset` type (#5131) + +### Pull Requests + +- [#5131](https://github.com/rollup/rollup/pull/5131): fix: exports `TreeshakingPreset` (@moltar) +- [#5134](https://github.com/rollup/rollup/pull/5134): docs: steps to enable symlinks on windows (@thebanjomatic) +- [#5137](https://github.com/rollup/rollup/pull/5137): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) + +## 3.29.1 + +_2023-09-10_ + +### Bug Fixes + +- Fix time measurement of plugin hooks in watch mode (#5114) +- Ensure accessing document.currentScript in import.meta.url returns correct results (#5118) + +### Pull Requests + +- [#5114](https://github.com/rollup/rollup/pull/5114): fix(perf): avoid superfluous timer wrappings in watch mode (@ZhengLiu2825) +- [#5118](https://github.com/rollup/rollup/pull/5118): fix: access document.currentScript at the top level (@TrickyPi) +- [#5125](https://github.com/rollup/rollup/pull/5125): chore(deps): update actions/checkout action to v4 (@renovate[bot]) +- [#5126](https://github.com/rollup/rollup/pull/5126): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5129](https://github.com/rollup/rollup/pull/5129): re-enbale repl-artefacts workflow for rollup-swc branch (@TrickyPi) + +## 3.29.0 + +_2023-09-06_ + +### Features + +- Add output.sourcemapFileNames option (#5105) +- Add generic type parameter for `api` to Plugin type (#5112) + +### Bug Fixes + +- Ensure mutations of CustomEvent details are tracked (#5123) + +### Pull Requests + +- [#5105](https://github.com/rollup/rollup/pull/5105): Added option to name sourcemap files, i.e. a output.sourcemapFileName… (@atti187) +- [#5108](https://github.com/rollup/rollup/pull/5108): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5109](https://github.com/rollup/rollup/pull/5109): Docs: load full path of rollup.browser.js for Rollup V4 (@TrickyPi) +- [#5112](https://github.com/rollup/rollup/pull/5112): feat(types): add generic type for plugin api (@sxzz) +- [#5115](https://github.com/rollup/rollup/pull/5115): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5123](https://github.com/rollup/rollup/pull/5123): Deoptimize custom event detail (@lukastaegert) + ## 3.28.1 _2023-08-22_ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 507bc79cd..33ef921d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,24 @@ We welcome any type of contribution, not only code. You can help with Working on your first Pull Request? You can learn how from this _free_ course, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). +### Git configuration to enable symlinks + +The unit tests in this projects make use of symlinks in the git project. On Windows, this may not work as expected without extra configuration. To configure git to create symlinks on windows, you need to enable the Windows "Developer Mode" setting, and also set the `core.symlinks` git feature using either of the following commands: + +```bash +# Global setting +git config --global core.symlinks true + +# Local setting +git config core.symlinks true +``` + +After applying this setting, you may need to reset your local branch to ensure the files get rewritten as symlinks. Note that this step is destructive and you will want to push any changes you have made prior to resetting your branch. + +```bash +git reset --hard +``` + ### How to run one test on your local machine With `npm run test` you can run all tests together. diff --git a/browser/package.json b/browser/package.json index 5840865d6..a20068e6b 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@rollup/browser", - "version": "3.28.1", + "version": "3.29.2", "description": "Next-generation ES module bundler browser build", "main": "dist/rollup.browser.js", "module": "dist/es/rollup.browser.js", diff --git a/cli/help.md b/cli/help.md index d943588d4..74afadf40 100644 --- a/cli/help.md +++ b/cli/help.md @@ -69,6 +69,7 @@ Basic options: --sourcemapBaseUrl Emit absolute sourcemap URLs with given base --sourcemapExcludeSources Do not include source code in source maps --sourcemapFile Specify bundle position for source maps +--sourcemapFileNames Name pattern for emitted sourcemaps --stdin=ext Specify file extension used for stdin input --no-stdin Do not read "-" from stdin --no-strict Don't emit `"use strict";` in the generated modules diff --git a/docs/command-line-interface/index.md b/docs/command-line-interface/index.md index 55a288fa9..98e3d2aae 100755 --- a/docs/command-line-interface/index.md +++ b/docs/command-line-interface/index.md @@ -106,6 +106,7 @@ export default { sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, + sourcemapFileNames, sourcemapIgnoreList, sourcemapPathTransform, validate, @@ -356,6 +357,7 @@ export default { 许多选项都有等效的命令行标志。在这些情况下,如果你正在使用配置文件,则此处传递的任何参数都将覆盖配置文件。以下是所有支持的选项列表: ``` +<<<<<<< HEAD -c, --config 使用此配置文件 (如果使用参数但未指定值,则默认为 rollup.config.js) -d, --dir 用于块的目录(如果不存在,则打印到 stdout) @@ -445,6 +447,98 @@ export default { --watch.onError 在 "ERROR" 事件上运行的 Shell 命令 --watch.onStart 在 "START" 事件上运行的 Shell 命令 --watch.skipWrite 在监视时不要将文件写入磁盘 +======= +-c, --config Use this config file (if argument is used but value + is unspecified, defaults to rollup.config.js) +-d, --dir Directory for chunks (if absent, prints to stdout) +-e, --external Comma-separate list of module IDs to exclude +-f, --format Type of output (amd, cjs, es, iife, umd, system) +-g, --globals Comma-separate list of `moduleID:Global` pairs +-h, --help Show this help message +-i, --input Input (alternative to ) +-m, --sourcemap Generate sourcemap (`-m inline` for inline map) +-n, --name Name for UMD export +-o, --file Single output file (if absent, prints to stdout) +-p, --plugin Use the plugin specified (may be repeated) +-v, --version Show version number +-w, --watch Watch files in bundle and rebuild on changes +--amd.autoId Generate the AMD ID based off the chunk name +--amd.basePath Path to prepend to auto generated AMD ID +--amd.define Function to use in place of `define` +--amd.forceJsExtensionForImports Use `.js` extension in AMD imports +--amd.id ID for AMD module (default is anonymous) +--assetFileNames Name pattern for emitted assets +--banner Code to insert at top of bundle (outside wrapper) +--chunkFileNames Name pattern for emitted secondary chunks +--compact Minify wrapper code +--context Specify top-level `this` value +--no-dynamicImportInCjs Write external dynamic CommonJS imports as require +--entryFileNames Name pattern for emitted entry chunks +--environment Settings passed to config file (see example) +--no-esModule Do not add __esModule property +--exports Specify export mode (auto, default, named, none) +--extend Extend global variable defined by --name +--no-externalImportAssertions Omit import assertions in "es" output +--no-externalLiveBindings Do not generate code to support live bindings +--failAfterWarnings Exit with an error if the build produced warnings +--filterLogs Filter log messages +--footer Code to insert at end of bundle (outside wrapper) +--no-freeze Do not freeze namespace objects +--generatedCode Which code features to use (es5/es2015) +--generatedCode.arrowFunctions Use arrow functions in generated code +--generatedCode.constBindings Use "const" in generated code +--generatedCode.objectShorthand Use shorthand properties in generated code +--no-generatedCode.reservedNamesAsProps Always quote reserved names as props +--generatedCode.symbols Use symbols in generated code +--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks +--no-indent Don't indent result +--inlineDynamicImports Create single bundle when using dynamic imports +--no-interop Do not include interop block +--intro Code to insert at top of bundle (inside wrapper) +--logLevel Which kind of logs to display +--no-makeAbsoluteExternalsRelative Prevent normalization of external imports +--maxParallelFileOps How many files to read in parallel +--minifyInternalExports Force or disable minification of internal exports +--noConflict Generate a noConflict method for UMD globals +--outro Code to insert at end of bundle (inside wrapper) +--perf Display performance timings +--no-preserveEntrySignatures Avoid facade chunks for entry points +--preserveModules Preserve module structure +--preserveModulesRoot Put preserved modules under this path at root level +--preserveSymlinks Do not follow symlinks when resolving files +--no-sanitizeFileName Do not replace invalid characters in file names +--shimMissingExports Create shim variables for missing exports +--silent Don't print warnings +--sourcemapBaseUrl Emit absolute sourcemap URLs with given base +--sourcemapExcludeSources Do not include source code in source maps +--sourcemapFile Specify bundle position for source maps +--sourcemapFileNames Name pattern for emitted sourcemaps +--stdin=ext Specify file extension used for stdin input +--no-stdin Do not read "-" from stdin +--no-strict Don't emit `"use strict";` in the generated modules +--strictDeprecations Throw errors for deprecated features +--no-systemNullSetters Do not replace empty SystemJS setters with `null` +--no-treeshake Disable tree-shaking optimisations +--no-treeshake.annotations Ignore pure call annotations +--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared +--treeshake.manualPureFunctions Manually declare functions as pure +--no-treeshake.moduleSideEffects Assume modules have no side effects +--no-treeshake.propertyReadSideEffects Ignore property access side effects +--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking +--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw +--validate Validate output +--waitForBundleInput Wait for bundle input files +--watch.buildDelay Throttle watch rebuilds +--no-watch.clearScreen Do not clear the screen when rebuilding +--watch.exclude Exclude files from being watched +--watch.include Limit watching to specified files +--watch.onBundleEnd Shell command to run on `"BUNDLE_END"` event +--watch.onBundleStart Shell command to run on `"BUNDLE_START"` event +--watch.onEnd Shell command to run on `"END"` event +--watch.onError Shell command to run on `"ERROR"` event +--watch.onStart Shell command to run on `"START"` event +--watch.skipWrite Do not write files to disk when watching +>>>>>>> e1a78ff8e61295edc88890f834e8763176692be6 ``` 以下标志仅通过命令行界面可用。所有其他标志都对应并覆盖其配置文件等效项,请参阅[选项大列表](../configuration-options/index.md)获取详细信息。 diff --git a/docs/configuration-options/index.md b/docs/configuration-options/index.md index 833756a83..436f71831 100755 --- a/docs/configuration-options/index.md +++ b/docs/configuration-options/index.md @@ -1470,7 +1470,27 @@ export default { 如果 `output` 设置了值,那么 `sourcemapFile` 不是必须的,这种情况下,它的值会通过输出文件名中添加“.map”推断出来。 +<<<<<<< HEAD ### output.sourcemapIgnoreList {#output-sourcemapignorelist} +======= +### output.sourcemapFileNames + +| | | +| ----: | :--------------------------------------------- | +| Type: | `string \| ((chunkInfo: ChunkInfo) => string)` | +| CLI: | `--sourcemapFileNames ` | + +The pattern to use for sourcemaps, or a function that is called per sourcemap to return such a pattern. Patterns support the following placeholders: + +- `[format]`: The rendering format defined in the output options, e.g. `es` or `cjs`. +- `[hash]`: A hash based only on the content of the final generated sourcemap. You can also set a specific hash length via e.g. `[hash:10]`. +- `[chunkhash]`: The same hash as the one used for the corresponding generated chunk (if any). +- `[name]`: The file name (without extension) of the entry point, unless the object form of input was used to define a different name. + +Forward slashes `/` can be used to place files in sub-directories. When using a function, `chunkInfo` is a reduced version of the one in [`generateBundle`](../plugin-development/index.md#generatebundle) without properties that depend on file names and no information about the rendered modules as rendering only happens after file names have been generated. You can however access a list of included `moduleIds`. See also [`output.assetFileNames`](#output-assetfilenames), [`output.chunkFileNames`](#output-chunkfilenames). + +### output.sourcemapIgnoreList +>>>>>>> e1a78ff8e61295edc88890f834e8763176692be6 | | | | --: | :-- | diff --git a/docs/javascript-api/index.md b/docs/javascript-api/index.md index 1c008bfa1..5a59d3a45 100755 --- a/docs/javascript-api/index.md +++ b/docs/javascript-api/index.md @@ -181,6 +181,7 @@ const outputOptions = { sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, + sourcemapFileNames, sourcemapIgnoreList, sourcemapPathTransform, validate, diff --git a/docs/repl/stores/options.ts b/docs/repl/stores/options.ts index 9d7693584..33cafd18e 100644 --- a/docs/repl/stores/options.ts +++ b/docs/repl/stores/options.ts @@ -311,14 +311,14 @@ export const useOptions = defineStore('options2', () => { available: optionOutputPreserveModules.value, name: 'output.preserveModulesRoot' }); - const optionOutputSourcemap = getBoolean({ - name: 'output.sourcemap' - }); const optionOutputSanitizeFileName = getBoolean({ available: alwaysTrue, defaultValue: true, name: 'output.sanitizeFileName' }); + const optionOutputSourcemap = getBoolean({ + name: 'output.sourcemap' + }); const optionOutputSourcemapBaseUrl = getString({ available: optionOutputSourcemap.value, name: 'output.sourcemapBaseUrl' @@ -327,12 +327,22 @@ export const useOptions = defineStore('options2', () => { available: optionOutputSourcemap.value, name: 'output.sourcemapExcludeSources' }); + const optionOutputSourcemapFileNames = getString({ + available: alwaysTrue, + defaultValue: undefined, + name: 'output.sourcemapFileNames' + }); const optionOutputStrict = getBoolean({ available: () => optionOutputFormat.value.value !== undefined && optionOutputFormat.value.value !== 'es', defaultValue: true, name: 'output.strict' }); + const optionOutputSystemNullSetters = getBoolean({ + available: () => optionOutputFormat.value.value === 'system', + defaultValue: true, + name: 'output.systemNullSetters' + }); const optionOutputValidate = getBoolean({ name: 'output.validate' }); @@ -342,11 +352,6 @@ export const useOptions = defineStore('options2', () => { name: 'preserveEntrySignatures', options: () => ['strict', 'allow-extension', 'exports-only', false] }); - const optionOutputSystemNullSetters = getBoolean({ - available: () => optionOutputFormat.value.value === 'system', - defaultValue: true, - name: 'output.systemNullSetters' - }); const optionShimMissingExports = getBoolean({ defaultValue: false, name: 'shimMissingExports' @@ -436,6 +441,7 @@ export const useOptions = defineStore('options2', () => { optionOutputPreserveModules, optionOutputPreserveModulesRoot, optionOutputSourcemap, + optionOutputSourcemapFileNames, optionOutputSanitizeFileName, optionOutputSourcemapBaseUrl, optionOutputSourcemapExcludeSources, diff --git a/package-lock.json b/package-lock.json index 1dc507ecf..9fd8d0265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rollup", - "version": "3.28.1", + "version": "3.29.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rollup", - "version": "3.28.1", + "version": "3.29.2", "license": "MIT", "bin": { "rollup": "dist/bin/rollup" @@ -17,9 +17,9 @@ "@codemirror/language": "^6.9.0", "@codemirror/search": "^6.5.2", "@codemirror/state": "^6.2.1", - "@codemirror/view": "^6.17.0", + "@codemirror/view": "^6.18.1", "@jridgewell/sourcemap-codec": "^1.4.15", - "@mermaid-js/mermaid-cli": "^10.3.1", + "@mermaid-js/mermaid-cli": "^10.4.0", "@rollup/plugin-alias": "^5.0.0", "@rollup/plugin-buble": "^1.0.2", "@rollup/plugin-commonjs": "^25.0.4", @@ -31,10 +31,10 @@ "@rollup/pluginutils": "^5.0.4", "@types/estree": "1.0.1", "@types/mocha": "^10.0.1", - "@types/node": "~14.18.56", + "@types/node": "~14.18.59", "@types/yargs-parser": "^21.0.0", - "@typescript-eslint/eslint-plugin": "^6.5.0", - "@typescript-eslint/parser": "^6.5.0", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", "acorn": "^8.10.0", @@ -46,11 +46,11 @@ "chokidar": "^3.5.3", "colorette": "^2.0.20", "concurrently": "^8.2.1", - "core-js": "^3.32.1", + "core-js": "^3.32.2", "date-time": "^4.0.0", "es5-shim": "^4.6.7", "es6-shim": "^0.35.8", - "eslint": "^8.48.0", + "eslint": "^8.49.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^5.0.0", @@ -62,20 +62,20 @@ "github-api": "^3.4.0", "hash.js": "^1.1.7", "husky": "^8.0.3", - "inquirer": "^9.2.10", - "is-reference": "^3.0.1", + "inquirer": "^9.2.11", + "is-reference": "^3.0.2", "lint-staged": "^14.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.3", "mocha": "^10.2.0", "nyc": "^15.1.0", "pinia": "^2.1.6", - "prettier": "^3.0.2", + "prettier": "^3.0.3", "pretty-bytes": "^6.1.1", "pretty-ms": "^8.0.0", "requirejs": "^2.3.6", - "rollup": "^3.28.1", - "rollup-plugin-license": "^3.0.1", + "rollup": "^3.29.1", + "rollup-plugin-license": "^3.1.0", "rollup-plugin-string": "^3.0.0", "rollup-plugin-thatworks": "^1.0.4", "semver": "^7.5.4", @@ -84,11 +84,11 @@ "source-map": "^0.7.4", "source-map-support": "^0.5.21", "systemjs": "^6.14.2", - "terser": "^5.19.2", + "terser": "^5.19.4", "tslib": "^2.6.2", "typescript": "^5.2.2", "vite": "^4.4.9", - "vitepress": "^1.0.0-rc.10", + "vitepress": "^1.0.0-rc.12", "vue": "^3.3.4", "weak-napi": "^2.0.2", "yargs-parser": "^21.1.1" @@ -156,132 +156,132 @@ } }, "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.19.1.tgz", - "integrity": "sha512-FYAZWcGsFTTaSAwj9Std8UML3Bu8dyWDncM7Ls8g+58UOe4XYdlgzXWbrIgjaguP63pCCbMoExKr61B+ztK3tw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.20.0.tgz", + "integrity": "sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.19.1" + "@algolia/cache-common": "4.20.0" } }, "node_modules/@algolia/cache-common": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.19.1.tgz", - "integrity": "sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.20.0.tgz", + "integrity": "sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==", "dev": true }, "node_modules/@algolia/cache-in-memory": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.19.1.tgz", - "integrity": "sha512-+PDWL+XALGvIginigzu8oU6eWw+o76Z8zHbBovWYcrtWOEtinbl7a7UTt3x3lthv+wNuFr/YD1Gf+B+A9V8n5w==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.20.0.tgz", + "integrity": "sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.19.1" + "@algolia/cache-common": "4.20.0" } }, "node_modules/@algolia/client-account": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.19.1.tgz", - "integrity": "sha512-Oy0ritA2k7AMxQ2JwNpfaEcgXEDgeyKu0V7E7xt/ZJRdXfEpZcwp9TOg4TJHC7Ia62gIeT2Y/ynzsxccPw92GA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.20.0.tgz", + "integrity": "sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==", "dev": true, "dependencies": { - "@algolia/client-common": "4.19.1", - "@algolia/client-search": "4.19.1", - "@algolia/transporter": "4.19.1" + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/@algolia/client-analytics": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.19.1.tgz", - "integrity": "sha512-5QCq2zmgdZLIQhHqwl55ZvKVpLM3DNWjFI4T+bHr3rGu23ew2bLO4YtyxaZeChmDb85jUdPDouDlCumGfk6wOg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.20.0.tgz", + "integrity": "sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==", "dev": true, "dependencies": { - "@algolia/client-common": "4.19.1", - "@algolia/client-search": "4.19.1", - "@algolia/requester-common": "4.19.1", - "@algolia/transporter": "4.19.1" + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/@algolia/client-common": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.19.1.tgz", - "integrity": "sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.20.0.tgz", + "integrity": "sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.19.1", - "@algolia/transporter": "4.19.1" + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/@algolia/client-personalization": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.19.1.tgz", - "integrity": "sha512-8CWz4/H5FA+krm9HMw2HUQenizC/DxUtsI5oYC0Jxxyce1vsr8cb1aEiSJArQT6IzMynrERif1RVWLac1m36xw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.20.0.tgz", + "integrity": "sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==", "dev": true, "dependencies": { - "@algolia/client-common": "4.19.1", - "@algolia/requester-common": "4.19.1", - "@algolia/transporter": "4.19.1" + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/@algolia/client-search": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.19.1.tgz", - "integrity": "sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.20.0.tgz", + "integrity": "sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==", "dev": true, "dependencies": { - "@algolia/client-common": "4.19.1", - "@algolia/requester-common": "4.19.1", - "@algolia/transporter": "4.19.1" + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/@algolia/logger-common": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.19.1.tgz", - "integrity": "sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.20.0.tgz", + "integrity": "sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==", "dev": true }, "node_modules/@algolia/logger-console": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.19.1.tgz", - "integrity": "sha512-jj72k9GKb9W0c7TyC3cuZtTr0CngLBLmc8trzZlXdfvQiigpUdvTi1KoWIb2ZMcRBG7Tl8hSb81zEY3zI2RlXg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.20.0.tgz", + "integrity": "sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==", "dev": true, "dependencies": { - "@algolia/logger-common": "4.19.1" + "@algolia/logger-common": "4.20.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.19.1.tgz", - "integrity": "sha512-09K/+t7lptsweRTueHnSnmPqIxbHMowejAkn9XIcJMLdseS3zl8ObnS5GWea86mu3vy4+8H+ZBKkUN82Zsq/zg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.20.0.tgz", + "integrity": "sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.19.1" + "@algolia/requester-common": "4.20.0" } }, "node_modules/@algolia/requester-common": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.19.1.tgz", - "integrity": "sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.20.0.tgz", + "integrity": "sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==", "dev": true }, "node_modules/@algolia/requester-node-http": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.19.1.tgz", - "integrity": "sha512-6DK52DHviBHTG2BK/Vv2GIlEw7i+vxm7ypZW0Z7vybGCNDeWzADx+/TmxjkES2h15+FZOqVf/Ja677gePsVItA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.20.0.tgz", + "integrity": "sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==", "dev": true, "dependencies": { - "@algolia/requester-common": "4.19.1" + "@algolia/requester-common": "4.20.0" } }, "node_modules/@algolia/transporter": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.19.1.tgz", - "integrity": "sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.20.0.tgz", + "integrity": "sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==", "dev": true, "dependencies": { - "@algolia/cache-common": "4.19.1", - "@algolia/logger-common": "4.19.1", - "@algolia/requester-common": "4.19.1" + "@algolia/cache-common": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/requester-common": "4.20.0" } }, "node_modules/@ampproject/remapping": { @@ -298,12 +298,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { @@ -376,21 +376,21 @@ } }, "node_modules/@babel/core": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", - "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.19.tgz", + "integrity": "sha512-Q8Yj5X4LHVYTbLCKVz0//2D2aDmHF4xzCdEttYvKOnWvErGsa6geHXD6w46x64n5tP69VfeH+IfSrdyH3MLhwA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-compilation-targets": "^7.22.10", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.11", - "@babel/parser": "^7.22.11", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.22.19", + "@babel/helpers": "^7.22.15", + "@babel/parser": "^7.22.16", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.19", + "@babel/types": "^7.22.19", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -406,12 +406,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.15.tgz", + "integrity": "sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.22.15", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -433,13 +433,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", - "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", "browserslist": "^4.21.9", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -483,28 +483,28 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.19.tgz", + "integrity": "sha512-m6h1cJvn+OJ+R3jOHp30faq5xKJ7VbjwDj5RGgHuRlU9hrMeKsGC+JpihkR5w1g7IfseCPPtZ0r7/hB4UKaYlA==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.19" }, "engines": { "node": ">=6.9.0" @@ -547,41 +547,41 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.19.tgz", + "integrity": "sha512-Tinq7ybnEPFFXhlYOYFiSjespWQk0dq2dRNAiMdRTOYQzEGqnnNyrTxPYHP5r6wGjlF1rFgABdDV0g8EwD6Qbg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", - "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.15.tgz", + "integrity": "sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.11", - "@babel/types": "^7.22.11" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", @@ -649,9 +649,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", - "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "version": "7.22.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", + "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -661,9 +661,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz", - "integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -673,33 +673,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.19.tgz", + "integrity": "sha512-ZCcpVPK64krfdScRbpxF6xA5fz7IOsfMwx1tcACvCzt6JY+0aHkBk7eIU8FRDSZRU5Zei6Z4JfgAxN1bqXGECg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-function-name": "^7.22.5", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.22.16", + "@babel/types": "^7.22.19", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -717,13 +717,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", + "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.19", "to-fast-properties": "^2.0.0" }, "engines": { @@ -731,14 +731,14 @@ } }, "node_modules/@codemirror/autocomplete": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.9.0.tgz", - "integrity": "sha512-Fbwm0V/Wn3BkEJZRhr0hi5BhCo5a7eBL6LYaliPjOSwCyfOpnjXY59HruSxOUNV+1OYer0Tgx1zRNQttjXyDog==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.9.1.tgz", + "integrity": "sha512-yma56tqD7khIZK4gy4X5lX3/k5ArMiCGat7HEWRF/8L2kqOjVdp2qKZqpcJjwTIjSj6fqKAHqi7IjtH3QFE+Bw==", "dev": true, "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.6.0", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0" }, "peerDependencies": { @@ -790,9 +790,9 @@ } }, "node_modules/@codemirror/lint": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.0.tgz", - "integrity": "sha512-6VZ44Ysh/Zn07xrGkdtNfmHCbGSHZzFBdzWi0pbd7chAQ/iUcpLGX99NYRZTa7Ugqg4kEHCqiHhcZnH0gLIgSg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.2.tgz", + "integrity": "sha512-wzRkluWb1ptPKdzlsrbwwjYCPLgzU6N88YBAmlZi8WFyuiEduSd05MnJYNogzyc8rPK7pj6m95ptUApc8sHKVA==", "dev": true, "dependencies": { "@codemirror/state": "^6.0.0", @@ -801,9 +801,9 @@ } }, "node_modules/@codemirror/search": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.2.tgz", - "integrity": "sha512-WRihpqd0l9cEh9J3IZe45Yi+Z5MfTsEXnyc3V7qXHP4ZYtIYpGOn+EJ7fyLIkyAm/8S6QIr7/mMISfAadf8zCg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.3.tgz", + "integrity": "sha512-M1nGnpUTlOqp0Ywn6V30T8eFcuNFIDfx4+0ja5Wag+qQpL/HZgsIZ7FpE6qZatPziakgj+UXyZTrTUditrkwIQ==", "dev": true, "dependencies": { "@codemirror/state": "^6.0.0", @@ -818,9 +818,9 @@ "dev": true }, "node_modules/@codemirror/view": { - "version": "6.17.1", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.17.1.tgz", - "integrity": "sha512-I5KVxsLbm1f56n9SUajLW0/AzMXYEZVvkiYahMw/yGl5gUjT2WquuKO39xUtiT4z/hNhGD7YuAEVPI8u0mncaQ==", + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.19.0.tgz", + "integrity": "sha512-XqNIfW/3GaaF+T7Q1jBcRLCPm1NbrR2DBxrXacSt1FG+rNsdsNn3/azAfgpUoJ7yy4xgd8xTPa3AlL+y0lMizQ==", "dev": true, "dependencies": { "@codemirror/state": "^6.1.4", @@ -1244,9 +1244,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.7.0.tgz", - "integrity": "sha512-+HencqxU7CFJnQb7IKtuNBqS6Yx3Tz4kOL8BJXo+JyeiBm5MEX6pO8onXDkjrkCRlfYXS1Axro15ZjVFe9YgsA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1276,18 +1276,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", - "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", + "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1527,9 +1527,9 @@ } }, "node_modules/@mermaid-js/mermaid-cli": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-10.3.1.tgz", - "integrity": "sha512-38MNsaqsie5v6urP0Sc8+nSEUDEbYONqHwqeE8vn9O8Sjvdj60G1GBN3UJPo2f+O2eReqzzq8LGRveKzJjdykQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-10.4.0.tgz", + "integrity": "sha512-sXohfGD6xgR8VEKvLdvSCndFaFNVTlyXjgZlJ3x8U3/J0V2VTfLIZO94Gt8KUPUccFWci8dRYDGG0fQerB+aIA==", "dev": true, "dependencies": { "chalk": "^5.0.1", @@ -1956,9 +1956,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.56", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.56.tgz", - "integrity": "sha512-+k+57NVS9opgrEn5l9c0gvD1r6C+PtyhVE4BTnMMRwiEA8ZO8uFcs6Yy2sXIy0eC95ZurBtRSvhZiHXBysbl6w==", + "version": "14.18.59", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.59.tgz", + "integrity": "sha512-NWJMpBL2Xs3MY93yrD6YrrTKep8eIA6iMnfG4oIc6LrTRlBZgiSCGiY3V/Owlp6umIBLyKb4F8Q7hxWatjYH5A==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -1984,9 +1984,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", "dev": true }, "node_modules/@types/web-bluetooth": { @@ -2012,16 +2012,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz", - "integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz", + "integrity": "sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.5.0", - "@typescript-eslint/type-utils": "6.5.0", - "@typescript-eslint/utils": "6.5.0", - "@typescript-eslint/visitor-keys": "6.5.0", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/type-utils": "6.7.0", + "@typescript-eslint/utils": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2047,15 +2047,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.5.0.tgz", - "integrity": "sha512-LMAVtR5GN8nY0G0BadkG0XIe4AcNMeyEy3DyhKGAh9k4pLSMBO7rF29JvDBpZGCmp5Pgz5RLHP6eCpSYZJQDuQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.0.tgz", + "integrity": "sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.5.0", - "@typescript-eslint/types": "6.5.0", - "@typescript-eslint/typescript-estree": "6.5.0", - "@typescript-eslint/visitor-keys": "6.5.0", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4" }, "engines": { @@ -2075,13 +2075,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz", - "integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz", + "integrity": "sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.5.0", - "@typescript-eslint/visitor-keys": "6.5.0" + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2092,13 +2092,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz", - "integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz", + "integrity": "sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.5.0", - "@typescript-eslint/utils": "6.5.0", + "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/utils": "6.7.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2119,9 +2119,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz", - "integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.0.tgz", + "integrity": "sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2132,13 +2132,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz", - "integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz", + "integrity": "sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.5.0", - "@typescript-eslint/visitor-keys": "6.5.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2159,17 +2159,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz", - "integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.0.tgz", + "integrity": "sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.5.0", - "@typescript-eslint/types": "6.5.0", - "@typescript-eslint/typescript-estree": "6.5.0", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/typescript-estree": "6.7.0", "semver": "^7.5.4" }, "engines": { @@ -2184,12 +2184,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz", - "integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz", + "integrity": "sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/types": "6.7.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2839,25 +2839,25 @@ } }, "node_modules/algoliasearch": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.19.1.tgz", - "integrity": "sha512-IJF5b93b2MgAzcE/tuzW0yOPnuUyRgGAtaPv5UUywXM8kzqfdwZTO4sPJBzoGz1eOy6H9uEchsJsBFTELZSu+g==", - "dev": true, - "dependencies": { - "@algolia/cache-browser-local-storage": "4.19.1", - "@algolia/cache-common": "4.19.1", - "@algolia/cache-in-memory": "4.19.1", - "@algolia/client-account": "4.19.1", - "@algolia/client-analytics": "4.19.1", - "@algolia/client-common": "4.19.1", - "@algolia/client-personalization": "4.19.1", - "@algolia/client-search": "4.19.1", - "@algolia/logger-common": "4.19.1", - "@algolia/logger-console": "4.19.1", - "@algolia/requester-browser-xhr": "4.19.1", - "@algolia/requester-common": "4.19.1", - "@algolia/requester-node-http": "4.19.1", - "@algolia/transporter": "4.19.1" + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.20.0.tgz", + "integrity": "sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.20.0", + "@algolia/cache-common": "4.20.0", + "@algolia/cache-in-memory": "4.20.0", + "@algolia/client-account": "4.20.0", + "@algolia/client-analytics": "4.20.0", + "@algolia/client-common": "4.20.0", + "@algolia/client-personalization": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/logger-console": "4.20.0", + "@algolia/requester-browser-xhr": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/requester-node-http": "4.20.0", + "@algolia/transporter": "4.20.0" } }, "node_modules/ansi-colors": { @@ -2983,15 +2983,15 @@ } }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "is-string": "^1.0.7" }, "engines": { @@ -3011,16 +3011,16 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz", - "integrity": "sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "get-intrinsic": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -3030,14 +3030,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -3048,14 +3048,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -3066,14 +3066,15 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", - "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "call-bind": "^1.0.2", "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "get-intrinsic": "^1.2.1", "is-array-buffer": "^3.0.2", "is-shared-array-buffer": "^1.0.2" @@ -3457,9 +3458,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001522", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz", - "integrity": "sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==", + "version": "1.0.30001534", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", + "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", "dev": true, "funding": [ { @@ -3597,9 +3598,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", - "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", + "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", "dev": true, "engines": { "node": ">=6" @@ -3899,9 +3900,9 @@ "dev": true }, "node_modules/core-js": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.1.tgz", - "integrity": "sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==", + "version": "3.32.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz", + "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==", "dev": true, "hasInstallScript": true, "funding": { @@ -4107,6 +4108,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -4120,11 +4135,12 @@ } }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -4181,9 +4197,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.502", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.502.tgz", - "integrity": "sha512-xqeGw3Gr6o3uyHy/yKjdnDQHY2RQvXcGC2cfHjccK1IGkH6cX1WQBN8EeC/YpwPhGkBaikDTecJ8+ssxSVRQlw==", + "version": "1.4.521", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.521.tgz", + "integrity": "sha512-88W7FAsYzc3Vy2mGCFe/YTD6kvoJpqeLRBd5NFMRMdYNqsjHYzkn/mGxaOFJ8yYfLuQqC6vpDYbN6Ps5mtIM3w==", "dev": true }, "node_modules/emoji-regex": { @@ -4217,18 +4233,18 @@ } }, "node_modules/es-abstract": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", - "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", + "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", @@ -4244,23 +4260,23 @@ "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", - "safe-array-concat": "^1.0.0", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", "typed-array-buffer": "^1.0.0", "typed-array-byte-length": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.10" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -4389,16 +4405,16 @@ } }, "node_modules/eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", - "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", + "version": "8.49.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", + "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/js": "8.49.0", + "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.12.4", @@ -5081,16 +5097,17 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flatted": { @@ -5231,15 +5248,15 @@ "dev": true }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -5782,9 +5799,9 @@ "dev": true }, "node_modules/inquirer": { - "version": "9.2.10", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.10.tgz", - "integrity": "sha512-tVVNFIXU8qNHoULiazz612GFl+yqNfjMTbLuViNJE/d860Qxrd3NMrse8dm40VUQLOQeULvaQF8lpAhvysjeyA==", + "version": "9.2.11", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.11.tgz", + "integrity": "sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g==", "dev": true, "dependencies": { "@ljharb/through": "^2.3.9", @@ -6080,9 +6097,9 @@ } }, "node_modules/is-reference": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.1.tgz", - "integrity": "sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", "dev": true, "dependencies": { "@types/estree": "*" @@ -6417,6 +6434,12 @@ "node": ">=6" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -6465,6 +6488,15 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -7067,15 +7099,18 @@ "dev": true }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "dev": true, "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "dist/cjs/src/bin.js" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mkdirp-classic": { @@ -7355,9 +7390,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "dev": true, "bin": { "node-gyp-build": "bin.js", @@ -7660,14 +7695,14 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", - "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -7677,26 +7712,26 @@ } }, "node_modules/object.groupby": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.0.tgz", - "integrity": "sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", + "es-abstract": "^1.22.1", "get-intrinsic": "^1.2.1" } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -8094,9 +8129,9 @@ } }, "node_modules/pinia/node_modules/vue-demi": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", - "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", "dev": true, "hasInstallScript": true, "bin": { @@ -8193,9 +8228,9 @@ } }, "node_modules/postcss": { - "version": "8.4.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", - "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "version": "8.4.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", + "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", "dev": true, "funding": [ { @@ -8271,9 +8306,9 @@ } }, "node_modules/prettier": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz", - "integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -8618,14 +8653,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -8740,9 +8775,9 @@ } }, "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "version": "1.22.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.5.tgz", + "integrity": "sha512-qWhv7PF1V95QPvRoUGHxOtnAlEvlXBylMZcjUR9pAumMmveFtcHJRXGIr+TkjfNJVQypqv2qcDiiars2y1PsSg==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -8860,9 +8895,9 @@ } }, "node_modules/rollup": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.1.tgz", - "integrity": "sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==", + "version": "3.29.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.1.tgz", + "integrity": "sha512-c+ebvQz0VIH4KhhCpDsI+Bik0eT8ZFEVZEYw0cGMVqIP8zc+gnwl7iXCamTw7vzv2MeuZFZfdx5JJIq+ehzDlg==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8876,16 +8911,16 @@ } }, "node_modules/rollup-plugin-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.0.1.tgz", - "integrity": "sha512-/lec6Y94Y3wMfTDeYTO/jSXII0GQ/XkDZCiqkMKxyU5D5nGPaxr/2JNYvAgYsoCYuOLGOanKDPjCCQiTT96p7A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.1.0.tgz", + "integrity": "sha512-Cny2H2hJ7K+VdcJkH1pNcYRVhqIhZNu/fPusedW53fNZQOIwpXiznJ220EFvDkJbFUEkLqIDsDB5bEr/N9qfqw==", "dev": true, "dependencies": { "commenting": "~1.1.0", "glob": "~7.2.0", "lodash": "~4.17.21", - "magic-string": "~0.26.2", - "mkdirp": "~1.0.4", + "magic-string": "~0.30.0", + "mkdirp": "~3.0.0", "moment": "~2.29.3", "package-name-regex": "~2.0.6", "spdx-expression-validate": "~2.0.0", @@ -8918,18 +8953,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rollup-plugin-license/node_modules/magic-string": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz", - "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/rollup-plugin-string": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz", @@ -9115,13 +9138,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", + "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -9173,14 +9196,11 @@ "dev": true }, "node_modules/search-insights": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.7.0.tgz", - "integrity": "sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.8.2.tgz", + "integrity": "sha512-PxA9M5Q2bpBelVvJ3oDZR8nuY00Z6qwOxL53wNpgzV28M/D6u9WUbImDckjLSILBF8F1hn/mgyuUaOPtjow4Qw==", "dev": true, - "peer": true, - "engines": { - "node": ">=8.16.0" - } + "peer": true }, "node_modules/semver": { "version": "7.5.4", @@ -9230,6 +9250,20 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate-napi": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/setimmediate-napi/-/setimmediate-napi-1.0.6.tgz", @@ -9308,9 +9342,9 @@ } }, "node_modules/shiki": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", - "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.4.tgz", + "integrity": "sha512-IXCRip2IQzKwxArNNq1S+On4KPML3Yyn8Zzs/xRgcgOWIr8ntIK3IKzjFPfjy/7kt9ZMjc+FItfqHRBg8b6tNQ==", "dev": true, "dependencies": { "ansi-sequence-parser": "^1.1.0", @@ -9585,14 +9619,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -9602,28 +9636,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9776,9 +9810,9 @@ } }, "node_modules/terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "version": "5.19.4", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.4.tgz", + "integrity": "sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -9918,9 +9952,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", - "integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", "dev": true, "engines": { "node": ">=16.13.0" @@ -10309,9 +10343,9 @@ } }, "node_modules/vitepress": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.10.tgz", - "integrity": "sha512-+MsahIWqq5WUEmj6MR4obcKYbT7im07jZPCQPdNJExkeOSbOAJ4xypSLx88x7rvtzWHhHc5aXbOhCRvGEGjFrw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.13.tgz", + "integrity": "sha512-TnVydQOZE38rtXu9gHCb7EGdN03jTcmYkDdhCqox6+pfKYgiyfm1qk2Uy8BZatnM9wXpa64f+T5p30R8P/9Z+A==", "dev": true, "dependencies": { "@docsearch/css": "^3.5.2", @@ -10322,7 +10356,7 @@ "focus-trap": "^7.5.2", "mark.js": "8.11.1", "minisearch": "^6.1.0", - "shiki": "^0.14.3", + "shiki": "^0.14.4", "vite": "^4.4.9", "vue": "^3.3.4" }, diff --git a/package.json b/package.json index 2447cfadf..104d12818 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "3.28.1", + "version": "3.29.2", "description": "Next-generation ES module bundler", "main": "dist/rollup.js", "module": "dist/es/rollup.js", @@ -71,9 +71,9 @@ "@codemirror/language": "^6.9.0", "@codemirror/search": "^6.5.2", "@codemirror/state": "^6.2.1", - "@codemirror/view": "^6.17.0", + "@codemirror/view": "^6.18.1", "@jridgewell/sourcemap-codec": "^1.4.15", - "@mermaid-js/mermaid-cli": "^10.3.1", + "@mermaid-js/mermaid-cli": "^10.4.0", "@rollup/plugin-alias": "^5.0.0", "@rollup/plugin-buble": "^1.0.2", "@rollup/plugin-commonjs": "^25.0.4", @@ -85,10 +85,10 @@ "@rollup/pluginutils": "^5.0.4", "@types/estree": "1.0.1", "@types/mocha": "^10.0.1", - "@types/node": "~14.18.56", + "@types/node": "~14.18.59", "@types/yargs-parser": "^21.0.0", - "@typescript-eslint/eslint-plugin": "^6.5.0", - "@typescript-eslint/parser": "^6.5.0", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", "acorn": "^8.10.0", @@ -100,11 +100,11 @@ "chokidar": "^3.5.3", "colorette": "^2.0.20", "concurrently": "^8.2.1", - "core-js": "^3.32.1", + "core-js": "^3.32.2", "date-time": "^4.0.0", "es5-shim": "^4.6.7", "es6-shim": "^0.35.8", - "eslint": "^8.48.0", + "eslint": "^8.49.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^5.0.0", @@ -116,20 +116,20 @@ "github-api": "^3.4.0", "hash.js": "^1.1.7", "husky": "^8.0.3", - "inquirer": "^9.2.10", - "is-reference": "^3.0.1", + "inquirer": "^9.2.11", + "is-reference": "^3.0.2", "lint-staged": "^14.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.3", "mocha": "^10.2.0", "nyc": "^15.1.0", "pinia": "^2.1.6", - "prettier": "^3.0.2", + "prettier": "^3.0.3", "pretty-bytes": "^6.1.1", "pretty-ms": "^8.0.0", "requirejs": "^2.3.6", - "rollup": "^3.28.1", - "rollup-plugin-license": "^3.0.1", + "rollup": "^3.29.1", + "rollup-plugin-license": "^3.1.0", "rollup-plugin-string": "^3.0.0", "rollup-plugin-thatworks": "^1.0.4", "semver": "^7.5.4", @@ -138,11 +138,11 @@ "source-map": "^0.7.4", "source-map-support": "^0.5.21", "systemjs": "^6.14.2", - "terser": "^5.19.2", + "terser": "^5.19.4", "tslib": "^2.6.2", "typescript": "^5.2.2", "vite": "^4.4.9", - "vitepress": "^1.0.0-rc.10", + "vitepress": "^1.0.0-rc.12", "vue": "^3.3.4", "weak-napi": "^2.0.2", "yargs-parser": "^21.1.1" diff --git a/src/Chunk.ts b/src/Chunk.ts index 2b1a65910..df3c26a09 100644 --- a/src/Chunk.ts +++ b/src/Chunk.ts @@ -6,6 +6,7 @@ import Module from './Module'; import ExportDefaultDeclaration from './ast/nodes/ExportDefaultDeclaration'; import FunctionDeclaration from './ast/nodes/FunctionDeclaration'; import type ImportExpression from './ast/nodes/ImportExpression'; +import { formatsMaybeAccessDocumentCurrentScript } from './ast/nodes/MetaProperty'; import type ChildScope from './ast/scopes/ChildScope'; import ExportDefaultVariable from './ast/variables/ExportDefaultVariable'; import LocalVariable from './ast/variables/LocalVariable'; @@ -40,6 +41,7 @@ import { replacePlaceholders } from './utils/hashPlaceholders'; import { makeLegal } from './utils/identifierHelpers'; import { defaultInteropHelpersByInteropType, + DOCUMENT_CURRENT_SCRIPT, HELPER_NAMES, isDefaultAProperty, namespaceInteropHelpersByInteropType @@ -72,6 +74,7 @@ export interface ChunkRenderResult { chunk: Chunk; magicString: MagicStringBundle; preliminaryFileName: PreliminaryFileName; + preliminarySourcemapFileName: PreliminaryFileName | null; usedModules: Module[]; } @@ -187,6 +190,7 @@ export default class Chunk { private needsExportsShim = false; private preRenderedChunkInfo: PreRenderedChunk | null = null; private preliminaryFileName: PreliminaryFileName | null = null; + private preliminarySourcemapFileName: PreliminaryFileName | null = null; private renderedChunkInfo: RenderedChunk | null = null; private renderedDependencies: Map | null = null; private readonly renderedModules: { @@ -328,6 +332,7 @@ export default class Chunk { finalizeChunk( code: string, map: SourceMap | null, + sourcemapFileName: string | null, hashesByPlaceholder: Map ): OutputChunk { const renderedChunkInfo = this.getRenderedChunkInfo(); @@ -349,7 +354,8 @@ export default class Chunk { imports: renderedChunkInfo.imports.map(finalize), map, preliminaryFileName, - referencedFiles: renderedChunkInfo.referencedFiles.map(finalize) + referencedFiles: renderedChunkInfo.referencedFiles.map(finalize), + sourcemapFileName }; } @@ -544,6 +550,36 @@ export default class Chunk { return (this.preliminaryFileName = { fileName, hashPlaceholder }); } + getPreliminarySourcemapFileName(): PreliminaryFileName | null { + if (this.preliminarySourcemapFileName) { + return this.preliminarySourcemapFileName; + } + let sourcemapFileName: string | null = null; + let hashPlaceholder: string | null = null; + const { sourcemapFileNames, format } = this.outputOptions; + if (sourcemapFileNames) { + const [pattern, patternName] = [sourcemapFileNames, 'output.sourcemapFileNames']; + sourcemapFileName = renderNamePattern( + typeof pattern === 'function' ? pattern(this.getPreRenderedChunkInfo()) : pattern, + patternName, + { + chunkhash: () => this.getPreliminaryFileName().hashPlaceholder || '', + format: () => format, + hash: size => + hashPlaceholder || (hashPlaceholder = this.getPlaceholder(patternName, size)), + name: () => this.getChunkName() + } + ); + if (!hashPlaceholder) { + sourcemapFileName = makeUnique(sourcemapFileName, this.bundle); + } + } else { + return null; + } + + return (this.preliminarySourcemapFileName = { fileName: sourcemapFileName, hashPlaceholder }); + } + public getRenderedChunkInfo(): RenderedChunk { if (this.renderedChunkInfo) { return this.renderedChunkInfo; @@ -606,6 +642,7 @@ export default class Chunk { } const preliminaryFileName = this.getPreliminaryFileName(); + const preliminarySourcemapFileName = this.getPreliminarySourcemapFileName(); const { accessedGlobals, indent, magicString, renderedSource, usedModules, usesTopLevelAwait } = this.renderModules(preliminaryFileName.fileName); @@ -670,6 +707,7 @@ export default class Chunk { chunk: this, magicString, preliminaryFileName, + preliminarySourcemapFileName, usedModules }; } @@ -1165,6 +1203,7 @@ export default class Chunk { const renderedModuleSources = new Map(); const renderOptions: RenderOptions = { + accessedDocumentCurrentScript: false, dynamicImportFunction, exportNamesByVariable, format, @@ -1182,6 +1221,14 @@ export default class Chunk { let source: MagicString | undefined; if (module.isIncluded() || includedNamespaces.has(module)) { const rendered = module.render(renderOptions); + if ( + !renderOptions.accessedDocumentCurrentScript && + formatsMaybeAccessDocumentCurrentScript.includes(format) + ) { + // eslint-disable-next-line unicorn/consistent-destructuring + this.accessedGlobalsByScope.get(module.scope)?.delete(DOCUMENT_CURRENT_SCRIPT); + } + renderOptions.accessedDocumentCurrentScript = false; ({ source } = rendered); usesTopLevelAwait ||= rendered.usesTopLevelAwait; renderedLength = source.length(); diff --git a/src/ast/nodes/MetaProperty.ts b/src/ast/nodes/MetaProperty.ts index 4d885caec..e58de55d6 100644 --- a/src/ast/nodes/MetaProperty.ts +++ b/src/ast/nodes/MetaProperty.ts @@ -3,6 +3,7 @@ import type { InternalModuleFormat } from '../../rollup/types'; import type { PluginDriver } from '../../utils/PluginDriver'; import { escapeId } from '../../utils/escapeId'; import type { GenerateCodeSnippets } from '../../utils/generateCodeSnippets'; +import { DOCUMENT_CURRENT_SCRIPT } from '../../utils/interopHelpers'; import { dirname, normalize, relative } from '../../utils/path'; import type { RenderOptions } from '../../utils/renderHelpers'; import type { NodeInteraction } from '../NodeInteractions'; @@ -62,11 +63,10 @@ export default class MetaProperty extends NodeBase { } } - render(code: MagicString, { format, pluginDriver, snippets }: RenderOptions): void { + render(code: MagicString, renderOptions: RenderOptions): void { + const { format, pluginDriver, snippets } = renderOptions; const { - context: { - module: { id: moduleId } - }, + context: { module }, meta: { name }, metaProperty, parent, @@ -75,6 +75,8 @@ export default class MetaProperty extends NodeBase { start, end } = this; + const { id: moduleId } = module; + if (name !== IMPORT) return; const chunkId = preliminaryChunkId!; @@ -95,11 +97,15 @@ export default class MetaProperty extends NodeBase { return; } - const replacement = - pluginDriver.hookFirstSync('resolveImportMeta', [ - metaProperty, - { chunkId, format, moduleId } - ]) || importMetaMechanisms[format]?.(metaProperty, { chunkId, snippets }); + let replacement = pluginDriver.hookFirstSync('resolveImportMeta', [ + metaProperty, + { chunkId, format, moduleId } + ]); + if (!replacement) { + replacement = importMetaMechanisms[format]?.(metaProperty, { chunkId, snippets }); + renderOptions.accessedDocumentCurrentScript ||= + formatsMaybeAccessDocumentCurrentScript.includes(format) && replacement !== 'undefined'; + } if (typeof replacement === 'string') { if (parent instanceof MemberExpression) { code.overwrite(parent.start, parent.end, replacement, { contentOnly: true }); @@ -124,13 +130,15 @@ export default class MetaProperty extends NodeBase { } } +export const formatsMaybeAccessDocumentCurrentScript = ['cjs', 'iife', 'umd']; + const accessedMetaUrlGlobals = { amd: ['document', 'module', 'URL'], - cjs: ['document', 'require', 'URL'], + cjs: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT], es: [], - iife: ['document', 'URL'], + iife: ['document', 'URL', DOCUMENT_CURRENT_SCRIPT], system: ['module'], - umd: ['document', 'require', 'URL'] + umd: ['document', 'require', 'URL', DOCUMENT_CURRENT_SCRIPT] }; const accessedFileUrlGlobals = { @@ -170,7 +178,7 @@ const getFileUrlFromRelativePath = (path: string) => const getUrlFromDocument = (chunkId: string, umd = false) => `${ umd ? `typeof document === 'undefined' ? location.href : ` : '' - }(document.currentScript && document.currentScript.src || new URL('${escapeId( + }(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId( chunkId )}', document.baseURI).href)`; diff --git a/src/ast/nodes/shared/knownGlobals.ts b/src/ast/nodes/shared/knownGlobals.ts index 13e8294a6..0059b64c5 100644 --- a/src/ast/nodes/shared/knownGlobals.ts +++ b/src/ast/nodes/shared/knownGlobals.ts @@ -478,7 +478,17 @@ const knownGlobals: GlobalDescription = { CSSSupportsRule: C, CustomElementRegistry: C, customElements: O, - CustomEvent: C, + CustomEvent: { + __proto__: null, + [ValueProperties]: { + deoptimizeArgumentsOnCall({ args }: NodeInteractionCalled) { + args[2]?.deoptimizePath(['detail']); + }, + getLiteralValue: getTruthyLiteralValue, + hasEffectsWhenCalled: returnFalse + }, + prototype: O + }, DataTransfer: C, DataTransferItem: C, DataTransferItemList: C, diff --git a/src/rollup/types.d.ts b/src/rollup/types.d.ts index 07f6f4032..2f2ceb5d4 100644 --- a/src/rollup/types.d.ts +++ b/src/rollup/types.d.ts @@ -164,6 +164,7 @@ export interface EmittedPrebuiltChunk { exports?: string[]; fileName: string; map?: SourceMap; + sourcemapFileName?: string; type: 'prebuilt-chunk'; } @@ -502,7 +503,7 @@ export interface Plugin extends OutputPlugin, Partial { api?: A; } -type TreeshakingPreset = 'smallest' | 'safest' | 'recommended'; +export type TreeshakingPreset = 'smallest' | 'safest' | 'recommended'; export interface NormalizedTreeshakingOptions { annotations: boolean; @@ -744,6 +745,7 @@ export interface OutputOptions { sourcemapBaseUrl?: string; sourcemapExcludeSources?: boolean; sourcemapFile?: string; + sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string); sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption; sourcemapPathTransform?: SourcemapPathTransformOption; strict?: boolean; @@ -799,6 +801,7 @@ export interface NormalizedOutputOptions { sourcemapBaseUrl: string | undefined; sourcemapExcludeSources: boolean; sourcemapFile: string | undefined; + sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined; sourcemapIgnoreList: SourcemapIgnoreListOption; sourcemapPathTransform: SourcemapPathTransformOption | undefined; strict: boolean; @@ -862,6 +865,7 @@ export interface RenderedChunk extends PreRenderedChunk { export interface OutputChunk extends RenderedChunk { code: string; map: SourceMap | null; + sourcemapFileName: string | null; preliminaryFileName: string; } diff --git a/src/utils/FileEmitter.ts b/src/utils/FileEmitter.ts index d10729578..c5405eb4d 100644 --- a/src/utils/FileEmitter.ts +++ b/src/utils/FileEmitter.ts @@ -326,6 +326,7 @@ export class FileEmitter { name: prebuiltChunk.fileName, preliminaryFileName: prebuiltChunk.fileName, referencedFiles: [], + sourcemapFileName: prebuiltChunk.sourcemapFileName || null, type: 'chunk' }; } diff --git a/src/utils/interopHelpers.ts b/src/utils/interopHelpers.ts index 40b89262b..5d28acd92 100644 --- a/src/utils/interopHelpers.ts +++ b/src/utils/interopHelpers.ts @@ -8,6 +8,7 @@ const INTEROP_NAMESPACE_COMPAT_VARIABLE = '_interopNamespaceCompat'; const INTEROP_NAMESPACE_DEFAULT_VARIABLE = '_interopNamespaceDefault'; export const INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE = '_interopNamespaceDefaultOnly'; export const MERGE_NAMESPACES_VARIABLE = '_mergeNamespaces'; +export const DOCUMENT_CURRENT_SCRIPT = '_documentCurrentScript'; export const defaultInteropHelpersByInteropType: { [T in InteropType]: string | null } = { auto: INTEROP_DEFAULT_VARIABLE, @@ -76,6 +77,9 @@ const HELPER_GENERATORS: { usedHelpers: ReadonlySet ) => string; } = { + [DOCUMENT_CURRENT_SCRIPT](_t, { _, n }) { + return `var${_}${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof${_}document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`; + }, [INTEROP_DEFAULT_COMPAT_VARIABLE](_t, snippets, liveBindings) { const { _, getDirectReturnFunction, n } = snippets; const [left, right] = getDirectReturnFunction(['e'], { diff --git a/src/utils/options/mergeOptions.ts b/src/utils/options/mergeOptions.ts index f384e50c1..4d7217a2a 100644 --- a/src/utils/options/mergeOptions.ts +++ b/src/utils/options/mergeOptions.ts @@ -282,6 +282,7 @@ async function mergeOutputOptions( sourcemapBaseUrl: getOption('sourcemapBaseUrl'), sourcemapExcludeSources: getOption('sourcemapExcludeSources'), sourcemapFile: getOption('sourcemapFile'), + sourcemapFileNames: getOption('sourcemapFileNames'), sourcemapIgnoreList: getOption('sourcemapIgnoreList'), sourcemapPathTransform: getOption('sourcemapPathTransform'), strict: getOption('strict'), diff --git a/src/utils/options/normalizeOutputOptions.ts b/src/utils/options/normalizeOutputOptions.ts index 48863043e..5827e4115 100644 --- a/src/utils/options/normalizeOutputOptions.ts +++ b/src/utils/options/normalizeOutputOptions.ts @@ -104,6 +104,7 @@ export async function normalizeOutputOptions( sourcemapBaseUrl: getSourcemapBaseUrl(config), sourcemapExcludeSources: config.sourcemapExcludeSources || false, sourcemapFile: config.sourcemapFile, + sourcemapFileNames: getSourcemapFileNames(config, unsetOptions), sourcemapIgnoreList: typeof config.sourcemapIgnoreList === 'function' ? config.sourcemapIgnoreList @@ -528,6 +529,17 @@ const getNamespaceToStringTag = ( return generatedCode.symbols || false; }; +const getSourcemapFileNames = ( + config: OutputOptions, + unsetOptions: Set +): NormalizedOutputOptions['sourcemapFileNames'] => { + const configSourcemapFileNames = config.sourcemapFileNames; + if (configSourcemapFileNames == null) { + unsetOptions.add('sourcemapFileNames'); + } + return configSourcemapFileNames; +}; + const getSourcemapBaseUrl = ( config: OutputOptions ): NormalizedOutputOptions['sourcemapBaseUrl'] => { diff --git a/src/utils/renderChunks.ts b/src/utils/renderChunks.ts index cd1f92cc2..e154cc62d 100644 --- a/src/utils/renderChunks.ts +++ b/src/utils/renderChunks.ts @@ -32,6 +32,7 @@ interface RenderedChunkWithPlaceholders { chunk: Chunk; code: string; fileName: string; + sourcemapFileName: string | null; map: SourceMap | null; } @@ -52,6 +53,7 @@ export async function renderChunks( const chunkGraph = getChunkGraph(chunks); const { + initialHashesByPlaceholder, nonHashedChunksWithPlaceholders, renderedChunksByPlaceholder, hashDependenciesByPlaceholder @@ -65,6 +67,7 @@ export async function renderChunks( const hashesByPlaceholder = generateFinalHashes( renderedChunksByPlaceholder, hashDependenciesByPlaceholder, + initialHashesByPlaceholder, bundle ); addChunksToBundle( @@ -200,6 +203,7 @@ async function transformChunksAndGenerateContentHashes( const nonHashedChunksWithPlaceholders: RenderedChunkWithPlaceholders[] = []; const renderedChunksByPlaceholder = new Map(); const hashDependenciesByPlaceholder = new Map(); + const initialHashesByPlaceholder = new Map(); const placeholders = new Set(); for (const { preliminaryFileName: { hashPlaceholder } @@ -211,12 +215,14 @@ async function transformChunksAndGenerateContentHashes( async ({ chunk, preliminaryFileName: { fileName, hashPlaceholder }, + preliminarySourcemapFileName, magicString, usedModules }) => { - const transformedChunk = { + const transformedChunk: RenderedChunkWithPlaceholders = { chunk, fileName, + sourcemapFileName: preliminarySourcemapFileName?.fileName ?? null, ...(await transformChunk( magicString, fileName, @@ -227,7 +233,8 @@ async function transformChunksAndGenerateContentHashes( log )) }; - const { code } = transformedChunk; + const { code, map } = transformedChunk; + if (hashPlaceholder) { // To create a reproducible content-only hash, all placeholders are // replaced with the same value before hashing @@ -256,11 +263,23 @@ async function transformChunksAndGenerateContentHashes( } else { nonHashedChunksWithPlaceholders.push(transformedChunk); } + + const sourcemapHashPlaceholder = preliminarySourcemapFileName?.hashPlaceholder; + if (map && sourcemapHashPlaceholder) { + initialHashesByPlaceholder.set( + preliminarySourcemapFileName.hashPlaceholder, + createHash() + .update(map.toString()) + .digest('hex') + .slice(0, preliminarySourcemapFileName.hashPlaceholder.length) + ); + } } ) ); return { hashDependenciesByPlaceholder, + initialHashesByPlaceholder, nonHashedChunksWithPlaceholders, renderedChunksByPlaceholder }; @@ -269,9 +288,10 @@ async function transformChunksAndGenerateContentHashes( function generateFinalHashes( renderedChunksByPlaceholder: Map, hashDependenciesByPlaceholder: Map, + initialHashesByPlaceholder: Map, bundle: OutputBundleWithPlaceholders ) { - const hashesByPlaceholder = new Map(); + const hashesByPlaceholder = new Map(initialHashesByPlaceholder); for (const [placeholder, { fileName }] of renderedChunksByPlaceholder) { let hash = createHash(); const hashDependencyPlaceholders = new Set([placeholder]); @@ -308,22 +328,46 @@ function addChunksToBundle( pluginDriver: PluginDriver, options: NormalizedOutputOptions ) { - for (const { chunk, code, fileName, map } of renderedChunksByPlaceholder.values()) { + for (const { + chunk, + code, + fileName, + sourcemapFileName, + map + } of renderedChunksByPlaceholder.values()) { let updatedCode = replacePlaceholders(code, hashesByPlaceholder); const finalFileName = replacePlaceholders(fileName, hashesByPlaceholder); + let finalSourcemapFileName = null; if (map) { + finalSourcemapFileName = sourcemapFileName + ? replacePlaceholders(sourcemapFileName, hashesByPlaceholder) + : `${finalFileName}.map`; map.file = replacePlaceholders(map.file, hashesByPlaceholder); - updatedCode += emitSourceMapAndGetComment(finalFileName, map, pluginDriver, options); + updatedCode += emitSourceMapAndGetComment(finalSourcemapFileName, map, pluginDriver, options); } - bundle[finalFileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder); + bundle[finalFileName] = chunk.finalizeChunk( + updatedCode, + map, + finalSourcemapFileName, + hashesByPlaceholder + ); } - for (const { chunk, code, fileName, map } of nonHashedChunksWithPlaceholders) { + for (const { chunk, code, fileName, sourcemapFileName, map } of nonHashedChunksWithPlaceholders) { let updatedCode = hashesByPlaceholder.size > 0 ? replacePlaceholders(code, hashesByPlaceholder) : code; + let finalSourcemapFileName = null; if (map) { - updatedCode += emitSourceMapAndGetComment(fileName, map, pluginDriver, options); + finalSourcemapFileName = sourcemapFileName + ? replacePlaceholders(sourcemapFileName, hashesByPlaceholder) + : `${fileName}.map`; + updatedCode += emitSourceMapAndGetComment(finalSourcemapFileName, map, pluginDriver, options); } - bundle[fileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder); + bundle[fileName] = chunk.finalizeChunk( + updatedCode, + map, + finalSourcemapFileName, + hashesByPlaceholder + ); } } @@ -337,11 +381,11 @@ function emitSourceMapAndGetComment( if (sourcemap === 'inline') { url = map.toUrl(); } else { - const sourcemapFileName = `${basename(fileName)}.map`; + const sourcemapFileName = basename(fileName); url = sourcemapBaseUrl ? new URL(sourcemapFileName, sourcemapBaseUrl).toString() : sourcemapFileName; - pluginDriver.emitFile({ fileName: `${fileName}.map`, source: map.toString(), type: 'asset' }); + pluginDriver.emitFile({ fileName, source: map.toString(), type: 'asset' }); } return sourcemap === 'hidden' ? '' : `//# ${SOURCEMAPPING_URL}=${url}\n`; } diff --git a/src/utils/renderHelpers.ts b/src/utils/renderHelpers.ts index 89b486ee7..b9a6510c2 100644 --- a/src/utils/renderHelpers.ts +++ b/src/utils/renderHelpers.ts @@ -7,6 +7,7 @@ import type { GenerateCodeSnippets } from './generateCodeSnippets'; import { treeshakeNode } from './treeshakeNode'; export interface RenderOptions { + accessedDocumentCurrentScript: boolean; dynamicImportFunction: string | undefined; exportNamesByVariable: Map; format: InternalModuleFormat; diff --git a/src/utils/timers.ts b/src/utils/timers.ts index 913be55dd..7af55476f 100644 --- a/src/utils/timers.ts +++ b/src/utils/timers.ts @@ -104,6 +104,8 @@ const TIMED_PLUGIN_HOOKS: readonly (keyof PluginHooks)[] = [ ]; function getPluginWithTimers(plugin: any, index: number): Plugin { + if (plugin._hasTimer) return plugin; + plugin._hasTimer = true; for (const hook of TIMED_PLUGIN_HOOKS) { if (hook in plugin) { let timerLabel = `plugin ${index}`; diff --git a/test/chunking-form/samples/import-meta-numeric-paths/_expected/cjs/0/1/nested.js b/test/chunking-form/samples/import-meta-numeric-paths/_expected/cjs/0/1/nested.js index 6361dde56..5ed431786 100644 --- a/test/chunking-form/samples/import-meta-numeric-paths/_expected/cjs/0/1/nested.js +++ b/test/chunking-form/samples/import-meta-numeric-paths/_expected/cjs/0/1/nested.js @@ -1,5 +1,6 @@ 'use strict'; -const url = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('0/1/nested.js', document.baseURI).href)); +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; +const url = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('0/1/nested.js', document.baseURI).href)); exports.url = url; diff --git a/test/chunking-form/samples/import-meta-url/_expected/cjs/main.js b/test/chunking-form/samples/import-meta-url/_expected/cjs/main.js index 4ce5ac288..1bb5d4ede 100644 --- a/test/chunking-form/samples/import-meta-url/_expected/cjs/main.js +++ b/test/chunking-form/samples/import-meta-url/_expected/cjs/main.js @@ -1,5 +1,6 @@ 'use strict'; +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function log(url) { if (typeof document === 'undefined') { console.log(url); @@ -8,7 +9,7 @@ function log(url) { } } -log('main: ' + (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href))); +log('main: ' + (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('main.js', document.baseURI).href))); Promise.resolve().then(function () { return require('./nested/chunk.js'); }); exports.log = log; diff --git a/test/chunking-form/samples/import-meta-url/_expected/cjs/nested/chunk.js b/test/chunking-form/samples/import-meta-url/_expected/cjs/nested/chunk.js index d6f85b2c5..0c68a5802 100644 --- a/test/chunking-form/samples/import-meta-url/_expected/cjs/nested/chunk.js +++ b/test/chunking-form/samples/import-meta-url/_expected/cjs/nested/chunk.js @@ -2,4 +2,5 @@ var main = require('../main.js'); -main.log('nested: ' + (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('nested/chunk.js', document.baseURI).href))); +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; +main.log('nested: ' + (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('nested/chunk.js', document.baseURI).href))); diff --git a/test/chunking-form/samples/render-chunk-transform/_config.js b/test/chunking-form/samples/render-chunk-transform/_config.js index 5c1131ec0..d45b42c72 100644 --- a/test/chunking-form/samples/render-chunk-transform/_config.js +++ b/test/chunking-form/samples/render-chunk-transform/_config.js @@ -47,7 +47,8 @@ module.exports = defineTest({ imports: [], preliminaryFileName: 'entry-main1-!~{001}~.js', referencedFiles: [], - map: null + map: null, + sourcemapFileName: null }, 'entry-main2.js': { exports: [], @@ -65,7 +66,8 @@ module.exports = defineTest({ imports: ['entry-main1.js'], preliminaryFileName: 'entry-main2-!~{002}~.js', referencedFiles: [], - map: null + map: null, + sourcemapFileName: null } }); } diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_config.js b/test/chunking-form/samples/sourcemap-file-names-function/_config.js new file mode 100644 index 000000000..aaee53297 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_config.js @@ -0,0 +1,27 @@ +module.exports = defineTest({ + description: 'observes sourcemapFileNames property when using a function', + options: { + output: { + sourcemap: true, + entryFileNames: '[name].js', + chunkFileNames: '[name]-[hash].js', + sourcemapFileNames: ({ name }) => { + switch (name) { + case 'main': { + // chunkhash should be empty string + return 'main[chunkhash].js.map'; + } + case 'dynamic': { + return 'dynamic.js.map'; + } + case 'dynamic-hashed': { + return 'dynamic-[hash:12]-[chunkhash].js.map'; + } + default: { + throw new Error(`Unexpected name ${name}`); + } + } + } + } + } +}); diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-a0f7e361.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-a0f7e361.js new file mode 100644 index 000000000..6e68bc23d --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-a0f7e361.js @@ -0,0 +1,6 @@ +define((function () { 'use strict'; + + console.log('dynamic'); + +})); +//# sourceMappingURL=dynamic.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-eea0ce30202b-5ec8d44f.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-eea0ce30202b-5ec8d44f.js.map new file mode 100644 index 000000000..c8102366e --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-eea0ce30202b-5ec8d44f.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-hashed-5ec8d44f.js","sources":["../../dynamic-hashed.js"],"sourcesContent":["console.log('dynamic-hashed');\n"],"names":[],"mappings":";;CAAA,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-hashed-5ec8d44f.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-hashed-5ec8d44f.js new file mode 100644 index 000000000..775befa5f --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic-hashed-5ec8d44f.js @@ -0,0 +1,6 @@ +define((function () { 'use strict'; + + console.log('dynamic-hashed'); + +})); +//# sourceMappingURL=dynamic-eea0ce30202b-5ec8d44f.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic.js.map new file mode 100644 index 000000000..3af06b91a --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/dynamic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-a0f7e361.js","sources":["../../dynamic.js"],"sourcesContent":["console.log('dynamic');\n"],"names":[],"mappings":";;CAAA,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js new file mode 100644 index 000000000..2c4333834 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js @@ -0,0 +1,7 @@ +define(['require'], (function (require) { 'use strict'; + + new Promise(function (resolve, reject) { require(['./dynamic-a0f7e361'], resolve, reject); }); + new Promise(function (resolve, reject) { require(['./dynamic-hashed-5ec8d44f'], resolve, reject); }); + +})); +//# sourceMappingURL=main.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js.map new file mode 100644 index 000000000..77d397ccc --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/amd/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sources":["../../main.js"],"sourcesContent":["import('./dynamic.js');\nimport('./dynamic-hashed.js');\n"],"names":[],"mappings":";;AAAA,mDAAO,oBAAc,uBAAC,CAAC;AACvB,mDAAO,2BAAqB,uBAAC;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-03a87e17.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-03a87e17.js new file mode 100644 index 000000000..7de73b8dd --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-03a87e17.js @@ -0,0 +1,4 @@ +'use strict'; + +console.log('dynamic'); +//# sourceMappingURL=dynamic.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-44faaace9dbc-e21b9079.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-44faaace9dbc-e21b9079.js.map new file mode 100644 index 000000000..b1be3c6ea --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-44faaace9dbc-e21b9079.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-hashed-e21b9079.js","sources":["../../dynamic-hashed.js"],"sourcesContent":["console.log('dynamic-hashed');\n"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-hashed-e21b9079.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-hashed-e21b9079.js new file mode 100644 index 000000000..4f1a4393c --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic-hashed-e21b9079.js @@ -0,0 +1,4 @@ +'use strict'; + +console.log('dynamic-hashed'); +//# sourceMappingURL=dynamic-44faaace9dbc-e21b9079.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic.js.map new file mode 100644 index 000000000..8535c836d --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/dynamic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-03a87e17.js","sources":["../../dynamic.js"],"sourcesContent":["console.log('dynamic');\n"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js new file mode 100644 index 000000000..ecf6f5b43 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js @@ -0,0 +1,5 @@ +'use strict'; + +Promise.resolve().then(function () { return require('./dynamic-03a87e17.js'); }); +Promise.resolve().then(function () { return require('./dynamic-hashed-e21b9079.js'); }); +//# sourceMappingURL=main.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js.map new file mode 100644 index 000000000..7d54836ff --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/cjs/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sources":["../../main.js"],"sourcesContent":["import('./dynamic.js');\nimport('./dynamic-hashed.js');\n"],"names":[],"mappings":";;AAAA,oDAAO,uBAAc,KAAC,CAAC;AACvB,oDAAO,8BAAqB,KAAC;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-769057acb768-4b06902b.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-769057acb768-4b06902b.js.map new file mode 100644 index 000000000..35d31d3d6 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-769057acb768-4b06902b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-hashed-4b06902b.js","sources":["../../dynamic-hashed.js"],"sourcesContent":["console.log('dynamic-hashed');\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-c7ad594d.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-c7ad594d.js new file mode 100644 index 000000000..e3094ebbb --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-c7ad594d.js @@ -0,0 +1,2 @@ +console.log('dynamic'); +//# sourceMappingURL=dynamic.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-hashed-4b06902b.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-hashed-4b06902b.js new file mode 100644 index 000000000..ca9acfeed --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic-hashed-4b06902b.js @@ -0,0 +1,2 @@ +console.log('dynamic-hashed'); +//# sourceMappingURL=dynamic-769057acb768-4b06902b.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic.js.map new file mode 100644 index 000000000..45e7b978c --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/dynamic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-c7ad594d.js","sources":["../../dynamic.js"],"sourcesContent":["console.log('dynamic');\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js new file mode 100644 index 000000000..ae85ca097 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js @@ -0,0 +1,3 @@ +import('./dynamic-c7ad594d.js'); +import('./dynamic-hashed-4b06902b.js'); +//# sourceMappingURL=main.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js.map new file mode 100644 index 000000000..e433cc70d --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/es/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sources":["../../main.js"],"sourcesContent":["import('./dynamic.js');\nimport('./dynamic-hashed.js');\n"],"names":[],"mappings":"AAAA,OAAO,uBAAc,CAAC,CAAC;AACvB,OAAO,8BAAqB,CAAC"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-883b8003cd49-c0b30ec8.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-883b8003cd49-c0b30ec8.js.map new file mode 100644 index 000000000..4efbf1079 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-883b8003cd49-c0b30ec8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-hashed-c0b30ec8.js","sources":["../../dynamic-hashed.js"],"sourcesContent":["console.log('dynamic-hashed');\n"],"names":[],"mappings":";;;;;GAAA,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-ef271780.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-ef271780.js new file mode 100644 index 000000000..6b9651b1e --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-ef271780.js @@ -0,0 +1,11 @@ +System.register([], (function () { + 'use strict'; + return { + execute: (function () { + + console.log('dynamic'); + + }) + }; +})); +//# sourceMappingURL=dynamic.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-hashed-c0b30ec8.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-hashed-c0b30ec8.js new file mode 100644 index 000000000..d23349da9 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic-hashed-c0b30ec8.js @@ -0,0 +1,11 @@ +System.register([], (function () { + 'use strict'; + return { + execute: (function () { + + console.log('dynamic-hashed'); + + }) + }; +})); +//# sourceMappingURL=dynamic-883b8003cd49-c0b30ec8.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic.js.map new file mode 100644 index 000000000..49fa5e4dd --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/dynamic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-ef271780.js","sources":["../../dynamic.js"],"sourcesContent":["console.log('dynamic');\n"],"names":[],"mappings":";;;;;GAAA,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js new file mode 100644 index 000000000..a366b8a53 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js @@ -0,0 +1,12 @@ +System.register([], (function (exports, module) { + 'use strict'; + return { + execute: (function () { + + module.import('./dynamic-ef271780.js'); + module.import('./dynamic-hashed-c0b30ec8.js'); + + }) + }; +})); +//# sourceMappingURL=main.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js.map b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js.map new file mode 100644 index 000000000..c61b09415 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/_expected/system/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sources":["../../main.js"],"sourcesContent":["import('./dynamic.js');\nimport('./dynamic-hashed.js');\n"],"names":[],"mappings":";;;;;AAAA,iBAAO,uBAAc,CAAC,CAAC;AACvB,iBAAO,8BAAqB,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names-function/dynamic-hashed.js b/test/chunking-form/samples/sourcemap-file-names-function/dynamic-hashed.js new file mode 100644 index 000000000..477aa42f8 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/dynamic-hashed.js @@ -0,0 +1 @@ +console.log('dynamic-hashed'); diff --git a/test/chunking-form/samples/sourcemap-file-names-function/dynamic.js b/test/chunking-form/samples/sourcemap-file-names-function/dynamic.js new file mode 100644 index 000000000..955cedef8 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/dynamic.js @@ -0,0 +1 @@ +console.log('dynamic'); diff --git a/test/chunking-form/samples/sourcemap-file-names-function/main.js b/test/chunking-form/samples/sourcemap-file-names-function/main.js new file mode 100644 index 000000000..29507b175 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names-function/main.js @@ -0,0 +1,2 @@ +import('./dynamic.js'); +import('./dynamic-hashed.js'); diff --git a/test/chunking-form/samples/sourcemap-file-names/_config.js b/test/chunking-form/samples/sourcemap-file-names/_config.js new file mode 100644 index 000000000..2ea7138dc --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_config.js @@ -0,0 +1,22 @@ +const assert = require('node:assert'); + +module.exports = defineTest({ + description: + 'populates sourcemapFileName property of OutputChunk with final name when using sourcemapFileNames option', + options: { + output: { + sourcemap: true, + entryFileNames: '[name]-[hash]-[format].js', + sourcemapFileNames: '[name]-[chunkhash]-[format]-[hash].js.map' + }, + plugins: [ + { + name: 'test-bundle', + generateBundle(options, bundle) { + const [sourcemapFileName, fileName] = Object.keys(bundle).sort(); + assert.strictEqual(bundle[fileName].sourcemapFileName, sourcemapFileName); + } + } + ] + } +}); diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd-af8f17da.js.map b/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd-af8f17da.js.map new file mode 100644 index 000000000..242d8eda3 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd-af8f17da.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main-543232e9-amd.js","sources":["../../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;CAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd.js b/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd.js new file mode 100644 index 000000000..3970ebf7c --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/amd/main-543232e9-amd.js @@ -0,0 +1,6 @@ +define((function () { 'use strict'; + + console.log( 42 ); + +})); +//# sourceMappingURL=main-543232e9-amd-af8f17da.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs-c64b742b.js.map b/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs-c64b742b.js.map new file mode 100644 index 000000000..be5e8ad1c --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs-c64b742b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main-3fddaf82-cjs.js","sources":["../../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs.js b/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs.js new file mode 100644 index 000000000..98bd52e71 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/cjs/main-3fddaf82-cjs.js @@ -0,0 +1,4 @@ +'use strict'; + +console.log( 42 ); +//# sourceMappingURL=main-3fddaf82-cjs-c64b742b.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es-dbab040a.js.map b/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es-dbab040a.js.map new file mode 100644 index 000000000..83eea7bfe --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es-dbab040a.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main-824894f4-es.js","sources":["../../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es.js b/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es.js new file mode 100644 index 000000000..556fd1f82 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/es/main-824894f4-es.js @@ -0,0 +1,2 @@ +console.log( 42 ); +//# sourceMappingURL=main-824894f4-es-dbab040a.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system-bce3d2ab.js.map b/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system-bce3d2ab.js.map new file mode 100644 index 000000000..2d95a47c5 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system-bce3d2ab.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main-6186746c-system.js","sources":["../../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;;;;GAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE;;;;;;;;"} \ No newline at end of file diff --git a/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system.js b/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system.js new file mode 100644 index 000000000..6d33eca3a --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/_expected/system/main-6186746c-system.js @@ -0,0 +1,11 @@ +System.register([], (function () { + 'use strict'; + return { + execute: (function () { + + console.log( 42 ); + + }) + }; +})); +//# sourceMappingURL=main-6186746c-system-bce3d2ab.js.map diff --git a/test/chunking-form/samples/sourcemap-file-names/main.js b/test/chunking-form/samples/sourcemap-file-names/main.js new file mode 100644 index 000000000..5c72ff351 --- /dev/null +++ b/test/chunking-form/samples/sourcemap-file-names/main.js @@ -0,0 +1 @@ +console.log( 42 ); diff --git a/test/form/samples/custom-event-detail/_config.js b/test/form/samples/custom-event-detail/_config.js new file mode 100644 index 000000000..e9a52e0fd --- /dev/null +++ b/test/form/samples/custom-event-detail/_config.js @@ -0,0 +1,3 @@ +module.exports = defineTest({ + description: 'observes side effects for custom event payloads' +}); diff --git a/test/form/samples/custom-event-detail/_expected.js b/test/form/samples/custom-event-detail/_expected.js new file mode 100644 index 000000000..098316cf8 --- /dev/null +++ b/test/form/samples/custom-event-detail/_expected.js @@ -0,0 +1,5 @@ +const detail = { value: null }; +const event = new CustomEvent('test', { detail }); +event.detail.value = true; +if (detail.value) console.log('ok'); +else console.log('failed'); diff --git a/test/form/samples/custom-event-detail/main.js b/test/form/samples/custom-event-detail/main.js new file mode 100644 index 000000000..098316cf8 --- /dev/null +++ b/test/form/samples/custom-event-detail/main.js @@ -0,0 +1,5 @@ +const detail = { value: null }; +const event = new CustomEvent('test', { detail }); +event.detail.value = true; +if (detail.value) console.log('ok'); +else console.log('failed'); diff --git a/test/form/samples/deconflict-format-specific-globals/_expected/cjs.js b/test/form/samples/deconflict-format-specific-globals/_expected/cjs.js index 450f1624d..2f6ca4ed8 100644 --- a/test/form/samples/deconflict-format-specific-globals/_expected/cjs.js +++ b/test/form/samples/deconflict-format-specific-globals/_expected/cjs.js @@ -2,6 +2,7 @@ var external = require('external'); +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } function _interopNamespace(e) { @@ -37,7 +38,7 @@ console.log(_interopDefault$1, _interopNamespace$1, module$1, require$1, exports Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('external')); }).then(console.log); exports.default = 0; -console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href))); +console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href))); function nested1() { const _interopDefault = 1; @@ -51,7 +52,7 @@ function nested1() { Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('external')); }).then(console.log); exports.default = 1; - console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href))); + console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href))); } nested1(); diff --git a/test/form/samples/deconflict-format-specific-globals/_expected/iife.js b/test/form/samples/deconflict-format-specific-globals/_expected/iife.js index 5b4060e86..566d6e75a 100644 --- a/test/form/samples/deconflict-format-specific-globals/_expected/iife.js +++ b/test/form/samples/deconflict-format-specific-globals/_expected/iife.js @@ -1,6 +1,7 @@ var bundle = (function (external) { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } var external__default = /*#__PURE__*/_interopDefault(external); @@ -18,7 +19,7 @@ var bundle = (function (external) { import('external').then(console.log); exports.default = 0; - console.log((document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href)); + console.log((_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href)); function nested1() { const _interopDefault = 1; @@ -32,7 +33,7 @@ var bundle = (function (external) { import('external').then(console.log); exports.default = 1; - console.log((document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href)); + console.log((_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href)); } nested1(); diff --git a/test/form/samples/deconflict-format-specific-globals/_expected/umd.js b/test/form/samples/deconflict-format-specific-globals/_expected/umd.js index e587afab1..36c7525c0 100644 --- a/test/form/samples/deconflict-format-specific-globals/_expected/umd.js +++ b/test/form/samples/deconflict-format-specific-globals/_expected/umd.js @@ -4,6 +4,7 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bundle = factory(global.external)); })(this, (function (external) { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } var external__default = /*#__PURE__*/_interopDefault(external); @@ -21,7 +22,7 @@ import('external').then(console.log); exports.default = 0; - console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href))); + console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href))); function nested1() { const _interopDefault = 1; @@ -35,7 +36,7 @@ import('external').then(console.log); exports.default = 1; - console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href))); + console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href))); } nested1(); diff --git a/test/form/samples/import-meta-url/_expected/cjs.js b/test/form/samples/import-meta-url/_expected/cjs.js index b071a4073..f9f929114 100644 --- a/test/form/samples/import-meta-url/_expected/cjs.js +++ b/test/form/samples/import-meta-url/_expected/cjs.js @@ -1,5 +1,6 @@ 'use strict'; +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function log(url) { if (typeof document === 'undefined') { console.log(url); @@ -8,4 +9,4 @@ function log(url) { } } -log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href))); +log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href))); diff --git a/test/form/samples/import-meta-url/_expected/iife.js b/test/form/samples/import-meta-url/_expected/iife.js index f2d282153..b7f8f67f6 100644 --- a/test/form/samples/import-meta-url/_expected/iife.js +++ b/test/form/samples/import-meta-url/_expected/iife.js @@ -1,6 +1,7 @@ (function () { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function log(url) { if (typeof document === 'undefined') { console.log(url); @@ -9,6 +10,6 @@ } } - log((document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href)); + log((_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href)); })(); diff --git a/test/form/samples/import-meta-url/_expected/umd.js b/test/form/samples/import-meta-url/_expected/umd.js index ea7850061..aeda35c2e 100644 --- a/test/form/samples/import-meta-url/_expected/umd.js +++ b/test/form/samples/import-meta-url/_expected/umd.js @@ -3,6 +3,7 @@ factory(); })((function () { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; function log(url) { if (typeof document === 'undefined') { console.log(url); @@ -11,6 +12,6 @@ } } - log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href))); + log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href))); })); diff --git a/test/form/samples/import-meta/_expected/cjs.js b/test/form/samples/import-meta/_expected/cjs.js index 03af3deb5..84e82090a 100644 --- a/test/form/samples/import-meta/_expected/cjs.js +++ b/test/form/samples/import-meta/_expected/cjs.js @@ -1,3 +1,4 @@ 'use strict'; -console.log(({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href)) })); +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; +console.log(({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href)) })); diff --git a/test/form/samples/import-meta/_expected/iife.js b/test/form/samples/import-meta/_expected/iife.js index c3928b871..f57105d9e 100644 --- a/test/form/samples/import-meta/_expected/iife.js +++ b/test/form/samples/import-meta/_expected/iife.js @@ -1,6 +1,7 @@ (function () { 'use strict'; - console.log(({ url: (document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href) })); + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; + console.log(({ url: (_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href) })); })(); diff --git a/test/form/samples/import-meta/_expected/umd.js b/test/form/samples/import-meta/_expected/umd.js index 0d82b932f..b05aaf484 100644 --- a/test/form/samples/import-meta/_expected/umd.js +++ b/test/form/samples/import-meta/_expected/umd.js @@ -3,6 +3,7 @@ factory(); })((function () { 'use strict'; - console.log(({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href)) })); + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; + console.log(({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href)) })); })); diff --git a/test/form/samples/resolve-import-meta-url/_expected/cjs.js b/test/form/samples/resolve-import-meta-url/_expected/cjs.js index 2180a8789..0aae2d599 100644 --- a/test/form/samples/resolve-import-meta-url/_expected/cjs.js +++ b/test/form/samples/resolve-import-meta-url/_expected/cjs.js @@ -1,12 +1,13 @@ 'use strict'; +var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; console.log('resolved'); console.log('resolved'); console.log('resolved'); -console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href))); +console.log((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href))); console.log(undefined); -console.log(({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('cjs.js', document.baseURI).href)) })); +console.log(({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs.js', document.baseURI).href)) })); console.log('url=cjs.js:resolve-import-meta-url/main.js'); console.log('privateProp=cjs.js:resolve-import-meta-url/main.js'); diff --git a/test/form/samples/resolve-import-meta-url/_expected/iife.js b/test/form/samples/resolve-import-meta-url/_expected/iife.js index bb7de5c76..bca634eb5 100644 --- a/test/form/samples/resolve-import-meta-url/_expected/iife.js +++ b/test/form/samples/resolve-import-meta-url/_expected/iife.js @@ -1,13 +1,14 @@ (function () { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; console.log('resolved'); console.log('resolved'); console.log('resolved'); - console.log((document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href)); + console.log((_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href)); console.log(undefined); - console.log(({ url: (document.currentScript && document.currentScript.src || new URL('iife.js', document.baseURI).href) })); + console.log(({ url: (_documentCurrentScript && _documentCurrentScript.src || new URL('iife.js', document.baseURI).href) })); console.log('url=iife.js:resolve-import-meta-url/main.js'); console.log('privateProp=iife.js:resolve-import-meta-url/main.js'); diff --git a/test/form/samples/resolve-import-meta-url/_expected/umd.js b/test/form/samples/resolve-import-meta-url/_expected/umd.js index 966aff9b0..e46045d76 100644 --- a/test/form/samples/resolve-import-meta-url/_expected/umd.js +++ b/test/form/samples/resolve-import-meta-url/_expected/umd.js @@ -3,13 +3,14 @@ factory(); })((function () { 'use strict'; + var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; console.log('resolved'); console.log('resolved'); console.log('resolved'); - console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href))); + console.log((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href))); console.log(undefined); - console.log(({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('umd.js', document.baseURI).href)) })); + console.log(({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('umd.js', document.baseURI).href)) })); console.log('url=umd.js:resolve-import-meta-url/main.js'); console.log('privateProp=umd.js:resolve-import-meta-url/main.js'); diff --git a/test/form/samples/supports-core-js/_expected.js b/test/form/samples/supports-core-js/_expected.js index b22049e5a..3935a61b9 100644 --- a/test/form/samples/supports-core-js/_expected.js +++ b/test/form/samples/supports-core-js/_expected.js @@ -333,10 +333,10 @@ var store$4 = sharedStore; (shared$b.exports = function (key, value) { return store$4[key] || (store$4[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.32.1', + version: '3.32.2', mode: 'global', copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE', source: 'https://github.com/zloirock/core-js' }); @@ -3139,7 +3139,9 @@ try { } catch (error) { /* empty */ } var checkCorrectnessOfIteration$4 = function (exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + try { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + } catch (error) { return false; } // workaround of old WebKit + `eval` bug var ITERATION_SUPPORT = false; try { var object = {}; @@ -3316,12 +3318,15 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL var getIterationMethod = function (KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; + if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; + switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; + } + + return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; @@ -4347,7 +4352,7 @@ var pack = function (number, mantissaLength, bytes) { exponent = eMax; } else if (exponent + eBias >= 1) { mantissa = roundToEven((number * c - 1) * pow$5(2, mantissaLength)); - exponent = exponent + eBias; + exponent += eBias; } else { mantissa = roundToEven(number * pow$5(2, eBias - 1) * pow$5(2, mantissaLength)); exponent = 0; @@ -4396,8 +4401,8 @@ var unpack = function (buffer, mantissaLength) { } else if (exponent === eMax) { return mantissa ? NaN : s ? -Infinity : Infinity; } else { - mantissa = mantissa + pow$5(2, mantissaLength); - exponent = exponent - eBias; + mantissa += pow$5(2, mantissaLength); + exponent -= eBias; } return (s ? -1 : 1) * mantissa * pow$5(2, exponent - mantissaLength); }; @@ -5920,6 +5925,7 @@ var exp$2 = Math.exp; // https://tc39.es/ecma262/#sec-math.expm1 var mathExpm1 = (!$expm1 // Old FF bug + // eslint-disable-next-line no-loss-of-precision -- required for old engines || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) !== -2e-17 @@ -6240,9 +6246,20 @@ var toNumber = function (argument) { if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (charCodeAt$6(it, 1)) { - case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i - case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i - default: return +it; + // fast equal of /^0b[01]+$/i + case 66: + case 98: + radix = 2; + maxCode = 49; + break; + // fast equal of /^0o[0-7]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; + default: + return +it; } digits = stringSlice$h(it, 2); length = digits.length; @@ -8674,7 +8691,7 @@ var handleNCG = function (string) { for (; index <= length; index++) { chr = charAt$h(string, index); if (chr === '\\') { - chr = chr + charAt$h(string, ++index); + chr += charAt$h(string, ++index); } else if (chr === ']') { brackets = false; } else if (!brackets) switch (true) { @@ -9366,7 +9383,10 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { re[SYMBOL] = /./[SYMBOL]; } - re.exec = function () { execCalled = true; return null; }; + re.exec = function () { + execCalled = true; + return null; + }; re[SYMBOL](''); return !execCalled; @@ -14653,7 +14673,7 @@ var push$c = uncurryThis$q([].push); var IS_DIGIT = /^\d$/; var IS_NON_ZERO_DIGIT = /^[1-9]$/; -var IS_NUMBER_START = /^(-|\d)$/; +var IS_NUMBER_START = /^(?:-|\d)$/; var IS_WHITESPACE$1 = /^[\t\n\r ]$/; var PRIMITIVE = 0; @@ -18567,7 +18587,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) { var set1 = new global$5.Set([7]); var set2 = structuredCloneImplementation(set1); var number = structuredCloneImplementation(Object$1(7)); - return set2 === set1 || !set2.has(7) || typeof number != 'object' || number !== 7; + return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7; }) && structuredCloneImplementation; }; @@ -19354,7 +19374,7 @@ var encode = function (input) { var q = delta; var k = base; while (true) { - var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) break; var qMinusT = q - t; var baseMinusT = base - t; diff --git a/test/function/samples/emit-file/prebuilt-chunk/_config.js b/test/function/samples/emit-file/prebuilt-chunk/_config.js index 82164251a..496b924c5 100644 --- a/test/function/samples/emit-file/prebuilt-chunk/_config.js +++ b/test/function/samples/emit-file/prebuilt-chunk/_config.js @@ -60,6 +60,7 @@ module.exports = defineTest({ ...prebuiltChunk1ConsumedProperties, name: fileName, map: null, + sourcemapFileName: null, preliminaryFileName: 'my-chunk.js' }); this.emitFile({ @@ -73,6 +74,7 @@ module.exports = defineTest({ name: fileName2, exports: [], map: null, + sourcemapFileName: null, preliminaryFileName: 'my-chunk2.js' }); } diff --git a/test/function/samples/import-meta-url-b/_config.js b/test/function/samples/import-meta-url-b/_config.js new file mode 100644 index 000000000..2023e2d51 --- /dev/null +++ b/test/function/samples/import-meta-url-b/_config.js @@ -0,0 +1,17 @@ +const assert = require('node:assert'); + +const source = 'example.com/main.js'; + +module.exports = defineTest({ + description: 'Access document.currentScript at the top level', + context: { + document: { + currentScript: { + src: source + } + } + }, + exports(exports) { + assert.strictEqual(exports(), source); + } +}); diff --git a/test/function/samples/import-meta-url-b/main.js b/test/function/samples/import-meta-url-b/main.js new file mode 100644 index 000000000..98e4e438c --- /dev/null +++ b/test/function/samples/import-meta-url-b/main.js @@ -0,0 +1,6 @@ +export default function getUrl() { + document.currentScript = { src: '' }; + const url = import.meta.url; + assert.ok(import.meta.abc || true); + return url; +} diff --git a/test/misc/optionList.js b/test/misc/optionList.js index cce929c1f..e34a54586 100644 --- a/test/misc/optionList.js +++ b/test/misc/optionList.js @@ -1,6 +1,6 @@ exports.input = 'acorn, acornInjectPlugins, cache, context, experimentalCacheExpiry, experimentalLogSideEffects, external, inlineDynamicImports, input, logLevel, makeAbsoluteExternalsRelative, manualChunks, maxParallelFileOps, maxParallelFileReads, moduleContext, onLog, onwarn, perf, plugins, preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations, treeshake, watch'; exports.flags = - 'acorn, acornInjectPlugins, amd, assetFileNames, banner, bundleConfigAsCjs, c, cache, chunkFileNames, compact, config, configPlugin, context, d, dir, dynamicImportFunction, dynamicImportInCjs, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalDeepDynamicChunkOptimization, experimentalLogSideEffects, experimentalMinChunkSize, exports, extend, external, externalImportAssertions, externalLiveBindings, f, failAfterWarnings, file, filterLogs, footer, format, freeze, g, generatedCode, globals, h, hoistTransitiveImports, i, indent, inlineDynamicImports, input, interop, intro, logLevel, m, makeAbsoluteExternalsRelative, manualChunks, maxParallelFileOps, maxParallelFileReads, minifyInternalExports, moduleContext, n, name, namespaceToStringTag, noConflict, o, onLog, onwarn, outro, p, paths, perf, plugin, plugins, preferConst, preserveEntrySignatures, preserveModules, preserveModulesRoot, preserveSymlinks, sanitizeFileName, shimMissingExports, silent, sourcemap, sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, stdin, strict, strictDeprecations, systemNullSetters, treeshake, v, validate, w, waitForBundleInput, watch'; + 'acorn, acornInjectPlugins, amd, assetFileNames, banner, bundleConfigAsCjs, c, cache, chunkFileNames, compact, config, configPlugin, context, d, dir, dynamicImportFunction, dynamicImportInCjs, e, entryFileNames, environment, esModule, experimentalCacheExpiry, experimentalDeepDynamicChunkOptimization, experimentalLogSideEffects, experimentalMinChunkSize, exports, extend, external, externalImportAssertions, externalLiveBindings, f, failAfterWarnings, file, filterLogs, footer, format, freeze, g, generatedCode, globals, h, hoistTransitiveImports, i, indent, inlineDynamicImports, input, interop, intro, logLevel, m, makeAbsoluteExternalsRelative, manualChunks, maxParallelFileOps, maxParallelFileReads, minifyInternalExports, moduleContext, n, name, namespaceToStringTag, noConflict, o, onLog, onwarn, outro, p, paths, perf, plugin, plugins, preferConst, preserveEntrySignatures, preserveModules, preserveModulesRoot, preserveSymlinks, sanitizeFileName, shimMissingExports, silent, sourcemap, sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, sourcemapFileNames, stdin, strict, strictDeprecations, systemNullSetters, treeshake, v, validate, w, waitForBundleInput, watch'; exports.output = - 'amd, assetFileNames, banner, chunkFileNames, compact, dir, dynamicImportFunction, dynamicImportInCjs, entryFileNames, esModule, experimentalDeepDynamicChunkOptimization, experimentalMinChunkSize, exports, extend, externalImportAssertions, externalLiveBindings, file, footer, format, freeze, generatedCode, globals, hoistTransitiveImports, indent, inlineDynamicImports, interop, intro, manualChunks, minifyInternalExports, name, namespaceToStringTag, noConflict, outro, paths, plugins, preferConst, preserveModules, preserveModulesRoot, sanitizeFileName, sourcemap, sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, sourcemapIgnoreList, sourcemapPathTransform, strict, systemNullSetters, validate'; + 'amd, assetFileNames, banner, chunkFileNames, compact, dir, dynamicImportFunction, dynamicImportInCjs, entryFileNames, esModule, experimentalDeepDynamicChunkOptimization, experimentalMinChunkSize, exports, extend, externalImportAssertions, externalLiveBindings, file, footer, format, freeze, generatedCode, globals, hoistTransitiveImports, indent, inlineDynamicImports, interop, intro, manualChunks, minifyInternalExports, name, namespaceToStringTag, noConflict, outro, paths, plugins, preferConst, preserveModules, preserveModulesRoot, sanitizeFileName, sourcemap, sourcemapBaseUrl, sourcemapExcludeSources, sourcemapFile, sourcemapFileNames, sourcemapIgnoreList, sourcemapPathTransform, strict, systemNullSetters, validate'; diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index 47d48021d..d3119aece 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -59,8 +59,9 @@ async function generateAndTestBundle(bundle, outputOptions, config, format, warn } else if (warnings.length > 0) { throw new Error(`Unexpected warnings`); } + const { - output: [{ code, map, fileName }] + output: [{ code, map, fileName, sourcemapFileName }] } = await bundle.write(outputOptions); - await config.test(code, map, { fileName, format }); + await config.test(code, map, { fileName, sourcemapFileName, format }); }