diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index a17953d7f..2d2ae2f24 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -4,7 +4,7 @@ - The [`rollup`](https://www.npmjs.com/package/rollup) npm package contains both Rollup's Node.js JavaScript interface and the command-line-interface (CLI). - There is a separate browser build available as [`@rollup/browser`](https://www.npmjs.com/package/@rollup/browser). It exposes the same JavaScript interface as the Node.js build but does not include the CLI and also requires writing a plugin to encapsulate file reading. Instead of native code dependencies, this build has a bundled WASM artifact included that can be loaded in the browser. This is what the [Rollup REPL](https://rollupjs.org/repl) uses. -- For every supported platform-architecture combination, there is a separate pacakge containing the native code. These are not listed in the committed `package.json` file but are added dynamically during publishing as `optionalDependencies`. The `README.md` and `package.json` files for those dependencies can be found in the [`npm`](npm) folder. The corresponding binaries are built and published from [GitHub Actions](.github/workflows/build-and-tests.yml) whenever a new release version tag is pushed. The actual loading of the native code is handled by [`native.js`](native.js) which is copied into the output folder during build. So to add a new platform-architecture combination, you need to +- For every supported platform-architecture combination, there is a separate package containing the native code. These are not listed in the committed `package.json` file but are added dynamically during publishing as `optionalDependencies`. The `README.md` and `package.json` files for those dependencies can be found in the [`npm`](npm) folder. The corresponding binaries are built and published from [GitHub Actions](.github/workflows/build-and-tests.yml) whenever a new release version tag is pushed. The actual loading of the native code is handled by [`native.js`](native.js) which is copied into the output folder during build. So to add a new platform-architecture combination, you need to - add a new package in the `npm` folder - update the `native.js` file - add the corresponding triple to the [`package.json`](package.json) file as napi-rs depends on this @@ -24,7 +24,7 @@ - The entry point for the Node.js build is [`node-entry.ts`](src/node-entry.ts) while the browser build uses [`browser-entry.ts`](src/browser-entry.ts). Those are mostly identical except that the browser build does not expose the watch mode interface. - The CLI is a wrapper around the JavaScript interface. - It resides in the [`cli` folder](cli) with the entry point [cli.ts](cli/cli.ts). - - The logic to read configuration files resides in [locaConfigFile.ts](cli/run/loadConfigFile.ts) and is exposed as a separate export via `import { loadConfigFile } from "rollup/loadConfigFile"`. + - The logic to read configuration files resides in [loadConfigFile.ts](cli/run/loadConfigFile.ts) and is exposed as a separate export via `import { loadConfigFile } from "rollup/loadConfigFile"`. - Only the CLI is able to handle arrays of configurations. Those are handled sequentially in [`run/index.ts`](cli/run/index.ts). - The CLI handles several CLI-only options that are specific to the Node.js environment like setting environment variables or handling std-in, see [Command line flags](docs/command-line-interface/index.md#command-line-flags). @@ -42,7 +42,7 @@ The Rust entrypoints are [`bindings_napi/src/lib.rs`](rust/bindings_napi/src/lib Building an output has two phases -- The "build" phase builds a module graph form the input files and decides, which code should be included in the output +- The "build" phase builds a module graph from the input files and decides, which code should be included in the output - It is triggered by calling the `rollup(inputOptions)` function exported by the JavaScript interface - It returns a "bundle" object that has `generate` and `write` methods - The "generate" phase generates the output files from the bundle by calling `.generate(outputOptions)` or `.write(outputOptions)` @@ -96,14 +96,14 @@ To understand this phase from a plugin perspective, have a look at [Build Hooks] To understand this phase from a plugin perspective, have a look at [Output Generation Hooks](https://rollupjs.org/plugin-development/#output-generation-hooks), which again contains a graph to show in which order these hooks are executed. In detail `Bundle.generate` performs the following steps -- Assign modules to chunks via [`chunkAssigment.ts`](src/utils/chunkAssignment.ts) +- Assign modules to chunks via [`chunkAssignment.ts`](src/utils/chunkAssignment.ts) - Determine the exports for each chunk by tracing the included inter-module dependencies - Render the chunks, which is orchestrated by the [`renderChunks`](src/utils/renderChunks.ts) helper - Render the chunks with placeholders for chunk hashes by calling `Chunk.render()` - Determine how dynamic imports and `import.meta` references should be resolved and store this on the corresponding AST nodes. - Determine the final deconflicted variable names and store those on the AST nodes as well in [`deconflictChunk.ts`](src/utils/deconflictChunk.ts) - Render each module by calling the `.render` methods of their AST nodes. This is also where tree-shaken nodes are removed from the output. - - Render the format specific wrapper with imports and exports for this chunk by calling the corresponding [finalizer](src/finalisers). + - Render the format specific wrapper with imports and exports for this chunk by calling the corresponding [finaliser](src/finalisers). - Transform the rendered chunks via the [`renderChunk`](https://rollupjs.org/plugin-development/#renderchunk) plugin hook - Determine the final chunk hashes based on the actual rendered content and the chunk dependency graph and replace the placeholders diff --git a/CHANGELOG.md b/CHANGELOG.md index 88942dad7..53ce699b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # rollup changelog +## 4.18.0 + +_2024-05-22_ + +### Features + +- Resolve import.meta.filename and .dirname in transpiled plugins (#5520) + +### Pull Requests + +- [#5504](https://github.com/rollup/rollup/pull/5504): Auto generate node index (@lukastaegert) +- [#5507](https://github.com/rollup/rollup/pull/5507): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5508](https://github.com/rollup/rollup/pull/5508): chore(deps): lock file maintenance (@renovate[bot]) +- [#5510](https://github.com/rollup/rollup/pull/5510): Split up converter.rs into AST nodes (@lukastaegert) +- [#5512](https://github.com/rollup/rollup/pull/5512): chore(deps): update dependency builtin-modules to v4 (@renovate[bot], @lukastaegert) +- [#5514](https://github.com/rollup/rollup/pull/5514): chore(deps): lock file maintenance minor/patch updates (@renovate[bot]) +- [#5518](https://github.com/rollup/rollup/pull/5518): chore(deps): update dependency eslint-plugin-unicorn to v53 (@renovate[bot], @lukastaegert) +- [#5519](https://github.com/rollup/rollup/pull/5519): chore(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert) +- [#5520](https://github.com/rollup/rollup/pull/5520): Resolve import.meta.{filename,dirname} in files imported from config (@BPScott) +- [#5521](https://github.com/rollup/rollup/pull/5521): docs: correct base32 to base36 in documentation (@highcastlee) + ## 4.17.2 _2024-04-30_ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f59b6a89b..50d2827fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,6 +61,10 @@ After applying this setting, you may need to reset your local branch to ensure t git reset --hard ``` +### Installing dependencies + +Running `npm install` will install the necessary dependencies. If it fails, it might be because the Rust toolchain is not yet set up for WebAssembly, see above. + ### How to run one test on your local machine With `npm run test` you can run all tests together. diff --git a/LICENSE.md b/LICENSE.md index 4d13430cf..ce44fa22e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -122,7 +122,7 @@ Repository: micromatch/braces > The MIT License (MIT) > -> Copyright (c) 2014-2018, Jon Schlinkert. +> Copyright (c) 2014-present, Jon Schlinkert. > > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal diff --git a/browser/package.json b/browser/package.json index ddd69bac5..8cbc1ab1b 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@rollup/browser", - "version": "4.17.2", + "version": "4.18.0", "description": "Next-generation ES module bundler browser build", "main": "dist/rollup.browser.js", "module": "dist/es/rollup.browser.js", diff --git a/cli/run/loadConfigFile.ts b/cli/run/loadConfigFile.ts index d01c1980e..33e3297d7 100644 --- a/cli/run/loadConfigFile.ts +++ b/cli/run/loadConfigFile.ts @@ -118,8 +118,14 @@ async function loadTranspiledConfigFile( if (property === 'url') { return `'${pathToFileURL(moduleId).href}'`; } + if (property == 'filename') { + return `'${moduleId}'`; + } + if (property == 'dirname') { + return `'${path.dirname(moduleId)}'`; + } if (property == null) { - return `{url:'${pathToFileURL(moduleId).href}'}`; + return `{url:'${pathToFileURL(moduleId).href}', filename: '${moduleId}', dirname: '${path.dirname(moduleId)}'}`; } } } diff --git a/docs/configuration-options/index.md b/docs/configuration-options/index.md index 5256e09a2..a4d87169f 100755 --- a/docs/configuration-options/index.md +++ b/docs/configuration-options/index.md @@ -908,11 +908,19 @@ exports.foo = foo; ### output.hashCharacters +<<<<<<< HEAD | | | | -----: | :------------------------------ | | 类型: | `"base64" \| "base32" \| "hex"` | | CLI: | `--hashCharacters ` | | 默认: | `"base64"` | +======= +| | | +| -------: | :------------------------------ | +| Type: | `"base64" \| "base36" \| "hex"` | +| CLI: | `--hashCharacters ` | +| Default: | `"base64"` | +>>>>>>> 1a7da5ac529d543ad8fffd1cdfbf9a80040a1176 这个选项决定了 Rollup 在生成文件哈希时可以使用的字符集。 diff --git a/package-lock.json b/package-lock.json index d4d080112..f3e0feece 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rollup", - "version": "4.17.2", + "version": "4.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rollup", - "version": "4.17.2", + "version": "4.18.0", "license": "MIT", "dependencies": { "@types/estree": "1.0.5" @@ -33,15 +33,15 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", "@rollup/pluginutils": "^5.1.0", - "@shikijs/vitepress-twoslash": "^1.5.1", + "@shikijs/vitepress-twoslash": "^1.6.0", "@types/eslint": "^8.56.10", "@types/inquirer": "^9.0.7", "@types/mocha": "^10.0.6", "@types/node": "~18.18.14", "@types/semver": "^7.5.8", "@types/yargs-parser": "^21.0.3", - "@typescript-eslint/eslint-plugin": "^7.9.0", - "@typescript-eslint/parser": "^7.9.0", + "@typescript-eslint/eslint-plugin": "^7.10.0", + "@typescript-eslint/parser": "^7.10.0", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "acorn": "^8.11.3", @@ -67,7 +67,7 @@ "fs-extra": "^11.2.0", "github-api": "^3.4.0", "husky": "^9.0.11", - "inquirer": "^9.2.21", + "inquirer": "^9.2.22", "is-reference": "^3.0.2", "lint-staged": "^15.2.2", "locate-character": "^3.0.0", @@ -80,7 +80,7 @@ "pretty-ms": "^9.0.0", "requirejs": "^2.3.6", "rollup": "^4.17.2", - "rollup-plugin-license": "^3.3.1", + "rollup-plugin-license": "^3.4.0", "rollup-plugin-string": "^3.0.0", "semver": "^7.6.2", "shx": "^0.3.4", @@ -92,10 +92,9 @@ "tslib": "^2.6.2", "typescript": "^5.4.5", "vite": "^5.2.11", - "vitepress": "^1.1.4", + "vitepress": "^1.2.2", "vue": "^3.4.27", "wasm-pack": "^0.12.1", - "weak-napi": "^2.0.2", "yargs-parser": "^21.1.1" }, "engines": { @@ -817,9 +816,9 @@ } }, "node_modules/@codemirror/lint": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.7.1.tgz", - "integrity": "sha512-rELba6QJD20/bNXWP/cKTGLrwVEcpa2ViwULCV03ONcY1Je85++7sczVRUlnE4TJMjatx3IJTz6HX4NXi+moXw==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.0.tgz", + "integrity": "sha512-lsFofvaw0lnPRJlQylNsC4IRt/1lI4OD/yYslrSGVndOJfStc58v+8p9dgGiD90ktOfL7OhBWns1ZETYgz0EJA==", "dev": true, "license": "MIT", "dependencies": { @@ -1473,9 +1472,9 @@ "license": "BSD-3-Clause" }, "node_modules/@inquirer/figures": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.1.tgz", - "integrity": "sha512-mtup3wVKia3ZwULPHcbs4Mor8Voi+iIXEWD7wCNbIO6lYR62oPCTQyrddi5OMYVXHzeCSoneZwJuS8sBvlEwDw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.2.tgz", + "integrity": "sha512-4F1MBwVr3c/m4bAUef6LgkvBfSjzwH+OfldgHqcuacWwSUetFebM2wi58WfG9uk1rR98U6GwLed4asLJbwdV5w==", "dev": true, "license": "MIT", "engines": { @@ -1716,9 +1715,9 @@ } }, "node_modules/@mermaid-js/mermaid-cli": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-10.9.0.tgz", - "integrity": "sha512-zQL27VjsRilKFkauU4G0V/GteZuYF27lqg46Vekvosflmt4C3PNMzGunsgMCB9DeMk5VJxqjfSvZF4US9QRRPQ==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-10.9.1.tgz", + "integrity": "sha512-ajpGUKmB5YbRRzrFR+0dbykF9mTvce4FpHWGYPYTry8ZsOgP6h7SUnojyCJDGgbReCnArODCM8L212qIcxshIw==", "dev": true, "license": "MIT", "dependencies": { @@ -1897,9 +1896,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.7", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", - "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", + "version": "25.0.8", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", + "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", "dev": true, "license": "MIT", "dependencies": { @@ -2075,9 +2074,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", - "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", "cpu": [ "arm" ], @@ -2089,9 +2088,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz", - "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", "cpu": [ "arm64" ], @@ -2103,9 +2102,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz", - "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", "cpu": [ "arm64" ], @@ -2117,9 +2116,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz", - "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", "cpu": [ "x64" ], @@ -2131,9 +2130,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz", - "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", "cpu": [ "arm" ], @@ -2145,9 +2144,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz", - "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", "cpu": [ "arm" ], @@ -2159,9 +2158,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz", - "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", "cpu": [ "arm64" ], @@ -2173,9 +2172,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz", - "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", "cpu": [ "arm64" ], @@ -2187,9 +2186,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz", - "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", "cpu": [ "ppc64" ], @@ -2201,9 +2200,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz", - "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", "cpu": [ "riscv64" ], @@ -2215,9 +2214,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz", - "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", "cpu": [ "s390x" ], @@ -2229,9 +2228,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", - "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", "cpu": [ "x64" ], @@ -2243,9 +2242,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", - "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", "cpu": [ "x64" ], @@ -2257,9 +2256,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz", - "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", "cpu": [ "arm64" ], @@ -2271,9 +2270,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz", - "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", "cpu": [ "ia32" ], @@ -2285,9 +2284,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz", - "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", "cpu": [ "x64" ], @@ -2299,46 +2298,46 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.5.2.tgz", - "integrity": "sha512-wSAOgaz48GmhILFElMCeQypSZmj6Ru6DttOOtl3KNkdJ17ApQuGNCfzpk4cClasVrnIu45++2DBwG4LNMQAfaA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.0.tgz", + "integrity": "sha512-NIEAi5U5R7BLkbW1pG/ZKu3eb1lzc3/+jD0lFsuxMT7zjaf9bbNwdNyMr7zh/Zl8EXQtQ+MYBAt5G+JLu+5DlA==", "dev": true, "license": "MIT" }, "node_modules/@shikijs/transformers": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.5.2.tgz", - "integrity": "sha512-/Sh64rKOFGMQLCvtHeL1Y7EExdq8LLxcdVkvoGx2aMHsYMOn8DckYl2gYKMHRBu/YUt1C38/Amd1Jdh48tWHgw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.6.0.tgz", + "integrity": "sha512-qGfHe1ECiqfE2STPWvfogIj/9Q0SK+MCRJdoITkW7AmFuB7DmbFnBT2US84+zklJOB51MzNO8RUXZiauWssJlQ==", "dev": true, "license": "MIT", "dependencies": { - "shiki": "1.5.2" + "shiki": "1.6.0" } }, "node_modules/@shikijs/twoslash": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-1.5.2.tgz", - "integrity": "sha512-elXSplqPxoifKAzCO9TJ6zkNN9XjM22+zU8OD+0tH6KDgk/8qaLQ48rCTg8/Ir7nvk0VuGnFz4cc5eQ5oX009A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/twoslash/-/twoslash-1.6.0.tgz", + "integrity": "sha512-sA9l5hgKNiB+CFUNwxeWyh4nvA6J/fSIzVZId1AhO4rRLINi5dFb13MmDSnxqw+60HKCKjsoWKcbVGvToQXJVA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.5.2", + "@shikijs/core": "1.6.0", "twoslash": "^0.2.6" } }, "node_modules/@shikijs/vitepress-twoslash": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.5.2.tgz", - "integrity": "sha512-mzElOZzp9qd6O8tDNBJzUhAKlrNC27gIC5fA/ObVZSfMUyMdylxDxER7/BivGi3LrPSNcpgYuvZjzKTNbfjdOQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.6.0.tgz", + "integrity": "sha512-mXK2myylw30mk4QcWQA+gX2PDYbApeP7KvDazgGQtjwuOFAQlydHsNVF/TmgOP6iVU/93h7LhLgxPnPfqHoPxg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/twoslash": "1.5.2", + "@shikijs/twoslash": "1.6.0", "floating-vue": "^5.2.2", "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm": "^3.0.0", "mdast-util-to-hast": "^13.1.0", - "shiki": "1.5.2", + "shiki": "1.6.0", "twoslash": "^0.2.6", "twoslash-vue": "^0.2.6", "vue": "^3.4.27" @@ -2573,7 +2572,8 @@ "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/through": { "version": "0.0.33", @@ -2618,17 +2618,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz", - "integrity": "sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.10.0.tgz", + "integrity": "sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.9.0", - "@typescript-eslint/type-utils": "7.9.0", - "@typescript-eslint/utils": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0", + "@typescript-eslint/scope-manager": "7.10.0", + "@typescript-eslint/type-utils": "7.10.0", + "@typescript-eslint/utils": "7.10.0", + "@typescript-eslint/visitor-keys": "7.10.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2652,16 +2652,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.9.0.tgz", - "integrity": "sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.10.0.tgz", + "integrity": "sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.9.0", - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/typescript-estree": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0", + "@typescript-eslint/scope-manager": "7.10.0", + "@typescript-eslint/types": "7.10.0", + "@typescript-eslint/typescript-estree": "7.10.0", + "@typescript-eslint/visitor-keys": "7.10.0", "debug": "^4.3.4" }, "engines": { @@ -2681,14 +2681,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz", - "integrity": "sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.10.0.tgz", + "integrity": "sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0" + "@typescript-eslint/types": "7.10.0", + "@typescript-eslint/visitor-keys": "7.10.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2699,14 +2699,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz", - "integrity": "sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.10.0.tgz", + "integrity": "sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.9.0", - "@typescript-eslint/utils": "7.9.0", + "@typescript-eslint/typescript-estree": "7.10.0", + "@typescript-eslint/utils": "7.10.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2727,9 +2727,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.9.0.tgz", - "integrity": "sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.10.0.tgz", + "integrity": "sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==", "dev": true, "license": "MIT", "engines": { @@ -2741,14 +2741,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz", - "integrity": "sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.10.0.tgz", + "integrity": "sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0", + "@typescript-eslint/types": "7.10.0", + "@typescript-eslint/visitor-keys": "7.10.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2770,16 +2770,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.9.0.tgz", - "integrity": "sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.10.0.tgz", + "integrity": "sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.9.0", - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/typescript-estree": "7.9.0" + "@typescript-eslint/scope-manager": "7.10.0", + "@typescript-eslint/types": "7.10.0", + "@typescript-eslint/typescript-estree": "7.10.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2793,13 +2793,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz", - "integrity": "sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.10.0.tgz", + "integrity": "sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/types": "7.10.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -2923,13 +2923,13 @@ "license": "MIT" }, "node_modules/@vue/devtools-kit": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.2.0.tgz", - "integrity": "sha512-Kx+U0QiQg/g714euYKfnCdhTcOycSlH1oyTE57D0sAmisdsRCNLfXcnnIwcFY2jdCpuz9DNbuE0VWQuYF5zAZQ==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.2.1.tgz", + "integrity": "sha512-Wak/fin1X0Q8LLIfCAHBrdaaB+R6IdpSXsDByPHbQ3BmkCP0/cIo/oEGp9i0U2+gEqD4L3V9RDjNf1S34DTzQQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-shared": "^7.2.0", + "@vue/devtools-shared": "^7.2.1", "hookable": "^5.5.3", "mitt": "^3.0.1", "perfect-debounce": "^1.0.0", @@ -2947,9 +2947,9 @@ "license": "MIT" }, "node_modules/@vue/devtools-shared": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.2.0.tgz", - "integrity": "sha512-gVr3IjKjU7axNvclRgICgy1gq/TDnF1hhBAEox+l5mMXZiTIFVIm1zpcIPssc0HxMDgzy+lXqOVsY4DGyZ+ZeA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.2.1.tgz", + "integrity": "sha512-PCJF4UknJmOal68+X9XHyVeQ+idv0LFujkTOIW30+GaMJqwFVN9LkQKX4gLqn61KkGMdJTzQ1bt7EJag3TI6AA==", "dev": true, "license": "MIT", "dependencies": { @@ -3631,9 +3631,9 @@ } }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "dev": true, "license": "MIT", "dependencies": { @@ -3728,13 +3728,13 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4006,9 +4006,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001620", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz", - "integrity": "sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==", + "version": "1.0.30001621", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", + "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", "dev": true, "funding": [ { @@ -5497,16 +5497,16 @@ } }, "node_modules/dompurify": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.3.tgz", - "integrity": "sha512-5sOWYSNPaxz6o2MUPvtyxTTqR4D3L77pr5rUQoWgD5ROQtVIZQgJkXbo1DLlK3vj11YGw5+LnF4SYti4gZmwng==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.4.tgz", + "integrity": "sha512-2gnshi6OshmuKil8rMZuQCGiUF3cUxHY3NGDzUAdUx/NPEe5DVnO8BDoAQouvgwnx0R/+a6jUn36Z0FSdq8vww==", "dev": true, "license": "(MPL-2.0 OR Apache-2.0)" }, "node_modules/electron-to-chromium": { - "version": "1.4.773", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.773.tgz", - "integrity": "sha512-87eHF+h3PlCRwbxVEAw9KtK3v7lWfc/sUDr0W76955AdYTG4bV/k0zrl585Qnj/skRMH2qOSiE+kqMeOQ+LOpw==", + "version": "1.4.782", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz", + "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==", "dev": true, "license": "ISC" }, @@ -6024,6 +6024,7 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-53.0.0.tgz", "integrity": "sha512-kuTcNo9IwwUCfyHGwQFOK/HjJAYzbODHN3wP0PgqbW+jbXqpNWxNVpVhj2tO9SixBwuAdmal8rVcWKBxwFnGuw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.24.5", "@eslint-community/eslint-utils": "^4.4.0", @@ -6053,10 +6054,11 @@ } }, "node_modules/eslint-plugin-unicorn/node_modules/@eslint/eslintrc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.0.2.tgz", - "integrity": "sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -6080,6 +6082,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6090,6 +6093,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -6102,6 +6106,7 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-10.0.1.tgz", "integrity": "sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.11.3", "acorn-jsx": "^5.3.2", @@ -6119,6 +6124,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -6131,6 +6137,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6541,9 +6548,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { @@ -6990,23 +6997,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-symbol-from-current-process-h": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz", - "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==", - "dev": true, - "license": "MIT" - }, - "node_modules/get-uv-event-loop-napi-h": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz", - "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-symbol-from-current-process-h": "^1.0.1" - } - }, "node_modules/github-api": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/github-api/-/github-api-3.4.0.tgz", @@ -7458,6 +7448,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "license": "ISC", "dependencies": { @@ -7473,13 +7464,13 @@ "license": "ISC" }, "node_modules/inquirer": { - "version": "9.2.21", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.21.tgz", - "integrity": "sha512-c/dwDruM1FtzeISV+xMHm+JZTmhpmgWPEZI2bU3+Fwu5MhbAX0zMHHxj5warNfttE5NUID3aijrFUpDc2yBvcA==", + "version": "9.2.22", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.22.tgz", + "integrity": "sha512-SqLLa/Oe5rZUagTR9z+Zd6izyatHglbmbvVofo1KzuVB54YHleWzeHNLoR7FOICGOeQSqeLh1cordb3MzhGcEw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.1", + "@inquirer/figures": "^1.0.2", "@ljharb/through": "^2.3.13", "ansi-escapes": "^4.3.2", "chalk": "^5.3.0", @@ -8280,13 +8271,16 @@ } }, "node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true, "license": "MIT", "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -8297,22 +8291,22 @@ "license": "MIT" }, "node_modules/lint-staged": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", - "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", + "version": "15.2.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.4.tgz", + "integrity": "sha512-3F9KRQIS2fVDGtCkBp4Bx0jswjX7zUcKx6OF0ZeY1prksUyKPRIIUqZhIUYAstJfvj6i48VFs4dwVIbCYwvTYQ==", "dev": true, "license": "MIT", "dependencies": { "chalk": "5.3.0", - "commander": "11.1.0", + "commander": "12.1.0", "debug": "4.3.4", "execa": "8.0.1", - "lilconfig": "3.0.0", - "listr2": "8.0.1", - "micromatch": "4.0.5", + "lilconfig": "3.1.1", + "listr2": "8.2.1", + "micromatch": "4.0.6", "pidtree": "0.6.0", "string-argv": "0.3.2", - "yaml": "2.3.4" + "yaml": "2.4.2" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -8325,19 +8319,46 @@ } }, "node_modules/lint-staged/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/lint-staged/node_modules/micromatch": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.6.tgz", + "integrity": "sha512-Y4Ypn3oujJYxJcMacVgcs92wofTHxp9FzfDpQON4msDefoC0lb3ETvQLOdLcbhSwU1bz8HrL/1sygfBIHudrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/lint-staged/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/listr2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", - "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.1.tgz", + "integrity": "sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g==", "dev": true, "license": "MIT", "dependencies": { @@ -8345,7 +8366,7 @@ "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^6.0.0", - "rfdc": "^1.3.0", + "rfdc": "^1.3.1", "wrap-ansi": "^9.0.0" }, "engines": { @@ -10142,13 +10163,13 @@ "license": "MIT" }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -10567,13 +10588,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true, - "license": "MIT" - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -10595,18 +10609,6 @@ } } }, - "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", - "dev": true, - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -11553,9 +11555,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", - "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", + "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", "dev": true, "license": "MIT", "dependencies": { @@ -12256,9 +12258,9 @@ "license": "Unlicense" }, "node_modules/rollup": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", - "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", "dev": true, "license": "MIT", "dependencies": { @@ -12272,22 +12274,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.17.2", - "@rollup/rollup-android-arm64": "4.17.2", - "@rollup/rollup-darwin-arm64": "4.17.2", - "@rollup/rollup-darwin-x64": "4.17.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", - "@rollup/rollup-linux-arm-musleabihf": "4.17.2", - "@rollup/rollup-linux-arm64-gnu": "4.17.2", - "@rollup/rollup-linux-arm64-musl": "4.17.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", - "@rollup/rollup-linux-riscv64-gnu": "4.17.2", - "@rollup/rollup-linux-s390x-gnu": "4.17.2", - "@rollup/rollup-linux-x64-gnu": "4.17.2", - "@rollup/rollup-linux-x64-musl": "4.17.2", - "@rollup/rollup-win32-arm64-msvc": "4.17.2", - "@rollup/rollup-win32-ia32-msvc": "4.17.2", - "@rollup/rollup-win32-x64-msvc": "4.17.2", + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, @@ -12517,9 +12519,9 @@ "license": "MIT" }, "node_modules/search-insights": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.13.0.tgz", - "integrity": "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", + "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", "dev": true, "license": "MIT", "peer": true @@ -12588,17 +12590,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate-napi": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/setimmediate-napi/-/setimmediate-napi-1.0.6.tgz", - "integrity": "sha512-sdNXN15Av1jPXuSal4Mk4tEAKn0+8lfF9Z50/negaQMrAIO9c1qM0eiCh8fT6gctp0RiCObk+6/Xfn5RMGdZoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-symbol-from-current-process-h": "^1.0.1", - "get-uv-event-loop-napi-h": "^1.0.5" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -12696,13 +12687,13 @@ } }, "node_modules/shiki": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.5.2.tgz", - "integrity": "sha512-fpPbuSaatinmdGijE7VYUD3hxLozR3ZZ+iAx8Iy2X6REmJGyF5hQl94SgmiUNTospq346nXUVZx0035dyGvIVw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.0.tgz", + "integrity": "sha512-P31ROeXcVgW/k3Z+vUUErcxoTah7ZRaimctOpzGuqAntqnnSmx1HOsvnbAB8Z2qfXPRhw61yptAzCsuKOhTHwQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.5.2" + "@shikijs/core": "1.6.0" } }, "node_modules/shx": { @@ -12923,9 +12914,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", "dev": true, "license": "CC0-1.0" }, @@ -14033,27 +14024,28 @@ } }, "node_modules/vitepress": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.1.4.tgz", - "integrity": "sha512-bWIzFZXpPB6NIDBuWnS20aMADH+FcFKDfQNYFvbOWij03PR29eImTceQHIzCKordjXYBhM/TjE5VKFTUJ3EheA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.2.2.tgz", + "integrity": "sha512-uZ3nXR5NY4nYj3RJWCo5jev9qlNZAQo5SUXu1U0QSUx84cUm/o7hCTDVjZ4njVSVui+PsV1oAbdQOg8ygbaf4w==", "dev": true, "license": "MIT", "dependencies": { "@docsearch/css": "^3.6.0", "@docsearch/js": "^3.6.0", - "@shikijs/core": "^1.3.0", - "@shikijs/transformers": "^1.3.0", - "@types/markdown-it": "^14.0.1", + "@shikijs/core": "^1.5.2", + "@shikijs/transformers": "^1.5.2", + "@types/markdown-it": "^14.1.1", "@vitejs/plugin-vue": "^5.0.4", - "@vue/devtools-api": "^7.0.27", + "@vue/devtools-api": "^7.2.0", + "@vue/shared": "^3.4.27", "@vueuse/core": "^10.9.0", "@vueuse/integrations": "^10.9.0", "focus-trap": "^7.5.4", "mark.js": "8.11.1", "minisearch": "^6.3.0", - "shiki": "^1.3.0", - "vite": "^5.2.10", - "vue": "^3.4.25" + "shiki": "^1.5.2", + "vite": "^5.2.11", + "vue": "^3.4.27" }, "bin": { "vitepress": "bin/vitepress.js" @@ -14072,13 +14064,13 @@ } }, "node_modules/vitepress/node_modules/@vue/devtools-api": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.2.0.tgz", - "integrity": "sha512-92RsjyH9WKNFO6U/dECUMakq4dm2CeqEDJYLJ8wZ81AnCifpXE7d4jPIjK34ENsPaapA6BSfIZdH/qzLOHiepA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.2.1.tgz", + "integrity": "sha512-6oNCtyFOrNdqm6GUkFujsCgFlpbsHLnZqq7edeM/+cxAbMyCWvsaCsIMUaz7AiluKLccCGEM8fhOsjaKgBvb7g==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-kit": "^7.2.0" + "@vue/devtools-kit": "^7.2.1" } }, "node_modules/vue": { @@ -14220,19 +14212,6 @@ "defaults": "^1.0.3" } }, - "node_modules/weak-napi": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/weak-napi/-/weak-napi-2.0.2.tgz", - "integrity": "sha512-LcOSVFrghtVXf4QH+DLIy8iPiCktV7lVbqRDYP+bDPpLzC41RCHQPMyQOnPpWO41Ie4CmnDxS+mbL72r5xFMMQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^3.0.0", - "node-gyp-build": "^4.2.1", - "setimmediate-napi": "^1.0.3" - } - }, "node_modules/web-worker": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz", @@ -14463,11 +14442,14 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", + "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", "dev": true, "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } diff --git a/package.json b/package.json index a091a2440..0cc6268d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "4.17.2", + "version": "4.18.0", "description": "Next-generation ES module bundler", "main": "dist/rollup.js", "module": "dist/es/rollup.js", @@ -81,7 +81,7 @@ "test:all": "concurrently --kill-others-on-fail -c green,blue,magenta,cyan,red 'npm:test:only' 'npm:test:browser' 'npm:test:typescript' 'npm:test:package' 'npm:test:options'", "test:coverage": "npm run build:cjs && shx rm -rf coverage/* && nyc --reporter html mocha test/test.js", "test:coverage:browser": "npm run build && shx rm -rf coverage/* && nyc mocha test/browser/index.js", - "test:leak": "node --expose-gc test/leak/index.js", + "test:leak": "npm install --no-save weak-napi && node --expose-gc test/leak/index.js", "test:package": "node scripts/test-package.js", "test:options": "node scripts/test-options.js", "test:only": "mocha test/test.js", @@ -132,15 +132,15 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", "@rollup/pluginutils": "^5.1.0", - "@shikijs/vitepress-twoslash": "^1.5.1", + "@shikijs/vitepress-twoslash": "^1.6.0", "@types/eslint": "^8.56.10", "@types/inquirer": "^9.0.7", "@types/mocha": "^10.0.6", "@types/node": "~18.18.14", "@types/semver": "^7.5.8", "@types/yargs-parser": "^21.0.3", - "@typescript-eslint/eslint-plugin": "^7.9.0", - "@typescript-eslint/parser": "^7.9.0", + "@typescript-eslint/eslint-plugin": "^7.10.0", + "@typescript-eslint/parser": "^7.10.0", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "acorn": "^8.11.3", @@ -166,7 +166,7 @@ "fs-extra": "^11.2.0", "github-api": "^3.4.0", "husky": "^9.0.11", - "inquirer": "^9.2.21", + "inquirer": "^9.2.22", "is-reference": "^3.0.2", "lint-staged": "^15.2.2", "locate-character": "^3.0.0", @@ -179,7 +179,7 @@ "pretty-ms": "^9.0.0", "requirejs": "^2.3.6", "rollup": "^4.17.2", - "rollup-plugin-license": "^3.3.1", + "rollup-plugin-license": "^3.4.0", "rollup-plugin-string": "^3.0.0", "semver": "^7.6.2", "shx": "^0.3.4", @@ -191,14 +191,13 @@ "tslib": "^2.6.2", "typescript": "^5.4.5", "vite": "^5.2.11", - "vitepress": "^1.1.4", + "vitepress": "^1.2.2", "vue": "^3.4.27", "wasm-pack": "^0.12.1", - "weak-napi": "^2.0.2", "yargs-parser": "^21.1.1" }, "overrides": { - "axios": "^1.6.8", + "axios": "^1.7.1", "semver": "^7.6.2" }, "files": [ diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 7aa89495d..cec15d78b 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayvec" @@ -143,9 +143,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" [[package]] name = "cfg-if" @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "equivalent" @@ -351,9 +351,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -428,9 +428,9 @@ checksum = "e1c0f5d67ee408a4685b61f5ab7e58605c8ae3f2b4189f0127d804ff13d5560a" [[package]] name = "napi-derive" -version = "2.16.4" +version = "2.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb613535cde46cff231e53cd819c1694a32d48946bc2dda6b41174ace52ac08" +checksum = "e0e034ddf6155192cf83f267ede763fe6c164dfa9971585436b16173718d94c4" dependencies = [ "cfg-if", "convert_case", @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da041b19246ab4240998774e987fd9a7d92cc7406b91b5eddb6691e81feac044" +checksum = "bff2c00437f3b3266391eb5e6aa25d0029187daf5caf05b8e3271468fb5ae73e" dependencies = [ "convert_case", "once_cell", @@ -629,9 +629,9 @@ checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ "unicode-ident", ] @@ -781,18 +781,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -1053,9 +1053,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.194.2" +version = "0.194.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d81574cd75bd8474060d148176c6e18eb4b0ff0ac69464634efd1ed0e70a208c" +checksum = "535bbb8adbdf730302f477948557a26e5cd73854d4543c0630e05132ffa16d8a" dependencies = [ "arrayvec", "indexmap", @@ -1167,9 +1167,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a693898bd44782a234d9a4122d52b93accf447282d08c2364eb739ae864154" +checksum = "2d140be135c1af1726ee02406ad210c6598b3399303974d884b1b681563602c9" dependencies = [ "indexmap", "rustc-hash", @@ -1282,9 +1282,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.61" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", diff --git a/rust/bindings_napi/Cargo.toml b/rust/bindings_napi/Cargo.toml index d39c942b1..a1a0b9180 100644 --- a/rust/bindings_napi/Cargo.toml +++ b/rust/bindings_napi/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.16.6", default-features = false, features = ["napi4"] } -napi-derive = "2.16.4" +napi-derive = "2.16.5" parse_ast = { path = "../parse_ast" } xxhash = { path = "../xxhash" } diff --git a/rust/parse_ast/Cargo.toml b/rust/parse_ast/Cargo.toml index df83cc9ea..27cd7fc41 100644 --- a/rust/parse_ast/Cargo.toml +++ b/rust/parse_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.83" +anyhow = "1.0.86" swc_atoms = "0.6.7" swc_compiler_base = "0.9.0" swc_common = { version = "0.33.26", features = ["ahash", "parking_lot"] } diff --git a/rust/parse_ast/src/ast_nodes/import_attribute.rs b/rust/parse_ast/src/ast_nodes/import_attribute.rs index 98d2327e7..829ab14bf 100644 --- a/rust/parse_ast/src/ast_nodes/import_attribute.rs +++ b/rust/parse_ast/src/ast_nodes/import_attribute.rs @@ -1,3 +1,4 @@ +use swc_common::Spanned; use swc_ecma_ast::{KeyValueProp, ObjectLit, Prop, PropOrSpread}; use crate::convert_ast::converter::ast_constants::{ @@ -9,41 +10,19 @@ use crate::convert_ast::converter::AstConverter; impl<'a> AstConverter<'a> { pub fn store_import_attribute(&mut self, key_value_property: &KeyValueProp) { // type - self.buffer.extend_from_slice(&TYPE_IMPORT_ATTRIBUTE); - let start_position = self.buffer.len(); - let end_position = start_position + 4; - // reserved bytes - self - .buffer - .resize(end_position + IMPORT_ATTRIBUTE_RESERVED_BYTES, 0); + let end_position = self.add_type_and_start( + &TYPE_IMPORT_ATTRIBUTE, + &key_value_property.span(), + IMPORT_ATTRIBUTE_RESERVED_BYTES, + false, + ); // key self.update_reference_position(end_position + IMPORT_ATTRIBUTE_KEY_OFFSET); - let key_position = self.buffer.len(); - let key_boundaries = self.convert_property_name(&key_value_property.key); - let start_bytes: [u8; 4] = match key_boundaries { - Some((start, _)) => start.to_ne_bytes(), - None => { - let key_start: [u8; 4] = self.buffer[key_position + 4..key_position + 8] - .try_into() - .unwrap(); - key_start - } - }; - self.buffer[start_position..start_position + 4].copy_from_slice(&start_bytes); + self.convert_property_name(&key_value_property.key); // value self.update_reference_position(end_position + IMPORT_ATTRIBUTE_VALUE_OFFSET); - let value_position = self.buffer.len(); - let value_boundaries = self.convert_expression(&key_value_property.value); - let end_bytes: [u8; 4] = match value_boundaries { - Some((_, end)) => end.to_ne_bytes(), - None => { - let value_end: [u8; 4] = self.buffer[value_position + 8..value_position + 12] - .try_into() - .unwrap(); - value_end - } - }; - self.buffer[end_position..end_position + 4].copy_from_slice(&end_bytes); + self.convert_expression(&key_value_property.value); + self.add_end(end_position, &key_value_property.span()); } pub fn store_import_attributes( diff --git a/rust/parse_ast/src/ast_nodes/method_definition.rs b/rust/parse_ast/src/ast_nodes/method_definition.rs index fd5ca7d1f..86c30a88c 100644 --- a/rust/parse_ast/src/ast_nodes/method_definition.rs +++ b/rust/parse_ast/src/ast_nodes/method_definition.rs @@ -1,4 +1,4 @@ -use swc_common::Span; +use swc_common::{Span, Spanned}; use swc_ecma_ast::{ ClassMethod, Constructor, Function, MethodKind, ParamOrTsParamProp, Pat, PrivateMethod, PrivateName, PropName, @@ -53,7 +53,7 @@ impl<'a> AstConverter<'a> { let key_end = match key { PropOrPrivateName::PropName(prop_name) => { self.convert_property_name(prop_name); - self.get_property_name_span(prop_name).hi.0 - 1 + prop_name.span().hi.0 - 1 } PropOrPrivateName::PrivateName(private_name) => { self.store_private_identifier(private_name); @@ -99,7 +99,7 @@ impl<'a> AstConverter<'a> { match &constructor.body { Some(block_statement) => { self.update_reference_position(end_position + METHOD_DEFINITION_VALUE_OFFSET); - let key_end = self.get_property_name_span(&constructor.key).hi.0 - 1; + let key_end = constructor.key.span().hi.0 - 1; let function_start = find_first_occurrence_outside_comment(self.code, b'(', key_end); let parameters: Vec<&Pat> = constructor .params diff --git a/rust/parse_ast/src/ast_nodes/property.rs b/rust/parse_ast/src/ast_nodes/property.rs index aad245cea..8fd244ed2 100644 --- a/rust/parse_ast/src/ast_nodes/property.rs +++ b/rust/parse_ast/src/ast_nodes/property.rs @@ -1,4 +1,4 @@ -use swc_common::Span; +use swc_common::{Span, Spanned}; use swc_ecma_ast::{ AssignPatProp, BlockStmt, Expr, GetterProp, Ident, KeyValuePatProp, KeyValueProp, MethodProp, Pat, Prop, PropName, SetterProp, @@ -48,10 +48,11 @@ impl<'a> AstConverter<'a> { } fn store_key_value_property(&mut self, property_name: &PropName, value: PatternOrExpression) { - let end_position = self.add_type_and_explicit_start( + let end_position = self.add_type_and_start( &TYPE_PROPERTY, - self.get_property_name_span(property_name).lo.0 - 1, + &property_name.span(), PROPERTY_RESERVED_BYTES, + false, ); // key self.update_reference_position(end_position + PROPERTY_KEY_OFFSET); @@ -68,23 +69,12 @@ impl<'a> AstConverter<'a> { self.buffer[kind_position..kind_position + 4].copy_from_slice(&STRING_INIT); // value self.update_reference_position(end_position + PROPERTY_VALUE_OFFSET); - let value_position = self.buffer.len(); - let value_boundaries = match value { + match value { PatternOrExpression::Pattern(pattern) => self.convert_pattern(pattern), PatternOrExpression::Expression(expression) => self.convert_expression(expression), }; // end - let end_bytes: [u8; 4] = match value_boundaries { - Some((_, end)) => end.to_ne_bytes(), - None => { - let value_end: [u8; 4] = self.buffer[value_position + 8..value_position + 12] - .try_into() - .unwrap(); - value_end - } - }; - // TODO SWC avoid copying positions around but use span getters instead - self.buffer[end_position..end_position + 4].copy_from_slice(&end_bytes); + self.add_end(end_position, &value.span()); } fn store_getter_setter_property( @@ -100,7 +90,7 @@ impl<'a> AstConverter<'a> { // key self.update_reference_position(end_position + PROPERTY_KEY_OFFSET); self.convert_property_name(key); - let key_end = self.get_property_name_span(key).hi.0 - 1; + let key_end = key.span().hi.0 - 1; // flags, method and shorthand are always false let mut flags = 0u32; if matches!(key, PropName::Computed(_)) { @@ -143,7 +133,7 @@ impl<'a> AstConverter<'a> { // key self.update_reference_position(end_position + PROPERTY_KEY_OFFSET); self.convert_property_name(&method_property.key); - let key_end = self.get_property_name_span(&method_property.key).hi.0 - 1; + let key_end = &method_property.key.span().hi.0 - 1; let function_start = find_first_occurrence_outside_comment(self.code, b'(', key_end); // flags, shorthand is always false let mut flags = PROPERTY_METHOD_FLAG; @@ -244,6 +234,7 @@ impl<'a> AstConverter<'a> { } } +#[derive(Spanned)] pub enum PatternOrExpression<'a> { Pattern(&'a Pat), Expression(&'a Expr), diff --git a/rust/parse_ast/src/ast_nodes/rest_element.rs b/rust/parse_ast/src/ast_nodes/rest_element.rs index dc188aec4..2bf6d1fe6 100644 --- a/rust/parse_ast/src/ast_nodes/rest_element.rs +++ b/rust/parse_ast/src/ast_nodes/rest_element.rs @@ -7,15 +7,16 @@ use crate::convert_ast::converter::AstConverter; impl<'a> AstConverter<'a> { pub fn store_rest_element(&mut self, rest_pattern: &RestPat) { - let end_position = self.add_type_and_explicit_start( + let end_position = self.add_type_and_start( &TYPE_REST_ELEMENT, - rest_pattern.dot3_token.lo.0 - 1, + &rest_pattern.dot3_token, REST_ELEMENT_RESERVED_BYTES, + false, ); // argument self.update_reference_position(end_position + REST_ELEMENT_ARGUMENT_OFFSET); self.convert_pattern(&rest_pattern.arg); // end - self.add_explicit_end(end_position, rest_pattern.span.hi.0 - 1); + self.add_end(end_position, &rest_pattern.span); } } diff --git a/rust/parse_ast/src/ast_nodes/return_statement.rs b/rust/parse_ast/src/ast_nodes/return_statement.rs index 17e12862f..59a1f7778 100644 --- a/rust/parse_ast/src/ast_nodes/return_statement.rs +++ b/rust/parse_ast/src/ast_nodes/return_statement.rs @@ -14,10 +14,10 @@ impl<'a> AstConverter<'a> { false, ); // argument - return_statement.arg.as_ref().map(|argument| { + if let Some(argument) = return_statement.arg.as_ref() { self.update_reference_position(end_position + RETURN_STATEMENT_ARGUMENT_OFFSET); self.convert_expression(argument) - }); + } // end self.add_end(end_position, &return_statement.span); } diff --git a/rust/parse_ast/src/ast_nodes/shared/class_node.rs b/rust/parse_ast/src/ast_nodes/shared/class_node.rs index 4f50bf0e7..f32a039ec 100644 --- a/rust/parse_ast/src/ast_nodes/shared/class_node.rs +++ b/rust/parse_ast/src/ast_nodes/shared/class_node.rs @@ -1,3 +1,4 @@ +use swc_common::Spanned; use swc_ecma_ast::{Class, Ident}; use crate::convert_ast::converter::analyze_code::find_first_occurrence_outside_comment; @@ -31,7 +32,7 @@ impl<'a> AstConverter<'a> { if let Some(super_class) = class.super_class.as_ref() { self.update_reference_position(end_position + CLASS_DECLARATION_SUPER_CLASS_OFFSET); self.convert_expression(super_class); - body_start_search = self.get_expression_span(super_class).hi.0 - 1; + body_start_search = super_class.span().hi.0 - 1; } // body self.update_reference_position(end_position + CLASS_DECLARATION_BODY_OFFSET); diff --git a/rust/parse_ast/src/ast_nodes/spread_element.rs b/rust/parse_ast/src/ast_nodes/spread_element.rs index 6e1d2922f..8bd63a7bb 100644 --- a/rust/parse_ast/src/ast_nodes/spread_element.rs +++ b/rust/parse_ast/src/ast_nodes/spread_element.rs @@ -1,4 +1,4 @@ -use swc_common::Span; +use swc_common::{Span, Spanned}; use swc_ecma_ast::{Expr, SpreadElement}; use crate::convert_ast::converter::ast_constants::{ @@ -14,15 +14,11 @@ impl<'a> AstConverter<'a> { SPREAD_ELEMENT_RESERVED_BYTES, false, ); - // we need to set the end position to that of the expression - let argument_position = self.buffer.len(); // argument self.update_reference_position(end_position + SPREAD_ELEMENT_ARGUMENT_OFFSET); self.convert_expression(argument); - let expression_end: [u8; 4] = self.buffer[argument_position + 8..argument_position + 12] - .try_into() - .unwrap(); - self.buffer[end_position..end_position + 4].copy_from_slice(&expression_end); + // end + self.add_end(end_position, &argument.span()); } pub fn convert_spread_element(&mut self, spread_element: &SpreadElement) { diff --git a/rust/parse_ast/src/ast_nodes/switch_case.rs b/rust/parse_ast/src/ast_nodes/switch_case.rs index 410e1ba0e..153d15cc9 100644 --- a/rust/parse_ast/src/ast_nodes/switch_case.rs +++ b/rust/parse_ast/src/ast_nodes/switch_case.rs @@ -15,10 +15,10 @@ impl<'a> AstConverter<'a> { false, ); // test - switch_case.test.as_ref().map(|expression| { + if let Some(expression) = switch_case.test.as_ref() { self.update_reference_position(end_position + SWITCH_CASE_TEST_OFFSET); self.convert_expression(expression) - }); + } // consequent self.convert_item_list( &switch_case.cons, diff --git a/rust/parse_ast/src/ast_nodes/yield_expression.rs b/rust/parse_ast/src/ast_nodes/yield_expression.rs index 6197893a9..dea9b60cc 100644 --- a/rust/parse_ast/src/ast_nodes/yield_expression.rs +++ b/rust/parse_ast/src/ast_nodes/yield_expression.rs @@ -22,10 +22,10 @@ impl<'a> AstConverter<'a> { let flags_position = end_position + YIELD_EXPRESSION_FLAGS_OFFSET; self.buffer[flags_position..flags_position + 4].copy_from_slice(&flags.to_ne_bytes()); // argument - yield_expression.arg.as_ref().map(|expression| { + if let Some(expression) = yield_expression.arg.as_ref() { self.update_reference_position(end_position + YIELD_EXPRESSION_ARGUMENT_OFFSET); self.convert_expression(expression) - }); + } // end self.add_end(end_position, &yield_expression.span); } diff --git a/rust/parse_ast/src/convert_ast/converter.rs b/rust/parse_ast/src/convert_ast/converter.rs index 4bd392a51..89897f6fb 100644 --- a/rust/parse_ast/src/convert_ast/converter.rs +++ b/rust/parse_ast/src/convert_ast/converter.rs @@ -274,39 +274,31 @@ impl<'a> AstConverter<'a> { } } - pub fn convert_expression(&mut self, expression: &Expr) -> Option<(u32, u32)> { + pub fn convert_expression(&mut self, expression: &Expr) { match expression { Expr::Array(array_literal) => { self.store_array_expression(array_literal); - None } Expr::Arrow(arrow_expression) => { self.store_arrow_function_expression(arrow_expression); - None } Expr::Assign(assignment_expression) => { self.store_assignment_expression(assignment_expression); - None } Expr::Await(await_expression) => { self.store_await_expression(await_expression); - None } Expr::Bin(binary_expression) => { self.store_binary_expression(binary_expression); - None } Expr::Call(call_expression) => { self.convert_call_expression(call_expression, false, false); - None } Expr::Class(class_expression) => { self.store_class_expression(class_expression, &TYPE_CLASS_EXPRESSION); - None } Expr::Cond(conditional_expression) => { self.store_conditional_expression(conditional_expression); - None } Expr::Fn(function_expression) => { self.convert_function( @@ -314,74 +306,57 @@ impl<'a> AstConverter<'a> { &TYPE_FUNCTION_EXPRESSION, function_expression.ident.as_ref(), ); - None } Expr::Ident(identifier) => { self.convert_identifier(identifier); - None } Expr::Lit(literal) => { self.convert_literal(literal); - None } Expr::Member(member_expression) => { self.convert_member_expression(member_expression, false, false); - None } Expr::MetaProp(meta_property) => { self.store_meta_property(meta_property); - None } Expr::New(new_expression) => { self.store_new_expression(new_expression); - None } Expr::Object(object_literal) => { self.store_object_expression(object_literal); - None } Expr::OptChain(optional_chain_expression) => { self.store_chain_expression(optional_chain_expression, false); - None } Expr::Paren(parenthesized_expression) => { - Some(self.convert_parenthesized_expression(parenthesized_expression)) + self.convert_parenthesized_expression(parenthesized_expression) } Expr::PrivateName(private_name) => { self.store_private_identifier(private_name); - None } Expr::Seq(sequence_expression) => { self.store_sequence_expression(sequence_expression); - None } Expr::SuperProp(super_property) => { self.convert_super_property(super_property); - None } Expr::TaggedTpl(tagged_template_expression) => { self.store_tagged_template_expression(tagged_template_expression); - None } Expr::This(this_expression) => { self.store_this_expression(this_expression); - None } Expr::Tpl(template_literal) => { self.store_template_literal(template_literal); - None } Expr::Unary(unary_expression) => { self.store_unary_expression(unary_expression); - None } Expr::Update(update_expression) => { self.store_update_expression(update_expression); - None } Expr::Yield(yield_expression) => { self.store_yield_expression(yield_expression); - None } Expr::JSXMember(_) => unimplemented!("Cannot convert Expr::JSXMember"), Expr::JSXNamespacedName(_) => unimplemented!("Cannot convert Expr::JSXNamespacedName"), @@ -407,55 +382,6 @@ impl<'a> AstConverter<'a> { } } - pub(crate) fn get_expression_span(&mut self, expression: &Expr) -> Span { - match expression { - Expr::Array(array_literal) => array_literal.span, - Expr::Arrow(arrow_expression) => arrow_expression.span, - Expr::Assign(assignment_expression) => assignment_expression.span, - Expr::Await(await_expression) => await_expression.span, - Expr::Bin(binary_expression) => binary_expression.span, - Expr::Call(call_expression) => call_expression.span, - Expr::Class(class_expression) => class_expression.class.span, - Expr::Cond(conditional_expression) => conditional_expression.span, - Expr::Fn(function_expression) => function_expression.function.span, - Expr::Ident(identifier) => identifier.span, - Expr::Lit(Lit::Str(literal)) => literal.span, - Expr::Lit(Lit::Bool(literal)) => literal.span, - Expr::Lit(Lit::Null(literal)) => literal.span, - Expr::Lit(Lit::Num(literal)) => literal.span, - Expr::Lit(Lit::BigInt(literal)) => literal.span, - Expr::Lit(Lit::Regex(literal)) => literal.span, - Expr::Member(member_expression) => member_expression.span, - Expr::MetaProp(meta_property) => meta_property.span, - Expr::New(new_expression) => new_expression.span, - Expr::Object(object_literal) => object_literal.span, - Expr::OptChain(optional_chain_expression) => optional_chain_expression.span, - Expr::Paren(parenthesized_expression) => parenthesized_expression.span, - Expr::PrivateName(private_name) => private_name.span, - Expr::Seq(sequence_expression) => sequence_expression.span, - Expr::SuperProp(super_property) => super_property.span, - Expr::TaggedTpl(tagged_template_expression) => tagged_template_expression.span, - Expr::This(this_expression) => this_expression.span, - Expr::Tpl(template_literal) => template_literal.span, - Expr::Unary(unary_expression) => unary_expression.span, - Expr::Update(update_expression) => update_expression.span, - Expr::Yield(yield_expression) => yield_expression.span, - Expr::JSXMember(_) => unimplemented!("Cannot convert Expr::JSXMember"), - Expr::JSXNamespacedName(_) => unimplemented!("Cannot convert Expr::JSXNamespacedName"), - Expr::JSXEmpty(_) => unimplemented!("Cannot convert Expr::JSXEmpty"), - Expr::JSXElement(_) => unimplemented!("Cannot convert Expr::JSXElement"), - Expr::JSXFragment(_) => unimplemented!("Cannot convert Expr::JSXFragment"), - Expr::TsTypeAssertion(_) => unimplemented!("Cannot convert Expr::TsTypeAssertion"), - Expr::TsConstAssertion(_) => unimplemented!("Cannot convert Expr::TsConstAssertion"), - Expr::TsNonNull(_) => unimplemented!("Cannot convert Expr::TsNonNull"), - Expr::TsAs(_) => unimplemented!("Cannot convert Expr::TsAs"), - Expr::TsInstantiation(_) => unimplemented!("Cannot convert Expr::TsInstantiation"), - Expr::TsSatisfies(_) => unimplemented!("Cannot convert Expr::TsSatisfies"), - Expr::Invalid(_) => unimplemented!("Cannot convert Expr::Invalid"), - Expr::Lit(Lit::JSXText(_)) => unimplemented!("Cannot convert Lit::JSXText"), - } - } - pub(crate) fn convert_for_head(&mut self, for_head: &ForHead) { match for_head { ForHead::VarDecl(variable_declaration) => { @@ -576,11 +502,9 @@ impl<'a> AstConverter<'a> { } } - fn convert_parenthesized_expression( - &mut self, - parenthesized_expression: &ParenExpr, - ) -> (u32, u32) { - let start = self.index_converter.convert( + fn convert_parenthesized_expression(&mut self, parenthesized_expression: &ParenExpr) { + // We are doing this for the side effect of keeping annotations for call expressions + self.index_converter.convert( parenthesized_expression.span.lo.0 - 1, matches!( &*parenthesized_expression.expr, @@ -588,34 +512,25 @@ impl<'a> AstConverter<'a> { ), ); self.convert_expression(&parenthesized_expression.expr); - let end = self - .index_converter - .convert(parenthesized_expression.span.hi.0 - 1, false); - (start, end) } - pub fn convert_pattern(&mut self, pattern: &Pat) -> Option<(u32, u32)> { + pub fn convert_pattern(&mut self, pattern: &Pat) { match pattern { Pat::Array(array_pattern) => { self.store_array_pattern(array_pattern); - None } Pat::Assign(assignment_pattern) => { self.convert_assignment_pattern(assignment_pattern); - None } Pat::Expr(expression) => self.convert_expression(expression), Pat::Ident(binding_identifier) => { self.convert_binding_identifier(binding_identifier); - None } Pat::Object(object) => { self.store_object_pattern(object); - None } Pat::Rest(rest_pattern) => { self.store_rest_element(rest_pattern); - None } Pat::Invalid(_) => unimplemented!("Cannot convert Pat::Invalid"), } @@ -674,40 +589,26 @@ impl<'a> AstConverter<'a> { } } - pub(crate) fn convert_property_name(&mut self, property_name: &PropName) -> Option<(u32, u32)> { + pub(crate) fn convert_property_name(&mut self, property_name: &PropName) { match property_name { PropName::Computed(computed_property_name) => { self.convert_expression(computed_property_name.expr.as_ref()) } PropName::Ident(ident) => { self.convert_identifier(ident); - None } PropName::Str(string) => { self.store_literal_string(string); - None } PropName::Num(number) => { self.store_literal_number(number); - None } PropName::BigInt(bigint) => { self.store_literal_bigint(bigint); - None } } } - pub(crate) fn get_property_name_span(&self, property_name: &PropName) -> Span { - match property_name { - PropName::Computed(computed_property_name) => computed_property_name.span, - PropName::Ident(ident) => ident.span, - PropName::Str(string) => string.span, - PropName::Num(number) => number.span, - PropName::BigInt(bigint) => bigint.span, - } - } - pub(crate) fn convert_property_or_spread(&mut self, property_or_spread: &PropOrSpread) { match property_or_spread { PropOrSpread::Prop(property) => self.convert_property(property), diff --git a/test/cli/samples/config-import-meta/_config.js b/test/cli/samples/config-import-meta/_config.js index e5a746b07..49681ab38 100644 --- a/test/cli/samples/config-import-meta/_config.js +++ b/test/cli/samples/config-import-meta/_config.js @@ -1,4 +1,4 @@ module.exports = defineTest({ - description: 'uses correct import.meta.url in config files', + description: 'uses correct import.meta.{url,filename,dirname} in config files', command: 'rollup -c --bundleConfigAsCjs' }); diff --git a/test/cli/samples/config-import-meta/plugin/plugin.js b/test/cli/samples/config-import-meta/plugin/plugin.js index c6d15f8db..29f042c94 100644 --- a/test/cli/samples/config-import-meta/plugin/plugin.js +++ b/test/cli/samples/config-import-meta/plugin/plugin.js @@ -9,6 +9,8 @@ const fileName = `test.txt`; function validateImportMeta(importMeta) { assert.strictEqual(importMeta.url, import.meta.url); + assert.strictEqual(importMeta.filename, import.meta.filename); + assert.strictEqual(importMeta.dirname, import.meta.dirname); } validateImportMeta(import.meta); diff --git a/test/utils.js b/test/utils.js index 7c8511599..12b5efb1e 100644 --- a/test/utils.js +++ b/test/utils.js @@ -268,8 +268,8 @@ function getFileNamesAndRemoveOutput(directory) { }); return false; } - if (fileName === '_actual.js') { - unlinkSync(path.join(directory, '_actual.js')); + if (fileName.startsWith('_actual.')) { + unlinkSync(path.join(directory, fileName)); return false; } return true;