diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index a01ce9b38982b9..1c0fa8976dc0ab 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -4,7 +4,6 @@ const { defineConfig } = require('eslint-define-config')
const pkg = require('./package.json')
///
-///
module.exports = defineConfig({
root: true,
@@ -16,7 +15,7 @@ module.exports = defineConfig({
'plugin:regexp/recommended',
],
ignorePatterns: ['packages/create-vite/template-**'],
- plugins: ['import', 'regexp'],
+ plugins: ['i', 'regexp'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
@@ -93,12 +92,12 @@ module.exports = defineConfig({
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-function-type': 'off',
- 'import/no-nodejs-modules': [
+ 'i/no-nodejs-modules': [
'error',
{ allow: builtinModules.map((mod) => `node:${mod}`) },
],
- 'import/no-duplicates': 'error',
- 'import/order': 'error',
+ 'i/no-duplicates': 'error',
+ 'i/order': 'error',
'sort-imports': [
'error',
{
@@ -213,7 +212,7 @@ module.exports = defineConfig({
'playground/tailwind/**', // blocked by https://github.com/postcss/postcss-load-config/issues/239
],
rules: {
- 'import/no-commonjs': 'error',
+ 'i/no-commonjs': 'error',
},
},
{
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 052f5c3a2cc5ab..b25e78b3de0f75 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,7 +58,7 @@ jobs:
- name: Get changed files
id: changed-files
- uses: tj-actions/changed-files@94549999469dbfa032becf298d95c87a14c34394 # v40.2.2
+ uses: tj-actions/changed-files@cbda684547adc8c052d50711417fa61b428a9f88 # v41.1.2
with:
files: |
docs/**
@@ -93,12 +93,12 @@ jobs:
if: runner.os == 'Windows' && steps.changed-files.outputs.only_changed != 'true'
run: |
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
- $env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies[\"playwright-chromium\"].version')"
+ $env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')"
echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV
- name: Cache Playwright's binary
if: steps.changed-files.outputs.only_changed != 'true'
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
key: ${{ runner.os }}-playwright-bin-v1-${{ env.PLAYWRIGHT_VERSION }}
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
diff --git a/.prettierignore b/.prettierignore
index bc38eebdb55221..1fafdb547deccc 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -9,3 +9,4 @@ playground/tsconfig-json-load-error/has-error/tsconfig.json
playground/html/invalid.html
playground/html/valid.html
playground/external/public/slash@3.0.0.js
+playground/ssr-html/public/slash@3.0.0.js
diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index 8d2d685a8409d9..8db949d482cfaa 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -279,6 +279,10 @@ export default defineConfig({
text: 'JavaScript API',
link: '/guide/api-javascript',
},
+ {
+ text: 'Vite Runtime API',
+ link: '/guide/api-vite-runtime',
+ },
{
text: 'Config Reference',
link: '/config/',
diff --git a/docs/.vitepress/theme/composables/sponsor.ts b/docs/.vitepress/theme/composables/sponsor.ts
index 4fd12e5facb1ee..f4d31760cc1e85 100644
--- a/docs/.vitepress/theme/composables/sponsor.ts
+++ b/docs/.vitepress/theme/composables/sponsor.ts
@@ -49,6 +49,11 @@ const viteSponsors: Pick = {
url: 'https://remix.run/',
img: '/remix.svg',
},
+ {
+ name: 'Transloadit',
+ url: 'https://transloadit.com/?utm_source=vite&utm_medium=referral&utm_campaign=sponsorship&utm_content=website',
+ img: '/transloadit.svg',
+ },
],
}
@@ -84,7 +89,7 @@ function mapSponsors(sponsors: Sponsors) {
{
tier: 'Gold Sponsors',
size: 'medium',
- items: viteSponsors['gold'].concat(mapImgPath(sponsors['gold'])),
+ items: [...mapImgPath(sponsors['gold']), ...viteSponsors['gold']],
},
]
}
diff --git a/docs/blog/announcing-vite5-1.md b/docs/blog/announcing-vite5-1.md
new file mode 100644
index 00000000000000..047269e0e5f558
--- /dev/null
+++ b/docs/blog/announcing-vite5-1.md
@@ -0,0 +1,132 @@
+---
+title: Vite 5.1 is out!
+author:
+ name: The Vite Team
+date: 2024-02-12
+sidebar: false
+head:
+ - - meta
+ - property: og:type
+ content: website
+ - - meta
+ - property: og:title
+ content: Announcing Vite 5.1
+ - - meta
+ - property: og:image
+ content: https://vitejs.dev/og-image-announcing-vite5-1.png
+ - - meta
+ - property: og:url
+ content: https://vitejs.dev/blog/announcing-vite5-1
+ - - meta
+ - property: og:description
+ content: Vite 5.1 Release Announcement
+ - - meta
+ - name: twitter:card
+ content: summary_large_image
+---
+
+# Vite 5.1 is out!
+
+_February 12, 2024_
+
+
+
+Vite 5 [was released](./announcing-vite5.md) last November, and it represented another big leap for Vite and the ecosystem. A few weeks ago we celebrated 10 million weekly npm downloads and 900 contributors to the Vite repo. Today, we're excited to announce the release of Vite 5.1.
+
+Quick links: [Docs](/), [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
+
+Docs in other languages: [简体中文](https://cn.vitejs.dev/), [日本語](https://ja.vitejs.dev/), [Español](https://es.vitejs.dev/), [Português](https://pt.vitejs.dev/), [한국어](https://ko.vitejs.dev/), [Deutsch](https://de.vitejs.dev/)
+
+Try Vite 5.1 online in StackBlitz: [vanilla](https://vite.new/vanilla-ts), [vue](https://vite.new/vue-ts), [react](https://vite.new/react-ts), [preact](https://vite.new/preact-ts), [lit](https://vite.new/lit-ts), [svelte](https://vite.new/svelte-ts), [solid](https://vite.new/solid-ts), [qwik](https://vite.new/qwik-ts).
+
+If you're new to Vite, we suggest reading first the [Getting Started](/guide/) and [Features](/guide/features) guides.
+
+To stay up to date, follow us on [X](https://x.com/vite_js) or [Mastodon](https://webtoo.ls/@vite).
+
+## Vite Runtime API
+
+Vite 5.1 adds experimental support for a new Vite Runtime API. It allows running any code by processing it with Vite plugins first. It is different from `server.ssrLoadModule` because the runtime implementation is decoupled from the server. This lets library and framework authors implement their own layer of communication between the server and the runtime. This new API is intended to replace Vite's current SSR primitives once it is stable.
+
+The new API brings many benefits:
+
+- Support for HMR during SSR.
+- It is decoupled from the server, so there is no limit on how many clients can use a single server - every client has its own module cache (you can even communicate with it how you want - using message channel/fetch call/direct function call/websocket).
+- It doesn't depend on any node/bun/deno built-in APIs, so it can run in any environment.
+- It's easy to integrate with tools that have their own mechanism to run code (you can provide a runner to use `eval` instead of `new AsyncFunction` for example).
+
+The initial idea [was proposed by Pooya Parsa](https://github.com/nuxt/vite/pull/201) and implemented by [Anthony Fu](https://github.com/antfu) as the [vite-node](https://github.com/vitest-dev/vitest/tree/main/packages/vite-node#readme) package to [power Nuxt 3 Dev SSR](https://antfu.me/posts/dev-ssr-on-nuxt) and later also used as the base for [Vitest](https://vitest.dev). So the general idea of vite-node has been battle-tested for quite some time now. This is a new iteration of the API by [Vladimir Sheremet](https://github.com/sheremet-va), who had already re-implemented vite-node in Vitest and took the learnings to make the API even more powerful and flexible when adding it to Vite Core. The PR was one year in the makings, you can see the evolution and discussions with ecosystem maintainers [here](https://github.com/vitejs/vite/issues/12165).
+
+Read more in the [Vite Runtime API guide](/guide/api-vite-runtime) and [give us feedback](https://github.com/vitejs/vite/discussions/15774).
+
+## Features
+
+### Improved support for `.css?url`
+
+Import CSS files as URLs now works reliably and correctly. This was the last remaining hurdle in Remix's move to Vite. See ([#15259](https://github.com/vitejs/vite/issues/15259)).
+
+### `build.assetsInlineLimit` now supports a callback
+
+Users can now [provide a callback](/config/build-options.html#build-assetsinlinelimit) that returns a boolean to opt-in or opt-out of inlining for specific assets. If `undefined` is returned, the defalt logic applies. See ([#15366](https://github.com/vitejs/vite/issues/15366)).
+
+### Improved HMR for circular import
+
+In Vite 5.0, accepted modules within circular imports always triggered a full page reload even if they can be handled fine in the client. This is now relaxed to allow HMR to apply without a full page reload, but if any error happens during HMR, the page will be reloaded. See ([#15118](https://github.com/vitejs/vite/issues/15118)).
+
+### Support `ssr.external: true` to externalize all SSR packages
+
+Historically, Vite externalizes all packages except for linked packages. This new option can be used to force externalize all packages including linked packages too. This is handy in tests within monorepos where we want to emulate the usual case of all packages externalized, or when using `ssrLoadModule` to load an arbitrary file and we want to always external packages as we don't care about HMR. See ([#10939](https://github.com/vitejs/vite/issues/10939)).
+
+### Expose `close` method in the preview server
+
+The preview server now exposes a `close` method, which will properly teardown the server including all opened socket connections. See ([#15630](https://github.com/vitejs/vite/issues/15630)).
+
+## Performance improvements
+
+Vite keeps getting faster with each release, and Vite 5.1 is packed with performance improvements. We measured the loading time for 10K modules (25 level deep tree) using [vite-dev-server-perf](https://github.com/yyx990803/vite-dev-server-perf) for all minor versions from Vite 4.0. This is a good benchmark to meassure the effect of Vite's bundle-less approach. Each module is a small TypeScript file with a counter and imports to other files in the tree, so this mostly meassuring the time it takes to do the requests a separate modules. In Vite 4.0, loading 10K modules took 8 seconds on a M1 MAX. We had a breakthrough in [Vite 4.3 were we focused on performance](./announcing-vite4-3.md), and we were able to load them in 6.35 seconds. In Vite 5.1, we managed to do another performance leap. Vite is now serving the 10K modules in 5.35 seconds.
+
+
+
+The results of this benchmark run on Headless Puppeteer and are a good way to compare versions. They don't represent the time as experienced by users though. When running the same 10K modules in an Incognito window is Chrome, we have:
+
+| 10K Modules | Vite 5.0 | Vite 5.1 |
+| --------------------- | :------: | :------: |
+| Loading time | 2892ms | 2765ms |
+| Loading time (cached) | 2778ms | 2477ms |
+| Full reload | 2003ms | 1878ms |
+| Full reload (cached) | 1682ms | 1604ms |
+
+### Run CSS preprocessors in threads
+
+Vite now has opt-in support for running CSS preprocessors in threads. You can enable it using [`css.preprocessorMaxWorkers: true`](/config/shared-options.html#css-preprocessormaxworkers). For a Vuetify 2 project, dev startup time was reduced by 40% with this feature enabled. There is [performance comparison for others setups in the PR](https://github.com/vitejs/vite/pull/13584#issuecomment-1678827918). See ([#13584](https://github.com/vitejs/vite/issues/13584)). [Give Feedback](https://github.com/vitejs/vite/discussions/15835).
+
+### New options to improve server cold starts
+
+You can set `optimizeDeps.holdUntilCrawlEnd: false` to switch to a new strategy for deps optimization that may help in big projects. We're considering switching to this strategy by default in the future. [Give Feedback](https://github.com/vitejs/vite/discussions/15834). ([#15244](https://github.com/vitejs/vite/issues/15244))
+
+### Faster resolving with cached checks
+
+The `fs.cachedChecks` optimization is now enabled by default. In Windows, `tryFsResolve` was ~14x faster with it, and resolving ids overall got a ~5x speed up in the triangle benchmark. ([#15704](https://github.com/vitejs/vite/issues/15704))
+
+### Internal performance improvements
+
+The dev server had several incremental performance gains. A new middleware to short-circuit on 304 ([#15586](https://github.com/vitejs/vite/issues/15586)). We avoided `parseRequest` in hot paths ([#15617](https://github.com/vitejs/vite/issues/15617)). Rollup is now properly lazy loaded ([#15621](https://github.com/vitejs/vite/issues/15621))
+
+## Deprecations
+
+We continue to reduce Vite's API surface where possible to make the project manintainable long term.
+
+### Deprecated `as` option in `import.meta.glob`
+
+The standard moved to [Import Attributes](https://github.com/tc39/proposal-import-attributes), but we don't plan to replace `as` with a new option at this point. Instead, it is recommended that the user switches to `query`. See ([#14420](https://github.com/vitejs/vite/issues/14420)).
+
+### Removed experimental build-time pre-bundling
+
+Build-time pre-bundling, an experimental feature added in Vite 3, is removed. With Rollup 4 switching its parser to native, and Rolldown being worked on, both the performance and the dev-vs-build inconsistency story for this feature are no longer valid. We want to continue improving dev/build consistency, and have concluded that using Rolldown for "prebundling during dev" and "production builds" is the better bet moving forward. Rolldown may also implement caching in a way that is a lot more efficient during build than deps prebundling. See ([#15184](https://github.com/vitejs/vite/issues/15184)).
+
+## Get Involved
+
+We are grateful to the [900 contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors), and the maintainers of plugins, integrations, tools, and translations that keeps pushing the ecosystem forward. If you're enjoying Vite, we invite you to participate and help us. Check out our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md), and jump into [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), answering questions at [GitHub Discussions](https://github.com/vitejs/vite/discussions) and helping others in the community in [Vite Land](https://chat.vitejs.dev).
+
+## Acknowledgments
+
+Vite 5.1 is possible thanks to our community of contributors, maintainers in the ecosystem, and the [Vite Team](/team). A shoutout the individuals and companies sponsoring Vite development. [StackBlitz](https://stackblitz.com/), [Nuxt Labs](https://nuxtlabs.com/), and [Astro](https://astro.build) for hiring Vite team members. And also to the sponsors on [Vite's GitHub Sponsors](https://github.com/sponsors/vitejs), [Vite's Open Collective](https://opencollective.com/vite), and [Evan You's GitHub Sponsors](https://github.com/sponsors/yyx990803).
diff --git a/docs/config/build-options.md b/docs/config/build-options.md
index 757847c41e3d74..86de923fcf8590 100644
--- a/docs/config/build-options.md
+++ b/docs/config/build-options.md
@@ -82,11 +82,13 @@ Specify the directory to nest generated assets under (relative to `build.outDir`
## build.assetsInlineLimit
-- **Type:** `number`
+- **Type:** `number` | `((filePath: string, content: Buffer) => boolean | undefined)`
- **Default:** `4096` (4 KiB)
Imported or referenced assets that are smaller than this threshold will be inlined as base64 URLs to avoid extra http requests. Set to `0` to disable inlining altogether.
+If a callback is passed, a boolean can be returned to opt-in or opt-out. If nothing is returned the default logic applies.
+
Git LFS placeholders are automatically excluded from inlining because they do not contain the content of the file they represent.
::: tip Note
@@ -191,7 +193,7 @@ During the SSR build, static assets aren't emitted as it is assumed they would b
## build.minify
- **Type:** `boolean | 'terser' | 'esbuild'`
-- **Default:** `'esbuild'`
+- **Default:** `'esbuild'` for client build, `false` for SSR build
Set to `false` to disable minification, or specify the minifier to use. The default is [esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
diff --git a/docs/config/dep-optimization-options.md b/docs/config/dep-optimization-options.md
index ec499f4d9ccf16..8e494f6f0b986c 100644
--- a/docs/config/dep-optimization-options.md
+++ b/docs/config/dep-optimization-options.md
@@ -35,7 +35,7 @@ export default defineConfig({
By default, linked packages not inside `node_modules` are not pre-bundled. Use this option to force a linked package to be pre-bundled.
-**Experimental:** If you're using a library with many deep imports, you can also specify a trailing glob pattern to pre-bundle all deep imports at once. This will avoid constantly pre-bundling whenever a new deep import is used. For example:
+**Experimental:** If you're using a library with many deep imports, you can also specify a trailing glob pattern to pre-bundle all deep imports at once. This will avoid constantly pre-bundling whenever a new deep import is used. [Give Feedback](https://github.com/vitejs/vite/discussions/15833). For example:
```js
export default defineConfig({
@@ -62,18 +62,27 @@ Certain options are omitted since changing them would not be compatible with Vit
Set to `true` to force dependency pre-bundling, ignoring previously cached optimized dependencies.
+## optimizeDeps.holdUntilCrawlEnd
+
+- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/15834)
+- **Type:** `boolean`
+- **Default:** `true`
+
+When enabled, it will hold the first optimized deps results until all static imports are crawled on cold start. This avoids the need for full-page reloads when new dependencies are discovered and they trigger the generation of new common chunks. If all dependencies are found by the scanner plus the explicitely defined ones in `include`, it is better to disable this option to let the browser process more requests in parallel.
+
## optimizeDeps.disabled
+- **Deprecated**
- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/13839)
- **Type:** `boolean | 'build' | 'dev'`
- **Default:** `'build'`
-Disables dependencies optimizations, `true` disables the optimizer during build and dev. Pass `'build'` or `'dev'` to only disable the optimizer in one of the modes. Dependency optimization is enabled by default in dev only.
+This option is deprecated. As of Vite 5.1, pre-bundling of dependencies during build have been removed. Setting `optimizeDeps.disabled` to `true` or `'dev'` disables the optimizer, and configured to `false` or `'build'` leaves the optimizer during dev enabled.
-:::warning
-Optimizing dependencies in build mode is **experimental**. If enabled, it removes one of the most significant differences between dev and prod. [`@rollup/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) is no longer needed in this case since esbuild converts CJS-only dependencies to ESM.
+To disable the optimizer completely, use `optimizeDeps.noDiscovery: true` to disallow automatic discovery of dependencies and leave `optimizeDeps.include` undefined or empty.
-If you want to try this build strategy, you can use `optimizeDeps.disabled: false`. `@rollup/plugin-commonjs` can be removed by passing `build.commonjsOptions: { include: [] }`.
+:::warning
+Optimizing dependencies during build time was an **experimental** feature. Projects trying out this strategy also removed `@rollup/plugin-commonjs` using `build.commonjsOptions: { include: [] }`. If you did so, a warning will guide you to re-enable it to support CJS only packages while bundling.
:::
## optimizeDeps.needsInterop
diff --git a/docs/config/server-options.md b/docs/config/server-options.md
index 9efdd443fea150..5b1480ac6cfde2 100644
--- a/docs/config/server-options.md
+++ b/docs/config/server-options.md
@@ -90,7 +90,7 @@ Configure custom proxy rules for the dev server. Expects an object of `{ key: op
Note that if you are using non-relative [`base`](/config/shared-options.md#base), you must prefix each key with that `base`.
-Extends [`http-proxy`](https://github.com/http-party/node-http-proxy#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L12).
+Extends [`http-proxy`](https://github.com/http-party/node-http-proxy#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L13).
In some cases, you might also want to configure the underlying dev server (e.g. to add custom middlewares to the internal [connect](https://github.com/senchalabs/connect) app). In order to do that, you need to write your own [plugin](/guide/using-plugins.html) and use [configureServer](/guide/api-plugin.html#configureserver) function.
@@ -202,7 +202,7 @@ export default defineConfig({
File system watcher options to pass on to [chokidar](https://github.com/paulmillr/chokidar#api).
-The Vite server watcher watches the `root` and skips the `.git/` and `node_modules/` directories by default. When updating a watched file, Vite will apply HMR and update the page only if needed.
+The Vite server watcher watches the `root` and skips the `.git/`, `node_modules/`, and Vite's `cacheDir` and `build.outDir` directories by default. When updating a watched file, Vite will apply HMR and update the page only if needed.
If set to `null`, no files will be watched. `server.watcher` will provide a compatible event emitter, but calling `add` or `unwatch` will have no effect.
diff --git a/docs/config/shared-options.md b/docs/config/shared-options.md
index e6ac34f36e2ef5..d8b81b4531f571 100644
--- a/docs/config/shared-options.md
+++ b/docs/config/shared-options.md
@@ -222,17 +222,12 @@ Specify options to pass to CSS pre-processors. The file extensions are used as k
- `less` - [Options](https://lesscss.org/usage/#less-options).
- `styl`/`stylus` - Only [`define`](https://stylus-lang.com/docs/js.html#define-name-node) is supported, which can be passed as an object.
-All preprocessor options also support the `additionalData` option, which can be used to inject extra code for each style content. Note that if you include actual styles and not just variables, those styles will be duplicated in the final bundle.
-
-Example:
+**Example:**
```js
export default defineConfig({
css: {
preprocessorOptions: {
- scss: {
- additionalData: `$injectedColor: orange;`,
- },
less: {
math: 'parens-division',
},
@@ -246,6 +241,34 @@ export default defineConfig({
})
```
+### css.preprocessorOptions[extension].additionalData
+
+- **Type:** `string | ((source: string, filename: string) => (string | { content: string; map?: SourceMap }))`
+
+This option can be used to inject extra code for each style content. Note that if you include actual styles and not just variables, those styles will be duplicated in the final bundle.
+
+**Example:**
+
+```js
+export default defineConfig({
+ css: {
+ preprocessorOptions: {
+ scss: {
+ additionalData: `$injectedColor: orange;`,
+ },
+ },
+ },
+})
+```
+
+## css.preprocessorMaxWorkers
+
+- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/15835)
+- **Type:** `number | true`
+- **Default:** `0` (does not create any workers and run in the main thread)
+
+If this option is set, CSS preprocessors will run in workers when possible. `true` means the number of CPUs minus 1.
+
## css.devSourcemap
- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/13845)
diff --git a/docs/config/ssr-options.md b/docs/config/ssr-options.md
index d5f96bdb415fca..0111aa56031e15 100644
--- a/docs/config/ssr-options.md
+++ b/docs/config/ssr-options.md
@@ -2,17 +2,25 @@
## ssr.external
-- **Type:** `string[]`
+- **Type:** `string[] | true`
- **Related:** [SSR Externals](/guide/ssr#ssr-externals)
-Force externalize dependencies for SSR.
+Externalize the given dependencies and their transitive dependencies for SSR. By default, all dependencies are externalized except for linked dependencies (for HMR). If you prefer to externalize the linked dependency, you can pass its name to this option.
+
+If `true`, all dependencies including linked dependencies are externalized.
+
+Note that the explicitly listed dependencies (using `string[]` type) will always take priority if they're also listed in `ssr.noExternal` (using any type).
## ssr.noExternal
- **Type:** `string | RegExp | (string | RegExp)[] | true`
- **Related:** [SSR Externals](/guide/ssr#ssr-externals)
-Prevent listed dependencies from being externalized for SSR. If `true`, no dependencies are externalized.
+Prevent listed dependencies from being externalized for SSR, which they will get bundled in build. By default, only linked dependencies are not externalized (for HMR). If you prefer to externalize the linked dependency, you can pass its name to the `ssr.external` option.
+
+If `true`, no dependencies are externalized. However, dependencies explicitly listed in `ssr.external` (using `string[]` type) can take priority and still be externalized.
+
+Note that if both `ssr.noExternal: true` and `ssr.external: true` are configured, `ssr.noExternal` takes priority and no dependencies are externalized.
## ssr.target
diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md
index 823552e6f0343c..fbfba3b7d9e2c8 100644
--- a/docs/guide/api-javascript.md
+++ b/docs/guide/api-javascript.md
@@ -144,7 +144,11 @@ interface ViteDevServer {
/**
* Apply Vite built-in HTML transforms and any plugin HTML transforms.
*/
- transformIndexHtml(url: string, html: string): Promise
+ transformIndexHtml(
+ url: string,
+ html: string,
+ originalUrl?: string,
+ ): Promise
/**
* Load a given URL as an instantiated module for SSR.
*/
@@ -393,6 +397,7 @@ async function loadConfigFromFile(
configFile?: string,
configRoot: string = process.cwd(),
logLevel?: LogLevel,
+ customLogger?: Logger,
): Promise<{
path: string
config: UserConfig
diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md
index d2f3b6ff8e25c9..4dd76122fc4f6f 100644
--- a/docs/guide/api-plugin.md
+++ b/docs/guide/api-plugin.md
@@ -423,11 +423,11 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
- Filter and narrow down the affected module list so that the HMR is more accurate.
- - Return an empty array and perform complete custom HMR handling by sending custom events to the client:
+ - Return an empty array and perform complete custom HMR handling by sending custom events to the client (example uses `server.hot` which was introduced in Vite 5.1, it is recommended to also use `server.ws` if you support lower versions):
```js
handleHotUpdate({ server }) {
- server.ws.send({
+ server.hot.send({
type: 'custom',
event: 'special-update',
data: {}
@@ -534,7 +534,7 @@ Since Vite 2.9, we provide some utilities for plugins to help handle the communi
### Server to Client
-On the plugin side, we could use `server.ws.send` to broadcast events to all the clients:
+On the plugin side, we could use `server.hot.send` (since Vite 5.1) or `server.ws.send` to broadcast events to all the clients:
```js
// vite.config.js
@@ -544,8 +544,8 @@ export default defineConfig({
// ...
configureServer(server) {
// Example: wait for a client to connect before sending a message
- server.ws.on('connection', () => {
- server.ws.send('my:greetings', { msg: 'hello' })
+ server.hot.on('connection', () => {
+ server.hot.send('my:greetings', { msg: 'hello' })
})
},
},
@@ -579,7 +579,7 @@ if (import.meta.hot) {
}
```
-Then use `server.ws.on` and listen to the events on the server side:
+Then use `server.hot.on` (since Vite 5.1) or `server.ws.on` and listen to the events on the server side:
```js
// vite.config.js
@@ -588,7 +588,7 @@ export default defineConfig({
{
// ...
configureServer(server) {
- server.ws.on('my:from-client', (data, client) => {
+ server.hot.on('my:from-client', (data, client) => {
console.log('Message from client:', data.msg) // Hey!
// reply only to the client (if needed)
client.send('my:ack', { msg: 'Hi! I got your message!' })
diff --git a/docs/guide/api-vite-runtime.md b/docs/guide/api-vite-runtime.md
new file mode 100644
index 00000000000000..5c4ee3f07c3ec5
--- /dev/null
+++ b/docs/guide/api-vite-runtime.md
@@ -0,0 +1,234 @@
+# Vite Runtime API
+
+:::warning Low-level API
+This API was introduced in Vite 5.1 as an experimental feature. It was added to [gather feedback](https://github.com/vitejs/vite/discussions/15774). There will probably be breaking changes to it in Vite 5.2, so make sure to pin the Vite version to `~5.1.0` when using it. This is a low-level API meant for library and framework authors. If your goal is to create an application, make sure to check out the higher-level SSR plugins and tools at [Awesome Vite SSR section](https://github.com/vitejs/awesome-vite#ssr) first.
+:::
+
+The "Vite Runtime" is a tool that allows running any code by processing it with Vite plugins first. It is different from `server.ssrLoadModule` because the runtime implementation is decoupled from the server. This allows library and framework authors to implement their own layer of communication between the server and the runtime.
+
+One of the goals of this feature is to provide a customizable API to process and run the code. Vite provides enough tools to use Vite Runtime out of the box, but users can build upon it if their needs do not align with Vite's built-in implementation.
+
+All APIs can be imported from `vite/runtime` unless stated otherwise.
+
+## `ViteRuntime`
+
+**Type Signature:**
+
+```ts
+export class ViteRuntime {
+ constructor(
+ public options: ViteRuntimeOptions,
+ public runner: ViteModuleRunner,
+ private debug?: ViteRuntimeDebugger,
+ ) {}
+ /**
+ * URL to execute. Accepts file path, server path, or id relative to the root.
+ */
+ public async executeUrl(url: string): Promise
+ /**
+ * Entry point URL to execute. Accepts file path, server path or id relative to the root.
+ * In the case of a full reload triggered by HMR, this is the module that will be reloaded.
+ * If this method is called multiple times, all entry points will be reloaded one at a time.
+ */
+ public async executeEntrypoint(url: string): Promise
+ /**
+ * Clear all caches including HMR listeners.
+ */
+ public clearCache(): void
+ /**
+ * Clears all caches, removes all HMR listeners, and resets source map support.
+ * This method doesn't stop the HMR connection.
+ */
+ public async destroy(): Promise
+ /**
+ * Returns `true` if the runtime has been destroyed by calling `destroy()` method.
+ */
+ public isDestroyed(): boolean
+}
+```
+
+::: tip Advanced Usage
+If you are just migrating from `server.ssrLoadModule` and want to support HMR, consider using [`createViteRuntime`](#createviteruntime) instead.
+:::
+
+The `ViteRuntime` class requires `root` and `fetchModule` options when initiated. Vite exposes `ssrFetchModule` on the [`server`](/guide/api-javascript) instance for easier integration with Vite SSR. Vite also exports `fetchModule` from its main entry point - it doesn't make any assumptions about how the code is running unlike `ssrFetchModule` that expects the code to run using `new Function`. This can be seen in source maps that these functions return.
+
+Runner in `ViteRuntime` is responsible for executing the code. Vite exports `ESModulesRunner` out of the box, it uses `new AsyncFunction` to run the code. You can provide your own implementation if your JavaScript runtime doesn't support unsafe evaluation.
+
+The two main methods that runtime exposes are `executeUrl` and `executeEntrypoint`. The only difference between them is that all modules executed by `executeEntrypoint` will be reexecuted if HMR triggers `full-reload` event. Be aware that Vite Runtime doesn't update `exports` object when this happens (it overrides it), you would need to run `executeUrl` or get the module from `moduleCache` again if you rely on having the latest `exports` object.
+
+**Example Usage:**
+
+```js
+import { ViteRuntime, ESModulesRunner } from 'vite/runtime'
+import { root, fetchModule } from './rpc-implementation.js'
+
+const runtime = new ViteRuntime(
+ {
+ root,
+ fetchModule,
+ // you can also provide hmr.connection to support HMR
+ },
+ new ESModulesRunner(),
+)
+
+await runtime.executeEntrypoint('/src/entry-point.js')
+```
+
+## `ViteRuntimeOptions`
+
+```ts
+export interface ViteRuntimeOptions {
+ /**
+ * Root of the project
+ */
+ root: string
+ /**
+ * A method to get the information about the module.
+ * For SSR, Vite exposes `server.ssrFetchModule` function that you can use here.
+ * For other runtime use cases, Vite also exposes `fetchModule` from its main entry point.
+ */
+ fetchModule: FetchFunction
+ /**
+ * Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
+ * Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
+ * You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
+ */
+ sourcemapInterceptor?:
+ | false
+ | 'node'
+ | 'prepareStackTrace'
+ | InterceptorOptions
+ /**
+ * Disable HMR or configure HMR options.
+ */
+ hmr?:
+ | false
+ | {
+ /**
+ * Configure how HMR communicates between the client and the server.
+ */
+ connection: HMRRuntimeConnection
+ /**
+ * Configure HMR logger.
+ */
+ logger?: false | HMRLogger
+ }
+ /**
+ * Custom module cache. If not provided, it creates a separate module cache for each ViteRuntime instance.
+ */
+ moduleCache?: ModuleCacheMap
+}
+```
+
+## `ViteModuleRunner`
+
+**Type Signature:**
+
+```ts
+export interface ViteModuleRunner {
+ /**
+ * Run code that was transformed by Vite.
+ * @param context Function context
+ * @param code Transformed code
+ * @param id ID that was used to fetch the module
+ */
+ runViteModule(
+ context: ViteRuntimeModuleContext,
+ code: string,
+ id: string,
+ ): Promise
+ /**
+ * Run externalized module.
+ * @param file File URL to the external module
+ */
+ runExternalModule(file: string): Promise
+}
+```
+
+Vite exports `ESModulesRunner` that implements this interface by default. It uses `new AsyncFunction` to run code, so if the code has inlined source map it should contain an [offset of 2 lines](https://tc39.es/ecma262/#sec-createdynamicfunction) to accommodate for new lines added. This is done automatically by `server.ssrFetchModule`. If your runner implementation doesn't have this constraint, you should use `fetchModule` (exported from `vite`) directly.
+
+## HMRRuntimeConnection
+
+**Type Signature:**
+
+```ts
+export interface HMRRuntimeConnection {
+ /**
+ * Checked before sending messages to the client.
+ */
+ isReady(): boolean
+ /**
+ * Send message to the client.
+ */
+ send(message: string): void
+ /**
+ * Configure how HMR is handled when this connection triggers an update.
+ * This method expects that connection will start listening for HMR updates and call this callback when it's received.
+ */
+ onUpdate(callback: (payload: HMRPayload) => void): void
+}
+```
+
+This interface defines how HMR communication is established. Vite exports `ServerHMRConnector` from the main entry point to support HMR during Vite SSR. The `isReady` and `send` methods are usually called when the custom event is triggered (like, `import.meta.hot.send("my-event")`).
+
+`onUpdate` is called only once when the new runtime is initiated. It passed down a method that should be called when connection triggers the HMR event. The implementation depends on the type of connection (as an example, it can be `WebSocket`/`EventEmitter`/`MessageChannel`), but it usually looks something like this:
+
+```js
+function onUpdate(callback) {
+ this.connection.on('hmr', (event) => callback(event.data))
+}
+```
+
+The callback is queued and it will wait for the current update to be resolved before processing the next update. Unlike the browser implementation, HMR updates in Vite Runtime wait until all listeners (like, `vite:beforeUpdate`/`vite:beforeFullReload`) are finished before updating the modules.
+
+## `createViteRuntime`
+
+**Type Signature:**
+
+```ts
+async function createViteRuntime(
+ server: ViteDevServer,
+ options?: MainThreadRuntimeOptions,
+): Promise
+```
+
+**Example Usage:**
+
+```js
+import { createServer } from 'vite'
+
+const __dirname = fileURLToPath(new URL('.', import.meta.url))
+
+;(async () => {
+ const server = await createServer({
+ root: __dirname,
+ })
+ await server.listen()
+
+ const runtime = await createViteRuntime(server)
+ await runtime.executeEntrypoint('/src/entry-point.js')
+})()
+```
+
+This method serves as an easy replacement for `server.ssrLoadModule`. Unlike `ssrLoadModule`, `createViteRuntime` provides HMR support out of the box. You can pass down [`options`](#mainthreadruntimeoptions) to customize how SSR runtime behaves to suit your needs.
+
+## `MainThreadRuntimeOptions`
+
+```ts
+export interface MainThreadRuntimeOptions
+ extends Omit {
+ /**
+ * Disable HMR or configure HMR logger.
+ */
+ hmr?:
+ | false
+ | {
+ logger?: false | HMRLogger
+ }
+ /**
+ * Provide a custom module runner. This controls how the code is executed.
+ */
+ runner?: ViteModuleRunner
+}
+```
diff --git a/docs/guide/cli.md b/docs/guide/cli.md
index 08134c4c839a8b..bfbd6ca7de6e0c 100644
--- a/docs/guide/cli.md
+++ b/docs/guide/cli.md
@@ -58,7 +58,6 @@ vite build [root]
| `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
| `--manifest [name]` | Emit build manifest json (`boolean \| string`) |
| `--ssrManifest [name]` | Emit ssr manifest json (`boolean \| string`) |
-| `--force` | Force the optimizer to ignore the cache and re-bundle (experimental)(`boolean`) |
| `--emptyOutDir` | Force empty outDir when it's outside of root (`boolean`) |
| `-w, --watch` | Rebuilds when modules have changed on disk (`boolean`) |
| `-c, --config ` | Use specified config file (`string`) |
diff --git a/docs/guide/features.md b/docs/guide/features.md
index a60999bea00ef6..e75e84b08e866b 100644
--- a/docs/guide/features.md
+++ b/docs/guide/features.md
@@ -291,7 +291,7 @@ Starting from Vite 4.4, there is experimental support for [Lightning CSS](https:
npm add -D lightningcss
```
-If enabled, CSS files will be processed by Lightning CSS instead of PostCSS. To configure it, you can pass Lightning CSS options to the [`css.lightingcss`](../config/shared-options.md#css-lightningcss) config option.
+If enabled, CSS files will be processed by Lightning CSS instead of PostCSS. To configure it, you can pass Lightning CSS options to the [`css.lightningcss`](../config/shared-options.md#css-lightningcss) config option.
To configure CSS Modules, you'll use [`css.lightningcss.cssModules`](https://lightningcss.dev/css-modules.html) instead of [`css.modules`](../config/shared-options.md#css-modules) (which configures the way PostCSS handles CSS modules).
@@ -391,26 +391,6 @@ const modules = {
}
```
-### Glob Import As
-
-`import.meta.glob` also supports importing files as strings (similar to [Importing Asset as String](https://vitejs.dev/guide/assets.html#importing-asset-as-string)) with the [Import Reflection](https://github.com/tc39/proposal-import-reflection) syntax:
-
-```js
-const modules = import.meta.glob('./dir/*.js', { as: 'raw', eager: true })
-```
-
-The above will be transformed into the following:
-
-```js
-// code produced by vite
-const modules = {
- './dir/foo.js': 'export default "foo"\n',
- './dir/bar.js': 'export default "bar"\n',
-}
-```
-
-`{ as: 'url' }` is also supported for loading assets as URLs.
-
### Multiple Patterns
The first argument can be an array of globs, for example
@@ -490,22 +470,39 @@ const modules = {
#### Custom Queries
-You can also use the `query` option to provide custom queries to imports for other plugins to consume.
+You can also use the `query` option to provide queries to imports, for example, to import assets [as a string](https://vitejs.dev/guide/assets.html#importing-asset-as-string) or [as a url](https://vitejs.dev/guide/assets.html#importing-asset-as-url):
```ts
-const modules = import.meta.glob('./dir/*.js', {
- query: { foo: 'bar', bar: true },
+const moduleStrings = import.meta.glob('./dir/*.svg', {
+ query: '?raw',
+ import: 'default',
+})
+const moduleUrls = import.meta.glob('./dir/*.svg', {
+ query: '?url',
+ import: 'default',
})
```
```ts
// code produced by vite:
-const modules = {
- './dir/foo.js': () => import('./dir/foo.js?foo=bar&bar=true'),
- './dir/bar.js': () => import('./dir/bar.js?foo=bar&bar=true'),
+const moduleStrings = {
+ './dir/foo.svg': () => import('./dir/foo.js?raw').then((m) => m['default']),
+ './dir/bar.svg': () => import('./dir/bar.js?raw').then((m) => m['default']),
+}
+const moduleUrls = {
+ './dir/foo.svg': () => import('./dir/foo.js?url').then((m) => m['default']),
+ './dir/bar.svg': () => import('./dir/bar.js?url').then((m) => m['default']),
}
```
+You can also provide custom queries for other plugins to consume:
+
+```ts
+const modules = import.meta.glob('./dir/*.js', {
+ query: { foo: 'bar', bar: true },
+})
+```
+
### Glob Import Caveats
Note that:
@@ -617,6 +614,8 @@ const worker = new Worker(new URL('./worker.js', import.meta.url), {
})
```
+The worker detection will only work if the `new URL()` constructor is used directly inside the `new Worker()` declaration. Additionally, all options parameters must be static values (i.e. string literals).
+
### Import with Query Suffixes
A web worker script can be directly imported by appending `?worker` or `?sharedworker` to the import request. The default export will be a custom worker constructor:
diff --git a/docs/guide/index.md b/docs/guide/index.md
index ece67cfbf1c4b4..406d342c2be28f 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -62,7 +62,7 @@ $ pnpm create vite
```
```bash [Bun]
-$ bunx create-vite
+$ bun create vite
```
:::
@@ -82,7 +82,7 @@ yarn create vite my-vue-app --template vue
pnpm create vite my-vue-app --template vue
# bun
-bunx create-vite my-vue-app --template vue
+bun create vite my-vue-app --template vue
```
See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.
diff --git a/docs/guide/migration.md b/docs/guide/migration.md
index 5137ee6fb7e760..32d8a499e3c358 100644
--- a/docs/guide/migration.md
+++ b/docs/guide/migration.md
@@ -168,8 +168,8 @@ Vite 5 uses esbuild 0.19 and removes the compatibility layer for esbuild 0.18, w
// Set true if you use decorators
"experimentalDecorators": true,
// Set true if you see parsing errors in your browser
- "useDefineForClassFields": true
- }
+ "useDefineForClassFields": true,
+ },
}
```
diff --git a/docs/guide/performance.md b/docs/guide/performance.md
index 5096d276381031..0a941ddc45aeef 100644
--- a/docs/guide/performance.md
+++ b/docs/guide/performance.md
@@ -6,6 +6,10 @@ While Vite is fast by default, performance issues can creep in as the project's
- Slow page loads
- Slow builds
+## Avoid Browser Extensions
+
+Some browser extensions may interfere with requests and slow down startup and reload times for large apps, especially when using browser dev tools. We recommend creating a dev-only profile without extensions, or switch to incognito mode, while using Vite's dev server in these cases. Incognito mode should also be faster than a regular profile without extensions.
+
## Audit Configured Vite Plugins
Vite's internal and official plugins are optimized to do the least amount of work possible while providing compatibility with the broader ecosystem. For example, code transformations use regex in dev, but do a complete parse in build to ensure correctness.
diff --git a/docs/guide/ssr.md b/docs/guide/ssr.md
index 1cfce0ae3671e6..f989f7cf392704 100644
--- a/docs/guide/ssr.md
+++ b/docs/guide/ssr.md
@@ -92,7 +92,7 @@ async function createServer() {
// When the server restarts (for example after the user modifies
// vite.config.js), `vite.middlewares` is still going to be the same
// reference (with a new internal stack of Vite and plugin-injected
- // middlewares. The following is valid even after restarts.
+ // middlewares). The following is valid even after restarts.
app.use(vite.middlewares)
app.use('*', async (req, res) => {
@@ -125,10 +125,16 @@ app.use('*', async (req, res, next) => {
// preambles from @vitejs/plugin-react
template = await vite.transformIndexHtml(url, template)
- // 3. Load the server entry. ssrLoadModule automatically transforms
+ // 3a. Load the server entry. ssrLoadModule automatically transforms
// ESM source code to be usable in Node.js! There is no bundling
// required, and provides efficient invalidation similar to HMR.
const { render } = await vite.ssrLoadModule('/src/entry-server.js')
+ // 3b. Since Vite 5.1, you can use createViteRuntime API instead.
+ // It fully supports HMR and works in a simillar way to ssrLoadModule
+ // More advanced use case would be creating a runtime in a separate
+ // thread or even a different machine using ViteRuntime class
+ const runtime = await vite.createViteRuntime(server)
+ const { render } = await runtime.executeEntrypoint('/src/entry-server.js')
// 4. render the app HTML. This assumes entry-server.js's exported
// `render` function calls appropriate framework SSR APIs,
@@ -163,7 +169,7 @@ The `dev` script in `package.json` should also be changed to use the server scri
To ship an SSR project for production, we need to:
1. Produce a client build as normal;
-2. Produce an SSR build, which can be directly loaded via `import()` so that we don't have to go through Vite's `ssrLoadModule`;
+2. Produce an SSR build, which can be directly loaded via `import()` so that we don't have to go through Vite's `ssrLoadModule` or `runtime.executeEntrypoint`;
Our scripts in `package.json` will look like this:
@@ -181,9 +187,9 @@ Note the `--ssr` flag which indicates this is an SSR build. It should also speci
Then, in `server.js` we need to add some production specific logic by checking `process.env.NODE_ENV`:
-- Instead of reading the root `index.html`, use the `dist/client/index.html` as the template instead, since it contains the correct asset links to the client build.
+- Instead of reading the root `index.html`, use the `dist/client/index.html` as the template, since it contains the correct asset links to the client build.
-- Instead of `await vite.ssrLoadModule('/src/entry-server.js')`, use `import('./dist/server/entry-server.js')` instead (this file is the result of the SSR build).
+- Instead of `await vite.ssrLoadModule('/src/entry-server.js')` or `await runtime.executeEntrypoint('/src/entry-server.js')`, use `import('./dist/server/entry-server.js')` (this file is the result of the SSR build).
- Move the creation and all usage of the `vite` dev server behind dev-only conditional branches, then add static file serving middlewares to serve files from `dist/client`.
diff --git a/docs/public/og-image-announcing-vite5-1.png b/docs/public/og-image-announcing-vite5-1.png
new file mode 100644
index 00000000000000..cebfc993994a50
Binary files /dev/null and b/docs/public/og-image-announcing-vite5-1.png differ
diff --git a/docs/public/transloadit.svg b/docs/public/transloadit.svg
new file mode 100644
index 00000000000000..6033c48566d90e
--- /dev/null
+++ b/docs/public/transloadit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/public/vite5-1-10K-modules-loading-time.png b/docs/public/vite5-1-10K-modules-loading-time.png
new file mode 100644
index 00000000000000..8c94ed9bf1f2ed
Binary files /dev/null and b/docs/public/vite5-1-10K-modules-loading-time.png differ
diff --git a/docs/releases.md b/docs/releases.md
index e33049b941bfc6..ed8d9d6d545753 100644
--- a/docs/releases.md
+++ b/docs/releases.md
@@ -46,4 +46,4 @@ We periodically deprecate features that have been superseded by better alternati
## Experimental Features
-Some features are marked as experimental when released in a stable version of Vite. Experimental features allows us to gather real-world experience to influence their final design. The goal is to let users provide feedback by testing them in production. Experimental features themselves are considered unstable, and should only be used in a controlled manner. These features may change between Minors, so users must pin their Vite version when they rely on them.
+Some features are marked as experimental when released in a stable version of Vite. Experimental features allows us to gather real-world experience to influence their final design. The goal is to let users provide feedback by testing them in production. Experimental features themselves are considered unstable, and should only be used in a controlled manner. These features may change between Minors, so users must pin their Vite version when they rely on them. We will create [a GitHub discussion](https://github.com/vitejs/vite/discussions/categories/feedback?discussions_q=is%3Aopen+label%3Aexperimental+category%3AFeedback) for each experimental feature.
diff --git a/package.json b/package.json
index 012b8de948046d..66de88749b8c97 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,6 @@
"test": "run-s test-unit test-serve test-build",
"test-serve": "vitest run -c vitest.config.e2e.ts",
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
- "test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
"test-unit": "vitest run",
"test-docs": "pnpm run docs-build",
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
@@ -41,10 +40,9 @@
"ci-docs": "run-s build docs-build"
},
"devDependencies": {
- "@babel/types": "^7.23.6",
- "@eslint-types/import": "^2.29.0-1",
- "@eslint-types/typescript-eslint": "^6.12.0",
- "@rollup/plugin-typescript": "^11.1.5",
+ "@babel/types": "^7.23.9",
+ "@eslint-types/typescript-eslint": "^6.19.1",
+ "@rollup/plugin-typescript": "^11.1.6",
"@types/babel__core": "^7.20.5",
"@types/babel__preset-env": "^7.9.6",
"@types/convert-source-map": "^2.0.3",
@@ -53,44 +51,43 @@
"@types/estree": "^1.0.5",
"@types/etag": "^1.8.3",
"@types/fs-extra": "^11.0.4",
- "@types/json-stable-stringify": "^1.0.36",
"@types/less": "^3.0.6",
"@types/micromatch": "^4.0.6",
- "@types/node": "^20.10.4",
+ "@types/node": "^20.11.16",
"@types/picomatch": "^2.3.3",
- "@types/semver": "^7.5.6",
"@types/sass": "~1.43.1",
+ "@types/semver": "^7.5.6",
"@types/stylus": "^0.48.42",
"@types/ws": "^8.5.10",
- "@typescript-eslint/eslint-plugin": "^6.14.0",
- "@typescript-eslint/parser": "^6.14.0",
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
+ "@typescript-eslint/parser": "^6.21.0",
"@vitejs/release-scripts": "^1.3.1",
"conventional-changelog-cli": "^4.1.0",
- "eslint": "^8.55.0",
- "eslint-define-config": "^2.0.0",
- "eslint-plugin-import": "^2.29.0",
- "eslint-plugin-n": "^16.4.0",
- "eslint-plugin-regexp": "^2.1.2",
+ "eslint": "^8.56.0",
+ "eslint-define-config": "^2.1.0",
+ "eslint-plugin-i": "^2.29.1",
+ "eslint-plugin-n": "^16.6.2",
+ "eslint-plugin-regexp": "^2.2.0",
"execa": "^8.0.1",
"feed": "^4.2.2",
"fs-extra": "^11.2.0",
- "lint-staged": "^15.2.0",
- "npm-run-all2": "^6.1.1",
+ "lint-staged": "^15.2.2",
+ "npm-run-all2": "^6.1.2",
"picocolors": "^1.0.0",
- "playwright-chromium": "^1.40.1",
- "prettier": "3.1.1",
+ "playwright-chromium": "^1.41.2",
+ "prettier": "3.2.5",
"rimraf": "^5.0.5",
"rollup": "^4.2.0",
- "semver": "^7.5.4",
+ "semver": "^7.6.0",
"simple-git-hooks": "^2.9.0",
"tslib": "^2.6.2",
- "tsx": "^4.6.2",
+ "tsx": "^4.7.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "workspace:*",
- "vitepress": "1.0.0-rc.31",
- "vitest": "^1.0.4",
- "vue": "^3.3.11"
+ "vitepress": "1.0.0-rc.42",
+ "vitest": "^1.2.2",
+ "vue": "^3.4.15"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false"
@@ -109,7 +106,7 @@
"eslint --cache --fix"
]
},
- "packageManager": "pnpm@8.12.0",
+ "packageManager": "pnpm@8.15.1",
"pnpm": {
"overrides": {
"vite": "workspace:*"
@@ -118,13 +115,18 @@
"acorn-walk": {
"peerDependencies": {
"acorn": "*"
+ },
+ "peerDependenciesMeta": {
+ "acorn": {
+ "optional": true
+ }
}
}
},
"patchedDependencies": {
- "chokidar@3.5.3": "patches/chokidar@3.5.3.patch",
- "sirv@2.0.3": "patches/sirv@2.0.3.patch",
- "dotenv-expand@10.0.0": "patches/dotenv-expand@10.0.0.patch"
+ "chokidar@3.6.0": "patches/chokidar@3.6.0.patch",
+ "dotenv-expand@10.0.0": "patches/dotenv-expand@10.0.0.patch",
+ "sirv@2.0.4": "patches/sirv@2.0.4.patch"
},
"peerDependencyRules": {
"allowedVersions": {
diff --git a/packages/create-vite/CHANGELOG.md b/packages/create-vite/CHANGELOG.md
index c96171dc7966fc..5260de13895764 100644
--- a/packages/create-vite/CHANGELOG.md
+++ b/packages/create-vite/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 5.2.0 (2024-02-08)
+
+* fix(create-vite): turn off `react/jsx-no-target-blank` ESLint rule in React JS template (#15672) ([a6f39e8](https://github.com/vitejs/vite/commit/a6f39e8)), closes [#15672](https://github.com/vitejs/vite/issues/15672)
+* fix(deps): update all non-major dependencies (#15375) ([ab56227](https://github.com/vitejs/vite/commit/ab56227)), closes [#15375](https://github.com/vitejs/vite/issues/15375)
+* fix(deps): update all non-major dependencies (#15603) ([109fb80](https://github.com/vitejs/vite/commit/109fb80)), closes [#15603](https://github.com/vitejs/vite/issues/15603)
+* fix(deps): update all non-major dependencies (#15675) ([4d9363a](https://github.com/vitejs/vite/commit/4d9363a)), closes [#15675](https://github.com/vitejs/vite/issues/15675)
+* fix(deps): update all non-major dependencies (#15803) ([e0a6ef2](https://github.com/vitejs/vite/commit/e0a6ef2)), closes [#15803](https://github.com/vitejs/vite/issues/15803)
+* feat(create-vite): allow overwrite in command line (#15808) ([1882c73](https://github.com/vitejs/vite/commit/1882c73)), closes [#15808](https://github.com/vitejs/vite/issues/15808)
+* feat(create-vite): set "strict: true" in tsconfig.node.json (#15820) ([5e5ca7d](https://github.com/vitejs/vite/commit/5e5ca7d)), closes [#15820](https://github.com/vitejs/vite/issues/15820)
+* docs: changed bunx create-vite to bun create vite (#15646) ([f3c11bb](https://github.com/vitejs/vite/commit/f3c11bb)), closes [#15646](https://github.com/vitejs/vite/issues/15646)
+* chore(deps): update dependency @vitejs/plugin-vue to v5 (#15474) ([17857e7](https://github.com/vitejs/vite/commit/17857e7)), closes [#15474](https://github.com/vitejs/vite/issues/15474)
+
+
+
## 5.1.0 (2023-12-12)
* fix(deps): update all non-major dependencies (#15233) ([ad3adda](https://github.com/vitejs/vite/commit/ad3adda)), closes [#15233](https://github.com/vitejs/vite/issues/15233)
diff --git a/packages/create-vite/README.md b/packages/create-vite/README.md
index 6d016ef5f4ed8c..a6f879fcb9e48d 100644
--- a/packages/create-vite/README.md
+++ b/packages/create-vite/README.md
@@ -26,7 +26,7 @@ $ pnpm create vite
With Bun:
```bash
-$ bunx create-vite
+$ bun create vite
```
Then follow the prompts!
@@ -44,7 +44,7 @@ yarn create vite my-vue-app --template vue
pnpm create vite my-vue-app --template vue
# Bun
-bunx create-vite my-vue-app --template vue
+bun create vite my-vue-app --template vue
```
Currently supported template presets include:
diff --git a/packages/create-vite/__tests__/cli.spec.ts b/packages/create-vite/__tests__/cli.spec.ts
index 0db7338415e75a..e34d4e14f6e4cf 100644
--- a/packages/create-vite/__tests__/cli.spec.ts
+++ b/packages/create-vite/__tests__/cli.spec.ts
@@ -97,3 +97,9 @@ test('works with the -t alias', () => {
expect(stdout).toContain(`Scaffolding project in ${genPath}`)
expect(templateFiles).toEqual(generatedFiles)
})
+
+test('accepts command line override for --overwrite', () => {
+ createNonEmptyDir()
+ const { stdout } = run(['.', '--overwrite', 'ignore'], { cwd: genPath })
+ expect(stdout).not.toContain(`Current directory is not empty.`)
+})
diff --git a/packages/create-vite/package.json b/packages/create-vite/package.json
index 1a037d490b62cd..1bd19971f97f38 100644
--- a/packages/create-vite/package.json
+++ b/packages/create-vite/package.json
@@ -1,6 +1,6 @@
{
"name": "create-vite",
- "version": "5.1.0",
+ "version": "5.2.0",
"type": "module",
"license": "MIT",
"author": "Evan You",
diff --git a/packages/create-vite/src/index.ts b/packages/create-vite/src/index.ts
index 06fab482ccbff2..53d2a65b1c57af 100755
--- a/packages/create-vite/src/index.ts
+++ b/packages/create-vite/src/index.ts
@@ -253,6 +253,10 @@ async function init() {
'projectName' | 'overwrite' | 'packageName' | 'framework' | 'variant'
>
+ prompts.override({
+ overwrite: argv.overwrite,
+ })
+
try {
result = await prompts(
[
diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json
index f00a09d4112b1e..07e41243f94420 100644
--- a/packages/create-vite/template-lit-ts/package.json
+++ b/packages/create-vite/template-lit-ts/package.json
@@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
- "lit": "^3.1.0"
+ "lit": "^3.1.2"
},
"devDependencies": {
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json
index 37850460c481b2..0e5eb639c26a48 100644
--- a/packages/create-vite/template-lit/package.json
+++ b/packages/create-vite/template-lit/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "lit": "^3.1.0"
+ "lit": "^3.1.2"
},
"devDependencies": {
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json
index 9c481731dc4626..4dc9fc1fd8b80e 100644
--- a/packages/create-vite/template-preact-ts/package.json
+++ b/packages/create-vite/template-preact-ts/package.json
@@ -12,8 +12,8 @@
"preact": "^10.19.3"
},
"devDependencies": {
- "@preact/preset-vite": "^2.7.0",
+ "@preact/preset-vite": "^2.8.1",
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-preact-ts/tsconfig.node.json b/packages/create-vite/template-preact-ts/tsconfig.node.json
index 42872c59f5b01c..97ede7ee6f2d37 100644
--- a/packages/create-vite/template-preact-ts/tsconfig.node.json
+++ b/packages/create-vite/template-preact-ts/tsconfig.node.json
@@ -4,7 +4,8 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json
index c3cbb74c7bd92c..b4c847c91da1bf 100644
--- a/packages/create-vite/template-preact/package.json
+++ b/packages/create-vite/template-preact/package.json
@@ -12,7 +12,7 @@
"preact": "^10.19.3"
},
"devDependencies": {
- "@preact/preset-vite": "^2.7.0",
- "vite": "^5.0.8"
+ "@preact/preset-vite": "^2.8.1",
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-qwik-ts/package.json b/packages/create-vite/template-qwik-ts/package.json
index cc06b4409d2c60..5a216bb831e233 100644
--- a/packages/create-vite/template-qwik-ts/package.json
+++ b/packages/create-vite/template-qwik-ts/package.json
@@ -10,9 +10,9 @@
},
"devDependencies": {
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
},
"dependencies": {
- "@builder.io/qwik": "^1.3.0"
+ "@builder.io/qwik": "^1.4.4"
}
}
diff --git a/packages/create-vite/template-qwik-ts/tsconfig.node.json b/packages/create-vite/template-qwik-ts/tsconfig.node.json
index 42872c59f5b01c..97ede7ee6f2d37 100644
--- a/packages/create-vite/template-qwik-ts/tsconfig.node.json
+++ b/packages/create-vite/template-qwik-ts/tsconfig.node.json
@@ -4,7 +4,8 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-qwik/package.json b/packages/create-vite/template-qwik/package.json
index cc06b4409d2c60..5a216bb831e233 100644
--- a/packages/create-vite/template-qwik/package.json
+++ b/packages/create-vite/template-qwik/package.json
@@ -10,9 +10,9 @@
},
"devDependencies": {
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
},
"dependencies": {
- "@builder.io/qwik": "^1.3.0"
+ "@builder.io/qwik": "^1.4.4"
}
}
diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json
index 3def0697a99308..c0a43346aaab52 100644
--- a/packages/create-vite/template-react-ts/package.json
+++ b/packages/create-vite/template-react-ts/package.json
@@ -14,15 +14,15 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
- "@types/react": "^18.2.43",
- "@types/react-dom": "^18.2.17",
- "@typescript-eslint/eslint-plugin": "^6.14.0",
- "@typescript-eslint/parser": "^6.14.0",
+ "@types/react": "^18.2.55",
+ "@types/react-dom": "^18.2.19",
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
+ "@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.2.1",
- "eslint": "^8.55.0",
+ "eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-react-ts/tsconfig.node.json b/packages/create-vite/template-react-ts/tsconfig.node.json
index 42872c59f5b01c..97ede7ee6f2d37 100644
--- a/packages/create-vite/template-react-ts/tsconfig.node.json
+++ b/packages/create-vite/template-react-ts/tsconfig.node.json
@@ -4,7 +4,8 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-react/.eslintrc.cjs b/packages/create-vite/template-react/.eslintrc.cjs
index 4dcb43901a687f..3e212e1d4307a3 100644
--- a/packages/create-vite/template-react/.eslintrc.cjs
+++ b/packages/create-vite/template-react/.eslintrc.cjs
@@ -12,6 +12,7 @@ module.exports = {
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
+ 'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json
index 18c25978e15ba6..bd4b310213f358 100644
--- a/packages/create-vite/template-react/package.json
+++ b/packages/create-vite/template-react/package.json
@@ -14,13 +14,13 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
- "@types/react": "^18.2.43",
- "@types/react-dom": "^18.2.17",
+ "@types/react": "^18.2.55",
+ "@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
- "eslint": "^8.55.0",
+ "eslint": "^8.56.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-solid-ts/package.json b/packages/create-vite/template-solid-ts/package.json
index 249c5068f204b8..699b0c71fbb16c 100644
--- a/packages/create-vite/template-solid-ts/package.json
+++ b/packages/create-vite/template-solid-ts/package.json
@@ -9,11 +9,11 @@
"preview": "vite preview"
},
"dependencies": {
- "solid-js": "^1.8.7"
+ "solid-js": "^1.8.14"
},
"devDependencies": {
"typescript": "^5.2.2",
- "vite": "^5.0.8",
- "vite-plugin-solid": "^2.8.0"
+ "vite": "^5.1.0",
+ "vite-plugin-solid": "^2.9.1"
}
}
diff --git a/packages/create-vite/template-solid-ts/tsconfig.node.json b/packages/create-vite/template-solid-ts/tsconfig.node.json
index 42872c59f5b01c..97ede7ee6f2d37 100644
--- a/packages/create-vite/template-solid-ts/tsconfig.node.json
+++ b/packages/create-vite/template-solid-ts/tsconfig.node.json
@@ -4,7 +4,8 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-solid/package.json b/packages/create-vite/template-solid/package.json
index 03cd4aab7da2af..c0d7374f4f640c 100644
--- a/packages/create-vite/template-solid/package.json
+++ b/packages/create-vite/template-solid/package.json
@@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
- "solid-js": "^1.8.7"
+ "solid-js": "^1.8.14"
},
"devDependencies": {
- "vite": "^5.0.8",
- "vite-plugin-solid": "^2.8.0"
+ "vite": "^5.1.0",
+ "vite-plugin-solid": "^2.9.1"
}
}
diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json
index 57e86e4df53b0c..7317f572dcd83b 100644
--- a/packages/create-vite/template-svelte-ts/package.json
+++ b/packages/create-vite/template-svelte-ts/package.json
@@ -10,12 +10,12 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
- "@sveltejs/vite-plugin-svelte": "^3.0.1",
+ "@sveltejs/vite-plugin-svelte": "^3.0.2",
"@tsconfig/svelte": "^5.0.2",
- "svelte": "^4.2.8",
- "svelte-check": "^3.6.2",
+ "svelte": "^4.2.10",
+ "svelte-check": "^3.6.3",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-svelte-ts/tsconfig.node.json b/packages/create-vite/template-svelte-ts/tsconfig.node.json
index 494bfe0835347c..d02c37dfe5fd60 100644
--- a/packages/create-vite/template-svelte-ts/tsconfig.node.json
+++ b/packages/create-vite/template-svelte-ts/tsconfig.node.json
@@ -3,7 +3,8 @@
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
- "moduleResolution": "bundler"
+ "moduleResolution": "bundler",
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json
index bcab4d8cfb1da0..eb0cfceed06a6f 100644
--- a/packages/create-vite/template-svelte/package.json
+++ b/packages/create-vite/template-svelte/package.json
@@ -9,8 +9,8 @@
"preview": "vite preview"
},
"devDependencies": {
- "@sveltejs/vite-plugin-svelte": "^3.0.1",
- "svelte": "^4.2.8",
- "vite": "^5.0.8"
+ "@sveltejs/vite-plugin-svelte": "^3.0.2",
+ "svelte": "^4.2.10",
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json
index 77c775be636bcb..5c230244b329d2 100644
--- a/packages/create-vite/template-vanilla-ts/package.json
+++ b/packages/create-vite/template-vanilla-ts/package.json
@@ -10,6 +10,6 @@
},
"devDependencies": {
"typescript": "^5.2.2",
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json
index 8f06cce644fec4..2d02454e475a91 100644
--- a/packages/create-vite/template-vanilla/package.json
+++ b/packages/create-vite/template-vanilla/package.json
@@ -9,6 +9,6 @@
"preview": "vite preview"
},
"devDependencies": {
- "vite": "^5.0.8"
+ "vite": "^5.1.0"
}
}
diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json
index 5d9adf1aa3448c..a8dd548e4ab08a 100644
--- a/packages/create-vite/template-vue-ts/package.json
+++ b/packages/create-vite/template-vue-ts/package.json
@@ -9,12 +9,12 @@
"preview": "vite preview"
},
"dependencies": {
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
},
"devDependencies": {
- "@vitejs/plugin-vue": "^4.5.2",
+ "@vitejs/plugin-vue": "^5.0.3",
"typescript": "^5.2.2",
- "vite": "^5.0.8",
- "vue-tsc": "^1.8.25"
+ "vite": "^5.1.0",
+ "vue-tsc": "^1.8.27"
}
}
diff --git a/packages/create-vite/template-vue-ts/tsconfig.node.json b/packages/create-vite/template-vue-ts/tsconfig.node.json
index 42872c59f5b01c..97ede7ee6f2d37 100644
--- a/packages/create-vite/template-vue-ts/tsconfig.node.json
+++ b/packages/create-vite/template-vue-ts/tsconfig.node.json
@@ -4,7 +4,8 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
+ "strict": true
},
"include": ["vite.config.ts"]
}
diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json
index db3f608bdf6e4e..8e04a5d6a18963 100644
--- a/packages/create-vite/template-vue/package.json
+++ b/packages/create-vite/template-vue/package.json
@@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
},
"devDependencies": {
- "@vitejs/plugin-vue": "^4.5.2",
- "vite": "^5.0.8"
+ "@vitejs/plugin-vue": "^5.0.3",
+ "vite": "^5.1.0"
}
}
diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md
index e02251d776af49..49ff4f9bf7e6db 100644
--- a/packages/plugin-legacy/CHANGELOG.md
+++ b/packages/plugin-legacy/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 5.3.0 (2024-01-25)
+
+* docs: fix commit id collision (#15105) ([0654d1b](https://github.com/vitejs/vite/commit/0654d1b)), closes [#15105](https://github.com/vitejs/vite/issues/15105)
+* docs: fix dead link (#15700) ([aa7916a](https://github.com/vitejs/vite/commit/aa7916a)), closes [#15700](https://github.com/vitejs/vite/issues/15700)
+* feat(legacy): build file name optimization (#15115) ([39f435d](https://github.com/vitejs/vite/commit/39f435d)), closes [#15115](https://github.com/vitejs/vite/issues/15115)
+* feat(legacy): support any separator before hash in fileNames (#15170) ([ecab41a](https://github.com/vitejs/vite/commit/ecab41a)), closes [#15170](https://github.com/vitejs/vite/issues/15170)
+* feat(plugin-legacy): add `modernTargets` option (#15506) ([cf56507](https://github.com/vitejs/vite/commit/cf56507)), closes [#15506](https://github.com/vitejs/vite/issues/15506)
+* fix(deps): update all non-major dependencies (#15233) ([ad3adda](https://github.com/vitejs/vite/commit/ad3adda)), closes [#15233](https://github.com/vitejs/vite/issues/15233)
+* fix(deps): update all non-major dependencies (#15304) ([bb07f60](https://github.com/vitejs/vite/commit/bb07f60)), closes [#15304](https://github.com/vitejs/vite/issues/15304)
+* fix(deps): update all non-major dependencies (#15375) ([ab56227](https://github.com/vitejs/vite/commit/ab56227)), closes [#15375](https://github.com/vitejs/vite/issues/15375)
+* chore(deps): update all non-major dependencies (#15145) ([7ff2c0a](https://github.com/vitejs/vite/commit/7ff2c0a)), closes [#15145](https://github.com/vitejs/vite/issues/15145)
+
+
+
## 5.2.0 (2023-11-22)
* test(legacy): add a test to checks all inline snippets are valid JS (#15098) ([1b9ca66](https://github.com/vitejs/vite/commit/1b9ca66)), closes [#15098](https://github.com/vitejs/vite/issues/15098)
diff --git a/packages/plugin-legacy/README.md b/packages/plugin-legacy/README.md
index 27f6f22e803be8..bca7827530e4f3 100644
--- a/packages/plugin-legacy/README.md
+++ b/packages/plugin-legacy/README.md
@@ -40,12 +40,23 @@ npm add -D terser
- **Type:** `string | string[] | { [key: string]: string }`
- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)
- If explicitly set, it's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets).
+ If explicitly set, it's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **legacy chunks**.
The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.
If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.
+### `modernTargets`
+
+- **Type:** `string | string[]`
+- **Default:** [`'edge>=80, firefox>=72, chrome>=80, safari>=13.1, chromeAndroid>=80, iOS>=13.1'`](https://browsersl.ist/#q=edge%3E%3D80%2C+firefox%3E%3D72%2C+chrome%3E%3D80%2C+safari%3E%3D13.1%2C+chromeAndroid%3E%3D80%2C+iOS%3E%3D13.1)
+
+ If explicitly set, it's passed on to [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#targets) when rendering **modern chunks**.
+
+ The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.
+
+ If it's not set, plugin-legacy will fallback to the default value.
+
### `polyfills`
- **Type:** `boolean | string[]`
@@ -76,7 +87,7 @@ npm add -D terser
Note it is **not recommended** to use the `true` value (which uses auto-detection) because `core-js@3` is very aggressive in polyfill inclusions due to all the bleeding edge features it supports. Even when targeting native ESM support, it injects 15kb of polyfills!
- If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider using an on-demand service like [Polyfill.io](https://polyfill.io/v3/) to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).
+ If you don't have hard reliance on bleeding edge runtime features, it is not that hard to avoid having to use polyfills in the modern build altogether. Alternatively, consider using an on-demand service like [Polyfill.io](https://polyfill.io) to only inject necessary polyfills based on actual browser user-agents (most modern browsers will need nothing!).
### `renderLegacyChunks`
diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json
index 9916818d2982c6..b84801131cf8a6 100644
--- a/packages/plugin-legacy/package.json
+++ b/packages/plugin-legacy/package.json
@@ -1,6 +1,6 @@
{
"name": "@vitejs/plugin-legacy",
- "version": "5.2.0",
+ "version": "5.3.0",
"license": "MIT",
"author": "Evan You",
"files": [
@@ -41,20 +41,21 @@
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
"funding": "https://github.com/vitejs/vite?sponsor=1",
"dependencies": {
- "@babel/core": "^7.23.6",
- "@babel/preset-env": "^7.23.6",
- "browserslist": "^4.22.2",
- "core-js": "^3.34.0",
- "magic-string": "^0.30.5",
- "regenerator-runtime": "^0.14.0",
- "systemjs": "^6.14.2"
+ "@babel/core": "^7.23.9",
+ "@babel/preset-env": "^7.23.9",
+ "browserslist": "^4.22.3",
+ "core-js": "^3.35.1",
+ "esbuild-plugin-browserslist": "^0.11.1",
+ "magic-string": "^0.30.7",
+ "regenerator-runtime": "^0.14.1",
+ "systemjs": "^6.14.3"
},
"peerDependencies": {
"terser": "^5.4.0",
"vite": "^5.0.0"
},
"devDependencies": {
- "acorn": "^8.11.2",
+ "acorn": "^8.11.3",
"picocolors": "^1.0.0",
"vite": "workspace:*"
}
diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts
index 9495d868d71502..d7f0bb206547aa 100644
--- a/packages/plugin-legacy/src/index.ts
+++ b/packages/plugin-legacy/src/index.ts
@@ -24,6 +24,7 @@ import type {
} from '@babel/core'
import colors from 'picocolors'
import browserslist from 'browserslist'
+import { resolveToEsbuildTarget } from 'esbuild-plugin-browserslist'
import type { Options } from './types'
import {
detectModernBrowserCode,
@@ -125,6 +126,7 @@ const prefixedHashInFileNameRE = /\W?\[hash(:\d+)?\]/
function viteLegacyPlugin(options: Options = {}): Plugin[] {
let config: ResolvedConfig
let targets: Options['targets']
+ let modernTargets: Options['modernTargets']
// browsers supporting ESM + dynamic import + import.meta + async generator
const modernTargetsEsbuild = [
@@ -183,6 +185,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
}
let overriddenBuildTarget = false
+ let overriddenDefaultModernTargets = false
const legacyConfigPlugin: Plugin = {
name: 'vite:legacy-config',
@@ -205,7 +208,10 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
// Vite's default target browsers are **not** the same.
// See https://github.com/vitejs/vite/pull/10052#issuecomment-1242076461
overriddenBuildTarget = config.build.target !== undefined
- config.build.target = modernTargetsEsbuild
+ overriddenDefaultModernTargets = options.modernTargets !== undefined
+ config.build.target = options.modernTargets
+ ? resolveToEsbuildTarget(browserslist(options.modernTargets))
+ : modernTargetsEsbuild
}
}
@@ -226,6 +232,13 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
),
)
}
+ if (overriddenDefaultModernTargets) {
+ config.logger.warn(
+ colors.yellow(
+ `plugin-legacy 'modernTargets' option overrode the builtin targets of modern chunks. Some versions of browsers between legacy and modern may not be supported.`,
+ ),
+ )
+ }
},
}
@@ -322,6 +335,10 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
'last 2 versions and not dead, > 0.3%, Firefox ESR'
isDebug && console.log(`[@vitejs/plugin-legacy] targets:`, targets)
+ modernTargets = options.modernTargets || modernTargetsBabel
+ isDebug &&
+ console.log(`[@vitejs/plugin-legacy] modernTargets:`, modernTargets)
+
const getLegacyOutputFileName = (
fileNames:
| string
@@ -394,7 +411,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
genModern
) {
// analyze and record modern polyfills
- await detectPolyfills(raw, modernTargetsBabel, modernPolyfills)
+ await detectPolyfills(raw, modernTargets, modernPolyfills)
}
const ms = new MagicString(raw)
diff --git a/packages/plugin-legacy/src/types.ts b/packages/plugin-legacy/src/types.ts
index 954617d900d241..99e241c398c9eb 100644
--- a/packages/plugin-legacy/src/types.ts
+++ b/packages/plugin-legacy/src/types.ts
@@ -3,6 +3,10 @@ export interface Options {
* default: 'defaults'
*/
targets?: string | string[] | { [key: string]: string }
+ /**
+ * default: 'edge>=80, firefox>=72, chrome>=80, safari>=13.1, chromeAndroid>=80, iOS>=13.1'
+ */
+ modernTargets?: string | string[]
/**
* default: true
*/
diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md
index 6dbd590abef1f3..1ebd50b5229607 100644
--- a/packages/vite/CHANGELOG.md
+++ b/packages/vite/CHANGELOG.md
@@ -1,3 +1,204 @@
+## 5.1.0 (2024-02-08)
+
+* chore: revert #15746 (#15839) ([ed875f8](https://github.com/vitejs/vite/commit/ed875f8)), closes [#15746](https://github.com/vitejs/vite/issues/15746) [#15839](https://github.com/vitejs/vite/issues/15839)
+* fix: pass `customLogger` to `loadConfigFromFile` (fix #15824) (#15831) ([55a3427](https://github.com/vitejs/vite/commit/55a3427)), closes [#15824](https://github.com/vitejs/vite/issues/15824) [#15831](https://github.com/vitejs/vite/issues/15831)
+* fix(deps): update all non-major dependencies (#15803) ([e0a6ef2](https://github.com/vitejs/vite/commit/e0a6ef2)), closes [#15803](https://github.com/vitejs/vite/issues/15803)
+* refactor: remove `vite build --force` (#15837) ([f1a4242](https://github.com/vitejs/vite/commit/f1a4242)), closes [#15837](https://github.com/vitejs/vite/issues/15837)
+
+
+
+## 5.1.0-beta.7 (2024-02-07)
+
+* fix: disable fs.cachedChecks for custom watch ignore patterns (#15828) ([9070be3](https://github.com/vitejs/vite/commit/9070be3)), closes [#15828](https://github.com/vitejs/vite/issues/15828)
+* fix: judge next dirent cache type (#15787) ([5fbeba3](https://github.com/vitejs/vite/commit/5fbeba3)), closes [#15787](https://github.com/vitejs/vite/issues/15787)
+* fix: scan entries when the root is in node_modules (#15746) ([c3e83bb](https://github.com/vitejs/vite/commit/c3e83bb)), closes [#15746](https://github.com/vitejs/vite/issues/15746)
+* fix(config): improved warning when root path includes bad characters (#15761) ([1c0dc3d](https://github.com/vitejs/vite/commit/1c0dc3d)), closes [#15761](https://github.com/vitejs/vite/issues/15761)
+* docs: fix typos in CHANGELOG (#15825) ([3ee4e7b](https://github.com/vitejs/vite/commit/3ee4e7b)), closes [#15825](https://github.com/vitejs/vite/issues/15825)
+* perf: use transform cache by resolved id (#15785) ([78d838a](https://github.com/vitejs/vite/commit/78d838a)), closes [#15785](https://github.com/vitejs/vite/issues/15785)
+* chore: release notes (#15777) ([775bb50](https://github.com/vitejs/vite/commit/775bb50)), closes [#15777](https://github.com/vitejs/vite/issues/15777)
+
+
+
+## 5.1.0-beta.6 (2024-02-01)
+
+### Vite Runtime API
+
+Vite 5.1 adds experimental support for a new Vite Runtime API. It allows running any code by processing it with Vite plugins first. It is different from `server.ssrLoadModule` because the runtime implementation is decoupled from the server. This lets library and framework authors to implement their own layer of communication between the server and the runtime. This new API is intended to replace Vite's current SSR primitives once it is stable. Apart from this flexibility, Vite will finally support HMR for SSR. Read more in the [Vite Runtime API guide](https://main.vitejs.dev/guide/api-vite-runtime) and [give us feedback](https://github.com/vitejs/vite/discussions/15774).
+
+* feat: experimental Vite Runtime API (#12165) ([8b3ab07](https://github.com/vitejs/vite/commit/8b3ab07)), closes [#12165](https://github.com/vitejs/vite/issues/12165)
+
+### Unlocking downstream projects
+
+Vite 5.1 will add support for `.css?url`, that was the last remain hurdle in Remix move to Vite.
+
+* fix(css): `.css?url` support (#15259) ([ed56d96](https://github.com/vitejs/vite/commit/ed56d96)), closes [#15259](https://github.com/vitejs/vite/issues/15259)
+
+### Vite performance improvements
+
+Vite keeps getting faster on each release, and Vite 5.1 is packed with performance improvements. Vite now has opt-in support for running CSS preprocessors in threads. For a Vuetify 2 project, dev startup time was reduced by 40%.
+
+* perf: use thread for preprocessors (#13584) ([acd795f](https://github.com/vitejs/vite/commit/acd795f)), closes [#13584](https://github.com/vitejs/vite/issues/13584)
+
+There are also new tools to speed up dev server cold start. You can set `optimizeDeps.holdUntilCrawlEnd: false` to switch to a new strategy for deps optimization that may help in big projects. We're considering switching to this strategy by default in the future.
+
+* feat(optimizer): holdUntilCrawlEnd option (#15244) ([b7c6629](https://github.com/vitejs/vite/commit/b7c6629)), closes [#15244](https://github.com/vitejs/vite/issues/15244)
+
+The dev server had several perf gains in general too:
+
+* perf: middleware to short-circuit on 304 (#15586) ([35ae4f8](https://github.com/vitejs/vite/commit/35ae4f8)), closes [#15586](https://github.com/vitejs/vite/issues/15586)
+* perf: avoid parseRequest (#15617) ([0cacfad](https://github.com/vitejs/vite/commit/0cacfad)), closes [#15617](https://github.com/vitejs/vite/issues/15617)
+* feat(hmr): reload for circular imports only if error (#15118) ([6ace32b](https://github.com/vitejs/vite/commit/6ace32b)), closes [#15118](https://github.com/vitejs/vite/issues/15118)
+* feat: enable fs.cachedChecks by default (#15704) ([a05c709](https://github.com/vitejs/vite/commit/a05c709)), closes [#15704](https://github.com/vitejs/vite/issues/15704)
+
+### Deprecations
+
+We continue to reduce Vite's API surface where possible to make the project maintainable long term.
+
+* feat(glob-import): deprecate as option (#14420) ([953e697](https://github.com/vitejs/vite/commit/953e697)), closes [#14420](https://github.com/vitejs/vite/issues/14420)
+* refactor: remove build time pre-bundling (#15184) ([757844f](https://github.com/vitejs/vite/commit/757844f)), closes [#15184](https://github.com/vitejs/vite/issues/15184)
+
+
+### Commits in beta.6
+
+* feat: experimental Vite Runtime API (#12165) ([8b3ab07](https://github.com/vitejs/vite/commit/8b3ab07)), closes [#12165](https://github.com/vitejs/vite/issues/12165)
+* fix: add ref() and unref() to chokidar.d.ts for typescript build to work (#15706) ([6b45037](https://github.com/vitejs/vite/commit/6b45037)), closes [#15706](https://github.com/vitejs/vite/issues/15706)
+* perf: simplify explicit import mark in import analysis (#15724) ([2805b2d](https://github.com/vitejs/vite/commit/2805b2d)), closes [#15724](https://github.com/vitejs/vite/issues/15724)
+
+
+
+## 5.1.0-beta.5 (2024-01-27)
+
+* fix: do not init optimizer during build (#15727) ([a08f646](https://github.com/vitejs/vite/commit/a08f646)), closes [#15727](https://github.com/vitejs/vite/issues/15727)
+* fix(deps): update all non-major dependencies (#15675) ([4d9363a](https://github.com/vitejs/vite/commit/4d9363a)), closes [#15675](https://github.com/vitejs/vite/issues/15675)
+
+
+
+## 5.1.0-beta.4 (2024-01-26)
+
+* perf: lazy load rollup during dev (#15621) ([6f88a90](https://github.com/vitejs/vite/commit/6f88a90)), closes [#15621](https://github.com/vitejs/vite/issues/15621)
+* perf: use workspace root for fs cache (#15712) ([8815763](https://github.com/vitejs/vite/commit/8815763)), closes [#15712](https://github.com/vitejs/vite/issues/15712)
+* chore: remove unneeded normalizePath (#15713) ([92f2747](https://github.com/vitejs/vite/commit/92f2747)), closes [#15713](https://github.com/vitejs/vite/issues/15713)
+* chore(proxy): update proxy error info (#15678) ([09bd58d](https://github.com/vitejs/vite/commit/09bd58d)), closes [#15678](https://github.com/vitejs/vite/issues/15678)
+* feat: enable fs.cachedChecks by default (#15704) ([a05c709](https://github.com/vitejs/vite/commit/a05c709)), closes [#15704](https://github.com/vitejs/vite/issues/15704)
+* feat(optimizer): holdUntilCrawlEnd option (#15244) ([b7c6629](https://github.com/vitejs/vite/commit/b7c6629)), closes [#15244](https://github.com/vitejs/vite/issues/15244)
+* fix: normalize prettify url (#15705) ([98bc3dc](https://github.com/vitejs/vite/commit/98bc3dc)), closes [#15705](https://github.com/vitejs/vite/issues/15705)
+* fix: windows add/delete file ([3a7b650](https://github.com/vitejs/vite/commit/3a7b650))
+* fix(build): build error message output twice (#15664) ([74382b9](https://github.com/vitejs/vite/commit/74382b9)), closes [#15664](https://github.com/vitejs/vite/issues/15664)
+* fix(hmr): pass id in `parseImports` for better debugging DX (#15707) ([fb4bddc](https://github.com/vitejs/vite/commit/fb4bddc)), closes [#15707](https://github.com/vitejs/vite/issues/15707)
+* fix(node): remove timestamp query of `staticImportedUrls` (#15663) ([6c4bf26](https://github.com/vitejs/vite/commit/6c4bf26)), closes [#15663](https://github.com/vitejs/vite/issues/15663)
+* fix(preview): set isPreview true (#15695) ([93fce55](https://github.com/vitejs/vite/commit/93fce55)), closes [#15695](https://github.com/vitejs/vite/issues/15695)
+
+
+
+## 5.1.0-beta.3 (2024-01-22)
+
+* perf: middleware to short-circuit on 304 (#15586) ([35ae4f8](https://github.com/vitejs/vite/commit/35ae4f8)), closes [#15586](https://github.com/vitejs/vite/issues/15586)
+* perf: use thread for preprocessors (#13584) ([acd795f](https://github.com/vitejs/vite/commit/acd795f)), closes [#13584](https://github.com/vitejs/vite/issues/13584)
+* fix: default sideEffect option is delivered to rollup (#15665) ([f6cf3d1](https://github.com/vitejs/vite/commit/f6cf3d1)), closes [#15665](https://github.com/vitejs/vite/issues/15665)
+* fix(ssr): mark builtin modules as side effect free (#15658) ([526cf23](https://github.com/vitejs/vite/commit/526cf23)), closes [#15658](https://github.com/vitejs/vite/issues/15658)
+* fix(ssr): support externalized builtins for webworker (#15656) ([639bbd6](https://github.com/vitejs/vite/commit/639bbd6)), closes [#15656](https://github.com/vitejs/vite/issues/15656)
+* refactor: append tags logic in applyHtmlTransforms (#15647) ([09b1517](https://github.com/vitejs/vite/commit/09b1517)), closes [#15647](https://github.com/vitejs/vite/issues/15647)
+* refactor(hmr): provide a separate logger interface (#15631) ([110e2e1](https://github.com/vitejs/vite/commit/110e2e1)), closes [#15631](https://github.com/vitejs/vite/issues/15631)
+
+
+
+## 5.1.0-beta.2 (2024-01-19)
+
+* fix: fs deny for case insensitive systems (#15653) ([89be67d](https://github.com/vitejs/vite/commit/89be67d)), closes [#15653](https://github.com/vitejs/vite/issues/15653)
+* perf: don't recalculate path.dirname(mod.file) (#15623) ([e459be4](https://github.com/vitejs/vite/commit/e459be4)), closes [#15623](https://github.com/vitejs/vite/issues/15623)
+* perf: optimize getSortedPluginsByHook (#15624) ([f08a037](https://github.com/vitejs/vite/commit/f08a037)), closes [#15624](https://github.com/vitejs/vite/issues/15624)
+
+
+
+## 5.1.0-beta.1 (2024-01-18)
+
+* fix: handle namespace import and dynamic import interop consistently (#15619) ([ec8b420](https://github.com/vitejs/vite/commit/ec8b420)), closes [#15619](https://github.com/vitejs/vite/issues/15619)
+* fix(css): track dependencies from addWatchFile for HMR (#15608) ([dfcb83d](https://github.com/vitejs/vite/commit/dfcb83d)), closes [#15608](https://github.com/vitejs/vite/issues/15608)
+* fix(deps): update all non-major dependencies (#15603) ([109fb80](https://github.com/vitejs/vite/commit/109fb80)), closes [#15603](https://github.com/vitejs/vite/issues/15603)
+* fix(hmr): normalize env files path (#15584) ([d0f1d2e](https://github.com/vitejs/vite/commit/d0f1d2e)), closes [#15584](https://github.com/vitejs/vite/issues/15584)
+* fix(ssr): externalize network imports during `ssrLoadModule` (#15599) ([af2aa09](https://github.com/vitejs/vite/commit/af2aa09)), closes [#15599](https://github.com/vitejs/vite/issues/15599)
+* fix(types): mark hmr update internal types optional (#15606) ([df8f5a5](https://github.com/vitejs/vite/commit/df8f5a5)), closes [#15606](https://github.com/vitejs/vite/issues/15606)
+* perf: avoid parseRequest (#15617) ([0cacfad](https://github.com/vitejs/vite/commit/0cacfad)), closes [#15617](https://github.com/vitejs/vite/issues/15617)
+* perf: avoid performance.now() call (#15634) ([e43f7ee](https://github.com/vitejs/vite/commit/e43f7ee)), closes [#15634](https://github.com/vitejs/vite/issues/15634)
+* perf: do not bind plugin hook context functions (#15610) ([3b7e0c3](https://github.com/vitejs/vite/commit/3b7e0c3)), closes [#15610](https://github.com/vitejs/vite/issues/15610)
+* perf: don't recreate html hooks on each transform call (#15579) ([bdb826c](https://github.com/vitejs/vite/commit/bdb826c)), closes [#15579](https://github.com/vitejs/vite/issues/15579)
+* perf: simplify isHtmlProxy regex (#15590) ([644d120](https://github.com/vitejs/vite/commit/644d120)), closes [#15590](https://github.com/vitejs/vite/issues/15590)
+* feat: preview server add close method (#15630) ([947aa53](https://github.com/vitejs/vite/commit/947aa53)), closes [#15630](https://github.com/vitejs/vite/issues/15630)
+* feat: support multiple HMR clients on the server (#15340) ([bf1e9c2](https://github.com/vitejs/vite/commit/bf1e9c2)), closes [#15340](https://github.com/vitejs/vite/issues/15340)
+* feat(build): set `hoistTransitiveImports` to false in library builds (#15595) ([e6ebc7b](https://github.com/vitejs/vite/commit/e6ebc7b)), closes [#15595](https://github.com/vitejs/vite/issues/15595)
+* refactor: remove build time pre-bundling (#15184) ([757844f](https://github.com/vitejs/vite/commit/757844f)), closes [#15184](https://github.com/vitejs/vite/issues/15184)
+
+
+
+## 5.1.0-beta.0 (2024-01-15)
+
+* fix: await `configResolved` hooks of worker plugins (#15597) ([03c8004](https://github.com/vitejs/vite/commit/03c8004)), closes [#15597](https://github.com/vitejs/vite/issues/15597)
+* fix: hmr for env files, regression from #15365 (#15559) ([d1b143f](https://github.com/vitejs/vite/commit/d1b143f)), closes [#15365](https://github.com/vitejs/vite/issues/15365) [#15559](https://github.com/vitejs/vite/issues/15559)
+* fix: init dev ssr optimizer on server init (#15561) ([db28b92](https://github.com/vitejs/vite/commit/db28b92)), closes [#15561](https://github.com/vitejs/vite/issues/15561)
+* fix: only watch needed env files (#15365) ([476e572](https://github.com/vitejs/vite/commit/476e572)), closes [#15365](https://github.com/vitejs/vite/issues/15365)
+* fix: resolvedUrls is null in plugin's configureServer after server restart (#15450) ([653a48c](https://github.com/vitejs/vite/commit/653a48c)), closes [#15450](https://github.com/vitejs/vite/issues/15450)
+* fix: revert `package.json` change should trigger server restart (#15519) (#15558) ([9fc5d9c](https://github.com/vitejs/vite/commit/9fc5d9c)), closes [#15519](https://github.com/vitejs/vite/issues/15519) [#15558](https://github.com/vitejs/vite/issues/15558)
+* fix: set correct `isSsrBuild` value in dev (#15536) ([fdbe04d](https://github.com/vitejs/vite/commit/fdbe04d)), closes [#15536](https://github.com/vitejs/vite/issues/15536)
+* fix: update javascript mime type to text/javascript (#15427) ([a621de8](https://github.com/vitejs/vite/commit/a621de8)), closes [#15427](https://github.com/vitejs/vite/issues/15427)
+* fix(build): normalize html path (#15554) ([d0d5938](https://github.com/vitejs/vite/commit/d0d5938)), closes [#15554](https://github.com/vitejs/vite/issues/15554)
+* fix(css): @import with .css in node_modules importing a different package failed to resolve (#15000) ([8ccf722](https://github.com/vitejs/vite/commit/8ccf722)), closes [#15000](https://github.com/vitejs/vite/issues/15000)
+* fix(css): `.css?url` support (#15259) ([ed56d96](https://github.com/vitejs/vite/commit/ed56d96)), closes [#15259](https://github.com/vitejs/vite/issues/15259)
+* fix(css): skip url replace for function calls (#15544) ([21a52e6](https://github.com/vitejs/vite/commit/21a52e6)), closes [#15544](https://github.com/vitejs/vite/issues/15544)
+* fix(deps): update all non-major dependencies (#15375) ([ab56227](https://github.com/vitejs/vite/commit/ab56227)), closes [#15375](https://github.com/vitejs/vite/issues/15375)
+* fix(esbuild): update to tsconfck 3.0.1 to fix edge cases when resolving tsconfig.extends (#15502) ([1fcebeb](https://github.com/vitejs/vite/commit/1fcebeb)), closes [#15502](https://github.com/vitejs/vite/issues/15502)
+* fix(hmr): `package.json` change should trigger server restart (#15519) ([260ebbf](https://github.com/vitejs/vite/commit/260ebbf)), closes [#15519](https://github.com/vitejs/vite/issues/15519)
+* fix(hmr): make watcher ignore build.outDir (#15326) ([2836276](https://github.com/vitejs/vite/commit/2836276)), closes [#15326](https://github.com/vitejs/vite/issues/15326)
+* fix(hmr): propagate `fs.stat` failure for `hmrContext.read` (#15568) ([c6d240b](https://github.com/vitejs/vite/commit/c6d240b)), closes [#15568](https://github.com/vitejs/vite/issues/15568)
+* fix(sourcemap): sourcemap is incorrect when sourcemap has `sources: [null]` (#14588) ([f8c6a34](https://github.com/vitejs/vite/commit/f8c6a34)), closes [#14588](https://github.com/vitejs/vite/issues/14588)
+* feat: `build.assetsInlineLimit` callback (#15366) ([4d1342e](https://github.com/vitejs/vite/commit/4d1342e)), closes [#15366](https://github.com/vitejs/vite/issues/15366)
+* feat: add '*.m4a' to client.d.ts and constants (#15471) ([ebc37f6](https://github.com/vitejs/vite/commit/ebc37f6)), closes [#15471](https://github.com/vitejs/vite/issues/15471)
+* feat: add support for .vtt type (#15538) ([a5c6d3d](https://github.com/vitejs/vite/commit/a5c6d3d)), closes [#15538](https://github.com/vitejs/vite/issues/15538)
+* feat(glob-import): deprecate as option (#14420) ([953e697](https://github.com/vitejs/vite/commit/953e697)), closes [#14420](https://github.com/vitejs/vite/issues/14420)
+* feat(hmr): reload for circular imports only if error (#15118) ([6ace32b](https://github.com/vitejs/vite/commit/6ace32b)), closes [#15118](https://github.com/vitejs/vite/issues/15118)
+* feat(ssr): support external true (#10939) ([e451be2](https://github.com/vitejs/vite/commit/e451be2)), closes [#10939](https://github.com/vitejs/vite/issues/10939)
+* refactor: extract '_metadata.json' string to a constant (#15541) ([adda370](https://github.com/vitejs/vite/commit/adda370)), closes [#15541](https://github.com/vitejs/vite/issues/15541)
+* refactor: normalize publicDir when resolving config (#15360) ([ea5fdeb](https://github.com/vitejs/vite/commit/ea5fdeb)), closes [#15360](https://github.com/vitejs/vite/issues/15360)
+* refactor: remove json-stable-stringify (#15571) ([b9b0816](https://github.com/vitejs/vite/commit/b9b0816)), closes [#15571](https://github.com/vitejs/vite/issues/15571)
+* refactor: reuse existing node utils (#15480) ([17ab48a](https://github.com/vitejs/vite/commit/17ab48a)), closes [#15480](https://github.com/vitejs/vite/issues/15480)
+* refactor(hmr): keep buffer implementation internal, expose queueUpdate (#15486) ([c029efb](https://github.com/vitejs/vite/commit/c029efb)), closes [#15486](https://github.com/vitejs/vite/issues/15486)
+* perf: optimize logger (#15574) ([0fb9071](https://github.com/vitejs/vite/commit/0fb9071)), closes [#15574](https://github.com/vitejs/vite/issues/15574)
+* chore: avoid bundling resolve dep (#15570) ([ae49ac4](https://github.com/vitejs/vite/commit/ae49ac4)), closes [#15570](https://github.com/vitejs/vite/issues/15570)
+* chore(deps): update dependency postcss-import to v16 (#15533) ([36775c4](https://github.com/vitejs/vite/commit/36775c4)), closes [#15533](https://github.com/vitejs/vite/issues/15533)
+
+
+
+## 5.0.11 (2024-01-05)
+
+* fix: don't pretransform classic script links (#15361) ([19e3c9a](https://github.com/vitejs/vite/commit/19e3c9a)), closes [#15361](https://github.com/vitejs/vite/issues/15361)
+* fix: inject `__vite__mapDeps` code before sourcemap file comment (#15483) ([d2aa096](https://github.com/vitejs/vite/commit/d2aa096)), closes [#15483](https://github.com/vitejs/vite/issues/15483)
+* fix(assets): avoid splitting `,` inside base64 value of `srcset` attribute (#15422) ([8de7bd2](https://github.com/vitejs/vite/commit/8de7bd2)), closes [#15422](https://github.com/vitejs/vite/issues/15422)
+* fix(html): handle offset magic-string slice error (#15435) ([5ea9edb](https://github.com/vitejs/vite/commit/5ea9edb)), closes [#15435](https://github.com/vitejs/vite/issues/15435)
+* chore(deps): update dependency strip-literal to v2 (#15475) ([49d21fe](https://github.com/vitejs/vite/commit/49d21fe)), closes [#15475](https://github.com/vitejs/vite/issues/15475)
+* chore(deps): update tj-actions/changed-files action to v41 (#15476) ([2a540ee](https://github.com/vitejs/vite/commit/2a540ee)), closes [#15476](https://github.com/vitejs/vite/issues/15476)
+
+
+
+## 5.0.10 (2023-12-15)
+
+* fix: omit protocol does not require pre-transform (#15355) ([d9ae1b2](https://github.com/vitejs/vite/commit/d9ae1b2)), closes [#15355](https://github.com/vitejs/vite/issues/15355)
+* fix(build): use base64 for inline SVG if it contains both single and double quotes (#15271) ([1bbff16](https://github.com/vitejs/vite/commit/1bbff16)), closes [#15271](https://github.com/vitejs/vite/issues/15271)
+
+
+
+## 5.0.9 (2023-12-14)
+
+* fix: htmlFallbackMiddleware for favicon (#15301) ([c902545](https://github.com/vitejs/vite/commit/c902545)), closes [#15301](https://github.com/vitejs/vite/issues/15301)
+* fix: more stable hash calculation for depsOptimize (#15337) ([2b39fe6](https://github.com/vitejs/vite/commit/2b39fe6)), closes [#15337](https://github.com/vitejs/vite/issues/15337)
+* fix(scanner): catch all external files for glob imports (#15286) ([129d0d0](https://github.com/vitejs/vite/commit/129d0d0)), closes [#15286](https://github.com/vitejs/vite/issues/15286)
+* fix(server): avoid chokidar throttling on startup (#15347) ([56a5740](https://github.com/vitejs/vite/commit/56a5740)), closes [#15347](https://github.com/vitejs/vite/issues/15347)
+* fix(worker): replace `import.meta` correctly for IIFE worker (#15321) ([08d093c](https://github.com/vitejs/vite/commit/08d093c)), closes [#15321](https://github.com/vitejs/vite/issues/15321)
+* feat: log re-optimization reasons (#15339) ([b1a6c84](https://github.com/vitejs/vite/commit/b1a6c84)), closes [#15339](https://github.com/vitejs/vite/issues/15339)
+* chore: temporary typo (#15329) ([7b71854](https://github.com/vitejs/vite/commit/7b71854)), closes [#15329](https://github.com/vitejs/vite/issues/15329)
+* perf: avoid computing paths on each request (#15318) ([0506812](https://github.com/vitejs/vite/commit/0506812)), closes [#15318](https://github.com/vitejs/vite/issues/15318)
+* perf: temporary hack to avoid fs checks for /@react-refresh (#15299) ([b1d6211](https://github.com/vitejs/vite/commit/b1d6211)), closes [#15299](https://github.com/vitejs/vite/issues/15299)
+
+
+
## 5.0.8 (2023-12-12)
* perf: cached fs utils (#15279) ([c9b61c4](https://github.com/vitejs/vite/commit/c9b61c4)), closes [#15279](https://github.com/vitejs/vite/issues/15279)
diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md
index cdbe40a51014bb..8914a690d75577 100644
--- a/packages/vite/LICENSE.md
+++ b/packages/vite/LICENSE.md
@@ -463,28 +463,6 @@ License: MIT
By: Luke Edwards
Repository: lukeed/polka
-> The MIT License (MIT)
->
-> Copyright (c) Luke Edwards (https://lukeed.com)
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in
-> all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-> THE SOFTWARE.
-
---------------------------------------
## @rollup/plugin-alias
@@ -701,6 +679,36 @@ Repository: https://github.com/micromatch/anymatch
---------------------------------------
+## artichokie
+License: MIT
+By: sapphi-red, Evan You
+Repository: git+https://github.com/sapphi-red/artichokie.git
+
+> MIT License
+>
+> Copyright (c) 2020-present, Yuxi (Evan) You
+> Copyright (c) 2023-present, sapphi-red
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+---------------------------------------
+
## astring
License: MIT
By: David Bonnet
@@ -861,35 +869,6 @@ Repository: egoist/cac
---------------------------------------
-## call-bind
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/ljharb/call-bind.git
-
-> MIT License
->
-> Copyright (c) 2020 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## chokidar
License: MIT
By: Paul Miller, Elan Shanker
@@ -1129,35 +1108,6 @@ Repository: git://github.com/debug-js/debug.git
---------------------------------------
-## define-data-property
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/ljharb/define-data-property.git
-
-> MIT License
->
-> Copyright (c) 2023 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## define-lazy-prop
License: MIT
By: Sindre Sorhus
@@ -1623,33 +1573,6 @@ Repository: git+https://github.com/isaacs/fs.realpath.git
---------------------------------------
-## function-bind
-License: MIT
-By: Raynos, Jordan Harband
-Repository: https://github.com/Raynos/function-bind.git
-
-> Copyright (c) 2013 Raynos.
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in
-> all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-> THE SOFTWARE.
-
----------------------------------------
-
## generic-names
License: MIT
By: Alexey Litvinov
@@ -1679,35 +1602,6 @@ Repository: git+https://github.com/css-modules/generic-names.git
---------------------------------------
-## get-intrinsic
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/ljharb/get-intrinsic.git
-
-> MIT License
->
-> Copyright (c) 2020 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## glob
License: ISC
By: Isaac Z. Schlueter
@@ -1754,152 +1648,6 @@ Repository: gulpjs/glob-parent
---------------------------------------
-## gopd
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/ljharb/gopd.git
-
-> MIT License
->
-> Copyright (c) 2022 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
-## has
-License: MIT
-By: Thiago de Arruda, Jordan Harband
-Repository: git://github.com/tarruda/has.git
-
-> Copyright (c) 2013 Thiago de Arruda
->
-> Permission is hereby granted, free of charge, to any person
-> obtaining a copy of this software and associated documentation
-> files (the "Software"), to deal in the Software without
-> restriction, including without limitation the rights to use,
-> copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the
-> Software is furnished to do so, subject to the following
-> conditions:
->
-> The above copyright notice and this permission notice shall be
-> included in all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-> OTHER DEALINGS IN THE SOFTWARE.
-
----------------------------------------
-
-## has-property-descriptors
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/inspect-js/has-property-descriptors.git
-
-> MIT License
->
-> Copyright (c) 2022 Inspect JS
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
-## has-proto
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/inspect-js/has-proto.git
-
-> MIT License
->
-> Copyright (c) 2022 Inspect JS
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
-## has-symbols
-License: MIT
-By: Jordan Harband
-Repository: git://github.com/inspect-js/has-symbols.git
-
-> MIT License
->
-> Copyright (c) 2016 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## http-proxy
License: MIT
By: Charlie Robbins, jcrugzz
@@ -2134,35 +1882,6 @@ Repository: sindresorhus/is-wsl
---------------------------------------
-## isarray
-License: MIT
-By: Julian Gruber
-Repository: git://github.com/juliangruber/isarray.git
-
-> MIT License
->
-> Copyright (c) 2013 Julian Gruber
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## isexe
License: ISC
By: Isaac Z. Schlueter
@@ -2186,14 +1905,14 @@ Repository: git+https://github.com/isaacs/isexe.git
---------------------------------------
-## json-stable-stringify
+## js-tokens
License: MIT
-By: James Halliday
-Repository: git://github.com/ljharb/json-stable-stringify.git
+By: Simon Lydell
+Repository: lydell/js-tokens
-> MIT License
+> The MIT License (MIT)
>
-> Copyright (c) 2013 contributors
+> Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
@@ -2202,16 +1921,16 @@ Repository: git://github.com/ljharb/json-stable-stringify.git
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
---------------------------------------
@@ -2623,64 +2342,6 @@ Repository: sindresorhus/object-assign
---------------------------------------
-## object-keys
-License: MIT
-By: Jordan Harband, Raynos, Nathan Rajlich, Ivan Starkov, Gary Katsevman
-Repository: git://github.com/ljharb/object-keys.git
-
-> The MIT License (MIT)
->
-> Copyright (C) 2013 Jordan Harband
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in
-> all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-> THE SOFTWARE.
-
----------------------------------------
-
-## okie
-License: MIT
-By: Evan You
-Repository: git+https://github.com/yyx990803/okie.git
-
-> MIT License
->
-> Copyright (c) 2020-present, Yuxi (Evan) You
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## on-finished
License: MIT
By: Douglas Christopher Wilson, Jonathan Ong
@@ -3337,35 +2998,6 @@ Repository: git://github.com/feross/run-parallel.git
---------------------------------------
-## set-function-length
-License: MIT
-By: Jordan Harband
-Repository: git+https://github.com/ljharb/set-function-length.git
-
-> MIT License
->
-> Copyright (c) Jordan Harband and contributors
->
-> Permission is hereby granted, free of charge, to any person obtaining a copy
-> of this software and associated documentation files (the "Software"), to deal
-> in the Software without restriction, including without limitation the rights
-> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-> copies of the Software, and to permit persons to whom the Software is
-> furnished to do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be included in all
-> copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-> SOFTWARE.
-
----------------------------------------
-
## shebang-command
License: MIT
By: Kevin Mårtensson
diff --git a/packages/vite/client.d.ts b/packages/vite/client.d.ts
index 36982b457d0b2f..7d81044009215e 100644
--- a/packages/vite/client.d.ts
+++ b/packages/vite/client.d.ts
@@ -136,6 +136,14 @@ declare module '*.mov' {
const src: string
export default src
}
+declare module '*.m4a' {
+ const src: string
+ export default src
+}
+declare module '*.vtt' {
+ const src: string
+ export default src
+}
// fonts
declare module '*.woff' {
diff --git a/packages/vite/package.json b/packages/vite/package.json
index 04351ce7f6c459..0068946fa92063 100644
--- a/packages/vite/package.json
+++ b/packages/vite/package.json
@@ -1,6 +1,6 @@
{
"name": "vite",
- "version": "5.0.8",
+ "version": "5.1.0",
"type": "module",
"license": "MIT",
"author": "Evan You",
@@ -32,12 +32,23 @@
"./client": {
"types": "./client.d.ts"
},
+ "./runtime": {
+ "types": "./dist/node/runtime.d.ts",
+ "import": "./dist/node/runtime.js"
+ },
"./dist/client/*": "./dist/client/*",
"./types/*": {
"types": "./types/*"
},
"./package.json": "./package.json"
},
+ "typesVersions": {
+ "*": {
+ "runtime": [
+ "dist/node/runtime.d.ts"
+ ]
+ }
+ },
"files": [
"bin",
"dist",
@@ -64,7 +75,7 @@
"build": "rimraf dist && run-s build-bundle build-types",
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types": "run-s build-types-temp build-types-roll build-types-check",
- "build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
+ "build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node",
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
"build-types-check": "tsc --project tsconfig.check.json",
"typecheck": "tsc --noEmit",
@@ -75,7 +86,7 @@
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.19.3",
- "postcss": "^8.4.32",
+ "postcss": "^8.4.35",
"rollup": "^4.2.0"
},
"optionalDependencies": {
@@ -83,28 +94,29 @@
},
"devDependencies": {
"@ampproject/remapping": "^2.2.1",
- "@babel/parser": "^7.23.6",
- "@jridgewell/trace-mapping": "^0.3.20",
+ "@babel/parser": "^7.23.9",
+ "@jridgewell/trace-mapping": "^0.3.22",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
- "@rollup/plugin-json": "^6.0.1",
+ "@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
- "@rollup/plugin-typescript": "^11.1.5",
+ "@rollup/plugin-typescript": "^11.1.6",
"@rollup/pluginutils": "^5.1.0",
"@types/escape-html": "^1.0.4",
"@types/pnpapi": "^0.0.5",
- "acorn": "^8.11.2",
- "acorn-walk": "^8.3.1",
+ "acorn": "^8.11.3",
+ "acorn-walk": "^8.3.2",
+ "artichokie": "^0.2.0",
"cac": "^6.7.14",
- "chokidar": "^3.5.3",
+ "chokidar": "^3.6.0",
"connect": "^3.7.0",
"convert-source-map": "^2.0.0",
"cors": "^2.8.5",
"cross-spawn": "^7.0.3",
"debug": "^4.3.4",
"dep-types": "link:./src/types",
- "dotenv": "^16.3.1",
+ "dotenv": "^16.4.1",
"dotenv-expand": "^10.0.0",
"es-module-lexer": "^1.4.1",
"escape-html": "^1.0.3",
@@ -112,34 +124,32 @@
"etag": "^1.8.1",
"fast-glob": "^3.3.2",
"http-proxy": "^1.18.1",
- "json-stable-stringify": "^1.1.0",
"launch-editor-middleware": "^2.6.1",
- "lightningcss": "^1.22.1",
- "magic-string": "^0.30.5",
+ "lightningcss": "^1.23.0",
+ "magic-string": "^0.30.7",
"micromatch": "^4.0.5",
- "mlly": "^1.4.2",
- "mrmime": "^1.0.1",
- "okie": "^1.0.1",
+ "mlly": "^1.5.0",
+ "mrmime": "^2.0.0",
"open": "^8.4.2",
"parse5": "^7.1.2",
"periscopic": "^4.0.2",
"picocolors": "^1.0.0",
"picomatch": "^2.3.1",
- "postcss-import": "^15.1.0",
+ "postcss-import": "^16.0.0",
"postcss-load-config": "^4.0.2",
"postcss-modules": "^6.0.0",
"resolve.exports": "^2.0.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-license": "^3.2.0",
- "sirv": "^2.0.3",
+ "sirv": "^2.0.4",
"source-map-support": "^0.5.21",
"strip-ansi": "^7.1.0",
- "strip-literal": "^1.3.0",
- "tsconfck": "^3.0.0",
+ "strip-literal": "^2.0.0",
+ "tsconfck": "^3.0.2",
"tslib": "^2.6.2",
"types": "link:./types",
- "ufo": "^1.3.2",
- "ws": "^8.15.0"
+ "ufo": "^1.4.0",
+ "ws": "^8.16.0"
},
"peerDependencies": {
"@types/node": "^18.0.0 || >=20.0.0",
diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts
index 084712305e7c84..6fa03af49edef0 100644
--- a/packages/vite/rollup.config.ts
+++ b/packages/vite/rollup.config.ts
@@ -116,10 +116,6 @@ function createNodePlugins(
pattern: /require(?=\((configFile|'ts-node')\))/g,
replacement: `__require`,
},
- 'json-stable-stringify/index.js': {
- src: "require('jsonify')",
- replacement: 'JSON',
- },
// postcss-import uses the `resolve` dep if the `resolve` option is not passed.
// However, we always pass the `resolve` option. Remove this import to avoid
// bundling the `resolve` dep.
@@ -127,6 +123,10 @@ function createNodePlugins(
src: 'const resolveId = require("./lib/resolve-id")',
replacement: 'const resolveId = (id) => id',
},
+ 'postcss-import/lib/parse-styles.js': {
+ src: 'const resolveId = require("./resolve-id")',
+ replacement: 'const resolveId = (id) => id',
+ },
}),
commonjs({
@@ -153,6 +153,7 @@ function createNodeConfig(isProduction: boolean) {
index: path.resolve(__dirname, 'src/node/index.ts'),
cli: path.resolve(__dirname, 'src/node/cli.ts'),
constants: path.resolve(__dirname, 'src/node/constants.ts'),
+ runtime: path.resolve(__dirname, 'src/node/ssr/runtime/index.ts'),
},
output: {
...sharedNodeOptions.output,
@@ -196,7 +197,7 @@ function createCjsConfig(isProduction: boolean) {
...Object.keys(pkg.dependencies),
...(isProduction ? [] : Object.keys(pkg.devDependencies)),
],
- plugins: [...createNodePlugins(false, false, false), bundleSizeLimit(163)],
+ plugins: [...createNodePlugins(false, false, false), bundleSizeLimit(165)],
})
}
@@ -299,7 +300,12 @@ const __require = require;
name: 'cjs-chunk-patch',
renderChunk(code, chunk) {
if (!chunk.fileName.includes('chunks/dep-')) return
-
+ // don't patch runtime utils chunk because it should stay lightweight and we know it doesn't use require
+ if (
+ chunk.name === 'utils' &&
+ chunk.moduleIds.some((id) => id.endsWith('/ssr/runtime/utils.ts'))
+ )
+ return
const match = code.match(/^(?:import[\s\S]*?;\s*)+/)
const index = match ? match.index! + match[0].length : 0
const s = new MagicString(code)
@@ -321,18 +327,22 @@ const __require = require;
* @param limit size in kB
*/
function bundleSizeLimit(limit: number): Plugin {
+ let size = 0
+
return {
name: 'bundle-limit',
- generateBundle(options, bundle) {
- const size = Buffer.byteLength(
+ generateBundle(_, bundle) {
+ size = Buffer.byteLength(
Object.values(bundle)
.map((i) => ('code' in i ? i.code : ''))
.join(''),
'utf-8',
)
+ },
+ closeBundle() {
const kb = size / 1000
if (kb > limit) {
- throw new Error(
+ this.error(
`Bundle size exceeded ${limit} kB, current size is ${kb.toFixed(
2,
)}kb.`,
diff --git a/packages/vite/rollup.dts.config.ts b/packages/vite/rollup.dts.config.ts
index 7eb0663271711f..6c4b84c6f914e1 100644
--- a/packages/vite/rollup.dts.config.ts
+++ b/packages/vite/rollup.dts.config.ts
@@ -13,19 +13,24 @@ const pkg = JSON.parse(
readFileSync(new URL('./package.json', import.meta.url)).toString(),
)
+const external = [
+ /^node:*/,
+ 'rollup/parseAst',
+ ...Object.keys(pkg.dependencies),
+ // lightningcss types are bundled
+ ...Object.keys(pkg.devDependencies).filter((d) => d !== 'lightningcss'),
+]
+
export default defineConfig({
- input: './temp/node/index.d.ts',
+ input: {
+ index: './temp/node/index.d.ts',
+ runtime: './temp/node/ssr/runtime/index.d.ts',
+ },
output: {
- file: './dist/node/index.d.ts',
- format: 'es',
+ dir: './dist/node',
+ format: 'esm',
},
- external: [
- /^node:*/,
- 'rollup/parseAst',
- ...Object.keys(pkg.dependencies),
- // lightningcss types are bundled
- ...Object.keys(pkg.devDependencies).filter((d) => d !== 'lightningcss'),
- ],
+ external,
plugins: [patchTypes(), dts({ respectExternal: true })],
})
@@ -84,15 +89,38 @@ function patchTypes(): Plugin {
}
},
renderChunk(code, chunk) {
- validateChunkImports.call(this, chunk)
- code = replaceConfusingTypeNames.call(this, code, chunk)
- code = stripInternalTypes.call(this, code, chunk)
- code = cleanUnnecessaryComments(code)
+ if (
+ chunk.fileName.startsWith('runtime') ||
+ chunk.fileName.startsWith('types.d-')
+ ) {
+ validateRuntimeChunk.call(this, chunk)
+ } else {
+ validateChunkImports.call(this, chunk)
+ code = replaceConfusingTypeNames.call(this, code, chunk)
+ code = stripInternalTypes.call(this, code, chunk)
+ code = cleanUnnecessaryComments(code)
+ }
return code
},
}
}
+/**
+ * Runtime chunk should only import local dependencies to stay lightweight
+ */
+function validateRuntimeChunk(this: PluginContext, chunk: RenderedChunk) {
+ for (const id of chunk.imports) {
+ if (
+ !id.startsWith('./') &&
+ !id.startsWith('../') &&
+ !id.startsWith('types.d')
+ ) {
+ this.warn(`${chunk.fileName} imports "${id}" which is not allowed`)
+ process.exitCode = 1
+ }
+ }
+}
+
/**
* Validate that chunk imports do not import dev deps
*/
@@ -103,6 +131,7 @@ function validateChunkImports(this: PluginContext, chunk: RenderedChunk) {
!id.startsWith('./') &&
!id.startsWith('../') &&
!id.startsWith('node:') &&
+ !id.startsWith('types.d') &&
!deps.includes(id) &&
!deps.some((name) => id.startsWith(name + '/'))
) {
diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts
index 41dcebc5e27a3c..aaea3300bf2619 100644
--- a/packages/vite/src/client/client.ts
+++ b/packages/vite/src/client/client.ts
@@ -30,7 +30,6 @@ const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${
}${__HMR_BASE__}`
const directSocketHost = __HMR_DIRECT_TARGET__
const base = __BASE__ || '/'
-const messageBuffer: string[] = []
let socket: WebSocket
try {
@@ -134,27 +133,45 @@ const debounceReload = (time: number) => {
}
const pageReload = debounceReload(50)
-const hmrClient = new HMRClient(console, async function importUpdatedModule({
- acceptedPath,
- timestamp,
- explicitImportRequired,
-}) {
- const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`)
- return await import(
- /* @vite-ignore */
- base +
- acceptedPathWithoutQuery.slice(1) +
- `?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${
- query ? `&${query}` : ''
- }`
- )
-})
+const hmrClient = new HMRClient(
+ console,
+ {
+ isReady: () => socket && socket.readyState === 1,
+ send: (message) => socket.send(message),
+ },
+ async function importUpdatedModule({
+ acceptedPath,
+ timestamp,
+ explicitImportRequired,
+ isWithinCircularImport,
+ }) {
+ const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`)
+ const importPromise = import(
+ /* @vite-ignore */
+ base +
+ acceptedPathWithoutQuery.slice(1) +
+ `?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${
+ query ? `&${query}` : ''
+ }`
+ )
+ if (isWithinCircularImport) {
+ importPromise.catch(() => {
+ console.info(
+ `[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. ` +
+ `To debug and break the circular import, you can run \`vite --debug hmr\` to log the circular dependency path if a file change triggered it.`,
+ )
+ pageReload()
+ })
+ }
+ return await importPromise
+ },
+)
async function handleMessage(payload: HMRPayload) {
switch (payload.type) {
case 'connected':
console.debug(`[vite] connected.`)
- sendMessageBuffer()
+ hmrClient.messenger.flush()
// proxy(nginx, docker) hmr ws maybe caused timeout,
// so send ping package let ws keep alive.
setInterval(() => {
@@ -179,7 +196,7 @@ async function handleMessage(payload: HMRPayload) {
await Promise.all(
payload.updates.map(async (update): Promise => {
if (update.type === 'js-update') {
- return queueUpdate(hmrClient.fetchUpdate(update))
+ return hmrClient.queueUpdate(update)
}
// css-update
@@ -295,26 +312,6 @@ function hasErrorOverlay() {
return document.querySelectorAll(overlayId).length
}
-let pending = false
-let queued: Promise<(() => void) | undefined>[] = []
-
-/**
- * buffer multiple hot updates triggered by the same src change
- * so that they are invoked in the same order they were sent.
- * (otherwise the order may be inconsistent because of the http request round trip)
- */
-async function queueUpdate(p: Promise<(() => void) | undefined>) {
- queued.push(p)
- if (!pending) {
- pending = true
- await Promise.resolve()
- pending = false
- const loading = [...queued]
- queued = []
- ;(await Promise.all(loading)).forEach((fn) => fn && fn())
- }
-}
-
async function waitForSuccessfulPing(
socketProtocol: string,
hostAndPath: string,
@@ -424,22 +421,8 @@ export function removeStyle(id: string): void {
}
}
-function sendMessageBuffer() {
- if (socket.readyState === 1) {
- messageBuffer.forEach((msg) => socket.send(msg))
- messageBuffer.length = 0
- }
-}
-
export function createHotContext(ownerPath: string): ViteHotContext {
- return new HMRContext(ownerPath, hmrClient, {
- addBuffer(message) {
- messageBuffer.push(message)
- },
- send() {
- sendMessageBuffer()
- },
- })
+ return new HMRContext(hmrClient, ownerPath)
}
/**
diff --git a/packages/vite/src/node/__tests__/build.spec.ts b/packages/vite/src/node/__tests__/build.spec.ts
index 1b632a8b20fdcf..2dad85578812cc 100644
--- a/packages/vite/src/node/__tests__/build.spec.ts
+++ b/packages/vite/src/node/__tests__/build.spec.ts
@@ -1,4 +1,4 @@
-import { resolve } from 'node:path'
+import { basename, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import colors from 'picocolors'
import { describe, expect, test, vi } from 'vitest'
@@ -102,6 +102,51 @@ describe('build', () => {
])
assertOutputHashContentChange(result[0], result[1])
})
+
+ test('external modules should not be hoisted in library build', async () => {
+ const [esBundle] = (await build({
+ logLevel: 'silent',
+ build: {
+ lib: {
+ entry: ['foo.js', 'bar.js'],
+ formats: ['es'],
+ },
+ rollupOptions: {
+ external: 'external',
+ },
+ write: false,
+ },
+ plugins: [
+ {
+ name: 'test',
+ resolveId(id) {
+ const name = basename(id)
+ if (name === 'foo.js' || name === 'bar.js') {
+ return name
+ }
+ },
+ load(id) {
+ if (id === 'foo.js') {
+ return `
+ import bar from 'bar.js'
+ export default bar()
+ `
+ }
+ if (id === 'bar.js') {
+ return `
+ import ext from 'external';
+ export default ext();`
+ }
+ },
+ },
+ ],
+ })) as RollupOutput[]
+
+ const foo = esBundle.output.find(
+ (chunk) => chunk.fileName === 'foo.js',
+ ) as OutputChunk
+ expect(foo.code).not.contains('import "external"')
+ })
})
const baseLibOptions: LibraryOptions = {
diff --git a/packages/vite/src/node/__tests__/config.spec.ts b/packages/vite/src/node/__tests__/config.spec.ts
index 3d5728f86cea4f..933f92995298a7 100644
--- a/packages/vite/src/node/__tests__/config.spec.ts
+++ b/packages/vite/src/node/__tests__/config.spec.ts
@@ -3,7 +3,7 @@ import type { InlineConfig } from '..'
import type { PluginOption, UserConfig, UserConfigExport } from '../config'
import { defineConfig, resolveConfig } from '../config'
import { resolveEnvPrefix } from '../env'
-import { mergeConfig } from '../publicUtils'
+import { createLogger, mergeConfig } from '../publicUtils'
describe('mergeConfig', () => {
test('handles configs with different alias schemas', () => {
@@ -332,4 +332,17 @@ describe('resolveConfig', () => {
expect(results1.clearScreen).toBe(false)
expect(results2.clearScreen).toBe(false)
})
+
+ test('resolveConfig with root path including "#" and "?" should warn ', async () => {
+ expect.assertions(1)
+
+ const logger = createLogger('info')
+ logger.warn = (str) => {
+ expect(str).to.include(
+ 'Consider renaming the directory to remove the characters',
+ )
+ }
+
+ await resolveConfig({ root: './inc?ud#s', customLogger: logger }, 'build')
+ })
})
diff --git a/packages/vite/src/node/__tests__/plugins/dynamicImportVar/__snapshots__/parse.spec.ts.snap b/packages/vite/src/node/__tests__/plugins/dynamicImportVar/__snapshots__/parse.spec.ts.snap
index eae151fbc6a025..1ab7e73b372ea2 100644
--- a/packages/vite/src/node/__tests__/plugins/dynamicImportVar/__snapshots__/parse.spec.ts.snap
+++ b/packages/vite/src/node/__tests__/plugins/dynamicImportVar/__snapshots__/parse.spec.ts.snap
@@ -1,10 +1,10 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`parse positives > ? in url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"as":"url","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
+exports[`parse positives > ? in url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"query":"?url","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
-exports[`parse positives > ? in variables 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"raw","import":"*"})), \`./mods/\${base ?? foo}.js\`)"`;
+exports[`parse positives > ? in variables 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":"?raw","import":"*"})), \`./mods/\${base ?? foo}.js\`)"`;
-exports[`parse positives > ? in worker 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"as":"worker","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
+exports[`parse positives > ? in worker 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"query":"?worker","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
exports[`parse positives > alias path 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js")), \`./mods/\${base}.js\`)"`;
@@ -14,8 +14,8 @@ exports[`parse positives > with ../ and itself 1`] = `"__variableDynamicImportRu
exports[`parse positives > with multi ../ and itself 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("../../plugins/dynamicImportVar/*.js")), \`./\${name}.js\`)"`;
-exports[`parse positives > with query 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":{"foo":"bar"}})), \`./mods/\${base}.js\`)"`;
+exports[`parse positives > with query 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":"?foo=bar"})), \`./mods/\${base}.js\`)"`;
-exports[`parse positives > with query raw 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"raw","import":"*"})), \`./mods/\${base}.js\`)"`;
+exports[`parse positives > with query raw 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":"?raw","import":"*"})), \`./mods/\${base}.js\`)"`;
-exports[`parse positives > with query url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"url","import":"*"})), \`./mods/\${base}.js\`)"`;
+exports[`parse positives > with query url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":"?url","import":"*"})), \`./mods/\${base}.js\`)"`;
diff --git a/packages/vite/src/node/__tests__/plugins/import.spec.ts b/packages/vite/src/node/__tests__/plugins/import.spec.ts
index 679d5bdb3d0a38..764b1ab3d187b0 100644
--- a/packages/vite/src/node/__tests__/plugins/import.spec.ts
+++ b/packages/vite/src/node/__tests__/plugins/import.spec.ts
@@ -74,7 +74,7 @@ describe('transformCjsImport', () => {
),
).toBe(
'import __vite__cjsImport0_react from "./node_modules/.vite/deps/react.js"; ' +
- 'const react = __vite__cjsImport0_react',
+ `const react = ((m) => m?.__esModule ? m : { ...typeof m === "object" && !Array.isArray(m) ? m : {}, default: m })(__vite__cjsImport0_react)`,
)
})
diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.spec.ts.snap b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.spec.ts.snap
index cb45d521897491..2eabd1ee2b4e0e 100644
--- a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.spec.ts.snap
+++ b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.spec.ts.snap
@@ -38,6 +38,7 @@ export const customQueryObject = /* #__PURE__ */ Object.assign({"./sibling.ts":
});
export const parent = /* #__PURE__ */ Object.assign({
+
});
export const rootMixedRelative = /* #__PURE__ */ Object.assign({"/css.spec.ts": () => import("../../css.spec.ts?url").then(m => m["default"]),"/define.spec.ts": () => import("../../define.spec.ts?url").then(m => m["default"]),"/esbuild.spec.ts": () => import("../../esbuild.spec.ts?url").then(m => m["default"]),"/import.spec.ts": () => import("../../import.spec.ts?url").then(m => m["default"]),"/importGlob/fixture-b/a.ts": () => import("../fixture-b/a.ts?url").then(m => m["default"]),"/importGlob/fixture-b/b.ts": () => import("../fixture-b/b.ts?url").then(m => m["default"]),"/importGlob/fixture-b/index.ts": () => import("../fixture-b/index.ts?url").then(m => m["default"]),"/json.spec.ts": () => import("../../json.spec.ts?url").then(m => m["default"])
@@ -92,6 +93,7 @@ export const customQueryObject = /* #__PURE__ */ Object.assign({"./sibling.ts":
});
export const parent = /* #__PURE__ */ Object.assign({
+
});
export const rootMixedRelative = /* #__PURE__ */ Object.assign({"/css.spec.ts": () => import("../../css.spec.ts?url&lang.ts").then(m => m["default"]),"/define.spec.ts": () => import("../../define.spec.ts?url&lang.ts").then(m => m["default"]),"/esbuild.spec.ts": () => import("../../esbuild.spec.ts?url&lang.ts").then(m => m["default"]),"/import.spec.ts": () => import("../../import.spec.ts?url&lang.ts").then(m => m["default"]),"/importGlob/fixture-b/a.ts": () => import("../fixture-b/a.ts?url&lang.ts").then(m => m["default"]),"/importGlob/fixture-b/b.ts": () => import("../fixture-b/b.ts?url&lang.ts").then(m => m["default"]),"/importGlob/fixture-b/index.ts": () => import("../fixture-b/index.ts?url&lang.ts").then(m => m["default"]),"/json.spec.ts": () => import("../../json.spec.ts?url&lang.ts").then(m => m["default"])
diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts b/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts
index 49b203c3ae093f..8a2311051a8d09 100644
--- a/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts
+++ b/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts
@@ -23,12 +23,12 @@ export const namedDefault = import.meta.glob('./modules/*.ts', {
export const eagerAs = import.meta.glob(
['./modules/*.ts', '!**/index.ts'],
- { eager: true, as: 'raw' },
+ { eager: true, query: '?raw', import: 'default' },
)
export const rawImportModule = import.meta.glob(
['./modules/*.ts', '!**/index.ts'],
- { as: 'raw', import: '*' },
+ { query: '?raw', import: '*' },
)
export const excludeSelf = import.meta.glob(
@@ -49,12 +49,13 @@ export const customQueryObject = import.meta.glob('./*.ts', {
})
export const parent = import.meta.glob('../../playground/src/*.ts', {
- as: 'url',
+ query: '?url',
+ import: 'default',
})
export const rootMixedRelative = import.meta.glob(
['/*.ts', '../fixture-b/*.ts'],
- { as: 'url' },
+ { query: '?url', import: 'default' },
)
export const cleverCwd1 = import.meta.glob(
diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts b/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts
index 58b357ed357630..e5ebe729d96504 100644
--- a/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts
+++ b/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts
@@ -133,10 +133,7 @@ describe('parse positives', async () => {
"/dir/**",
],
"options": {
- "query": {
- "foo": "bar",
- "raw": true,
- },
+ "query": "?foo=bar&raw=true",
},
"start": 21,
},
diff --git a/packages/vite/src/node/__tests__/utils.spec.ts b/packages/vite/src/node/__tests__/utils.spec.ts
index 5b3794a6f9cee4..3efdbdd77c2409 100644
--- a/packages/vite/src/node/__tests__/utils.spec.ts
+++ b/packages/vite/src/node/__tests__/utils.spec.ts
@@ -332,6 +332,12 @@ describe('processSrcSetSync', () => {
),
).toBe('/base/nested/asset.png 1x, /base/nested/asset.png 2x')
})
+
+ test('should not split the comma inside base64 value', async () => {
+ const base64 =
+ 'data:image/avif;base64,aA+/0= 400w, data:image/avif;base64,bB+/9= 800w'
+ expect(processSrcSetSync(base64, ({ url }) => url)).toBe(base64)
+ })
})
describe('flattenId', () => {
diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts
index 9525809419114d..ea8ff1f8826af8 100644
--- a/packages/vite/src/node/build.ts
+++ b/packages/vite/src/node/build.ts
@@ -22,11 +22,12 @@ import type { RollupCommonJSOptions } from 'dep-types/commonjs'
import type { RollupDynamicImportVarsOptions } from 'dep-types/dynamicImportVars'
import type { TransformOptions } from 'esbuild'
import type { InlineConfig, ResolvedConfig } from './config'
-import { isDepsOptimizerEnabled, resolveConfig } from './config'
+import { resolveConfig } from './config'
import { buildReporterPlugin } from './plugins/reporter'
import { buildEsbuildPlugin } from './plugins/esbuild'
import { type TerserOptions, terserPlugin } from './plugins/terser'
import {
+ arraify,
asyncFlatten,
copyDir,
emptyDir,
@@ -40,11 +41,14 @@ import type { Logger } from './logger'
import { dataURIPlugin } from './plugins/dataUri'
import { buildImportAnalysisPlugin } from './plugins/importAnalysisBuild'
import { ssrManifestPlugin } from './ssr/ssrManifestPlugin'
-import { initDepsOptimizer } from './optimizer'
import { loadFallbackPlugin } from './plugins/loadFallback'
import { findNearestPackageData } from './packages'
import type { PackageCache } from './packages'
-import { ESBUILD_MODULES_TARGET, VERSION } from './constants'
+import {
+ DEFAULT_ASSETS_INLINE_LIMIT,
+ ESBUILD_MODULES_TARGET,
+ VERSION,
+} from './constants'
import { resolveChokidarOptions } from './watch'
import { completeSystemWrapPlugin } from './plugins/completeSystemWrap'
import { mergeConfig } from './publicUtils'
@@ -100,7 +104,9 @@ export interface BuildOptions {
* base64 strings. Default limit is `4096` (4 KiB). Set to `0` to disable.
* @default 4096
*/
- assetsInlineLimit?: number
+ assetsInlineLimit?:
+ | number
+ | ((filePath: string, content: Buffer) => boolean | undefined)
/**
* Whether to code-split CSS. When enabled, CSS in async chunks will be
* inlined as strings in the chunk and inserted via dynamically created
@@ -324,7 +330,7 @@ export function resolveBuildOptions(
const defaultBuildOptions: BuildOptions = {
outDir: 'dist',
assetsDir: 'assets',
- assetsInlineLimit: 4096,
+ assetsInlineLimit: DEFAULT_ASSETS_INLINE_LIMIT,
cssCodeSplit: !raw?.lib,
sourcemap: false,
rollupOptions: {},
@@ -427,13 +433,9 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
completeSystemWrapPlugin(),
...(usePluginCommonjs ? [commonjsPlugin(options.commonjsOptions)] : []),
dataURIPlugin(),
- ...((
- await asyncFlatten(
- Array.isArray(rollupOptionsPlugins)
- ? rollupOptionsPlugins
- : [rollupOptionsPlugins],
- )
- ).filter(Boolean) as Plugin[]),
+ ...((await asyncFlatten(arraify(rollupOptionsPlugins))).filter(
+ Boolean,
+ ) as Plugin[]),
...(config.isWorker ? [webWorkerPostPlugin()] : []),
],
post: [
@@ -521,10 +523,6 @@ export async function build(
ssr ? config.plugins.map((p) => injectSsrFlagToHooks(p)) : config.plugins
) as Plugin[]
- if (isDepsOptimizerEnabled(config, ssr)) {
- await initDepsOptimizer(config)
- }
-
const rollupOptions: RollupOptions = {
preserveEntrySignatures: ssr
? 'allow-extension'
@@ -541,7 +539,7 @@ export async function build(
},
}
- const outputBuildError = (e: RollupError) => {
+ const mergeRollupError = (e: RollupError) => {
let msg = colors.red((e.plugin ? `[${e.plugin}] ` : '') + e.message)
if (e.id) {
msg += `\nfile: ${colors.cyan(
@@ -551,6 +549,11 @@ export async function build(
if (e.frame) {
msg += `\n` + colors.yellow(e.frame)
}
+ return msg
+ }
+
+ const outputBuildError = (e: RollupError) => {
+ const msg = mergeRollupError(e)
clearLine()
config.logger.error(msg, { error: e })
}
@@ -600,6 +603,7 @@ export async function build(
exports: 'auto',
sourcemap: options.sourcemap,
name: libOptions ? libOptions.name : undefined,
+ hoistTransitiveImports: libOptions ? false : undefined,
// es2015 enables `generatedCode.symbols`
// - #764 add `Symbol.toStringTag` when build es module into cjs chunk
// - #1048 add `Symbol.toStringTag` for module default export
@@ -700,7 +704,8 @@ export async function build(
}
return Array.isArray(outputs) ? res : res[0]
} catch (e) {
- outputBuildError(e)
+ e.message = mergeRollupError(e)
+ clearLine()
throw e
} finally {
if (bundle) await bundle.close()
diff --git a/packages/vite/src/node/cli.ts b/packages/vite/src/node/cli.ts
index 86557164e05b3d..08963f29081412 100644
--- a/packages/vite/src/node/cli.ts
+++ b/packages/vite/src/node/cli.ts
@@ -258,10 +258,6 @@ cli
)
.option('--manifest [name]', `[boolean | string] emit build manifest json`)
.option('--ssrManifest [name]', `[boolean | string] emit ssr manifest json`)
- .option(
- '--force',
- `[boolean] force the optimizer to ignore the cache and re-bundle (experimental)`,
- )
.option(
'--emptyOutDir',
`[boolean] force empty outDir when it's outside of root`,
@@ -280,7 +276,6 @@ cli
configFile: options.config,
logLevel: options.logLevel,
clearScreen: options.clearScreen,
- optimizeDeps: { force: options.force },
build: buildOptions,
})
} catch (e) {
diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts
index a8d61f03a5a090..e236c97541a3f5 100644
--- a/packages/vite/src/node/config.ts
+++ b/packages/vite/src/node/config.ts
@@ -398,6 +398,34 @@ export type ResolveFn = (
ssr?: boolean,
) => Promise
+/**
+ * Check and warn if `path` includes characters that don't work well in Vite,
+ * such as `#` and `?`.
+ */
+function checkBadCharactersInPath(path: string, logger: Logger): void {
+ const badChars = []
+
+ if (path.includes('#')) {
+ badChars.push('#')
+ }
+ if (path.includes('?')) {
+ badChars.push('?')
+ }
+
+ if (badChars.length > 0) {
+ const charString = badChars.map((c) => `"${c}"`).join(' and ')
+ const inflectedChars = badChars.length > 1 ? 'characters' : 'character'
+
+ logger.warn(
+ colors.yellow(
+ `The project root contains the ${charString} ${inflectedChars} (${colors.cyan(
+ path,
+ )}), which may not work when running Vite. Consider renaming the directory to remove the characters.`,
+ ),
+ )
+ }
+}
+
export async function resolveConfig(
inlineConfig: InlineConfig,
command: 'build' | 'serve',
@@ -420,7 +448,7 @@ export async function resolveConfig(
const configEnv: ConfigEnv = {
mode,
command,
- isSsrBuild: !!config.build?.ssr,
+ isSsrBuild: command === 'build' && !!config.build?.ssr,
isPreview,
}
@@ -431,6 +459,7 @@ export async function resolveConfig(
configFile,
config.root,
config.logLevel,
+ config.customLogger,
)
if (loadResult) {
config = mergeConfig(loadResult.config, config)
@@ -467,20 +496,6 @@ export async function resolveConfig(
const userPlugins = [...prePlugins, ...normalPlugins, ...postPlugins]
config = await runConfigHook(config, userPlugins, configEnv)
- // If there are custom commonjsOptions, don't force optimized deps for this test
- // even if the env var is set as it would interfere with the playground specs.
- if (
- !config.build?.commonjsOptions &&
- process.env.VITE_TEST_WITHOUT_PLUGIN_COMMONJS
- ) {
- config = mergeConfig(config, {
- optimizeDeps: { disabled: false },
- ssr: { optimizeDeps: { disabled: false } },
- })
- config.build ??= {}
- config.build.commonjsOptions = { include: [] }
- }
-
// Define logger
const logger = createLogger(config.logLevel, {
allowClearScreen: config.clearScreen,
@@ -491,15 +506,8 @@ export async function resolveConfig(
const resolvedRoot = normalizePath(
config.root ? path.resolve(config.root) : process.cwd(),
)
- if (resolvedRoot.includes('#')) {
- logger.warn(
- colors.yellow(
- `The project root contains the "#" character (${colors.cyan(
- resolvedRoot,
- )}), which may not work when running Vite. Consider renaming the directory to remove the "#".`,
- ),
- )
- }
+
+ checkBadCharactersInPath(resolvedRoot, logger)
const clientAlias = [
{
@@ -651,9 +659,11 @@ export async function resolveConfig(
const { publicDir } = config
const resolvedPublicDir =
publicDir !== false && publicDir !== ''
- ? path.resolve(
- resolvedRoot,
- typeof publicDir === 'string' ? publicDir : 'public',
+ ? normalizePath(
+ path.resolve(
+ resolvedRoot,
+ typeof publicDir === 'string' ? publicDir : 'public',
+ ),
)
: ''
@@ -718,9 +728,11 @@ export async function resolveConfig(
)
// run configResolved hooks
- createPluginHookUtils(resolvedWorkerPlugins)
- .getSortedPluginHooks('configResolved')
- .map((hook) => hook(workerResolved))
+ await Promise.all(
+ createPluginHookUtils(resolvedWorkerPlugins)
+ .getSortedPluginHooks('configResolved')
+ .map((hook) => hook(workerResolved)),
+ )
return resolvedWorkerPlugins
}
@@ -776,7 +788,7 @@ export async function resolveConfig(
packageCache,
createResolver,
optimizeDeps: {
- disabled: 'build',
+ holdUntilCrawlEnd: true,
...optimizeDeps,
esbuildOptions: {
preserveSymlinks: resolveOptions.preserveSymlinks,
@@ -812,6 +824,13 @@ export async function resolveConfig(
.map((hook) => hook(resolved)),
)
+ optimizeDepsDisabledBackwardCompatibility(resolved, resolved.optimizeDeps)
+ optimizeDepsDisabledBackwardCompatibility(
+ resolved,
+ resolved.ssr.optimizeDeps,
+ 'ssr.',
+ )
+
debug?.(`using resolved config: %O`, {
...resolved,
plugins: resolved.plugins.map((p) => p.name),
@@ -945,6 +964,7 @@ export async function loadConfigFromFile(
configFile?: string,
configRoot: string = process.cwd(),
logLevel?: LogLevel,
+ customLogger?: Logger,
): Promise<{
path: string
config: UserConfig
@@ -998,9 +1018,11 @@ export async function loadConfigFromFile(
dependencies: bundled.dependencies,
}
} catch (e) {
- createLogger(logLevel).error(
+ createLogger(logLevel, { customLogger }).error(
colors.red(`failed to load config from ${resolvedPath}`),
- { error: e },
+ {
+ error: e,
+ },
)
throw e
}
@@ -1238,11 +1260,48 @@ export function isDepsOptimizerEnabled(
config: ResolvedConfig,
ssr: boolean,
): boolean {
- const { command } = config
- const { disabled } = getDepOptimizationConfig(config, ssr)
- return !(
- disabled === true ||
- (command === 'build' && disabled === 'build') ||
- (command === 'serve' && disabled === 'dev')
- )
+ const optimizeDeps = getDepOptimizationConfig(config, ssr)
+ return !(optimizeDeps.noDiscovery && !optimizeDeps.include?.length)
+}
+
+function optimizeDepsDisabledBackwardCompatibility(
+ resolved: ResolvedConfig,
+ optimizeDeps: DepOptimizationConfig,
+ optimizeDepsPath: string = '',
+) {
+ const optimizeDepsDisabled = optimizeDeps.disabled
+ if (optimizeDepsDisabled !== undefined) {
+ if (optimizeDepsDisabled === true || optimizeDepsDisabled === 'dev') {
+ const commonjsOptionsInclude = resolved.build?.commonjsOptions?.include
+ const commonjsPluginDisabled =
+ Array.isArray(commonjsOptionsInclude) &&
+ commonjsOptionsInclude.length === 0
+ optimizeDeps.noDiscovery = true
+ optimizeDeps.include = undefined
+ if (commonjsPluginDisabled) {
+ resolved.build.commonjsOptions.include = undefined
+ }
+ resolved.logger.warn(
+ colors.yellow(`(!) Experimental ${optimizeDepsPath}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
+ To disable the deps optimizer, set ${optimizeDepsPath}optimizeDeps.noDiscovery to true and ${optimizeDepsPath}optimizeDeps.include as undefined or empty.
+ Please remove ${optimizeDepsPath}optimizeDeps.disabled from your config.
+ ${
+ commonjsPluginDisabled
+ ? 'Empty config.build.commonjsOptions.include will be ignored to support CJS during build. This config should also be removed.'
+ : ''
+ }
+ `),
+ )
+ } else if (
+ optimizeDepsDisabled === false ||
+ optimizeDepsDisabled === 'build'
+ ) {
+ resolved.logger.warn(
+ colors.yellow(`(!) Experimental ${optimizeDepsPath}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
+ Setting it to ${optimizeDepsDisabled} now has no effect.
+ Please remove ${optimizeDepsPath}optimizeDeps.disabled from your config.
+ `),
+ )
+ }
+ }
}
diff --git a/packages/vite/src/node/constants.ts b/packages/vite/src/node/constants.ts
index b2b50f038dfa2f..384b6694cd9cf5 100644
--- a/packages/vite/src/node/constants.ts
+++ b/packages/vite/src/node/constants.ts
@@ -119,6 +119,8 @@ export const KNOWN_ASSET_TYPES = [
'aac',
'opus',
'mov',
+ 'm4a',
+ 'vtt',
// fonts
'woff2?',
@@ -153,3 +155,7 @@ export const wildcardHosts = new Set([
export const DEFAULT_DEV_PORT = 5173
export const DEFAULT_PREVIEW_PORT = 4173
+
+export const DEFAULT_ASSETS_INLINE_LIMIT = 4096
+
+export const METADATA_FILENAME = '_metadata.json'
diff --git a/packages/vite/src/node/env.ts b/packages/vite/src/node/env.ts
index 6c29532f02a6f6..1052f894ec8c2d 100644
--- a/packages/vite/src/node/env.ts
+++ b/packages/vite/src/node/env.ts
@@ -2,16 +2,16 @@ import fs from 'node:fs'
import path from 'node:path'
import { parse } from 'dotenv'
import { expand } from 'dotenv-expand'
-import { arraify, tryStatSync } from './utils'
+import { arraify, normalizePath, tryStatSync } from './utils'
import type { UserConfig } from './config'
-export function getEnvFilesForMode(mode: string): string[] {
+export function getEnvFilesForMode(mode: string, envDir: string): string[] {
return [
/** default file */ `.env`,
/** local file */ `.env.local`,
/** mode file */ `.env.${mode}`,
/** mode local file */ `.env.${mode}.local`,
- ]
+ ].map((file) => normalizePath(path.join(envDir, file)))
}
export function loadEnv(
@@ -27,11 +27,10 @@ export function loadEnv(
}
prefixes = arraify(prefixes)
const env: Record = {}
- const envFiles = getEnvFilesForMode(mode)
+ const envFiles = getEnvFilesForMode(mode, envDir)
const parsed = Object.fromEntries(
- envFiles.flatMap((file) => {
- const filePath = path.join(envDir, file)
+ envFiles.flatMap((filePath) => {
if (!tryStatSync(filePath)?.isFile()) return []
return Object.entries(parse(fs.readFileSync(filePath)))
diff --git a/packages/vite/src/node/fsUtils.ts b/packages/vite/src/node/fsUtils.ts
index ec9c6431bfa645..5b4ea371af48ec 100644
--- a/packages/vite/src/node/fsUtils.ts
+++ b/packages/vite/src/node/fsUtils.ts
@@ -1,6 +1,5 @@
import fs from 'node:fs'
import path from 'node:path'
-import colors from 'picocolors'
import type { FSWatcher } from 'dep-types/chokidar'
import type { ResolvedConfig } from './config'
import {
@@ -9,6 +8,7 @@ import {
safeRealpathSync,
tryStatSync,
} from './utils'
+import { searchForWorkspaceRoot } from './server/searchRoot'
export interface FsUtils {
existsSync: (path: string) => boolean
@@ -45,31 +45,18 @@ const cachedFsUtilsMap = new WeakMap()
export function getFsUtils(config: ResolvedConfig): FsUtils {
let fsUtils = cachedFsUtilsMap.get(config)
if (!fsUtils) {
- if (config.command !== 'serve' || !config.server.fs.cachedChecks) {
- // cached fsUtils is only used in the dev server for now, and only when the watcher isn't configured
- // we can support custom ignored patterns later
- fsUtils = commonFsUtils
- } /* TODO: Enabling for testing, we need to review if this guard is needed
- else if (config.server.watch === null || config.server.watch?.ignored) {
- config.logger.warn(
- colors.yellow(
- `${colors.bold(
- `(!)`,
- )} server.fs.cachedChecks isn't supported if server.watch is null or a custom server.watch.ignored is configured\n`,
- ),
- )
+ if (
+ config.command !== 'serve' ||
+ config.server.fs.cachedChecks === false ||
+ config.server.watch?.ignored
+ ) {
+ // cached fsUtils is only used in the dev server for now
+ // it is enabled by default only when there aren't custom watcher ignored patterns configured
fsUtils = commonFsUtils
- } */ else if (
+ } else if (
!config.resolve.preserveSymlinks &&
config.root !== getRealPath(config.root)
) {
- config.logger.warn(
- colors.yellow(
- `${colors.bold(
- `(!)`,
- )} server.fs.cachedChecks isn't supported when resolve.preserveSymlinks is false and root is symlinked\n`,
- ),
- )
fsUtils = commonFsUtils
} else {
fsUtils = createCachedFsUtils(config)
@@ -142,7 +129,7 @@ function pathUntilPart(root: string, parts: string[], i: number): string {
}
export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
- const root = config.root // root is resolved and normalized, so it doesn't have a trailing slash
+ const root = normalizePath(searchForWorkspaceRoot(config.root))
const rootDirPath = `${root}/`
const rootCache: DirentCache = { type: 'directory' } // dirents will be computed lazily
@@ -165,11 +152,11 @@ export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
return
}
if (nextDirentCache.type === 'directory_maybe_symlink') {
- dirPath ??= pathUntilPart(root, parts, i)
+ dirPath ??= pathUntilPart(root, parts, i + 1)
const isSymlink = fs
.lstatSync(dirPath, { throwIfNoEntry: false })
?.isSymbolicLink()
- direntCache.type = isSymlink ? 'symlink' : 'directory'
+ nextDirentCache.type = isSymlink ? 'symlink' : 'directory'
}
direntCache = nextDirentCache
} else if (direntCache.type === 'symlink') {
@@ -219,7 +206,9 @@ export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
file: string,
type: 'directory_maybe_symlink' | 'file_maybe_symlink',
) {
- const direntCache = getDirentCacheFromPath(path.dirname(file))
+ const direntCache = getDirentCacheFromPath(
+ normalizePath(path.dirname(file)),
+ )
if (
direntCache &&
direntCache.type === 'directory' &&
@@ -230,7 +219,9 @@ export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
}
function onPathUnlink(file: string) {
- const direntCache = getDirentCacheFromPath(path.dirname(file))
+ const direntCache = getDirentCacheFromPath(
+ normalizePath(path.dirname(file)),
+ )
if (
direntCache &&
direntCache.type === 'directory' &&
diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts
index 0c94465e1690be..61d50e0c6d6853 100644
--- a/packages/vite/src/node/index.ts
+++ b/packages/vite/src/node/index.ts
@@ -15,6 +15,8 @@ export { optimizeDeps } from './optimizer'
export { formatPostcssSourceMap, preprocessCSS } from './plugins/css'
export { transformWithEsbuild } from './plugins/esbuild'
export { buildErrorMessage } from './server/middlewares/error'
+export { fetchModule } from './ssr/fetchModule'
+export type { FetchModuleOptions } from './ssr/fetchModule'
export * from './publicUtils'
// additional types
@@ -119,6 +121,18 @@ export type {
} from './server/transformRequest'
export type { HmrOptions, HmrContext } from './server/hmr'
+export type {
+ HMRBroadcaster,
+ HMRChannel,
+ ServerHMRChannel,
+ HMRBroadcasterClient,
+} from './server/hmr'
+
+export type { FetchFunction } from './ssr/runtime/index'
+export { createViteRuntime } from './ssr/runtime/node/mainThreadRuntime'
+export type { MainThreadRuntimeOptions } from './ssr/runtime/node/mainThreadRuntime'
+export { ServerHMRConnector } from './ssr/runtime/node/serverHmrConnector'
+
export type { BindCLIShortcutsOptions, CLIShortcut } from './shortcuts'
export type {
diff --git a/packages/vite/src/node/logger.ts b/packages/vite/src/node/logger.ts
index 8b3752d9f2200f..8600228e305de1 100644
--- a/packages/vite/src/node/logger.ts
+++ b/packages/vite/src/node/logger.ts
@@ -51,6 +51,18 @@ export interface LoggerOptions {
customLogger?: Logger
}
+// Only initialize the timeFormatter when the timestamp option is used, and
+// reuse it across all loggers
+let timeFormatter: Intl.DateTimeFormat
+function getTimeFormatter() {
+ timeFormatter ??= new Intl.DateTimeFormat(undefined, {
+ hour: 'numeric',
+ minute: 'numeric',
+ second: 'numeric',
+ })
+ return timeFormatter
+}
+
export function createLogger(
level: LogLevel = 'info',
options: LoggerOptions = {},
@@ -59,11 +71,6 @@ export function createLogger(
return options.customLogger
}
- const timeFormatter = new Intl.DateTimeFormat(undefined, {
- hour: 'numeric',
- minute: 'numeric',
- second: 'numeric',
- })
const loggedErrors = new WeakSet()
const { prefix = '[vite]', allowClearScreen = true } = options
const thresh = LogLevels[level]
@@ -71,22 +78,26 @@ export function createLogger(
allowClearScreen && process.stdout.isTTY && !process.env.CI
const clear = canClearScreen ? clearScreen : () => {}
+ function format(type: LogType, msg: string, options: LogErrorOptions = {}) {
+ if (options.timestamp) {
+ const tag =
+ type === 'info'
+ ? colors.cyan(colors.bold(prefix))
+ : type === 'warn'
+ ? colors.yellow(colors.bold(prefix))
+ : colors.red(colors.bold(prefix))
+ return `${colors.dim(
+ getTimeFormatter().format(new Date()),
+ )} ${tag} ${msg}`
+ } else {
+ return msg
+ }
+ }
+
function output(type: LogType, msg: string, options: LogErrorOptions = {}) {
if (thresh >= LogLevels[type]) {
const method = type === 'info' ? 'log' : type
- const format = () => {
- if (options.timestamp) {
- const tag =
- type === 'info'
- ? colors.cyan(colors.bold(prefix))
- : type === 'warn'
- ? colors.yellow(colors.bold(prefix))
- : colors.red(colors.bold(prefix))
- return `${colors.dim(timeFormatter.format(new Date()))} ${tag} ${msg}`
- } else {
- return msg
- }
- }
+
if (options.error) {
loggedErrors.add(options.error)
}
@@ -94,7 +105,10 @@ export function createLogger(
if (type === lastType && msg === lastMsg) {
sameCount++
clear()
- console[method](format(), colors.yellow(`(x${sameCount + 1})`))
+ console[method](
+ format(type, msg, options),
+ colors.yellow(`(x${sameCount + 1})`),
+ )
} else {
sameCount = 0
lastMsg = msg
@@ -102,10 +116,10 @@ export function createLogger(
if (options.clear) {
clear()
}
- console[method](format())
+ console[method](format(type, msg, options))
}
} else {
- console[method](format())
+ console[method](format(type, msg, options))
}
}
}
diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts
index 6beed48d27aa06..476a638ed0fd1b 100644
--- a/packages/vite/src/node/optimizer/index.ts
+++ b/packages/vite/src/node/optimizer/index.ts
@@ -8,11 +8,9 @@ import type { BuildContext, BuildOptions as EsbuildBuildOptions } from 'esbuild'
import esbuild, { build } from 'esbuild'
import { init, parse } from 'es-module-lexer'
import glob from 'fast-glob'
-import { createFilter } from '@rollup/pluginutils'
import { getDepOptimizationConfig } from '../config'
import type { ResolvedConfig } from '../config'
import {
- arraify,
createDebugger,
flattenId,
getHash,
@@ -23,9 +21,10 @@ import {
normalizePath,
removeLeadingSlash,
tryStatSync,
+ unique,
} from '../utils'
import { transformWithEsbuild } from '../plugins/esbuild'
-import { ESBUILD_MODULES_TARGET } from '../constants'
+import { ESBUILD_MODULES_TARGET, METADATA_FILENAME } from '../constants'
import { esbuildCjsExternalPlugin, esbuildDepPlugin } from './esbuildDepPlugin'
import { scanImports } from './scan'
import { createOptimizeDepsIncludeResolver, expandGlobIds } from './resolve'
@@ -58,9 +57,6 @@ export interface DepsOptimizer {
isOptimizedDepUrl: (url: string) => boolean
getOptimizedDepId: (depInfo: OptimizedDepInfo) => string
delayDepsOptimizerUntil: (id: string, done: () => Promise) => void
- registerWorkersSource: (id: string) => void
- resetRegisteredIds: () => void
- ensureFirstRun: () => void
close: () => Promise
@@ -119,10 +115,12 @@ export interface DepOptimizationConfig {
*/
extensions?: string[]
/**
- * Disables dependencies optimizations, true disables the optimizer during
- * build and dev. Pass 'build' or 'dev' to only disable the optimizer in
- * one of the modes. Deps optimization is enabled by default in dev only.
+ * Deps optimization during build was removed in Vite 5.1. This option is
+ * now redundant and will be removed in a future version. Switch to using
+ * `optimizeDeps.noDiscovery` and an empty or undefined `optimizeDeps.include`.
+ * true or 'dev' disables the optimizer, false or 'build' leaves it enabled.
* @default 'build'
+ * @deprecated
* @experimental
*/
disabled?: boolean | 'build' | 'dev'
@@ -134,6 +132,17 @@ export interface DepOptimizationConfig {
* @experimental
*/
noDiscovery?: boolean
+ /**
+ * When enabled, it will hold the first optimized deps results until all static
+ * imports are crawled on cold start. This avoids the need for full-page reloads
+ * when new dependencies are discovered and they trigger the generation of new
+ * common chunks. If all dependencies are found by the scanner plus the explicitely
+ * defined ones in `include`, it is better to disable this option to let the
+ * browser process more requests in parallel.
+ * @default true
+ * @experimental
+ */
+ holdUntilCrawlEnd?: boolean
}
export type DepOptimizationOptions = DepOptimizationConfig & {
@@ -191,6 +200,16 @@ export interface DepOptimizationMetadata {
* This is checked on server startup to avoid unnecessary re-bundles.
*/
hash: string
+ /**
+ * This hash is determined by dependency lockfiles.
+ * This is checked on server startup to avoid unnecessary re-bundles.
+ */
+ lockfileHash: string
+ /**
+ * This hash is determined by user config.
+ * This is checked on server startup to avoid unnecessary re-bundles.
+ */
+ configHash: string
/**
* The browser hash is determined by the main hash plus additional dependencies
* discovered at runtime. This is used to invalidate browser requests to
@@ -225,8 +244,7 @@ export async function optimizeDeps(
asCommand = false,
): Promise {
const log = asCommand ? config.logger.info : debug
-
- const ssr = config.command === 'build' && !!config.build.ssr
+ const ssr = false
const cachedMetadata = await loadCachedDepOptimizationMetadata(
config,
@@ -247,7 +265,7 @@ export async function optimizeDeps(
const depsInfo = toDiscoveredDependencies(config, deps, ssr)
- const result = await runOptimizeDeps(config, depsInfo).result
+ const result = await runOptimizeDeps(config, depsInfo, ssr).result
await result.commit()
@@ -268,37 +286,13 @@ export async function optimizeServerSsrDeps(
return cachedMetadata
}
- let alsoInclude: string[] | undefined
- let noExternalFilter: ((id: unknown) => boolean) | undefined
-
- const { exclude } = getDepOptimizationConfig(config, ssr)
-
- const noExternal = config.ssr?.noExternal
- if (noExternal) {
- alsoInclude = arraify(noExternal).filter(
- (ne) => typeof ne === 'string',
- ) as string[]
- noExternalFilter =
- noExternal === true
- ? (dep: unknown) => true
- : createFilter(undefined, exclude, {
- resolve: false,
- })
- }
-
const deps: Record = {}
- await addManuallyIncludedOptimizeDeps(
- deps,
- config,
- ssr,
- alsoInclude,
- noExternalFilter,
- )
+ await addManuallyIncludedOptimizeDeps(deps, config, ssr)
- const depsInfo = toDiscoveredDependencies(config, deps, true)
+ const depsInfo = toDiscoveredDependencies(config, deps, ssr)
- const result = await runOptimizeDeps(config, depsInfo, true).result
+ const result = await runOptimizeDeps(config, depsInfo, ssr).result
await result.commit()
@@ -310,9 +304,11 @@ export function initDepsOptimizerMetadata(
ssr: boolean,
timestamp?: string,
): DepOptimizationMetadata {
- const hash = getDepHash(config, ssr)
+ const { lockfileHash, configHash, hash } = getDepHash(config, ssr)
return {
hash,
+ lockfileHash,
+ configHash,
browserHash: getOptimizedBrowserHash(hash, {}, timestamp),
optimized: {},
chunks: {},
@@ -356,18 +352,28 @@ export async function loadCachedDepOptimizationMetadata(
if (!force) {
let cachedMetadata: DepOptimizationMetadata | undefined
try {
- const cachedMetadataPath = path.join(depsCacheDir, '_metadata.json')
+ const cachedMetadataPath = path.join(depsCacheDir, METADATA_FILENAME)
cachedMetadata = parseDepsOptimizerMetadata(
await fsp.readFile(cachedMetadataPath, 'utf-8'),
depsCacheDir,
)
} catch (e) {}
// hash is consistent, no need to re-bundle
- if (cachedMetadata && cachedMetadata.hash === getDepHash(config, ssr)) {
- log?.('Hash is consistent. Skipping. Use --force to override.')
- // Nothing to commit or cancel as we are using the cache, we only
- // need to resolve the processing promise so requests can move on
- return cachedMetadata
+ if (cachedMetadata) {
+ if (cachedMetadata.lockfileHash !== getLockfileHash(config, ssr)) {
+ config.logger.info(
+ 'Re-optimizing dependencies because lockfile has changed',
+ )
+ } else if (cachedMetadata.configHash !== getConfigHash(config, ssr)) {
+ config.logger.info(
+ 'Re-optimizing dependencies because vite config has changed',
+ )
+ } else {
+ log?.('Hash is consistent. Skipping. Use --force to override.')
+ // Nothing to commit or cancel as we are using the cache, we only
+ // need to resolve the processing promise so requests can move on
+ return cachedMetadata
+ }
}
} else {
config.logger.info('Forced re-optimization of dependencies')
@@ -417,7 +423,7 @@ export function toDiscoveredDependencies(
timestamp?: string,
): Record {
const browserHash = getOptimizedBrowserHash(
- getDepHash(config, ssr),
+ getDepHash(config, ssr).hash,
deps,
timestamp,
)
@@ -446,8 +452,7 @@ export function depsLogString(qualifiedIds: string[]): string {
export function runOptimizeDeps(
resolvedConfig: ResolvedConfig,
depsInfo: Record,
- ssr: boolean = resolvedConfig.command === 'build' &&
- !!resolvedConfig.build.ssr,
+ ssr: boolean,
): {
cancel: () => Promise
result: Promise
@@ -462,7 +467,7 @@ export function runOptimizeDeps(
const depsCacheDir = getDepsCacheDir(resolvedConfig, ssr)
const processingCacheDir = getProcessingDepsCacheDir(resolvedConfig, ssr)
- // Create a temporal directory so we don't need to delete optimized deps
+ // Create a temporary directory so we don't need to delete optimized deps
// until they have been processed. This also avoids leaving the deps cache
// directory in a corrupted state if there is an error
fs.mkdirSync(processingCacheDir, { recursive: true })
@@ -517,28 +522,30 @@ export function runOptimizeDeps(
committed = true
// Write metadata file, then commit the processing folder to the global deps cache
- // Rewire the file paths from the temporal processing dir to the final deps cache dir
- const dataPath = path.join(processingCacheDir, '_metadata.json')
- debug?.(colors.green(`creating _metadata.json in ${processingCacheDir}`))
+ // Rewire the file paths from the temporary processing dir to the final deps cache dir
+ const dataPath = path.join(processingCacheDir, METADATA_FILENAME)
+ debug?.(
+ colors.green(`creating ${METADATA_FILENAME} in ${processingCacheDir}`),
+ )
fs.writeFileSync(
dataPath,
stringifyDepsOptimizerMetadata(metadata, depsCacheDir),
)
// In order to minimize the time where the deps folder isn't in a consistent state,
- // we first rename the old depsCacheDir to a temporal path, then we rename the
+ // we first rename the old depsCacheDir to a temporary path, then we rename the
// new processing cache dir to the depsCacheDir. In systems where doing so in sync
// is safe, we do an atomic operation (at least for this thread). For Windows, we
// found there are cases where the rename operation may finish before it's done
// so we do a graceful rename checking that the folder has been properly renamed.
// We found that the rename-rename (then delete the old folder in the background)
// is safer than a delete-rename operation.
- const temporalPath = depsCacheDir + getTempSuffix()
+ const temporaryPath = depsCacheDir + getTempSuffix()
const depsCacheDirPresent = fs.existsSync(depsCacheDir)
if (isWindows) {
if (depsCacheDirPresent) {
- debug?.(colors.green(`renaming ${depsCacheDir} to ${temporalPath}`))
- await safeRename(depsCacheDir, temporalPath)
+ debug?.(colors.green(`renaming ${depsCacheDir} to ${temporaryPath}`))
+ await safeRename(depsCacheDir, temporaryPath)
}
debug?.(
colors.green(`renaming ${processingCacheDir} to ${depsCacheDir}`),
@@ -546,8 +553,8 @@ export function runOptimizeDeps(
await safeRename(processingCacheDir, depsCacheDir)
} else {
if (depsCacheDirPresent) {
- debug?.(colors.green(`renaming ${depsCacheDir} to ${temporalPath}`))
- fs.renameSync(depsCacheDir, temporalPath)
+ debug?.(colors.green(`renaming ${depsCacheDir} to ${temporaryPath}`))
+ fs.renameSync(depsCacheDir, temporaryPath)
}
debug?.(
colors.green(`renaming ${processingCacheDir} to ${depsCacheDir}`),
@@ -555,10 +562,10 @@ export function runOptimizeDeps(
fs.renameSync(processingCacheDir, depsCacheDir)
}
- // Delete temporal path in the background
+ // Delete temporary path in the background
if (depsCacheDirPresent) {
- debug?.(colors.green(`removing cache temp dir ${temporalPath}`))
- fsp.rm(temporalPath, { recursive: true, force: true })
+ debug?.(colors.green(`removing cache temp dir ${temporaryPath}`))
+ fsp.rm(temporaryPath, { recursive: true, force: true })
}
},
}
@@ -708,7 +715,6 @@ async function prepareEsbuildOptimizerRun(
context?: BuildContext
idToExports: Record
}> {
- const isBuild = resolvedConfig.command === 'build'
const config: ResolvedConfig = {
...resolvedConfig,
command: 'build',
@@ -749,13 +755,8 @@ async function prepareEsbuildOptimizerRun(
if (optimizerContext.cancelled) return { context: undefined, idToExports }
- // esbuild automatically replaces process.env.NODE_ENV for platform 'browser'
- // But in lib mode, we need to keep process.env.NODE_ENV untouched
const define = {
- 'process.env.NODE_ENV':
- isBuild && config.build.lib
- ? 'process.env.NODE_ENV'
- : JSON.stringify(process.env.NODE_ENV || config.mode),
+ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || config.mode),
}
const platform =
@@ -763,26 +764,6 @@ async function prepareEsbuildOptimizerRun(
const external = [...(optimizeDeps?.exclude ?? [])]
- if (isBuild) {
- let rollupOptionsExternal = config?.build?.rollupOptions?.external
- if (rollupOptionsExternal) {
- if (typeof rollupOptionsExternal === 'string') {
- rollupOptionsExternal = [rollupOptionsExternal]
- }
- // TODO: decide whether to support RegExp and function options
- // They're not supported yet because `optimizeDeps.exclude` currently only accepts strings
- if (
- !Array.isArray(rollupOptionsExternal) ||
- rollupOptionsExternal.some((ext) => typeof ext !== 'string')
- ) {
- throw new Error(
- `[vite] 'build.rollupOptions.external' can only be an array of strings or a string when using esbuild optimization at build time.`,
- )
- }
- external.push(...(rollupOptionsExternal as string[]))
- }
- }
-
const plugins = [...pluginsFromConfig]
if (external.length) {
plugins.push(esbuildCjsExternalPlugin(external, platform))
@@ -806,13 +787,13 @@ async function prepareEsbuildOptimizerRun(
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
}
: undefined,
- target: isBuild ? config.build.target || undefined : ESBUILD_MODULES_TARGET,
+ target: ESBUILD_MODULES_TARGET,
external,
logLevel: 'error',
splitting: true,
sourcemap: true,
outdir: processingCacheDir,
- ignoreAnnotations: !isBuild,
+ ignoreAnnotations: true,
metafile: true,
plugins,
charset: 'utf8',
@@ -830,13 +811,11 @@ export async function addManuallyIncludedOptimizeDeps(
deps: Record,
config: ResolvedConfig,
ssr: boolean,
- extra: string[] = [],
- filter?: (id: string) => boolean,
): Promise {
const { logger } = config
const optimizeDeps = getDepOptimizationConfig(config, ssr)
const optimizeDepsInclude = optimizeDeps?.include ?? []
- if (optimizeDepsInclude.length || extra.length) {
+ if (optimizeDepsInclude.length) {
const unableToOptimize = (id: string, msg: string) => {
if (optimizeDepsInclude.includes(id)) {
logger.warn(
@@ -847,7 +826,7 @@ export async function addManuallyIncludedOptimizeDeps(
}
}
- const includes = [...optimizeDepsInclude, ...extra]
+ const includes = [...optimizeDepsInclude]
for (let i = 0; i < includes.length; i++) {
const id = includes[i]
if (glob.isDynamicPattern(id)) {
@@ -862,7 +841,7 @@ export async function addManuallyIncludedOptimizeDeps(
// normalize 'foo >bar` as 'foo > bar' to prevent same id being added
// and for pretty printing
const normalizedId = normalizeId(id)
- if (!deps[normalizedId] && filter?.(normalizedId) !== false) {
+ if (!deps[normalizedId]) {
const entry = await resolve(id)
if (entry) {
if (isOptimizable(entry, optimizeDeps)) {
@@ -901,30 +880,17 @@ export function getOptimizedDepPath(
)
}
-function getDepsCacheSuffix(config: ResolvedConfig, ssr: boolean): string {
- let suffix = ''
- if (config.command === 'build') {
- // Differentiate build caches depending on outDir to allow parallel builds
- const { outDir } = config.build
- const buildId =
- outDir.length > 8 || outDir.includes('/') ? getHash(outDir) : outDir
- suffix += `_build-${buildId}`
- }
- if (ssr) {
- suffix += '_ssr'
- }
- return suffix
+function getDepsCacheSuffix(ssr: boolean): string {
+ return ssr ? '_ssr' : ''
}
export function getDepsCacheDir(config: ResolvedConfig, ssr: boolean): string {
- return getDepsCacheDirPrefix(config) + getDepsCacheSuffix(config, ssr)
+ return getDepsCacheDirPrefix(config) + getDepsCacheSuffix(ssr)
}
function getProcessingDepsCacheDir(config: ResolvedConfig, ssr: boolean) {
return (
- getDepsCacheDirPrefix(config) +
- getDepsCacheSuffix(config, ssr) +
- getTempSuffix()
+ getDepsCacheDirPrefix(config) + getDepsCacheSuffix(ssr) + getTempSuffix()
)
}
@@ -975,17 +941,15 @@ function parseDepsOptimizerMetadata(
jsonMetadata: string,
depsCacheDir: string,
): DepOptimizationMetadata | undefined {
- const { hash, browserHash, optimized, chunks } = JSON.parse(
- jsonMetadata,
- (key: string, value: string) => {
+ const { hash, lockfileHash, configHash, browserHash, optimized, chunks } =
+ JSON.parse(jsonMetadata, (key: string, value: string) => {
// Paths can be absolute or relative to the deps cache dir where
// the _metadata.json is located
if (key === 'file' || key === 'src') {
return normalizePath(path.resolve(depsCacheDir, value))
}
return value
- },
- )
+ })
if (
!chunks ||
Object.values(optimized).some((depInfo: any) => !depInfo.fileHash)
@@ -995,6 +959,8 @@ function parseDepsOptimizerMetadata(
}
const metadata = {
hash,
+ lockfileHash,
+ configHash,
browserHash,
optimized: {},
discovered: {},
@@ -1029,10 +995,13 @@ function stringifyDepsOptimizerMetadata(
metadata: DepOptimizationMetadata,
depsCacheDir: string,
) {
- const { hash, browserHash, optimized, chunks } = metadata
+ const { hash, configHash, lockfileHash, browserHash, optimized, chunks } =
+ metadata
return JSON.stringify(
{
hash,
+ configHash,
+ lockfileHash,
browserHash,
optimized: Object.fromEntries(
Object.values(optimized).map(
@@ -1187,37 +1156,24 @@ const lockfileFormats = [
})
const lockfileNames = lockfileFormats.map((l) => l.name)
-export function getDepHash(config: ResolvedConfig, ssr: boolean): string {
- const lockfilePath = lookupFile(config.root, lockfileNames)
- let content = lockfilePath ? fs.readFileSync(lockfilePath, 'utf-8') : ''
- if (lockfilePath) {
- const lockfileName = path.basename(lockfilePath)
- const { checkPatches } = lockfileFormats.find(
- (f) => f.name === lockfileName,
- )!
- if (checkPatches) {
- // Default of https://github.com/ds300/patch-package
- const fullPath = path.join(path.dirname(lockfilePath), 'patches')
- const stat = tryStatSync(fullPath)
- if (stat?.isDirectory()) {
- content += stat.mtimeMs.toString()
- }
- }
- }
- // also take config into account
+function getConfigHash(config: ResolvedConfig, ssr: boolean): string {
+ // Take config into account
// only a subset of config options that can affect dep optimization
const optimizeDeps = getDepOptimizationConfig(config, ssr)
- content += JSON.stringify(
+ const content = JSON.stringify(
{
mode: process.env.NODE_ENV || config.mode,
root: config.root,
resolve: config.resolve,
- buildTarget: config.build.target,
assetsInclude: config.assetsInclude,
plugins: config.plugins.map((p) => p.name),
optimizeDeps: {
- include: optimizeDeps?.include,
- exclude: optimizeDeps?.exclude,
+ include: optimizeDeps?.include
+ ? unique(optimizeDeps.include).sort()
+ : undefined,
+ exclude: optimizeDeps?.exclude
+ ? unique(optimizeDeps.exclude).sort()
+ : undefined,
esbuildOptions: {
...optimizeDeps?.esbuildOptions,
plugins: optimizeDeps?.esbuildOptions?.plugins?.map((p) => p.name),
@@ -1234,6 +1190,40 @@ export function getDepHash(config: ResolvedConfig, ssr: boolean): string {
return getHash(content)
}
+function getLockfileHash(config: ResolvedConfig, ssr: boolean): string {
+ const lockfilePath = lookupFile(config.root, lockfileNames)
+ let content = lockfilePath ? fs.readFileSync(lockfilePath, 'utf-8') : ''
+ if (lockfilePath) {
+ const lockfileName = path.basename(lockfilePath)
+ const { checkPatches } = lockfileFormats.find(
+ (f) => f.name === lockfileName,
+ )!
+ if (checkPatches) {
+ // Default of https://github.com/ds300/patch-package
+ const fullPath = path.join(path.dirname(lockfilePath), 'patches')
+ const stat = tryStatSync(fullPath)
+ if (stat?.isDirectory()) {
+ content += stat.mtimeMs.toString()
+ }
+ }
+ }
+ return getHash(content)
+}
+
+function getDepHash(
+ config: ResolvedConfig,
+ ssr: boolean,
+): { lockfileHash: string; configHash: string; hash: string } {
+ const lockfileHash = getLockfileHash(config, ssr)
+ const configHash = getConfigHash(config, ssr)
+ const hash = getHash(lockfileHash + configHash)
+ return {
+ hash,
+ lockfileHash,
+ configHash,
+ }
+}
+
function getOptimizedBrowserHash(
hash: string,
deps: Record,
diff --git a/packages/vite/src/node/optimizer/optimizer.ts b/packages/vite/src/node/optimizer/optimizer.ts
index f4a278bd54bcfd..721a2f45c8035c 100644
--- a/packages/vite/src/node/optimizer/optimizer.ts
+++ b/packages/vite/src/node/optimizer/optimizer.ts
@@ -36,20 +36,14 @@ export function getDepsOptimizer(
config: ResolvedConfig,
ssr?: boolean,
): DepsOptimizer | undefined {
- // Workers compilation shares the DepsOptimizer from the main build
- const isDevSsr = ssr && config.command !== 'build'
- return (isDevSsr ? devSsrDepsOptimizerMap : depsOptimizerMap).get(
- config.mainConfig || config,
- )
+ return (ssr ? devSsrDepsOptimizerMap : depsOptimizerMap).get(config)
}
export async function initDepsOptimizer(
config: ResolvedConfig,
server?: ViteDevServer,
): Promise {
- // Non Dev SSR Optimizer
- const ssr = config.command === 'build' && !!config.build.ssr
- if (!getDepsOptimizer(config, ssr)) {
+ if (!getDepsOptimizer(config, false)) {
await createDepsOptimizer(config, server)
}
}
@@ -87,9 +81,7 @@ async function createDepsOptimizer(
server?: ViteDevServer,
): Promise {
const { logger } = config
- const isBuild = config.command === 'build'
- const ssr = isBuild && !!config.build.ssr // safe as Dev SSR don't use this optimizer
-
+ const ssr = false
const sessionTimestamp = Date.now().toString()
const cachedMetadata = await loadCachedDepOptimizationMetadata(config, ssr)
@@ -101,6 +93,10 @@ async function createDepsOptimizer(
let metadata =
cachedMetadata || initDepsOptimizerMetadata(config, ssr, sessionTimestamp)
+ const options = getDepOptimizationConfig(config, ssr)
+
+ const { noDiscovery, holdUntilCrawlEnd } = options
+
const depsOptimizer: DepsOptimizer = {
metadata,
registerMissingImport,
@@ -108,13 +104,10 @@ async function createDepsOptimizer(
isOptimizedDepFile: createIsOptimizedDepFile(config),
isOptimizedDepUrl: createIsOptimizedDepUrl(config),
getOptimizedDepId: (depInfo: OptimizedDepInfo) =>
- isBuild ? depInfo.file : `${depInfo.file}?v=${depInfo.browserHash}`,
- registerWorkersSource,
+ `${depInfo.file}?v=${depInfo.browserHash}`,
delayDepsOptimizerUntil,
- resetRegisteredIds,
- ensureFirstRun,
close,
- options: getDepOptimizationConfig(config, ssr),
+ options,
}
depsOptimizerMap.set(config, depsOptimizer)
@@ -137,6 +130,23 @@ async function createDepsOptimizer(
}
}
+ let discoveredDepsWhileScanning: string[] = []
+ const logDiscoveredDepsWhileScanning = () => {
+ if (discoveredDepsWhileScanning.length) {
+ config.logger.info(
+ colors.green(
+ `✨ discovered while scanning: ${depsLogString(
+ discoveredDepsWhileScanning,
+ )}`,
+ ),
+ {
+ timestamp: true,
+ },
+ )
+ discoveredDepsWhileScanning = []
+ }
+ }
+
let depOptimizationProcessing = promiseWithResolvers()
let depOptimizationProcessingQueue: PromiseWithResolvers[] = []
const resolveEnqueuedProcessingPromises = () => {
@@ -151,16 +161,14 @@ async function createDepsOptimizer(
let currentlyProcessing = false
let firstRunCalled = !!cachedMetadata
+ let warnAboutMissedDependencies = false
- // During build, we wait for every module to be scanned before resolving
- // optimized deps loading for rollup on each rebuild. It will be recreated
- // after each buildStart.
- // During dev, if this is a cold run, we wait for static imports discovered
+ // If this is a cold run, we wait for static imports discovered
// from the first request before resolving to minimize full page reloads.
// On warm start or after the first optimization is run, we use a simpler
// debounce strategy each time a new dep is discovered.
let crawlEndFinder: CrawlEndFinder | undefined
- if (isBuild || !cachedMetadata) {
+ if (!cachedMetadata) {
crawlEndFinder = setupOnCrawlEnd(onCrawlEnd)
}
@@ -194,17 +202,17 @@ async function createDepsOptimizer(
// Initialize discovered deps with manually added optimizeDeps.include info
- const deps: Record = {}
- await addManuallyIncludedOptimizeDeps(deps, config, ssr)
+ const manuallyIncludedDeps: Record = {}
+ await addManuallyIncludedOptimizeDeps(manuallyIncludedDeps, config, ssr)
- const discovered = toDiscoveredDependencies(
+ const manuallyIncludedDepsInfo = toDiscoveredDependencies(
config,
- deps,
+ manuallyIncludedDeps,
ssr,
sessionTimestamp,
)
- for (const depInfo of Object.values(discovered)) {
+ for (const depInfo of Object.values(manuallyIncludedDepsInfo)) {
addOptimizedDepInfo(metadata, 'discovered', {
...depInfo,
processing: depOptimizationProcessing.promise,
@@ -212,11 +220,11 @@ async function createDepsOptimizer(
newDepsDiscovered = true
}
- if (config.optimizeDeps.noDiscovery) {
+ if (noDiscovery) {
// We don't need to scan for dependencies or wait for the static crawl to end
// Run the first optimization run immediately
runOptimizer()
- } else if (!isBuild) {
+ } else {
// Important, the scanner is dev only
depsOptimizer.scanProcessing = new Promise((resolve) => {
// Runs in the background in case blocking high priority tasks
@@ -228,6 +236,13 @@ async function createDepsOptimizer(
const deps = await discover.result
discover = undefined
+ const manuallyIncluded = Object.keys(manuallyIncludedDepsInfo)
+ discoveredDepsWhileScanning.push(
+ ...Object.keys(metadata.discovered).filter(
+ (dep) => !deps[dep] && !manuallyIncluded.includes(dep),
+ ),
+ )
+
// Add these dependencies to the discovered list, as these are currently
// used by the preAliasPlugin to support aliased and optimized deps.
// This is also used by the CJS externalization heuristics in legacy mode
@@ -238,12 +253,31 @@ async function createDepsOptimizer(
}
const knownDeps = prepareKnownDeps()
+ startNextDiscoveredBatch()
// For dev, we run the scanner and the first optimization
- // run on the background, but we wait until crawling has ended
- // to decide if we send this result to the browser or we need to
+ // run on the background
+ optimizationResult = runOptimizeDeps(config, knownDeps, ssr)
+
+ // If the holdUntilCrawlEnd stratey is used, we wait until crawling has
+ // ended to decide if we send this result to the browser or we need to
// do another optimize step
- optimizationResult = runOptimizeDeps(config, knownDeps)
+ if (!holdUntilCrawlEnd) {
+ // If not, we release the result to the browser as soon as the scanner
+ // is done. If the scanner missed any dependency, and a new dependency
+ // is discovered while crawling static imports, then there will be a
+ // full-page reload if new common chunks are generated between the old
+ // and new optimized deps.
+ optimizationResult.result.then((result) => {
+ // Check if the crawling of static imports has already finished. In that
+ // case, the result is handled by the onCrawlEnd callback
+ if (!crawlEndFinder) return
+
+ optimizationResult = undefined // signal that we'll be using the result
+
+ runOptimizer(result)
+ })
+ }
} catch (e) {
logger.error(e.stack || e.message)
} finally {
@@ -318,7 +352,7 @@ async function createDepsOptimizer(
const knownDeps = prepareKnownDeps()
startNextDiscoveredBatch()
- optimizationResult = runOptimizeDeps(config, knownDeps)
+ optimizationResult = runOptimizeDeps(config, knownDeps, ssr)
processingResult = await optimizationResult.result
optimizationResult = undefined
}
@@ -408,6 +442,16 @@ async function createDepsOptimizer(
newDepsToLogHandle = setTimeout(() => {
newDepsToLogHandle = undefined
logNewlyDiscoveredDeps()
+ if (warnAboutMissedDependencies) {
+ logDiscoveredDepsWhileScanning()
+ config.logger.info(
+ colors.magenta(
+ `❗ add these dependencies to optimizeDeps.include to speed up cold start`,
+ ),
+ { timestamp: true },
+ )
+ warnAboutMissedDependencies = false
+ }
}, 2 * debounceMs)
} else {
debug(
@@ -440,6 +484,16 @@ async function createDepsOptimizer(
if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle)
newDepsToLogHandle = undefined
logNewlyDiscoveredDeps()
+ if (warnAboutMissedDependencies) {
+ logDiscoveredDepsWhileScanning()
+ config.logger.info(
+ colors.magenta(
+ `❗ add these dependencies to optimizeDeps.include to avoid a full page reload during cold start`,
+ ),
+ { timestamp: true },
+ )
+ warnAboutMissedDependencies = false
+ }
}
logger.info(
@@ -487,7 +541,7 @@ async function createDepsOptimizer(
// reloaded.
server.moduleGraph.invalidateAll()
- server.ws.send({
+ server.hot.send({
type: 'full-reload',
path: '*',
})
@@ -541,11 +595,6 @@ async function createDepsOptimizer(
// browser a dependency that may be outdated, thus avoiding full page reloads
if (!crawlEndFinder) {
- if (isBuild) {
- logger.error(
- 'Vite Internal Error: Missing dependency found after crawling ended',
- )
- }
// Debounced rerun, let other missing dependencies be discovered before
// the running next optimizeDeps
debouncedProcessing()
@@ -581,7 +630,7 @@ async function createDepsOptimizer(
function debouncedProcessing(timeout = debounceMs) {
// Debounced rerun, let other missing dependencies be discovered before
- // the running next optimizeDeps
+ // the next optimizeDeps run
enqueuedRerun = undefined
if (debounceProcessingHandle) clearTimeout(debounceProcessingHandle)
if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle)
@@ -595,15 +644,11 @@ async function createDepsOptimizer(
}, timeout)
}
- // During dev, onCrawlEnd is called once when the server starts and all static
+ // onCrawlEnd is called once when the server starts and all static
// imports after the first request have been crawled (dynamic imports may also
// be crawled if the browser requests them right away).
- // During build, onCrawlEnd will be called once after each buildStart (so in
- // watch mode it will be called after each rebuild has processed every module).
- // All modules are transformed first in this case (both static and dynamic).
async function onCrawlEnd() {
- // On build time, a missing dep appearing after onCrawlEnd is an internal error
- // On dev, switch after this point to a simple debounce strategy
+ // switch after this point to a simple debounce strategy
crawlEndFinder = undefined
debug?.(colors.green(`✨ static imports crawl ended`))
@@ -615,9 +660,18 @@ async function createDepsOptimizer(
// It normally should be over by the time crawling of user code ended
await depsOptimizer.scanProcessing
- if (!isBuild && optimizationResult && !config.optimizeDeps.noDiscovery) {
- const result = await optimizationResult.result
- optimizationResult = undefined
+ if (optimizationResult && !config.optimizeDeps.noDiscovery) {
+ // In the holdUntilCrawlEnd strategy, we don't release the result of the
+ // post-scanner optimize step to the browser until we reach this point
+ // If there are new dependencies, we do another optimize run, if not, we
+ // use the post-scanner optimize result
+ // If holdUntilCrawlEnd is false and we reach here, it means that the
+ // scan+optimize step finished after crawl end. We follow the same
+ // process as in the holdUntilCrawlEnd in this case.
+ const afterScanResult = optimizationResult.result
+ optimizationResult = undefined // signal that we'll be using the result
+
+ const result = await afterScanResult
currentlyProcessing = false
const crawlDeps = Object.keys(metadata.discovered)
@@ -672,6 +726,20 @@ async function createDepsOptimizer(
startNextDiscoveredBatch()
runOptimizer(result)
}
+ } else if (!holdUntilCrawlEnd) {
+ // The post-scanner optimize result has been released to the browser
+ // If new deps have been discovered, issue a regular rerun of the
+ // optimizer. A full page reload may still be avoided if the new
+ // optimize result is compatible in this case
+ if (newDepsDiscovered) {
+ debug?.(
+ colors.green(
+ `✨ new dependencies were found while crawling static imports, re-running optimizer`,
+ ),
+ )
+ warnAboutMissedDependencies = true
+ debouncedProcessing(0)
+ }
} else {
const crawlDeps = Object.keys(metadata.discovered)
currentlyProcessing = false
@@ -690,30 +758,16 @@ async function createDepsOptimizer(
}
}
- // Called during buildStart at build time, when build --watch is used.
- function resetRegisteredIds() {
- crawlEndFinder?.cancel()
- crawlEndFinder = setupOnCrawlEnd(onCrawlEnd)
- }
-
- function registerWorkersSource(id: string) {
- crawlEndFinder?.registerWorkersSource(id)
- }
function delayDepsOptimizerUntil(id: string, done: () => Promise) {
if (crawlEndFinder && !depsOptimizer.isOptimizedDepFile(id)) {
crawlEndFinder.delayDepsOptimizerUntil(id, done)
}
}
- function ensureFirstRun() {
- crawlEndFinder?.ensureFirstRun()
- }
}
const callCrawlEndIfIdleAfterMs = 50
interface CrawlEndFinder {
- ensureFirstRun: () => void
- registerWorkersSource: (id: string) => void
delayDepsOptimizerUntil: (id: string, done: () => Promise) => void
cancel: () => void
}
@@ -721,7 +775,6 @@ interface CrawlEndFinder {
function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder {
const registeredIds = new Set()
const seenIds = new Set()
- const workersSources = new Set()
let timeoutHandle: NodeJS.Timeout | undefined
let cancelled = false
@@ -737,40 +790,13 @@ function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder {
}
}
- // If all the inputs are dependencies, we aren't going to get any
- // delayDepsOptimizerUntil(id) calls. We need to guard against this
- // by forcing a rerun if no deps have been registered
- let firstRunEnsured = false
- function ensureFirstRun() {
- if (!firstRunEnsured && seenIds.size === 0) {
- setTimeout(() => {
- if (seenIds.size === 0) {
- callOnCrawlEnd()
- }
- }, 200)
- }
- firstRunEnsured = true
- }
-
- function registerWorkersSource(id: string): void {
- workersSources.add(id)
-
- // Avoid waiting for this id, as it may be blocked by the rollup
- // bundling process of the worker that also depends on the optimizer
- registeredIds.delete(id)
-
- checkIfCrawlEndAfterTimeout()
- }
-
function delayDepsOptimizerUntil(id: string, done: () => Promise): void {
if (!seenIds.has(id)) {
seenIds.add(id)
- if (!workersSources.has(id)) {
- registeredIds.add(id)
- done()
- .catch(() => {})
- .finally(() => markIdAsDone(id))
- }
+ registeredIds.add(id)
+ done()
+ .catch(() => {})
+ .finally(() => markIdAsDone(id))
}
}
function markIdAsDone(id: string): void {
@@ -793,8 +819,6 @@ function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder {
}
return {
- ensureFirstRun,
- registerWorkersSource,
delayDepsOptimizerUntil,
cancel,
}
@@ -820,10 +844,7 @@ async function createDevSsrDepsOptimizer(
// noop, there is no scanning during dev SSR
// the optimizer blocks the server start
run: () => {},
- registerWorkersSource: (id: string) => {},
delayDepsOptimizerUntil: (id: string, done: () => Promise) => {},
- resetRegisteredIds: () => {},
- ensureFirstRun: () => {},
close: async () => {},
options: config.ssr.optimizeDeps,
diff --git a/packages/vite/src/node/optimizer/scan.ts b/packages/vite/src/node/optimizer/scan.ts
index be0984508c09b3..b28c13167e5fb6 100644
--- a/packages/vite/src/node/optimizer/scan.ts
+++ b/packages/vite/src/node/optimizer/scan.ts
@@ -550,7 +550,6 @@ function esbuildScanPlugin(
// should be faster than doing it in the catch-all via js
// they are done after the bare import resolve because a package name
// may end with these extensions
-
const setupExternalize = (
filter: RegExp,
doExternalize: (path: string) => boolean,
@@ -561,16 +560,6 @@ function esbuildScanPlugin(
external: doExternalize(path),
}
})
- // onResolve is not called for glob imports.
- // we need to add that here as well until esbuild calls onResolve for glob imports.
- // https://github.com/evanw/esbuild/issues/3317
- build.onLoad({ filter, namespace: 'file' }, () => {
- const externalOnLoadResult: OnLoadResult = {
- loader: 'js',
- contents: 'export default {}',
- }
- return externalOnLoadResult
- })
}
// css
@@ -647,6 +636,16 @@ function esbuildScanPlugin(
contents,
}
})
+
+ // onResolve is not called for glob imports.
+ // we need to add that here as well until esbuild calls onResolve for glob imports.
+ // https://github.com/evanw/esbuild/issues/3317
+ build.onLoad({ filter: /.*/, namespace: 'file' }, () => {
+ return {
+ loader: 'js',
+ contents: 'export default {}',
+ }
+ })
},
}
}
diff --git a/packages/vite/src/node/packages.ts b/packages/vite/src/node/packages.ts
index 9b35ecc3b82e9c..c3504a0959b117 100644
--- a/packages/vite/src/node/packages.ts
+++ b/packages/vite/src/node/packages.ts
@@ -21,7 +21,7 @@ export type PackageCache = Map
export interface PackageData {
dir: string
- hasSideEffects: (id: string) => boolean | 'no-treeshake'
+ hasSideEffects: (id: string) => boolean | 'no-treeshake' | null
webResolvedImports: Record
nodeResolvedImports: Record
setResolvedCache: (key: string, entry: string, targetWeb: boolean) => void
@@ -171,7 +171,7 @@ export function loadPackageData(pkgPath: string): PackageData {
const data = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
const pkgDir = path.dirname(pkgPath)
const { sideEffects } = data
- let hasSideEffects: (id: string) => boolean
+ let hasSideEffects: (id: string) => boolean | null
if (typeof sideEffects === 'boolean') {
hasSideEffects = () => sideEffects
} else if (Array.isArray(sideEffects)) {
@@ -191,7 +191,7 @@ export function loadPackageData(pkgPath: string): PackageData {
resolve: pkgDir,
})
} else {
- hasSideEffects = () => true
+ hasSideEffects = () => null
}
const pkg: PackageData = {
diff --git a/packages/vite/src/node/plugin.ts b/packages/vite/src/node/plugin.ts
index a110de16033034..63b7598908c984 100644
--- a/packages/vite/src/node/plugin.ts
+++ b/packages/vite/src/node/plugin.ts
@@ -129,7 +129,7 @@ export interface Plugin extends RollupPlugin {
* the descriptors.
*
* - The hook can also return an empty array and then perform custom updates
- * by sending a custom hmr payload via server.ws.send().
+ * by sending a custom hmr payload via server.hot.send().
*
* - If the hook doesn't return a value, the hmr update will be performed as
* normal.
diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts
index 4484978a60f784..1b3a0cd752136a 100644
--- a/packages/vite/src/node/plugins/asset.ts
+++ b/packages/vite/src/node/plugins/asset.ts
@@ -23,19 +23,19 @@ import {
injectQuery,
joinUrlSegments,
normalizePath,
+ rawRE,
removeLeadingSlash,
+ removeUrlQuery,
+ urlRE,
withTrailingSlash,
} from '../utils'
-import { FS_PREFIX } from '../constants'
+import { DEFAULT_ASSETS_INLINE_LIMIT, FS_PREFIX } from '../constants'
import type { ModuleGraph } from '../server/moduleGraph'
// referenceId is base64url but replaces - with $
export const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g
-const rawRE = /(?:\?|&)raw(?:&|$)/
-export const urlRE = /(\?|&)url(?:&|$)/
const jsSourceMapRE = /\.[cm]?js\.map$/
-const unnededFinalQueryCharRE = /[?&]$/
const assetCache = new WeakMap>()
@@ -57,10 +57,6 @@ export function registerCustomMime(): void {
mrmime.mimes['ico'] = 'image/x-icon'
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac
mrmime.mimes['flac'] = 'audio/flac'
- // mrmime and mime-db is not released yet: https://github.com/jshttp/mime-db/commit/c9242a9b7d4bb25d7a0c9244adec74aeef08d8a1
- mrmime.mimes['aac'] = 'audio/aac'
- // https://wiki.xiph.org/MIME_Types_and_File_Extensions#.opus_-_audio/ogg
- mrmime.mimes['opus'] = 'audio/ogg'
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
mrmime.mimes['eot'] = 'application/vnd.ms-fontobject'
}
@@ -195,11 +191,11 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
)}`
}
- if (!config.assetsInclude(cleanUrl(id)) && !urlRE.test(id)) {
+ if (!urlRE.test(id) && !config.assetsInclude(cleanUrl(id))) {
return
}
- id = id.replace(urlRE, '$1').replace(unnededFinalQueryCharRE, '')
+ id = removeUrlQuery(id)
let url = await fileToUrl(id, config, this)
// Inherit HMR timestamp if this asset was invalidated
@@ -329,7 +325,7 @@ async function fileToBuiltUrl(
config: ResolvedConfig,
pluginContext: PluginContext,
skipPublicCheck = false,
- shouldInline?: boolean,
+ forceInline?: boolean,
): Promise {
if (!skipPublicCheck && checkPublicFile(id, config)) {
return publicFileToBuiltUrl(id, config)
@@ -344,18 +340,8 @@ async function fileToBuiltUrl(
const file = cleanUrl(id)
const content = await fsp.readFile(file)
- if (shouldInline == null) {
- shouldInline =
- !!config.build.lib ||
- // Don't inline SVG with fragments, as they are meant to be reused
- (!(file.endsWith('.svg') && id.includes('#')) &&
- !file.endsWith('.html') &&
- content.length < Number(config.build.assetsInlineLimit) &&
- !isGitLfsPlaceholder(content))
- }
-
let url: string
- if (shouldInline) {
+ if (shouldInline(config, file, id, content, forceInline)) {
if (config.build.lib && isGitLfsPlaceholder(content)) {
config.logger.warn(
colors.yellow(`Inlined file ${id} was not downloaded via Git LFS`),
@@ -396,7 +382,7 @@ export async function urlToBuiltUrl(
importer: string,
config: ResolvedConfig,
pluginContext: PluginContext,
- shouldInline?: boolean,
+ forceInline?: boolean,
): Promise {
if (checkPublicFile(url, config)) {
return publicFileToBuiltUrl(url, config)
@@ -411,10 +397,35 @@ export async function urlToBuiltUrl(
pluginContext,
// skip public check since we just did it above
true,
- shouldInline,
+ forceInline,
)
}
+const shouldInline = (
+ config: ResolvedConfig,
+ file: string,
+ id: string,
+ content: Buffer,
+ forceInline: boolean | undefined,
+): boolean => {
+ if (config.build.lib) return true
+ if (forceInline !== undefined) return forceInline
+ let limit: number
+ if (typeof config.build.assetsInlineLimit === 'function') {
+ const userShouldInline = config.build.assetsInlineLimit(file, content)
+ if (userShouldInline != null) return userShouldInline
+ limit = DEFAULT_ASSETS_INLINE_LIMIT
+ } else {
+ limit = Number(config.build.assetsInlineLimit)
+ }
+ if (file.endsWith('.html')) return false
+ // Don't inline SVG with fragments, as they are meant to be reused
+ if (file.endsWith('.svg') && id.includes('#')) return false
+ return content.length < limit && !isGitLfsPlaceholder(content)
+}
+
+const nestedQuotesRE = /"[^"']*'[^"]*"|'[^'"]*"[^']*'/
+
// Inspired by https://github.com/iconify/iconify/blob/main/packages/utils/src/svg/url.ts
function svgToDataURL(content: Buffer): string {
const stringContent = content.toString()
@@ -422,7 +433,8 @@ function svgToDataURL(content: Buffer): string {
// need to be escaped, the gain to use a data URI would be ridiculous if not negative
if (
stringContent.includes('
+ /**
+ * If this option is set, preprocessors will run in workers when possible.
+ * `true` means the number of CPUs minus 1.
+ *
+ * @default 0
+ * @experimental
+ */
+ preprocessorMaxWorkers?: number | true
postcss?:
| string
| (PostCSS.ProcessOptions & {
@@ -162,11 +185,13 @@ export function resolveCSSOptions(
const cssModuleRE = new RegExp(`\\.module${CSS_LANGS_RE.source}`)
const directRequestRE = /[?&]direct\b/
const htmlProxyRE = /[?&]html-proxy\b/
+const htmlProxyIndexRE = /&index=(\d+)/
const commonjsProxyRE = /\?commonjs-proxy/
const inlineRE = /[?&]inline\b/
const inlineCSSRE = /[?&]inline-css\b/
const styleAttrRE = /[?&]style-attr\b/
-const varRE = /^var\(/i
+const functionCallRE = /^[A-Z_][\w-]*\(/i
+const transformOnlyRE = /[?&]transform-only\b/
const nonEscapedDoubleQuoteRe = /(?>
const resolveUrl = config.createResolver({
@@ -233,6 +260,8 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
extensions: [],
})
+ let preprocessorWorkerController: PreprocessorWorkerController | undefined
+
// warm up cache for resolved postcss config
if (config.css?.transformer !== 'lightningcss') {
resolvePostcssConfig(config)
@@ -241,19 +270,53 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
return {
name: 'vite:css',
- configureServer(_server) {
- server = _server
- },
-
buildStart() {
// Ensure a new cache for every build (i.e. rebuilding in watch mode)
moduleCache = new Map>()
cssModulesCache.set(config, moduleCache)
removedPureCssFilesCache.set(config, new Map())
+
+ preprocessorWorkerController = createPreprocessorWorkerController(
+ normalizeMaxWorkers(config.css.preprocessorMaxWorkers),
+ )
+ preprocessorWorkerControllerCache.set(
+ config,
+ preprocessorWorkerController,
+ )
+ },
+
+ buildEnd() {
+ preprocessorWorkerController?.close()
},
- async transform(raw, id, options) {
+ async load(id) {
+ if (!isCSSRequest(id)) return
+
+ if (urlRE.test(id)) {
+ if (isModuleCSSRequest(id)) {
+ throw new Error(
+ `?url is not supported with CSS modules. (tried to import ${JSON.stringify(
+ id,
+ )})`,
+ )
+ }
+
+ // *.css?url
+ // in dev, it's handled by assets plugin.
+ if (isBuild) {
+ id = injectQuery(removeUrlQuery(id), 'transform-only')
+ return (
+ `import ${JSON.stringify(id)};` +
+ `export default "__VITE_CSS_URL__${Buffer.from(id).toString(
+ 'hex',
+ )}__"`
+ )
+ }
+ }
+ },
+
+ async transform(raw, id) {
if (
!isCSSRequest(id) ||
commonjsProxyRE.test(id) ||
@@ -261,8 +324,6 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
) {
return
}
- const ssr = options?.ssr === true
-
const urlReplacer: CssUrlReplacer = async (url, importer) => {
const decodedUrl = decodeURI(url)
if (checkPublicFile(decodedUrl, config)) {
@@ -301,65 +362,23 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
modules,
deps,
map,
- } = await compileCSS(id, raw, config, urlReplacer)
+ } = await compileCSS(
+ id,
+ raw,
+ config,
+ preprocessorWorkerController!,
+ urlReplacer,
+ )
if (modules) {
moduleCache.set(id, modules)
}
- // track deps for build watch mode
- if (config.command === 'build' && config.build.watch && deps) {
+ if (deps) {
for (const file of deps) {
this.addWatchFile(file)
}
}
- // dev
- if (server) {
- // server only logic for handling CSS @import dependency hmr
- const { moduleGraph } = server
- const thisModule = moduleGraph.getModuleById(id)
- if (thisModule) {
- // CSS modules cannot self-accept since it exports values
- const isSelfAccepting =
- !modules && !inlineRE.test(id) && !htmlProxyRE.test(id)
- if (deps) {
- // record deps in the module graph so edits to @import css can trigger
- // main import to hot update
- const depModules = new Set()
- const devBase = config.base
- for (const file of deps) {
- depModules.add(
- isCSSRequest(file)
- ? moduleGraph.createFileOnlyEntry(file)
- : await moduleGraph.ensureEntryFromUrl(
- stripBase(
- await fileToUrl(file, config, this),
- (config.server?.origin ?? '') + devBase,
- ),
- ssr,
- ),
- )
- }
- moduleGraph.updateModuleInfo(
- thisModule,
- depModules,
- null,
- // The root CSS proxy module is self-accepting and should not
- // have an explicit accept list
- new Set(),
- null,
- isSelfAccepting,
- ssr,
- )
- for (const file of deps) {
- this.addWatchFile(file)
- }
- } else {
- thisModule.isSelfAccepting = isSelfAccepting
- }
- }
- }
-
return {
code: css,
map,
@@ -374,8 +393,9 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
export function cssPostPlugin(config: ResolvedConfig): Plugin {
// styles initialization in buildStart causes a styling loss in watch
const styles: Map = new Map()
- // list of css emit tasks to guarantee the files are emitted in a deterministic order
- let emitTasks: Promise[] = []
+ // queue to emit css serially to guarantee the files are emitted in a deterministic order
+ let codeSplitEmitQueue = createSerialPromiseQueue()
+ const urlEmitQueue = createSerialPromiseQueue()
let pureCssChunks: Set
// when there are multiple rollup outputs and extracting CSS, only emit once,
@@ -414,7 +434,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
pureCssChunks = new Set()
hasEmitted = false
chunkCSSMap = new Map()
- emitTasks = []
+ codeSplitEmitQueue = createSerialPromiseQueue()
},
async transform(css, id, options) {
@@ -434,12 +454,15 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
const inlineCSS = inlineCSSRE.test(id)
const isHTMLProxy = htmlProxyRE.test(id)
if (inlineCSS && isHTMLProxy) {
- const query = parseRequest(id)
if (styleAttrRE.test(id)) {
css = css.replace(/"/g, '"')
}
+ const index = htmlProxyIndexRE.exec(id)?.[1]
+ if (index == null) {
+ throw new Error(`HTML proxy index in "${id}" not found`)
+ }
addToHTMLProxyTransformResult(
- `${getHash(cleanUrl(id))}_${Number.parseInt(query!.index)}`,
+ `${getHash(cleanUrl(id))}_${Number.parseInt(index)}`,
css,
)
return `export default ''`
@@ -530,10 +553,13 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
const ids = Object.keys(chunk.modules)
for (const id of ids) {
if (styles.has(id)) {
- chunkCSS += styles.get(id)
- // a css module contains JS, so it makes this not a pure css chunk
- if (cssModuleRE.test(id)) {
- isPureCssChunk = false
+ // ?transform-only is used for ?url and shouldn't be included in normal CSS chunks
+ if (!transformOnlyRE.test(id)) {
+ chunkCSS += styles.get(id)
+ // a css module contains JS, so it makes this not a pure css chunk
+ if (cssModuleRE.test(id)) {
+ isPureCssChunk = false
+ }
}
} else {
// if the module does not have a style, then it's not a pure css chunk.
@@ -543,10 +569,6 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
}
}
- if (!chunkCSS) {
- return null
- }
-
const publicAssetUrlMap = publicAssetUrlCache.get(config)!
// resolve asset URL placeholders to their built file URLs
@@ -608,6 +630,98 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
)
}
+ let s: MagicString | undefined
+ const urlEmitTasks: Array<{
+ cssAssetName: string
+ originalFilename: string
+ content: string
+ start: number
+ end: number
+ }> = []
+
+ if (code.includes('__VITE_CSS_URL__')) {
+ let match: RegExpExecArray | null
+ cssUrlAssetRE.lastIndex = 0
+ while ((match = cssUrlAssetRE.exec(code))) {
+ const [full, idHex] = match
+ const id = Buffer.from(idHex, 'hex').toString()
+ const originalFilename = cleanUrl(id)
+ const cssAssetName = ensureFileExt(
+ path.basename(originalFilename),
+ '.css',
+ )
+ if (!styles.has(id)) {
+ throw new Error(
+ `css content for ${JSON.stringify(id)} was not found`,
+ )
+ }
+
+ let cssContent = styles.get(id)!
+
+ cssContent = resolveAssetUrlsInCss(cssContent, cssAssetName)
+
+ urlEmitTasks.push({
+ cssAssetName,
+ originalFilename,
+ content: cssContent,
+ start: match.index,
+ end: match.index + full.length,
+ })
+ }
+ }
+
+ // should await even if this chunk does not include __VITE_CSS_URL__
+ // so that code after this line runs in the same order
+ await urlEmitQueue.run(async () =>
+ Promise.all(
+ urlEmitTasks.map(async (info) => {
+ info.content = await finalizeCss(info.content, true, config)
+ }),
+ ),
+ )
+ if (urlEmitTasks.length > 0) {
+ const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(
+ opts.format,
+ config.isWorker,
+ )
+ s ||= new MagicString(code)
+
+ for (const {
+ cssAssetName,
+ originalFilename,
+ content,
+ start,
+ end,
+ } of urlEmitTasks) {
+ const referenceId = this.emitFile({
+ name: cssAssetName,
+ type: 'asset',
+ source: content,
+ })
+ generatedAssets
+ .get(config)!
+ .set(referenceId, { originalName: originalFilename })
+
+ const replacement = toOutputFilePathInJS(
+ this.getFileName(referenceId),
+ 'asset',
+ chunk.fileName,
+ 'js',
+ config,
+ toRelativeRuntime,
+ )
+ const replacementString =
+ typeof replacement === 'string'
+ ? JSON.stringify(replacement).slice(1, -1)
+ : `"+${replacement.runtime}+"`
+ s.update(start, end, replacementString)
+ }
+ }
+
+ if (!chunkCSS && !s) {
+ return null
+ }
+
if (config.build.cssCodeSplit) {
if (opts.format === 'es' || opts.format === 'cjs') {
if (isPureCssChunk) {
@@ -633,22 +747,11 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
chunkCSS = resolveAssetUrlsInCss(chunkCSS, cssAssetName)
- const previousTask = emitTasks[emitTasks.length - 1]
- // finalizeCss is async which makes `emitFile` non-deterministic, so
- // we use a `.then` to wait for previous tasks before finishing this
- const thisTask = finalizeCss(chunkCSS, true, config).then((css) => {
- chunkCSS = css
- // make sure the previous task is also finished, this works recursively
- return previousTask
+ // wait for previous tasks as well
+ chunkCSS = await codeSplitEmitQueue.run(async () => {
+ return finalizeCss(chunkCSS, true, config)
})
- // push this task so the next task can wait for this one
- emitTasks.push(thisTask)
- const emitTasksLength = emitTasks.length
-
- // wait for this and previous tasks to finish
- await thisTask
-
// emit corresponding css file
const referenceId = this.emitFile({
name: cssAssetName,
@@ -659,11 +762,6 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
.get(config)!
.set(referenceId, { originalName: originalFilename, isEntry })
chunk.viteMetadata!.importedCss.add(this.getFileName(referenceId))
-
- if (emitTasksLength === emitTasks.length) {
- // this is the last task, clear `emitTasks` to free up memory
- emitTasks = []
- }
} else if (!config.build.ssr) {
// legacy build and inline css
@@ -697,24 +795,27 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
const insertMark = "'use strict';"
injectionPoint = code.indexOf(insertMark) + insertMark.length
}
- const s = new MagicString(code)
+ s ||= new MagicString(code)
s.appendRight(injectionPoint, injectCode)
- if (config.build.sourcemap) {
- // resolve public URL from CSS paths, we need to use absolute paths
- return {
- code: s.toString(),
- map: s.generateMap({ hires: 'boundary' }),
- }
- } else {
- return { code: s.toString() }
- }
}
} else {
+ // resolve public URL from CSS paths, we need to use absolute paths
chunkCSS = resolveAssetUrlsInCss(chunkCSS, cssBundleName)
// finalizeCss is called for the aggregated chunk in generateBundle
chunkCSSMap.set(chunk.fileName, chunkCSS)
}
+
+ if (s) {
+ if (config.build.sourcemap) {
+ return {
+ code: s.toString(),
+ map: s.generateMap({ hires: 'boundary' }),
+ }
+ } else {
+ return { code: s.toString() }
+ }
+ }
return null
},
@@ -824,6 +925,78 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
}
}
+export function cssAnalysisPlugin(config: ResolvedConfig): Plugin {
+ let server: ViteDevServer
+
+ return {
+ name: 'vite:css-analysis',
+
+ configureServer(_server) {
+ server = _server
+ },
+
+ async transform(_, id, options) {
+ if (
+ !isCSSRequest(id) ||
+ commonjsProxyRE.test(id) ||
+ SPECIAL_QUERY_RE.test(id)
+ ) {
+ return
+ }
+
+ const ssr = options?.ssr === true
+ const { moduleGraph } = server
+ const thisModule = moduleGraph.getModuleById(id)
+
+ // Handle CSS @import dependency HMR and other added modules via this.addWatchFile.
+ // JS-related HMR is handled in the import-analysis plugin.
+ if (thisModule) {
+ // CSS modules cannot self-accept since it exports values
+ const isSelfAccepting =
+ !cssModulesCache.get(config)?.get(id) &&
+ !inlineRE.test(id) &&
+ !htmlProxyRE.test(id)
+ // attached by pluginContainer.addWatchFile
+ const pluginImports = (this as any)._addedImports as
+ | Set
+ | undefined
+ if (pluginImports) {
+ // record deps in the module graph so edits to @import css can trigger
+ // main import to hot update
+ const depModules = new Set()
+ const devBase = config.base
+ for (const file of pluginImports) {
+ depModules.add(
+ isCSSRequest(file)
+ ? moduleGraph.createFileOnlyEntry(file)
+ : await moduleGraph.ensureEntryFromUrl(
+ stripBase(
+ await fileToUrl(file, config, this),
+ (config.server?.origin ?? '') + devBase,
+ ),
+ ssr,
+ ),
+ )
+ }
+ moduleGraph.updateModuleInfo(
+ thisModule,
+ depModules,
+ null,
+ // The root CSS proxy module is self-accepting and should not
+ // have an explicit accept list
+ new Set(),
+ null,
+ isSelfAccepting,
+ ssr,
+ )
+ } else {
+ thisModule.isSelfAccepting = isSelfAccepting
+ }
+ }
+ },
+ }
+}
+
/**
* Create a replacer function that takes code and replaces given pure CSS chunk imports
* @param pureCssChunkNames The chunks that only contain pure CSS and should be replaced
@@ -923,11 +1096,12 @@ async function compileCSSPreprocessors(
lang: PreprocessLang,
code: string,
config: ResolvedConfig,
+ workerController: PreprocessorWorkerController,
): Promise<{ code: string; map?: ExistingRawSourceMap; deps?: Set }> {
const { preprocessorOptions, devSourcemap } = config.css ?? {}
const atImportResolvers = getAtImportResolvers(config)
- const preProcessor = preProcessors[lang]
+ const preProcessor = workerController[lang]
let opts = (preprocessorOptions && preprocessorOptions[lang]) || {}
// support @import from node dependencies by default
switch (lang) {
@@ -1001,6 +1175,7 @@ async function compileCSS(
id: string,
code: string,
config: ResolvedConfig,
+ workerController: PreprocessorWorkerController,
urlReplacer?: CssUrlReplacer,
): Promise<{
code: string
@@ -1044,6 +1219,7 @@ async function compileCSS(
lang,
code,
config,
+ workerController,
)
code = preprocessorResult.code
preprocessorMap = preprocessorResult.map
@@ -1092,7 +1268,13 @@ async function compileCSS(
const code = await fs.promises.readFile(id, 'utf-8')
const lang = id.match(CSS_LANGS_RE)?.[1] as CssLang | undefined
if (isPreProcessor(lang)) {
- const result = await compileCSSPreprocessors(id, lang, code, config)
+ const result = await compileCSSPreprocessors(
+ id,
+ lang,
+ code,
+ config,
+ workerController,
+ )
result.deps?.forEach((dep) => deps.add(dep))
// TODO: support source map
return result.code
@@ -1159,10 +1341,7 @@ async function compileCSS(
// postcss is an unbundled dep and should be lazy imported
postcssResult = await postcss.default(postcssPlugins).process(code, {
...postcssOptions,
- parser:
- lang === 'sss'
- ? loadPreprocessor(PostCssDialectLang.sss, config.root)
- : postcssOptions.parser,
+ parser: lang === 'sss' ? loadSss(config.root) : postcssOptions.parser,
to: source,
from: source,
...(devSourcemap
@@ -1271,6 +1450,14 @@ const importPostcssImport = createCachedImport(() => import('postcss-import'))
const importPostcssModules = createCachedImport(() => import('postcss-modules'))
const importPostcss = createCachedImport(() => import('postcss'))
+const preprocessorWorkerControllerCache = new WeakMap<
+ ResolvedConfig,
+ PreprocessorWorkerController
+>()
+let alwaysFakeWorkerWorkerControllerCache:
+ | PreprocessorWorkerController
+ | undefined
+
export interface PreprocessCSSResult {
code: string
map?: SourceMapInput
@@ -1286,7 +1473,17 @@ export async function preprocessCSS(
filename: string,
config: ResolvedConfig,
): Promise {
- return await compileCSS(filename, code, config)
+ let workerController = preprocessorWorkerControllerCache.get(config)
+
+ if (!workerController) {
+ // if workerController doesn't exist, create a workerController that always uses fake workers
+ // because fake workers doesn't require calling `.close` unlike real workers
+ alwaysFakeWorkerWorkerControllerCache ||=
+ createPreprocessorWorkerController(0)
+ workerController = alwaysFakeWorkerWorkerControllerCache
+ }
+
+ return await compileCSS(filename, code, config, workerController)
}
export async function formatPostcssSourceMap(
@@ -1517,7 +1714,7 @@ function skipUrlReplacer(rawUrl: string) {
isExternalUrl(rawUrl) ||
isDataUrl(rawUrl) ||
rawUrl[0] === '#' ||
- varRE.test(rawUrl)
+ functionCallRE.test(rawUrl)
)
}
async function doUrlReplace(
@@ -1708,6 +1905,7 @@ type PreprocessorAdditionalData =
type StylePreprocessorOptions = {
[key: string]: any
additionalData?: PreprocessorAdditionalData
+ maxWorkers?: number | true
filename: string
alias: Alias[]
enableSourcemap: boolean
@@ -1719,26 +1917,35 @@ type StylusStylePreprocessorOptions = StylePreprocessorOptions & {
define?: Record
}
-type StylePreprocessor = (
- source: string,
- root: string,
- options: StylePreprocessorOptions,
- resolvers: CSSAtImportResolvers,
-) => StylePreprocessorResults | Promise
+type StylePreprocessor = {
+ process: (
+ source: string,
+ root: string,
+ options: StylePreprocessorOptions,
+ resolvers: CSSAtImportResolvers,
+ ) => StylePreprocessorResults | Promise
+ close: () => void
+}
-type SassStylePreprocessor = (
- source: string,
- root: string,
- options: SassStylePreprocessorOptions,
- resolvers: CSSAtImportResolvers,
-) => StylePreprocessorResults | Promise
+type SassStylePreprocessor = {
+ process: (
+ source: string,
+ root: string,
+ options: SassStylePreprocessorOptions,
+ resolvers: CSSAtImportResolvers,
+ ) => StylePreprocessorResults | Promise
+ close: () => void
+}
-type StylusStylePreprocessor = (
- source: string,
- root: string,
- options: StylusStylePreprocessorOptions,
- resolvers: CSSAtImportResolvers,
-) => StylePreprocessorResults | Promise
+type StylusStylePreprocessor = {
+ process: (
+ source: string,
+ root: string,
+ options: StylusStylePreprocessorOptions,
+ resolvers: CSSAtImportResolvers,
+ ) => StylePreprocessorResults | Promise
+ close: () => void
+}
export interface StylePreprocessorResults {
code: string
@@ -1748,34 +1955,21 @@ export interface StylePreprocessorResults {
deps: string[]
}
-const loadedPreprocessors: Partial<
- Record
+const loadedPreprocessorPath: Partial<
+ Record
> = {}
-// TODO: use dynamic import
-const _require = createRequire(import.meta.url)
-
-function loadPreprocessor(lang: PreprocessLang.scss, root: string): typeof Sass
-function loadPreprocessor(lang: PreprocessLang.sass, root: string): typeof Sass
-function loadPreprocessor(lang: PreprocessLang.less, root: string): typeof Less
-function loadPreprocessor(
- lang: PreprocessLang.stylus,
- root: string,
-): typeof Stylus
-function loadPreprocessor(
- lang: PostCssDialectLang.sss,
- root: string,
-): PostCSS.Parser
-function loadPreprocessor(
+function loadPreprocessorPath(
lang: PreprocessLang | PostCssDialectLang,
root: string,
-): any {
- if (lang in loadedPreprocessors) {
- return loadedPreprocessors[lang]
+): string {
+ const cached = loadedPreprocessorPath[lang]
+ if (cached) {
+ return cached
}
try {
const resolved = requireResolveFromRootWithFallback(root, lang)
- return (loadedPreprocessors[lang] = _require(resolved))
+ return (loadedPreprocessorPath[lang] = resolved)
} catch (e) {
if (e.code === 'MODULE_NOT_FOUND') {
const installCommand = getPackageManagerCommand('install')
@@ -1792,6 +1986,15 @@ function loadPreprocessor(
}
}
+let cachedSss: any
+function loadSss(root: string) {
+ if (cachedSss) return cachedSss
+
+ const sssPath = loadPreprocessorPath(PostCssDialectLang.sss, root)
+ cachedSss = createRequire(import.meta.url)(sssPath)
+ return cachedSss
+}
+
declare const window: unknown | undefined
declare const location: { href: string } | undefined
@@ -1831,95 +2034,172 @@ function fixScssBugImportValue(
}
// .scss/.sass processor
-const scss: SassStylePreprocessor = async (
- source,
- root,
- options,
- resolvers,
+const makeScssWorker = (
+ resolvers: CSSAtImportResolvers,
+ alias: Alias[],
+ maxWorkers: number | undefined,
) => {
- const render = loadPreprocessor(PreprocessLang.sass, root).render
- // NOTE: `sass` always runs it's own importer first, and only falls back to
- // the `importer` option when it can't resolve a path
- const internalImporter: Sass.Importer = (url, importer, done) => {
+ const internalImporter = async (
+ url: string,
+ importer: string,
+ filename: string,
+ ) => {
importer = cleanScssBugUrl(importer)
- resolvers.sass(url, importer).then((resolved) => {
- if (resolved) {
- rebaseUrls(resolved, options.filename, options.alias, '$')
- .then((data) => done?.(fixScssBugImportValue(data)))
- .catch((data) => done?.(data))
- } else {
- done?.(null)
+ const resolved = await resolvers.sass(url, importer)
+ if (resolved) {
+ try {
+ const data = await rebaseUrls(
+ resolved,
+ filename,
+ alias,
+ '$',
+ resolvers.sass,
+ )
+ return fixScssBugImportValue(data)
+ } catch (data) {
+ return data
}
- })
- }
- const importer = [internalImporter]
- if (options.importer) {
- Array.isArray(options.importer)
- ? importer.unshift(...options.importer)
- : importer.unshift(options.importer)
+ } else {
+ return null
+ }
}
- const { content: data, map: additionalMap } = await getSource(
- source,
- options.filename,
- options.additionalData,
- options.enableSourcemap,
- )
- const finalOptions: Sass.Options = {
- ...options,
- data,
- file: options.filename,
- outFile: options.filename,
- importer,
- ...(options.enableSourcemap
- ? {
- sourceMap: true,
- omitSourceMapUrl: true,
- sourceMapRoot: path.dirname(options.filename),
+ const worker = new WorkerWithFallback(
+ () =>
+ async (
+ sassPath: string,
+ data: string,
+ // additionalData can a function that is not cloneable but it won't be used
+ options: SassStylePreprocessorOptions & { additionalData: undefined },
+ ) => {
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside a cjs worker
+ const sass: typeof Sass = require(sassPath)
+ // eslint-disable-next-line no-restricted-globals
+ const path = require('node:path')
+
+ // NOTE: `sass` always runs it's own importer first, and only falls back to
+ // the `importer` option when it can't resolve a path
+ const _internalImporter: Sass.Importer = (url, importer, done) => {
+ internalImporter(url, importer, options.filename).then((data) =>
+ done?.(data),
+ )
}
- : {}),
- }
-
- try {
- const result = await new Promise((resolve, reject) => {
- render(finalOptions, (err, res) => {
- if (err) {
- reject(err)
- } else {
- resolve(res)
+ const importer = [_internalImporter]
+ if (options.importer) {
+ Array.isArray(options.importer)
+ ? importer.unshift(...options.importer)
+ : importer.unshift(options.importer)
}
- })
- })
- const deps = result.stats.includedFiles.map((f) => cleanScssBugUrl(f))
- const map: ExistingRawSourceMap | undefined = result.map
- ? JSON.parse(result.map.toString())
- : undefined
-
- return {
- code: result.css.toString(),
- map,
- additionalMap,
- deps,
- }
- } catch (e) {
- // normalize SASS error
- e.message = `[sass] ${e.message}`
- e.id = e.file
- e.frame = e.formatted
- return { code: '', error: e, deps: [] }
- }
-}
-const sass: SassStylePreprocessor = (source, root, options, aliasResolver) =>
- scss(
- source,
- root,
+ const finalOptions: Sass.Options = {
+ ...options,
+ data,
+ file: options.filename,
+ outFile: options.filename,
+ importer,
+ ...(options.enableSourcemap
+ ? {
+ sourceMap: true,
+ omitSourceMapUrl: true,
+ sourceMapRoot: path.dirname(options.filename),
+ }
+ : {}),
+ }
+ return new Promise<{
+ css: string
+ map?: string | undefined
+ stats: Sass.Result['stats']
+ }>((resolve, reject) => {
+ sass.render(finalOptions, (err, res) => {
+ if (err) {
+ reject(err)
+ } else {
+ resolve({
+ css: res.css.toString(),
+ map: res.map?.toString(),
+ stats: res.stats,
+ })
+ }
+ })
+ })
+ },
{
- ...options,
- indentedSyntax: true,
+ parentFunctions: { internalImporter },
+ shouldUseFake(_sassPath, _data, options) {
+ // functions and importer is a function and is not serializable
+ // in that case, fallback to running in main thread
+ return !!(
+ (options.functions && Object.keys(options.functions).length > 0) ||
+ (options.importer &&
+ (!Array.isArray(options.importer) || options.importer.length > 0))
+ )
+ },
+ max: maxWorkers,
},
- aliasResolver,
)
+ return worker
+}
+
+const scssProcessor = (
+ maxWorkers: number | undefined,
+): SassStylePreprocessor => {
+ const workerMap = new Map>()
+
+ return {
+ close() {
+ for (const worker of workerMap.values()) {
+ worker.stop()
+ }
+ },
+ async process(source, root, options, resolvers) {
+ const sassPath = loadPreprocessorPath(PreprocessLang.sass, root)
+
+ if (!workerMap.has(options.alias)) {
+ workerMap.set(
+ options.alias,
+ makeScssWorker(resolvers, options.alias, maxWorkers),
+ )
+ }
+ const worker = workerMap.get(options.alias)!
+
+ const { content: data, map: additionalMap } = await getSource(
+ source,
+ options.filename,
+ options.additionalData,
+ options.enableSourcemap,
+ )
+
+ const optionsWithoutAdditionalData = {
+ ...options,
+ additionalData: undefined,
+ }
+ try {
+ const result = await worker.run(
+ sassPath,
+ data,
+ optionsWithoutAdditionalData,
+ )
+ const deps = result.stats.includedFiles.map((f) => cleanScssBugUrl(f))
+ const map: ExistingRawSourceMap | undefined = result.map
+ ? JSON.parse(result.map.toString())
+ : undefined
+
+ return {
+ code: result.css.toString(),
+ map,
+ additionalMap,
+ deps,
+ }
+ } catch (e) {
+ // normalize SASS error
+ e.message = `[sass] ${e.message}`
+ e.id = e.file
+ e.frame = e.formatted
+ return { code: '', error: e, deps: [] }
+ }
+ },
+ }
+}
/**
* relative url() inside \@imported sass and less files must be rebased to use
@@ -1930,6 +2210,7 @@ async function rebaseUrls(
rootFile: string,
alias: Alias[],
variablePrefix: string,
+ resolver: ResolveFn,
): Promise {
file = path.resolve(file) // ensure os-specific flashes
// in the same dir, no need to rebase
@@ -1952,7 +2233,7 @@ async function rebaseUrls(
}
let rebased
- const rebaseFn = (url: string) => {
+ const rebaseFn = async (url: string) => {
if (url[0] === '/') return url
// ignore url's starting with variable
if (url.startsWith(variablePrefix)) return url
@@ -1964,7 +2245,7 @@ async function rebaseUrls(
return url
}
}
- const absolute = path.resolve(fileDir, url)
+ const absolute = (await resolver(url, file)) || path.resolve(fileDir, url)
const relative = path.relative(rootDir, absolute)
return normalizePath(relative)
}
@@ -1989,187 +2270,304 @@ async function rebaseUrls(
}
// .less
-const less: StylePreprocessor = async (source, root, options, resolvers) => {
- const nodeLess = loadPreprocessor(PreprocessLang.less, root)
- const viteResolverPlugin = createViteLessPlugin(
- nodeLess,
- options.filename,
- options.alias,
- resolvers,
- )
- const { content, map: additionalMap } = await getSource(
- source,
- options.filename,
- options.additionalData,
- options.enableSourcemap,
- )
-
- let result: Less.RenderOutput | undefined
- try {
- result = await nodeLess.render(content, {
- ...options,
- plugins: [viteResolverPlugin, ...(options.plugins || [])],
- ...(options.enableSourcemap
- ? {
- sourceMap: {
- outputSourceFiles: true,
- sourceMapFileInline: false,
- },
- }
- : {}),
- })
- } catch (e) {
- const error = e as Less.RenderError
- // normalize error info
- const normalizedError: RollupError = new Error(
- `[less] ${error.message || error.type}`,
- ) as RollupError
- normalizedError.loc = {
- file: error.filename || options.filename,
- line: error.line,
- column: error.column,
+const makeLessWorker = (
+ resolvers: CSSAtImportResolvers,
+ alias: Alias[],
+ maxWorkers: number | undefined,
+) => {
+ const viteLessResolve = async (
+ filename: string,
+ dir: string,
+ rootFile: string,
+ ) => {
+ const resolved = await resolvers.less(filename, path.join(dir, '*'))
+ if (!resolved) return undefined
+
+ const result = await rebaseUrls(
+ resolved,
+ rootFile,
+ alias,
+ '@',
+ resolvers.less,
+ )
+ if (result) {
+ return {
+ resolved,
+ contents: 'contents' in result ? result.contents : undefined,
+ }
}
- return { code: '', error: normalizedError, deps: [] }
+ return result
}
- const map: ExistingRawSourceMap = result.map && JSON.parse(result.map)
- if (map) {
- delete map.sourcesContent
- }
+ const worker = new WorkerWithFallback(
+ () => {
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside a cjs worker
+ const fsp = require('node:fs/promises')
+ // eslint-disable-next-line no-restricted-globals
+ const path = require('node:path')
- return {
- code: result.css.toString(),
- map,
- additionalMap,
- deps: result.imports,
- }
+ let ViteLessManager: any
+ const createViteLessPlugin = (
+ less: typeof Less,
+ rootFile: string,
+ ): Less.Plugin => {
+ const { FileManager } = less
+ ViteLessManager ??= class ViteManager extends FileManager {
+ rootFile
+ constructor(rootFile: string) {
+ super()
+ this.rootFile = rootFile
+ }
+ override supports(filename: string) {
+ return !/^(?:https?:)?\/\//.test(filename)
+ }
+ override supportsSync() {
+ return false
+ }
+ override async loadFile(
+ filename: string,
+ dir: string,
+ opts: any,
+ env: any,
+ ): Promise {
+ const result = await viteLessResolve(filename, dir, this.rootFile)
+ if (result) {
+ return {
+ filename: path.resolve(result.resolved),
+ contents:
+ result.contents ??
+ (await fsp.readFile(result.resolved, 'utf-8')),
+ }
+ } else {
+ return super.loadFile(filename, dir, opts, env)
+ }
+ }
+ }
+
+ return {
+ install(_, pluginManager) {
+ pluginManager.addFileManager(new ViteLessManager(rootFile))
+ },
+ minVersion: [3, 0, 0],
+ }
+ }
+
+ return async (
+ lessPath: string,
+ content: string,
+ // additionalData can a function that is not cloneable but it won't be used
+ options: StylePreprocessorOptions & { additionalData: undefined },
+ ) => {
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside a cjs worker
+ const nodeLess: typeof Less = require(lessPath)
+ const viteResolverPlugin = createViteLessPlugin(
+ nodeLess,
+ options.filename,
+ )
+ const result = await nodeLess.render(content, {
+ ...options,
+ plugins: [viteResolverPlugin, ...(options.plugins || [])],
+ ...(options.enableSourcemap
+ ? {
+ sourceMap: {
+ outputSourceFiles: true,
+ sourceMapFileInline: false,
+ },
+ }
+ : {}),
+ })
+ return result
+ }
+ },
+ {
+ parentFunctions: { viteLessResolve },
+ shouldUseFake(_lessPath, _content, options) {
+ // plugins are a function and is not serializable
+ // in that case, fallback to running in main thread
+ return options.plugins?.length > 0
+ },
+ max: maxWorkers,
+ },
+ )
+ return worker
}
-/**
- * Less manager, lazy initialized
- */
-let ViteLessManager: any
+const lessProcessor = (maxWorkers: number | undefined): StylePreprocessor => {
+ const workerMap = new Map>()
-function createViteLessPlugin(
- less: typeof Less,
- rootFile: string,
- alias: Alias[],
- resolvers: CSSAtImportResolvers,
-): Less.Plugin {
- if (!ViteLessManager) {
- ViteLessManager = class ViteManager extends less.FileManager {
- resolvers
- rootFile
- alias
- constructor(
- rootFile: string,
- resolvers: CSSAtImportResolvers,
- alias: Alias[],
- ) {
- super()
- this.rootFile = rootFile
- this.resolvers = resolvers
- this.alias = alias
+ return {
+ close() {
+ for (const worker of workerMap.values()) {
+ worker.stop()
}
- override supports(filename: string) {
- return !isExternalUrl(filename)
+ },
+ async process(source, root, options, resolvers) {
+ const lessPath = loadPreprocessorPath(PreprocessLang.less, root)
+
+ if (!workerMap.has(options.alias)) {
+ workerMap.set(
+ options.alias,
+ makeLessWorker(resolvers, options.alias, maxWorkers),
+ )
}
- override supportsSync() {
- return false
+ const worker = workerMap.get(options.alias)!
+
+ const { content, map: additionalMap } = await getSource(
+ source,
+ options.filename,
+ options.additionalData,
+ options.enableSourcemap,
+ )
+
+ let result: Less.RenderOutput | undefined
+ const optionsWithoutAdditionalData = {
+ ...options,
+ additionalData: undefined,
}
- override async loadFile(
- filename: string,
- dir: string,
- opts: any,
- env: any,
- ): Promise {
- const resolved = await this.resolvers.less(
- filename,
- path.join(dir, '*'),
+ try {
+ result = await worker.run(
+ lessPath,
+ content,
+ optionsWithoutAdditionalData,
)
- if (resolved) {
- const result = await rebaseUrls(
- resolved,
- this.rootFile,
- this.alias,
- '@',
- )
- let contents: string
- if (result && 'contents' in result) {
- contents = result.contents
- } else {
- contents = await fsp.readFile(resolved, 'utf-8')
- }
- return {
- filename: path.resolve(resolved),
- contents,
- }
- } else {
- return super.loadFile(filename, dir, opts, env)
+ } catch (e) {
+ const error = e as Less.RenderError
+ // normalize error info
+ const normalizedError: RollupError = new Error(
+ `[less] ${error.message || error.type}`,
+ ) as RollupError
+ normalizedError.loc = {
+ file: error.filename || options.filename,
+ line: error.line,
+ column: error.column,
}
+ return { code: '', error: normalizedError, deps: [] }
}
- }
- }
- return {
- install(_, pluginManager) {
- pluginManager.addFileManager(
- new ViteLessManager(rootFile, resolvers, alias),
- )
+ const map: ExistingRawSourceMap = result.map && JSON.parse(result.map)
+ if (map) {
+ delete map.sourcesContent
+ }
+
+ return {
+ code: result.css.toString(),
+ map,
+ additionalMap,
+ deps: result.imports,
+ }
},
- minVersion: [3, 0, 0],
}
}
// .styl
-const styl: StylusStylePreprocessor = async (source, root, options) => {
- const nodeStylus = loadPreprocessor(PreprocessLang.stylus, root)
- // Get source with preprocessor options.additionalData. Make sure a new line separator
- // is added to avoid any render error, as added stylus content may not have semi-colon separators
- const { content, map: additionalMap } = await getSource(
- source,
- options.filename,
- options.additionalData,
- options.enableSourcemap,
- '\n',
- )
- // Get preprocessor options.imports dependencies as stylus
- // does not return them with its builtin `.deps()` method
- const importsDeps = (options.imports ?? []).map((dep: string) =>
- path.resolve(dep),
- )
- try {
- const ref = nodeStylus(content, options)
- if (options.define) {
- for (const key in options.define) {
- ref.define(key, options.define[key])
- }
- }
- if (options.enableSourcemap) {
- ref.set('sourcemap', {
- comment: false,
- inline: false,
- basePath: root,
- })
- }
+const makeStylWorker = (maxWorkers: number | undefined) => {
+ const worker = new WorkerWithFallback(
+ () => {
+ return async (
+ stylusPath: string,
+ content: string,
+ root: string,
+ // additionalData can a function that is not cloneable but it won't be used
+ options: StylusStylePreprocessorOptions & { additionalData: undefined },
+ ) => {
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside a cjs worker
+ const nodeStylus: typeof Stylus = require(stylusPath)
+
+ const ref = nodeStylus(content, options)
+ if (options.define) {
+ for (const key in options.define) {
+ ref.define(key, options.define[key])
+ }
+ }
+ if (options.enableSourcemap) {
+ ref.set('sourcemap', {
+ comment: false,
+ inline: false,
+ basePath: root,
+ })
+ }
- const result = ref.render()
+ return {
+ code: ref.render(),
+ // @ts-expect-error sourcemap exists
+ map: ref.sourcemap as ExistingRawSourceMap | undefined,
+ deps: ref.deps(),
+ }
+ }
+ },
+ {
+ shouldUseFake(_stylusPath, _content, _root, options) {
+ // define can include functions and those are not serializable
+ // in that case, fallback to running in main thread
+ return !!(
+ options.define &&
+ Object.values(options.define).some((d) => typeof d === 'function')
+ )
+ },
+ max: maxWorkers,
+ },
+ )
+ return worker
+}
- // Concat imports deps with computed deps
- const deps = [...ref.deps(), ...importsDeps]
+const stylProcessor = (
+ maxWorkers: number | undefined,
+): StylusStylePreprocessor => {
+ const workerMap = new Map>()
- // @ts-expect-error sourcemap exists
- const map: ExistingRawSourceMap | undefined = ref.sourcemap
+ return {
+ close() {
+ for (const worker of workerMap.values()) {
+ worker.stop()
+ }
+ },
+ async process(source, root, options, resolvers) {
+ const stylusPath = loadPreprocessorPath(PreprocessLang.stylus, root)
- return {
- code: result,
- map: formatStylusSourceMap(map, root),
- additionalMap,
- deps,
- }
- } catch (e) {
- e.message = `[stylus] ${e.message}`
- return { code: '', error: e, deps: [] }
+ if (!workerMap.has(options.alias)) {
+ workerMap.set(options.alias, makeStylWorker(maxWorkers))
+ }
+ const worker = workerMap.get(options.alias)!
+
+ // Get source with preprocessor options.additionalData. Make sure a new line separator
+ // is added to avoid any render error, as added stylus content may not have semi-colon separators
+ const { content, map: additionalMap } = await getSource(
+ source,
+ options.filename,
+ options.additionalData,
+ options.enableSourcemap,
+ '\n',
+ )
+ // Get preprocessor options.imports dependencies as stylus
+ // does not return them with its builtin `.deps()` method
+ const importsDeps = (options.imports ?? []).map((dep: string) =>
+ path.resolve(dep),
+ )
+ const optionsWithoutAdditionalData = {
+ ...options,
+ additionalData: undefined,
+ }
+ try {
+ const { code, map, deps } = await worker.run(
+ stylusPath,
+ content,
+ root,
+ optionsWithoutAdditionalData,
+ )
+ return {
+ code,
+ map: formatStylusSourceMap(map, root),
+ additionalMap,
+ // Concat imports deps with computed deps
+ deps: [...deps, ...importsDeps],
+ }
+ } catch (e) {
+ const wrapped = new Error(`[stylus] ${e.message}`)
+ wrapped.name = e.name
+ wrapped.stack = e.stack
+ return { code: '', error: wrapped, deps: [] }
+ }
+ },
}
}
@@ -2225,16 +2623,61 @@ async function getSource(
}
}
-const preProcessors = Object.freeze({
- [PreprocessLang.less]: less,
- [PreprocessLang.sass]: sass,
- [PreprocessLang.scss]: scss,
- [PreprocessLang.styl]: styl,
- [PreprocessLang.stylus]: styl,
-})
+const createPreprocessorWorkerController = (maxWorkers: number | undefined) => {
+ const scss = scssProcessor(maxWorkers)
+ const less = lessProcessor(maxWorkers)
+ const styl = stylProcessor(maxWorkers)
+
+ const sassProcess: StylePreprocessor['process'] = (
+ source,
+ root,
+ options,
+ resolvers,
+ ) => {
+ return scss.process(
+ source,
+ root,
+ { ...options, indentedSyntax: true },
+ resolvers,
+ )
+ }
+
+ const close = () => {
+ less.close()
+ scss.close()
+ styl.close()
+ }
+
+ return {
+ [PreprocessLang.less]: less.process,
+ [PreprocessLang.scss]: scss.process,
+ [PreprocessLang.sass]: sassProcess,
+ [PreprocessLang.styl]: styl.process,
+ [PreprocessLang.stylus]: styl.process,
+ close,
+ } as const satisfies { [K in PreprocessLang | 'close']: unknown }
+}
+
+const normalizeMaxWorkers = (maxWorker: number | true | undefined) => {
+ if (maxWorker === undefined) return 0
+ if (maxWorker === true) return undefined
+ return maxWorker
+}
+
+type PreprocessorWorkerController = ReturnType<
+ typeof createPreprocessorWorkerController
+>
+
+const preprocessorSet = new Set([
+ PreprocessLang.less,
+ PreprocessLang.sass,
+ PreprocessLang.scss,
+ PreprocessLang.styl,
+ PreprocessLang.stylus,
+] as const)
function isPreProcessor(lang: any): lang is PreprocessLang {
- return lang && lang in preProcessors
+ return lang && preprocessorSet.has(lang)
}
const importLightningCSS = createCachedImport(() => import('lightningcss'))
diff --git a/packages/vite/src/node/plugins/dynamicImportVars.ts b/packages/vite/src/node/plugins/dynamicImportVars.ts
index 0b97da2627f49c..a92992800a7473 100644
--- a/packages/vite/src/node/plugins/dynamicImportVars.ts
+++ b/packages/vite/src/node/plugins/dynamicImportVars.ts
@@ -4,20 +4,21 @@ import { init, parse as parseImports } from 'es-module-lexer'
import type { ImportSpecifier } from 'es-module-lexer'
import { parse as parseJS } from 'acorn'
import { dynamicImportToGlob } from '@rollup/plugin-dynamic-import-vars'
-import type { KnownAsTypeMap } from 'types/importGlob'
import type { Plugin } from '../plugin'
import type { ResolvedConfig } from '../config'
import { CLIENT_ENTRY } from '../constants'
import {
createFilter,
normalizePath,
- parseRequest,
+ rawRE,
requestQueryMaybeEscapedSplitRE,
requestQuerySplitRE,
transformStableResult,
+ urlRE,
} from '../utils'
import { toAbsoluteGlob } from './importMetaGlob'
import { hasViteIgnoreRE } from './importAnalysis'
+import { workerOrSharedWorkerRE } from './worker'
export const dynamicImportHelperId = '\0vite/dynamic-import-helper.js'
@@ -28,8 +29,7 @@ const relativePathRE = /^\.{1,2}\//
const hasDynamicImportRE = /\bimport\s*[(/]/
interface DynamicImportRequest {
- as?: keyof KnownAsTypeMap
- query?: Record
+ query?: string | Record
import?: string
}
@@ -55,9 +55,6 @@ function parseDynamicImportPattern(
strings: string,
): DynamicImportPattern | null {
const filename = strings.slice(1, -1)
- const rawQuery = parseRequest(filename)
- let globParams: DynamicImportRequest | null = null
-
const ast = (
parseJS(strings, {
ecmaVersion: 'latest',
@@ -75,20 +72,23 @@ function parseDynamicImportPattern(
requestQueryMaybeEscapedSplitRE,
2,
)
- const [rawPattern] = filename.split(requestQuerySplitRE, 2)
-
- const as = (['worker', 'url', 'raw'] as const).find(
- (key) => rawQuery && key in rawQuery,
- )
-
- if (as) {
- globParams = {
- as,
- import: '*',
- }
- } else if (rawQuery) {
- globParams = {
- query: rawQuery,
+ let [rawPattern, search] = filename.split(requestQuerySplitRE, 2)
+ let globParams: DynamicImportRequest | null = null
+ if (search) {
+ search = '?' + search
+ if (
+ workerOrSharedWorkerRE.test(search) ||
+ urlRE.test(search) ||
+ rawRE.test(search)
+ ) {
+ globParams = {
+ query: search,
+ import: '*',
+ }
+ } else {
+ globParams = {
+ query: search,
+ }
}
}
diff --git a/packages/vite/src/node/plugins/esbuild.ts b/packages/vite/src/node/plugins/esbuild.ts
index a62f041fcb38f4..ea0c1604beac4a 100644
--- a/packages/vite/src/node/plugins/esbuild.ts
+++ b/packages/vite/src/node/plugins/esbuild.ts
@@ -444,14 +444,7 @@ async function loadTsconfigJsonForFile(
filename: string,
): Promise {
try {
- if (tsconfckCache) {
- // shortcut, the cache stores resolved TSConfckParseResult
- // so getting it from the cache directly we bypass async fn call wrapping it in a promise again
- if (tsconfckCache.hasParseResult(filename)) {
- const result = await tsconfckCache.getParseResult(filename)
- return result.tsconfig
- }
- } else {
+ if (!tsconfckCache) {
tsconfckCache = new TSConfckCache()
}
const result = await parse(filename, {
@@ -498,7 +491,7 @@ async function reloadOnTsconfigChange(changedFile: string) {
// server may not be available if vite config is updated at the same time
if (server) {
// force full reload
- server.ws.send({
+ server.hot.send({
type: 'full-reload',
path: '*',
})
diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts
index b9fe1637dd066a..afe39112ce0264 100644
--- a/packages/vite/src/node/plugins/html.ts
+++ b/packages/vite/src/node/plugins/html.ts
@@ -45,6 +45,8 @@ interface ScriptAssetsUrl {
const htmlProxyRE =
/\?html-proxy=?(?:&inline-css)?(?:&style-attr)?&index=(\d+)\.(js|css)$/
+const isHtmlProxyRE = /\?html-proxy\b/
+
const inlineCSSRE = /__VITE_INLINE_CSS__([a-z\d]{8}_\d+)__/g
// Do not allow preceding '.', but do allow preceding '...' for spread operations
const inlineImportRE =
@@ -63,7 +65,7 @@ const importMapAppendRE = new RegExp(
'i',
)
-export const isHTMLProxy = (id: string): boolean => htmlProxyRE.test(id)
+export const isHTMLProxy = (id: string): boolean => isHtmlProxyRE.test(id)
export const isHTMLRequest = (request: string): boolean =>
htmlLangRE.test(request)
@@ -88,7 +90,7 @@ export function htmlInlineProxyPlugin(config: ResolvedConfig): Plugin {
name: 'vite:html-inline-proxy',
resolveId(id) {
- if (htmlProxyRE.test(id)) {
+ if (isHTMLProxy(id)) {
return id
}
},
@@ -322,10 +324,8 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {
async transform(html, id) {
if (id.endsWith('.html')) {
- const relativeUrlPath = path.posix.relative(
- config.root,
- normalizePath(id),
- )
+ id = normalizePath(id)
+ const relativeUrlPath = path.posix.relative(config.root, id)
const publicPath = `/${relativeUrlPath}`
const publicBase = getBaseInHTML(relativeUrlPath, config)
@@ -345,18 +345,13 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {
const nodeStartWithLeadingWhitespace = (
node: DefaultTreeAdapterMap['node'],
) => {
- if (node.sourceCodeLocation!.startOffset === 0)
- return node.sourceCodeLocation!.startOffset
+ const startOffset = node.sourceCodeLocation!.startOffset
+ if (startOffset === 0) return 0
// Gets the offset for the start of the line including the
// newline trailing the previous node
const lineStartOffset =
- node.sourceCodeLocation!.startOffset -
- node.sourceCodeLocation!.startCol
- const line = s.slice(
- Math.max(0, lineStartOffset),
- node.sourceCodeLocation!.startOffset,
- )
+ startOffset - node.sourceCodeLocation!.startCol
//
//
@@ -369,9 +364,16 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {
//
// However, if there is content between our target node start and the
// previous newline, we cannot strip it out without risking content deletion.
- return line.trim()
- ? node.sourceCodeLocation!.startOffset
- : lineStartOffset
+ let isLineEmpty = false
+ try {
+ const line = s.slice(Math.max(0, lineStartOffset), startOffset)
+ isLineEmpty = !line.trim()
+ } catch {
+ // magic-string may throw if there's some content removed in the sliced string,
+ // which we ignore and assume the line is not empty
+ }
+
+ return isLineEmpty ? lineStartOffset : startOffset
}
// pre-transform
@@ -1201,27 +1203,31 @@ export async function applyHtmlTransforms(
tags = res.tags
}
- const headTags: HtmlTagDescriptor[] = []
- const headPrependTags: HtmlTagDescriptor[] = []
- const bodyTags: HtmlTagDescriptor[] = []
- const bodyPrependTags: HtmlTagDescriptor[] = []
+ let headTags: HtmlTagDescriptor[] | undefined
+ let headPrependTags: HtmlTagDescriptor[] | undefined
+ let bodyTags: HtmlTagDescriptor[] | undefined
+ let bodyPrependTags: HtmlTagDescriptor[] | undefined
for (const tag of tags) {
- if (tag.injectTo === 'body') {
- bodyTags.push(tag)
- } else if (tag.injectTo === 'body-prepend') {
- bodyPrependTags.push(tag)
- } else if (tag.injectTo === 'head') {
- headTags.push(tag)
- } else {
- headPrependTags.push(tag)
+ switch (tag.injectTo) {
+ case 'body':
+ ;(bodyTags ??= []).push(tag)
+ break
+ case 'body-prepend':
+ ;(bodyPrependTags ??= []).push(tag)
+ break
+ case 'head':
+ ;(headTags ??= []).push(tag)
+ break
+ default:
+ ;(headPrependTags ??= []).push(tag)
}
}
- html = injectToHead(html, headPrependTags, true)
- html = injectToHead(html, headTags)
- html = injectToBody(html, bodyPrependTags, true)
- html = injectToBody(html, bodyTags)
+ if (headPrependTags) html = injectToHead(html, headPrependTags, true)
+ if (headTags) html = injectToHead(html, headTags)
+ if (bodyPrependTags) html = injectToBody(html, bodyPrependTags, true)
+ if (bodyTags) html = injectToBody(html, bodyTags)
}
}
diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts
index 575eeeb35646ae..8454c4016c7811 100644
--- a/packages/vite/src/node/plugins/importAnalysis.ts
+++ b/packages/vite/src/node/plugins/importAnalysis.ts
@@ -43,11 +43,13 @@ import {
normalizePath,
prettifyUrl,
removeImportQuery,
+ removeTimestampQuery,
stripBase,
stripBomTag,
timeFrom,
transformStableResult,
unwrapId,
+ urlRE,
withTrailingSlash,
wrapId,
} from '../utils'
@@ -58,7 +60,6 @@ import type { ResolvedConfig } from '../config'
import type { Plugin } from '../plugin'
import { shouldExternalizeForSSR } from '../ssr/ssrExternal'
import { getDepsOptimizer, optimizedDepNeedsInterop } from '../optimizer'
-import { urlRE } from './asset'
import { throwOutdatedRequest } from './optimizedDeps'
import { isCSSRequest, isDirectCSSRequest } from './css'
import { browserExternalId } from './resolve'
@@ -76,8 +77,6 @@ export const canSkipImportAnalysis = (id: string): boolean =>
const optimizedDepChunkRE = /\/chunk-[A-Z\d]{8}\.js/
const optimizedDepDynamicRE = /-[A-Z\d]{8}\.js/
-const hasImportInQueryParamsRE = /[?&]import=?\b/
-
export const hasViteIgnoreRE = /\/\*\s*@vite-ignore\s*\*\//
const urlIsStringRE = /^(?:'.*'|".*"|`.*`)$/
@@ -91,14 +90,7 @@ interface UrlPosition {
}
export function isExplicitImportRequired(url: string): boolean {
- return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url)
-}
-
-function markExplicitImport(url: string) {
- if (isExplicitImportRequired(url)) {
- return injectQuery(url, 'import')
- }
- return url
+ return !isJSRequest(url) && !isCSSRequest(url)
}
function extractImportedBindings(
@@ -226,7 +218,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
return null
}
- const start = performance.now()
+ const msAtStart = debug ? performance.now() : 0
await init
let imports!: readonly ImportSpecifier[]
let exports!: readonly ExportSpecifier[]
@@ -259,7 +251,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
if (!imports.length && !(this as any)._addedImports) {
importerModule.isSelfAccepting = false
debug?.(
- `${timeFrom(start)} ${colors.dim(
+ `${timeFrom(msAtStart)} ${colors.dim(
`[no imports] ${prettifyUrl(importer, root)}`,
)}`,
)
@@ -338,7 +330,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
url = resolved.id.slice(root.length)
} else if (
depsOptimizer?.isOptimizedDepFile(resolved.id) ||
- (path.isAbsolute(cleanUrl(resolved.id)) &&
+ // vite-plugin-react isn't following the leading \0 virtual module convention.
+ // This is a temporary hack to avoid expensive fs checks for React apps.
+ // We'll remove this as soon we're able to fix the react plugins.
+ (resolved.id !== '/@react-refresh' &&
+ path.isAbsolute(resolved.id) &&
fsUtils.existsSync(cleanUrl(resolved.id)))
) {
// an optimized deps may not yet exists in the filesystem, or
@@ -358,18 +354,17 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
// make the URL browser-valid if not SSR
if (!ssr) {
// mark non-js/css imports with `?import`
- url = markExplicitImport(url)
-
- // If the url isn't a request for a pre-bundled common chunk,
- // for relative js/css imports, or self-module virtual imports
- // (e.g. vue blocks), inherit importer's version query
- // do not do this for unknown type imports, otherwise the appended
- // query can break 3rd party plugin's extension checks.
- if (
+ if (isExplicitImportRequired(url)) {
+ url = injectQuery(url, 'import')
+ } else if (
(isRelative || isSelfImport) &&
- !hasImportInQueryParamsRE.test(url) &&
!DEP_VERSION_RE.test(url)
) {
+ // If the url isn't a request for a pre-bundled common chunk,
+ // for relative js/css imports, or self-module virtual imports
+ // (e.g. vue blocks), inherit importer's version query
+ // do not do this for unknown type imports, otherwise the appended
+ // query can break 3rd party plugin's extension checks.
const versionMatch = importer.match(DEP_VERSION_RE)
if (versionMatch) {
url = injectQuery(url, versionMatch[1])
@@ -681,7 +676,9 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
// `importedUrls` will be mixed with watched files for the module graph,
// `staticImportedUrls` will only contain the static top-level imports and
// dynamic imports
- const staticImportedUrls = new Set(_orderedImportedUrls)
+ const staticImportedUrls = new Set(
+ _orderedImportedUrls.map((url) => removeTimestampQuery(url)),
+ )
const acceptedUrls = mergeAcceptedUrls(orderedAcceptedUrls)
const acceptedExports = mergeAcceptedUrls(orderedAcceptedExports)
@@ -740,7 +737,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
}
// update the module graph for HMR analysis.
- // node CSS imports does its own graph update in the css plugin so we
+ // node CSS imports does its own graph update in the css-analysis plugin so we
// only handle js graph updates here.
if (!isCSSRequest(importer)) {
// attached by pluginContainer.addWatchFile
@@ -786,7 +783,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
}
debug?.(
- `${timeFrom(start)} ${colors.dim(
+ `${timeFrom(msAtStart)} ${colors.dim(
`[${importedUrls.size} imports rewritten] ${prettifyUrl(
importer,
root,
@@ -843,6 +840,8 @@ export function createParseErrorInfo(
showCodeFrame: !probablyBinary,
}
}
+// prettier-ignore
+const interopHelper = (m: any) => m?.__esModule ? m : { ...(typeof m === 'object' && !Array.isArray(m) ? m : {}), default: m }
export function interopNamedImports(
str: MagicString,
@@ -866,7 +865,7 @@ export function interopNamedImports(
str.overwrite(
expStart,
expEnd,
- `import('${rewrittenUrl}').then(m => m.default && m.default.__esModule ? m.default : ({ ...m.default, default: m.default }))` +
+ `import('${rewrittenUrl}').then(m => (${interopHelper.toString()})(m.default))` +
getLineBreaks(exp),
{ contentOnly: true },
)
@@ -1002,7 +1001,9 @@ export function transformCjsImport(
const lines: string[] = [`import ${cjsModuleName} from "${url}"`]
importNames.forEach(({ importedName, localName }) => {
if (importedName === '*') {
- lines.push(`const ${localName} = ${cjsModuleName}`)
+ lines.push(
+ `const ${localName} = (${interopHelper.toString()})(${cjsModuleName})`,
+ )
} else if (importedName === 'default') {
lines.push(
`const ${localName} = ${cjsModuleName}.__esModule ? ${cjsModuleName}.default : ${cjsModuleName}`,
diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts
index 16e51e287db3a7..da43afbe668a09 100644
--- a/packages/vite/src/node/plugins/importAnalysisBuild.ts
+++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts
@@ -6,28 +6,20 @@ import type {
} from 'es-module-lexer'
import { init, parse as parseImports } from 'es-module-lexer'
import type { OutputChunk, SourceMap } from 'rollup'
-import colors from 'picocolors'
import type { RawSourceMap } from '@ampproject/remapping'
import convertSourceMap from 'convert-source-map'
import {
- cleanUrl,
combineSourcemaps,
generateCodeFrame,
- isDataUrl,
- isExternalUrl,
isInNodeModules,
- moduleListContains,
numberToPos,
- withTrailingSlash,
} from '../utils'
import type { Plugin } from '../plugin'
-import { getDepOptimizationConfig } from '../config'
import type { ResolvedConfig } from '../config'
import { toOutputFilePathInJS } from '../build'
import { genSourceMapUrl } from '../server/sourcemap'
-import { getDepsOptimizer, optimizedDepNeedsInterop } from '../optimizer'
import { removedPureCssFilesCache } from './css'
-import { createParseErrorInfo, interopNamedImports } from './importAnalysis'
+import { createParseErrorInfo } from './importAnalysis'
type FileDep = {
url: string
@@ -49,10 +41,6 @@ const preloadMarkerWithQuote = new RegExp(`['"]${preloadMarker}['"]`, 'g')
const dynamicImportPrefixRE = /import\s*\(/
-// TODO: abstract
-const optimizedDepChunkRE = /\/chunk-[A-Z\d]{8}\.js/
-const optimizedDepDynamicRE = /-[A-Z\d]{8}\.js/
-
function toRelativePath(filename: string, importer: string) {
const relPath = path.posix.relative(path.posix.dirname(importer), filename)
return relPath[0] === '.' ? relPath : `./${relPath}`
@@ -237,78 +225,15 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
return null
}
- const { root } = config
- const depsOptimizer = getDepsOptimizer(config, ssr)
-
- const normalizeUrl = async (
- url: string,
- pos: number,
- ): Promise<[string, string]> => {
- let importerFile = importer
-
- const optimizeDeps = getDepOptimizationConfig(config, ssr)
- if (moduleListContains(optimizeDeps?.exclude, url)) {
- if (depsOptimizer) {
- await depsOptimizer.scanProcessing
-
- // if the dependency encountered in the optimized file was excluded from the optimization
- // the dependency needs to be resolved starting from the original source location of the optimized file
- // because starting from node_modules/.vite will not find the dependency if it was not hoisted
- // (that is, if it is under node_modules directory in the package source of the optimized file)
- for (const optimizedModule of depsOptimizer.metadata.depInfoList) {
- if (!optimizedModule.src) continue // Ignore chunks
- if (optimizedModule.file === importer) {
- importerFile = optimizedModule.src
- }
- }
- }
- }
-
- const resolved = await this.resolve(url, importerFile, {
- skipSelf: false,
- })
-
- if (!resolved) {
- // in ssr, we should let node handle the missing modules
- if (ssr) {
- return [url, url]
- }
- return this.error(
- `Failed to resolve import "${url}" from "${path.relative(
- process.cwd(),
- importerFile,
- )}". Does the file exist?`,
- pos,
- )
- }
-
- // normalize all imports into resolved URLs
- // e.g. `import 'foo'` -> `import '/@fs/.../node_modules/foo/index.js'`
- if (resolved.id.startsWith(withTrailingSlash(root))) {
- // in root: infer short absolute path from root
- url = resolved.id.slice(root.length)
- } else {
- url = resolved.id
- }
-
- if (isExternalUrl(url)) {
- return [url, url]
- }
-
- return [url, resolved.id]
- }
-
let s: MagicString | undefined
const str = () => s || (s = new MagicString(source))
let needPreloadHelper = false
for (let index = 0; index < imports.length; index++) {
const {
- s: start,
e: end,
ss: expStart,
se: expEnd,
- n: specifier,
d: dynamicIndex,
a: attributeIndex,
} = imports[index]
@@ -332,66 +257,6 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
})`,
)
}
-
- // static import or valid string in dynamic import
- // If resolvable, let's resolve it
- if (depsOptimizer && specifier) {
- // skip external / data uri
- if (isExternalUrl(specifier) || isDataUrl(specifier)) {
- continue
- }
-
- // normalize
- const [url, resolvedId] = await normalizeUrl(specifier, start)
-
- if (url !== specifier) {
- if (
- depsOptimizer.isOptimizedDepFile(resolvedId) &&
- !optimizedDepChunkRE.test(resolvedId)
- ) {
- const file = cleanUrl(resolvedId) // Remove ?v={hash}
-
- const needsInterop = await optimizedDepNeedsInterop(
- depsOptimizer.metadata,
- file,
- config,
- ssr,
- )
-
- let rewriteDone = false
-
- if (needsInterop === undefined) {
- // Non-entry dynamic imports from dependencies will reach here as there isn't
- // optimize info for them, but they don't need es interop. If the request isn't
- // a dynamic import, then it is an internal Vite error
- if (!optimizedDepDynamicRE.test(file)) {
- config.logger.error(
- colors.red(
- `Vite Error, ${url} optimized info should be defined`,
- ),
- )
- }
- } else if (needsInterop) {
- // config.logger.info(`${url} needs interop`)
- interopNamedImports(
- str(),
- imports[index],
- url,
- index,
- importer,
- config,
- )
- rewriteDone = true
- }
- if (!rewriteDone) {
- const rewrittenUrl = JSON.stringify(file)
- const s = isDynamicImport ? start : start - 1
- const e = isDynamicImport ? end : end + 1
- str().update(s, e, rewrittenUrl)
- }
- }
- }
- }
}
if (
@@ -634,13 +499,22 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
)
.join(',')}]`
- s.append(`\
+ const mapDepsCode = `\
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ${fileDepsCode}
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
-}`)
+}\n`
+
+ // inject extra code before sourcemap comment
+ const mapFileCommentMatch =
+ convertSourceMap.mapFileCommentRegex.exec(code)
+ if (mapFileCommentMatch) {
+ s.appendRight(mapFileCommentMatch.index, mapDepsCode)
+ } else {
+ s.append(mapDepsCode)
+ }
// there may still be markers due to inlined dynamic imports, remove
// all the markers regardless
diff --git a/packages/vite/src/node/plugins/importMetaGlob.ts b/packages/vite/src/node/plugins/importMetaGlob.ts
index 39c00cb9ea1986..f8981b9b253c08 100644
--- a/packages/vite/src/node/plugins/importMetaGlob.ts
+++ b/packages/vite/src/node/plugins/importMetaGlob.ts
@@ -1,6 +1,7 @@
import { isAbsolute, posix } from 'node:path'
import micromatch from 'micromatch'
import { stripLiteral } from 'strip-literal'
+import colors from 'picocolors'
import type {
ArrayExpression,
CallExpression,
@@ -29,6 +30,7 @@ import {
slash,
transformStableResult,
} from '../utils'
+import type { Logger } from '../logger'
const { isMatch, scan } = micromatch
@@ -37,11 +39,15 @@ export interface ParsedImportGlob {
globs: string[]
globsResolved: string[]
isRelative: boolean
- options: GeneralImportGlobOptions
+ options: ParsedGeneralImportGlobOptions
start: number
end: number
}
+interface ParsedGeneralImportGlobOptions extends GeneralImportGlobOptions {
+ query?: string
+}
+
export function getAffectedGlobModules(
file: string,
server: ViteDevServer,
@@ -84,6 +90,7 @@ export function importGlobPlugin(config: ResolvedConfig): Plugin {
(im, _, options) =>
this.resolve(im, id, options).then((i) => i?.id || im),
config.experimental.importGlobRestoreExtension,
+ config.logger,
)
if (result) {
if (server) {
@@ -128,7 +135,8 @@ function err(e: string, pos: number) {
function parseGlobOptions(
rawOpts: string,
optsStartIndex: number,
-): GeneralImportGlobOptions {
+ logger?: Logger,
+): ParsedGeneralImportGlobOptions {
let opts: GeneralImportGlobOptions = {}
try {
opts = evalValue(rawOpts)
@@ -169,8 +177,22 @@ function parseGlobOptions(
)
}
}
+ // normalize query as string so it's easier to handle later
+ opts.query = stringifyQuery(opts.query)
}
+ if (opts.as && logger) {
+ const importSuggestion = forceDefaultAs.includes(opts.as)
+ ? `, import: 'default'`
+ : ''
+ logger.warn(
+ colors.yellow(
+ `The glob option "as" has been deprecated in favour of "query". Please update \`as: '${opts.as}'\` to \`query: '?${opts.as}'${importSuggestion}\`.`,
+ ),
+ )
+ }
+
+ // validate `import` option based on `as` option
if (opts.as && forceDefaultAs.includes(opts.as)) {
if (opts.import && opts.import !== 'default' && opts.import !== '*')
throw err(
@@ -188,7 +210,9 @@ function parseGlobOptions(
if (opts.as) opts.query = opts.as
- return opts
+ if (opts.query && opts.query[0] !== '?') opts.query = `?${opts.query}`
+
+ return opts as ParsedGeneralImportGlobOptions
}
export async function parseImportGlob(
@@ -196,6 +220,7 @@ export async function parseImportGlob(
importer: string | undefined,
root: string,
resolveId: IdResolver,
+ logger?: Logger,
): Promise {
let cleanCode
try {
@@ -292,7 +317,7 @@ export async function parseImportGlob(
}
// arg2
- let options: GeneralImportGlobOptions = {}
+ let options: ParsedGeneralImportGlobOptions = {}
if (arg2) {
if (arg2.type !== 'ObjectExpression')
throw err(
@@ -302,6 +327,7 @@ export async function parseImportGlob(
options = parseGlobOptions(
code.slice(arg2.range![0], arg2.range![1]),
arg2.range![0],
+ logger,
)
}
@@ -345,6 +371,7 @@ export async function transformGlobImport(
root: string,
resolveId: IdResolver,
restoreQueryExtension = false,
+ logger?: Logger,
): Promise {
id = slash(id)
root = slash(root)
@@ -355,6 +382,7 @@ export async function transformGlobImport(
isVirtual ? undefined : id,
root,
resolveId,
+ logger,
)
const matchedFiles = new Set()
@@ -383,14 +411,6 @@ export async function transformGlobImport(
const objectProps: string[] = []
const staticImports: string[] = []
- let query = !options.query
- ? ''
- : typeof options.query === 'string'
- ? options.query
- : stringifyQuery(options.query as any)
-
- if (query && query[0] !== '?') query = `?${query}`
-
const resolvePaths = (file: string) => {
if (!dir) {
if (isRelative)
@@ -419,7 +439,7 @@ export async function transformGlobImport(
const paths = resolvePaths(file)
const filePath = paths.filePath
let importPath = paths.importPath
- let importQuery = query
+ let importQuery = options.query ?? ''
if (importQuery && importQuery !== '?raw') {
const fileExtension = basename(file).split('.').slice(-1)[0]
diff --git a/packages/vite/src/node/plugins/index.ts b/packages/vite/src/node/plugins/index.ts
index 87f8aea70d630c..fc230c686641b1 100644
--- a/packages/vite/src/node/plugins/index.ts
+++ b/packages/vite/src/node/plugins/index.ts
@@ -9,10 +9,10 @@ import { watchPackageDataPlugin } from '../packages'
import { getFsUtils } from '../fsUtils'
import { jsonPlugin } from './json'
import { resolvePlugin } from './resolve'
-import { optimizedDepsBuildPlugin, optimizedDepsPlugin } from './optimizedDeps'
+import { optimizedDepsPlugin } from './optimizedDeps'
import { esbuildPlugin } from './esbuild'
import { importAnalysisPlugin } from './importAnalysis'
-import { cssPlugin, cssPostPlugin } from './css'
+import { cssAnalysisPlugin, cssPlugin, cssPostPlugin } from './css'
import { assetPlugin } from './asset'
import { clientInjectionsPlugin } from './clientInjections'
import { buildHtmlPlugin, htmlInlineProxyPlugin } from './html'
@@ -39,16 +39,12 @@ export async function resolvePlugins(
? await (await import('../build')).resolveBuildPlugins(config)
: { pre: [], post: [] }
const { modulePreload } = config.build
-
+ const depsOptimizerEnabled =
+ !isBuild &&
+ (isDepsOptimizerEnabled(config, false) ||
+ isDepsOptimizerEnabled(config, true))
return [
- ...(isDepsOptimizerEnabled(config, false) ||
- isDepsOptimizerEnabled(config, true)
- ? [
- isBuild
- ? optimizedDepsBuildPlugin(config)
- : optimizedDepsPlugin(config),
- ]
- : []),
+ depsOptimizerEnabled ? optimizedDepsPlugin(config) : null,
isBuild ? metadataPlugin() : null,
!isWorker ? watchPackageDataPlugin(config.packageCache) : null,
preAliasPlugin(config),
@@ -69,7 +65,9 @@ export async function resolvePlugins(
ssrConfig: config.ssr,
asSrc: true,
fsUtils: getFsUtils(config),
- getDepsOptimizer: (ssr: boolean) => getDepsOptimizer(config, ssr),
+ getDepsOptimizer: isBuild
+ ? undefined
+ : (ssr: boolean) => getDepsOptimizer(config, ssr),
shouldExternalize:
isBuild && config.build.ssr
? (id, importer) => shouldExternalizeForSSR(id, importer, config)
@@ -103,7 +101,11 @@ export async function resolvePlugins(
// internal server-only plugins are always applied after everything else
...(isBuild
? []
- : [clientInjectionsPlugin(config), importAnalysisPlugin(config)]),
+ : [
+ clientInjectionsPlugin(config),
+ cssAnalysisPlugin(config),
+ importAnalysisPlugin(config),
+ ]),
].filter(Boolean) as Plugin[]
}
@@ -138,27 +140,30 @@ export function getSortedPluginsByHook(
hookName: K,
plugins: readonly Plugin[],
): PluginWithRequiredHook[] {
- const pre: Plugin[] = []
- const normal: Plugin[] = []
- const post: Plugin[] = []
+ const sortedPlugins: Plugin[] = []
+ // Use indexes to track and insert the ordered plugins directly in the
+ // resulting array to avoid creating 3 extra temporary arrays per hook
+ let pre = 0,
+ normal = 0,
+ post = 0
for (const plugin of plugins) {
const hook = plugin[hookName]
if (hook) {
if (typeof hook === 'object') {
if (hook.order === 'pre') {
- pre.push(plugin)
+ sortedPlugins.splice(pre++, 0, plugin)
continue
}
if (hook.order === 'post') {
- post.push(plugin)
+ sortedPlugins.splice(pre + normal + post++, 0, plugin)
continue
}
}
- normal.push(plugin)
+ sortedPlugins.splice(pre + normal++, 0, plugin)
}
}
- return [...pre, ...normal, ...post] as PluginWithRequiredHook[]
+ return sortedPlugins as PluginWithRequiredHook[]
}
export function getHookHandler>(
diff --git a/packages/vite/src/node/plugins/manifest.ts b/packages/vite/src/node/plugins/manifest.ts
index d01a959efca5fa..a6e9608ed16c08 100644
--- a/packages/vite/src/node/plugins/manifest.ts
+++ b/packages/vite/src/node/plugins/manifest.ts
@@ -5,10 +5,9 @@ import type {
OutputChunk,
RenderedChunk,
} from 'rollup'
-import jsonStableStringify from 'json-stable-stringify'
import type { ResolvedConfig } from '..'
import type { Plugin } from '../plugin'
-import { normalizePath } from '../utils'
+import { normalizePath, sortObjectKeys } from '../utils'
import { generatedAssets } from './asset'
import type { GeneratedAssetMeta } from './asset'
@@ -162,7 +161,7 @@ export function manifestPlugin(config: ResolvedConfig): Plugin {
? config.build.manifest
: '.vite/manifest.json',
type: 'asset',
- source: jsonStableStringify(manifest, { space: 2 }),
+ source: JSON.stringify(sortObjectKeys(manifest), undefined, 2),
})
}
},
diff --git a/packages/vite/src/node/plugins/optimizedDeps.ts b/packages/vite/src/node/plugins/optimizedDeps.ts
index 47f930fcac3f29..ae44dd8ecd4cd8 100644
--- a/packages/vite/src/node/plugins/optimizedDeps.ts
+++ b/packages/vite/src/node/plugins/optimizedDeps.ts
@@ -75,71 +75,6 @@ export function optimizedDepsPlugin(config: ResolvedConfig): Plugin {
}
}
-export function optimizedDepsBuildPlugin(config: ResolvedConfig): Plugin {
- let buildStartCalled = false
-
- return {
- name: 'vite:optimized-deps-build',
-
- buildStart() {
- // Only reset the registered ids after a rebuild during build --watch
- if (!config.isWorker && buildStartCalled) {
- getDepsOptimizer(config)?.resetRegisteredIds()
- }
- buildStartCalled = true
- },
-
- async resolveId(id, importer, options) {
- const depsOptimizer = getDepsOptimizer(config)
- if (!depsOptimizer) return
-
- if (depsOptimizer.isOptimizedDepFile(id)) {
- return id
- } else {
- if (options?.custom?.['vite:pre-alias']) {
- // Skip registering the id if it is being resolved from the pre-alias plugin
- // When a optimized dep is aliased, we need to avoid waiting for it before optimizing
- return
- }
- const resolved = await this.resolve(id, importer, options)
- if (resolved && !resolved.external) {
- depsOptimizer.delayDepsOptimizerUntil(resolved.id, async () => {
- await this.load(resolved)
- })
- }
- return resolved
- }
- },
-
- async load(id) {
- const depsOptimizer = getDepsOptimizer(config)
- if (!depsOptimizer?.isOptimizedDepFile(id)) {
- return
- }
-
- depsOptimizer?.ensureFirstRun()
-
- const file = cleanUrl(id)
- // Search in both the currently optimized and newly discovered deps
- // If all the inputs are dependencies, we aren't going to get any
- const info = optimizedDepInfoFromFile(depsOptimizer.metadata, file)
- if (info) {
- await info.processing
- debug?.(`load ${colors.cyan(file)}`)
- } else {
- throw new Error(
- `Something unexpected happened while optimizing "${id}".`,
- )
- }
-
- // Load the file from the cache instead of waiting for other plugin
- // load hooks to avoid race conditions, once processing is resolved,
- // we are sure that the file has been properly save to disk
- return fsp.readFile(file, 'utf-8')
- },
- }
-}
-
function throwProcessingError(id: string): never {
const err: any = new Error(
`Something unexpected happened while optimizing "${id}". ` +
diff --git a/packages/vite/src/node/plugins/preAlias.ts b/packages/vite/src/node/plugins/preAlias.ts
index 33df60b2d58b2e..d80a0a3429a5ee 100644
--- a/packages/vite/src/node/plugins/preAlias.ts
+++ b/packages/vite/src/node/plugins/preAlias.ts
@@ -31,7 +31,7 @@ export function preAliasPlugin(config: ResolvedConfig): Plugin {
name: 'vite:pre-alias',
async resolveId(id, importer, options) {
const ssr = options?.ssr === true
- const depsOptimizer = getDepsOptimizer(config, ssr)
+ const depsOptimizer = !isBuild && getDepsOptimizer(config, ssr)
if (
importer &&
depsOptimizer &&
diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts
index 71577872e5bed8..649a402eb95acf 100644
--- a/packages/vite/src/node/plugins/resolve.ts
+++ b/packages/vite/src/node/plugins/resolve.ts
@@ -136,7 +136,11 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin {
preferRelative = false,
} = resolveOptions
- const { target: ssrTarget, noExternal: ssrNoExternal } = ssrConfig ?? {}
+ const {
+ target: ssrTarget,
+ noExternal: ssrNoExternal,
+ external: ssrExternal,
+ } = ssrConfig ?? {}
// In unix systems, absolute paths inside root first needs to be checked as an
// absolute URL (/root/root/path-to-file) resulting in failed checks before falling
@@ -395,7 +399,12 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin {
// externalize if building for SSR, otherwise redirect to empty module
if (isBuiltin(id)) {
if (ssr) {
- if (ssrNoExternal === true) {
+ if (
+ ssrNoExternal === true &&
+ // if both noExternal and external are true, noExternal will take the higher priority and bundle it.
+ // only if the id is explicitly listed in external, we will externalize it and skip this error.
+ (ssrExternal === true || !ssrExternal?.includes(id))
+ ) {
let message = `Cannot bundle Node.js built-in "${id}"`
if (importer) {
message += ` imported from "${path.relative(
@@ -407,7 +416,9 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin {
this.error(message)
}
- return options.idOnly ? id : { id, external: true }
+ return options.idOnly
+ ? id
+ : { id, external: true, moduleSideEffects: false }
} else {
if (!asSrc) {
debug?.(
@@ -837,7 +848,7 @@ export function tryNodeResolve(
}
const skipOptimization =
- depsOptimizer?.options.noDiscovery ||
+ (!options.ssrOptimizeCheck && depsOptimizer?.options.noDiscovery) ||
!isJsType ||
(importer && isInNodeModules(importer)) ||
exclude?.includes(pkgId) ||
diff --git a/packages/vite/src/node/plugins/splitVendorChunk.ts b/packages/vite/src/node/plugins/splitVendorChunk.ts
index 034b8c2ee5231e..b2ecbcb6f684dc 100644
--- a/packages/vite/src/node/plugins/splitVendorChunk.ts
+++ b/packages/vite/src/node/plugins/splitVendorChunk.ts
@@ -4,7 +4,7 @@ import type {
ManualChunkMeta,
OutputOptions,
} from 'rollup'
-import { isInNodeModules } from '../utils'
+import { arraify, isInNodeModules } from '../utils'
import type { UserConfig } from '../../node'
import type { Plugin } from '../plugin'
@@ -103,7 +103,7 @@ export function splitVendorChunkPlugin(): Plugin {
config(config) {
let outputs = config?.build?.rollupOptions?.output
if (outputs) {
- outputs = Array.isArray(outputs) ? outputs : [outputs]
+ outputs = arraify(outputs)
for (const output of outputs) {
const viteManualChunks = createSplitVendorChunk(output, config)
if (viteManualChunks) {
diff --git a/packages/vite/src/node/plugins/terser.ts b/packages/vite/src/node/plugins/terser.ts
index c1522065750dbf..90c29b26c7501e 100644
--- a/packages/vite/src/node/plugins/terser.ts
+++ b/packages/vite/src/node/plugins/terser.ts
@@ -1,5 +1,5 @@
-import { Worker } from 'okie'
import type { Terser } from 'dep-types/terser'
+import { Worker } from 'artichokie'
import type { Plugin } from '../plugin'
import type { ResolvedConfig } from '..'
import { requireResolveFromRootWithFallback } from '../utils'
@@ -38,16 +38,17 @@ export function terserPlugin(config: ResolvedConfig): Plugin {
const makeWorker = () =>
new Worker(
- async (
- terserPath: string,
- code: string,
- options: Terser.MinifyOptions,
- ) => {
- // test fails when using `import`. maybe related: https://github.com/nodejs/node/issues/43205
- // eslint-disable-next-line no-restricted-globals -- this function runs inside cjs
- const terser = require(terserPath)
- return terser.minify(code, options) as Terser.MinifyOutput
- },
+ () =>
+ async (
+ terserPath: string,
+ code: string,
+ options: Terser.MinifyOptions,
+ ) => {
+ // test fails when using `import`. maybe related: https://github.com/nodejs/node/issues/43205
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside cjs
+ const terser = require(terserPath)
+ return terser.minify(code, options) as Terser.MinifyOutput
+ },
{
max: maxWorkers,
},
diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts
index a656b6d07e6916..62849bb06e7875 100644
--- a/packages/vite/src/node/plugins/worker.ts
+++ b/packages/vite/src/node/plugins/worker.ts
@@ -5,13 +5,12 @@ import type { ResolvedConfig } from '../config'
import type { Plugin } from '../plugin'
import type { ViteDevServer } from '../server'
import { ENV_ENTRY, ENV_PUBLIC_PATH } from '../constants'
-import { cleanUrl, getHash, injectQuery, parseRequest } from '../utils'
+import { cleanUrl, getHash, injectQuery, urlRE } from '../utils'
import {
createToImportMetaURLBasedRelativeRuntime,
onRollupWarning,
toOutputFilePathInJS,
} from '../build'
-import { getDepsOptimizer } from '../optimizer'
import { fileToUrl } from './asset'
interface WorkerCache {
@@ -29,6 +28,10 @@ interface WorkerCache {
export type WorkerType = 'classic' | 'module' | 'ignore'
+export const workerOrSharedWorkerRE = /(?:\?|&)(worker|sharedworker)(?:&|$)/
+const workerFileRE = /(?:\?|&)worker_file&type=(\w+)(?:&|$)/
+const inlineRE = /[?&]inline\b/
+
export const WORKER_FILE_ID = 'worker_file'
const workerCache = new WeakMap()
@@ -44,7 +47,6 @@ function saveEmitWorkerAsset(
async function bundleWorkerEntry(
config: ResolvedConfig,
id: string,
- query: Record | null,
): Promise {
// bundle the file as entry to support imports
const { rollup } = await import('rollup')
@@ -100,12 +102,11 @@ async function bundleWorkerEntry(
} finally {
await bundle.close()
}
- return emitSourcemapForWorkerEntry(config, query, chunk)
+ return emitSourcemapForWorkerEntry(config, chunk)
}
function emitSourcemapForWorkerEntry(
config: ResolvedConfig,
- query: Record | null,
chunk: OutputChunk,
): OutputChunk {
const { map: sourcemap } = chunk
@@ -145,12 +146,11 @@ function encodeWorkerAssetFileName(
export async function workerFileToUrl(
config: ResolvedConfig,
id: string,
- query: Record | null,
): Promise {
const workerMap = workerCache.get(config.mainConfig || config)!
let fileName = workerMap.bundle.get(id)
if (!fileName) {
- const outputChunk = await bundleWorkerEntry(config, id, query)
+ const outputChunk = await bundleWorkerEntry(config, id)
fileName = outputChunk.fileName
saveEmitWorkerAsset(config, {
fileName,
@@ -165,10 +165,21 @@ export async function workerFileToUrl(
export function webWorkerPostPlugin(): Plugin {
return {
name: 'vite:worker-post',
- resolveImportMeta(property, { chunkId, format }) {
+ resolveImportMeta(property, { format }) {
// document is undefined in the worker, so we need to avoid it in iife
- if (property === 'url' && format === 'iife') {
- return 'self.location.href'
+ if (format === 'iife') {
+ // compiling import.meta
+ if (!property) {
+ // rollup only supports `url` property. we only support `url` property as well.
+ // https://github.com/rollup/rollup/blob/62b648e1cc6a1f00260bb85aa2050097bb4afd2b/src/ast/nodes/MetaProperty.ts#L164-L173
+ return `{
+ url: self.location.href
+ }`
+ }
+ // compiling import.meta.url
+ if (property === 'url') {
+ return 'self.location.href'
+ }
}
return null
@@ -181,18 +192,6 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
let server: ViteDevServer
const isWorker = config.isWorker
- const isWorkerQueryId = (id: string) => {
- const parsedQuery = parseRequest(id)
- if (
- parsedQuery &&
- (parsedQuery.worker ?? parsedQuery.sharedworker) != null
- ) {
- return true
- }
-
- return false
- }
-
return {
name: 'vite:worker',
@@ -212,24 +211,23 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
},
load(id) {
- if (isBuild && isWorkerQueryId(id)) {
+ if (isBuild && workerOrSharedWorkerRE.test(id)) {
return ''
}
},
shouldTransformCachedModule({ id }) {
- if (isBuild && config.build.watch && isWorkerQueryId(id)) {
+ if (isBuild && config.build.watch && workerOrSharedWorkerRE.test(id)) {
return true
}
},
- async transform(raw, id, options) {
- const ssr = options?.ssr === true
- const query = parseRequest(id)
- if (query && query[WORKER_FILE_ID] != null) {
+ async transform(raw, id) {
+ const workerFileMatch = workerFileRE.exec(id)
+ if (workerFileMatch) {
// if import worker by worker constructor will have query.type
// other type will be import worker by esm
- const workerType = query['type']! as WorkerType
+ const workerType = workerFileMatch[1] as WorkerType
let injectEnv = ''
const scriptPath = JSON.stringify(
@@ -261,18 +259,15 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
}
return
}
- if (
- query == null ||
- (query && (query.worker ?? query.sharedworker) == null)
- ) {
- return
- }
+
+ const workerMatch = workerOrSharedWorkerRE.exec(id)
+ if (!workerMatch) return
// stringified url or `new URL(...)`
let url: string
const { format } = config.worker
const workerConstructor =
- query.sharedworker != null ? 'SharedWorker' : 'Worker'
+ workerMatch[1] === 'sharedworker' ? 'SharedWorker' : 'Worker'
const workerType = isBuild
? format === 'es'
? 'module'
@@ -284,9 +279,8 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
}`
if (isBuild) {
- getDepsOptimizer(config, ssr)?.registerWorkersSource(id)
- if (query.inline != null) {
- const chunk = await bundleWorkerEntry(config, id, query)
+ if (inlineRE.test(id)) {
+ const chunk = await bundleWorkerEntry(config, id)
const encodedJs = `const encodedJs = "${Buffer.from(
chunk.code,
).toString('base64')}";`
@@ -313,7 +307,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
return worker;
} catch(e) {
return new ${workerConstructor}(
- "data:application/javascript;base64," + encodedJs,
+ "data:text/javascript;base64," + encodedJs,
${workerTypeOption}
);
}${
@@ -329,7 +323,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
: `${encodedJs}
export default function WorkerWrapper(options) {
return new ${workerConstructor}(
- "data:application/javascript;base64," + encodedJs,
+ "data:text/javascript;base64," + encodedJs,
${workerTypeOption}
);
}
@@ -341,15 +335,14 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
map: { mappings: '' },
}
} else {
- url = await workerFileToUrl(config, id, query)
+ url = await workerFileToUrl(config, id)
}
} else {
url = await fileToUrl(cleanUrl(id), config, this)
- url = injectQuery(url, WORKER_FILE_ID)
- url = injectQuery(url, `type=${workerType}`)
+ url = injectQuery(url, `${WORKER_FILE_ID}&type=${workerType}`)
}
- if (query.url != null) {
+ if (urlRE.test(id)) {
return {
code: `export default ${JSON.stringify(url)}`,
map: { mappings: '' }, // Empty sourcemap to suppress Rollup warning
diff --git a/packages/vite/src/node/plugins/workerImportMetaUrl.ts b/packages/vite/src/node/plugins/workerImportMetaUrl.ts
index 90b3899eb29dcf..c015dd91068d60 100644
--- a/packages/vite/src/node/plugins/workerImportMetaUrl.ts
+++ b/packages/vite/src/node/plugins/workerImportMetaUrl.ts
@@ -8,11 +8,9 @@ import {
cleanUrl,
evalValue,
injectQuery,
- parseRequest,
slash,
transformStableResult,
} from '../utils'
-import { getDepsOptimizer } from '../optimizer'
import type { ResolveFn } from '..'
import type { WorkerType } from './worker'
import { WORKER_FILE_ID, workerFileToUrl } from './worker'
@@ -131,9 +129,7 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin {
},
async transform(code, id, options) {
- const ssr = options?.ssr === true
if (!options?.ssr && isIncludeWorkerImportMetaUrl(code)) {
- const query = parseRequest(id)
let s: MagicString | undefined
const cleanString = stripLiteral(code)
const workerImportMetaUrlRE =
@@ -176,12 +172,13 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin {
let builtUrl: string
if (isBuild) {
- getDepsOptimizer(config, ssr)?.registerWorkersSource(id)
- builtUrl = await workerFileToUrl(config, file, query)
+ builtUrl = await workerFileToUrl(config, file)
} else {
builtUrl = await fileToUrl(cleanUrl(file), config, this)
- builtUrl = injectQuery(builtUrl, WORKER_FILE_ID)
- builtUrl = injectQuery(builtUrl, `type=${workerType}`)
+ builtUrl = injectQuery(
+ builtUrl,
+ `${WORKER_FILE_ID}&type=${workerType}`,
+ )
}
s.update(
expStart,
diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts
index 68a650438f32fa..bad5c6b65e9b73 100644
--- a/packages/vite/src/node/preview.ts
+++ b/packages/vite/src/node/preview.ts
@@ -9,6 +9,7 @@ import type {
ResolvedServerOptions,
ResolvedServerUrls,
} from './server'
+import { createServerCloseFn } from './server'
import type { CommonServerOptions } from './http'
import {
httpServerStart,
@@ -59,6 +60,10 @@ export interface PreviewServer {
* The resolved vite config object
*/
config: ResolvedConfig
+ /**
+ * Stop the server.
+ */
+ close(): Promise
/**
* A connect app instance.
* - Can be used to attach custom middlewares to the preview server.
@@ -103,6 +108,7 @@ export async function preview(
'serve',
'production',
'production',
+ true,
)
const distDir = path.resolve(config.root, config.build.outDir)
@@ -135,6 +141,7 @@ export async function preview(
config,
middlewares: app,
httpServer,
+ close: createServerCloseFn(httpServer),
resolvedUrls: null,
printUrls() {
if (server.resolvedUrls) {
diff --git a/packages/vite/src/node/publicDir.ts b/packages/vite/src/node/publicDir.ts
index 8458579e378137..7e69016c0e4650 100644
--- a/packages/vite/src/node/publicDir.ts
+++ b/packages/vite/src/node/publicDir.ts
@@ -56,7 +56,7 @@ export function checkPublicFile(
}
const publicFile = normalizePath(path.join(publicDir, fileName))
- if (!publicFile.startsWith(withTrailingSlash(normalizePath(publicDir)))) {
+ if (!publicFile.startsWith(withTrailingSlash(publicDir))) {
// can happen if URL starts with '../'
return
}
diff --git a/packages/vite/src/node/publicUtils.ts b/packages/vite/src/node/publicUtils.ts
index 8a9ab56559815b..318c904047b2c0 100644
--- a/packages/vite/src/node/publicUtils.ts
+++ b/packages/vite/src/node/publicUtils.ts
@@ -5,13 +5,18 @@
*/
export { VERSION as version } from './constants'
export { version as esbuildVersion } from 'esbuild'
-export { VERSION as rollupVersion } from 'rollup'
export {
splitVendorChunkPlugin,
splitVendorChunk,
isCSSRequest,
} from './plugins/splitVendorChunk'
-export { normalizePath, mergeConfig, mergeAlias, createFilter } from './utils'
+export {
+ normalizePath,
+ mergeConfig,
+ mergeAlias,
+ createFilter,
+ rollupVersion,
+} from './utils'
export { send } from './server/send'
export { createLogger } from './logger'
export { searchForWorkspaceRoot } from './server/searchRoot'
diff --git a/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts b/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts
index 33243331f35da2..070dedd2acb463 100644
--- a/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts
+++ b/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts
@@ -10,38 +10,6 @@ let resolveId: (id: string) => any
let moduleGraph: ModuleGraph
describe('plugin container', () => {
- it('has bound methods', async () => {
- expect.assertions(14)
- const entryUrl = '/x.js'
-
- const plugin: Plugin = {
- name: 'p1',
- load(id) {
- // bound functions and bound arrow functions do not have prototype
- expect(this.parse.prototype).equals(undefined)
- expect(this.resolve.prototype).equals(undefined)
- expect(this.load.prototype).equals(undefined)
- expect(this.getModuleInfo.prototype).equals(undefined)
- expect(this.getModuleIds.prototype).equals(undefined)
- expect(this.addWatchFile.prototype).equals(undefined)
- expect(this.getWatchFiles.prototype).equals(undefined)
- expect(this.emitFile.prototype).equals(undefined)
- expect(this.setAssetSource.prototype).equals(undefined)
- expect(this.getFileName.prototype).equals(undefined)
- expect(this.warn.prototype).equals(undefined)
- expect(this.error.prototype).equals(undefined)
- expect(this.debug.prototype).equals(undefined)
- expect(this.info.prototype).equals(undefined)
- },
- }
-
- const container = await getPluginContainer({
- plugins: [plugin],
- })
-
- await container.load(entryUrl)
- })
-
describe('getModuleInfo', () => {
beforeEach(() => {
moduleGraph = new ModuleGraph((id) => resolveId(id))
diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts
index 7f1620ee4f8070..a87d902ae0a35d 100644
--- a/packages/vite/src/node/server/hmr.ts
+++ b/packages/vite/src/node/server/hmr.ts
@@ -1,8 +1,9 @@
import fsp from 'node:fs/promises'
import path from 'node:path'
import type { Server } from 'node:http'
+import { EventEmitter } from 'node:events'
import colors from 'picocolors'
-import type { Update } from 'types/hmrPayload'
+import type { CustomPayload, HMRPayload, Update } from 'types/hmrPayload'
import type { RollupError } from 'rollup'
import { CLIENT_DIR } from '../constants'
import {
@@ -12,7 +13,7 @@ import {
withTrailingSlash,
wrapId,
} from '../utils'
-import type { ViteDevServer } from '..'
+import type { InferCustomEventPayload, ViteDevServer } from '..'
import { isCSSRequest } from '../plugins/css'
import { getAffectedGlobModules } from '../plugins/importMetaGlob'
import { isExplicitImportRequired } from '../plugins/importAnalysis'
@@ -35,6 +36,8 @@ export interface HmrOptions {
timeout?: number
overlay?: boolean
server?: Server
+ /** @internal */
+ channels?: HMRChannel[]
}
export interface HmrContext {
@@ -45,6 +48,74 @@ export interface HmrContext {
server: ViteDevServer
}
+interface PropagationBoundary {
+ boundary: ModuleNode
+ acceptedVia: ModuleNode
+ isWithinCircularImport: boolean
+}
+
+export interface HMRBroadcasterClient {
+ /**
+ * Send event to the client
+ */
+ send(payload: HMRPayload): void
+ /**
+ * Send custom event
+ */
+ send(event: string, payload?: CustomPayload['data']): void
+}
+
+export interface HMRChannel {
+ /**
+ * Unique channel name
+ */
+ name: string
+ /**
+ * Broadcast events to all clients
+ */
+ send(payload: HMRPayload): void
+ /**
+ * Send custom event
+ */
+ send(event: T, payload?: InferCustomEventPayload): void
+ /**
+ * Handle custom event emitted by `import.meta.hot.send`
+ */
+ on(
+ event: T,
+ listener: (
+ data: InferCustomEventPayload,
+ client: HMRBroadcasterClient,
+ ...args: any[]
+ ) => void,
+ ): void
+ on(event: 'connection', listener: () => void): void
+ /**
+ * Unregister event listener
+ */
+ off(event: string, listener: Function): void
+ /**
+ * Start listening for messages
+ */
+ listen(): void
+ /**
+ * Disconnect all clients, called when server is closed or restarted.
+ */
+ close(): void
+}
+
+export interface HMRBroadcaster extends Omit {
+ /**
+ * All registered channels. Always has websocket channel.
+ */
+ readonly channels: HMRChannel[]
+ /**
+ * Add a new third-party channel.
+ */
+ addChannel(connection: HMRChannel): HMRBroadcaster
+ close(): Promise
+}
+
export function getShortName(file: string, root: string): string {
return file.startsWith(withTrailingSlash(root))
? path.posix.relative(root, file)
@@ -56,9 +127,8 @@ export async function handleHMRUpdate(
server: ViteDevServer,
configOnly: boolean,
): Promise {
- const { ws, config, moduleGraph } = server
+ const { hot, config, moduleGraph } = server
const shortFile = getShortName(file, config.root)
- const fileName = path.basename(file)
const isConfig = file === config.configFile
const isConfigDependency = config.configFileDependencies.some(
@@ -67,7 +137,7 @@ export async function handleHMRUpdate(
const isEnv =
config.inlineConfig.envFile !== false &&
- getEnvFilesForMode(config.mode).includes(fileName)
+ getEnvFilesForMode(config.mode, config.envDir).includes(file)
if (isConfig || isConfigDependency || isEnv) {
// auto restart server
debugHmr?.(`[config change] ${colors.dim(shortFile)}`)
@@ -93,7 +163,7 @@ export async function handleHMRUpdate(
// (dev only) the client itself cannot be hot updated.
if (file.startsWith(withTrailingSlash(normalizedClientDir))) {
- ws.send({
+ hot.send({
type: 'full-reload',
path: '*',
})
@@ -126,7 +196,7 @@ export async function handleHMRUpdate(
clear: true,
timestamp: true,
})
- ws.send({
+ hot.send({
type: 'full-reload',
path: config.server.middlewareMode
? '*'
@@ -142,12 +212,13 @@ export async function handleHMRUpdate(
updateModules(shortFile, hmrContext.modules, timestamp, server)
}
-type HasDeadEnd = boolean | string
+type HasDeadEnd = boolean
+
export function updateModules(
file: string,
modules: ModuleNode[],
timestamp: number,
- { config, ws, moduleGraph }: ViteDevServer,
+ { config, hot, moduleGraph }: ViteDevServer,
afterInvalidation?: boolean,
): void {
const updates: Update[] = []
@@ -156,7 +227,7 @@ export function updateModules(
let needFullReload: HasDeadEnd = false
for (const mod of modules) {
- const boundaries: { boundary: ModuleNode; acceptedVia: ModuleNode }[] = []
+ const boundaries: PropagationBoundary[] = []
const hasDeadEnd = propagateUpdate(mod, traversedModules, boundaries)
moduleGraph.invalidateModule(mod, invalidatedModules, timestamp, true)
@@ -171,16 +242,22 @@ export function updateModules(
}
updates.push(
- ...boundaries.map(({ boundary, acceptedVia }) => ({
- type: `${boundary.type}-update` as const,
- timestamp,
- path: normalizeHmrUrl(boundary.url),
- explicitImportRequired:
- boundary.type === 'js'
- ? isExplicitImportRequired(acceptedVia.url)
- : undefined,
- acceptedPath: normalizeHmrUrl(acceptedVia.url),
- })),
+ ...boundaries.map(
+ ({ boundary, acceptedVia, isWithinCircularImport }) => ({
+ type: `${boundary.type}-update` as const,
+ timestamp,
+ path: normalizeHmrUrl(boundary.url),
+ acceptedPath: normalizeHmrUrl(acceptedVia.url),
+ explicitImportRequired:
+ boundary.type === 'js'
+ ? isExplicitImportRequired(acceptedVia.url)
+ : false,
+ isWithinCircularImport,
+ // browser modules are invalidated by changing ?t= query,
+ // but in ssr we control the module system, so we can directly remove them form cache
+ ssrInvalidates: getSSRInvalidatedImporters(acceptedVia),
+ }),
+ ),
)
}
@@ -193,7 +270,7 @@ export function updateModules(
colors.green(`page reload `) + colors.dim(file) + reason,
{ clear: !afterInvalidation, timestamp: true },
)
- ws.send({
+ hot.send({
type: 'full-reload',
})
return
@@ -209,12 +286,38 @@ export function updateModules(
colors.dim([...new Set(updates.map((u) => u.path))].join(', ')),
{ clear: !afterInvalidation, timestamp: true },
)
- ws.send({
+ hot.send({
type: 'update',
updates,
})
}
+function populateSSRImporters(
+ module: ModuleNode,
+ timestamp: number,
+ seen: Set,
+) {
+ module.ssrImportedModules.forEach((importer) => {
+ if (seen.has(importer)) {
+ return
+ }
+ if (
+ importer.lastHMRTimestamp === timestamp ||
+ importer.lastInvalidationTimestamp === timestamp
+ ) {
+ seen.add(importer)
+ populateSSRImporters(importer, timestamp, seen)
+ }
+ })
+ return seen
+}
+
+function getSSRInvalidatedImporters(module: ModuleNode) {
+ return [
+ ...populateSSRImporters(module, module.lastHMRTimestamp, new Set()),
+ ].map((m) => m.file!)
+}
+
export async function handleFileAddUnlink(
file: string,
server: ViteDevServer,
@@ -257,7 +360,7 @@ function areAllImportsAccepted(
function propagateUpdate(
node: ModuleNode,
traversedModules: Set,
- boundaries: { boundary: ModuleNode; acceptedVia: ModuleNode }[],
+ boundaries: PropagationBoundary[],
currentChain: ModuleNode[] = [node],
): HasDeadEnd {
if (traversedModules.has(node)) {
@@ -278,9 +381,11 @@ function propagateUpdate(
}
if (node.isSelfAccepting) {
- boundaries.push({ boundary: node, acceptedVia: node })
- const result = isNodeWithinCircularImports(node, currentChain)
- if (result) return result
+ boundaries.push({
+ boundary: node,
+ acceptedVia: node,
+ isWithinCircularImport: isNodeWithinCircularImports(node, currentChain),
+ })
// additionally check for CSS importers, since a PostCSS plugin like
// Tailwind JIT may register any file as a dependency to a CSS file.
@@ -304,9 +409,11 @@ function propagateUpdate(
// Also, the imported module (this one) must be updated before the importers,
// so that they do get the fresh imported module when/if they are reloaded.
if (node.acceptedHmrExports) {
- boundaries.push({ boundary: node, acceptedVia: node })
- const result = isNodeWithinCircularImports(node, currentChain)
- if (result) return result
+ boundaries.push({
+ boundary: node,
+ acceptedVia: node,
+ isWithinCircularImport: isNodeWithinCircularImports(node, currentChain),
+ })
} else {
if (!node.importers.size) {
return true
@@ -327,9 +434,11 @@ function propagateUpdate(
const subChain = currentChain.concat(importer)
if (importer.acceptedHmrDeps.has(node)) {
- boundaries.push({ boundary: importer, acceptedVia: node })
- const result = isNodeWithinCircularImports(importer, subChain)
- if (result) return result
+ boundaries.push({
+ boundary: importer,
+ acceptedVia: node,
+ isWithinCircularImport: isNodeWithinCircularImports(importer, subChain),
+ })
continue
}
@@ -368,7 +477,7 @@ function isNodeWithinCircularImports(
nodeChain: ModuleNode[],
currentChain: ModuleNode[] = [node],
traversedModules = new Set(),
-): HasDeadEnd {
+): boolean {
// To help visualize how each parameters work, imagine this import graph:
//
// A -> B -> C -> ACCEPTED -> D -> E -> NODE
@@ -419,7 +528,7 @@ function isNodeWithinCircularImports(
importChain.map((m) => colors.dim(m.url)).join(' -> '),
)
}
- return 'circular imports'
+ return true
}
// Continue recursively
@@ -438,7 +547,7 @@ function isNodeWithinCircularImports(
export function handlePrunedModules(
mods: Set,
- { ws }: ViteDevServer,
+ { hot }: ViteDevServer,
): void {
// update the disposed modules' hmr timestamp
// since if it's re-imported, it should re-apply side effects
@@ -448,7 +557,7 @@ export function handlePrunedModules(
mod.lastHMRTimestamp = t
debugHmr?.(`[dispose] ${colors.dim(mod.file)}`)
})
- ws.send({
+ hot.send({
type: 'prune',
paths: [...mods].map((m) => m.url),
})
@@ -609,21 +718,112 @@ async function readModifiedFile(file: string): Promise {
const content = await fsp.readFile(file, 'utf-8')
if (!content) {
const mtime = (await fsp.stat(file)).mtimeMs
- await new Promise((r) => {
- let n = 0
- const poll = async () => {
- n++
- const newMtime = (await fsp.stat(file)).mtimeMs
- if (newMtime !== mtime || n > 10) {
- r(0)
- } else {
- setTimeout(poll, 10)
- }
+
+ for (let n = 0; n < 10; n++) {
+ await new Promise((r) => setTimeout(r, 10))
+ const newMtime = (await fsp.stat(file)).mtimeMs
+ if (newMtime !== mtime) {
+ break
}
- setTimeout(poll, 10)
- })
+ }
+
return await fsp.readFile(file, 'utf-8')
} else {
return content
}
}
+
+export function createHMRBroadcaster(): HMRBroadcaster {
+ const channels: HMRChannel[] = []
+ const readyChannels = new WeakSet()
+ const broadcaster: HMRBroadcaster = {
+ get channels() {
+ return [...channels]
+ },
+ addChannel(channel) {
+ if (channels.some((c) => c.name === channel.name)) {
+ throw new Error(`HMR channel "${channel.name}" is already defined.`)
+ }
+ channels.push(channel)
+ return broadcaster
+ },
+ on(event: string, listener: (...args: any[]) => any) {
+ // emit connection event only when all channels are ready
+ if (event === 'connection') {
+ // make a copy so we don't wait for channels that might be added after this is triggered
+ const channels = this.channels
+ channels.forEach((channel) =>
+ channel.on('connection', () => {
+ readyChannels.add(channel)
+ if (channels.every((c) => readyChannels.has(c))) {
+ listener()
+ }
+ }),
+ )
+ return
+ }
+ channels.forEach((channel) => channel.on(event, listener))
+ return
+ },
+ off(event, listener) {
+ channels.forEach((channel) => channel.off(event, listener))
+ return
+ },
+ send(...args: any[]) {
+ channels.forEach((channel) => channel.send(...(args as [any])))
+ },
+ listen() {
+ channels.forEach((channel) => channel.listen())
+ },
+ close() {
+ return Promise.all(channels.map((channel) => channel.close()))
+ },
+ }
+ return broadcaster
+}
+
+export interface ServerHMRChannel extends HMRChannel {
+ api: {
+ innerEmitter: EventEmitter
+ outsideEmitter: EventEmitter
+ }
+}
+
+export function createServerHMRChannel(): ServerHMRChannel {
+ const innerEmitter = new EventEmitter()
+ const outsideEmitter = new EventEmitter()
+
+ return {
+ name: 'ssr',
+ send(...args: any[]) {
+ let payload: HMRPayload
+ if (typeof args[0] === 'string') {
+ payload = {
+ type: 'custom',
+ event: args[0],
+ data: args[1],
+ }
+ } else {
+ payload = args[0]
+ }
+ outsideEmitter.emit('send', payload)
+ },
+ off(event, listener: () => void) {
+ innerEmitter.off(event, listener)
+ },
+ on: ((event: string, listener: () => unknown) => {
+ innerEmitter.on(event, listener)
+ }) as ServerHMRChannel['on'],
+ close() {
+ innerEmitter.removeAllListeners()
+ outsideEmitter.removeAllListeners()
+ },
+ listen() {
+ innerEmitter.emit('connection')
+ },
+ api: {
+ innerEmitter,
+ outsideEmitter,
+ },
+ }
+}
diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts
index ebb9e5829810c6..156244bbc3fd94 100644
--- a/packages/vite/src/node/server/index.ts
+++ b/packages/vite/src/node/server/index.ts
@@ -15,7 +15,6 @@ import launchEditorMiddleware from 'launch-editor-middleware'
import type { SourceMap } from 'rollup'
import picomatch from 'picomatch'
import type { Matcher } from 'picomatch'
-import type { InvalidatePayload } from 'types/customEvent'
import type { CommonServerOptions } from '../http'
import {
httpServerStart,
@@ -40,11 +39,7 @@ import { ssrLoadModule } from '../ssr/ssrModuleLoader'
import { ssrFixStacktrace, ssrRewriteStacktrace } from '../ssr/ssrStacktrace'
import { ssrTransform } from '../ssr/ssrTransform'
import { ERR_OUTDATED_OPTIMIZED_DEP } from '../plugins/optimizedDeps'
-import {
- getDepsOptimizer,
- initDepsOptimizer,
- initDevSsrDepsOptimizer,
-} from '../optimizer'
+import { getDepsOptimizer, initDepsOptimizer } from '../optimizer'
import { bindCLIShortcuts } from '../shortcuts'
import type { BindCLIShortcutsOptions } from '../shortcuts'
import { CLIENT_DIR, DEFAULT_DEV_PORT } from '../constants'
@@ -52,6 +47,9 @@ import type { Logger } from '../logger'
import { printServerUrls } from '../logger'
import { createNoopWatcher, resolveChokidarOptions } from '../watch'
import { initPublicFiles } from '../publicDir'
+import { getEnvFilesForMode } from '../env'
+import type { FetchResult } from '../ssr/runtime/types'
+import { ssrFetchModule } from '../ssr/ssrFetchModule'
import type { PluginContainer } from './pluginContainer'
import { ERR_CLOSED_SERVER, createPluginContainer } from './pluginContainer'
import type { WebSocketServer } from './ws'
@@ -59,7 +57,10 @@ import { createWebSocketServer } from './ws'
import { baseMiddleware } from './middlewares/base'
import { proxyMiddleware } from './middlewares/proxy'
import { htmlFallbackMiddleware } from './middlewares/htmlFallback'
-import { transformMiddleware } from './middlewares/transform'
+import {
+ cachedTransformMiddleware,
+ transformMiddleware,
+} from './middlewares/transform'
import {
createDevHtmlTransformFn,
indexHtmlMiddleware,
@@ -74,8 +75,10 @@ import type { ModuleNode } from './moduleGraph'
import { ModuleGraph } from './moduleGraph'
import { notFoundMiddleware } from './middlewares/notFound'
import { errorMiddleware, prepareError } from './middlewares/error'
-import type { HmrOptions } from './hmr'
+import type { HMRBroadcaster, HmrOptions } from './hmr'
import {
+ createHMRBroadcaster,
+ createServerHMRChannel,
getShortName,
handleFileAddUnlink,
handleHMRUpdate,
@@ -191,10 +194,10 @@ export interface FileSystemServeOptions {
deny?: string[]
/**
- * Enable caching of fs calls.
+ * Enable caching of fs calls. It is enabled by default if no custom watch ignored patterns are provided.
*
* @experimental
- * @default false
+ * @default undefined
*/
cachedChecks?: boolean
}
@@ -232,8 +235,16 @@ export interface ViteDevServer {
watcher: FSWatcher
/**
* web socket server with `send(payload)` method
+ * @deprecated use `hot` instead
*/
ws: WebSocketServer
+ /**
+ * HMR broadcaster that can be used to send custom HMR messages to the client
+ *
+ * Always sends a message to at least a WebSocket client. Any third party can
+ * add a channel to the broadcaster to process messages
+ */
+ hot: HMRBroadcaster
/**
* Rollup plugin container that can run plugin hooks on a given file
*/
@@ -286,6 +297,11 @@ export interface ViteDevServer {
url: string,
opts?: { fixStacktrace?: boolean },
): Promise>
+ /**
+ * Fetch information about the module for Vite SSR runtime.
+ * @experimental
+ */
+ ssrFetchModule(id: string, importer?: string): Promise
/**
* Returns a fixed version of the given stack
*/
@@ -379,12 +395,12 @@ export interface ResolvedServerUrls {
export function createServer(
inlineConfig: InlineConfig = {},
): Promise {
- return _createServer(inlineConfig, { ws: true })
+ return _createServer(inlineConfig, { hotListen: true })
}
export async function _createServer(
inlineConfig: InlineConfig = {},
- options: { ws: boolean },
+ options: { hotListen: boolean },
): Promise {
const config = await resolveConfig(inlineConfig, 'serve')
@@ -403,7 +419,14 @@ export async function _createServer(
const httpServer = middlewareMode
? null
: await resolveHttpServer(serverConfig, middlewares, httpsOptions)
+
const ws = createWebSocketServer(httpServer, config, httpsOptions)
+ const hot = createHMRBroadcaster()
+ .addChannel(ws)
+ .addChannel(createServerHMRChannel())
+ if (typeof config.server.hmr === 'object' && config.server.hmr.channels) {
+ config.server.hmr.channels.forEach((channel) => hot.addChannel(channel))
+ }
if (httpServer) {
setClientErrorHandler(httpServer, config.logger)
@@ -414,7 +437,11 @@ export async function _createServer(
const watcher = watchEnabled
? (chokidar.watch(
// config file dependencies and env file might be outside of root
- [root, ...config.configFileDependencies, config.envDir],
+ [
+ root,
+ ...config.configFileDependencies,
+ ...getEnvFilesForMode(config.mode, config.envDir),
+ ],
resolvedWatchOptions,
) as FSWatcher)
: createNoopWatcher(resolvedWatchOptions)
@@ -437,6 +464,7 @@ export async function _createServer(
watcher,
pluginContainer: container,
ws,
+ hot,
moduleGraph,
resolvedUrls: null, // will be set on listen
ssrTransform(
@@ -470,9 +498,6 @@ export async function _createServer(
return devHtmlTransformFn(server, url, html, originalUrl)
},
async ssrLoadModule(url, opts?: { fixStacktrace?: boolean }) {
- if (isDepsOptimizerEnabled(config, true)) {
- await initDevSsrDepsOptimizer(config, server)
- }
return ssrLoadModule(
url,
server,
@@ -481,6 +506,9 @@ export async function _createServer(
opts?.fixStacktrace,
)
},
+ async ssrFetchModule(url: string, importer?: string) {
+ return ssrFetchModule(server, url, importer)
+ },
ssrFixStacktrace(e) {
ssrFixStacktrace(e, moduleGraph)
},
@@ -558,7 +586,7 @@ export async function _createServer(
}
await Promise.allSettled([
watcher.close(),
- ws.close(),
+ hot.close(),
container.close(),
getDepsOptimizer(server.config)?.close(),
getDepsOptimizer(server.config, true)?.close(),
@@ -617,10 +645,24 @@ export async function _createServer(
_importGlobMap: new Map(),
_forceOptimizeOnRestart: false,
_pendingRequests: new Map(),
- _fsDenyGlob: picomatch(config.server.fs.deny, { matchBase: true }),
+ _fsDenyGlob: picomatch(config.server.fs.deny, {
+ matchBase: true,
+ nocase: true,
+ }),
_shortcutsOptions: undefined,
}
+ // maintain consistency with the server instance after restarting.
+ const reflexServer = new Proxy(server, {
+ get: (_, property: keyof ViteDevServer) => {
+ return server[property]
+ },
+ set: (_, property: keyof ViteDevServer, value: never) => {
+ server[property] = value
+ return true
+ },
+ })
+
if (!middlewareMode) {
exitProcess = async () => {
try {
@@ -642,7 +684,7 @@ export async function _createServer(
try {
await handleHMRUpdate(file, server, configOnly)
} catch (err) {
- ws.send({
+ hot.send({
type: 'error',
err: prepareError(err),
})
@@ -650,17 +692,25 @@ export async function _createServer(
}
}
- const normalizedPublicDir = normalizePath(config.publicDir)
+ const { publicDir } = config
const onFileAddUnlink = async (file: string, isUnlink: boolean) => {
file = normalizePath(file)
await container.watchChange(file, { event: isUnlink ? 'delete' : 'create' })
- if (config.publicDir && publicFiles) {
- if (file.startsWith(normalizedPublicDir)) {
- publicFiles[isUnlink ? 'delete' : 'add'](
- file.slice(normalizedPublicDir.length),
- )
+ if (publicDir && publicFiles) {
+ if (file.startsWith(publicDir)) {
+ const path = file.slice(publicDir.length)
+ publicFiles[isUnlink ? 'delete' : 'add'](path)
+ if (!isUnlink) {
+ const moduleWithSamePath = await moduleGraph.getModuleByUrl(path)
+ const etag = moduleWithSamePath?.transformResult?.etag
+ if (etag) {
+ // The public file should win on the next request over a module with the
+ // same path. Prevent the transform etag fast path from serving the module
+ moduleGraph.etagToModuleMap.delete(etag)
+ }
+ }
}
}
await handleFileAddUnlink(file, server, isUnlink)
@@ -684,7 +734,7 @@ export async function _createServer(
onFileAddUnlink(file, true)
})
- ws.on('vite:invalidate', async ({ path, message }: InvalidatePayload) => {
+ hot.on('vite:invalidate', async ({ path, message }) => {
const mod = moduleGraph.urlToModuleMap.get(path)
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) {
config.logger.info(
@@ -714,7 +764,7 @@ export async function _createServer(
// apply server configuration hooks from plugins
const postHooks: ((() => void) | void)[] = []
for (const hook of config.getSortedPluginHooks('configureServer')) {
- postHooks.push(await hook(server))
+ postHooks.push(await hook(reflexServer))
}
// Internal middlewares ------------------------------------------------------
@@ -730,6 +780,8 @@ export async function _createServer(
middlewares.use(corsMiddleware(typeof cors === 'boolean' ? {} : cors))
}
+ middlewares.use(cachedTransformMiddleware(server))
+
// proxy
const { proxy } = serverConfig
if (proxy) {
@@ -761,7 +813,7 @@ export async function _createServer(
// serve static files under /public
// this applies before the transform middleware so that these files are served
// as-is without transforms.
- if (config.publicDir) {
+ if (publicDir) {
middlewares.use(servePublicMiddleware(server, publicFiles))
}
@@ -827,7 +879,7 @@ export async function _createServer(
httpServer.listen = (async (port: number, ...args: any[]) => {
try {
// ensure ws server started
- ws.listen()
+ hot.listen()
await initServer()
} catch (e) {
httpServer.emit('error', e)
@@ -836,8 +888,8 @@ export async function _createServer(
return listen(port, ...args)
}) as any
} else {
- if (options.ws) {
- ws.listen()
+ if (options.hotListen) {
+ hot.listen()
}
await initServer()
}
@@ -875,9 +927,11 @@ async function startServer(
server._currentServerPort = serverPort
}
-function createServerCloseFn(server: HttpServer | null) {
+export function createServerCloseFn(
+ server: HttpServer | null,
+): () => Promise {
if (!server) {
- return () => {}
+ return () => Promise.resolve()
}
let hasListened = false
@@ -948,8 +1002,7 @@ export function resolveServerOptions(
strict: server.fs?.strict ?? true,
allow: allowDirs,
deny,
- cachedChecks:
- server.fs?.cachedChecks ?? !!process.env.VITE_SERVER_FS_CACHED_CHECKS,
+ cachedChecks: server.fs?.cachedChecks,
}
if (server.origin?.endsWith('/')) {
@@ -988,7 +1041,7 @@ async function restartServer(server: ViteDevServer) {
let newServer = null
try {
// delay ws server listen
- newServer = await _createServer(inlineConfig, { ws: false })
+ newServer = await _createServer(inlineConfig, { hotListen: false })
} catch (err: any) {
server.config.logger.error(err.message, {
timestamp: true,
@@ -1021,7 +1074,7 @@ async function restartServer(server: ViteDevServer) {
if (!middlewareMode) {
await server.listen(port, true)
} else {
- server.ws.listen()
+ server.hot.listen()
}
logger.info('server restarted.', { timestamp: true })
diff --git a/packages/vite/src/node/server/middlewares/error.ts b/packages/vite/src/node/server/middlewares/error.ts
index 966d1663749ba2..1d67f1aa55e4ed 100644
--- a/packages/vite/src/node/server/middlewares/error.ts
+++ b/packages/vite/src/node/server/middlewares/error.ts
@@ -51,7 +51,7 @@ export function logError(server: ViteDevServer, err: RollupError): void {
error: err,
})
- server.ws.send({
+ server.hot.send({
type: 'error',
err: prepareError(err),
})
diff --git a/packages/vite/src/node/server/middlewares/htmlFallback.ts b/packages/vite/src/node/server/middlewares/htmlFallback.ts
index 0662c413062077..d073cbc78f2103 100644
--- a/packages/vite/src/node/server/middlewares/htmlFallback.ts
+++ b/packages/vite/src/node/server/middlewares/htmlFallback.ts
@@ -16,6 +16,8 @@ export function htmlFallbackMiddleware(
if (
// Only accept GET or HEAD
(req.method !== 'GET' && req.method !== 'HEAD') ||
+ // Exclude default favicon requests
+ req.url === '/favicon.ico' ||
// Require Accept: text/html or */*
!(
req.headers.accept === undefined || // equivalent to `Accept: */*`
diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts
index 4ebc2a41e86bfe..8d746d60286c9f 100644
--- a/packages/vite/src/node/server/middlewares/indexHtml.ts
+++ b/packages/vite/src/node/server/middlewares/indexHtml.ts
@@ -69,30 +69,27 @@ export function createDevHtmlTransformFn(
config.plugins,
config.logger,
)
+ const transformHooks = [
+ preImportMapHook(config),
+ ...preHooks,
+ htmlEnvHook(config),
+ devHtmlHook,
+ ...normalHooks,
+ ...postHooks,
+ postImportMapHook(),
+ ]
return (
server: ViteDevServer,
url: string,
html: string,
originalUrl?: string,
): Promise => {
- return applyHtmlTransforms(
- html,
- [
- preImportMapHook(config),
- ...preHooks,
- htmlEnvHook(config),
- devHtmlHook,
- ...normalHooks,
- ...postHooks,
- postImportMapHook(),
- ],
- {
- path: url,
- filename: getHtmlFilename(url, server),
- server,
- originalUrl,
- },
- )
+ return applyHtmlTransforms(html, transformHooks, {
+ path: url,
+ filename: getHtmlFilename(url, server),
+ server,
+ originalUrl,
+ })
}
}
@@ -127,6 +124,7 @@ const processNodeUrl = (
htmlPath: string,
originalUrl?: string,
server?: ViteDevServer,
+ isClassicScriptLink?: boolean,
): string => {
// prefix with base (dev only, base is never relative)
const replacer = (url: string) => {
@@ -155,9 +153,9 @@ const processNodeUrl = (
url = path.posix.join(config.base, url)
}
- if (server && shouldPreTransform(url, config)) {
+ if (server && !isClassicScriptLink && shouldPreTransform(url, config)) {
let preTransformUrl: string | undefined
- if (url[0] === '/') {
+ if (url[0] === '/' && url[1] !== '/') {
preTransformUrl = url
} else if (url[0] === '.' || isBareRelative(url)) {
preTransformUrl = path.posix.join(
@@ -271,6 +269,7 @@ const devHtmlHook: IndexHtmlTransformHook = async (
htmlPath,
originalUrl,
server,
+ !isModule,
)
if (processedUrl !== src.value) {
overwriteAttrValue(s, sourceCodeLocation!, processedUrl)
diff --git a/packages/vite/src/node/server/middlewares/proxy.ts b/packages/vite/src/node/server/middlewares/proxy.ts
index 52fab126b8847f..2b80f2801d2f71 100644
--- a/packages/vite/src/node/server/middlewares/proxy.ts
+++ b/packages/vite/src/node/server/middlewares/proxy.ts
@@ -65,7 +65,7 @@ export function proxyMiddleware(
)
} else if ('req' in res) {
config.logger.error(
- `${colors.red(`http proxy error at ${originalRes.req.url}:`)}\n${
+ `${colors.red(`http proxy error: ${originalRes.req.url}`)}\n${
err.stack
}`,
{
diff --git a/packages/vite/src/node/server/middlewares/static.ts b/packages/vite/src/node/server/middlewares/static.ts
index dde6842aa95533..8c94e53dd0a7c3 100644
--- a/packages/vite/src/node/server/middlewares/static.ts
+++ b/packages/vite/src/node/server/middlewares/static.ts
@@ -40,7 +40,7 @@ const sirvOptions = ({
// these files to be TypeScript files, and for Vite to serve them with
// this Content-Type.
if (knownJavascriptExtensionRE.test(pathname)) {
- res.setHeader('Content-Type', 'application/javascript')
+ res.setHeader('Content-Type', 'text/javascript')
}
const headers = getHeaders()
if (headers) {
diff --git a/packages/vite/src/node/server/middlewares/transform.ts b/packages/vite/src/node/server/middlewares/transform.ts
index 22cb736909dc6b..d335e598a6f358 100644
--- a/packages/vite/src/node/server/middlewares/transform.ts
+++ b/packages/vite/src/node/server/middlewares/transform.ts
@@ -16,6 +16,7 @@ import {
removeImportQuery,
removeTimestampQuery,
unwrapId,
+ urlRE,
withTrailingSlash,
} from '../../utils'
import { send } from '../send'
@@ -38,16 +39,52 @@ import {
} from '../../plugins/optimizedDeps'
import { ERR_CLOSED_SERVER } from '../pluginContainer'
import { getDepsOptimizer } from '../../optimizer'
-import { urlRE } from '../../plugins/asset'
const debugCache = createDebugger('vite:cache')
const knownIgnoreList = new Set(['/', '/favicon.ico'])
+/**
+ * A middleware that short-circuits the middleware chain to serve cached transformed modules
+ */
+export function cachedTransformMiddleware(
+ server: ViteDevServer,
+): Connect.NextHandleFunction {
+ // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...`
+ return function viteCachedTransformMiddleware(req, res, next) {
+ // check if we can return 304 early
+ const ifNoneMatch = req.headers['if-none-match']
+ if (ifNoneMatch) {
+ const moduleByEtag = server.moduleGraph.getModuleByEtag(ifNoneMatch)
+ if (moduleByEtag?.transformResult?.etag === ifNoneMatch) {
+ // For direct CSS requests, if the same CSS file is imported in a module,
+ // the browser sends the request for the direct CSS request with the etag
+ // from the imported CSS module. We ignore the etag in this case.
+ const mixedEtag =
+ !req.headers.accept?.includes('text/css') &&
+ isDirectRequest(moduleByEtag.url)
+ if (!mixedEtag) {
+ debugCache?.(`[304] ${prettifyUrl(req.url!, server.config.root)}`)
+ res.statusCode = 304
+ return res.end()
+ }
+ }
+ }
+
+ next()
+ }
+}
+
export function transformMiddleware(
server: ViteDevServer,
): Connect.NextHandleFunction {
// Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...`
+
+ // check if public dir is inside root dir
+ const { root, publicDir } = server.config
+ const publicDirInRoot = publicDir.startsWith(withTrailingSlash(root))
+ const publicPath = `${publicDir.slice(root.length)}/`
+
return async function viteTransformMiddleware(req, res, next) {
if (req.method !== 'GET' || knownIgnoreList.has(req.url!)) {
return next()
@@ -123,43 +160,8 @@ export function transformMiddleware(
}
}
- // check if public dir is inside root dir
- const publicDir = normalizePath(server.config.publicDir)
- const rootDir = normalizePath(server.config.root)
- if (publicDir.startsWith(withTrailingSlash(rootDir))) {
- const publicPath = `${publicDir.slice(rootDir.length)}/`
- // warn explicit public paths
- if (url.startsWith(withTrailingSlash(publicPath))) {
- let warning: string
-
- if (isImportRequest(url)) {
- const rawUrl = removeImportQuery(url)
- if (urlRE.test(url)) {
- warning =
- `Assets in the public directory are served at the root path.\n` +
- `Instead of ${colors.cyan(rawUrl)}, use ${colors.cyan(
- rawUrl.replace(publicPath, '/'),
- )}.`
- } else {
- warning =
- 'Assets in public directory cannot be imported from JavaScript.\n' +
- `If you intend to import that asset, put the file in the src directory, and use ${colors.cyan(
- rawUrl.replace(publicPath, '/src/'),
- )} instead of ${colors.cyan(rawUrl)}.\n` +
- `If you intend to use the URL of that asset, use ${colors.cyan(
- injectQuery(rawUrl.replace(publicPath, '/'), 'url'),
- )}.`
- }
- } else {
- warning =
- `Files in the public directory are served at the root path.\n` +
- `Instead of ${colors.cyan(url)}, use ${colors.cyan(
- url.replace(publicPath, '/'),
- )}.`
- }
-
- server.config.logger.warn(colors.yellow(warning))
- }
+ if (publicDirInRoot && url.startsWith(publicPath)) {
+ warnAboutExplicitPublicPathInUrl(url)
}
if (
@@ -184,18 +186,6 @@ export function transformMiddleware(
url = injectQuery(url, 'direct')
}
- // check if we can return 304 early
- const ifNoneMatch = req.headers['if-none-match']
- if (
- ifNoneMatch &&
- (await server.moduleGraph.getModuleByUrl(url, false))?.transformResult
- ?.etag === ifNoneMatch
- ) {
- debugCache?.(`[304] ${prettifyUrl(url, server.config.root)}`)
- res.statusCode = 304
- return res.end()
- }
-
// resolve, load and transform using the plugin container
const result = await transformRequest(url, server, {
html: req.headers.accept?.includes('text/html'),
@@ -265,4 +255,36 @@ export function transformMiddleware(
next()
}
+
+ function warnAboutExplicitPublicPathInUrl(url: string) {
+ let warning: string
+
+ if (isImportRequest(url)) {
+ const rawUrl = removeImportQuery(url)
+ if (urlRE.test(url)) {
+ warning =
+ `Assets in the public directory are served at the root path.\n` +
+ `Instead of ${colors.cyan(rawUrl)}, use ${colors.cyan(
+ rawUrl.replace(publicPath, '/'),
+ )}.`
+ } else {
+ warning =
+ 'Assets in public directory cannot be imported from JavaScript.\n' +
+ `If you intend to import that asset, put the file in the src directory, and use ${colors.cyan(
+ rawUrl.replace(publicPath, '/src/'),
+ )} instead of ${colors.cyan(rawUrl)}.\n` +
+ `If you intend to use the URL of that asset, use ${colors.cyan(
+ injectQuery(rawUrl.replace(publicPath, '/'), 'url'),
+ )}.`
+ }
+ } else {
+ warning =
+ `Files in the public directory are served at the root path.\n` +
+ `Instead of ${colors.cyan(url)}, use ${colors.cyan(
+ url.replace(publicPath, '/'),
+ )}.`
+ }
+
+ server.config.logger.warn(colors.yellow(warning))
+ }
}
diff --git a/packages/vite/src/node/server/moduleGraph.ts b/packages/vite/src/node/server/moduleGraph.ts
index 435b3876dde3ab..40efa65f32b67e 100644
--- a/packages/vite/src/node/server/moduleGraph.ts
+++ b/packages/vite/src/node/server/moduleGraph.ts
@@ -88,6 +88,7 @@ export type ResolvedUrl = [
export class ModuleGraph {
urlToModuleMap = new Map()
idToModuleMap = new Map()
+ etagToModuleMap = new Map()
// a single file may corresponds to multiple modules with different queries
fileToModulesMap = new Map>()
safeModulesPath = new Set()
@@ -192,6 +193,9 @@ export class ModuleGraph {
// Don't invalidate mod.info and mod.meta, as they are part of the processing pipeline
// Invalidating the transform result is enough to ensure this module is re-processed next time it is requested
+ const etag = mod.transformResult?.etag
+ if (etag) this.etagToModuleMap.delete(etag)
+
mod.transformResult = null
mod.ssrTransformResult = null
mod.ssrModule = null
@@ -419,6 +423,27 @@ export class ModuleGraph {
return this._resolveUrl(url, ssr)
}
+ updateModuleTransformResult(
+ mod: ModuleNode,
+ result: TransformResult | null,
+ ssr: boolean,
+ ): void {
+ if (ssr) {
+ mod.ssrTransformResult = result
+ } else {
+ const prevEtag = mod.transformResult?.etag
+ if (prevEtag) this.etagToModuleMap.delete(prevEtag)
+
+ mod.transformResult = result
+
+ if (result?.etag) this.etagToModuleMap.set(result.etag, mod)
+ }
+ }
+
+ getModuleByEtag(etag: string): ModuleNode | undefined {
+ return this.etagToModuleMap.get(etag)
+ }
+
/**
* @internal
*/
diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts
index 5e62f00a2e1156..551b210418363d 100644
--- a/packages/vite/src/node/server/pluginContainer.ts
+++ b/packages/vite/src/node/server/pluginContainer.ts
@@ -32,7 +32,6 @@ SOFTWARE.
import fs from 'node:fs'
import { join } from 'node:path'
import { performance } from 'node:perf_hooks'
-import { VERSION as rollupVersion } from 'rollup'
import { parseAst as rollupParseAst } from 'rollup/parseAst'
import type {
AsyncPluginHooks,
@@ -74,6 +73,7 @@ import {
normalizePath,
numberToPos,
prettifyUrl,
+ rollupVersion,
timeFrom,
unwrapId,
} from '../utils'
@@ -299,20 +299,6 @@ export async function createPluginContainer(
constructor(initialPlugin?: Plugin) {
this._activePlugin = initialPlugin || null
- this.parse = this.parse.bind(this)
- this.resolve = this.resolve.bind(this)
- this.load = this.load.bind(this)
- this.getModuleInfo = this.getModuleInfo.bind(this)
- this.getModuleIds = this.getModuleIds.bind(this)
- this.addWatchFile = this.addWatchFile.bind(this)
- this.getWatchFiles = this.getWatchFiles.bind(this)
- this.emitFile = this.emitFile.bind(this)
- this.setAssetSource = this.setAssetSource.bind(this)
- this.getFileName = this.getFileName.bind(this)
- this.warn = this.warn.bind(this)
- this.error = this.error.bind(this)
- this.debug = this.debug.bind(this)
- this.info = this.info.bind(this)
}
parse(code: string, opts: any) {
@@ -600,7 +586,20 @@ export async function createPluginContainer(
break
}
if (!combinedMap) {
- combinedMap = m as SourceMap
+ const sm = m as SourceMap
+ // sourcemap should not include `sources: [null]` (because `sources` should be string) nor
+ // `sources: ['']` (because `''` means the path of sourcemap)
+ // but MagicString generates this when `filename` option is not set.
+ // Rollup supports these and therefore we support this as well
+ if (sm.sources.length === 1 && !sm.sources[0]) {
+ combinedMap = {
+ ...sm,
+ sources: [this.filename],
+ sourcesContent: [this.originalCode],
+ }
+ } else {
+ combinedMap = sm
+ }
} else {
combinedMap = combineSourcemaps(cleanUrl(this.filename), [
m as RawSourceMap,
diff --git a/packages/vite/src/node/server/send.ts b/packages/vite/src/node/server/send.ts
index 033b9f317a60d3..cf64889c15dfb7 100644
--- a/packages/vite/src/node/server/send.ts
+++ b/packages/vite/src/node/server/send.ts
@@ -16,7 +16,7 @@ const debug = createDebugger('vite:send', {
})
const alias: Record = {
- js: 'application/javascript',
+ js: 'text/javascript',
css: 'text/css',
html: 'text/html',
json: 'application/json',
diff --git a/packages/vite/src/node/server/transformRequest.ts b/packages/vite/src/node/server/transformRequest.ts
index a37fdbe83fff7e..54028fe3dffa95 100644
--- a/packages/vite/src/node/server/transformRequest.ts
+++ b/packages/vite/src/node/server/transformRequest.ts
@@ -23,7 +23,8 @@ import {
unwrapId,
} from '../utils'
import { checkPublicFile } from '../publicDir'
-import { getDepsOptimizer } from '../optimizer'
+import { isDepsOptimizerEnabled } from '../config'
+import { getDepsOptimizer, initDevSsrDepsOptimizer } from '../optimizer'
import { applySourcemapIgnoreList, injectSourcesContent } from './sourcemap'
import { isFileServingAllowed } from './middlewares/static'
import { throwClosedServerError } from './pluginContainer'
@@ -130,27 +131,23 @@ async function doTransform(
url = removeTimestampQuery(url)
const { config, pluginContainer } = server
- const prettyUrl = debugCache ? prettifyUrl(url, config.root) : ''
const ssr = !!options.ssr
- const module = await server.moduleGraph.getModuleByUrl(url, ssr)
-
- // tries to handle soft invalidation of the module if available,
- // returns a boolean true is successful, or false if no handling is needed
- const softInvalidatedTransformResult =
- module &&
- (await handleModuleSoftInvalidation(module, ssr, timestamp, server))
- if (softInvalidatedTransformResult) {
- debugCache?.(`[memory-hmr] ${prettyUrl}`)
- return softInvalidatedTransformResult
+ if (ssr && isDepsOptimizerEnabled(config, true)) {
+ await initDevSsrDepsOptimizer(config, server)
}
- // check if we have a fresh cache
- const cached =
- module && (ssr ? module.ssrTransformResult : module.transformResult)
- if (cached) {
- debugCache?.(`[memory] ${prettyUrl}`)
- return cached
+ let module = await server.moduleGraph.getModuleByUrl(url, ssr)
+ if (module) {
+ // try use cache from url
+ const cached = await getCachedTransformResult(
+ url,
+ module,
+ server,
+ ssr,
+ timestamp,
+ )
+ if (cached) return cached
}
const resolved = module
@@ -160,6 +157,21 @@ async function doTransform(
// resolve
const id = module?.id ?? resolved?.id ?? url
+ module ??= server.moduleGraph.getModuleById(id)
+ if (module) {
+ // if a different url maps to an existing loaded id, make sure we relate this url to the id
+ await server.moduleGraph._ensureEntryFromUrl(url, ssr, undefined, resolved)
+ // try use cache from id
+ const cached = await getCachedTransformResult(
+ url,
+ module,
+ server,
+ ssr,
+ timestamp,
+ )
+ if (cached) return cached
+ }
+
const result = loadAndTransform(
id,
url,
@@ -175,6 +187,34 @@ async function doTransform(
return result
}
+async function getCachedTransformResult(
+ url: string,
+ module: ModuleNode,
+ server: ViteDevServer,
+ ssr: boolean,
+ timestamp: number,
+) {
+ const prettyUrl = debugCache ? prettifyUrl(url, server.config.root) : ''
+
+ // tries to handle soft invalidation of the module if available,
+ // returns a boolean true is successful, or false if no handling is needed
+ const softInvalidatedTransformResult =
+ module &&
+ (await handleModuleSoftInvalidation(module, ssr, timestamp, server))
+ if (softInvalidatedTransformResult) {
+ debugCache?.(`[memory-hmr] ${prettyUrl}`)
+ return softInvalidatedTransformResult
+ }
+
+ // check if we have a fresh cache
+ const cached =
+ module && (ssr ? module.ssrTransformResult : module.transformResult)
+ if (cached) {
+ debugCache?.(`[memory] ${prettyUrl}`)
+ return cached
+ }
+}
+
async function loadAndTransform(
id: string,
url: string,
@@ -322,6 +362,7 @@ async function loadAndTransform(
)
if (path.isAbsolute(mod.file)) {
+ let modDirname
for (
let sourcesIndex = 0;
sourcesIndex < normalizedMap.sources.length;
@@ -333,8 +374,9 @@ async function loadAndTransform(
// to resolve and display them in a meaningful way (rather than
// with absolute paths).
if (path.isAbsolute(sourcePath)) {
+ modDirname ??= path.dirname(mod.file)
normalizedMap.sources[sourcesIndex] = path.relative(
- path.dirname(mod.file),
+ modDirname,
sourcePath,
)
}
@@ -356,10 +398,8 @@ async function loadAndTransform(
// Only cache the result if the module wasn't invalidated while it was
// being processed, so it is re-processed next time if it is stale
- if (timestamp > mod.lastInvalidationTimestamp) {
- if (ssr) mod.ssrTransformResult = result
- else mod.transformResult = result
- }
+ if (timestamp > mod.lastInvalidationTimestamp)
+ moduleGraph.updateModuleTransformResult(mod, result, ssr)
return result
}
@@ -411,7 +451,7 @@ async function handleModuleSoftInvalidation(
await init
const source = transformResult.code
const s = new MagicString(source)
- const [imports] = parseImports(source)
+ const [imports] = parseImports(source, mod.id || undefined)
for (const imp of imports) {
let rawUrl = source.slice(imp.s, imp.e)
@@ -460,10 +500,8 @@ async function handleModuleSoftInvalidation(
// Only cache the result if the module wasn't invalidated while it was
// being processed, so it is re-processed next time if it is stale
- if (timestamp > mod.lastInvalidationTimestamp) {
- if (ssr) mod.ssrTransformResult = result
- else mod.transformResult = result
- }
+ if (timestamp > mod.lastInvalidationTimestamp)
+ server.moduleGraph.updateModuleTransformResult(mod, result, ssr)
return result
}
diff --git a/packages/vite/src/node/server/ws.ts b/packages/vite/src/node/server/ws.ts
index d9a67e4934c42f..6b70d1fbea5e77 100644
--- a/packages/vite/src/node/server/ws.ts
+++ b/packages/vite/src/node/server/ws.ts
@@ -13,6 +13,7 @@ import type { CustomPayload, ErrorPayload, HMRPayload } from 'types/hmrPayload'
import type { InferCustomEventPayload } from 'types/customEvent'
import type { ResolvedConfig } from '..'
import { isObject } from '../utils'
+import type { HMRChannel } from './hmr'
import type { HttpServer } from '.'
/* In Bun, the `ws` module is overridden to hook into the native code. Using the bundled `js` version
@@ -30,7 +31,7 @@ export type WebSocketCustomListener = (
client: WebSocketClient,
) => void
-export interface WebSocketServer {
+export interface WebSocketServer extends HMRChannel {
/**
* Listen on port and host
*/
@@ -39,14 +40,6 @@ export interface WebSocketServer {
* Get all connected clients.
*/
clients: Set
- /**
- * Broadcast events to all clients
- */
- send(payload: HMRPayload): void
- /**
- * Send custom event
- */
- send(event: T, payload?: InferCustomEventPayload): void
/**
* Disconnect all clients and terminate the server.
*/
@@ -230,6 +223,7 @@ export function createWebSocketServer(
let bufferedError: ErrorPayload | null = null
return {
+ name: 'ws',
listen: () => {
wsHttpServer?.listen(port, host)
},
diff --git a/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/index.js b/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/index.js
new file mode 100644
index 00000000000000..8f862a9f08875d
--- /dev/null
+++ b/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/index.js
@@ -0,0 +1,4 @@
+// eslint-disable-next-line no-undef
+module.exports = {
+ hello: () => 'world',
+}
diff --git a/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/package.json b/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/package.json
new file mode 100644
index 00000000000000..73a3f598a18dfd
--- /dev/null
+++ b/packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@vitejs/cjs-ssr-dep",
+ "private": true,
+ "version": "0.0.0"
+}
diff --git a/packages/vite/src/node/ssr/__tests__/package.json b/packages/vite/src/node/ssr/__tests__/package.json
new file mode 100644
index 00000000000000..a5f6e053817561
--- /dev/null
+++ b/packages/vite/src/node/ssr/__tests__/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@vitejs/unit-ssr",
+ "private": true,
+ "version": "0.0.0",
+ "dependencies": {
+ "@vitejs/cjs-ssr-dep": "link:./fixtures/cjs-ssr-dep"
+ }
+}
diff --git a/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts
new file mode 100644
index 00000000000000..68e753af703ce2
--- /dev/null
+++ b/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts
@@ -0,0 +1,29 @@
+import { fileURLToPath } from 'node:url'
+import { describe, expect, test } from 'vitest'
+import type { SSROptions } from '..'
+import { resolveConfig } from '../../config'
+import { createIsConfiguredAsSsrExternal } from '../ssrExternal'
+
+describe('createIsConfiguredAsSsrExternal', () => {
+ test('default', async () => {
+ const isExternal = await createIsExternal()
+ expect(isExternal('@vitejs/cjs-ssr-dep')).toBe(false)
+ })
+
+ test('force external', async () => {
+ const isExternal = await createIsExternal({ external: true })
+ expect(isExternal('@vitejs/cjs-ssr-dep')).toBe(true)
+ })
+})
+
+async function createIsExternal(ssrConfig?: SSROptions) {
+ const resolvedConfig = await resolveConfig(
+ {
+ configFile: false,
+ root: fileURLToPath(new URL('./', import.meta.url)),
+ ssr: ssrConfig,
+ },
+ 'serve',
+ )
+ return createIsConfiguredAsSsrExternal(resolvedConfig)
+}
diff --git a/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts
index da7b79edfb4047..192b0b8cd3326f 100644
--- a/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts
+++ b/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts
@@ -12,7 +12,7 @@ async function createDevServer() {
root,
logLevel: 'silent',
optimizeDeps: {
- disabled: true,
+ noDiscovery: true,
},
})
server.pluginContainer.buildStart({})
diff --git a/packages/vite/src/node/ssr/__tests__/ssrStacktrace.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrStacktrace.spec.ts
index 384fbd6a428992..a334c5078abd79 100644
--- a/packages/vite/src/node/ssr/__tests__/ssrStacktrace.spec.ts
+++ b/packages/vite/src/node/ssr/__tests__/ssrStacktrace.spec.ts
@@ -10,7 +10,7 @@ async function createDevServer() {
root,
logLevel: 'silent',
optimizeDeps: {
- disabled: true,
+ noDiscovery: true,
},
})
server.pluginContainer.buildStart({})
diff --git a/packages/vite/src/node/ssr/fetchModule.ts b/packages/vite/src/node/ssr/fetchModule.ts
new file mode 100644
index 00000000000000..e62d5b25d1f2d3
--- /dev/null
+++ b/packages/vite/src/node/ssr/fetchModule.ts
@@ -0,0 +1,158 @@
+import { pathToFileURL } from 'node:url'
+import type { ModuleNode, TransformResult, ViteDevServer } from '..'
+import type { PackageCache } from '../packages'
+import type { InternalResolveOptionsWithOverrideConditions } from '../plugins/resolve'
+import { tryNodeResolve } from '../plugins/resolve'
+import { isBuiltin, isExternalUrl, isFilePathESM, unwrapId } from '../utils'
+import type { FetchResult } from './runtime/types'
+
+interface NodeImportResolveOptions
+ extends InternalResolveOptionsWithOverrideConditions {
+ legacyProxySsrExternalModules?: boolean
+ packageCache?: PackageCache
+}
+
+export interface FetchModuleOptions {
+ inlineSourceMap?: boolean
+ processSourceMap?>(map: T): T
+}
+
+/**
+ * Fetch module information for Vite runtime.
+ * @experimental
+ */
+export async function fetchModule(
+ server: ViteDevServer,
+ url: string,
+ importer?: string,
+ options: FetchModuleOptions = {},
+): Promise {
+ // builtins should always be externalized
+ if (url.startsWith('data:') || isBuiltin(url)) {
+ return { externalize: url, type: 'builtin' }
+ }
+
+ if (isExternalUrl(url)) {
+ return { externalize: url, type: 'network' }
+ }
+
+ if (url[0] !== '.' && url[0] !== '/') {
+ const {
+ isProduction,
+ resolve: { dedupe, preserveSymlinks },
+ root,
+ ssr,
+ } = server.config
+ const overrideConditions = ssr.resolve?.externalConditions || []
+
+ const resolveOptions: NodeImportResolveOptions = {
+ mainFields: ['main'],
+ conditions: [],
+ overrideConditions: [...overrideConditions, 'production', 'development'],
+ extensions: ['.js', '.cjs', '.json'],
+ dedupe,
+ preserveSymlinks,
+ isBuild: false,
+ isProduction,
+ root,
+ ssrConfig: ssr,
+ legacyProxySsrExternalModules:
+ server.config.legacy?.proxySsrExternalModules,
+ packageCache: server.config.packageCache,
+ }
+
+ const resolved = tryNodeResolve(
+ url,
+ importer,
+ { ...resolveOptions, tryEsmOnly: true },
+ false,
+ undefined,
+ true,
+ )
+ if (!resolved) {
+ const err: any = new Error(
+ `Cannot find module '${url}' imported from '${importer}'`,
+ )
+ err.code = 'ERR_MODULE_NOT_FOUND'
+ throw err
+ }
+ const file = pathToFileURL(resolved.id).toString()
+ const type = isFilePathESM(file, server.config.packageCache)
+ ? 'module'
+ : 'commonjs'
+ return { externalize: file, type }
+ }
+
+ url = unwrapId(url)
+
+ let result = await server.transformRequest(url, { ssr: true })
+
+ if (!result) {
+ throw new Error(
+ `[vite] transform failed for module '${url}'${
+ importer ? ` imported from '${importer}'` : ''
+ }.`,
+ )
+ }
+
+ // module entry should be created by transformRequest
+ const mod = await server.moduleGraph.getModuleByUrl(url, true)
+
+ if (!mod) {
+ throw new Error(
+ `[vite] cannot find module '${url}' ${
+ importer ? ` imported from '${importer}'` : ''
+ }.`,
+ )
+ }
+
+ if (options.inlineSourceMap !== false) {
+ result = inlineSourceMap(mod, result, options.processSourceMap)
+ }
+
+ // remove shebang
+ if (result.code[0] === '#')
+ result.code = result.code.replace(/^#!.*/, (s) => ' '.repeat(s.length))
+
+ return { code: result.code, file: mod.file }
+}
+
+let SOURCEMAPPING_URL = 'sourceMa'
+SOURCEMAPPING_URL += 'ppingURL'
+
+const VITE_RUNTIME_SOURCEMAPPING_SOURCE = '//# sourceMappingSource=vite-runtime'
+const VITE_RUNTIME_SOURCEMAPPING_URL = `${SOURCEMAPPING_URL}=data:application/json;charset=utf-8`
+
+function inlineSourceMap(
+ mod: ModuleNode,
+ result: TransformResult,
+ processSourceMap?: FetchModuleOptions['processSourceMap'],
+) {
+ const map = result.map
+ let code = result.code
+
+ if (
+ !map ||
+ !('version' in map) ||
+ code.includes(VITE_RUNTIME_SOURCEMAPPING_SOURCE)
+ )
+ return result
+
+ // to reduce the payload size, we only inline vite node source map, because it's also the only one we use
+ const OTHER_SOURCE_MAP_REGEXP = new RegExp(
+ `//# ${SOURCEMAPPING_URL}=data:application/json[^,]+base64,([A-Za-z0-9+/=]+)$`,
+ 'gm',
+ )
+ while (OTHER_SOURCE_MAP_REGEXP.test(code))
+ code = code.replace(OTHER_SOURCE_MAP_REGEXP, '')
+
+ const sourceMap = Buffer.from(
+ JSON.stringify(processSourceMap?.(map) || map),
+ 'utf-8',
+ ).toString('base64')
+ result.code = `${code.trimEnd()}\n//# sourceURL=${
+ mod.id
+ }\n${VITE_RUNTIME_SOURCEMAPPING_SOURCE}\n//# ${VITE_RUNTIME_SOURCEMAPPING_URL};base64,${sourceMap}\n`
+
+ return result
+}
diff --git a/packages/vite/src/node/ssr/index.ts b/packages/vite/src/node/ssr/index.ts
index 59eff0735d4a94..3847e69544b2c0 100644
--- a/packages/vite/src/node/ssr/index.ts
+++ b/packages/vite/src/node/ssr/index.ts
@@ -6,7 +6,7 @@ export type SsrDepOptimizationOptions = DepOptimizationConfig
export interface SSROptions {
noExternal?: string | RegExp | (string | RegExp)[] | true
- external?: string[]
+ external?: string[] | true
/**
* Define the target for the ssr build. The browser field in package.json
@@ -60,8 +60,8 @@ export function resolveSSROptions(
target,
...ssr,
optimizeDeps: {
- disabled: true,
...optimizeDeps,
+ noDiscovery: true, // always true for ssr
esbuildOptions: {
preserveSymlinks,
...optimizeDeps.esbuildOptions,
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/a.ts b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/a.ts
new file mode 100644
index 00000000000000..804f1b9068a547
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/a.ts
@@ -0,0 +1 @@
+export const a = 'a'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets.js
new file mode 100644
index 00000000000000..01723f914c90b7
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets.js
@@ -0,0 +1,4 @@
+export { default as mov } from './assets/placeholder.mov'
+export { default as txt } from './assets/placeholder.txt'
+export { default as png } from './assets/placeholder.png'
+export { default as webp } from './assets/placeholder.webp'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.mov b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.mov
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.png b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.png
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.txt b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.txt
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.webp b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/assets/placeholder.webp
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/b.ts b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/b.ts
new file mode 100644
index 00000000000000..b426ac09186e95
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/b.ts
@@ -0,0 +1 @@
+export const b = 'b'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/basic.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/basic.js
new file mode 100644
index 00000000000000..777fa9d3ecf08f
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/basic.js
@@ -0,0 +1,3 @@
+export const name = 'basic'
+
+export const meta = import.meta
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/c.ts b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/c.ts
new file mode 100644
index 00000000000000..d21d1b6f71e82a
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/c.ts
@@ -0,0 +1,7 @@
+/* eslint-disable no-console */
+
+export { a as c } from './a'
+
+import.meta.hot?.accept(() => {
+ console.log('accept c')
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-a.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-a.js
new file mode 100644
index 00000000000000..44793c4db2b0cd
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-a.js
@@ -0,0 +1,2 @@
+export { b } from './circular-b'
+export const a = 'a'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-b.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-b.js
new file mode 100644
index 00000000000000..9cf9aedeb4c413
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-b.js
@@ -0,0 +1,2 @@
+export { a } from './circular-a'
+export const b = 'b'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-index.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-index.js
new file mode 100644
index 00000000000000..9fdf137a639c8b
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-index.js
@@ -0,0 +1,8 @@
+export { a } from './circular-a'
+export { b } from './circular-b'
+
+// since there is no .accept, it does full reload
+import.meta.hot.on('vite:beforeFullReload', () => {
+ // eslint-disable-next-line no-console
+ console.log('full reload')
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-existing.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-existing.js
new file mode 100644
index 00000000000000..30b10ff64f05c3
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-existing.js
@@ -0,0 +1,3 @@
+import { hello } from '@vitejs/cjs-external'
+
+export const result = hello()
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-non-existing.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-non-existing.js
new file mode 100644
index 00000000000000..2b67706ca1dcfb
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external-non-existing.js
@@ -0,0 +1,4 @@
+import { nonExisting } from '@vitejs/cjs-external'
+
+// eslint-disable-next-line no-console
+console.log(nonExisting)
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/index.cjs b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/index.cjs
new file mode 100644
index 00000000000000..84baa79971ff25
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/index.cjs
@@ -0,0 +1,3 @@
+module.exports = {
+ hello: () => 'world',
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/package.json b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/package.json
new file mode 100644
index 00000000000000..2629ebdb4fee41
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "@vitejs/cjs-external",
+ "private": true,
+ "version": "0.0.0",
+ "type": "commonjs",
+ "main": "index.cjs"
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/d.ts b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/d.ts
new file mode 100644
index 00000000000000..d85309b8e7e7cb
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/d.ts
@@ -0,0 +1,7 @@
+/* eslint-disable no-console */
+
+export { c as d } from './c'
+
+import.meta.hot?.accept(() => {
+ console.log('accept d')
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/dynamic-import.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/dynamic-import.js
new file mode 100644
index 00000000000000..b46e31ccb40e2e
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/dynamic-import.js
@@ -0,0 +1,14 @@
+import * as staticModule from './basic'
+
+export const initialize = async () => {
+ const nameRelative = './basic'
+ const nameAbsolute = '/fixtures/basic'
+ const nameAbsoluteExtension = '/fixtures/basic.js'
+ return {
+ dynamicProcessed: await import('./basic'),
+ dynamicRelative: await import(nameRelative),
+ dynamicAbsolute: await import(nameAbsolute),
+ dynamicAbsoluteExtension: await import(nameAbsoluteExtension),
+ static: staticModule,
+ }
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-existing.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-existing.js
new file mode 100644
index 00000000000000..89749bccc2ee7b
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-existing.js
@@ -0,0 +1,3 @@
+import { hello } from '@vitejs/esm-external'
+
+export const result = hello()
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-non-existing.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-non-existing.js
new file mode 100644
index 00000000000000..7a1d8a07ebc60a
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external-non-existing.js
@@ -0,0 +1,4 @@
+import { nonExisting } from '@vitejs/esm-external'
+
+// eslint-disable-next-line no-console
+console.log(nonExisting)
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/index.mjs b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/index.mjs
new file mode 100644
index 00000000000000..42f8d6ae1c7e73
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/index.mjs
@@ -0,0 +1 @@
+export const hello = () => 'world'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/package.json b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/package.json
new file mode 100644
index 00000000000000..ddce13efff9d3e
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "@vitejs/esm-external",
+ "private": true,
+ "type": "module",
+ "version": "0.0.0",
+ "main": "index.mjs"
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error.js
new file mode 100644
index 00000000000000..807d1c8af46b47
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/has-error.js
@@ -0,0 +1,2 @@
+// comment
+throw new Error('module error')
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/hmr.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/hmr.js
new file mode 100644
index 00000000000000..817e8e946aec6f
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/hmr.js
@@ -0,0 +1 @@
+export const hmr = import.meta.hot
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/installed.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/installed.js
new file mode 100644
index 00000000000000..bd693c45a4e26d
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/installed.js
@@ -0,0 +1 @@
+export * from 'tinyspy'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/native.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/native.js
new file mode 100644
index 00000000000000..b1f9ea4df7b9ae
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/native.js
@@ -0,0 +1,3 @@
+export { existsSync } from 'node:fs'
+// eslint-disable-next-line i/no-nodejs-modules -- testing that importing without node prefix works
+export { readdirSync } from 'fs'
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/simple.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/simple.js
new file mode 100644
index 00000000000000..a1d9deff4c396b
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/simple.js
@@ -0,0 +1,3 @@
+export const test = 'I am initialized'
+
+import.meta.hot?.accept()
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.css b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.css
new file mode 100644
index 00000000000000..6446ebfd427495
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.css
@@ -0,0 +1,3 @@
+.test {
+ color: red;
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.module.css b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.module.css
new file mode 100644
index 00000000000000..6446ebfd427495
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/test.module.css
@@ -0,0 +1,3 @@
+.test {
+ color: red;
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/throws-error-method.ts b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/throws-error-method.ts
new file mode 100644
index 00000000000000..3f5c23e4c01de4
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/throws-error-method.ts
@@ -0,0 +1,7 @@
+interface Foo {
+ bar: string
+}
+
+export function throwError(foo?: Foo): void {
+ throw new Error('method error')
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/fixtures/virtual.js b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/virtual.js
new file mode 100644
index 00000000000000..cda3c077b24c05
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/fixtures/virtual.js
@@ -0,0 +1,4 @@
+import { msg as msg0 } from 'virtual0:test'
+import { msg } from 'virtual:test'
+
+export { msg0, msg }
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/package.json b/packages/vite/src/node/ssr/runtime/__tests__/package.json
new file mode 100644
index 00000000000000..89fe86abc39d19
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "@vitejs/unit-runtime",
+ "private": true,
+ "version": "0.0.0",
+ "dependencies": {
+ "@vitejs/cjs-external": "link:./fixtures/cjs-external",
+ "@vitejs/esm-external": "link:./fixtures/esm-external",
+ "tinyspy": "2.2.0"
+ }
+}
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/server-hmr.spec.ts b/packages/vite/src/node/ssr/runtime/__tests__/server-hmr.spec.ts
new file mode 100644
index 00000000000000..ccc822f543cefc
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/server-hmr.spec.ts
@@ -0,0 +1,41 @@
+import { describe, expect } from 'vitest'
+import { createViteRuntimeTester } from './utils'
+
+describe(
+ 'vite-runtime hmr works as expected',
+ async () => {
+ const it = await createViteRuntimeTester({
+ server: {
+ // override watch options because it's disabled by default
+ watch: {},
+ },
+ })
+
+ it('hmr options are defined', async ({ runtime }) => {
+ expect(runtime.hmrClient).toBeDefined()
+
+ const mod = await runtime.executeUrl('/fixtures/hmr.js')
+ expect(mod).toHaveProperty('hmr')
+ expect(mod.hmr).toHaveProperty('accept')
+ })
+
+ it('correctly populates hmr client', async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/d')
+ expect(mod.d).toBe('a')
+
+ const fixtureC = '/fixtures/c.ts'
+ const fixtureD = '/fixtures/d.ts'
+
+ expect(runtime.hmrClient!.hotModulesMap.size).toBe(2)
+ expect(runtime.hmrClient!.dataMap.size).toBe(2)
+ expect(runtime.hmrClient!.ctxToListenersMap.size).toBe(2)
+
+ for (const fixture of [fixtureC, fixtureD]) {
+ expect(runtime.hmrClient!.hotModulesMap.has(fixture)).toBe(true)
+ expect(runtime.hmrClient!.dataMap.has(fixture)).toBe(true)
+ expect(runtime.hmrClient!.ctxToListenersMap.has(fixture)).toBe(true)
+ }
+ })
+ },
+ process.env.CI ? 50_00 : 5_000,
+)
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/server-no-hmr.spec.ts b/packages/vite/src/node/ssr/runtime/__tests__/server-no-hmr.spec.ts
new file mode 100644
index 00000000000000..ea2816756c927f
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/server-no-hmr.spec.ts
@@ -0,0 +1,20 @@
+import { describe, expect } from 'vitest'
+import { createViteRuntimeTester } from './utils'
+
+describe('vite-runtime hmr works as expected', async () => {
+ const it = await createViteRuntimeTester({
+ server: {
+ // override watch options because it's disabled by default
+ watch: {},
+ hmr: false,
+ },
+ })
+
+ it("hmr client is not defined if it's disabled", async ({ runtime }) => {
+ expect(runtime.hmrClient).toBeUndefined()
+
+ const mod = await runtime.executeUrl('/fixtures/hmr.js')
+ expect(mod).toHaveProperty('hmr')
+ expect(mod.hmr).toBeUndefined()
+ })
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts b/packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts
new file mode 100644
index 00000000000000..5dd45fba53fbcc
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts
@@ -0,0 +1,213 @@
+import { existsSync, readdirSync } from 'node:fs'
+import { posix, win32 } from 'node:path'
+import { fileURLToPath } from 'node:url'
+import { describe, expect } from 'vitest'
+import { isWindows } from '../utils'
+import { createViteRuntimeTester } from './utils'
+
+const _URL = URL
+
+describe('vite-runtime initialization', async () => {
+ const it = await createViteRuntimeTester()
+
+ it('correctly runs ssr code', async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/simple.js')
+ expect(mod.test).toEqual('I am initialized')
+
+ // loads the same module if id is a file url
+ const fileUrl = new _URL('./fixtures/simple.js', import.meta.url)
+ const mod2 = await runtime.executeUrl(fileUrl.toString())
+ expect(mod).toBe(mod2)
+
+ // loads the same module if id is a file path
+ const filePath = fileURLToPath(fileUrl)
+ const mod3 = await runtime.executeUrl(filePath)
+ expect(mod).toBe(mod3)
+ })
+
+ it('can load virtual modules as an entry point', async ({ runtime }) => {
+ const mod = await runtime.executeEntrypoint('virtual:test')
+ expect(mod.msg).toBe('virtual')
+ })
+
+ it('css is loaded correctly', async ({ runtime }) => {
+ const css = await runtime.executeUrl('/fixtures/test.css')
+ expect(css.default).toMatchInlineSnapshot(`
+ ".test {
+ color: red;
+ }
+ "
+ `)
+ const module = await runtime.executeUrl('/fixtures/test.module.css')
+ expect(module).toMatchObject({
+ default: {
+ test: expect.stringMatching(/^_test_/),
+ },
+ test: expect.stringMatching(/^_test_/),
+ })
+ })
+
+ it('assets are loaded correctly', async ({ runtime }) => {
+ const assets = await runtime.executeUrl('/fixtures/assets.js')
+ expect(assets).toMatchObject({
+ mov: '/fixtures/assets/placeholder.mov',
+ txt: '/fixtures/assets/placeholder.txt',
+ png: '/fixtures/assets/placeholder.png',
+ webp: '/fixtures/assets/placeholder.webp',
+ })
+ })
+
+ it('ids with Vite queries are loaded correctly', async ({ runtime }) => {
+ const raw = await runtime.executeUrl('/fixtures/simple.js?raw')
+ expect(raw.default).toMatchInlineSnapshot(`
+ "export const test = 'I am initialized'
+
+ import.meta.hot?.accept()
+ "
+ `)
+ const url = await runtime.executeUrl('/fixtures/simple.js?url')
+ expect(url.default).toMatchInlineSnapshot(`"/fixtures/simple.js"`)
+ const inline = await runtime.executeUrl('/fixtures/test.css?inline')
+ expect(inline.default).toMatchInlineSnapshot(`
+ ".test {
+ color: red;
+ }
+ "
+ `)
+ })
+
+ it('modules with query strings are treated as different modules', async ({
+ runtime,
+ }) => {
+ const modSimple = await runtime.executeUrl('/fixtures/simple.js')
+ const modUrl = await runtime.executeUrl('/fixtures/simple.js?url')
+ expect(modSimple).not.toBe(modUrl)
+ expect(modUrl.default).toBe('/fixtures/simple.js')
+ })
+
+ it('exports is not modifiable', async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/simple.js')
+ expect(() => {
+ mod.test = 'I am modified'
+ }).toThrowErrorMatchingInlineSnapshot(
+ `[TypeError: Cannot set property test of [object Module] which has only a getter]`,
+ )
+ expect(() => {
+ mod.other = 'I am added'
+ }).toThrowErrorMatchingInlineSnapshot(
+ `[TypeError: Cannot add property other, object is not extensible]`,
+ )
+ })
+
+ it('throws the same error', async ({ runtime }) => {
+ expect.assertions(3)
+ const s = Symbol()
+ try {
+ await runtime.executeUrl('/fixtures/has-error.js')
+ } catch (e) {
+ expect(e[s]).toBeUndefined()
+ e[s] = true
+ expect(e[s]).toBe(true)
+ }
+
+ try {
+ await runtime.executeUrl('/fixtures/has-error.js')
+ } catch (e) {
+ expect(e[s]).toBe(true)
+ }
+ })
+
+ it('importing external cjs library checks exports', async ({ runtime }) => {
+ await expect(() =>
+ runtime.executeUrl('/fixtures/cjs-external-non-existing.js'),
+ ).rejects.toThrowErrorMatchingInlineSnapshot(`
+ [SyntaxError: [vite] Named export 'nonExisting' not found. The requested module '@vitejs/cjs-external' is a CommonJS module, which may not support all module.exports as named exports.
+ CommonJS modules can always be imported via the default export, for example using:
+
+ import pkg from '@vitejs/cjs-external';
+ const {nonExisting} = pkg;
+ ]
+ `)
+ // subsequent imports of the same external package should not throw if imports are correct
+ await expect(
+ runtime.executeUrl('/fixtures/cjs-external-existing.js'),
+ ).resolves.toMatchObject({
+ result: 'world',
+ })
+ })
+
+ it('importing external esm library checks exports', async ({ runtime }) => {
+ await expect(() =>
+ runtime.executeUrl('/fixtures/esm-external-non-existing.js'),
+ ).rejects.toThrowErrorMatchingInlineSnapshot(
+ `[SyntaxError: [vite] The requested module '@vitejs/esm-external' does not provide an export named 'nonExisting']`,
+ )
+ // subsequent imports of the same external package should not throw if imports are correct
+ await expect(
+ runtime.executeUrl('/fixtures/esm-external-existing.js'),
+ ).resolves.toMatchObject({
+ result: 'world',
+ })
+ })
+
+ it("dynamic import doesn't produce duplicates", async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/dynamic-import.js')
+ const modules = await mod.initialize()
+ // toBe checks that objects are actually the same, not just structually
+ // using toEqual here would be a mistake because it chesk the structural difference
+ expect(modules.static).toBe(modules.dynamicProcessed)
+ expect(modules.static).toBe(modules.dynamicRelative)
+ expect(modules.static).toBe(modules.dynamicAbsolute)
+ expect(modules.static).toBe(modules.dynamicAbsoluteExtension)
+ })
+
+ it('correctly imports a virtual module', async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/virtual.js')
+ expect(mod.msg0).toBe('virtual0')
+ expect(mod.msg).toBe('virtual')
+ })
+
+ it('importing package from node_modules', async ({ runtime }) => {
+ const mod = (await runtime.executeUrl(
+ '/fixtures/installed.js',
+ )) as typeof import('tinyspy')
+ const fn = mod.spy()
+ fn()
+ expect(fn.called).toBe(true)
+ })
+
+ it('importing native node package', async ({ runtime }) => {
+ const mod = await runtime.executeUrl('/fixtures/native.js')
+ expect(mod.readdirSync).toBe(readdirSync)
+ expect(mod.existsSync).toBe(existsSync)
+ })
+
+ it('correctly resolves module url', async ({ runtime, server }) => {
+ const { meta } =
+ await runtime.executeUrl(
+ '/fixtures/basic',
+ )
+ const basicUrl = new _URL('./fixtures/basic.js', import.meta.url).toString()
+ expect(meta.url).toBe(basicUrl)
+
+ const filename = meta.filename!
+ const dirname = meta.dirname!
+
+ if (isWindows) {
+ const cwd = process.cwd()
+ const drive = `${cwd[0].toUpperCase()}:\\`
+ const root = server.config.root.replace(/\\/g, '/')
+
+ expect(filename.startsWith(drive)).toBe(true)
+ expect(dirname.startsWith(drive)).toBe(true)
+
+ expect(filename).toBe(win32.join(root, '.\\fixtures\\basic.js'))
+ expect(dirname).toBe(win32.join(root, '.\\fixtures'))
+ } else {
+ const root = server.config.root
+
+ expect(posix.join(root, './fixtures/basic.js')).toBe(filename)
+ expect(posix.join(root, './fixtures')).toBe(dirname)
+ }
+ })
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/server-source-maps.spec.ts b/packages/vite/src/node/ssr/runtime/__tests__/server-source-maps.spec.ts
new file mode 100644
index 00000000000000..15acfaec4990ad
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/server-source-maps.spec.ts
@@ -0,0 +1,62 @@
+import { describe, expect } from 'vitest'
+import type { ViteRuntime } from '../runtime'
+import { createViteRuntimeTester, editFile, resolvePath } from './utils'
+
+describe('vite-runtime initialization', async () => {
+ const it = await createViteRuntimeTester(
+ {},
+ {
+ sourcemapInterceptor: 'prepareStackTrace',
+ },
+ )
+
+ const getError = async (cb: () => void): Promise => {
+ try {
+ await cb()
+ expect.unreachable()
+ } catch (err) {
+ return err
+ }
+ }
+ const serializeStack = (runtime: ViteRuntime, err: Error) => {
+ return err.stack!.split('\n')[1].replace(runtime.options.root, '')
+ }
+
+ it('source maps are correctly applied to stack traces', async ({
+ runtime,
+ server,
+ }) => {
+ expect.assertions(3)
+ const topLevelError = await getError(() =>
+ runtime.executeUrl('/fixtures/has-error.js'),
+ )
+ expect(serializeStack(runtime, topLevelError)).toBe(
+ ' at /fixtures/has-error.js:2:7',
+ )
+
+ const methodError = await getError(async () => {
+ const mod = await runtime.executeUrl('/fixtures/throws-error-method.ts')
+ mod.throwError()
+ })
+ expect(serializeStack(runtime, methodError)).toBe(
+ ' at Module.throwError (/fixtures/throws-error-method.ts:6:9)',
+ )
+
+ // simulate HMR
+ editFile(
+ resolvePath(import.meta.url, './fixtures/throws-error-method.ts'),
+ (code) => '\n\n\n\n\n' + code + '\n',
+ )
+ runtime.moduleCache.clear()
+ server.moduleGraph.invalidateAll()
+
+ const methodErrorNew = await getError(async () => {
+ const mod = await runtime.executeUrl('/fixtures/throws-error-method.ts')
+ mod.throwError()
+ })
+
+ expect(serializeStack(runtime, methodErrorNew)).toBe(
+ ' at Module.throwError (/fixtures/throws-error-method.ts:11:9)',
+ )
+ })
+})
diff --git a/packages/vite/src/node/ssr/runtime/__tests__/utils.ts b/packages/vite/src/node/ssr/runtime/__tests__/utils.ts
new file mode 100644
index 00000000000000..a6d7ccb57480b3
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/__tests__/utils.ts
@@ -0,0 +1,130 @@
+import fs from 'node:fs'
+import { dirname, resolve } from 'node:path'
+import { fileURLToPath } from 'node:url'
+import type { TestAPI } from 'vitest'
+import { afterEach, beforeEach, test } from 'vitest'
+import type {
+ InlineConfig,
+ MainThreadRuntimeOptions,
+ ViteDevServer,
+} from '../../../index'
+import { createServer } from '../../../index'
+import type { ViteRuntime } from '../runtime'
+import { createViteRuntime } from '../node/mainThreadRuntime'
+
+interface TestClient {
+ server: ViteDevServer
+ runtime: ViteRuntime
+}
+
+export async function createViteRuntimeTester(
+ config: InlineConfig = {},
+ runtimeConfig: MainThreadRuntimeOptions = {},
+): Promise> {
+ function waitForWatcher(server: ViteDevServer) {
+ return new Promise((resolve) => {
+ if ((server.watcher as any)._readyEmitted) {
+ resolve()
+ } else {
+ server.watcher.once('ready', () => resolve())
+ }
+ })
+ }
+
+ beforeEach(async (t) => {
+ globalThis.__HMR__ = {}
+
+ t.server = await createServer({
+ root: __dirname,
+ logLevel: 'error',
+ server: {
+ middlewareMode: true,
+ watch: null,
+ hmr: {
+ port: 9609,
+ },
+ },
+ ssr: {
+ external: ['@vitejs/cjs-external', '@vitejs/esm-external'],
+ },
+ optimizeDeps: {
+ disabled: true,
+ noDiscovery: true,
+ include: [],
+ },
+ plugins: [
+ {
+ name: 'vite-plugin-virtual',
+ resolveId(id) {
+ if (id === 'virtual0:test') {
+ return `\0virtual:test`
+ }
+ if (id === 'virtual:test') {
+ return 'virtual:test'
+ }
+ },
+ load(id) {
+ if (id === `\0virtual:test`) {
+ return `export const msg = 'virtual0'`
+ }
+ if (id === `virtual:test`) {
+ return `export const msg = 'virtual'`
+ }
+ },
+ },
+ ],
+ ...config,
+ })
+ t.runtime = await createViteRuntime(t.server, {
+ hmr: {
+ logger: false,
+ },
+ // don't override by default so Vitest source maps are correct
+ sourcemapInterceptor: false,
+ ...runtimeConfig,
+ })
+ if (config.server?.watch) {
+ await waitForWatcher(t.server)
+ }
+ })
+
+ afterEach(async (t) => {
+ await t.runtime.destroy()
+ await t.server.close()
+ })
+
+ return test as TestAPI
+}
+
+const originalFiles = new Map()
+const createdFiles = new Set()
+afterEach(() => {
+ originalFiles.forEach((content, file) => {
+ fs.writeFileSync(file, content, 'utf-8')
+ })
+ createdFiles.forEach((file) => {
+ if (fs.existsSync(file)) fs.unlinkSync(file)
+ })
+ originalFiles.clear()
+ createdFiles.clear()
+})
+
+export function createFile(file: string, content: string): void {
+ createdFiles.add(file)
+ fs.mkdirSync(dirname(file), { recursive: true })
+ fs.writeFileSync(file, content, 'utf-8')
+}
+
+export function editFile(
+ file: string,
+ callback: (content: string) => string,
+): void {
+ const content = fs.readFileSync(file, 'utf-8')
+ if (!originalFiles.has(file)) originalFiles.set(file, content)
+ fs.writeFileSync(file, callback(content), 'utf-8')
+}
+
+export function resolvePath(baseUrl: string, path: string): string {
+ const filename = fileURLToPath(baseUrl)
+ return resolve(dirname(filename), path).replace(/\\/g, '/')
+}
diff --git a/packages/vite/src/node/ssr/runtime/constants.ts b/packages/vite/src/node/ssr/runtime/constants.ts
new file mode 100644
index 00000000000000..9c0f1cb8944395
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/constants.ts
@@ -0,0 +1,6 @@
+// they are exported from ssrTransform plugin, but we can't import from there for performance reasons
+export const ssrModuleExportsKey = `__vite_ssr_exports__`
+export const ssrImportKey = `__vite_ssr_import__`
+export const ssrDynamicImportKey = `__vite_ssr_dynamic_import__`
+export const ssrExportAllKey = `__vite_ssr_exportAll__`
+export const ssrImportMetaKey = `__vite_ssr_import_meta__`
diff --git a/packages/vite/src/node/ssr/runtime/esmRunner.ts b/packages/vite/src/node/ssr/runtime/esmRunner.ts
new file mode 100644
index 00000000000000..a9aacd8fbea13f
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/esmRunner.ts
@@ -0,0 +1,43 @@
+import {
+ ssrDynamicImportKey,
+ ssrExportAllKey,
+ ssrImportKey,
+ ssrImportMetaKey,
+ ssrModuleExportsKey,
+} from './constants'
+import type { ViteModuleRunner, ViteRuntimeModuleContext } from './types'
+
+// eslint-disable-next-line @typescript-eslint/no-empty-function
+const AsyncFunction = async function () {}.constructor as typeof Function
+
+export class ESModulesRunner implements ViteModuleRunner {
+ async runViteModule(
+ context: ViteRuntimeModuleContext,
+ code: string,
+ ): Promise {
+ // use AsyncFunction instead of vm module to support broader array of environments out of the box
+ const initModule = new AsyncFunction(
+ ssrModuleExportsKey,
+ ssrImportMetaKey,
+ ssrImportKey,
+ ssrDynamicImportKey,
+ ssrExportAllKey,
+ // source map should already be inlined by Vite
+ '"use strict";' + code,
+ )
+
+ await initModule(
+ context[ssrModuleExportsKey],
+ context[ssrImportMetaKey],
+ context[ssrImportKey],
+ context[ssrDynamicImportKey],
+ context[ssrExportAllKey],
+ )
+
+ Object.freeze(context[ssrModuleExportsKey])
+ }
+
+ runExternalModule(filepath: string): Promise {
+ return import(filepath)
+ }
+}
diff --git a/packages/vite/src/node/ssr/runtime/hmrHandler.ts b/packages/vite/src/node/ssr/runtime/hmrHandler.ts
new file mode 100644
index 00000000000000..413d355c2f51a0
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/hmrHandler.ts
@@ -0,0 +1,115 @@
+import type { HMRPayload } from 'types/hmrPayload'
+import type { ViteRuntime } from './runtime'
+import { unwrapId } from './utils'
+
+// updates to HMR should go one after another. It is possible to trigger another update during the invalidation for example.
+export function createHMRHandler(
+ runtime: ViteRuntime,
+): (payload: HMRPayload) => Promise {
+ const queue = new Queue()
+ return (payload) => queue.enqueue(() => handleHMRPayload(runtime, payload))
+}
+
+export async function handleHMRPayload(
+ runtime: ViteRuntime,
+ payload: HMRPayload,
+): Promise {
+ const hmrClient = runtime.hmrClient
+ if (!hmrClient || runtime.isDestroyed()) return
+ switch (payload.type) {
+ case 'connected':
+ hmrClient.logger.debug(`[vite] connected.`)
+ hmrClient.messenger.flush()
+ break
+ case 'update':
+ await hmrClient.notifyListeners('vite:beforeUpdate', payload)
+ await Promise.all(
+ payload.updates.map(async (update): Promise => {
+ if (update.type === 'js-update') {
+ // runtime always caches modules by their full path without /@id/ prefix
+ update.acceptedPath = unwrapId(update.acceptedPath)
+ update.path = unwrapId(update.path)
+ return hmrClient.queueUpdate(update)
+ }
+
+ hmrClient.logger.error(
+ '[vite] css hmr is not supported in runtime mode.',
+ )
+ }),
+ )
+ await hmrClient.notifyListeners('vite:afterUpdate', payload)
+ break
+ case 'custom': {
+ await hmrClient.notifyListeners(payload.event, payload.data)
+ break
+ }
+ case 'full-reload':
+ hmrClient.logger.debug(`[vite] program reload`)
+ await hmrClient.notifyListeners('vite:beforeFullReload', payload)
+ Array.from(runtime.moduleCache.keys()).forEach((id) => {
+ if (!id.includes('node_modules')) {
+ runtime.moduleCache.deleteByModuleId(id)
+ }
+ })
+ for (const id of runtime.entrypoints) {
+ await runtime.executeUrl(id)
+ }
+ break
+ case 'prune':
+ await hmrClient.notifyListeners('vite:beforePrune', payload)
+ hmrClient.prunePaths(payload.paths)
+ break
+ case 'error': {
+ await hmrClient.notifyListeners('vite:error', payload)
+ const err = payload.err
+ hmrClient.logger.error(
+ `[vite] Internal Server Error\n${err.message}\n${err.stack}`,
+ )
+ break
+ }
+ default: {
+ const check: never = payload
+ return check
+ }
+ }
+}
+
+class Queue {
+ private queue: {
+ promise: () => Promise
+ resolve: (value?: unknown) => void
+ reject: (err?: unknown) => void
+ }[] = []
+ private pending = false
+
+ enqueue(promise: () => Promise) {
+ return new Promise((resolve, reject) => {
+ this.queue.push({
+ promise,
+ resolve,
+ reject,
+ })
+ this.dequeue()
+ })
+ }
+
+ dequeue() {
+ if (this.pending) {
+ return false
+ }
+ const item = this.queue.shift()
+ if (!item) {
+ return false
+ }
+ this.pending = true
+ item
+ .promise()
+ .then(item.resolve)
+ .catch(item.reject)
+ .finally(() => {
+ this.pending = false
+ this.dequeue()
+ })
+ return true
+ }
+}
diff --git a/packages/vite/src/node/ssr/runtime/hmrLogger.ts b/packages/vite/src/node/ssr/runtime/hmrLogger.ts
new file mode 100644
index 00000000000000..4fc83dba7a4a6a
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/hmrLogger.ts
@@ -0,0 +1,8 @@
+import type { HMRLogger } from '../../../shared/hmr'
+
+const noop = (): void => {}
+
+export const silentConsole: HMRLogger = {
+ debug: noop,
+ error: noop,
+}
diff --git a/packages/vite/src/node/ssr/runtime/index.ts b/packages/vite/src/node/ssr/runtime/index.ts
new file mode 100644
index 00000000000000..f2b5b83f0fda5d
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/index.ts
@@ -0,0 +1,26 @@
+// this file should re-export only things that don't rely on Node.js or other runtime features
+
+export { ModuleCacheMap } from './moduleCache'
+export { ViteRuntime } from './runtime'
+export { ESModulesRunner } from './esmRunner'
+
+export type { HMRLogger, HMRConnection } from '../../../shared/hmr'
+export type {
+ ViteModuleRunner,
+ ViteRuntimeModuleContext,
+ ModuleCache,
+ FetchResult,
+ FetchFunction,
+ ResolvedResult,
+ SSRImportMetadata,
+ HMRRuntimeConnection,
+ ViteRuntimeImportMeta,
+ ViteRuntimeOptions,
+} from './types'
+export {
+ ssrDynamicImportKey,
+ ssrExportAllKey,
+ ssrImportKey,
+ ssrImportMetaKey,
+ ssrModuleExportsKey,
+} from './constants'
diff --git a/packages/vite/src/node/ssr/runtime/moduleCache.ts b/packages/vite/src/node/ssr/runtime/moduleCache.ts
new file mode 100644
index 00000000000000..e40d1dd7316960
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/moduleCache.ts
@@ -0,0 +1,154 @@
+import { DecodedMap } from './sourcemap/decoder'
+import type { ModuleCache } from './types'
+import { decodeBase64, isWindows } from './utils'
+
+let SOURCEMAPPING_URL = 'sourceMa'
+SOURCEMAPPING_URL += 'ppingURL'
+
+const VITE_RUNTIME_SOURCEMAPPING_URL = `${SOURCEMAPPING_URL}=data:application/json;charset=utf-8`
+const VITE_RUNTIME_SOURCEMAPPING_REGEXP = new RegExp(
+ `//# ${VITE_RUNTIME_SOURCEMAPPING_URL};base64,(.+)`,
+)
+
+export class ModuleCacheMap extends Map {
+ private root: string
+
+ constructor(root: string, entries?: [string, ModuleCache][]) {
+ super(entries)
+ this.root = withTrailingSlash(root)
+ }
+
+ normalize(fsPath: string): string {
+ return normalizeModuleId(fsPath, this.root)
+ }
+
+ /**
+ * Assign partial data to the map
+ */
+ update(fsPath: string, mod: ModuleCache): this {
+ fsPath = this.normalize(fsPath)
+ if (!super.has(fsPath)) this.setByModuleId(fsPath, mod)
+ else Object.assign(super.get(fsPath) as ModuleCache, mod)
+ return this
+ }
+
+ setByModuleId(modulePath: string, mod: ModuleCache): this {
+ return super.set(modulePath, mod)
+ }
+
+ override set(fsPath: string, mod: ModuleCache): this {
+ return this.setByModuleId(this.normalize(fsPath), mod)
+ }
+
+ getByModuleId(modulePath: string): ModuleCache {
+ if (!super.has(modulePath)) this.setByModuleId(modulePath, {})
+
+ const mod = super.get(modulePath)!
+ if (!mod.imports) {
+ Object.assign(mod, {
+ imports: new Set(),
+ importers: new Set(),
+ })
+ }
+ return mod as ModuleCache
+ }
+
+ override get(fsPath: string): ModuleCache {
+ return this.getByModuleId(this.normalize(fsPath))
+ }
+
+ deleteByModuleId(modulePath: string): boolean {
+ return super.delete(modulePath)
+ }
+
+ override delete(fsPath: string): boolean {
+ return this.deleteByModuleId(this.normalize(fsPath))
+ }
+
+ /**
+ * Invalidate modules that dependent on the given modules, up to the main entry
+ */
+ invalidateDepTree(
+ ids: string[] | Set,
+ invalidated = new Set(),
+ ): Set {
+ for (const _id of ids) {
+ const id = this.normalize(_id)
+ if (invalidated.has(id)) continue
+ invalidated.add(id)
+ const mod = super.get(id)
+ if (mod?.importers) this.invalidateDepTree(mod.importers, invalidated)
+ super.delete(id)
+ }
+ return invalidated
+ }
+
+ /**
+ * Invalidate dependency modules of the given modules, down to the bottom-level dependencies
+ */
+ invalidateSubDepTree(
+ ids: string[] | Set,
+ invalidated = new Set(),
+ ): Set {
+ for (const _id of ids) {
+ const id = this.normalize(_id)
+ if (invalidated.has(id)) continue
+ invalidated.add(id)
+ const subIds = Array.from(super.entries())
+ .filter(([, mod]) => mod.importers?.has(id))
+ .map(([key]) => key)
+ subIds.length && this.invalidateSubDepTree(subIds, invalidated)
+ super.delete(id)
+ }
+ return invalidated
+ }
+
+ getSourceMap(moduleId: string): null | DecodedMap {
+ const mod = this.get(moduleId)
+ if (mod.map) return mod.map
+ if (!mod.meta || !('code' in mod.meta)) return null
+ const mapString = mod.meta.code.match(
+ VITE_RUNTIME_SOURCEMAPPING_REGEXP,
+ )?.[1]
+ if (!mapString) return null
+ const baseFile = mod.meta.file || moduleId.split('?')[0]
+ mod.map = new DecodedMap(JSON.parse(decodeBase64(mapString)), baseFile)
+ return mod.map
+ }
+}
+
+function withTrailingSlash(path: string): string {
+ if (path[path.length - 1] !== '/') {
+ return `${path}/`
+ }
+ return path
+}
+
+// unique id that is not available as "$bare_import" like "test"
+const prefixedBuiltins = new Set(['node:test'])
+
+// transform file url to id
+// virtual:custom -> virtual:custom
+// \0custom -> \0custom
+// /root/id -> /id
+// /root/id.js -> /id.js
+// C:/root/id.js -> /id.js
+// C:\root\id.js -> /id.js
+function normalizeModuleId(file: string, root: string): string {
+ if (prefixedBuiltins.has(file)) return file
+
+ // unix style, but Windows path still starts with the drive letter to check the root
+ let unixFile = file
+ .replace(/\\/g, '/')
+ .replace(/^\/@fs\//, isWindows ? '' : '/')
+ .replace(/^node:/, '')
+ .replace(/^\/+/, '/')
+
+ if (unixFile.startsWith(root)) {
+ // keep slash
+ unixFile = unixFile.slice(root.length - 1)
+ }
+
+ // if it's not in the root, keep it as a path, not a URL
+ return unixFile.replace(/^file:\//, '/')
+}
diff --git a/packages/vite/src/node/ssr/runtime/node/mainThreadRuntime.ts b/packages/vite/src/node/ssr/runtime/node/mainThreadRuntime.ts
new file mode 100644
index 00000000000000..9146f42c1f3b21
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/node/mainThreadRuntime.ts
@@ -0,0 +1,85 @@
+import { existsSync, readFileSync } from 'node:fs'
+import type { ViteDevServer } from '../../../index'
+import { ViteRuntime } from '../runtime'
+import { ESModulesRunner } from '../esmRunner'
+import type { ViteModuleRunner, ViteRuntimeOptions } from '../types'
+import type { HMRLogger } from '../../../../shared/hmr'
+import { ServerHMRConnector } from './serverHmrConnector'
+
+/**
+ * @experimental
+ */
+export interface MainThreadRuntimeOptions
+ extends Omit {
+ /**
+ * Disable HMR or configure HMR logger.
+ */
+ hmr?:
+ | false
+ | {
+ logger?: false | HMRLogger
+ }
+ /**
+ * Provide a custom module runner. This controls how the code is executed.
+ */
+ runner?: ViteModuleRunner
+}
+
+function createHMROptions(
+ server: ViteDevServer,
+ options: MainThreadRuntimeOptions,
+) {
+ if (server.config.server.hmr === false || options.hmr === false) {
+ return false
+ }
+ const connection = new ServerHMRConnector(server)
+ return {
+ connection,
+ logger: options.hmr?.logger,
+ }
+}
+
+const prepareStackTrace = {
+ retrieveFile(id: string) {
+ if (existsSync(id)) {
+ return readFileSync(id, 'utf-8')
+ }
+ },
+}
+
+function resolveSourceMapOptions(options: MainThreadRuntimeOptions) {
+ if (options.sourcemapInterceptor != null) {
+ if (options.sourcemapInterceptor === 'prepareStackTrace') {
+ return prepareStackTrace
+ }
+ if (typeof options.sourcemapInterceptor === 'object') {
+ return { ...prepareStackTrace, ...options.sourcemapInterceptor }
+ }
+ return options.sourcemapInterceptor
+ }
+ if (typeof process !== 'undefined' && 'setSourceMapsEnabled' in process) {
+ return 'node'
+ }
+ return prepareStackTrace
+}
+
+/**
+ * Create an instance of the Vite SSR runtime that support HMR.
+ * @experimental
+ */
+export async function createViteRuntime(
+ server: ViteDevServer,
+ options: MainThreadRuntimeOptions = {},
+): Promise {
+ const hmr = createHMROptions(server, options)
+ return new ViteRuntime(
+ {
+ ...options,
+ root: server.config.root,
+ fetchModule: server.ssrFetchModule,
+ hmr,
+ sourcemapInterceptor: resolveSourceMapOptions(options),
+ },
+ options.runner || new ESModulesRunner(),
+ )
+}
diff --git a/packages/vite/src/node/ssr/runtime/node/serverHmrConnector.ts b/packages/vite/src/node/ssr/runtime/node/serverHmrConnector.ts
new file mode 100644
index 00000000000000..21e0315ad381d5
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/node/serverHmrConnector.ts
@@ -0,0 +1,77 @@
+import type { CustomPayload, HMRPayload } from 'types/hmrPayload'
+import type { ViteDevServer } from '../../../server'
+import type {
+ HMRBroadcasterClient,
+ ServerHMRChannel,
+} from '../../../server/hmr'
+import type { HMRRuntimeConnection } from '../types'
+
+class ServerHMRBroadcasterClient implements HMRBroadcasterClient {
+ constructor(private readonly hmrChannel: ServerHMRChannel) {}
+
+ send(...args: any[]) {
+ let payload: HMRPayload
+ if (typeof args[0] === 'string') {
+ payload = {
+ type: 'custom',
+ event: args[0],
+ data: args[1],
+ }
+ } else {
+ payload = args[0]
+ }
+ if (payload.type !== 'custom') {
+ throw new Error(
+ 'Cannot send non-custom events from the client to the server.',
+ )
+ }
+ this.hmrChannel.send(payload)
+ }
+}
+
+/**
+ * The connector class to establish HMR communication between the server and the Vite runtime.
+ * @experimental
+ */
+export class ServerHMRConnector implements HMRRuntimeConnection {
+ private handlers: ((payload: HMRPayload) => void)[] = []
+ private hmrChannel: ServerHMRChannel
+ private hmrClient: ServerHMRBroadcasterClient
+
+ private connected = false
+
+ constructor(server: ViteDevServer) {
+ const hmrChannel = server.hot?.channels.find(
+ (c) => c.name === 'ssr',
+ ) as ServerHMRChannel
+ if (!hmrChannel) {
+ throw new Error(
+ "Your version of Vite doesn't support HMR during SSR. Please, use Vite 5.1 or higher.",
+ )
+ }
+ this.hmrClient = new ServerHMRBroadcasterClient(hmrChannel)
+ hmrChannel.api.outsideEmitter.on('send', (payload: HMRPayload) => {
+ this.handlers.forEach((listener) => listener(payload))
+ })
+ this.hmrChannel = hmrChannel
+ }
+
+ isReady(): boolean {
+ return this.connected
+ }
+
+ send(message: string): void {
+ const payload = JSON.parse(message) as CustomPayload
+ this.hmrChannel.api.innerEmitter.emit(
+ payload.event,
+ payload.data,
+ this.hmrClient,
+ )
+ }
+
+ onUpdate(handler: (payload: HMRPayload) => void): void {
+ this.handlers.push(handler)
+ handler({ type: 'connected' })
+ this.connected = true
+ }
+}
diff --git a/packages/vite/src/node/ssr/runtime/runtime.ts b/packages/vite/src/node/ssr/runtime/runtime.ts
new file mode 100644
index 00000000000000..1c43eb713eea4f
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/runtime.ts
@@ -0,0 +1,487 @@
+import type { ViteHotContext } from 'types/hot'
+import { HMRClient, HMRContext } from '../../../shared/hmr'
+import { ModuleCacheMap } from './moduleCache'
+import type {
+ FetchResult,
+ ModuleCache,
+ ResolvedResult,
+ SSRImportMetadata,
+ ViteModuleRunner,
+ ViteRuntimeImportMeta,
+ ViteRuntimeModuleContext,
+ ViteRuntimeOptions,
+} from './types'
+import {
+ cleanUrl,
+ isPrimitive,
+ isWindows,
+ posixDirname,
+ posixPathToFileHref,
+ posixResolve,
+ toWindowsPath,
+ unwrapId,
+ wrapId,
+} from './utils'
+import {
+ ssrDynamicImportKey,
+ ssrExportAllKey,
+ ssrImportKey,
+ ssrImportMetaKey,
+ ssrModuleExportsKey,
+} from './constants'
+import { silentConsole } from './hmrLogger'
+import { createHMRHandler } from './hmrHandler'
+import { enableSourceMapSupport } from './sourcemap/index'
+
+interface ViteRuntimeDebugger {
+ (formatter: unknown, ...args: unknown[]): void
+}
+
+export class ViteRuntime {
+ /**
+ * Holds the cache of modules
+ * Keys of the map are ids
+ */
+ public moduleCache: ModuleCacheMap
+ public hmrClient?: HMRClient
+ public entrypoints = new Set()
+
+ private idToUrlMap = new Map()
+ private fileToIdMap = new Map()
+ private envProxy = new Proxy({} as any, {
+ get(_, p) {
+ throw new Error(
+ `[vite-runtime] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`,
+ )
+ },
+ })
+
+ private _destroyed = false
+ private _resetSourceMapSupport?: () => void
+
+ constructor(
+ public options: ViteRuntimeOptions,
+ public runner: ViteModuleRunner,
+ private debug?: ViteRuntimeDebugger,
+ ) {
+ this.moduleCache = options.moduleCache ?? new ModuleCacheMap(options.root)
+ if (typeof options.hmr === 'object') {
+ this.hmrClient = new HMRClient(
+ options.hmr.logger === false
+ ? silentConsole
+ : options.hmr.logger || console,
+ options.hmr.connection,
+ ({ acceptedPath, ssrInvalidates }) => {
+ this.moduleCache.delete(acceptedPath)
+ if (ssrInvalidates) {
+ this.invalidateFiles(ssrInvalidates)
+ }
+ return this.executeUrl(acceptedPath)
+ },
+ )
+ options.hmr.connection.onUpdate(createHMRHandler(this))
+ }
+ if (options.sourcemapInterceptor !== false) {
+ this._resetSourceMapSupport = enableSourceMapSupport(this)
+ }
+ }
+
+ /**
+ * URL to execute. Accepts file path, server path or id relative to the root.
+ */
+ public async executeUrl(url: string): Promise {
+ url = this.normalizeEntryUrl(url)
+ const fetchedModule = await this.cachedModule(url)
+ return await this.cachedRequest(url, fetchedModule)
+ }
+
+ /**
+ * Entrypoint URL to execute. Accepts file path, server path or id relative to the root.
+ * In the case of a full reload triggered by HMR, this is the module that will be reloaded.
+ * If this method is called multiple times, all entrypoints will be reloaded one at a time.
+ */
+ public async executeEntrypoint(url: string): Promise {
+ url = this.normalizeEntryUrl(url)
+ const fetchedModule = await this.cachedModule(url)
+ return await this.cachedRequest(url, fetchedModule, [], {
+ entrypoint: true,
+ })
+ }
+
+ /**
+ * Clear all caches including HMR listeners.
+ */
+ public clearCache(): void {
+ this.moduleCache.clear()
+ this.idToUrlMap.clear()
+ this.entrypoints.clear()
+ this.hmrClient?.clear()
+ }
+
+ /**
+ * Clears all caches, removes all HMR listeners, and resets source map support.
+ * This method doesn't stop the HMR connection.
+ */
+ public async destroy(): Promise {
+ this._resetSourceMapSupport?.()
+ this.clearCache()
+ this.hmrClient = undefined
+ this._destroyed = true
+ }
+
+ /**
+ * Returns `true` if the runtime has been destroyed by calling `destroy()` method.
+ */
+ public isDestroyed(): boolean {
+ return this._destroyed
+ }
+
+ private invalidateFiles(files: string[]) {
+ files.forEach((file) => {
+ const ids = this.fileToIdMap.get(file)
+ if (ids) {
+ ids.forEach((id) => this.moduleCache.deleteByModuleId(id))
+ }
+ })
+ }
+
+ // we don't use moduleCache.normalize because this URL doesn't have to follow the same rules
+ // this URL is something that user passes down manually, and is later resolved by fetchModule
+ // moduleCache.normalize is used on resolved "file" property
+ private normalizeEntryUrl(url: string) {
+ // expect fetchModule to resolve relative module correctly
+ if (url[0] === '.') {
+ return url
+ }
+ // file:///C:/root/id.js -> C:/root/id.js
+ if (url.startsWith('file://')) {
+ // 8 is the length of "file:///"
+ url = url.slice(isWindows ? 8 : 7)
+ }
+ url = url.replace(/\\/g, '/')
+ const _root = this.options.root
+ const root = _root[_root.length - 1] === '/' ? _root : `${_root}/`
+ // strip root from the URL because fetchModule prefers a public served url path
+ // packages/vite/src/node/server/moduleGraph.ts:17
+ if (url.startsWith(root)) {
+ // /root/id.js -> /id.js
+ // C:/root/id.js -> /id.js
+ // 1 is to keep the leading slash
+ return url.slice(root.length - 1)
+ }
+ // if it's a server url (starts with a slash), keep it, otherwise assume a virtual module
+ // /id.js -> /id.js
+ // virtual:custom -> /@id/virtual:custom
+ return url[0] === '/' ? url : wrapId(url)
+ }
+
+ private processImport(
+ exports: Record,
+ fetchResult: ResolvedResult,
+ metadata?: SSRImportMetadata,
+ ) {
+ if (!('externalize' in fetchResult)) {
+ return exports
+ }
+ const { id, type } = fetchResult
+ if (type !== 'module' && type !== 'commonjs') return exports
+ analyzeImportedModDifference(exports, id, type, metadata)
+ return proxyGuardOnlyEsm(exports, id, metadata)
+ }
+
+ private async cachedRequest(
+ id: string,
+ fetchedModule: ResolvedResult,
+ callstack: string[] = [],
+ metadata?: SSRImportMetadata,
+ ): Promise {
+ const moduleId = fetchedModule.id
+
+ if (metadata?.entrypoint) {
+ this.entrypoints.add(moduleId)
+ }
+
+ const mod = this.moduleCache.getByModuleId(moduleId)
+
+ const { imports, importers } = mod as Required
+
+ const importee = callstack[callstack.length - 1]
+
+ if (importee) importers.add(importee)
+
+ // check circular dependency
+ if (
+ callstack.includes(moduleId) ||
+ Array.from(imports.values()).some((i) => importers.has(i))
+ ) {
+ if (mod.exports)
+ return this.processImport(mod.exports, fetchedModule, metadata)
+ }
+
+ const getStack = () =>
+ `stack:\n${[...callstack, moduleId]
+ .reverse()
+ .map((p) => ` - ${p}`)
+ .join('\n')}`
+
+ let debugTimer: any
+ if (this.debug)
+ debugTimer = setTimeout(
+ () =>
+ this.debug!(
+ `[vite-runtime] module ${moduleId} takes over 2s to load.\n${getStack()}`,
+ ),
+ 2000,
+ )
+
+ try {
+ // cached module
+ if (mod.promise)
+ return this.processImport(await mod.promise, fetchedModule, metadata)
+
+ const promise = this.directRequest(id, fetchedModule, callstack)
+ mod.promise = promise
+ mod.evaluated = false
+ return this.processImport(await promise, fetchedModule, metadata)
+ } finally {
+ mod.evaluated = true
+ if (debugTimer) clearTimeout(debugTimer)
+ }
+ }
+
+ private async cachedModule(
+ id: string,
+ importer?: string,
+ ): Promise {
+ if (this._destroyed) {
+ throw new Error(`[vite] Vite runtime has been destroyed.`)
+ }
+ const normalized = this.idToUrlMap.get(id)
+ if (normalized) {
+ const mod = this.moduleCache.getByModuleId(normalized)
+ if (mod.meta) {
+ return mod.meta as ResolvedResult
+ }
+ }
+ this.debug?.('[vite-runtime] fetching', id)
+ // fast return for established externalized patterns
+ const fetchedModule = id.startsWith('data:')
+ ? ({ externalize: id, type: 'builtin' } as FetchResult)
+ : await this.options.fetchModule(id, importer)
+ // base moduleId on "file" and not on id
+ // if `import(variable)` is called it's possible that it doesn't have an extension for example
+ // if we used id for that, it's possible to have a duplicated module
+ const idQuery = id.split('?')[1]
+ const query = idQuery ? `?${idQuery}` : ''
+ const file = 'file' in fetchedModule ? fetchedModule.file : undefined
+ const fullFile = file ? `${file}${query}` : id
+ const moduleId = this.moduleCache.normalize(fullFile)
+ const mod = this.moduleCache.getByModuleId(moduleId)
+ ;(fetchedModule as ResolvedResult).id = moduleId
+ mod.meta = fetchedModule
+
+ if (file) {
+ const fileModules = this.fileToIdMap.get(file) || []
+ fileModules.push(moduleId)
+ this.fileToIdMap.set(file, fileModules)
+ }
+
+ this.idToUrlMap.set(id, moduleId)
+ this.idToUrlMap.set(unwrapId(id), moduleId)
+ return fetchedModule as ResolvedResult
+ }
+
+ // override is allowed, consider this a public API
+ protected async directRequest(
+ id: string,
+ fetchResult: ResolvedResult,
+ _callstack: string[],
+ ): Promise {
+ const moduleId = fetchResult.id
+ const callstack = [..._callstack, moduleId]
+
+ const mod = this.moduleCache.getByModuleId(moduleId)
+
+ const request = async (dep: string, metadata?: SSRImportMetadata) => {
+ const fetchedModule = await this.cachedModule(dep, moduleId)
+ const depMod = this.moduleCache.getByModuleId(fetchedModule.id)
+ depMod.importers!.add(moduleId)
+ mod.imports!.add(fetchedModule.id)
+
+ return this.cachedRequest(dep, fetchedModule, callstack, metadata)
+ }
+
+ const dynamicRequest = async (dep: string) => {
+ // it's possible to provide an object with toString() method inside import()
+ dep = String(dep)
+ if (dep[0] === '.') {
+ dep = posixResolve(posixDirname(id), dep)
+ }
+ return request(dep, { isDynamicImport: true })
+ }
+
+ if ('externalize' in fetchResult) {
+ const { externalize } = fetchResult
+ this.debug?.('[vite-runtime] externalizing', externalize)
+ const exports = await this.runner.runExternalModule(externalize)
+ mod.exports = exports
+ return exports
+ }
+
+ const { code, file } = fetchResult
+
+ if (code == null) {
+ const importer = callstack[callstack.length - 2]
+ throw new Error(
+ `[vite-runtime] Failed to load "${id}"${
+ importer ? ` imported from ${importer}` : ''
+ }`,
+ )
+ }
+
+ const modulePath = cleanUrl(file || moduleId)
+ // disambiguate the `:/` on windows: see nodejs/node#31710
+ const href = posixPathToFileHref(modulePath)
+ const filename = modulePath
+ const dirname = posixDirname(modulePath)
+ const meta: ViteRuntimeImportMeta = {
+ filename: isWindows ? toWindowsPath(filename) : filename,
+ dirname: isWindows ? toWindowsPath(dirname) : dirname,
+ url: href,
+ env: this.envProxy,
+ resolve(id, parent) {
+ throw new Error(
+ '[vite-runtime] "import.meta.resolve" is not supported.',
+ )
+ },
+ // should be replaced during transformation
+ glob() {
+ throw new Error('[vite-runtime] "import.meta.glob" is not supported.')
+ },
+ }
+ const exports = Object.create(null)
+ Object.defineProperty(exports, Symbol.toStringTag, {
+ value: 'Module',
+ enumerable: false,
+ configurable: false,
+ })
+
+ mod.exports = exports
+
+ let hotContext: ViteHotContext | undefined
+ if (this.hmrClient) {
+ Object.defineProperty(meta, 'hot', {
+ enumerable: true,
+ get: () => {
+ if (!this.hmrClient) {
+ throw new Error(`[vite-runtime] HMR client was destroyed.`)
+ }
+ this.debug?.('[vite-runtime] creating hmr context for', moduleId)
+ hotContext ||= new HMRContext(this.hmrClient, moduleId)
+ return hotContext
+ },
+ set: (value) => {
+ hotContext = value
+ },
+ })
+ }
+
+ const context: ViteRuntimeModuleContext = {
+ [ssrImportKey]: request,
+ [ssrDynamicImportKey]: dynamicRequest,
+ [ssrModuleExportsKey]: exports,
+ [ssrExportAllKey]: (obj: any) => exportAll(exports, obj),
+ [ssrImportMetaKey]: meta,
+ }
+
+ this.debug?.('[vite-runtime] executing', href)
+
+ await this.runner.runViteModule(context, code, id)
+
+ return exports
+ }
+}
+
+function exportAll(exports: any, sourceModule: any) {
+ // when a module exports itself it causes
+ // call stack error
+ if (exports === sourceModule) return
+
+ if (
+ isPrimitive(sourceModule) ||
+ Array.isArray(sourceModule) ||
+ sourceModule instanceof Promise
+ )
+ return
+
+ for (const key in sourceModule) {
+ if (key !== 'default' && key !== '__esModule') {
+ try {
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ configurable: true,
+ get: () => sourceModule[key],
+ })
+ } catch (_err) {}
+ }
+ }
+}
+
+/**
+ * Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.
+ * Top-level imports and dynamic imports work slightly differently in Node.js.
+ * This function normalizes the differences so it matches prod behaviour.
+ */
+function analyzeImportedModDifference(
+ mod: any,
+ rawId: string,
+ moduleType: string | undefined,
+ metadata?: SSRImportMetadata,
+) {
+ // No normalization needed if the user already dynamic imports this module
+ if (metadata?.isDynamicImport) return
+ // If file path is ESM, everything should be fine
+ if (moduleType === 'module') return
+
+ // For non-ESM, named imports is done via static analysis with cjs-module-lexer in Node.js.
+ // If the user named imports a specifier that can't be analyzed, error.
+ if (metadata?.importedNames?.length) {
+ const missingBindings = metadata.importedNames.filter((s) => !(s in mod))
+ if (missingBindings.length) {
+ const lastBinding = missingBindings[missingBindings.length - 1]
+ // Copied from Node.js
+ throw new SyntaxError(`\
+[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
+CommonJS modules can always be imported via the default export, for example using:
+
+import pkg from '${rawId}';
+const {${missingBindings.join(', ')}} = pkg;
+`)
+ }
+ }
+}
+
+/**
+ * Guard invalid named exports only, similar to how Node.js errors for top-level imports.
+ * But since we transform as dynamic imports, we need to emulate the error manually.
+ */
+function proxyGuardOnlyEsm(
+ mod: any,
+ rawId: string,
+ metadata?: SSRImportMetadata,
+) {
+ // If the module doesn't import anything explicitly, e.g. `import 'foo'` or
+ // `import * as foo from 'foo'`, we can skip the proxy guard.
+ if (!metadata?.importedNames?.length) return mod
+
+ return new Proxy(mod, {
+ get(mod, prop) {
+ if (prop !== 'then' && !(prop in mod)) {
+ throw new SyntaxError(
+ `[vite] The requested module '${rawId}' does not provide an export named '${prop.toString()}'`,
+ )
+ }
+ return mod[prop]
+ },
+ })
+}
diff --git a/packages/vite/src/node/ssr/runtime/sourcemap/decoder.ts b/packages/vite/src/node/ssr/runtime/sourcemap/decoder.ts
new file mode 100644
index 00000000000000..a3abcf9e388f98
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/sourcemap/decoder.ts
@@ -0,0 +1,260 @@
+import { posixResolve } from '../utils'
+
+interface SourceMapLike {
+ version: number
+ mappings?: string
+ names?: string[]
+ sources?: string[]
+ sourcesContent?: string[]
+}
+
+type OriginalMapping = {
+ source: string | null
+ line: number
+ column: number
+ name: string | null
+}
+
+type Needle = {
+ line: number
+ column: number
+}
+
+export class DecodedMap {
+ _encoded: string
+ _decoded: undefined | number[][][]
+ _decodedMemo: Stats
+ url: string
+ version: number
+ names: string[] = []
+ resolvedSources: string[]
+
+ constructor(
+ public map: SourceMapLike,
+ from: string,
+ ) {
+ const { mappings, names, sources } = map
+ this.version = map.version
+ this.names = names || []
+ this._encoded = mappings || ''
+ this._decodedMemo = memoizedState()
+ this.url = from
+ this.resolvedSources = (sources || []).map((s) =>
+ posixResolve(s || '', from),
+ )
+ }
+}
+
+// This is a copy of all methods that we need for decoding a source map from "@jridgewell/trace-mapping"
+
+function indexOf(mappings: string, index: number) {
+ const idx = mappings.indexOf(';', index)
+ return idx === -1 ? mappings.length : idx
+}
+
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+const charToInt = new Uint8Array(128) // z is 122 in ASCII
+for (let i = 0; i < chars.length; i++) {
+ const c = chars.charCodeAt(i)
+ charToInt[c] = i
+}
+
+function decodeInteger(
+ mappings: string,
+ pos: number,
+ state: Int32Array,
+ j: number,
+) {
+ let value = 0
+ let shift = 0
+ let integer = 0
+ do {
+ const c = mappings.charCodeAt(pos++)
+ integer = charToInt[c]
+ value |= (integer & 31) << shift
+ shift += 5
+ } while (integer & 32)
+ const shouldNegate = value & 1
+ value >>>= 1
+ if (shouldNegate) {
+ value = -0x80000000 | -value
+ }
+ state[j] += value
+ return pos
+}
+
+const comma = ','.charCodeAt(0)
+
+function hasMoreVlq(mappings: string, i: number, length: number) {
+ if (i >= length) return false
+ return mappings.charCodeAt(i) !== comma
+}
+
+function decode(mappings: string): number[][][] {
+ const state = new Int32Array(5)
+ const decoded: number[][][] = []
+ let index = 0
+ do {
+ const semi = indexOf(mappings, index)
+ const line = []
+ let sorted = true
+ let lastCol = 0
+ state[0] = 0
+ for (let i = index; i < semi; i++) {
+ let seg
+ i = decodeInteger(mappings, i, state, 0) // genColumn
+ const col = state[0]
+ if (col < lastCol) sorted = false
+ lastCol = col
+ if (hasMoreVlq(mappings, i, semi)) {
+ i = decodeInteger(mappings, i, state, 1) // sourcesIndex
+ i = decodeInteger(mappings, i, state, 2) // sourceLine
+ i = decodeInteger(mappings, i, state, 3) // sourceColumn
+ if (hasMoreVlq(mappings, i, semi)) {
+ i = decodeInteger(mappings, i, state, 4) // namesIndex
+ seg = [col, state[1], state[2], state[3], state[4]]
+ } else {
+ seg = [col, state[1], state[2], state[3]]
+ }
+ } else {
+ seg = [col]
+ }
+ line.push(seg)
+ }
+ if (!sorted) line.sort((a, b) => a[0] - b[0])
+ decoded.push(line)
+ index = semi + 1
+ } while (index <= mappings.length)
+ return decoded
+}
+
+const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'
+const COL_GTR_EQ_ZERO =
+ '`column` must be greater than or equal to 0 (columns start at column 0)'
+
+const COLUMN = 0
+const SOURCES_INDEX = 1
+const SOURCE_LINE = 2
+const SOURCE_COLUMN = 3
+const NAMES_INDEX = 4
+
+function OMapping(
+ source: string | null,
+ line: number,
+ column: number,
+ name: string | null,
+): OriginalMapping {
+ return { source, line, column, name }
+}
+
+function decodedMappings(map: DecodedMap): number[][][] {
+ return map._decoded || (map._decoded = decode(map._encoded))
+}
+
+let found = false
+function binarySearch(
+ haystack: number[][],
+ needle: number,
+ low: number,
+ high: number,
+) {
+ while (low <= high) {
+ const mid = low + ((high - low) >> 1)
+ const cmp = haystack[mid][COLUMN] - needle
+ if (cmp === 0) {
+ found = true
+ return mid
+ }
+ if (cmp < 0) {
+ low = mid + 1
+ } else {
+ high = mid - 1
+ }
+ }
+ found = false
+ return low - 1
+}
+
+function lowerBound(haystack: number[][], needle: number, index: number) {
+ for (let i = index - 1; i >= 0; index = i--) {
+ if (haystack[i][COLUMN] !== needle) break
+ }
+ return index
+}
+interface Stats {
+ lastKey: number
+ lastNeedle: number
+ lastIndex: number
+}
+function memoizedState(): Stats {
+ return {
+ lastKey: -1,
+ lastNeedle: -1,
+ lastIndex: -1,
+ }
+}
+function memoizedBinarySearch(
+ haystack: number[][],
+ needle: number,
+ state: Stats,
+ key: number,
+) {
+ const { lastKey, lastNeedle, lastIndex } = state
+ let low = 0
+ let high = haystack.length - 1
+ if (key === lastKey) {
+ if (needle === lastNeedle) {
+ found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle
+ return lastIndex
+ }
+ if (needle >= lastNeedle) {
+ // lastIndex may be -1 if the previous needle was not found.
+ low = lastIndex === -1 ? 0 : lastIndex
+ } else {
+ high = lastIndex
+ }
+ }
+ state.lastKey = key
+ state.lastNeedle = needle
+ return (state.lastIndex = binarySearch(haystack, needle, low, high))
+}
+
+function traceSegmentInternal(
+ segments: number[][],
+ memo: Stats,
+ line: number,
+ column: number,
+) {
+ let index = memoizedBinarySearch(segments, column, memo, line)
+ if (found) {
+ index = lowerBound(segments, column, index)
+ }
+ if (index === -1 || index === segments.length) return -1
+ return index
+}
+
+export function getOriginalPosition(
+ map: DecodedMap,
+ { line, column }: Needle,
+): OriginalMapping | null {
+ line--
+ if (line < 0) throw new Error(LINE_GTR_ZERO)
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO)
+ map._decodedMemo ??= memoizedState()
+ const decoded = decodedMappings(map)
+ // It's common for parent source maps to have pointers to lines that have no
+ // mapping (like a "//# sourceMappingURL=") at the end of the child file.
+ if (line >= decoded.length) return null
+ const segments = decoded[line]
+ const index = traceSegmentInternal(segments, map._decodedMemo, line, column)
+ if (index === -1) return null
+ const segment = segments[index]
+ if (segment.length === 1) return null
+ const { names, resolvedSources } = map
+ return OMapping(
+ resolvedSources[segment[SOURCES_INDEX]],
+ segment[SOURCE_LINE] + 1,
+ segment[SOURCE_COLUMN],
+ segment.length === 5 ? names[segment[NAMES_INDEX]] : null,
+ )
+}
diff --git a/packages/vite/src/node/ssr/runtime/sourcemap/index.ts b/packages/vite/src/node/ssr/runtime/sourcemap/index.ts
new file mode 100644
index 00000000000000..8329c27013eb9a
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/sourcemap/index.ts
@@ -0,0 +1,26 @@
+import type { ViteRuntime } from '../runtime'
+import { interceptStackTrace } from './interceptor'
+
+export function enableSourceMapSupport(runtime: ViteRuntime): () => void {
+ if (runtime.options.sourcemapInterceptor === 'node') {
+ if (typeof process === 'undefined') {
+ throw new TypeError(
+ `Cannot use "sourcemapInterceptor: 'node'" because global "process" variable is not available.`,
+ )
+ }
+ if (typeof process.setSourceMapsEnabled !== 'function') {
+ throw new TypeError(
+ `Cannot use "sourcemapInterceptor: 'node'" because "process.setSourceMapsEnabled" function is not available. Please use Node >= 16.6.0.`,
+ )
+ }
+ const isEnabledAlready = process.sourceMapsEnabled ?? false
+ process.setSourceMapsEnabled(true)
+ return () => !isEnabledAlready && process.setSourceMapsEnabled(false)
+ }
+ return interceptStackTrace(
+ runtime,
+ typeof runtime.options.sourcemapInterceptor === 'object'
+ ? runtime.options.sourcemapInterceptor
+ : undefined,
+ )
+}
diff --git a/packages/vite/src/node/ssr/runtime/sourcemap/interceptor.ts b/packages/vite/src/node/ssr/runtime/sourcemap/interceptor.ts
new file mode 100644
index 00000000000000..043287b5839168
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/sourcemap/interceptor.ts
@@ -0,0 +1,435 @@
+import type { OriginalMapping } from '@jridgewell/trace-mapping'
+import type { ViteRuntime } from '../runtime'
+import { posixDirname, posixResolve } from '../utils'
+import type { ModuleCacheMap } from '../moduleCache'
+import { DecodedMap, getOriginalPosition } from './decoder'
+
+interface RetrieveFileHandler {
+ (path: string): string | null | undefined | false
+}
+
+interface RetrieveSourceMapHandler {
+ (path: string): null | { url: string; map: any }
+}
+
+export interface InterceptorOptions {
+ retrieveFile?: RetrieveFileHandler
+ retrieveSourceMap?: RetrieveSourceMapHandler
+}
+
+const sourceMapCache: Record = {}
+const fileContentsCache: Record = {}
+
+const moduleGraphs: Set = new Set()
+const retrieveFileHandlers = new Set()
+const retrieveSourceMapHandlers = new Set()
+
+const createExecHandlers = any>(
+ handlers: Set,
+) => {
+ return ((...args: Parameters) => {
+ for (const handler of handlers) {
+ const result = handler(...(args as []))
+ if (result) return result
+ }
+ return null
+ }) as T
+}
+
+const retrieveFileFromHandlers = createExecHandlers(retrieveFileHandlers)
+const retrievSourceMapFromHandlers = createExecHandlers(
+ retrieveSourceMapHandlers,
+)
+
+let overriden = false
+const originalPrepare = Error.prepareStackTrace
+
+function resetInterceptor(runtime: ViteRuntime, options: InterceptorOptions) {
+ moduleGraphs.delete(runtime.moduleCache)
+ if (options.retrieveFile) retrieveFileHandlers.delete(options.retrieveFile)
+ if (options.retrieveSourceMap)
+ retrieveSourceMapHandlers.delete(options.retrieveSourceMap)
+ if (moduleGraphs.size === 0) {
+ Error.prepareStackTrace = originalPrepare
+ overriden = false
+ }
+}
+
+export function interceptStackTrace(
+ runtime: ViteRuntime,
+ options: InterceptorOptions = {},
+): () => void {
+ if (!overriden) {
+ Error.prepareStackTrace = prepareStackTrace
+ overriden = true
+ }
+ moduleGraphs.add(runtime.moduleCache)
+ if (options.retrieveFile) retrieveFileHandlers.add(options.retrieveFile)
+ if (options.retrieveSourceMap)
+ retrieveSourceMapHandlers.add(options.retrieveSourceMap)
+ return () => resetInterceptor(runtime, options)
+}
+
+interface CallSite extends NodeJS.CallSite {
+ getScriptNameOrSourceURL(): string
+}
+
+interface State {
+ nextPosition: null | OriginalMapping
+ curPosition: null | OriginalMapping
+}
+
+interface CachedMapEntry {
+ url: string | null
+ map: DecodedMap | null
+ vite?: boolean
+}
+
+// Support URLs relative to a directory, but be careful about a protocol prefix
+function supportRelativeURL(file: string, url: string) {
+ if (!file) return url
+ const dir = posixDirname(file.replace(/\\/g, '/'))
+ const match = /^\w+:\/\/[^/]*/.exec(dir)
+ let protocol = match ? match[0] : ''
+ const startPath = dir.slice(protocol.length)
+ if (protocol && /^\/\w:/.test(startPath)) {
+ // handle file:///C:/ paths
+ protocol += '/'
+ return (
+ protocol +
+ posixResolve(dir.slice(protocol.length), url).replace(/\\/g, '/')
+ )
+ }
+ return protocol + posixResolve(dir.slice(protocol.length), url)
+}
+
+function getRuntimeSourceMap(position: OriginalMapping): CachedMapEntry | null {
+ for (const moduleCache of moduleGraphs) {
+ const sourceMap = moduleCache.getSourceMap(position.source as string)
+ if (sourceMap) {
+ return {
+ url: position.source,
+ map: sourceMap,
+ vite: true,
+ }
+ }
+ }
+ return null
+}
+
+function retrieveFile(path: string): string | null | undefined | false {
+ if (path in fileContentsCache) return fileContentsCache[path]
+ const content = retrieveFileFromHandlers(path)
+ if (typeof content === 'string') {
+ fileContentsCache[path] = content
+ return content
+ }
+ return null
+}
+
+function retrieveSourceMapURL(source: string) {
+ // Get the URL of the source map
+ const fileData = retrieveFile(source)
+ if (!fileData) return null
+ const re =
+ /\/\/[@#]\s*sourceMappingURL=([^\s'"]+)\s*$|\/\*[@#]\s*sourceMappingURL=[^\s*'"]+\s*\*\/\s*$/gm
+ // Keep executing the search to find the *last* sourceMappingURL to avoid
+ // picking up sourceMappingURLs from comments, strings, etc.
+ let lastMatch, match
+
+ while ((match = re.exec(fileData))) lastMatch = match
+ if (!lastMatch) return null
+ return lastMatch[1]
+}
+
+const reSourceMap = /^data:application\/json[^,]+base64,/
+
+function retrieveSourceMap(source: string) {
+ const urlAndMap = retrievSourceMapFromHandlers(source)
+ if (urlAndMap) return urlAndMap
+
+ let sourceMappingURL = retrieveSourceMapURL(source)
+ if (!sourceMappingURL) return null
+
+ // Read the contents of the source map
+ let sourceMapData
+ if (reSourceMap.test(sourceMappingURL)) {
+ // Support source map URL as a data url
+ const rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1)
+ sourceMapData = Buffer.from(rawData, 'base64').toString()
+ sourceMappingURL = source
+ } else {
+ // Support source map URLs relative to the source URL
+ sourceMappingURL = supportRelativeURL(source, sourceMappingURL)
+ sourceMapData = retrieveFile(sourceMappingURL)
+ }
+
+ if (!sourceMapData) return null
+
+ return {
+ url: sourceMappingURL,
+ map: sourceMapData,
+ }
+}
+
+function mapSourcePosition(position: OriginalMapping) {
+ if (!position.source) return position
+ let sourceMap = getRuntimeSourceMap(position)
+ if (!sourceMap) sourceMap = sourceMapCache[position.source]
+ if (!sourceMap) {
+ // Call the (overrideable) retrieveSourceMap function to get the source map.
+ const urlAndMap = retrieveSourceMap(position.source)
+ if (urlAndMap && urlAndMap.map) {
+ const url = urlAndMap.url
+ sourceMap = sourceMapCache[position.source] = {
+ url,
+ map: new DecodedMap(
+ typeof urlAndMap.map === 'string'
+ ? JSON.parse(urlAndMap.map)
+ : urlAndMap.map,
+ url,
+ ),
+ }
+
+ const contents = sourceMap.map?.map.sourcesContent
+ // Load all sources stored inline with the source map into the file cache
+ // to pretend like they are already loaded. They may not exist on disk.
+ if (sourceMap.map && contents) {
+ sourceMap.map.resolvedSources.forEach((source, i) => {
+ const content = contents[i]
+ if (content && source && url) {
+ const contentUrl = supportRelativeURL(url, source)
+ fileContentsCache[contentUrl] = content
+ }
+ })
+ }
+ } else {
+ sourceMap = sourceMapCache[position.source] = {
+ url: null,
+ map: null,
+ }
+ }
+ }
+
+ // Resolve the source URL relative to the URL of the source map
+ if (sourceMap && sourceMap.map && sourceMap.url) {
+ const originalPosition = getOriginalPosition(sourceMap.map, position)
+
+ // Only return the original position if a matching line was found. If no
+ // matching line is found then we return position instead, which will cause
+ // the stack trace to print the path and line for the compiled file. It is
+ // better to give a precise location in the compiled file than a vague
+ // location in the original file.
+ if (originalPosition && originalPosition.source != null) {
+ originalPosition.source = supportRelativeURL(
+ sourceMap.url,
+ originalPosition.source,
+ )
+ if (sourceMap.vite) {
+ // @ts-expect-error vite is not defined
+ originalPosition._vite = true
+ }
+ return originalPosition
+ }
+ }
+
+ return position
+}
+
+// Parses code generated by FormatEvalOrigin(), a function inside V8:
+// https://code.google.com/p/v8/source/browse/trunk/src/messages.js
+function mapEvalOrigin(origin: string): string {
+ // Most eval() calls are in this format
+ let match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin)
+ if (match) {
+ const position = mapSourcePosition({
+ name: null,
+ source: match[2],
+ line: +match[3],
+ column: +match[4] - 1,
+ })
+ return `eval at ${match[1]} (${position.source}:${position.line}:${position.column + 1})`
+ }
+
+ // Parse nested eval() calls using recursion
+ match = /^eval at ([^(]+) \((.+)\)$/.exec(origin)
+ if (match) return `eval at ${match[1]} (${mapEvalOrigin(match[2])})`
+
+ // Make sure we still return useful information if we didn't find anything
+ return origin
+}
+
+// This is copied almost verbatim from the V8 source code at
+// https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The
+// implementation of wrapCallSite() used to just forward to the actual source
+// code of CallSite.prototype.toString but unfortunately a new release of V8
+// did something to the prototype chain and broke the shim. The only fix I
+// could find was copy/paste.
+function CallSiteToString(this: CallSite) {
+ let fileName
+ let fileLocation = ''
+ if (this.isNative()) {
+ fileLocation = 'native'
+ } else {
+ fileName = this.getScriptNameOrSourceURL()
+ if (!fileName && this.isEval()) {
+ fileLocation = this.getEvalOrigin() as string
+ fileLocation += ', ' // Expecting source position to follow.
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+ } else {
+ // Source code does not originate from a file and is not native, but we
+ // can still get the source position inside the source string, e.g. in
+ // an eval string.
+ fileLocation += ''
+ }
+ const lineNumber = this.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += `:${lineNumber}`
+ const columnNumber = this.getColumnNumber()
+ if (columnNumber) fileLocation += `:${columnNumber}`
+ }
+ }
+
+ let line = ''
+ const functionName = this.getFunctionName()
+ let addSuffix = true
+ const isConstructor = this.isConstructor()
+ const isMethodCall = !(this.isToplevel() || isConstructor)
+ if (isMethodCall) {
+ let typeName = this.getTypeName()
+ // Fixes shim to be backward compatable with Node v0 to v4
+ if (typeName === '[object Object]') typeName = 'null'
+
+ const methodName = this.getMethodName()
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0)
+ line += `${typeName}.`
+
+ line += functionName
+ if (
+ methodName &&
+ functionName.indexOf(`.${methodName}`) !==
+ functionName.length - methodName.length - 1
+ )
+ line += ` [as ${methodName}]`
+ } else {
+ line += `${typeName}.${methodName || ''}`
+ }
+ } else if (isConstructor) {
+ line += `new ${functionName || ''}`
+ } else if (functionName) {
+ line += functionName
+ } else {
+ line += fileLocation
+ addSuffix = false
+ }
+ if (addSuffix) line += ` (${fileLocation})`
+
+ return line
+}
+
+function cloneCallSite(frame: CallSite) {
+ const object = {} as CallSite
+ Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {
+ const key = name as keyof CallSite
+ // @ts-expect-error difficult to type
+ object[key] = /^(?:is|get)/.test(name)
+ ? function () {
+ return frame[key].call(frame)
+ }
+ : frame[key]
+ })
+ object.toString = CallSiteToString
+ return object
+}
+
+function wrapCallSite(frame: CallSite, state: State) {
+ // provides interface backward compatibility
+ if (state === undefined) state = { nextPosition: null, curPosition: null }
+
+ if (frame.isNative()) {
+ state.curPosition = null
+ return frame
+ }
+
+ // Most call sites will return the source file from getFileName(), but code
+ // passed to eval() ending in "//# sourceURL=..." will return the source file
+ // from getScriptNameOrSourceURL() instead
+ const source = frame.getFileName() || frame.getScriptNameOrSourceURL()
+ if (source) {
+ const line = frame.getLineNumber() as number
+ let column = (frame.getColumnNumber() as number) - 1
+
+ // Fix position in Node where some (internal) code is prepended.
+ // See https://github.com/evanw/node-source-map-support/issues/36
+ // Header removed in node at ^10.16 || >=11.11.0
+ // v11 is not an LTS candidate, we can just test the one version with it.
+ // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
+ const headerLength = 62
+ if (line === 1 && column > headerLength && !frame.isEval())
+ column -= headerLength
+
+ const position = mapSourcePosition({
+ name: null,
+ source,
+ line,
+ column,
+ })
+ state.curPosition = position
+ frame = cloneCallSite(frame)
+ const originalFunctionName = frame.getFunctionName
+ frame.getFunctionName = function () {
+ const name = (() => {
+ if (state.nextPosition == null) return originalFunctionName()
+
+ return state.nextPosition.name || originalFunctionName()
+ })()
+ return name === 'eval' && '_vite' in position ? null : name
+ }
+ frame.getFileName = function () {
+ return position.source ?? undefined
+ }
+ frame.getLineNumber = function () {
+ return position.line
+ }
+ frame.getColumnNumber = function () {
+ return position.column + 1
+ }
+ frame.getScriptNameOrSourceURL = function () {
+ return position.source as string
+ }
+ return frame
+ }
+
+ // Code called using eval() needs special handling
+ let origin = frame.isEval() && frame.getEvalOrigin()
+ if (origin) {
+ origin = mapEvalOrigin(origin)
+ frame = cloneCallSite(frame)
+ frame.getEvalOrigin = function () {
+ return origin || undefined
+ }
+ return frame
+ }
+
+ // If we get here then we were unable to change the source position
+ return frame
+}
+
+function prepareStackTrace(error: Error, stack: CallSite[]) {
+ const name = error.name || 'Error'
+ const message = error.message || ''
+ const errorString = `${name}: ${message}`
+
+ const state = { nextPosition: null, curPosition: null }
+ const processedStack = []
+ for (let i = stack.length - 1; i >= 0; i--) {
+ processedStack.push(`\n at ${wrapCallSite(stack[i], state)}`)
+ state.nextPosition = state.curPosition
+ }
+ state.curPosition = state.nextPosition = null
+ return errorString + processedStack.reverse().join('')
+}
diff --git a/packages/vite/src/node/ssr/runtime/types.ts b/packages/vite/src/node/ssr/runtime/types.ts
new file mode 100644
index 00000000000000..da4ae441282e53
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/types.ts
@@ -0,0 +1,185 @@
+import type { ViteHotContext } from 'types/hot'
+import type { HMRPayload } from 'types/hmrPayload'
+import type { HMRConnection, HMRLogger } from '../../../shared/hmr'
+import type { ModuleCacheMap } from './moduleCache'
+import type {
+ ssrDynamicImportKey,
+ ssrExportAllKey,
+ ssrImportKey,
+ ssrImportMetaKey,
+ ssrModuleExportsKey,
+} from './constants'
+import type { DecodedMap } from './sourcemap/decoder'
+import type { InterceptorOptions } from './sourcemap/interceptor'
+
+export interface DefineImportMetadata {
+ /**
+ * Imported names before being transformed to `ssrImportKey`
+ *
+ * import foo, { bar as baz, qux } from 'hello'
+ * => ['default', 'bar', 'qux']
+ *
+ * import * as namespace from 'world
+ * => undefined
+ */
+ importedNames?: string[]
+}
+
+export interface HMRRuntimeConnection extends HMRConnection {
+ /**
+ * Configure how HMR is handled when this connection triggers an update.
+ * This method expects that connection will start listening for HMR updates and call this callback when it's received.
+ */
+ onUpdate(callback: (payload: HMRPayload) => void): void
+}
+
+export interface SSRImportMetadata extends DefineImportMetadata {
+ isDynamicImport?: boolean
+ entrypoint?: boolean
+}
+
+export interface ViteRuntimeImportMeta extends ImportMeta {
+ url: string
+ env: ImportMetaEnv
+ hot?: ViteHotContext
+ [key: string]: any
+}
+
+export interface ViteRuntimeModuleContext {
+ [ssrModuleExportsKey]: Record
+ [ssrImportKey]: (id: string, metadata?: DefineImportMetadata) => Promise
+ [ssrDynamicImportKey]: (
+ id: string,
+ options?: ImportCallOptions,
+ ) => Promise
+ [ssrExportAllKey]: (obj: any) => void
+ [ssrImportMetaKey]: ViteRuntimeImportMeta
+}
+
+export interface ViteModuleRunner {
+ /**
+ * Run code that was transformed by Vite.
+ * @param context Function context
+ * @param code Transformed code
+ * @param id ID that was used to fetch the module
+ */
+ runViteModule(
+ context: ViteRuntimeModuleContext,
+ code: string,
+ id: string,
+ ): Promise
+ /**
+ * Run externalized module.
+ * @param file File URL to the external module
+ */
+ runExternalModule(file: string): Promise
+}
+
+export interface ModuleCache {
+ promise?: Promise
+ exports?: any
+ evaluated?: boolean
+ map?: DecodedMap
+ meta?: FetchResult
+ /**
+ * Module ids that imports this module
+ */
+ importers?: Set
+ imports?: Set
+}
+
+export type FetchResult = ExternalFetchResult | ViteFetchResult
+
+export interface ExternalFetchResult {
+ /**
+ * The path to the externalized module starting with file://,
+ * by default this will be imported via a dynamic "import"
+ * instead of being transformed by vite and loaded with vite runtime
+ */
+ externalize: string
+ /**
+ * Type of the module. Will be used to determine if import statement is correct.
+ * For example, if Vite needs to throw an error if variable is not actually exported
+ */
+ type?: 'module' | 'commonjs' | 'builtin' | 'network'
+}
+
+export interface ViteFetchResult {
+ /**
+ * Code that will be evaluated by vite runtime
+ * by default this will be wrapped in an async function
+ */
+ code: string
+ /**
+ * File path of the module on disk.
+ * This will be resolved as import.meta.url/filename
+ */
+ file: string | null
+}
+
+export type ResolvedResult = (ExternalFetchResult | ViteFetchResult) & {
+ id: string
+}
+
+/**
+ * @experimental
+ */
+export type FetchFunction = (
+ id: string,
+ importer?: string,
+) => Promise
+
+export interface ViteRuntimeOptions {
+ /**
+ * Root of the project
+ */
+ root: string
+ /**
+ * A method to get the information about the module.
+ * For SSR, Vite exposes `server.ssrFetchModule` function that you can use here.
+ * For other runtime use cases, Vite also exposes `fetchModule` from its main entry point.
+ */
+ fetchModule: FetchFunction
+ /**
+ * Custom environment variables available on `import.meta.env`. This doesn't modify the actual `process.env`.
+ */
+ environmentVariables?: Record
+ /**
+ * Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
+ * Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
+ * You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
+ */
+ sourcemapInterceptor?:
+ | false
+ | 'node'
+ | 'prepareStackTrace'
+ | InterceptorOptions
+ /**
+ * Disable HMR or configure HMR options.
+ */
+ hmr?:
+ | false
+ | {
+ /**
+ * Configure how HMR communicates between the client and the server.
+ */
+ connection: HMRRuntimeConnection
+ /**
+ * Configure HMR logger.
+ */
+ logger?: false | HMRLogger
+ }
+ /**
+ * Custom module cache. If not provided, creates a separate module cache for each ViteRuntime instance.
+ */
+ moduleCache?: ModuleCacheMap
+}
+
+export interface ImportMetaEnv {
+ [key: string]: any
+ BASE_URL: string
+ MODE: string
+ DEV: boolean
+ PROD: boolean
+ SSR: boolean
+}
diff --git a/packages/vite/src/node/ssr/runtime/utils.ts b/packages/vite/src/node/ssr/runtime/utils.ts
new file mode 100644
index 00000000000000..f2eca533b350fe
--- /dev/null
+++ b/packages/vite/src/node/ssr/runtime/utils.ts
@@ -0,0 +1,217 @@
+export const isWindows =
+ typeof process !== 'undefined' && process.platform === 'win32'
+
+export const decodeBase64 =
+ typeof atob !== 'undefined'
+ ? atob
+ : (str: string) => Buffer.from(str, 'base64').toString('utf-8')
+
+// currently we copy this from '../../constants' - maybe we can inline it somewhow?
+const NULL_BYTE_PLACEHOLDER = `__x00__`
+const VALID_ID_PREFIX = `/@id/`
+
+export function wrapId(id: string): string {
+ return id.startsWith(VALID_ID_PREFIX)
+ ? id
+ : VALID_ID_PREFIX + id.replace('\0', NULL_BYTE_PLACEHOLDER)
+}
+
+export function unwrapId(id: string): string {
+ return id.startsWith(VALID_ID_PREFIX)
+ ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, '\0')
+ : id
+}
+
+const windowsSlashRE = /\\/g
+export function slash(p: string): string {
+ return p.replace(windowsSlashRE, '/')
+}
+
+const postfixRE = /[?#].*$/s
+export function cleanUrl(url: string): string {
+ return url.replace(postfixRE, '')
+}
+
+export function isPrimitive(value: unknown): boolean {
+ return !value || (typeof value !== 'object' && typeof value !== 'function')
+}
+
+const CHAR_FORWARD_SLASH = 47
+const CHAR_BACKWARD_SLASH = 92
+
+const percentRegEx = /%/g
+const backslashRegEx = /\\/g
+const newlineRegEx = /\n/g
+const carriageReturnRegEx = /\r/g
+const tabRegEx = /\t/g
+const questionRegex = /\?/g
+const hashRegex = /#/g
+
+function encodePathChars(filepath: string) {
+ if (filepath.indexOf('%') !== -1)
+ filepath = filepath.replace(percentRegEx, '%25')
+ // In posix, backslash is a valid character in paths:
+ if (!isWindows && filepath.indexOf('\\') !== -1)
+ filepath = filepath.replace(backslashRegEx, '%5C')
+ if (filepath.indexOf('\n') !== -1)
+ filepath = filepath.replace(newlineRegEx, '%0A')
+ if (filepath.indexOf('\r') !== -1)
+ filepath = filepath.replace(carriageReturnRegEx, '%0D')
+ if (filepath.indexOf('\t') !== -1)
+ filepath = filepath.replace(tabRegEx, '%09')
+ return filepath
+}
+
+export function posixPathToFileHref(posixPath: string): string {
+ let resolved = posixResolve(posixPath)
+ // path.resolve strips trailing slashes so we must add them back
+ const filePathLast = posixPath.charCodeAt(posixPath.length - 1)
+ if (
+ (filePathLast === CHAR_FORWARD_SLASH ||
+ (isWindows && filePathLast === CHAR_BACKWARD_SLASH)) &&
+ resolved[resolved.length - 1] !== '/'
+ )
+ resolved += '/'
+
+ // Call encodePathChars first to avoid encoding % again for ? and #.
+ resolved = encodePathChars(resolved)
+
+ // Question and hash character should be included in pathname.
+ // Therefore, encoding is required to eliminate parsing them in different states.
+ // This is done as an optimization to not creating a URL instance and
+ // later triggering pathname setter, which impacts performance
+ if (resolved.indexOf('?') !== -1)
+ resolved = resolved.replace(questionRegex, '%3F')
+ if (resolved.indexOf('#') !== -1)
+ resolved = resolved.replace(hashRegex, '%23')
+ return new URL(`file://${resolved}`).href
+}
+
+export function posixDirname(filepath: string): string {
+ const normalizedPath = filepath.endsWith('/')
+ ? filepath.substring(0, filepath.length - 1)
+ : filepath
+ return normalizedPath.substring(0, normalizedPath.lastIndexOf('/')) || '/'
+}
+
+export function toWindowsPath(path: string): string {
+ return path.replace(/\//g, '\\')
+}
+
+// inlined from pathe to support environments without access to node:path
+function cwd(): string {
+ if (typeof process !== 'undefined' && typeof process.cwd === 'function') {
+ return slash(process.cwd())
+ }
+ return '/'
+}
+
+export function posixResolve(...segments: string[]): string {
+ // Normalize windows arguments
+ segments = segments.map((argument) => slash(argument))
+
+ let resolvedPath = ''
+ let resolvedAbsolute = false
+
+ for (
+ let index = segments.length - 1;
+ index >= -1 && !resolvedAbsolute;
+ index--
+ ) {
+ const path = index >= 0 ? segments[index] : cwd()
+
+ // Skip empty entries
+ if (!path || path.length === 0) {
+ continue
+ }
+
+ resolvedPath = `${path}/${resolvedPath}`
+ resolvedAbsolute = isAbsolute(path)
+ }
+
+ // At this point the path should be resolved to a full absolute path, but
+ // handle relative paths to be safe (might happen when process.cwd() fails)
+
+ // Normalize the path
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute)
+
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
+ return `/${resolvedPath}`
+ }
+
+ return resolvedPath.length > 0 ? resolvedPath : '.'
+}
+
+const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/
+
+function isAbsolute(p: string): boolean {
+ return _IS_ABSOLUTE_RE.test(p)
+}
+
+// Resolves . and .. elements in a path with directory names
+export function normalizeString(path: string, allowAboveRoot: boolean): string {
+ let res = ''
+ let lastSegmentLength = 0
+ let lastSlash = -1
+ let dots = 0
+ let char: string | null = null
+ for (let index = 0; index <= path.length; ++index) {
+ if (index < path.length) {
+ char = path[index]
+ } else if (char === '/') {
+ break
+ } else {
+ char = '/'
+ }
+ if (char === '/') {
+ if (lastSlash === index - 1 || dots === 1) {
+ // NOOP
+ } else if (dots === 2) {
+ if (
+ res.length < 2 ||
+ lastSegmentLength !== 2 ||
+ res[res.length - 1] !== '.' ||
+ res[res.length - 2] !== '.'
+ ) {
+ if (res.length > 2) {
+ const lastSlashIndex = res.lastIndexOf('/')
+ if (lastSlashIndex === -1) {
+ res = ''
+ lastSegmentLength = 0
+ } else {
+ res = res.slice(0, lastSlashIndex)
+ lastSegmentLength = res.length - 1 - res.lastIndexOf('/')
+ }
+ lastSlash = index
+ dots = 0
+ continue
+ } else if (res.length > 0) {
+ res = ''
+ lastSegmentLength = 0
+ lastSlash = index
+ dots = 0
+ continue
+ }
+ }
+ if (allowAboveRoot) {
+ res += res.length > 0 ? '/..' : '..'
+ lastSegmentLength = 2
+ }
+ } else {
+ if (res.length > 0) {
+ res += `/${path.slice(lastSlash + 1, index)}`
+ } else {
+ res = path.slice(lastSlash + 1, index)
+ }
+ lastSegmentLength = index - lastSlash - 1
+ }
+ lastSlash = index
+ dots = 0
+ } else if (char === '.' && dots !== -1) {
+ ++dots
+ } else {
+ dots = -1
+ }
+ }
+ return res
+}
diff --git a/packages/vite/src/node/ssr/ssrExternal.ts b/packages/vite/src/node/ssr/ssrExternal.ts
index 3035fa972b3d19..5681e000502a5f 100644
--- a/packages/vite/src/node/ssr/ssrExternal.ts
+++ b/packages/vite/src/node/ssr/ssrExternal.ts
@@ -87,34 +87,35 @@ export function createIsConfiguredAsSsrExternal(
// Returns true if it is configured as external, false if it is filtered
// by noExternal and undefined if it isn't affected by the explicit config
return (id: string, importer?: string) => {
- const { ssr } = config
- if (ssr) {
- if (
- // If this id is defined as external, force it as external
- // Note that individual package entries are allowed in ssr.external
- ssr.external?.includes(id)
- ) {
- return true
- }
- const pkgName = getNpmPackageName(id)
- if (!pkgName) {
- return isExternalizable(id, importer)
- }
- if (
- // A package name in ssr.external externalizes every
- // externalizable package entry
- ssr.external?.includes(pkgName)
- ) {
- return isExternalizable(id, importer, true)
- }
- if (typeof noExternal === 'boolean') {
- return !noExternal
- }
- if (noExternalFilter && !noExternalFilter(pkgName)) {
- return false
- }
+ if (
+ // If this id is defined as external, force it as external
+ // Note that individual package entries are allowed in ssr.external
+ ssr.external !== true &&
+ ssr.external?.includes(id)
+ ) {
+ return true
}
- return isExternalizable(id, importer)
+ const pkgName = getNpmPackageName(id)
+ if (!pkgName) {
+ return isExternalizable(id, importer)
+ }
+ if (
+ // A package name in ssr.external externalizes every
+ // externalizable package entry
+ ssr.external !== true &&
+ ssr.external?.includes(pkgName)
+ ) {
+ return isExternalizable(id, importer, true)
+ }
+ if (typeof noExternal === 'boolean') {
+ return !noExternal
+ }
+ if (noExternalFilter && !noExternalFilter(pkgName)) {
+ return false
+ }
+ // If `ssr.external: true`, all will be externalized by default, regardless if
+ // it's a linked package
+ return isExternalizable(id, importer, ssr.external === true)
}
}
diff --git a/packages/vite/src/node/ssr/ssrFetchModule.ts b/packages/vite/src/node/ssr/ssrFetchModule.ts
new file mode 100644
index 00000000000000..27ffe25085305c
--- /dev/null
+++ b/packages/vite/src/node/ssr/ssrFetchModule.ts
@@ -0,0 +1,28 @@
+import type { ViteDevServer } from '../server'
+import { fetchModule } from './fetchModule'
+import type { FetchResult } from './runtime/types'
+
+// eslint-disable-next-line @typescript-eslint/no-empty-function
+const AsyncFunction = async function () {}.constructor as typeof Function
+const fnDeclarationLineCount = (() => {
+ const body = '/*code*/'
+ const source = new AsyncFunction('a', 'b', body).toString()
+ return source.slice(0, source.indexOf(body)).split('\n').length - 1
+})()
+
+export function ssrFetchModule(
+ server: ViteDevServer,
+ id: string,
+ importer?: string,
+): Promise {
+ return fetchModule(server, id, importer, {
+ processSourceMap(map) {
+ // this assumes that "new AsyncFunction" is used to create the module
+ return Object.assign({}, map, {
+ // currently we need to offset the line
+ // https://github.com/nodejs/node/issues/43047#issuecomment-1180632750
+ mappings: ';'.repeat(fnDeclarationLineCount) + map.mappings,
+ })
+ },
+ })
+}
diff --git a/packages/vite/src/node/ssr/ssrManifestPlugin.ts b/packages/vite/src/node/ssr/ssrManifestPlugin.ts
index 1a2baa332580ae..a60397419a13bd 100644
--- a/packages/vite/src/node/ssr/ssrManifestPlugin.ts
+++ b/packages/vite/src/node/ssr/ssrManifestPlugin.ts
@@ -5,7 +5,6 @@ import type {
ImportSpecifier,
} from 'es-module-lexer'
import type { OutputChunk } from 'rollup'
-import jsonStableStringify from 'json-stable-stringify'
import type { ResolvedConfig } from '..'
import type { Plugin } from '../plugin'
import { preloadMethod } from '../plugins/importAnalysisBuild'
@@ -14,6 +13,7 @@ import {
joinUrlSegments,
normalizePath,
numberToPos,
+ sortObjectKeys,
} from '../utils'
export function ssrManifestPlugin(config: ResolvedConfig): Plugin {
@@ -100,7 +100,7 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin {
? config.build.ssrManifest
: '.vite/ssr-manifest.json',
type: 'asset',
- source: jsonStableStringify(ssrManifest, { space: 2 }),
+ source: JSON.stringify(sortObjectKeys(ssrManifest), undefined, 2),
})
},
}
diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts
index 80830d08b383e1..e836d1e5f5f788 100644
--- a/packages/vite/src/node/ssr/ssrModuleLoader.ts
+++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts
@@ -2,7 +2,7 @@ import path from 'node:path'
import { pathToFileURL } from 'node:url'
import colors from 'picocolors'
import type { ViteDevServer } from '../server'
-import { isBuiltin, isFilePathESM, unwrapId } from '../utils'
+import { isBuiltin, isExternalUrl, isFilePathESM, unwrapId } from '../utils'
import { transformRequest } from '../server/transformRequest'
import type { InternalResolveOptionsWithOverrideConditions } from '../plugins/resolve'
import { tryNodeResolve } from '../plugins/resolve'
@@ -292,7 +292,7 @@ async function nodeImport(
) {
let url: string
let filePath: string | undefined
- if (id.startsWith('data:') || isBuiltin(id)) {
+ if (id.startsWith('data:') || isExternalUrl(id) || isBuiltin(id)) {
url = id
} else {
const resolved = tryNodeResolve(
diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts
index ff23df8a6d3e30..67c827e7000421 100644
--- a/packages/vite/src/node/utils.ts
+++ b/packages/vite/src/node/utils.ts
@@ -3,7 +3,7 @@ import os from 'node:os'
import path from 'node:path'
import { exec } from 'node:child_process'
import { createHash } from 'node:crypto'
-import { URL, URLSearchParams, fileURLToPath } from 'node:url'
+import { URL, fileURLToPath } from 'node:url'
import { builtinModules, createRequire } from 'node:module'
import { promises as dns } from 'node:dns'
import { performance } from 'node:perf_hooks'
@@ -162,6 +162,16 @@ export const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//
// TODO: use import()
const _require = createRequire(import.meta.url)
+export function resolveDependencyVersion(
+ dep: string,
+ pkgRelativePath = '../../package.json',
+): string {
+ const pkgPath = path.resolve(_require.resolve(dep), pkgRelativePath)
+ return JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).version
+}
+
+export const rollupVersion = resolveDependencyVersion('rollup')
+
// set in bin/vite.js
const filter = process.env.VITE_DEBUG_FILTER
@@ -336,6 +346,15 @@ export function removeDirectQuery(url: string): string {
return url.replace(directRequestRE, '$1').replace(trailingSeparatorRE, '')
}
+export const urlRE = /(\?|&)url(?:&|$)/
+export const rawRE = /(\?|&)raw(?:&|$)/
+export function removeUrlQuery(url: string): string {
+ return url.replace(urlRE, '$1').replace(trailingSeparatorRE, '')
+}
+export function removeRawQuery(url: string): string {
+ return url.replace(rawRE, '$1').replace(trailingSeparatorRE, '')
+}
+
const replacePercentageRE = /%/g
export function injectQuery(url: string, queryToInject: string): string {
// encode percents for consistent behavior with pathToFileURL
@@ -393,7 +412,10 @@ export function prettifyUrl(url: string, root: string): string {
url = removeTimestampQuery(url)
const isAbsoluteFile = url.startsWith(root)
if (isAbsoluteFile || url.startsWith(FS_PREFIX)) {
- const file = path.relative(root, isAbsoluteFile ? url : fsPathFromId(url))
+ const file = path.posix.relative(
+ root,
+ isAbsoluteFile ? url : fsPathFromId(url),
+ )
return colors.dim(file)
} else {
return colors.dim(url)
@@ -787,10 +809,10 @@ export function processSrcSetSync(
}
const cleanSrcSetRE =
- /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'/g
+ /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'|data:\w+\/[\w.+\-]+;base64,[\w+/=]+/g
function splitSrcSet(srcs: string) {
const parts: string[] = []
- // There could be a ',' inside of url(data:...), linear-gradient(...) or "data:..."
+ // There could be a ',' inside of url(data:...), linear-gradient(...), "data:..." or data:...
const cleanedSrcs = srcs.replace(cleanSrcSetRE, blankReplacer)
let startIndex = 0
let splitIndex: number
@@ -1032,14 +1054,6 @@ export const singlelineCommentsRE = /\/\/.*/g
export const requestQuerySplitRE = /\?(?!.*[/|}])/
export const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/
-export function parseRequest(id: string): Record | null {
- const [_, search] = id.split(requestQuerySplitRE, 2)
- if (!search) {
- return null
- }
- return Object.fromEntries(new URLSearchParams(search))
-}
-
export const blankReplacer = (match: string): string => ' '.repeat(match.length)
export function getHash(text: Buffer | string, length = 8): string {
@@ -1070,7 +1084,7 @@ export const requireResolveFromRootWithFallback = (
}
export function emptyCssComments(raw: string): string {
- return raw.replace(multilineCommentsRE, (s) => ' '.repeat(s.length))
+ return raw.replace(multilineCommentsRE, blankReplacer)
}
function backwardCompatibleWorkerPlugins(plugins: any) {
@@ -1379,3 +1393,36 @@ export function promiseWithResolvers(): PromiseWithResolvers {
})
return { promise, resolve, reject }
}
+
+export function createSerialPromiseQueue(): {
+ run(f: () => Promise): Promise
+} {
+ let previousTask: Promise<[unknown, Awaited]> | undefined
+
+ return {
+ async run(f) {
+ const thisTask = f()
+ // wait for both the previous task and this task
+ // so that this function resolves in the order this function is called
+ const depTasks = Promise.all([previousTask, thisTask])
+ previousTask = depTasks
+
+ const [, result] = await depTasks
+
+ // this task was the last one, clear `previousTask` to free up memory
+ if (previousTask === depTasks) {
+ previousTask = undefined
+ }
+
+ return result
+ },
+ }
+}
+
+export function sortObjectKeys>(obj: T): T {
+ const sorted: Record = {}
+ for (const key of Object.keys(obj).sort()) {
+ sorted[key] = obj[key]
+ }
+ return sorted as T
+}
diff --git a/packages/vite/src/node/watch.ts b/packages/vite/src/node/watch.ts
index 3b40a71c84d3fc..a1718ffb25166a 100644
--- a/packages/vite/src/node/watch.ts
+++ b/packages/vite/src/node/watch.ts
@@ -1,6 +1,8 @@
import { EventEmitter } from 'node:events'
+import path from 'node:path'
import glob from 'fast-glob'
import type { FSWatcher, WatchOptions } from 'dep-types/chokidar'
+import { arraify } from './utils'
import type { ResolvedConfig } from '.'
export function resolveChokidarOptions(
@@ -15,7 +17,8 @@ export function resolveChokidarOptions(
'**/node_modules/**',
'**/test-results/**', // Playwright
glob.escapePath(config.cacheDir) + '/**',
- ...(Array.isArray(ignored) ? ignored : [ignored]),
+ glob.escapePath(path.resolve(config.root, config.build.outDir)) + '/**',
+ ...arraify(ignored),
],
ignoreInitial: true,
ignorePermissionErrors: true,
@@ -42,6 +45,14 @@ class NoopWatcher extends EventEmitter implements FSWatcher {
return {}
}
+ ref() {
+ return this
+ }
+
+ unref() {
+ return this
+ }
+
async close() {
// noop
}
diff --git a/packages/vite/src/shared/hmr.ts b/packages/vite/src/shared/hmr.ts
index 9c0004793d30c3..05f2f742c4f247 100644
--- a/packages/vite/src/shared/hmr.ts
+++ b/packages/vite/src/shared/hmr.ts
@@ -15,18 +15,28 @@ interface HotCallback {
fn: (modules: Array) => void
}
-interface Connection {
- addBuffer(message: string): void
- send(): unknown
+export interface HMRLogger {
+ error(msg: string | Error): void
+ debug(...msg: unknown[]): void
+}
+
+export interface HMRConnection {
+ /**
+ * Checked before sending messages to the client.
+ */
+ isReady(): boolean
+ /**
+ * Send message to the client.
+ */
+ send(messages: string): void
}
export class HMRContext implements ViteHotContext {
private newListeners: CustomListenersMap
constructor(
- private ownerPath: string,
private hmrClient: HMRClient,
- private connection: Connection,
+ private ownerPath: string,
) {
if (!hmrClient.dataMap.has(ownerPath)) {
hmrClient.dataMap.set(ownerPath, {})
@@ -141,8 +151,9 @@ export class HMRContext implements ViteHotContext {
}
send(event: T, data?: InferCustomEventPayload): void {
- this.connection.addBuffer(JSON.stringify({ type: 'custom', event, data }))
- this.connection.send()
+ this.hmrClient.messenger.send(
+ JSON.stringify({ type: 'custom', event, data }),
+ )
}
private acceptDeps(
@@ -161,6 +172,24 @@ export class HMRContext implements ViteHotContext {
}
}
+class HMRMessenger {
+ constructor(private connection: HMRConnection) {}
+
+ private queue: string[] = []
+
+ public send(message: string): void {
+ this.queue.push(message)
+ this.flush()
+ }
+
+ public flush(): void {
+ if (this.connection.isReady()) {
+ this.queue.forEach((msg) => this.connection.send(msg))
+ this.queue = []
+ }
+ }
+}
+
export class HMRClient {
public hotModulesMap = new Map()
public disposeMap = new Map void | Promise>()
@@ -169,11 +198,16 @@ export class HMRClient {
public customListenersMap: CustomListenersMap = new Map()
public ctxToListenersMap = new Map()
+ public messenger: HMRMessenger
+
constructor(
- public logger: Console,
- // this allows up to implement reloading via different methods depending on the environment
+ public logger: HMRLogger,
+ connection: HMRConnection,
+ // This allows implementing reloading via different methods depending on the environment
private importUpdatedModule: (update: Update) => Promise,
- ) {}
+ ) {
+ this.messenger = new HMRMessenger(connection)
+ }
public async notifyListeners(
event: T,
@@ -186,6 +220,15 @@ export class HMRClient {
}
}
+ public clear(): void {
+ this.hotModulesMap.clear()
+ this.disposeMap.clear()
+ this.pruneMap.clear()
+ this.dataMap.clear()
+ this.customListenersMap.clear()
+ this.ctxToListenersMap.clear()
+ }
+
// After an HMR update, some modules are no longer imported on the page
// but they may have left behind side effects that need to be cleaned up
// (.e.g style injections)
@@ -210,7 +253,27 @@ export class HMRClient {
)
}
- public async fetchUpdate(update: Update): Promise<(() => void) | undefined> {
+ private updateQueue: Promise<(() => void) | undefined>[] = []
+ private pendingUpdateQueue = false
+
+ /**
+ * buffer multiple hot updates triggered by the same src change
+ * so that they are invoked in the same order they were sent.
+ * (otherwise the order may be inconsistent because of the http request round trip)
+ */
+ public async queueUpdate(payload: Update): Promise {
+ this.updateQueue.push(this.fetchUpdate(payload))
+ if (!this.pendingUpdateQueue) {
+ this.pendingUpdateQueue = true
+ await Promise.resolve()
+ this.pendingUpdateQueue = false
+ const loading = [...this.updateQueue]
+ this.updateQueue = []
+ ;(await Promise.all(loading)).forEach((fn) => fn && fn())
+ }
+ }
+
+ private async fetchUpdate(update: Update): Promise<(() => void) | undefined> {
const { path, acceptedPath } = update
const mod = this.hotModulesMap.get(path)
if (!mod) {
diff --git a/packages/vite/src/types/chokidar.d.ts b/packages/vite/src/types/chokidar.d.ts
index 36ae23279c7349..44d500f6a3ba9c 100644
--- a/packages/vite/src/types/chokidar.d.ts
+++ b/packages/vite/src/types/chokidar.d.ts
@@ -40,6 +40,19 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
*/
constructor(options?: WatchOptions)
+ /**
+ * When called, requests that the Node.js event loop not exit so long as the fs.FSWatcher is active.
+ * Calling watcher.ref() multiple times will have no effect.
+ */
+ ref(): this
+
+ /**
+ * When called, the active fs.FSWatcher object will not require the Node.js event loop to remain active.
+ * If there is no other activity keeping the event loop running, the process may exit before the fs.FSWatcher object's callback is invoked.
+ * Calling watcher.unref() multiple times will have no effect.
+ */
+ unref(): this
+
/**
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
* string.
diff --git a/packages/vite/types/hmrPayload.d.ts b/packages/vite/types/hmrPayload.d.ts
index 839095009e76fb..275fbfc9ec744b 100644
--- a/packages/vite/types/hmrPayload.d.ts
+++ b/packages/vite/types/hmrPayload.d.ts
@@ -20,10 +20,12 @@ export interface Update {
path: string
acceptedPath: string
timestamp: number
- /**
- * @experimental internal
- */
- explicitImportRequired?: boolean | undefined
+ /** @internal */
+ explicitImportRequired?: boolean
+ /** @internal */
+ isWithinCircularImport?: boolean
+ /** @internal */
+ ssrInvalidates?: string[]
}
export interface PrunePayload {
diff --git a/packages/vite/types/importGlob.d.ts b/packages/vite/types/importGlob.d.ts
index b9ba52ec1ca881..e0167531d6d9ad 100644
--- a/packages/vite/types/importGlob.d.ts
+++ b/packages/vite/types/importGlob.d.ts
@@ -4,6 +4,8 @@ export interface ImportGlobOptions<
> {
/**
* Import type for the import url.
+ *
+ * @deprecated Use `query` instead, e.g. `as: 'url'` -> `query: '?url', import: 'default'`
*/
as?: AsType
/**
diff --git a/patches/chokidar@3.5.3.patch b/patches/chokidar@3.6.0.patch
similarity index 72%
rename from patches/chokidar@3.5.3.patch
rename to patches/chokidar@3.6.0.patch
index 510fea89b1f487..70c2b0183971ae 100644
--- a/patches/chokidar@3.5.3.patch
+++ b/patches/chokidar@3.6.0.patch
@@ -1,8 +1,8 @@
diff --git a/lib/fsevents-handler.js b/lib/fsevents-handler.js
-index 0f7f2cba857e0dbe001a5597061b11a9268d1e0e..5e99d97b917f8e2616cd3deb48b7a19d8b038928 100644
+index fe29393c179d3d6673f996ca6f95bbc83f9a0699..08e425fa3135df4b6d1912329f4d8b8b99c8048c 100644
--- a/lib/fsevents-handler.js
+++ b/lib/fsevents-handler.js
-@@ -303,7 +303,8 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
+@@ -305,7 +305,8 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
const opts = this.fsw.options;
const watchCallback = async (fullPath, flags, info) => {
@@ -11,4 +11,4 @@ index 0f7f2cba857e0dbe001a5597061b11a9268d1e0e..5e99d97b917f8e2616cd3deb48b7a19d
+ if (this.fsw.closed || this.fsw._isIgnored(fullPath)) return;
if (
opts.depth !== undefined &&
- calcDepth(fullPath, realPath) > opts.depth
\ No newline at end of file
+ calcDepth(fullPath, realPath) > opts.depth
diff --git a/patches/sirv@2.0.3.patch b/patches/sirv@2.0.4.patch
similarity index 99%
rename from patches/sirv@2.0.3.patch
rename to patches/sirv@2.0.4.patch
index 0a758e89369c9c..d6cf2c64ab7751 100644
--- a/patches/sirv@2.0.3.patch
+++ b/patches/sirv@2.0.4.patch
@@ -70,4 +70,4 @@ index c05040fc6ec504a1828a7badd39f669981acd0ee..e9597e8b5bf24613a09565f0e13024ae
+ shouldServe?: (absoluteFilePath: string) => void;
}
- export default function(dir?: string, opts?: Options): RequestHandler;
\ No newline at end of file
+ export default function(dir?: string, opts?: Options): RequestHandler;
diff --git a/playground/alias/package.json b/playground/alias/package.json
index 1a0dfe754f1c52..90ebfb75d55fa4 100644
--- a/playground/alias/package.json
+++ b/playground/alias/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"aliased-module": "file:./dir/module",
- "vue": "^3.3.11",
- "@vue/shared": "^3.3.11"
+ "vue": "^3.4.15",
+ "@vue/shared": "^3.4.16"
},
"devDependencies": {
"@vitejs/test-resolve-linked": "workspace:*"
diff --git a/playground/assets/__tests__/assets.spec.ts b/playground/assets/__tests__/assets.spec.ts
index 98ec4e39826b87..5933db4d76c08d 100644
--- a/playground/assets/__tests__/assets.spec.ts
+++ b/playground/assets/__tests__/assets.spec.ts
@@ -259,7 +259,7 @@ describe('css url() references', () => {
})
test.runIf(isBuild)('generated paths in CSS', () => {
- const css = findAssetFile(/\.css$/, 'foo')
+ const css = findAssetFile(/index-[-\w]{8}\.css$/, 'foo')
// preserve postfix query/hash
expect(css).toMatch(`woff2?#iefix`)
@@ -353,19 +353,16 @@ test('?url import', async () => {
const src = readFile('foo.js')
expect(await page.textContent('.url')).toMatch(
isBuild
- ? `data:application/javascript;base64,${Buffer.from(src).toString(
- 'base64',
- )}`
+ ? `data:text/javascript;base64,${Buffer.from(src).toString('base64')}`
: `/foo/bar/foo.js`,
)
})
test('?url import on css', async () => {
- const src = readFile('css/icons.css')
const txt = await page.textContent('.url-css')
- expect(txt).toEqual(
+ expect(txt).toMatch(
isBuild
- ? `data:text/css;base64,${Buffer.from(src).toString('base64')}`
+ ? /\/foo\/bar\/assets\/icons-[-\w]{8}\.css/
: '/foo/bar/css/icons.css',
)
})
@@ -375,9 +372,7 @@ describe('unicode url', () => {
const src = readFile('テスト-測試-white space.js')
expect(await page.textContent('.unicode-url')).toMatch(
isBuild
- ? `data:application/javascript;base64,${Buffer.from(src).toString(
- 'base64',
- )}`
+ ? `data:text/javascript;base64,${Buffer.from(src).toString('base64')}`
: `/foo/bar/テスト-測試-white space.js`,
)
})
@@ -408,7 +403,7 @@ test('new URL("/...", import.meta.url)', async () => {
test('new URL(..., import.meta.url) without extension', async () => {
expect(await page.textContent('.import-meta-url-without-extension')).toMatch(
- isBuild ? 'data:application/javascript' : 'nested/test.js',
+ isBuild ? 'data:text/javascript' : 'nested/test.js',
)
expect(
await page.textContent('.import-meta-url-content-without-extension'),
@@ -423,7 +418,7 @@ test('new URL(`${dynamic}`, import.meta.url)', async () => {
assetMatch,
)
expect(await page.textContent('.dynamic-import-meta-url-js')).toMatch(
- isBuild ? 'data:application/javascript;base64' : '/foo/bar/nested/test.js',
+ isBuild ? 'data:text/javascript;base64' : '/foo/bar/nested/test.js',
)
})
@@ -466,6 +461,8 @@ test.runIf(isBuild)('manifest', async () => {
for (const file of listAssets('foo')) {
if (file.endsWith('.css')) {
+ // ignore icons-*.css as it's imported with ?url
+ if (file.includes('icons-')) continue
expect(entry.css).toContain(`assets/${file}`)
} else if (!file.endsWith('.js')) {
expect(entry.assets).toContain(`assets/${file}`)
diff --git a/playground/assets/__tests__/relative-base/relative-base-assets.spec.ts b/playground/assets/__tests__/relative-base/assets-relative-base.spec.ts
similarity index 100%
rename from playground/assets/__tests__/relative-base/relative-base-assets.spec.ts
rename to playground/assets/__tests__/relative-base/assets-relative-base.spec.ts
diff --git a/playground/assets/__tests__/runtime-base/runtime-base-assets.spec.ts b/playground/assets/__tests__/runtime-base/assets-runtime-base.spec.ts
similarity index 100%
rename from playground/assets/__tests__/runtime-base/runtime-base-assets.spec.ts
rename to playground/assets/__tests__/runtime-base/assets-runtime-base.spec.ts
diff --git a/playground/assets/__tests__/url-base/url-base-assets.spec.ts b/playground/assets/__tests__/url-base/assets-url-base.spec.ts
similarity index 100%
rename from playground/assets/__tests__/url-base/url-base-assets.spec.ts
rename to playground/assets/__tests__/url-base/assets-url-base.spec.ts
diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json
index 2e374b6e70d87d..b5bff1dd6a393b 100644
--- a/playground/backend-integration/package.json
+++ b/playground/backend-integration/package.json
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"devDependencies": {
- "sass": "^1.69.5",
- "tailwindcss": "^3.3.6",
+ "sass": "^1.70.0",
+ "tailwindcss": "^3.4.1",
"fast-glob": "^3.3.2"
}
}
diff --git a/playground/cli-module/vite.config.js b/playground/cli-module/vite.config.js
index ed7ac01c2d6612..89fe27b409b646 100644
--- a/playground/cli-module/vite.config.js
+++ b/playground/cli-module/vite.config.js
@@ -1,4 +1,4 @@
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
import { URL } from 'url'
import { defineConfig } from 'vite'
diff --git a/playground/config/__tests__/load.spec.ts b/playground/config/__tests__/config.spec.ts
similarity index 100%
rename from playground/config/__tests__/load.spec.ts
rename to playground/config/__tests__/config.spec.ts
diff --git a/playground/css-codesplit-cjs/__tests__/css-codesplit.spec.ts b/playground/css-codesplit-cjs/__tests__/css-codesplit-cjs.spec.ts
similarity index 100%
rename from playground/css-codesplit-cjs/__tests__/css-codesplit.spec.ts
rename to playground/css-codesplit-cjs/__tests__/css-codesplit-cjs.spec.ts
diff --git a/playground/css-lightningcss-proxy/package.json b/playground/css-lightningcss-proxy/package.json
index 5665a60cf861ae..fcd41f59c9278d 100644
--- a/playground/css-lightningcss-proxy/package.json
+++ b/playground/css-lightningcss-proxy/package.json
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"devDependencies": {
- "lightningcss": "^1.22.1",
+ "lightningcss": "^1.23.0",
"express": "^4.18.2"
}
}
diff --git a/playground/css-lightningcss/__tests__/lightningcss.spec.ts b/playground/css-lightningcss/__tests__/css-lightningcss.spec.ts
similarity index 100%
rename from playground/css-lightningcss/__tests__/lightningcss.spec.ts
rename to playground/css-lightningcss/__tests__/css-lightningcss.spec.ts
diff --git a/playground/css-lightningcss/package.json b/playground/css-lightningcss/package.json
index 64fbc3a79fb83a..8e091e350d86ae 100644
--- a/playground/css-lightningcss/package.json
+++ b/playground/css-lightningcss/package.json
@@ -9,6 +9,6 @@
"preview": "vite preview"
},
"devDependencies": {
- "lightningcss": "^1.22.1"
+ "lightningcss": "^1.23.0"
}
}
diff --git a/playground/css-sourcemap/__tests__/lib-entry/lib-entry.spec.ts b/playground/css-sourcemap/__tests__/lib-entry/css-sourcemap-lib-entry.spec.ts
similarity index 100%
rename from playground/css-sourcemap/__tests__/lib-entry/lib-entry.spec.ts
rename to playground/css-sourcemap/__tests__/lib-entry/css-sourcemap-lib-entry.spec.ts
diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json
index c288a5cda62de6..34352d0d3bf9b8 100644
--- a/playground/css-sourcemap/package.json
+++ b/playground/css-sourcemap/package.json
@@ -11,8 +11,8 @@
},
"devDependencies": {
"less": "^4.2.0",
- "magic-string": "^0.30.5",
- "sass": "^1.69.5",
+ "magic-string": "^0.30.7",
+ "sass": "^1.70.0",
"stylus": "^0.62.0",
"sugarss": "^4.0.1"
}
diff --git a/playground/css/__tests__/css.spec.ts b/playground/css/__tests__/css.spec.ts
index 8b4f498430e099..2e7e78aefaf976 100644
--- a/playground/css/__tests__/css.spec.ts
+++ b/playground/css/__tests__/css.spec.ts
@@ -74,6 +74,9 @@ test('sass', async () => {
const atImport = await page.$('.sass-at-import')
const atImportAlias = await page.$('.sass-at-import-alias')
const urlStartsWithVariable = await page.$('.sass-url-starts-with-variable')
+ const urlStartsWithFunctionCall = await page.$(
+ '.sass-url-starts-with-function-call',
+ )
const partialImport = await page.$('.sass-partial')
expect(await getColor(imported)).toBe('orange')
@@ -86,6 +89,9 @@ test('sass', async () => {
expect(await getBg(urlStartsWithVariable)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
+ expect(await getBg(urlStartsWithFunctionCall)).toMatch(
+ isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
+ )
expect(await getColor(partialImport)).toBe('orchid')
editFile('sass.scss', (code) =>
@@ -292,6 +298,10 @@ test('@import dependency that @import another dependency', async () => {
expect(await getColor('.css-proxy-dep')).toBe('purple')
})
+test('@import scss dependency that has @import with a css extension pointing to another dependency', async () => {
+ expect(await getColor('.scss-proxy-dep')).toBe('purple')
+})
+
test('@import dependency w/out package scss', async () => {
expect(await getColor('.sass-dep')).toBe('lavender')
})
@@ -428,6 +438,10 @@ test('minify css', async () => {
expect(cssFile).not.toMatch('#ffff00b3')
})
+test('?url', async () => {
+ expect(await getColor('.url-imported-css')).toBe('yellow')
+})
+
test('?raw', async () => {
const rawImportCss = await page.$('.raw-imported-css')
diff --git a/playground/css/__tests__/no-css-minify/no-css-minify.spec.ts b/playground/css/__tests__/no-css-minify/css-no-css-minify.spec.ts
similarity index 100%
rename from playground/css/__tests__/no-css-minify/no-css-minify.spec.ts
rename to playground/css/__tests__/no-css-minify/css-no-css-minify.spec.ts
diff --git a/playground/css/__tests__/postcss-plugins-different-dir/postcss-plugins-different-dir.spec.ts b/playground/css/__tests__/postcss-plugins-different-dir/css-postcss-plugins-different-dir.spec.ts
similarity index 100%
rename from playground/css/__tests__/postcss-plugins-different-dir/postcss-plugins-different-dir.spec.ts
rename to playground/css/__tests__/postcss-plugins-different-dir/css-postcss-plugins-different-dir.spec.ts
diff --git a/playground/css/__tests__/same-file-name/same-file-name.spec.ts b/playground/css/__tests__/same-file-name/css-same-file-name.spec.ts
similarity index 100%
rename from playground/css/__tests__/same-file-name/same-file-name.spec.ts
rename to playground/css/__tests__/same-file-name/css-same-file-name.spec.ts
diff --git a/playground/css/index.html b/playground/css/index.html
index 2016c1b3c72ca8..520e1e20b4e2aa 100644
--- a/playground/css/index.html
+++ b/playground/css/index.html
@@ -33,6 +33,9 @@ CSS
@import from SASS _partial: This should be orchid
url starts with variable
+
+ url starts with function call
+
Imported SASS string:
@@ -143,6 +146,10 @@
CSS
@import dependency that @import another dependency: this should be purple
+
+ @import dependency that has @import with a css extension pointing to another
+ dependency: this should be purple
+
PostCSS dir-dependency: this should be grey
@@ -178,6 +185,8 @@
CSS
+ URL Support
+
Raw Support
diff --git a/playground/css/main.js b/playground/css/main.js
index b0b405a96a7baf..204d95768e88d4 100644
--- a/playground/css/main.js
+++ b/playground/css/main.js
@@ -6,6 +6,9 @@ import './less.less'
import './stylus.styl'
import './manual-chunk.css'
+import urlCss from './url-imported.css?url'
+appendLinkStylesheet(urlCss)
+
import rawCss from './raw-imported.css?raw'
text('.raw-imported-css', rawCss)
@@ -43,7 +46,7 @@ import './layered/index.css'
import './dep.css'
import './glob-dep.css'
-// eslint-disable-next-line import/order
+// eslint-disable-next-line i/order
import { barModuleClasses } from '@vitejs/test-css-js-dep'
document
.querySelector('.css-js-dep-module')
@@ -53,6 +56,13 @@ function text(el, text) {
document.querySelector(el).textContent = text
}
+function appendLinkStylesheet(href) {
+ const link = document.createElement('link')
+ link.rel = 'stylesheet'
+ link.href = href
+ document.head.appendChild(link)
+}
+
if (import.meta.hot) {
import.meta.hot.accept('./mod.module.css', (newMod) => {
const list = document.querySelector('.modules').classList
diff --git a/playground/css/nested/_index.scss b/playground/css/nested/_index.scss
index fee2eb88b168f2..7a0f23ec27f6eb 100644
--- a/playground/css/nested/_index.scss
+++ b/playground/css/nested/_index.scss
@@ -1,3 +1,5 @@
+@use 'sass:string';
+
@import './css-in-scss.css';
.sass-at-import {
@@ -15,3 +17,9 @@ $var: '/ok.png';
background: url($var);
background-position: center;
}
+
+$var2: '/OK.PNG';
+.sass-url-starts-with-function-call {
+ background: url(to-lower-case($var2));
+ background-position: center;
+}
diff --git a/playground/css/package.json b/playground/css/package.json
index f80acbf572675e..1a74ea49a1f1a2 100644
--- a/playground/css/package.json
+++ b/playground/css/package.json
@@ -20,10 +20,11 @@
"@vitejs/test-css-dep-exports": "link:./css-dep-exports",
"@vitejs/test-css-js-dep": "file:./css-js-dep",
"@vitejs/test-css-proxy-dep": "file:./css-proxy-dep",
+ "@vitejs/test-scss-proxy-dep": "file:./scss-proxy-dep",
"fast-glob": "^3.3.2",
"less": "^4.2.0",
"postcss-nested": "^6.0.1",
- "sass": "^1.69.5",
+ "sass": "^1.70.0",
"stylus": "^0.62.0",
"sugarss": "^4.0.1"
}
diff --git a/playground/css/raw-imported.css b/playground/css/raw-imported.css
index ac0aee96390c33..ee681e650b0b47 100644
--- a/playground/css/raw-imported.css
+++ b/playground/css/raw-imported.css
@@ -1,3 +1,6 @@
-.raw-imported {
- color: yellow;
+.raw {
+ /* should not be transformed by postcss */
+ &-imported {
+ color: yellow;
+ }
}
diff --git a/playground/css/sass.scss b/playground/css/sass.scss
index 4105e1aefa9c55..f2f9e685630597 100644
--- a/playground/css/sass.scss
+++ b/playground/css/sass.scss
@@ -2,6 +2,7 @@
@import '=/nested/partial'; // sass convention: omitting leading _ for partials
@import '@vitejs/test-css-dep'; // package w/ sass entry points
@import '@vitejs/test-css-dep-exports'; // package with a sass export mapping
+@import '@vitejs/test-scss-proxy-dep'; // package with a sass proxy import
@import 'virtual-dep'; // virtual file added through importer
@import '=/pkg-dep'; // package w/out sass field
@import '=/weapp.wxss'; // wxss file
diff --git a/playground/css/scss-proxy-dep-nested/index.css b/playground/css/scss-proxy-dep-nested/index.css
new file mode 100644
index 00000000000000..4c7e3b16e62597
--- /dev/null
+++ b/playground/css/scss-proxy-dep-nested/index.css
@@ -0,0 +1,3 @@
+.scss-proxy-dep {
+ color: purple;
+}
diff --git a/playground/css/scss-proxy-dep-nested/package.json b/playground/css/scss-proxy-dep-nested/package.json
new file mode 100644
index 00000000000000..4f7a99bb559207
--- /dev/null
+++ b/playground/css/scss-proxy-dep-nested/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@vitejs/test-scss-proxy-dep-nested",
+ "private": true,
+ "version": "1.0.0"
+}
diff --git a/playground/css/scss-proxy-dep/index.scss b/playground/css/scss-proxy-dep/index.scss
new file mode 100644
index 00000000000000..2b1a7a543cd776
--- /dev/null
+++ b/playground/css/scss-proxy-dep/index.scss
@@ -0,0 +1 @@
+@import '@vitejs/test-scss-proxy-dep-nested/index.css';
diff --git a/playground/css/scss-proxy-dep/package.json b/playground/css/scss-proxy-dep/package.json
new file mode 100644
index 00000000000000..a2749e7ae3e957
--- /dev/null
+++ b/playground/css/scss-proxy-dep/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "@vitejs/test-scss-proxy-dep",
+ "private": true,
+ "version": "1.0.0",
+ "sass": "index.scss",
+ "dependencies": {
+ "@vitejs/test-scss-proxy-dep-nested": "file:../scss-proxy-dep-nested"
+ }
+}
diff --git a/playground/css/url-imported.css b/playground/css/url-imported.css
new file mode 100644
index 00000000000000..95fec50ab2c554
--- /dev/null
+++ b/playground/css/url-imported.css
@@ -0,0 +1,6 @@
+.url {
+ /* should be transformed by postcss */
+ &-imported-css {
+ color: yellow;
+ }
+}
diff --git a/playground/css/vite.config.js b/playground/css/vite.config.js
index 3d301ae03bec3e..5ac9d448a2734a 100644
--- a/playground/css/vite.config.js
+++ b/playground/css/vite.config.js
@@ -82,5 +82,6 @@ export default defineConfig({
},
},
},
+ preprocessorMaxWorkers: true,
},
})
diff --git a/playground/data-uri/__tests__/data-uri.spec.ts b/playground/data-uri/__tests__/data-uri.spec.ts
index 7d9ab64594c663..b18012e59d380c 100644
--- a/playground/data-uri/__tests__/data-uri.spec.ts
+++ b/playground/data-uri/__tests__/data-uri.spec.ts
@@ -9,6 +9,18 @@ test('base64', async () => {
expect(await page.textContent('.base64')).toBe('hi')
})
+test('svg data uri minify', async () => {
+ const sqdqs = await page.getByTestId('sqdqs').boundingBox()
+ const sqsdqs = await page.getByTestId('sqsdqs').boundingBox()
+ const dqsqs = await page.getByTestId('dqsqs').boundingBox()
+ const dqssqs = await page.getByTestId('dqssqs').boundingBox()
+
+ expect(sqdqs.height).toBe(100)
+ expect(sqsdqs.height).toBe(100)
+ expect(dqsqs.height).toBe(100)
+ expect(dqssqs.height).toBe(100)
+})
+
test.runIf(isBuild)('should compile away the import for build', async () => {
const file = findAssetFile('index')
expect(file).not.toMatch('import')
diff --git a/playground/data-uri/double-quote-in-single-quotes.svg b/playground/data-uri/double-quote-in-single-quotes.svg
new file mode 100644
index 00000000000000..d3a5ffc19e3701
--- /dev/null
+++ b/playground/data-uri/double-quote-in-single-quotes.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/playground/data-uri/double-quotes-in-single-quotes.svg b/playground/data-uri/double-quotes-in-single-quotes.svg
new file mode 100644
index 00000000000000..fb8f151a23a598
--- /dev/null
+++ b/playground/data-uri/double-quotes-in-single-quotes.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/playground/data-uri/index.html b/playground/data-uri/index.html
index 32cc458940e60c..597c3a204f36c9 100644
--- a/playground/data-uri/index.html
+++ b/playground/data-uri/index.html
@@ -12,3 +12,10 @@
document.querySelector(el).textContent = text
}
+
+
+
+
+
+
+
diff --git a/playground/data-uri/main.js b/playground/data-uri/main.js
new file mode 100644
index 00000000000000..63326fdb1b4781
--- /dev/null
+++ b/playground/data-uri/main.js
@@ -0,0 +1,18 @@
+import sqdqs from './single-quote-in-double-quotes.svg'
+import sqsdqs from './single-quotes-in-double-quotes.svg'
+import dqsqs from './double-quote-in-single-quotes.svg'
+import dqssqs from './double-quotes-in-single-quotes.svg'
+
+document.querySelector('#sqdqs').innerHTML = `
+
+`
+document.querySelector('#sqsdqs').innerHTML = `
+
+`
+
+document.querySelector('#dqsqs').innerHTML = `
+
+`
+document.querySelector('#dqssqs').innerHTML = `
+
+`
diff --git a/playground/data-uri/single-quote-in-double-quotes.svg b/playground/data-uri/single-quote-in-double-quotes.svg
new file mode 100644
index 00000000000000..69974c97773921
--- /dev/null
+++ b/playground/data-uri/single-quote-in-double-quotes.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/playground/data-uri/single-quotes-in-double-quotes.svg b/playground/data-uri/single-quotes-in-double-quotes.svg
new file mode 100644
index 00000000000000..0489e7b39e8b5a
--- /dev/null
+++ b/playground/data-uri/single-quotes-in-double-quotes.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/playground/dynamic-import/__tests__/dynamic-import.spec.ts b/playground/dynamic-import/__tests__/dynamic-import.spec.ts
index c8c97254a75f02..3892251bfd2e41 100644
--- a/playground/dynamic-import/__tests__/dynamic-import.spec.ts
+++ b/playground/dynamic-import/__tests__/dynamic-import.spec.ts
@@ -118,7 +118,7 @@ test('should load dynamic import with vars raw', async () => {
test('should load dynamic import with vars url', async () => {
await untilUpdated(
() => page.textContent('.dynamic-import-with-vars-url'),
- isBuild ? 'data:application/javascript' : '/alias/url.js',
+ isBuild ? 'data:text/javascript' : '/alias/url.js',
true,
)
})
diff --git a/playground/extensions/package.json b/playground/extensions/package.json
index b2a2cc860fc48a..44fc4e6cef6e67 100644
--- a/playground/extensions/package.json
+++ b/playground/extensions/package.json
@@ -10,6 +10,6 @@
"preview": "vite preview"
},
"dependencies": {
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
}
}
diff --git a/playground/external/dep-that-imports/package.json b/playground/external/dep-that-imports/package.json
index 6a04db087f1732..b77b44b25b00a5 100644
--- a/playground/external/dep-that-imports/package.json
+++ b/playground/external/dep-that-imports/package.json
@@ -5,6 +5,6 @@
"dependencies": {
"slash3": "npm:slash@^3.0.0",
"slash5": "npm:slash@^5.1.0",
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
}
}
diff --git a/playground/external/dep-that-requires/package.json b/playground/external/dep-that-requires/package.json
index 2517653a321e23..2576112c03f30d 100644
--- a/playground/external/dep-that-requires/package.json
+++ b/playground/external/dep-that-requires/package.json
@@ -5,6 +5,6 @@
"dependencies": {
"slash3": "npm:slash@^3.0.0",
"slash5": "npm:slash@^5.1.0",
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
}
}
diff --git a/playground/external/package.json b/playground/external/package.json
index e1cb7fb29dd3f4..e26ac74adc5d12 100644
--- a/playground/external/package.json
+++ b/playground/external/package.json
@@ -17,7 +17,7 @@
"slash3": "npm:slash@^3.0.0",
"slash5": "npm:slash@^5.1.0",
"vite": "workspace:*",
- "vue": "^3.3.11",
+ "vue": "^3.4.15",
"vue32": "npm:vue@~3.2.0"
}
}
diff --git a/playground/external/vite.config.js b/playground/external/vite.config.js
index 2d470f8eea4d36..7694669f91faa7 100644
--- a/playground/external/vite.config.js
+++ b/playground/external/vite.config.js
@@ -12,7 +12,7 @@ const serveNpmCodeDirectlyMiddleware = async (req, res, next) => {
const code = await fs.readFile(
new URL(`./node_modules/${file}`, import.meta.url),
)
- res.setHeader('Content-Type', 'application/javascript')
+ res.setHeader('Content-Type', 'text/javascript')
res.end(code)
return
}
diff --git a/playground/fs-serve/__tests__/base/fs-serve-base.spec.ts b/playground/fs-serve/__tests__/base/fs-serve-base.spec.ts
index 4660fafcc8031f..51e87ccd3b57cf 100644
--- a/playground/fs-serve/__tests__/base/fs-serve-base.spec.ts
+++ b/playground/fs-serve/__tests__/base/fs-serve-base.spec.ts
@@ -92,7 +92,13 @@ describe.runIf(isServe)('main', () => {
})
test('denied', async () => {
- expect(await page.textContent('.unsafe-dotenv')).toBe('404')
+ expect(await page.textContent('.unsafe-dotenv')).toBe('403')
+ })
+
+ test('denied EnV casing', async () => {
+ // It is 403 in case insensitive system, 404 in others
+ const code = await page.textContent('.unsafe-dotEnV-casing')
+ expect(code === '403' || code === '404').toBeTruthy()
})
})
diff --git a/playground/fs-serve/__tests__/fs-serve.spec.ts b/playground/fs-serve/__tests__/fs-serve.spec.ts
index 86e030326ea420..9d9d4c6ec80e54 100644
--- a/playground/fs-serve/__tests__/fs-serve.spec.ts
+++ b/playground/fs-serve/__tests__/fs-serve.spec.ts
@@ -92,7 +92,13 @@ describe.runIf(isServe)('main', () => {
})
test('denied', async () => {
- expect(await page.textContent('.unsafe-dotenv')).toBe('404')
+ expect(await page.textContent('.unsafe-dotenv')).toBe('403')
+ })
+
+ test('denied EnV casing', async () => {
+ // It is 403 in case insensitive system, 404 in others
+ const code = await page.textContent('.unsafe-dotEnV-casing')
+ expect(code === '403' || code === '404').toBeTruthy()
})
})
diff --git a/playground/fs-serve/root/src/index.html b/playground/fs-serve/root/src/index.html
index 5de6804a7658de..06bee3f8671949 100644
--- a/playground/fs-serve/root/src/index.html
+++ b/playground/fs-serve/root/src/index.html
@@ -45,6 +45,7 @@ Nested Entry
Denied
+
+
+
diff --git a/playground/hmr-ssr/accept-exports/main-accepted/callback.ts b/playground/hmr-ssr/accept-exports/main-accepted/callback.ts
new file mode 100644
index 00000000000000..8dc4c42a24db99
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-accepted/callback.ts
@@ -0,0 +1,7 @@
+export const x = 'X'
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['x'], (m) => {
+ log(`reloaded >>> ${m.x}`)
+ })
+}
diff --git a/playground/hmr-ssr/accept-exports/main-accepted/dep.ts b/playground/hmr-ssr/accept-exports/main-accepted/dep.ts
new file mode 100644
index 00000000000000..b9f67fd33a75f8
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-accepted/dep.ts
@@ -0,0 +1 @@
+export default 'dep0'
diff --git a/playground/hmr-ssr/accept-exports/main-accepted/index.ts b/playground/hmr-ssr/accept-exports/main-accepted/index.ts
new file mode 100644
index 00000000000000..2e798337101607
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-accepted/index.ts
@@ -0,0 +1 @@
+import './main-accepted'
diff --git a/playground/hmr-ssr/accept-exports/main-accepted/main-accepted.ts b/playground/hmr-ssr/accept-exports/main-accepted/main-accepted.ts
new file mode 100644
index 00000000000000..74afdbfa7e378c
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-accepted/main-accepted.ts
@@ -0,0 +1,7 @@
+import def, { a } from './target'
+import { x } from './callback'
+
+// we don't want to pollute other checks' logs...
+if (0 > 1) log(x)
+
+log(`>>>>>> ${a} ${def}`)
diff --git a/playground/hmr-ssr/accept-exports/main-accepted/target.ts b/playground/hmr-ssr/accept-exports/main-accepted/target.ts
new file mode 100644
index 00000000000000..c4826524c3c83d
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-accepted/target.ts
@@ -0,0 +1,16 @@
+import dep from './dep'
+
+export const a = 'A0'
+
+const bValue = 'B0'
+export { bValue as b }
+
+const def = 'D0'
+
+export default def
+
+log(`<<<<<< ${a} ${bValue} ${def} ; ${dep}`)
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['a', 'default'])
+}
diff --git a/playground/hmr-ssr/accept-exports/main-non-accepted/default.ts b/playground/hmr-ssr/accept-exports/main-non-accepted/default.ts
new file mode 100644
index 00000000000000..6ffaecaf43c588
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-non-accepted/default.ts
@@ -0,0 +1,11 @@
+export const x = 'y'
+
+const def = 'def0'
+
+export default def
+
+log(`<<< default: ${def}`)
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['x'])
+}
diff --git a/playground/hmr-ssr/accept-exports/main-non-accepted/dep.ts b/playground/hmr-ssr/accept-exports/main-non-accepted/dep.ts
new file mode 100644
index 00000000000000..b9f67fd33a75f8
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-non-accepted/dep.ts
@@ -0,0 +1 @@
+export default 'dep0'
diff --git a/playground/hmr-ssr/accept-exports/main-non-accepted/index.ts b/playground/hmr-ssr/accept-exports/main-non-accepted/index.ts
new file mode 100644
index 00000000000000..3841d7997c4c26
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-non-accepted/index.ts
@@ -0,0 +1 @@
+import './main-non-accepted.ts'
diff --git a/playground/hmr-ssr/accept-exports/main-non-accepted/main-non-accepted.ts b/playground/hmr-ssr/accept-exports/main-non-accepted/main-non-accepted.ts
new file mode 100644
index 00000000000000..a159ced50a7f50
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-non-accepted/main-non-accepted.ts
@@ -0,0 +1,4 @@
+import { a } from './named'
+import def from './default'
+
+log(`>>>>>> ${a} ${def}`)
diff --git a/playground/hmr-ssr/accept-exports/main-non-accepted/named.ts b/playground/hmr-ssr/accept-exports/main-non-accepted/named.ts
new file mode 100644
index 00000000000000..435d3c8cb50ae8
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/main-non-accepted/named.ts
@@ -0,0 +1,11 @@
+import dep from './dep'
+
+export const a = 'A0'
+
+export const b = 'B0'
+
+log(`<<< named: ${a} ; ${dep}`)
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['b'])
+}
diff --git a/playground/hmr-ssr/accept-exports/reexports.bak/accept-named.ts b/playground/hmr-ssr/accept-exports/reexports.bak/accept-named.ts
new file mode 100644
index 00000000000000..1c45a7c358452e
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/reexports.bak/accept-named.ts
@@ -0,0 +1,10 @@
+export { a, b } from './source'
+
+if (import.meta.hot) {
+ // import.meta.hot.accept('./source', (m) => {
+ // log(`accept-named reexport:${m.a},${m.b}`)
+ // })
+ import.meta.hot.acceptExports('a', (m) => {
+ log(`accept-named reexport:${m.a},${m.b}`)
+ })
+}
diff --git a/playground/hmr-ssr/accept-exports/reexports.bak/index.html b/playground/hmr-ssr/accept-exports/reexports.bak/index.html
new file mode 100644
index 00000000000000..241054bca8256f
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/reexports.bak/index.html
@@ -0,0 +1 @@
+
diff --git a/playground/hmr-ssr/accept-exports/reexports.bak/reexports.ts b/playground/hmr-ssr/accept-exports/reexports.bak/reexports.ts
new file mode 100644
index 00000000000000..659901c42c7149
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/reexports.bak/reexports.ts
@@ -0,0 +1,5 @@
+import { a } from './accept-named'
+
+log('accept-named:' + a)
+
+log('>>> ready')
diff --git a/playground/hmr-ssr/accept-exports/reexports.bak/source.ts b/playground/hmr-ssr/accept-exports/reexports.bak/source.ts
new file mode 100644
index 00000000000000..7f736004a8e9fa
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/reexports.bak/source.ts
@@ -0,0 +1,2 @@
+export const a = 'a0'
+export const b = 'b0'
diff --git a/playground/hmr-ssr/accept-exports/side-effects/index.ts b/playground/hmr-ssr/accept-exports/side-effects/index.ts
new file mode 100644
index 00000000000000..8a44ded37ba337
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/side-effects/index.ts
@@ -0,0 +1 @@
+import './side-effects.ts'
diff --git a/playground/hmr-ssr/accept-exports/side-effects/side-effects.ts b/playground/hmr-ssr/accept-exports/side-effects/side-effects.ts
new file mode 100644
index 00000000000000..f4abb02fb2b47e
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/side-effects/side-effects.ts
@@ -0,0 +1,13 @@
+export const x = 'x'
+
+export const y = 'y'
+
+export default 'z'
+
+log('>>> side FX')
+
+globalThis.__HMR__['.app'] = 'hey'
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['default'])
+}
diff --git a/playground/hmr-ssr/accept-exports/star-imports/deps-all-accepted.ts b/playground/hmr-ssr/accept-exports/star-imports/deps-all-accepted.ts
new file mode 100644
index 00000000000000..bf935ebc878609
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/star-imports/deps-all-accepted.ts
@@ -0,0 +1,14 @@
+export const a = 'a0'
+
+export const b = 'b0'
+
+const aliased = 'c0'
+export { aliased as c }
+
+export default 'default0'
+
+log(`all >>>>>> ${a}, ${b}, ${aliased}`)
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['a', 'b', 'c', 'default'])
+}
diff --git a/playground/hmr-ssr/accept-exports/star-imports/deps-some-accepted.ts b/playground/hmr-ssr/accept-exports/star-imports/deps-some-accepted.ts
new file mode 100644
index 00000000000000..04469868392dc3
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/star-imports/deps-some-accepted.ts
@@ -0,0 +1,14 @@
+export const a = 'a0'
+
+export const b = 'b0'
+
+const aliased = 'c0'
+export { aliased as c }
+
+export default 'default0'
+
+log(`some >>>>>> ${a}, ${b}, ${aliased}`)
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports(['a', 'b', 'default'])
+}
diff --git a/playground/hmr-ssr/accept-exports/star-imports/index.ts b/playground/hmr-ssr/accept-exports/star-imports/index.ts
new file mode 100644
index 00000000000000..d98700b239a3df
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/star-imports/index.ts
@@ -0,0 +1 @@
+import './star-imports.ts'
diff --git a/playground/hmr-ssr/accept-exports/star-imports/star-imports.ts b/playground/hmr-ssr/accept-exports/star-imports/star-imports.ts
new file mode 100644
index 00000000000000..228622f9ab85b3
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/star-imports/star-imports.ts
@@ -0,0 +1,6 @@
+import * as all from './deps-all-accepted'
+import * as some from './deps-some-accepted'
+
+log('loaded:all:' + all.a + all.b + all.c + all.default)
+log('loaded:some:' + some.a + some.b + some.c + some.default)
+log('>>> ready <<<')
diff --git a/playground/hmr-ssr/accept-exports/unused-exports/index.html b/playground/hmr-ssr/accept-exports/unused-exports/index.html
new file mode 100644
index 00000000000000..8998d3ce4581ee
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/unused-exports/index.html
@@ -0,0 +1 @@
+
diff --git a/playground/hmr-ssr/accept-exports/unused-exports/index.ts b/playground/hmr-ssr/accept-exports/unused-exports/index.ts
new file mode 100644
index 00000000000000..ffd430893843fd
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/unused-exports/index.ts
@@ -0,0 +1,4 @@
+import './unused'
+import { foo } from './used'
+
+log('used:' + foo)
diff --git a/playground/hmr-ssr/accept-exports/unused-exports/unused.ts b/playground/hmr-ssr/accept-exports/unused-exports/unused.ts
new file mode 100644
index 00000000000000..1462ed6101bba6
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/unused-exports/unused.ts
@@ -0,0 +1,11 @@
+export const x = 'x'
+
+export const y = 'y'
+
+export default 'z'
+
+log('-- unused --')
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports([])
+}
diff --git a/playground/hmr-ssr/accept-exports/unused-exports/used.ts b/playground/hmr-ssr/accept-exports/unused-exports/used.ts
new file mode 100644
index 00000000000000..a4a093f726e325
--- /dev/null
+++ b/playground/hmr-ssr/accept-exports/unused-exports/used.ts
@@ -0,0 +1,9 @@
+export const foo = 'foo0'
+
+export const bar = 'bar0'
+
+log('-- used --')
+
+if (import.meta.hot) {
+ import.meta.hot.acceptExports([])
+}
diff --git a/playground/hmr-ssr/circular/index.js b/playground/hmr-ssr/circular/index.js
new file mode 100644
index 00000000000000..a78188ea88f93c
--- /dev/null
+++ b/playground/hmr-ssr/circular/index.js
@@ -0,0 +1,7 @@
+import { msg } from './mod-a'
+
+globalThis.__HMR__['.circular'] = msg
+
+if (import.meta.hot) {
+ import.meta.hot.accept()
+}
diff --git a/playground/hmr-ssr/circular/mod-a.js b/playground/hmr-ssr/circular/mod-a.js
new file mode 100644
index 00000000000000..def8466da2e489
--- /dev/null
+++ b/playground/hmr-ssr/circular/mod-a.js
@@ -0,0 +1,5 @@
+export const value = 'mod-a'
+
+import { value as _value } from './mod-b'
+
+export const msg = `mod-a -> ${_value}`
diff --git a/playground/hmr-ssr/circular/mod-b.js b/playground/hmr-ssr/circular/mod-b.js
new file mode 100644
index 00000000000000..fe0125f33787b7
--- /dev/null
+++ b/playground/hmr-ssr/circular/mod-b.js
@@ -0,0 +1,3 @@
+import { value as _value } from './mod-c'
+
+export const value = `mod-b -> ${_value}`
diff --git a/playground/hmr-ssr/circular/mod-c.js b/playground/hmr-ssr/circular/mod-c.js
new file mode 100644
index 00000000000000..4f9de5b0efcc29
--- /dev/null
+++ b/playground/hmr-ssr/circular/mod-c.js
@@ -0,0 +1,11 @@
+import { value as _value } from './mod-a'
+
+// Should error as `_value` is not defined yet within the circular imports
+let __value
+try {
+ __value = `${_value} (expected no error)`
+} catch {
+ __value = 'mod-a (unexpected error)'
+}
+
+export const value = `mod-c -> ${__value}`
diff --git a/playground/hmr-ssr/counter/dep.ts b/playground/hmr-ssr/counter/dep.ts
new file mode 100644
index 00000000000000..e15e77f4e4743f
--- /dev/null
+++ b/playground/hmr-ssr/counter/dep.ts
@@ -0,0 +1,4 @@
+// This file is never loaded
+if (import.meta.hot) {
+ import.meta.hot.accept(() => {})
+}
diff --git a/playground/hmr-ssr/counter/index.ts b/playground/hmr-ssr/counter/index.ts
new file mode 100644
index 00000000000000..66edcdbe737ed1
--- /dev/null
+++ b/playground/hmr-ssr/counter/index.ts
@@ -0,0 +1,11 @@
+let count = 0
+export function increment() {
+ count++
+}
+export function getCount() {
+ return count
+}
+// @ts-expect-error not used but this is to test that it works
+function neverCalled() {
+ import('./dep')
+}
diff --git a/playground/hmr-ssr/customFile.js b/playground/hmr-ssr/customFile.js
new file mode 100644
index 00000000000000..7c9069974578e0
--- /dev/null
+++ b/playground/hmr-ssr/customFile.js
@@ -0,0 +1 @@
+export const msg = 'custom'
diff --git a/playground/hmr-ssr/event.d.ts b/playground/hmr-ssr/event.d.ts
new file mode 100644
index 00000000000000..1920d1e7aff076
--- /dev/null
+++ b/playground/hmr-ssr/event.d.ts
@@ -0,0 +1,17 @@
+import 'vite/types/customEvent'
+
+declare module 'vite/types/customEvent' {
+ interface CustomEventMap {
+ 'custom:foo': { msg: string }
+ 'custom:remote-add': { a: number; b: number }
+ 'custom:remote-add-result': { result: string }
+ }
+}
+
+declare global {
+ let log: (...msg: unknown[]) => void
+ let logger: {
+ error: (msg: string | Error) => void
+ debug: (...msg: unknown[]) => void
+ }
+}
diff --git a/playground/hmr-ssr/file-delete-restore/child.js b/playground/hmr-ssr/file-delete-restore/child.js
new file mode 100644
index 00000000000000..704c7d8c7e98cc
--- /dev/null
+++ b/playground/hmr-ssr/file-delete-restore/child.js
@@ -0,0 +1,11 @@
+import { rerender } from './runtime'
+
+export const value = 'child'
+
+if (import.meta.hot) {
+ import.meta.hot.accept((newMod) => {
+ if (!newMod) return
+
+ rerender({ child: newMod.value })
+ })
+}
diff --git a/playground/hmr-ssr/file-delete-restore/index.js b/playground/hmr-ssr/file-delete-restore/index.js
new file mode 100644
index 00000000000000..fa4908a32662ac
--- /dev/null
+++ b/playground/hmr-ssr/file-delete-restore/index.js
@@ -0,0 +1,4 @@
+import { render } from './runtime'
+import { childValue, parentValue } from './parent'
+
+render({ parent: parentValue, child: childValue })
diff --git a/playground/hmr-ssr/file-delete-restore/parent.js b/playground/hmr-ssr/file-delete-restore/parent.js
new file mode 100644
index 00000000000000..050bfa6d49b4c0
--- /dev/null
+++ b/playground/hmr-ssr/file-delete-restore/parent.js
@@ -0,0 +1,12 @@
+import { rerender } from './runtime'
+
+export const parentValue = 'parent'
+export { value as childValue } from './child'
+
+if (import.meta.hot) {
+ import.meta.hot.accept((newMod) => {
+ if (!newMod) return
+
+ rerender({ child: newMod.childValue, parent: newMod.parentValue })
+ })
+}
diff --git a/playground/hmr-ssr/file-delete-restore/runtime.js b/playground/hmr-ssr/file-delete-restore/runtime.js
new file mode 100644
index 00000000000000..a3383fcf8ed777
--- /dev/null
+++ b/playground/hmr-ssr/file-delete-restore/runtime.js
@@ -0,0 +1,15 @@
+let state = {}
+
+export const render = (newState) => {
+ state = newState
+ apply()
+}
+
+export const rerender = (updates) => {
+ state = { ...state, ...updates }
+ apply()
+}
+
+const apply = () => {
+ globalThis.__HMR__['.file-delete-restore'] = Object.values(state).join(':')
+}
diff --git a/playground/hmr-ssr/hmr.ts b/playground/hmr-ssr/hmr.ts
new file mode 100644
index 00000000000000..cd88dbd47bb6c6
--- /dev/null
+++ b/playground/hmr-ssr/hmr.ts
@@ -0,0 +1,112 @@
+import { virtual } from 'virtual:file'
+import { foo as depFoo, nestedFoo } from './hmrDep'
+import './importing-updated'
+import './invalidation/parent'
+import './file-delete-restore'
+import './optional-chaining/parent'
+import './intermediate-file-delete'
+import './circular'
+import './queries'
+import logo from './logo.svg'
+import { msg as softInvalidationMsg } from './soft-invalidation'
+
+export const foo = 1
+text('.app', foo)
+text('.dep', depFoo)
+text('.nested', nestedFoo)
+text('.virtual', virtual)
+text('.soft-invalidation', softInvalidationMsg)
+setLogo(logo)
+
+globalThis.__HMR__['virtual:increment'] = () => {
+ if (import.meta.hot) {
+ import.meta.hot.send('virtual:increment')
+ }
+}
+
+if (import.meta.hot) {
+ import.meta.hot.accept(({ foo }) => {
+ log('(self-accepting 1) foo is now:', foo)
+ })
+
+ import.meta.hot.accept(({ foo }) => {
+ log('(self-accepting 2) foo is now:', foo)
+ })
+
+ const handleDep = (type, newFoo, newNestedFoo) => {
+ log(`(${type}) foo is now: ${newFoo}`)
+ log(`(${type}) nested foo is now: ${newNestedFoo}`)
+ text('.dep', newFoo)
+ text('.nested', newNestedFoo)
+ }
+
+ import.meta.hot.accept('./logo.svg', (newUrl) => {
+ setLogo(newUrl.default)
+ log('Logo updated', newUrl.default)
+ })
+
+ import.meta.hot.accept('./hmrDep', ({ foo, nestedFoo }) => {
+ handleDep('single dep', foo, nestedFoo)
+ })
+
+ import.meta.hot.accept(['./hmrDep'], ([{ foo, nestedFoo }]) => {
+ handleDep('multi deps', foo, nestedFoo)
+ })
+
+ import.meta.hot.dispose(() => {
+ log(`foo was:`, foo)
+ })
+
+ import.meta.hot.on('vite:afterUpdate', (event) => {
+ log(`>>> vite:afterUpdate -- ${event.type}`)
+ })
+
+ import.meta.hot.on('vite:beforeUpdate', (event) => {
+ log(`>>> vite:beforeUpdate -- ${event.type}`)
+
+ const cssUpdate = event.updates.find(
+ (update) =>
+ update.type === 'css-update' && update.path.includes('global.css'),
+ )
+ if (cssUpdate) {
+ log('CSS updates are not supported in SSR')
+ }
+ })
+
+ import.meta.hot.on('vite:error', (event) => {
+ log(`>>> vite:error -- ${event.err.message}`)
+ })
+
+ import.meta.hot.on('vite:invalidate', ({ path }) => {
+ log(`>>> vite:invalidate -- ${path}`)
+ })
+
+ import.meta.hot.on('custom:foo', ({ msg }) => {
+ text('.custom', msg)
+ })
+
+ import.meta.hot.on('custom:remove', removeCb)
+
+ // send custom event to server to calculate 1 + 2
+ import.meta.hot.send('custom:remote-add', { a: 1, b: 2 })
+ import.meta.hot.on('custom:remote-add-result', ({ result }) => {
+ text('.custom-communication', result)
+ })
+}
+
+function text(el, text) {
+ hmr(el, text)
+}
+
+function setLogo(src) {
+ hmr('#logo', src)
+}
+
+function removeCb({ msg }) {
+ text('.toRemove', msg)
+ import.meta.hot.off('custom:remove', removeCb)
+}
+
+function hmr(key: string, value: unknown) {
+ ;(globalThis.__HMR__ as any)[key] = String(value)
+}
diff --git a/playground/hmr-ssr/hmrDep.js b/playground/hmr-ssr/hmrDep.js
new file mode 100644
index 00000000000000..c4c434146afc41
--- /dev/null
+++ b/playground/hmr-ssr/hmrDep.js
@@ -0,0 +1,14 @@
+export const foo = 1
+export { foo as nestedFoo } from './hmrNestedDep'
+
+if (import.meta.hot) {
+ const data = import.meta.hot.data
+ if ('fromDispose' in data) {
+ log(`(dep) foo from dispose: ${data.fromDispose}`)
+ }
+
+ import.meta.hot.dispose((data) => {
+ log(`(dep) foo was: ${foo}`)
+ data.fromDispose = foo
+ })
+}
diff --git a/playground/hmr-ssr/hmrNestedDep.js b/playground/hmr-ssr/hmrNestedDep.js
new file mode 100644
index 00000000000000..766766a6260612
--- /dev/null
+++ b/playground/hmr-ssr/hmrNestedDep.js
@@ -0,0 +1 @@
+export const foo = 1
diff --git a/playground/hmr-ssr/importedVirtual.js b/playground/hmr-ssr/importedVirtual.js
new file mode 100644
index 00000000000000..8b0b417bc3113d
--- /dev/null
+++ b/playground/hmr-ssr/importedVirtual.js
@@ -0,0 +1 @@
+export const virtual = '[success]'
diff --git a/playground/hmr-ssr/importing-updated/a.js b/playground/hmr-ssr/importing-updated/a.js
new file mode 100644
index 00000000000000..e52ef8d3dce2d7
--- /dev/null
+++ b/playground/hmr-ssr/importing-updated/a.js
@@ -0,0 +1,9 @@
+const val = 'a0'
+globalThis.__HMR__['.importing-reloaded'] ??= ''
+globalThis.__HMR__['.importing-reloaded'] += `a.js: ${val}
`
+
+export default val
+
+if (import.meta.hot) {
+ import.meta.hot.accept()
+}
diff --git a/playground/hmr-ssr/importing-updated/b.js b/playground/hmr-ssr/importing-updated/b.js
new file mode 100644
index 00000000000000..d309a396a3c56d
--- /dev/null
+++ b/playground/hmr-ssr/importing-updated/b.js
@@ -0,0 +1,10 @@
+import a from './a.js'
+
+const val = `b0,${a}`
+
+globalThis.__HMR__['.importing-reloaded'] ??= ''
+globalThis.__HMR__['.importing-reloaded'] += `b.js: ${val}
`
+
+if (import.meta.hot) {
+ import.meta.hot.accept()
+}
diff --git a/playground/hmr-ssr/importing-updated/index.js b/playground/hmr-ssr/importing-updated/index.js
new file mode 100644
index 00000000000000..0cc74268d385de
--- /dev/null
+++ b/playground/hmr-ssr/importing-updated/index.js
@@ -0,0 +1,2 @@
+import './a'
+import './b'
diff --git a/playground/hmr-ssr/intermediate-file-delete/display.js b/playground/hmr-ssr/intermediate-file-delete/display.js
new file mode 100644
index 00000000000000..3ab1936b0c9009
--- /dev/null
+++ b/playground/hmr-ssr/intermediate-file-delete/display.js
@@ -0,0 +1 @@
+export const displayCount = (count) => `count is ${count}`
diff --git a/playground/hmr-ssr/intermediate-file-delete/index.js b/playground/hmr-ssr/intermediate-file-delete/index.js
new file mode 100644
index 00000000000000..30435b7606e273
--- /dev/null
+++ b/playground/hmr-ssr/intermediate-file-delete/index.js
@@ -0,0 +1,21 @@
+import { displayCount } from './re-export.js'
+
+const incrementValue = () =>
+ globalThis.__HMR__['.intermediate-file-delete-increment']
+
+const render = () => {
+ globalThis.__HMR__['.intermediate-file-delete-display'] = displayCount(
+ Number(incrementValue()),
+ )
+}
+
+render()
+
+globalThis.__HMR__['.delete-intermediate-file'] = () => {
+ globalThis.__HMR__['.intermediate-file-delete-increment'] = `${
+ Number(incrementValue()) + 1
+ }`
+ render()
+}
+
+if (import.meta.hot) import.meta.hot.accept()
diff --git a/playground/hmr-ssr/intermediate-file-delete/re-export.js b/playground/hmr-ssr/intermediate-file-delete/re-export.js
new file mode 100644
index 00000000000000..b2dade525c0675
--- /dev/null
+++ b/playground/hmr-ssr/intermediate-file-delete/re-export.js
@@ -0,0 +1 @@
+export * from './display.js'
diff --git a/playground/hmr-ssr/invalidation/child.js b/playground/hmr-ssr/invalidation/child.js
new file mode 100644
index 00000000000000..b424e2f83c3233
--- /dev/null
+++ b/playground/hmr-ssr/invalidation/child.js
@@ -0,0 +1,9 @@
+if (import.meta.hot) {
+ // Need to accept, to register a callback for HMR
+ import.meta.hot.accept(() => {
+ // Trigger HMR in importers
+ import.meta.hot.invalidate()
+ })
+}
+
+export const value = 'child'
diff --git a/playground/hmr-ssr/invalidation/parent.js b/playground/hmr-ssr/invalidation/parent.js
new file mode 100644
index 00000000000000..80f80e58348da8
--- /dev/null
+++ b/playground/hmr-ssr/invalidation/parent.js
@@ -0,0 +1,9 @@
+import { value } from './child'
+
+if (import.meta.hot) {
+ import.meta.hot.accept()
+}
+
+log('(invalidation) parent is executing')
+
+globalThis.__HMR__['.invalidation'] = value
diff --git a/playground/hmr-ssr/logo.svg b/playground/hmr-ssr/logo.svg
new file mode 100644
index 00000000000000..a85344da4790b2
--- /dev/null
+++ b/playground/hmr-ssr/logo.svg
@@ -0,0 +1,3 @@
+
diff --git a/playground/hmr-ssr/missing-import/a.js b/playground/hmr-ssr/missing-import/a.js
new file mode 100644
index 00000000000000..fff5559cec149d
--- /dev/null
+++ b/playground/hmr-ssr/missing-import/a.js
@@ -0,0 +1,3 @@
+import 'missing-modules'
+
+log('missing test')
diff --git a/playground/hmr-ssr/missing-import/index.js b/playground/hmr-ssr/missing-import/index.js
new file mode 100644
index 00000000000000..5ad5ba12cc8619
--- /dev/null
+++ b/playground/hmr-ssr/missing-import/index.js
@@ -0,0 +1 @@
+import './main.js'
diff --git a/playground/hmr-ssr/missing-import/main.js b/playground/hmr-ssr/missing-import/main.js
new file mode 100644
index 00000000000000..999801e4dd1061
--- /dev/null
+++ b/playground/hmr-ssr/missing-import/main.js
@@ -0,0 +1 @@
+import './a.js'
diff --git a/playground/hmr-ssr/modules.d.ts b/playground/hmr-ssr/modules.d.ts
new file mode 100644
index 00000000000000..815c25568d5119
--- /dev/null
+++ b/playground/hmr-ssr/modules.d.ts
@@ -0,0 +1,11 @@
+declare module 'virtual:file' {
+ export const virtual: string
+}
+declare module '*?query1' {
+ const string: string
+ export default string
+}
+declare module '*?query2' {
+ const string: string
+ export default string
+}
diff --git a/playground/hmr-ssr/optional-chaining/child.js b/playground/hmr-ssr/optional-chaining/child.js
new file mode 100644
index 00000000000000..766766a6260612
--- /dev/null
+++ b/playground/hmr-ssr/optional-chaining/child.js
@@ -0,0 +1 @@
+export const foo = 1
diff --git a/playground/hmr-ssr/optional-chaining/parent.js b/playground/hmr-ssr/optional-chaining/parent.js
new file mode 100644
index 00000000000000..c4d9468bf67907
--- /dev/null
+++ b/playground/hmr-ssr/optional-chaining/parent.js
@@ -0,0 +1,8 @@
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
+import { foo } from './child'
+
+import.meta.hot?.accept('./child', ({ foo }) => {
+ log('(optional-chaining) child update')
+ globalThis.__HMR__['.optional-chaining'] = foo
+})
diff --git a/playground/hmr-ssr/package.json b/playground/hmr-ssr/package.json
new file mode 100644
index 00000000000000..52a5646e2da7a4
--- /dev/null
+++ b/playground/hmr-ssr/package.json
@@ -0,0 +1,12 @@
+{
+ "name": "@vitejs/test-hmr-ssr",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "debug": "node --inspect-brk ../../packages/vite/bin/vite",
+ "preview": "vite preview"
+ }
+}
diff --git a/playground/hmr-ssr/queries/index.js b/playground/hmr-ssr/queries/index.js
new file mode 100644
index 00000000000000..113eb1a079af40
--- /dev/null
+++ b/playground/hmr-ssr/queries/index.js
@@ -0,0 +1,9 @@
+import query1 from './multi-query?query1'
+import query2 from './multi-query?query2'
+
+hmr('query1', query1)
+hmr('query2', query2)
+
+function hmr(key, value) {
+ globalThis.__HMR__[key] = String(value)
+}
diff --git a/playground/hmr-ssr/queries/multi-query.js b/playground/hmr-ssr/queries/multi-query.js
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/playground/hmr-ssr/self-accept-within-circular/a.js b/playground/hmr-ssr/self-accept-within-circular/a.js
new file mode 100644
index 00000000000000..a559b739d9f253
--- /dev/null
+++ b/playground/hmr-ssr/self-accept-within-circular/a.js
@@ -0,0 +1,5 @@
+import { b } from './b'
+
+export const a = {
+ b,
+}
diff --git a/playground/hmr-ssr/self-accept-within-circular/b.js b/playground/hmr-ssr/self-accept-within-circular/b.js
new file mode 100644
index 00000000000000..4f5a135418728c
--- /dev/null
+++ b/playground/hmr-ssr/self-accept-within-circular/b.js
@@ -0,0 +1,7 @@
+import { c } from './c'
+
+const b = {
+ c,
+}
+
+export { b }
diff --git a/playground/hmr-ssr/self-accept-within-circular/c.js b/playground/hmr-ssr/self-accept-within-circular/c.js
new file mode 100644
index 00000000000000..47b6d494969917
--- /dev/null
+++ b/playground/hmr-ssr/self-accept-within-circular/c.js
@@ -0,0 +1,12 @@
+import './b'
+
+export const c = 'c'
+
+function render(content) {
+ globalThis.__HMR__['.self-accept-within-circular'] = content
+}
+render(c)
+
+import.meta.hot?.accept((nextExports) => {
+ render(nextExports.c)
+})
diff --git a/playground/hmr-ssr/self-accept-within-circular/index.js b/playground/hmr-ssr/self-accept-within-circular/index.js
new file mode 100644
index 00000000000000..d826a1226a5e66
--- /dev/null
+++ b/playground/hmr-ssr/self-accept-within-circular/index.js
@@ -0,0 +1,3 @@
+import { a } from './a'
+
+log(a)
diff --git a/playground/hmr-ssr/soft-invalidation/child.js b/playground/hmr-ssr/soft-invalidation/child.js
new file mode 100644
index 00000000000000..21ec276fc7f825
--- /dev/null
+++ b/playground/hmr-ssr/soft-invalidation/child.js
@@ -0,0 +1 @@
+export const foo = 'bar'
diff --git a/playground/hmr-ssr/soft-invalidation/index.js b/playground/hmr-ssr/soft-invalidation/index.js
new file mode 100644
index 00000000000000..f236a2579b0c24
--- /dev/null
+++ b/playground/hmr-ssr/soft-invalidation/index.js
@@ -0,0 +1,4 @@
+import { foo } from './child'
+
+// @ts-expect-error global
+export const msg = `soft-invalidation/index.js is transformed ${__TRANSFORM_COUNT__} times. child is ${foo}`
diff --git a/playground/hmr-ssr/vite.config.ts b/playground/hmr-ssr/vite.config.ts
new file mode 100644
index 00000000000000..5b4a7c17fe27cb
--- /dev/null
+++ b/playground/hmr-ssr/vite.config.ts
@@ -0,0 +1,84 @@
+import { defineConfig } from 'vite'
+import type { Plugin } from 'vite'
+
+export default defineConfig({
+ experimental: {
+ hmrPartialAccept: true,
+ },
+ plugins: [
+ {
+ name: 'mock-custom',
+ async handleHotUpdate({ file, read, server }) {
+ if (file.endsWith('customFile.js')) {
+ const content = await read()
+ const msg = content.match(/export const msg = '(\w+)'/)[1]
+ server.hot.send('custom:foo', { msg })
+ server.hot.send('custom:remove', { msg })
+ }
+ },
+ configureServer(server) {
+ server.hot.on('custom:remote-add', ({ a, b }, client) => {
+ client.send('custom:remote-add-result', { result: a + b })
+ })
+ },
+ },
+ virtualPlugin(),
+ transformCountPlugin(),
+ queryPlugin(),
+ ],
+})
+
+function virtualPlugin(): Plugin {
+ let num = 0
+ return {
+ name: 'virtual-file',
+ resolveId(id, importer) {
+ if (id === 'virtual:file' || id === '\0virtual:file') {
+ return '\0virtual:file'
+ }
+ },
+ load(id) {
+ if (id === '\0virtual:file') {
+ return `\
+import { virtual as _virtual } from "/importedVirtual.js";
+export const virtual = _virtual + '${num}';`
+ }
+ },
+ configureServer(server) {
+ server.hot.on('virtual:increment', async () => {
+ const mod = await server.moduleGraph.getModuleByUrl('\0virtual:file')
+ if (mod) {
+ num++
+ server.reloadModule(mod)
+ }
+ })
+ },
+ }
+}
+
+function queryPlugin(): Plugin {
+ return {
+ name: 'query-resolver',
+ transform(code, id) {
+ if (id.includes('?query1')) {
+ return `export default ${JSON.stringify(code + 'query1')}`
+ }
+
+ if (id.includes('?query2')) {
+ return `export default ${JSON.stringify(code + 'query2')}`
+ }
+ },
+ }
+}
+
+function transformCountPlugin(): Plugin {
+ let num = 0
+ return {
+ name: 'transform-count',
+ transform(code) {
+ if (code.includes('__TRANSFORM_COUNT__')) {
+ return code.replace('__TRANSFORM_COUNT__', String(++num))
+ }
+ },
+ }
+}
diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts
index e4c7825c5a5d2e..0d95557aa65fb3 100644
--- a/playground/hmr/__tests__/hmr.spec.ts
+++ b/playground/hmr/__tests__/hmr.spec.ts
@@ -5,6 +5,7 @@ import {
browserLogs,
editFile,
getBg,
+ getColor,
isBuild,
page,
removeFile,
@@ -185,6 +186,17 @@ if (!isBuild) {
() => el.textContent(),
'soft-invalidation/index.js is transformed 1 times. child is updated',
)
+
+ editFile('soft-invalidation/index.js', (code) =>
+ code.replace('child is', 'child is now'),
+ )
+ editFile('soft-invalidation/child.js', (code) =>
+ code.replace('updated', 'updated?'),
+ )
+ await untilUpdated(
+ () => el.textContent(),
+ 'soft-invalidation/index.js is transformed 2 times. child is now updated?',
+ )
})
test('plugin hmr handler + custom event', async () => {
@@ -887,9 +899,9 @@ if (import.meta.hot) {
'cc',
)
expect(serverLogs.length).greaterThanOrEqual(1)
+ // Should still keep hmr update, but it'll error on the browser-side and will refresh itself.
// Match on full log not possible because of color markers
- expect(serverLogs.at(-1)!).toContain('page reload')
- expect(serverLogs.at(-1)!).toContain('(circular imports)')
+ expect(serverLogs.at(-1)!).toContain('hmr update')
})
test('hmr should not reload if no accepted within circular imported files', async () => {
@@ -919,4 +931,11 @@ if (import.meta.hot) {
)
await untilUpdated(() => el.evaluate((it) => `${it.clientHeight}`), '40')
})
+
+ test('CSS HMR with this.addWatchFile', async () => {
+ await page.goto(viteTestUrl + '/css-deps/index.html')
+ expect(await getColor('.css-deps')).toMatch('red')
+ editFile('css-deps/dep.js', (code) => code.replace(`red`, `green`))
+ await untilUpdated(() => getColor('.css-deps'), 'green')
+ })
}
diff --git a/playground/hmr/css-deps/dep.js b/playground/hmr/css-deps/dep.js
new file mode 100644
index 00000000000000..07f62c4241209d
--- /dev/null
+++ b/playground/hmr/css-deps/dep.js
@@ -0,0 +1,8 @@
+// This file is depended by main.css via this.addWatchFile
+export const color = 'red'
+
+// Self-accept so that updating this file would not trigger a page reload.
+// We only want to observe main.css updating itself.
+if (import.meta.hot) {
+ import.meta.hot.accept()
+}
diff --git a/playground/hmr/css-deps/index.html b/playground/hmr/css-deps/index.html
new file mode 100644
index 00000000000000..6ff27f56556e00
--- /dev/null
+++ b/playground/hmr/css-deps/index.html
@@ -0,0 +1,8 @@
+should be red
+
+
diff --git a/playground/hmr/css-deps/main.css b/playground/hmr/css-deps/main.css
new file mode 100644
index 00000000000000..65cea880bd580e
--- /dev/null
+++ b/playground/hmr/css-deps/main.css
@@ -0,0 +1,3 @@
+.css-deps {
+ color: replaced;
+}
diff --git a/playground/hmr/vite.config.ts b/playground/hmr/vite.config.ts
index 9ae2186d1b8b5e..b290ff60a3140d 100644
--- a/playground/hmr/vite.config.ts
+++ b/playground/hmr/vite.config.ts
@@ -1,3 +1,5 @@
+import fs from 'node:fs/promises'
+import path from 'node:path'
import { defineConfig } from 'vite'
import type { Plugin } from 'vite'
@@ -12,18 +14,19 @@ export default defineConfig({
if (file.endsWith('customFile.js')) {
const content = await read()
const msg = content.match(/export const msg = '(\w+)'/)[1]
- server.ws.send('custom:foo', { msg })
- server.ws.send('custom:remove', { msg })
+ server.hot.send('custom:foo', { msg })
+ server.hot.send('custom:remove', { msg })
}
},
configureServer(server) {
- server.ws.on('custom:remote-add', ({ a, b }, client) => {
+ server.hot.on('custom:remote-add', ({ a, b }, client) => {
client.send('custom:remote-add-result', { result: a + b })
})
},
},
virtualPlugin(),
transformCountPlugin(),
+ watchCssDepsPlugin(),
],
})
@@ -44,7 +47,7 @@ export const virtual = _virtual + '${num}';`
}
},
configureServer(server) {
- server.ws.on('virtual:increment', async () => {
+ server.hot.on('virtual:increment', async () => {
const mod = await server.moduleGraph.getModuleByUrl('\0virtual:file')
if (mod) {
num++
@@ -66,3 +69,20 @@ function transformCountPlugin(): Plugin {
},
}
}
+
+function watchCssDepsPlugin(): Plugin {
+ return {
+ name: 'watch-css-deps',
+ async transform(code, id) {
+ // replace the `replaced` identifier in the CSS file with the adjacent
+ // `dep.js` file's `color` variable.
+ if (id.includes('css-deps/main.css')) {
+ const depPath = path.resolve(__dirname, './css-deps/dep.js')
+ const dep = await fs.readFile(depPath, 'utf-8')
+ const color = dep.match(/color = '(.+?)'/)[1]
+ this.addWatchFile(depPath)
+ return code.replace('replaced', color)
+ }
+ },
+ }
+}
diff --git a/playground/html/vite.config.js b/playground/html/vite.config.js
index a7f3964cb165bc..003a591def4c1d 100644
--- a/playground/html/vite.config.js
+++ b/playground/html/vite.config.js
@@ -39,13 +39,14 @@ export default defineConfig({
serveFolder: resolve(__dirname, 'serve/folder/index.html'),
serveBothFile: resolve(__dirname, 'serve/both.html'),
serveBothFolder: resolve(__dirname, 'serve/both/index.html'),
+ write: resolve(__dirname, 'write.html'),
},
},
},
server: {
fs: {
- cachedChecks: true,
+ cachedChecks: false,
},
warmup: {
clientFiles: ['./warmup/*'],
diff --git a/playground/html/write.html b/playground/html/write.html
new file mode 100644
index 00000000000000..f85ce49c08dc8c
--- /dev/null
+++ b/playground/html/write.html
@@ -0,0 +1,3 @@
+
+
diff --git a/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts b/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts
index d4e6888ab5edd8..7c22274b2a3a66 100644
--- a/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts
+++ b/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts
@@ -31,6 +31,27 @@ if (!isBuild) {
`)
})
+ test('plugin return sourcemap with `sources: [""]`', async () => {
+ const res = await page.request.get(new URL('./zoo.js', page.url()).href)
+ const js = await res.text()
+ expect(js).toContain('// add comment')
+
+ const map = extractSourcemap(js)
+ expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
+ {
+ "mappings": "AAAA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;",
+ "sources": [
+ "zoo.js",
+ ],
+ "sourcesContent": [
+ "export const zoo = 'zoo'
+ ",
+ ],
+ "version": 3,
+ }
+ `)
+ })
+
test('js with inline sourcemap injected by a plugin', async () => {
const res = await page.request.get(
new URL('./foo-with-sourcemap.js', page.url()).href,
@@ -129,5 +150,10 @@ describe.runIf(isBuild)('build tests', () => {
"version": 3,
}
`)
+ //
+ const js = findAssetFile(/after-preload-dynamic.*\.js$/)
+ expect(js.trim().split('\n').at(-1)).toMatch(
+ /^\/\/# sourceMappingURL=after-preload-dynamic.*\.js\.map$/,
+ )
})
})
diff --git a/playground/js-sourcemap/importee-pkg/index.js b/playground/js-sourcemap/importee-pkg/index.js
index a96b15202fba44..d101d3b2599e8d 100644
--- a/playground/js-sourcemap/importee-pkg/index.js
+++ b/playground/js-sourcemap/importee-pkg/index.js
@@ -1,2 +1,2 @@
-// eslint-disable-next-line import/no-commonjs
+// eslint-disable-next-line i/no-commonjs
exports.foo = 'foo'
diff --git a/playground/js-sourcemap/index.html b/playground/js-sourcemap/index.html
index f669bf4fc102aa..80ee729d99ce90 100644
--- a/playground/js-sourcemap/index.html
+++ b/playground/js-sourcemap/index.html
@@ -7,3 +7,4 @@ JS Sourcemap
+
diff --git a/playground/js-sourcemap/package.json b/playground/js-sourcemap/package.json
index b002697756a24c..9cb0e2febb402b 100644
--- a/playground/js-sourcemap/package.json
+++ b/playground/js-sourcemap/package.json
@@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
- "@vitejs/test-importee-pkg": "file:importee-pkg"
+ "@vitejs/test-importee-pkg": "file:importee-pkg",
+ "magic-string": "^0.30.7"
}
}
diff --git a/playground/js-sourcemap/plugin-foo.js b/playground/js-sourcemap/plugin-foo.js
new file mode 100644
index 00000000000000..cb356468240d50
--- /dev/null
+++ b/playground/js-sourcemap/plugin-foo.js
@@ -0,0 +1 @@
+export const foo = 'foo'
diff --git a/playground/js-sourcemap/vite.config.js b/playground/js-sourcemap/vite.config.js
index efebbc5ca00dee..41484f2c99d0f3 100644
--- a/playground/js-sourcemap/vite.config.js
+++ b/playground/js-sourcemap/vite.config.js
@@ -1,8 +1,12 @@
import { defineConfig } from 'vite'
import transformFooWithInlineSourceMap from './foo-with-sourcemap-plugin'
+import { transformZooWithSourcemapPlugin } from './zoo-with-sourcemap-plugin'
export default defineConfig({
- plugins: [transformFooWithInlineSourceMap()],
+ plugins: [
+ transformFooWithInlineSourceMap(),
+ transformZooWithSourcemapPlugin(),
+ ],
build: {
sourcemap: true,
rollupOptions: {
diff --git a/playground/js-sourcemap/zoo-with-sourcemap-plugin.ts b/playground/js-sourcemap/zoo-with-sourcemap-plugin.ts
new file mode 100644
index 00000000000000..6c493278d166c8
--- /dev/null
+++ b/playground/js-sourcemap/zoo-with-sourcemap-plugin.ts
@@ -0,0 +1,18 @@
+import MagicString from 'magic-string'
+import type { Plugin } from 'vite'
+
+export const transformZooWithSourcemapPlugin: () => Plugin = () => ({
+ name: 'sourcemap',
+ transform(code, id) {
+ if (id.includes('zoo.js')) {
+ const ms = new MagicString(code)
+ ms.append('// add comment')
+ return {
+ code: ms.toString(),
+ // NOTE: MagicString without `filename` option generates
+ // a sourcemap with `sources: ['']` or `sources: [null]`
+ map: ms.generateMap({ hires: true }),
+ }
+ }
+ },
+})
diff --git a/playground/js-sourcemap/zoo.js b/playground/js-sourcemap/zoo.js
new file mode 100644
index 00000000000000..286343f930d3c3
--- /dev/null
+++ b/playground/js-sourcemap/zoo.js
@@ -0,0 +1 @@
+export const zoo = 'zoo'
diff --git a/playground/json/__tests__/csr/json.spec.ts b/playground/json/__tests__/csr/json-csr.spec.ts
similarity index 100%
rename from playground/json/__tests__/csr/json.spec.ts
rename to playground/json/__tests__/csr/json-csr.spec.ts
diff --git a/playground/json/__tests__/ssr/json.spec.ts b/playground/json/__tests__/ssr/json-ssr.spec.ts
similarity index 100%
rename from playground/json/__tests__/ssr/json.spec.ts
rename to playground/json/__tests__/ssr/json-ssr.spec.ts
diff --git a/playground/json/package.json b/playground/json/package.json
index e993a6b4075eba..8361d8deea98b9 100644
--- a/playground/json/package.json
+++ b/playground/json/package.json
@@ -15,6 +15,6 @@
"devDependencies": {
"@vitejs/test-json-module": "file:./json-module",
"express": "^4.18.2",
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
}
}
diff --git a/playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts b/playground/legacy/__tests__/client-and-ssr/legacy-client-legacy-ssr-sequential-builds.spec.ts
similarity index 100%
rename from playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts
rename to playground/legacy/__tests__/client-and-ssr/legacy-client-legacy-ssr-sequential-builds.spec.ts
diff --git a/playground/legacy/__tests__/legacy.spec.ts b/playground/legacy/__tests__/legacy.spec.ts
index b0cc061b289d6c..cc747761588ca5 100644
--- a/playground/legacy/__tests__/legacy.spec.ts
+++ b/playground/legacy/__tests__/legacy.spec.ts
@@ -56,8 +56,8 @@ test('generates assets', async () => {
'index-legacy: text/html',
'chunk-async: text/html',
'chunk-async-legacy: text/html',
- 'immutable-chunk: application/javascript',
- 'immutable-chunk-legacy: application/javascript',
+ 'immutable-chunk: text/javascript',
+ 'immutable-chunk-legacy: text/javascript',
'polyfills-legacy: text/html',
].join('\n')
: [
diff --git a/playground/legacy/__tests__/no-polyfills-no-systemjs/no-polyfills-no-systemjs.spec.ts b/playground/legacy/__tests__/no-polyfills-no-systemjs/legacy-no-polyfills-no-systemjs.spec.ts
similarity index 100%
rename from playground/legacy/__tests__/no-polyfills-no-systemjs/no-polyfills-no-systemjs.spec.ts
rename to playground/legacy/__tests__/no-polyfills-no-systemjs/legacy-no-polyfills-no-systemjs.spec.ts
diff --git a/playground/legacy/__tests__/no-polyfills/no-polyfills.spec.ts b/playground/legacy/__tests__/no-polyfills/legacy-no-polyfills.spec.ts
similarity index 100%
rename from playground/legacy/__tests__/no-polyfills/no-polyfills.spec.ts
rename to playground/legacy/__tests__/no-polyfills/legacy-no-polyfills.spec.ts
diff --git a/playground/legacy/__tests__/watch/styles-only-entry-watch.spec.ts b/playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts
similarity index 100%
rename from playground/legacy/__tests__/watch/styles-only-entry-watch.spec.ts
rename to playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts
diff --git a/playground/legacy/package.json b/playground/legacy/package.json
index c978521651f66b..6b9c1a285a978a 100644
--- a/playground/legacy/package.json
+++ b/playground/legacy/package.json
@@ -17,6 +17,6 @@
"devDependencies": {
"@vitejs/plugin-legacy": "workspace:*",
"express": "^4.18.2",
- "terser": "^5.26.0"
+ "terser": "^5.27.0"
}
}
diff --git a/playground/lib/__tests__/serve.ts b/playground/lib/__tests__/serve.ts
index 249bc7de4fec43..009bc3711825a6 100644
--- a/playground/lib/__tests__/serve.ts
+++ b/playground/lib/__tests__/serve.ts
@@ -27,6 +27,8 @@ export async function serve(): Promise<{ close(): Promise }> {
root: rootDir,
logLevel: 'silent',
server: {
+ port,
+ strictPort: true,
watch: {
usePolling: true,
interval: 100,
@@ -43,7 +45,7 @@ export async function serve(): Promise<{ close(): Promise }> {
).listen()
// use resolved port/base from server
const devBase = viteServer.config.base === '/' ? '' : viteServer.config.base
- setViteUrl(`http://localhost:${viteServer.config.server.port}${devBase}`)
+ setViteUrl(`http://localhost:${port}${devBase}`)
await page.goto(viteTestUrl)
return viteServer
diff --git a/playground/lib/package.json b/playground/lib/package.json
index a38060db5e43f2..5765873ebd503c 100644
--- a/playground/lib/package.json
+++ b/playground/lib/package.json
@@ -10,6 +10,6 @@
"preview": "vite preview"
},
"devDependencies": {
- "sirv": "^2.0.3"
+ "sirv": "^2.0.4"
}
}
diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json
index 695945ac4c31f9..0828b93d15344b 100644
--- a/playground/multiple-entrypoints/package.json
+++ b/playground/multiple-entrypoints/package.json
@@ -10,6 +10,6 @@
"preview": "vite preview"
},
"devDependencies": {
- "sass": "^1.69.5"
+ "sass": "^1.70.0"
}
}
diff --git a/playground/object-hooks/package.json b/playground/object-hooks/package.json
index 5650b073f6551c..5b5749fb5ab76b 100644
--- a/playground/object-hooks/package.json
+++ b/playground/object-hooks/package.json
@@ -10,6 +10,6 @@
"preview": "vite preview"
},
"dependencies": {
- "vue": "^3.3.11"
+ "vue": "^3.4.15"
}
}
diff --git a/playground/object-hooks/vite.config.ts b/playground/object-hooks/vite.config.ts
index 1024ce7c0be140..c0d80292463b6c 100644
--- a/playground/object-hooks/vite.config.ts
+++ b/playground/object-hooks/vite.config.ts
@@ -1,4 +1,4 @@
-/* eslint-disable import/no-nodejs-modules */
+/* eslint-disable i/no-nodejs-modules */
import assert from 'assert'
import { defineConfig } from 'vite'
diff --git a/playground/optimize-deps-no-discovery/__tests__/optimize-deps.spec.ts b/playground/optimize-deps-no-discovery/__tests__/optimize-deps-no-discovery.spec.ts
similarity index 100%
rename from playground/optimize-deps-no-discovery/__tests__/optimize-deps.spec.ts
rename to playground/optimize-deps-no-discovery/__tests__/optimize-deps-no-discovery.spec.ts
diff --git a/playground/optimize-deps-no-discovery/package.json b/playground/optimize-deps-no-discovery/package.json
index 31c5988844fb9d..84a49b29d9610c 100644
--- a/playground/optimize-deps-no-discovery/package.json
+++ b/playground/optimize-deps-no-discovery/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@vitejs/test-dep-no-discovery": "file:./dep-no-discovery",
- "vue": "^3.3.11",
+ "vue": "^3.4.15",
"vuex": "^4.1.0"
}
}
diff --git a/playground/optimize-deps-no-discovery/vite.config.js b/playground/optimize-deps-no-discovery/vite.config.js
index 4179400e2b1080..445f53fd121b0e 100644
--- a/playground/optimize-deps-no-discovery/vite.config.js
+++ b/playground/optimize-deps-no-discovery/vite.config.js
@@ -5,7 +5,6 @@ process.env.NODE_ENV = ''
export default defineConfig({
optimizeDeps: {
- disabled: false,
noDiscovery: true,
include: ['@vitejs/test-dep-no-discovery'],
},
@@ -13,9 +12,5 @@ export default defineConfig({
build: {
// to make tests faster
minify: false,
- // Avoid @rollup/plugin-commonjs
- commonjsOptions: {
- include: [],
- },
},
})
diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts
index 2468a6e9ae2ea9..f2ad3680cdac47 100644
--- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts
+++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts
@@ -172,7 +172,7 @@ test('vue + vuex', async () => {
// When we use the Rollup CommonJS plugin instead of esbuild prebundling,
// the esbuild plugins won't apply to dependencies
-test('esbuild-plugin', async () => {
+test.runIf(isServe)('esbuild-plugin', async () => {
await expectWithRetry(() => page.textContent('.esbuild-plugin')).toMatch(
`Hello from an esbuild plugin`,
)
diff --git a/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js b/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js
index 6ab4782816a21a..5868e14e44429e 100644
--- a/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js
+++ b/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js
@@ -1,6 +1,6 @@
'use strict'
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
const events = require('events')
module.exports = 'foo' in events ? 'pong' : ''
diff --git a/playground/optimize-deps/dep-with-builtin-module-cjs/index.js b/playground/optimize-deps/dep-with-builtin-module-cjs/index.js
index 82766ff59a3e8c..91c5f599da39fd 100644
--- a/playground/optimize-deps/dep-with-builtin-module-cjs/index.js
+++ b/playground/optimize-deps/dep-with-builtin-module-cjs/index.js
@@ -1,7 +1,7 @@
// no node: protocol intentionally
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
const fs = require('fs')
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
const path = require('path')
// NOTE: require destructure would error immediately because of how esbuild
diff --git a/playground/optimize-deps/dep-with-builtin-module-esm/index.js b/playground/optimize-deps/dep-with-builtin-module-esm/index.js
index b7b710ffaab58f..45defaf3f0565f 100644
--- a/playground/optimize-deps/dep-with-builtin-module-esm/index.js
+++ b/playground/optimize-deps/dep-with-builtin-module-esm/index.js
@@ -1,7 +1,7 @@
// no node: protocol intentionally
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
import { readFileSync } from 'fs'
-// eslint-disable-next-line import/no-nodejs-modules
+// eslint-disable-next-line i/no-nodejs-modules
import path from 'path'
// access from named import
diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json
index 788ec34cd50fe8..f012dba12f3d0e 100644
--- a/playground/optimize-deps/package.json
+++ b/playground/optimize-deps/package.json
@@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
- "axios": "^1.6.2",
+ "axios": "^1.6.7",
"clipboard": "^2.0.11",
"@vitejs/longfilename-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": "file:./longfilename",
"@vitejs/test-dep-alias-using-absolute-path": "file:./dep-alias-using-absolute-path",
@@ -36,12 +36,12 @@
"@vitejs/test-added-in-entries": "file:./added-in-entries",
"lodash-es": "^4.17.21",
"@vitejs/test-nested-exclude": "file:./nested-exclude",
- "phoenix": "^1.7.10",
+ "phoenix": "^1.7.11",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@vitejs/test-resolve-linked": "workspace:0.0.0",
"url": "^0.11.3",
- "vue": "^3.3.11",
+ "vue": "^3.4.15",
"vuex": "^4.1.0",
"lodash": "^4.17.21",
"lodash.clonedeep": "^4.5.0"
diff --git a/playground/optimize-deps/vite.config.js b/playground/optimize-deps/vite.config.js
index 8947bb66020b7c..10aabf56651c51 100644
--- a/playground/optimize-deps/vite.config.js
+++ b/playground/optimize-deps/vite.config.js
@@ -17,7 +17,6 @@ export default defineConfig({
},
},
optimizeDeps: {
- disabled: false,
include: [
'@vitejs/test-dep-linked-include',
'@vitejs/test-nested-exclude > @vitejs/test-nested-include',
@@ -49,10 +48,6 @@ export default defineConfig({
build: {
// to make tests faster
minify: false,
- // Avoid @rollup/plugin-commonjs
- commonjsOptions: {
- include: [],
- },
rollupOptions: {
onwarn(msg, warn) {
// filter `"Buffer" is not exported by "__vite-browser-external"` warning
diff --git a/playground/preload/package.json b/playground/preload/package.json
index 23313c4ce69dd5..1ae1d7769c82f1 100644
--- a/playground/preload/package.json
+++ b/playground/preload/package.json
@@ -18,7 +18,7 @@
"preview:preload-disabled": "vite preview --config vite.config-preload-disabled.ts"
},
"devDependencies": {
- "terser": "^5.26.0",
+ "terser": "^5.27.0",
"@vitejs/test-dep-a": "file:./dep-a",
"@vitejs/test-dep-including-a": "file:./dep-including-a"
}
diff --git a/playground/proxy-bypass/__tests__/proxy-hmr.spec.ts b/playground/proxy-bypass/__tests__/proxy-bypass.spec.ts
similarity index 100%
rename from playground/proxy-bypass/__tests__/proxy-hmr.spec.ts
rename to playground/proxy-bypass/__tests__/proxy-bypass.spec.ts
diff --git a/playground/proxy-bypass/index.html b/playground/proxy-bypass/index.html
index f14fde8e428635..366aaebb5651ae 100644
--- a/playground/proxy-bypass/index.html
+++ b/playground/proxy-bypass/index.html
@@ -1,2 +1,2 @@
root app
-
+
diff --git a/playground/proxy-bypass/vite.config.js b/playground/proxy-bypass/vite.config.js
index 13f7a6b42eaafb..0873583a5bfa56 100644
--- a/playground/proxy-bypass/vite.config.js
+++ b/playground/proxy-bypass/vite.config.js
@@ -4,7 +4,7 @@ export default defineConfig({
server: {
port: 9606,
proxy: {
- '/anotherApp': {
+ '/nonExistentApp': {
target: 'http://localhost:9607',
bypass: () => {
return false
diff --git a/playground/proxy-hmr/other-app/vite.config.js b/playground/proxy-hmr/other-app/vite.config.js
index 6e79541a31d806..9fb3ece5eb9c3c 100644
--- a/playground/proxy-hmr/other-app/vite.config.js
+++ b/playground/proxy-hmr/other-app/vite.config.js
@@ -3,7 +3,7 @@ import { defineConfig } from 'vite'
export default defineConfig({
base: '/anotherApp',
server: {
- port: 9607,
+ port: 9617,
strictPort: true,
},
})
diff --git a/playground/proxy-hmr/vite.config.js b/playground/proxy-hmr/vite.config.js
index cd418eacdb5d35..ef57a85757a82a 100644
--- a/playground/proxy-hmr/vite.config.js
+++ b/playground/proxy-hmr/vite.config.js
@@ -2,10 +2,10 @@ import { defineConfig } from 'vite'
export default defineConfig({
server: {
- port: 9606,
+ port: 9616,
proxy: {
'/anotherApp': {
- target: 'http://localhost:9607',
+ target: 'http://localhost:9617',
ws: true,
},
},
diff --git a/playground/resolve/browser-field/relative.js b/playground/resolve/browser-field/relative.js
index 492be3e96738eb..4629659ee6f843 100644
--- a/playground/resolve/browser-field/relative.js
+++ b/playground/resolve/browser-field/relative.js
@@ -1,4 +1,4 @@
-/* eslint-disable import/no-duplicates */
+/* eslint-disable i/no-duplicates */
import ra from './no-ext'
import rb from './no-ext.js' // no substitution
import rc from './ext'
diff --git a/playground/resolve/exports-with-module-condition/index.js b/playground/resolve/exports-with-module-condition/index.js
index 6465a8c55084c3..53b7bb50be4e8b 100644
--- a/playground/resolve/exports-with-module-condition/index.js
+++ b/playground/resolve/exports-with-module-condition/index.js
@@ -1,2 +1,2 @@
-/* eslint-disable import/no-commonjs */
+/* eslint-disable i/no-commonjs */
module.exports.msg = '[fail] exports with module condition (index.js)'
diff --git a/playground/resolve/package.json b/playground/resolve/package.json
index 612da0e816602a..ba67bcbc27adbb 100644
--- a/playground/resolve/package.json
+++ b/playground/resolve/package.json
@@ -18,7 +18,7 @@
"#other-pkg-slash/": "@vitejs/test-resolve-imports-pkg/nest/"
},
"dependencies": {
- "@babel/runtime": "^7.23.6",
+ "@babel/runtime": "^7.23.9",
"es5-ext": "0.10.62",
"normalize.css": "^8.0.1",
"@vitejs/test-require-pkg-with-module-field": "link:./require-pkg-with-module-field",
diff --git a/playground/ssr-deps/server.js b/playground/ssr-deps/server.js
index 05e86a863ea744..52134ea162a4ea 100644
--- a/playground/ssr-deps/server.js
+++ b/playground/ssr-deps/server.js
@@ -8,6 +8,13 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
const isTest = process.env.VITEST
+const noExternal = [
+ '@vitejs/test-no-external-cjs',
+ '@vitejs/test-import-builtin-cjs',
+ '@vitejs/test-no-external-css',
+ '@vitejs/test-external-entry',
+]
+
export async function createServer(root = process.cwd(), hmrPort) {
const resolve = (p) => path.resolve(__dirname, p)
@@ -35,18 +42,13 @@ export async function createServer(root = process.cwd(), hmrPort) {
},
appType: 'custom',
ssr: {
- noExternal: [
- '@vitejs/test-no-external-cjs',
- '@vitejs/test-import-builtin-cjs',
- '@vitejs/test-no-external-css',
- '@vitejs/test-external-entry',
- ],
+ noExternal,
external: [
'@vitejs/test-nested-external',
'@vitejs/test-external-entry/entry',
],
optimizeDeps: {
- disabled: 'build',
+ include: noExternal,
},
},
plugins: [
diff --git a/playground/ssr-html/__tests__/ssr-html.spec.ts b/playground/ssr-html/__tests__/ssr-html.spec.ts
index 50b6e9540426bc..fa9d12c7f6da41 100644
--- a/playground/ssr-html/__tests__/ssr-html.spec.ts
+++ b/playground/ssr-html/__tests__/ssr-html.spec.ts
@@ -1,6 +1,7 @@
import { execFile } from 'node:child_process'
import { promisify } from 'node:util'
import path from 'node:path'
+import { fileURLToPath } from 'node:url'
import fetch from 'node-fetch'
import { describe, expect, test } from 'vitest'
import { port } from './serve'
@@ -62,9 +63,9 @@ describe.runIf(isServe)('hmr', () => {
})
})
-describe.runIf(isServe)('stacktrace', () => {
- const execFileAsync = promisify(execFile)
+const execFileAsync = promisify(execFile)
+describe.runIf(isServe)('stacktrace', () => {
for (const ext of ['js', 'ts']) {
for (const sourcemapsEnabled of [false, true]) {
test(`stacktrace of ${ext} is correct when sourcemaps is${
@@ -98,3 +99,29 @@ describe.runIf(isServe)('stacktrace', () => {
}
}
})
+
+describe.runIf(isServe)('network-imports', () => {
+ test('with Vite SSR', async () => {
+ await execFileAsync(
+ 'node',
+ ['--experimental-network-imports', 'test-network-imports.js'],
+ {
+ cwd: fileURLToPath(new URL('..', import.meta.url)),
+ },
+ )
+ })
+
+ test('with Vite runtime', async () => {
+ await execFileAsync(
+ 'node',
+ [
+ '--experimental-network-imports',
+ 'test-network-imports.js',
+ '--runtime',
+ ],
+ {
+ cwd: fileURLToPath(new URL('..', import.meta.url)),
+ },
+ )
+ })
+})
diff --git a/playground/ssr-html/public/slash@3.0.0.js b/playground/ssr-html/public/slash@3.0.0.js
new file mode 100644
index 00000000000000..754082e97c4f82
--- /dev/null
+++ b/playground/ssr-html/public/slash@3.0.0.js
@@ -0,0 +1,5 @@
+/* eslint-disable */
+// copied from https://esm.sh/v133/slash@3.0.0/es2022/slash.mjs to reduce network issues in CI
+
+/* esm.sh - esbuild bundle(slash@3.0.0) es2022 production */
+var a=Object.create;var d=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),E=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},u=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of x(t))!p.call(e,n)&&n!==r&&d(e,n,{get:()=>t[n],enumerable:!(i=m(t,n))||i.enumerable});return e},o=(e,t,r)=>(u(e,t,"default"),r&&u(r,t,"default")),c=(e,t,r)=>(r=e!=null?a(g(e)):{},u(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:!0}):r,e));var f=A((h,_)=>{"use strict";_.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var s={};E(s,{default:()=>P});var L=c(f());o(s,c(f()));var{default:l,...N}=L,P=l!==void 0?l:N;export{P as default};
diff --git a/playground/ssr-html/src/network-imports.js b/playground/ssr-html/src/network-imports.js
new file mode 100644
index 00000000000000..770fb6e57b610d
--- /dev/null
+++ b/playground/ssr-html/src/network-imports.js
@@ -0,0 +1,7 @@
+// same port as `ports["ssr-html"]` in playground/test-utils.ts
+import slash from 'http://localhost:9602/slash@3.0.0.js'
+
+// or test without local server
+// import slash from 'https://esm.sh/slash@3.0.0'
+
+export { slash }
diff --git a/playground/ssr-html/test-network-imports.js b/playground/ssr-html/test-network-imports.js
new file mode 100644
index 00000000000000..91f84f6a3b3ea3
--- /dev/null
+++ b/playground/ssr-html/test-network-imports.js
@@ -0,0 +1,24 @@
+import assert from 'node:assert'
+import { fileURLToPath } from 'node:url'
+import { createServer, createViteRuntime } from 'vite'
+
+async function runTest(useRuntime) {
+ const server = await createServer({
+ configFile: false,
+ root: fileURLToPath(new URL('.', import.meta.url)),
+ server: {
+ middlewareMode: true,
+ },
+ })
+ let mod
+ if (useRuntime) {
+ const runtime = await createViteRuntime(server, { hmr: false })
+ mod = await runtime.executeUrl('/src/network-imports.js')
+ } else {
+ mod = await server.ssrLoadModule('/src/network-imports.js')
+ }
+ assert.equal(mod.slash('foo\\bar'), 'foo/bar')
+ await server.close()
+}
+
+runTest(process.argv.includes('--runtime'))
diff --git a/playground/ssr-noexternal/__tests__/ssr-noexternal.spec.ts b/playground/ssr-noexternal/__tests__/ssr-noexternal.spec.ts
index 2143c7524a0e41..ab41f0a4602454 100644
--- a/playground/ssr-noexternal/__tests__/ssr-noexternal.spec.ts
+++ b/playground/ssr-noexternal/__tests__/ssr-noexternal.spec.ts
@@ -1,10 +1,10 @@
import { expect, test } from 'vitest'
import { port } from './serve'
-import { page } from '~utils'
+import { isBuild, page } from '~utils'
const url = `http://localhost:${port}`
-test('message from require-external-cjs', async () => {
+test.runIf(!isBuild)('message from require-external-cjs', async () => {
await page.goto(url)
expect(await page.textContent('.require-external-cjs')).toMatch('foo')
})
diff --git a/playground/ssr-noexternal/vite.config.js b/playground/ssr-noexternal/vite.config.js
index 76da96a7d018ed..1109bddd187001 100644
--- a/playground/ssr-noexternal/vite.config.js
+++ b/playground/ssr-noexternal/vite.config.js
@@ -1,11 +1,12 @@
import { defineConfig } from 'vite'
+const noExternal = ['@vitejs/test-require-external-cjs']
export default defineConfig({
ssr: {
- noExternal: ['@vitejs/test-require-external-cjs'],
+ noExternal,
external: ['@vitejs/test-external-cjs'],
optimizeDeps: {
- disabled: false,
+ include: noExternal,
},
},
build: {
@@ -14,8 +15,5 @@ export default defineConfig({
rollupOptions: {
external: ['@vitejs/test-external-cjs'],
},
- commonjsOptions: {
- include: [],
- },
},
})
diff --git a/playground/ssr-resolve/__tests__/ssr-resolve.spec.ts b/playground/ssr-resolve/__tests__/ssr-resolve.spec.ts
index f3842838c59542..3920d4ccbd052e 100644
--- a/playground/ssr-resolve/__tests__/ssr-resolve.spec.ts
+++ b/playground/ssr-resolve/__tests__/ssr-resolve.spec.ts
@@ -25,3 +25,11 @@ test.runIf(isBuild)('correctly resolve entrypoints', async () => {
await expect(import(`${testDir}/dist/main.mjs`)).resolves.toBeTruthy()
})
+
+test.runIf(isBuild)(
+ 'node builtins should not be bundled if not used',
+ async () => {
+ const contents = readFile('dist/main.mjs')
+ expect(contents).not.include(`node:url`)
+ },
+)
diff --git a/playground/ssr-resolve/main.js b/playground/ssr-resolve/main.js
index 2357458b50bc8c..699ca580034a28 100644
--- a/playground/ssr-resolve/main.js
+++ b/playground/ssr-resolve/main.js
@@ -6,6 +6,7 @@ import fileEntry from '@vitejs/test-entries/file'
import pkgExportsEntry from '@vitejs/test-resolve-pkg-exports/entry'
import deepFoo from '@vitejs/test-deep-import/foo'
import deepBar from '@vitejs/test-deep-import/bar'
+import { used } from './util'
export default `
entries/dir: ${dirEntry}
@@ -13,4 +14,5 @@ export default `
pkg-exports/entry: ${pkgExportsEntry}
deep-import/foo: ${deepFoo}
deep-import/bar: ${deepBar}
+ util: ${used(['[success]'])}
`
diff --git a/playground/ssr-resolve/util.js b/playground/ssr-resolve/util.js
new file mode 100644
index 00000000000000..c3234a470328cf
--- /dev/null
+++ b/playground/ssr-resolve/util.js
@@ -0,0 +1,10 @@
+import { pathToFileURL } from 'node:url'
+
+export function used(s) {
+ return s
+}
+
+// This is not used, so `node:url` should not be bundled
+export function treeshaken(s) {
+ return pathToFileURL(s)
+}
diff --git a/playground/ssr-webworker/__tests__/ssr-webworker.spec.ts b/playground/ssr-webworker/__tests__/ssr-webworker.spec.ts
index c58847d6729fe5..65a01f196df295 100644
--- a/playground/ssr-webworker/__tests__/ssr-webworker.spec.ts
+++ b/playground/ssr-webworker/__tests__/ssr-webworker.spec.ts
@@ -23,6 +23,13 @@ test('respects browser export', async () => {
)
})
+test('supports nodejs_compat', async () => {
+ await page.goto(url)
+ expect(await page.textContent('.nodejs-compat')).toMatch(
+ '[success] nodejs compat',
+ )
+})
+
test.runIf(isBuild)('inlineDynamicImports', () => {
const dynamicJsContent = findAssetFile(/dynamic-[-\w]+\.js/, 'worker')
expect(dynamicJsContent).toBe('')
diff --git a/playground/ssr-webworker/package.json b/playground/ssr-webworker/package.json
index 3895a3d89ce5ff..d37e3563dc6d0c 100644
--- a/playground/ssr-webworker/package.json
+++ b/playground/ssr-webworker/package.json
@@ -13,7 +13,7 @@
"@vitejs/test-worker-exports": "file:./worker-exports"
},
"devDependencies": {
- "miniflare": "^3.20231030.3",
+ "miniflare": "^3.20240129.1",
"@vitejs/test-resolve-linked": "workspace:*"
}
}
diff --git a/playground/ssr-webworker/src/entry-worker.jsx b/playground/ssr-webworker/src/entry-worker.jsx
index 2b58c6f17a6e0c..5068c796481df2 100644
--- a/playground/ssr-webworker/src/entry-worker.jsx
+++ b/playground/ssr-webworker/src/entry-worker.jsx
@@ -1,3 +1,4 @@
+import { equal } from 'node:assert'
import { msg as linkedMsg } from '@vitejs/test-resolve-linked'
import browserExportsMessage from '@vitejs/test-browser-exports'
import workerExportsMessage from '@vitejs/test-worker-exports'
@@ -18,6 +19,7 @@ addEventListener('fetch', function (event) {
dynamic: ${loaded}
${browserExportsMessage}
${workerExportsMessage}
+ ${equal('a', 'a') || '[success] nodejs compat'}
`,
{
headers: {
diff --git a/playground/ssr-webworker/vite.config.js b/playground/ssr-webworker/vite.config.js
index b0b922d7d1b97e..3c10b035b550a2 100644
--- a/playground/ssr-webworker/vite.config.js
+++ b/playground/ssr-webworker/vite.config.js
@@ -11,6 +11,9 @@ export default defineConfig({
ssr: {
target: 'webworker',
noExternal: ['this-should-be-replaced-by-the-boolean'],
+ // Some webworker builds may choose to externalize node builtins as they may be implemented
+ // in the runtime, and so we can externalize it when bundling.
+ external: ['node:assert'],
},
plugins: [
{
diff --git a/playground/ssr-webworker/worker.js b/playground/ssr-webworker/worker.js
index 9c93d3b754c706..a910cfc02907e7 100644
--- a/playground/ssr-webworker/worker.js
+++ b/playground/ssr-webworker/worker.js
@@ -10,6 +10,8 @@ export async function createServer(port) {
const mf = new Miniflare({
scriptPath: path.resolve(__dirname, 'dist/worker/entry-worker.js'),
port,
+ modules: true,
+ compatibilityFlags: ['nodejs_compat'],
})
await mf.ready
return { mf }
diff --git a/playground/ssr/__tests__/ssr.spec.ts b/playground/ssr/__tests__/ssr.spec.ts
index 8c29c2169f0343..812e9323aad289 100644
--- a/playground/ssr/__tests__/ssr.spec.ts
+++ b/playground/ssr/__tests__/ssr.spec.ts
@@ -31,9 +31,21 @@ test('should restart ssr', async () => {
})
test.runIf(isServe)('html proxy is encoded', async () => {
- await page.goto(
- `${url}?%22%3E%3C/script%3E%3Cscript%3Econsole.log(%27html proxy is not encoded%27)%3C/script%3E`,
- )
+ try {
+ await page.goto(
+ `${url}?%22%3E%3C/script%3E%3Cscript%3Econsole.log(%27html%20proxy%20is%20not%20encoded%27)%3C/script%3E`,
+ )
- expect(browserLogs).not.toContain('html proxy is not encoded')
+ expect(browserLogs).not.toContain('html proxy is not encoded')
+ } catch (e) {
+ // Ignore net::ERR_ABORTED, which is causing flakiness in this test
+ if (
+ !(
+ e.message.includes('net::ERR_ABORTED') ||
+ e.message.includes('interrupted')
+ )
+ ) {
+ throw e
+ }
+ }
})
diff --git a/playground/tailwind-sourcemap/package.json b/playground/tailwind-sourcemap/package.json
index 8a4a7aa251c8e1..c4b72dee9dd770 100644
--- a/playground/tailwind-sourcemap/package.json
+++ b/playground/tailwind-sourcemap/package.json
@@ -10,6 +10,6 @@
"preview": "vite preview"
},
"dependencies": {
- "tailwindcss": "^3.3.6"
+ "tailwindcss": "^3.4.1"
}
}
diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json
index c10a7444c401ff..0934b4990ab241 100644
--- a/playground/tailwind/package.json
+++ b/playground/tailwind/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "autoprefixer": "^10.4.16",
- "tailwindcss": "^3.3.6",
- "vue": "^3.3.11",
+ "autoprefixer": "^10.4.17",
+ "tailwindcss": "^3.4.1",
+ "vue": "^3.4.15",
"vue-router": "^4.2.5"
},
"devDependencies": {
diff --git a/playground/test-utils.ts b/playground/test-utils.ts
index 741a11386078b7..92123f08900896 100644
--- a/playground/test-utils.ts
+++ b/playground/test-utils.ts
@@ -32,12 +32,15 @@ export const ports = {
ssr: 9600,
'ssr-deps': 9601,
'ssr-html': 9602,
+ 'ssr-hmr': 9609, // not imported but used in `ssr-hmr/vite.config.js`
'ssr-noexternal': 9603,
'ssr-pug': 9604,
'ssr-webworker': 9605,
- 'proxy-hmr': 9606, // not imported but used in `proxy-hmr/vite.config.js`
- 'proxy-hmr/other-app': 9607, // not imported but used in `proxy-hmr/other-app/vite.config.js`
- 'ssr-conditions': 9608,
+ 'proxy-bypass': 9606, // not imported but used in `proxy-hmr/vite.config.js`
+ 'proxy-bypass/non-existent-app': 9607, // not imported but used in `proxy-hmr/other-app/vite.config.js`
+ 'proxy-hmr': 9616, // not imported but used in `proxy-hmr/vite.config.js`
+ 'proxy-hmr/other-app': 9617, // not imported but used in `proxy-hmr/other-app/vite.config.js`
+ 'ssr-conditions': 9620,
'css/postcss-caching': 5005,
'css/postcss-plugins-different-dir': 5006,
'css/dynamic-import': 5007,
diff --git a/playground/tsconfig-json-load-error/__tests__/tsconfig-json-load-error.spec.ts b/playground/tsconfig-json-load-error/__tests__/tsconfig-json-load-error.spec.ts
index b2a3fde698e806..e14a151ad80e2d 100644
--- a/playground/tsconfig-json-load-error/__tests__/tsconfig-json-load-error.spec.ts
+++ b/playground/tsconfig-json-load-error/__tests__/tsconfig-json-load-error.spec.ts
@@ -11,7 +11,7 @@ import {
} from '~utils'
const unexpectedTokenSyntaxErrorRE =
- /^parsing .* failed: SyntaxError: Unexpected token.*\}.*/
+ /(\[vite:esbuild\] )*parsing .* failed: SyntaxError: Unexpected token.*\}.*/
describe.runIf(isBuild)('build', () => {
test('should throw an error on build', () => {
diff --git a/playground/vitestGlobalSetup.ts b/playground/vitestGlobalSetup.ts
index d62edca8f23daf..7f85d9d12748bf 100644
--- a/playground/vitestGlobalSetup.ts
+++ b/playground/vitestGlobalSetup.ts
@@ -1,15 +1,13 @@
-import os from 'node:os'
import path from 'node:path'
import fs from 'fs-extra'
+import type { GlobalSetupContext } from 'vitest/node'
import type { BrowserServer } from 'playwright-chromium'
import { chromium } from 'playwright-chromium'
import { hasWindowsUnicodeFsBug } from './hasWindowsUnicodeFsBug'
-const DIR = path.join(os.tmpdir(), 'vitest_playwright_global_setup')
-
let browserServer: BrowserServer | undefined
-export async function setup(): Promise {
+export async function setup({ provide }: GlobalSetupContext): Promise {
process.env.NODE_ENV = process.env.VITE_TEST_BUILD
? 'production'
: 'development'
@@ -21,8 +19,7 @@ export async function setup(): Promise {
: undefined,
})
- await fs.mkdirp(DIR)
- await fs.writeFile(path.join(DIR, 'wsEndpoint'), browserServer.wsEndpoint())
+ provide('wsEndpoint', browserServer.wsEndpoint())
const tempDir = path.resolve(__dirname, '../playground-temp')
await fs.ensureDir(tempDir)
diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts
index c73b358f5731c7..ff2303dc498569 100644
--- a/playground/vitestSetup.ts
+++ b/playground/vitestSetup.ts
@@ -1,6 +1,5 @@
import type * as http from 'node:http'
-import path, { dirname, join, resolve } from 'node:path'
-import os from 'node:os'
+import path, { dirname, resolve } from 'node:path'
import fs from 'fs-extra'
import { chromium } from 'playwright-chromium'
import type {
@@ -22,7 +21,7 @@ import {
import type { Browser, Page } from 'playwright-chromium'
import type { RollupError, RollupWatcher, RollupWatcherEvent } from 'rollup'
import type { File } from 'vitest'
-import { beforeAll } from 'vitest'
+import { beforeAll, inject } from 'vitest'
// #region env
@@ -80,16 +79,18 @@ export function setViteUrl(url: string): void {
// #endregion
-const DIR = join(os.tmpdir(), 'vitest_playwright_global_setup')
-
beforeAll(async (s) => {
const suite = s as File
// skip browser setup for non-playground tests
- if (!suite.filepath.includes('playground')) {
+ // TODO: ssr playground?
+ if (
+ !suite.filepath.includes('playground') ||
+ suite.filepath.includes('hmr-ssr')
+ ) {
return
}
- const wsEndpoint = fs.readFileSync(join(DIR, 'wsEndpoint'), 'utf-8')
+ const wsEndpoint = inject('wsEndpoint')
if (!wsEndpoint) {
throw new Error('wsEndpoint not found')
}
@@ -354,3 +355,9 @@ declare module 'vite' {
__test__?: () => void
}
}
+
+declare module 'vitest' {
+ export interface ProvidedContext {
+ wsEndpoint: string
+ }
+}
diff --git a/playground/worker/__tests__/es/es-worker.spec.ts b/playground/worker/__tests__/es/worker-es.spec.ts
similarity index 98%
rename from playground/worker/__tests__/es/es-worker.spec.ts
rename to playground/worker/__tests__/es/worker-es.spec.ts
index 7ffd7ae6df0f20..0031c432c36b7a 100644
--- a/playground/worker/__tests__/es/es-worker.spec.ts
+++ b/playground/worker/__tests__/es/worker-es.spec.ts
@@ -126,7 +126,7 @@ describe.runIf(isBuild)('build', () => {
)
// inlined shared worker
expect(content).toMatch(
- `return new SharedWorker("data:application/javascript;base64,"+`,
+ `return new SharedWorker("data:text/javascript;base64,"+`,
)
})
diff --git a/playground/worker/__tests__/iife/iife-worker.spec.ts b/playground/worker/__tests__/iife/worker-iife.spec.ts
similarity index 95%
rename from playground/worker/__tests__/iife/iife-worker.spec.ts
rename to playground/worker/__tests__/iife/worker-iife.spec.ts
index 7fe242a7f33a70..3434fe756194da 100644
--- a/playground/worker/__tests__/iife/iife-worker.spec.ts
+++ b/playground/worker/__tests__/iife/worker-iife.spec.ts
@@ -114,17 +114,17 @@ describe.runIf(isBuild)('build', () => {
test('module worker', async () => {
await untilUpdated(
async () => page.textContent('.worker-import-meta-url'),
- /A\sstring.*\/iife\/.+url-worker\.js/,
+ /A\sstring.*\/iife\/.+url-worker\.js.+url-worker\.js/,
true,
)
await untilUpdated(
() => page.textContent('.worker-import-meta-url-resolve'),
- /A\sstring.*\/iife\/.+url-worker\.js/,
+ /A\sstring.*\/iife\/.+url-worker\.js.+url-worker\.js/,
true,
)
await untilUpdated(
() => page.textContent('.worker-import-meta-url-without-extension'),
- 'A string',
+ /A\sstring.*\/iife\/.+url-worker\.js.+url-worker\.js/,
true,
)
await untilUpdated(
@@ -161,7 +161,7 @@ test('import.meta.glob eager in worker', async () => {
})
test.runIf(isServe)('sourcemap boundary', async () => {
- const response = page.waitForResponse(/my-worker.ts\?type=module&worker_file/)
+ const response = page.waitForResponse(/my-worker.ts\?worker_file&type=module/)
await page.goto(viteTestUrl)
const content = await (await response).text()
const { mappings } = decodeSourceMapUrl(content)
diff --git a/playground/worker/__tests__/relative-base-iife/relative-base-iife-worker.spec.ts b/playground/worker/__tests__/relative-base-iife/worker-relative-base-iife.spec.ts
similarity index 100%
rename from playground/worker/__tests__/relative-base-iife/relative-base-iife-worker.spec.ts
rename to playground/worker/__tests__/relative-base-iife/worker-relative-base-iife.spec.ts
diff --git a/playground/worker/__tests__/relative-base/relative-base-worker.spec.ts b/playground/worker/__tests__/relative-base/worker-relative-base.spec.ts
similarity index 100%
rename from playground/worker/__tests__/relative-base/relative-base-worker.spec.ts
rename to playground/worker/__tests__/relative-base/worker-relative-base.spec.ts
diff --git a/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts b/playground/worker/__tests__/sourcemap-hidden/worker-sourcemap-hidden.spec.ts
similarity index 98%
rename from playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts
rename to playground/worker/__tests__/sourcemap-hidden/worker-sourcemap-hidden.spec.ts
index 6d9a6ee55664d6..157d9f7d47b26a 100644
--- a/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts
+++ b/playground/worker/__tests__/sourcemap-hidden/worker-sourcemap-hidden.spec.ts
@@ -94,7 +94,7 @@ describe.runIf(isBuild)('build', () => {
expect(content).toMatch(
`new Worker("/iife-sourcemap-hidden/assets/my-worker`,
)
- expect(content).toMatch(`new Worker("data:application/javascript;base64`)
+ expect(content).toMatch(`new Worker("data:text/javascript;base64`)
expect(content).toMatch(
`new Worker("/iife-sourcemap-hidden/assets/possible-ts-output-worker`,
)
diff --git a/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts b/playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts
similarity index 97%
rename from playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts
rename to playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts
index 0bfa3ca3b8b816..9a10908abdc1ec 100644
--- a/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts
+++ b/playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts
@@ -75,7 +75,7 @@ describe.runIf(isBuild)('build', () => {
expect(content).toMatch(
`new Worker("/iife-sourcemap-inline/assets/my-worker`,
)
- expect(content).toMatch(`new Worker("data:application/javascript;base64`)
+ expect(content).toMatch(`new Worker("data:text/javascript;base64`)
expect(content).toMatch(
`new Worker("/iife-sourcemap-inline/assets/possible-ts-output-worker`,
)
diff --git a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts b/playground/worker/__tests__/sourcemap/worker-sourcemap.spec.ts
similarity index 98%
rename from playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts
rename to playground/worker/__tests__/sourcemap/worker-sourcemap.spec.ts
index a9be2c75611079..0dd723413e5a4c 100644
--- a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts
+++ b/playground/worker/__tests__/sourcemap/worker-sourcemap.spec.ts
@@ -95,7 +95,7 @@ describe.runIf(isBuild)('build', () => {
// chunk
expect(content).toMatch(`new Worker("/iife-sourcemap/assets/my-worker`)
- expect(content).toMatch(`new Worker("data:application/javascript;base64`)
+ expect(content).toMatch(`new Worker("data:text/javascript;base64`)
expect(content).toMatch(
`new Worker("/iife-sourcemap/assets/possible-ts-output-worker`,
)
diff --git a/playground/worker/url-worker.js b/playground/worker/url-worker.js
index bede21cc42cc49..a329ffdbf840e4 100644
--- a/playground/worker/url-worker.js
+++ b/playground/worker/url-worker.js
@@ -3,6 +3,7 @@ self.postMessage(
'A string',
import.meta.env.BASE_URL,
self.location.url,
+ import.meta && import.meta.url,
import.meta.url,
].join(' '),
)
diff --git a/playground/worker/vite.config-es.js b/playground/worker/vite.config-es.js
index 995902373d72a5..eba1f7e2f1bd76 100644
--- a/playground/worker/vite.config-es.js
+++ b/playground/worker/vite.config-es.js
@@ -21,7 +21,8 @@ export default defineConfig({
},
build: {
outDir: 'dist/es',
- assetsInlineLimit: 100, // keep SVG as assets URL
+ assetsInlineLimit: (filePath) =>
+ filePath.endsWith('.svg') ? false : undefined,
rollupOptions: {
output: {
assetFileNames: 'assets/[name].[ext]',
diff --git a/playground/worker/vite.config-iife.js b/playground/worker/vite.config-iife.js
index 7ac8220e25a7e4..3d6d0de8a170e5 100644
--- a/playground/worker/vite.config-iife.js
+++ b/playground/worker/vite.config-iife.js
@@ -22,7 +22,8 @@ export default defineConfig({
},
build: {
outDir: 'dist/iife',
- assetsInlineLimit: 100, // keep SVG as assets URL
+ assetsInlineLimit: (filePath) =>
+ filePath.endsWith('.svg') ? false : undefined,
manifest: true,
rollupOptions: {
output: {
diff --git a/playground/worker/vite.config-relative-base-iife.js b/playground/worker/vite.config-relative-base-iife.js
index 0ea1a872d59e82..657d7b3094acf6 100644
--- a/playground/worker/vite.config-relative-base-iife.js
+++ b/playground/worker/vite.config-relative-base-iife.js
@@ -21,7 +21,8 @@ export default defineConfig(({ isPreview }) => ({
},
build: {
outDir: 'dist/relative-base-iife',
- assetsInlineLimit: 100, // keep SVG as assets URL
+ assetsInlineLimit: (filePath) =>
+ filePath.endsWith('.svg') ? false : undefined,
rollupOptions: {
output: {
assetFileNames: 'other-assets/[name]-[hash].[ext]',
diff --git a/playground/worker/vite.config-relative-base.js b/playground/worker/vite.config-relative-base.js
index d5935bb3ef9132..f4f22cc12e0cd9 100644
--- a/playground/worker/vite.config-relative-base.js
+++ b/playground/worker/vite.config-relative-base.js
@@ -21,7 +21,8 @@ export default defineConfig(({ isPreview }) => ({
},
build: {
outDir: 'dist/relative-base',
- assetsInlineLimit: 100, // keep SVG as assets URL
+ assetsInlineLimit: (filePath) =>
+ filePath.endsWith('.svg') ? false : undefined,
rollupOptions: {
output: {
assetFileNames: 'other-assets/[name]-[hash].[ext]',
diff --git a/playground/worker/worker-sourcemap-config.js b/playground/worker/worker-sourcemap-config.js
index 25dd8aa83b70a0..2c4e40e78d2a5a 100644
--- a/playground/worker/worker-sourcemap-config.js
+++ b/playground/worker/worker-sourcemap-config.js
@@ -35,7 +35,8 @@ export default (sourcemap) => {
},
build: {
outDir: `dist/iife-${typeName}/`,
- assetsInlineLimit: 100, // keep SVG as assets URL
+ assetsInlineLimit: (filePath) =>
+ filePath.endsWith('.svg') ? false : undefined,
sourcemap: sourcemap,
rollupOptions: {
output: {
diff --git a/playground/worker/worker/main-module.js b/playground/worker/worker/main-module.js
index 21ea14352f5a66..23d8527f300c5c 100644
--- a/playground/worker/worker/main-module.js
+++ b/playground/worker/worker/main-module.js
@@ -142,7 +142,7 @@ w2.port.addEventListener('message', (ev) => {
w2.port.start()
const workers = import.meta.glob('../importMetaGlobEager.*.js', {
- as: 'worker',
+ query: '?worker',
eager: true,
})
const importMetaGlobEagerWorker = new workers[
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8a5798b6f7f601..79b972f25deef0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -7,35 +7,32 @@ settings:
overrides:
vite: workspace:*
-packageExtensionsChecksum: de16c2a1a6a6350aaa9e478e59cca00e
+packageExtensionsChecksum: 4e49e84b7a11dfd4895fbffb006a7015
patchedDependencies:
- chokidar@3.5.3:
- hash: dzxbf3kgof5pdmbsyih2x43sq4
- path: patches/chokidar@3.5.3.patch
+ chokidar@3.6.0:
+ hash: bckcfsslxcffppz65mxcq6naau
+ path: patches/chokidar@3.6.0.patch
dotenv-expand@10.0.0:
hash: weuqf2vlv5b5g6cikeo4slurbm
path: patches/dotenv-expand@10.0.0.patch
- sirv@2.0.3:
- hash: z45f224eewh2pgpijxcc3aboqm
- path: patches/sirv@2.0.3.patch
+ sirv@2.0.4:
+ hash: amdes53ifqfntejkflpaq5ifce
+ path: patches/sirv@2.0.4.patch
importers:
.:
devDependencies:
'@babel/types':
- specifier: ^7.23.6
- version: 7.23.6
- '@eslint-types/import':
- specifier: ^2.29.0-1
- version: 2.29.0-1
+ specifier: ^7.23.9
+ version: 7.23.9
'@eslint-types/typescript-eslint':
- specifier: ^6.12.0
- version: 6.12.0
+ specifier: ^6.19.1
+ version: 6.19.1
'@rollup/plugin-typescript':
- specifier: ^11.1.5
- version: 11.1.5(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2)
+ specifier: ^11.1.6
+ version: 11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2)
'@types/babel__core':
specifier: ^7.20.5
version: 7.20.5
@@ -60,9 +57,6 @@ importers:
'@types/fs-extra':
specifier: ^11.0.4
version: 11.0.4
- '@types/json-stable-stringify':
- specifier: ^1.0.36
- version: 1.0.36
'@types/less':
specifier: ^3.0.6
version: 3.0.6
@@ -70,8 +64,8 @@ importers:
specifier: ^4.0.6
version: 4.0.6
'@types/node':
- specifier: ^20.10.4
- version: 20.10.4
+ specifier: ^20.11.16
+ version: 20.11.16
'@types/picomatch':
specifier: ^2.3.3
version: 2.3.3
@@ -88,11 +82,11 @@ importers:
specifier: ^8.5.10
version: 8.5.10
'@typescript-eslint/eslint-plugin':
- specifier: ^6.14.0
- version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.2.2)
+ specifier: ^6.21.0
+ version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.2.2)
'@typescript-eslint/parser':
- specifier: ^6.14.0
- version: 6.14.0(eslint@8.55.0)(typescript@5.2.2)
+ specifier: ^6.21.0
+ version: 6.21.0(eslint@8.56.0)(typescript@5.2.2)
'@vitejs/release-scripts':
specifier: ^1.3.1
version: 1.3.1
@@ -100,20 +94,20 @@ importers:
specifier: ^4.1.0
version: 4.1.0
eslint:
- specifier: ^8.55.0
- version: 8.55.0
+ specifier: ^8.56.0
+ version: 8.56.0
eslint-define-config:
- specifier: ^2.0.0
- version: 2.0.0
- eslint-plugin-import:
- specifier: ^2.29.0
- version: 2.29.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)
+ specifier: ^2.1.0
+ version: 2.1.0
+ eslint-plugin-i:
+ specifier: ^2.29.1
+ version: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)
eslint-plugin-n:
- specifier: ^16.4.0
- version: 16.4.0(eslint@8.55.0)
+ specifier: ^16.6.2
+ version: 16.6.2(eslint@8.56.0)
eslint-plugin-regexp:
- specifier: ^2.1.2
- version: 2.1.2(eslint@8.55.0)
+ specifier: ^2.2.0
+ version: 2.2.0(eslint@8.56.0)
execa:
specifier: ^8.0.1
version: 8.0.1
@@ -124,20 +118,20 @@ importers:
specifier: ^11.2.0
version: 11.2.0
lint-staged:
- specifier: ^15.2.0
- version: 15.2.0
+ specifier: ^15.2.2
+ version: 15.2.2
npm-run-all2:
- specifier: ^6.1.1
- version: 6.1.1
+ specifier: ^6.1.2
+ version: 6.1.2
picocolors:
specifier: ^1.0.0
version: 1.0.0
playwright-chromium:
- specifier: ^1.40.1
- version: 1.40.1
+ specifier: ^1.41.2
+ version: 1.41.2
prettier:
- specifier: 3.1.1
- version: 3.1.1
+ specifier: 3.2.5
+ version: 3.2.5
rimraf:
specifier: ^5.0.5
version: 5.0.5
@@ -145,8 +139,8 @@ importers:
specifier: ^4.2.0
version: 4.2.0
semver:
- specifier: ^7.5.4
- version: 7.5.4
+ specifier: ^7.6.0
+ version: 7.6.0
simple-git-hooks:
specifier: ^2.9.0
version: 2.9.0
@@ -154,8 +148,8 @@ importers:
specifier: ^2.6.2
version: 2.6.2
tsx:
- specifier: ^4.6.2
- version: 4.6.2
+ specifier: ^4.7.0
+ version: 4.7.0
typescript:
specifier: ^5.2.2
version: 5.2.2
@@ -166,14 +160,14 @@ importers:
specifier: workspace:*
version: link:packages/vite
vitepress:
- specifier: 1.0.0-rc.31
- version: 1.0.0-rc.31(typescript@5.2.2)
+ specifier: 1.0.0-rc.42
+ version: 1.0.0-rc.42(typescript@5.2.2)
vitest:
- specifier: ^1.0.4
- version: 1.0.4(@types/node@20.10.4)
+ specifier: ^1.2.2
+ version: 1.2.2(@types/node@20.11.16)
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
packages/create-vite:
devDependencies:
@@ -202,30 +196,33 @@ importers:
packages/plugin-legacy:
dependencies:
'@babel/core':
- specifier: ^7.23.6
- version: 7.23.6
+ specifier: ^7.23.9
+ version: 7.23.9
'@babel/preset-env':
- specifier: ^7.23.6
- version: 7.23.6(@babel/core@7.23.6)
+ specifier: ^7.23.9
+ version: 7.23.9(@babel/core@7.23.9)
browserslist:
- specifier: ^4.22.2
- version: 4.22.2
+ specifier: ^4.22.3
+ version: 4.22.3
core-js:
- specifier: ^3.34.0
- version: 3.34.0
+ specifier: ^3.35.1
+ version: 3.35.1
+ esbuild-plugin-browserslist:
+ specifier: ^0.11.1
+ version: 0.11.1(browserslist@4.22.3)
magic-string:
- specifier: ^0.30.5
- version: 0.30.5
+ specifier: ^0.30.7
+ version: 0.30.7
regenerator-runtime:
- specifier: ^0.14.0
- version: 0.14.0
+ specifier: ^0.14.1
+ version: 0.14.1
systemjs:
- specifier: ^6.14.2
- version: 6.14.2
+ specifier: ^6.14.3
+ version: 6.14.3
devDependencies:
acorn:
- specifier: ^8.11.2
- version: 8.11.2
+ specifier: ^8.11.3
+ version: 8.11.3
picocolors:
specifier: ^1.0.0
version: 1.0.0
@@ -239,8 +236,8 @@ importers:
specifier: ^0.19.3
version: 0.19.3
postcss:
- specifier: ^8.4.32
- version: 8.4.32
+ specifier: ^8.4.35
+ version: 8.4.35
rollup:
specifier: ^4.2.0
version: 4.2.0
@@ -253,11 +250,11 @@ importers:
specifier: ^2.2.1
version: 2.2.1
'@babel/parser':
- specifier: ^7.23.6
- version: 7.23.6
+ specifier: ^7.23.9
+ version: 7.23.9
'@jridgewell/trace-mapping':
- specifier: ^0.3.20
- version: 0.3.20
+ specifier: ^0.3.22
+ version: 0.3.22
'@rollup/plugin-alias':
specifier: ^5.1.0
version: 5.1.0(rollup@4.2.0)
@@ -268,14 +265,14 @@ importers:
specifier: ^2.1.2
version: 2.1.2(rollup@4.2.0)
'@rollup/plugin-json':
- specifier: ^6.0.1
- version: 6.0.1(rollup@4.2.0)
+ specifier: ^6.1.0
+ version: 6.1.0(rollup@4.2.0)
'@rollup/plugin-node-resolve':
specifier: 15.2.3
version: 15.2.3(rollup@4.2.0)
'@rollup/plugin-typescript':
- specifier: ^11.1.5
- version: 11.1.5(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2)
+ specifier: ^11.1.6
+ version: 11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2)
'@rollup/pluginutils':
specifier: ^5.1.0
version: 5.1.0(rollup@4.2.0)
@@ -286,17 +283,20 @@ importers:
specifier: ^0.0.5
version: 0.0.5
acorn:
- specifier: ^8.11.2
- version: 8.11.2
+ specifier: ^8.11.3
+ version: 8.11.3
acorn-walk:
- specifier: ^8.3.1
- version: 8.3.1(acorn@8.11.2)
+ specifier: ^8.3.2
+ version: 8.3.2(acorn@8.11.3)
+ artichokie:
+ specifier: ^0.2.0
+ version: 0.2.0
cac:
specifier: ^6.7.14
version: 6.7.14
chokidar:
- specifier: ^3.5.3
- version: 3.5.3(patch_hash=dzxbf3kgof5pdmbsyih2x43sq4)
+ specifier: ^3.6.0
+ version: 3.6.0(patch_hash=bckcfsslxcffppz65mxcq6naau)
connect:
specifier: ^3.7.0
version: 3.7.0
@@ -316,8 +316,8 @@ importers:
specifier: link:./src/types
version: link:src/types
dotenv:
- specifier: ^16.3.1
- version: 16.3.1
+ specifier: ^16.4.1
+ version: 16.4.1
dotenv-expand:
specifier: ^10.0.0
version: 10.0.0(patch_hash=weuqf2vlv5b5g6cikeo4slurbm)
@@ -339,30 +339,24 @@ importers:
http-proxy:
specifier: ^1.18.1
version: 1.18.1(debug@4.3.4)
- json-stable-stringify:
- specifier: ^1.1.0
- version: 1.1.0
launch-editor-middleware:
specifier: ^2.6.1
version: 2.6.1
lightningcss:
- specifier: ^1.22.1
- version: 1.22.1
+ specifier: ^1.23.0
+ version: 1.23.0
magic-string:
- specifier: ^0.30.5
- version: 0.30.5
+ specifier: ^0.30.7
+ version: 0.30.7
micromatch:
specifier: ^4.0.5
version: 4.0.5
mlly:
- specifier: ^1.4.2
- version: 1.4.2
+ specifier: ^1.5.0
+ version: 1.5.0
mrmime:
- specifier: ^1.0.1
- version: 1.0.1
- okie:
- specifier: ^1.0.1
- version: 1.0.1
+ specifier: ^2.0.0
+ version: 2.0.0
open:
specifier: ^8.4.2
version: 8.4.2
@@ -379,14 +373,14 @@ importers:
specifier: ^2.3.1
version: 2.3.1
postcss-import:
- specifier: ^15.1.0
- version: 15.1.0(postcss@8.4.32)
+ specifier: ^16.0.0
+ version: 16.0.0(postcss@8.4.35)
postcss-load-config:
specifier: ^4.0.2
- version: 4.0.2(postcss@8.4.32)(ts-node@10.9.2)
+ version: 4.0.2(postcss@8.4.35)(ts-node@10.9.2)
postcss-modules:
specifier: ^6.0.0
- version: 6.0.0(postcss@8.4.32)
+ version: 6.0.0(postcss@8.4.35)
resolve.exports:
specifier: ^2.0.2
version: 2.0.2
@@ -397,8 +391,8 @@ importers:
specifier: ^3.2.0
version: 3.2.0(rollup@4.2.0)
sirv:
- specifier: ^2.0.3
- version: 2.0.3(patch_hash=z45f224eewh2pgpijxcc3aboqm)
+ specifier: ^2.0.4
+ version: 2.0.4(patch_hash=amdes53ifqfntejkflpaq5ifce)
source-map-support:
specifier: ^0.5.21
version: 0.5.21
@@ -406,11 +400,11 @@ importers:
specifier: ^7.1.0
version: 7.1.0
strip-literal:
- specifier: ^1.3.0
- version: 1.3.0
+ specifier: ^2.0.0
+ version: 2.0.0
tsconfck:
- specifier: ^3.0.0
- version: 3.0.0(typescript@5.2.2)
+ specifier: ^3.0.2
+ version: 3.0.2(typescript@5.2.2)
tslib:
specifier: ^2.6.2
version: 2.6.2
@@ -418,11 +412,53 @@ importers:
specifier: link:./types
version: link:types
ufo:
- specifier: ^1.3.2
- version: 1.3.2
+ specifier: ^1.4.0
+ version: 1.4.0
ws:
- specifier: ^8.15.0
- version: 8.15.0
+ specifier: ^8.16.0
+ version: 8.16.0
+
+ packages/vite/src/node/__tests__/packages/module: {}
+
+ packages/vite/src/node/__tests__/packages/name: {}
+
+ packages/vite/src/node/__tests__/packages/noname: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/lerna/nested: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/none/nested: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/pnpm: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/pnpm/nested: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/yarn: {}
+
+ packages/vite/src/node/server/__tests__/fixtures/yarn/nested: {}
+
+ packages/vite/src/node/ssr/__tests__:
+ dependencies:
+ '@vitejs/cjs-ssr-dep':
+ specifier: link:./fixtures/cjs-ssr-dep
+ version: link:fixtures/cjs-ssr-dep
+
+ packages/vite/src/node/ssr/__tests__/fixtures/cjs-ssr-dep: {}
+
+ packages/vite/src/node/ssr/runtime/__tests__:
+ dependencies:
+ '@vitejs/cjs-external':
+ specifier: link:./fixtures/cjs-external
+ version: link:fixtures/cjs-external
+ '@vitejs/esm-external':
+ specifier: link:./fixtures/esm-external
+ version: link:fixtures/esm-external
+ tinyspy:
+ specifier: 2.2.0
+ version: 2.2.0
+
+ packages/vite/src/node/ssr/runtime/__tests__/fixtures/cjs-external: {}
+
+ packages/vite/src/node/ssr/runtime/__tests__/fixtures/esm-external: {}
playground:
devDependencies:
@@ -442,14 +478,14 @@ importers:
playground/alias:
dependencies:
'@vue/shared':
- specifier: ^3.3.11
- version: 3.3.11
+ specifier: ^3.4.16
+ version: 3.4.16
aliased-module:
specifier: file:./dir/module
version: file:playground/alias/dir/module
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
devDependencies:
'@vitejs/test-resolve-linked':
specifier: workspace:*
@@ -467,11 +503,11 @@ importers:
specifier: ^3.3.2
version: 3.3.2
sass:
- specifier: ^1.69.5
- version: 1.69.5
+ specifier: ^1.70.0
+ version: 1.70.0
tailwindcss:
- specifier: ^3.3.6
- version: 3.3.6(ts-node@10.9.2)
+ specifier: ^3.4.1
+ version: 3.4.1(ts-node@10.9.2)
playground/build-old: {}
@@ -514,6 +550,9 @@ importers:
'@vitejs/test-css-proxy-dep':
specifier: file:./css-proxy-dep
version: file:playground/css/css-proxy-dep
+ '@vitejs/test-scss-proxy-dep':
+ specifier: file:./scss-proxy-dep
+ version: file:playground/css/scss-proxy-dep
fast-glob:
specifier: ^3.3.2
version: 3.3.2
@@ -522,10 +561,10 @@ importers:
version: 4.2.0
postcss-nested:
specifier: ^6.0.1
- version: 6.0.1(postcss@8.4.32)
+ version: 6.0.1(postcss@8.4.35)
sass:
- specifier: ^1.69.5
- version: 1.69.5
+ specifier: ^1.70.0
+ version: 1.70.0
stylus:
specifier: ^0.62.0
version: 0.62.0
@@ -542,8 +581,8 @@ importers:
playground/css-lightningcss:
devDependencies:
lightningcss:
- specifier: ^1.22.1
- version: 1.22.1
+ specifier: ^1.23.0
+ version: 1.23.0
playground/css-lightningcss-proxy:
devDependencies:
@@ -551,8 +590,8 @@ importers:
specifier: ^4.18.2
version: 4.18.2
lightningcss:
- specifier: ^1.22.1
- version: 1.22.1
+ specifier: ^1.23.0
+ version: 1.23.0
playground/css-sourcemap:
devDependencies:
@@ -560,11 +599,11 @@ importers:
specifier: ^4.2.0
version: 4.2.0
magic-string:
- specifier: ^0.30.5
- version: 0.30.5
+ specifier: ^0.30.7
+ version: 0.30.7
sass:
- specifier: ^1.69.5
- version: 1.69.5
+ specifier: ^1.70.0
+ version: 1.70.0
stylus:
specifier: ^0.62.0
version: 0.62.0
@@ -592,6 +631,14 @@ importers:
playground/css/postcss-caching/green-app: {}
+ playground/css/scss-proxy-dep:
+ dependencies:
+ '@vitejs/test-scss-proxy-dep-nested':
+ specifier: file:../scss-proxy-dep-nested
+ version: file:playground/css/scss-proxy-dep-nested
+
+ playground/css/scss-proxy-dep-nested: {}
+
playground/data-uri: {}
playground/define:
@@ -619,8 +666,8 @@ importers:
playground/extensions:
dependencies:
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
playground/external:
dependencies:
@@ -641,8 +688,8 @@ importers:
specifier: workspace:*
version: link:../../packages/vite
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
vue32:
specifier: npm:vue@~3.2.0
version: /vue@3.2.0
@@ -656,8 +703,8 @@ importers:
specifier: npm:slash@^5.1.0
version: /slash@5.1.0
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
playground/external/dep-that-requires:
dependencies:
@@ -668,8 +715,8 @@ importers:
specifier: npm:slash@^5.1.0
version: /slash@5.1.0
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
playground/fs-serve: {}
@@ -683,6 +730,8 @@ importers:
playground/hmr: {}
+ playground/hmr-ssr: {}
+
playground/html: {}
playground/html/side-effects: {}
@@ -700,6 +749,9 @@ importers:
'@vitejs/test-importee-pkg':
specifier: file:importee-pkg
version: file:playground/js-sourcemap/importee-pkg
+ magic-string:
+ specifier: ^0.30.7
+ version: 0.30.7
playground/js-sourcemap/importee-pkg: {}
@@ -712,8 +764,8 @@ importers:
specifier: ^4.18.2
version: 4.18.2
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
playground/json/json-module: {}
@@ -726,14 +778,14 @@ importers:
specifier: ^4.18.2
version: 4.18.2
terser:
- specifier: ^5.26.0
- version: 5.26.0
+ specifier: ^5.27.0
+ version: 5.27.0
playground/lib:
devDependencies:
sirv:
- specifier: ^2.0.3
- version: 2.0.3(patch_hash=z45f224eewh2pgpijxcc3aboqm)
+ specifier: ^2.0.4
+ version: 2.0.4(patch_hash=amdes53ifqfntejkflpaq5ifce)
playground/minify:
dependencies:
@@ -748,8 +800,8 @@ importers:
playground/multiple-entrypoints:
devDependencies:
sass:
- specifier: ^1.69.5
- version: 1.69.5
+ specifier: ^1.70.0
+ version: 1.70.0
playground/nested-deps:
dependencies:
@@ -808,8 +860,8 @@ importers:
playground/object-hooks:
dependencies:
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
playground/optimize-deps:
dependencies:
@@ -886,8 +938,8 @@ importers:
specifier: workspace:0.0.0
version: link:../resolve-linked
axios:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
clipboard:
specifier: ^2.0.11
version: 2.0.11
@@ -901,8 +953,8 @@ importers:
specifier: ^4.5.0
version: 4.5.0
phoenix:
- specifier: ^1.7.10
- version: 1.7.10
+ specifier: ^1.7.11
+ version: 1.7.11
react:
specifier: ^18.2.0
version: 18.2.0
@@ -913,11 +965,11 @@ importers:
specifier: ^0.11.3
version: 0.11.3
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
vuex:
specifier: ^4.1.0
- version: 4.1.0(vue@3.3.11)
+ version: 4.1.0(vue@3.4.15)
playground/optimize-deps-no-discovery:
dependencies:
@@ -925,11 +977,11 @@ importers:
specifier: file:./dep-no-discovery
version: file:playground/optimize-deps-no-discovery/dep-no-discovery
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
vuex:
specifier: ^4.1.0
- version: 4.1.0(vue@3.3.11)
+ version: 4.1.0(vue@3.4.15)
playground/optimize-deps-no-discovery/dep-no-discovery: {}
@@ -1026,8 +1078,8 @@ importers:
specifier: file:./dep-including-a
version: file:playground/preload/dep-including-a
terser:
- specifier: ^5.26.0
- version: 5.26.0
+ specifier: ^5.27.0
+ version: 5.27.0
playground/preload/dep-a: {}
@@ -1054,8 +1106,8 @@ importers:
playground/resolve:
dependencies:
'@babel/runtime':
- specifier: ^7.23.6
- version: 7.23.6
+ specifier: ^7.23.9
+ version: 7.23.9
'@vitejs/test-require-pkg-with-module-field':
specifier: link:./require-pkg-with-module-field
version: link:require-pkg-with-module-field
@@ -1429,8 +1481,8 @@ importers:
specifier: workspace:*
version: link:../resolve-linked
miniflare:
- specifier: ^3.20231030.3
- version: 3.20231030.3
+ specifier: ^3.20240129.1
+ version: 3.20240129.1
playground/ssr-webworker/browser-exports: {}
@@ -1439,27 +1491,27 @@ importers:
playground/tailwind:
dependencies:
autoprefixer:
- specifier: ^10.4.16
- version: 10.4.16
+ specifier: ^10.4.17
+ version: 10.4.17
tailwindcss:
- specifier: ^3.3.6
- version: 3.3.6(ts-node@10.9.2)
+ specifier: ^3.4.1
+ version: 3.4.1(ts-node@10.9.2)
vue:
- specifier: ^3.3.11
- version: 3.3.11(typescript@5.2.2)
+ specifier: ^3.4.15
+ version: 3.4.15(typescript@5.2.2)
vue-router:
specifier: ^4.2.5
- version: 4.2.5(vue@3.3.11)
+ version: 4.2.5(vue@3.4.15)
devDependencies:
ts-node:
specifier: ^10.9.2
- version: 10.9.2(@types/node@20.10.4)(typescript@5.2.2)
+ version: 10.9.2(@types/node@20.11.16)(typescript@5.2.2)
playground/tailwind-sourcemap:
dependencies:
tailwindcss:
- specifier: ^3.3.6
- version: 3.3.6(ts-node@10.9.2)
+ specifier: ^3.4.1
+ version: 3.4.1(ts-node@10.9.2)
playground/transform-plugin: {}
@@ -1637,7 +1689,7 @@ packages:
engines: {node: '>=6.0.0'}
dependencies:
'@jridgewell/gen-mapping': 0.3.2
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.22
/@babel/code-frame@7.23.5:
resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==}
@@ -1650,20 +1702,20 @@ packages:
resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==}
engines: {node: '>=6.9.0'}
- /@babel/core@7.23.6:
- resolution: {integrity: sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==}
+ /@babel/core@7.23.9:
+ resolution: {integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==}
engines: {node: '>=6.9.0'}
dependencies:
'@ampproject/remapping': 2.2.1
'@babel/code-frame': 7.23.5
'@babel/generator': 7.23.6
'@babel/helper-compilation-targets': 7.23.6
- '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
- '@babel/helpers': 7.23.6
- '@babel/parser': 7.23.6
- '@babel/template': 7.22.15
- '@babel/traverse': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9)
+ '@babel/helpers': 7.23.9
+ '@babel/parser': 7.23.9
+ '@babel/template': 7.23.9
+ '@babel/traverse': 7.23.9
+ '@babel/types': 7.23.9
convert-source-map: 2.0.0
debug: 4.3.4
gensync: 1.0.0-beta.2
@@ -1676,23 +1728,23 @@ packages:
resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
'@jridgewell/gen-mapping': 0.3.3
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.22
jsesc: 2.5.2
/@babel/helper-annotate-as-pure@7.22.5:
resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
/@babel/helper-builder-binary-assignment-operator-visitor@7.22.15:
resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
/@babel/helper-compilation-targets@7.23.6:
@@ -1701,46 +1753,46 @@ packages:
dependencies:
'@babel/compat-data': 7.23.5
'@babel/helper-validator-option': 7.23.5
- browserslist: 4.22.2
+ browserslist: 4.22.3
lru-cache: 5.1.1
semver: 6.3.1
- /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.23.6):
+ /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.23.9):
resolution: {integrity: sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
'@babel/helper-member-expression-to-functions': 7.22.15
'@babel/helper-optimise-call-expression': 7.22.5
- '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.6)
+ '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9)
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
semver: 6.3.1
dev: false
- /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.23.6):
+ /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.23.9):
resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-annotate-as-pure': 7.22.5
regexpu-core: 5.3.2
semver: 6.3.1
dev: false
- /@babel/helper-define-polyfill-provider@0.4.3(@babel/core@7.23.6):
- resolution: {integrity: sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==}
+ /@babel/helper-define-polyfill-provider@0.5.0(@babel/core@7.23.9):
+ resolution: {integrity: sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
debug: 4.3.4
@@ -1758,35 +1810,35 @@ packages:
resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/template': 7.22.15
- '@babel/types': 7.23.6
+ '@babel/template': 7.23.9
+ '@babel/types': 7.23.9
/@babel/helper-hoist-variables@7.22.5:
resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
/@babel/helper-member-expression-to-functions@7.22.15:
resolution: {integrity: sha512-qLNsZbgrNh0fDQBCPocSL8guki1hcPvltGDv/NxvUoABwFq7GkKSu1nRXeJkVZc+wJvne2E0RKQz+2SQrz6eAA==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
/@babel/helper-module-imports@7.22.15:
resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
- /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6):
+ /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-module-imports': 7.22.15
'@babel/helper-simple-access': 7.22.5
@@ -1797,7 +1849,7 @@ packages:
resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
/@babel/helper-plugin-utils@7.22.5:
@@ -1805,25 +1857,25 @@ packages:
engines: {node: '>=6.9.0'}
dev: false
- /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.23.6):
+ /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.23.9):
resolution: {integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-wrap-function': 7.22.20
dev: false
- /@babel/helper-replace-supers@7.22.20(@babel/core@7.23.6):
+ /@babel/helper-replace-supers@7.22.20(@babel/core@7.23.9):
resolution: {integrity: sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-member-expression-to-functions': 7.22.15
'@babel/helper-optimise-call-expression': 7.22.5
@@ -1833,20 +1885,20 @@ packages:
resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
/@babel/helper-skip-transparent-expression-wrappers@7.22.5:
resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
/@babel/helper-split-export-declaration@7.22.6:
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
/@babel/helper-string-parser@7.23.4:
resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==}
@@ -1866,16 +1918,16 @@ packages:
dependencies:
'@babel/helper-function-name': 7.23.0
'@babel/template': 7.22.15
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: false
- /@babel/helpers@7.23.6:
- resolution: {integrity: sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==}
+ /@babel/helpers@7.23.9:
+ resolution: {integrity: sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/template': 7.22.15
- '@babel/traverse': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/template': 7.23.9
+ '@babel/traverse': 7.23.9
+ '@babel/types': 7.23.9
transitivePeerDependencies:
- supports-color
@@ -1888,856 +1940,855 @@ packages:
chalk: 2.4.2
js-tokens: 4.0.0
- /@babel/parser@7.23.6:
- resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==}
+ /@babel/parser@7.23.9:
+ resolution: {integrity: sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
- /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.13.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
- '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.6)
+ '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.9)
dev: false
- /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.23.3(@babel/core@7.23.6):
- resolution: {integrity: sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==}
+ /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.23.7(@babel/core@7.23.9):
+ resolution: {integrity: sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.6):
+ /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.9):
resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
dev: false
- /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.6):
+ /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.9):
resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.6):
+ /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.9):
resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.23.6):
+ /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.23.9):
resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-import-attributes@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-import-attributes@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.23.6):
+ /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.23.9):
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.6):
+ /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.9):
resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.23.6):
+ /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.23.9):
resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.23.6):
+ /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.23.9):
resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.23.6):
+ /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.23.9):
resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.23.6):
+ /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.23.9):
resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.23.6):
+ /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.23.9):
resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-arrow-functions@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-arrow-functions@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-async-generator-functions@7.23.4(@babel/core@7.23.6):
- resolution: {integrity: sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw==}
+ /@babel/plugin-transform-async-generator-functions@7.23.9(@babel/core@7.23.9):
+ resolution: {integrity: sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-plugin-utils': 7.22.5
- '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.6)
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.6)
+ '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.9)
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-async-to-generator@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-async-to-generator@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-module-imports': 7.22.15
'@babel/helper-plugin-utils': 7.22.5
- '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.6)
+ '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-block-scoped-functions@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-block-scoped-functions@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-block-scoping@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-block-scoping@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-class-properties@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-class-properties@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-class-static-block@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-class-static-block@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.12.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.6)
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-classes@7.23.5(@babel/core@7.23.6):
- resolution: {integrity: sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==}
+ /@babel/plugin-transform-classes@7.23.8(@babel/core@7.23.9):
+ resolution: {integrity: sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-annotate-as-pure': 7.22.5
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
- '@babel/helper-optimise-call-expression': 7.22.5
'@babel/helper-plugin-utils': 7.22.5
- '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.6)
+ '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9)
'@babel/helper-split-export-declaration': 7.22.6
globals: 11.12.0
dev: false
- /@babel/plugin-transform-computed-properties@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-computed-properties@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
'@babel/template': 7.22.15
dev: false
- /@babel/plugin-transform-destructuring@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-destructuring@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-dotall-regex@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-dotall-regex@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-duplicate-keys@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-duplicate-keys@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-dynamic-import@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-dynamic-import@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-exponentiation-operator@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-exponentiation-operator@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-export-namespace-from@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-export-namespace-from@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-for-of@7.23.6(@babel/core@7.23.6):
+ /@babel/plugin-transform-for-of@7.23.6(@babel/core@7.23.9):
resolution: {integrity: sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
dev: false
- /@babel/plugin-transform-function-name@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-function-name@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-function-name': 7.23.0
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-json-strings@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-json-strings@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-literals@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-literals@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-logical-assignment-operators@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-logical-assignment-operators@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.6)
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-member-expression-literals@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-member-expression-literals@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-modules-amd@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-modules-amd@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-simple-access': 7.22.5
dev: false
- /@babel/plugin-transform-modules-systemjs@7.23.3(@babel/core@7.23.6):
- resolution: {integrity: sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==}
+ /@babel/plugin-transform-modules-systemjs@7.23.9(@babel/core@7.23.9):
+ resolution: {integrity: sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-hoist-variables': 7.22.5
- '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
+ '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-validator-identifier': 7.22.20
dev: false
- /@babel/plugin-transform-modules-umd@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-modules-umd@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.23.6):
+ /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.23.9):
resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-new-target@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-new-target@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-nullish-coalescing-operator@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-nullish-coalescing-operator@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-numeric-separator@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-numeric-separator@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.6)
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-object-rest-spread@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-object-rest-spread@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.23.5
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-object-super@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-object-super@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.6)
+ '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-optional-catch-binding@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-optional-catch-binding@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-optional-chaining@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-optional-chaining@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.6)
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-parameters@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-parameters@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-private-methods@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-private-methods@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-private-property-in-object@7.23.4(@babel/core@7.23.6):
+ /@babel/plugin-transform-private-property-in-object@7.23.4(@babel/core@7.23.9):
resolution: {integrity: sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-annotate-as-pure': 7.22.5
- '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.6)
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.9)
dev: false
- /@babel/plugin-transform-property-literals@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-property-literals@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-regenerator@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-regenerator@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
regenerator-transform: 0.15.2
dev: false
- /@babel/plugin-transform-reserved-words@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-reserved-words@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-spread@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-spread@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
dev: false
- /@babel/plugin-transform-sticky-regex@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-sticky-regex@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-template-literals@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-template-literals@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-typeof-symbol@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-typeof-symbol@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-unicode-escapes@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-unicode-escapes@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-unicode-property-regex@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-unicode-property-regex@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-unicode-regex@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-unicode-regex@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/plugin-transform-unicode-sets-regex@7.23.3(@babel/core@7.23.6):
+ /@babel/plugin-transform-unicode-sets-regex@7.23.3(@babel/core@7.23.9):
resolution: {integrity: sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9)
'@babel/helper-plugin-utils': 7.22.5
dev: false
- /@babel/preset-env@7.23.6(@babel/core@7.23.6):
- resolution: {integrity: sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ==}
+ /@babel/preset-env@7.23.9(@babel/core@7.23.9):
+ resolution: {integrity: sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.23.5
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
'@babel/helper-validator-option': 7.23.5
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.6)
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.6)
- '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.6)
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.6)
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-import-attributes': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.23.6)
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.6)
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.6)
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.6)
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.6)
- '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.23.6)
- '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.23.6)
- '@babel/plugin-transform-arrow-functions': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-async-generator-functions': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-async-to-generator': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-block-scoped-functions': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-class-properties': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-class-static-block': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-classes': 7.23.5(@babel/core@7.23.6)
- '@babel/plugin-transform-computed-properties': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-destructuring': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-dotall-regex': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-duplicate-keys': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-dynamic-import': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-exponentiation-operator': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-export-namespace-from': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-for-of': 7.23.6(@babel/core@7.23.6)
- '@babel/plugin-transform-function-name': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-json-strings': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-literals': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-logical-assignment-operators': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-member-expression-literals': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-modules-amd': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-modules-systemjs': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-modules-umd': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.23.6)
- '@babel/plugin-transform-new-target': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-nullish-coalescing-operator': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-numeric-separator': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-object-rest-spread': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-object-super': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-optional-catch-binding': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-private-methods': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-private-property-in-object': 7.23.4(@babel/core@7.23.6)
- '@babel/plugin-transform-property-literals': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-regenerator': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-reserved-words': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-shorthand-properties': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-spread': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-sticky-regex': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-template-literals': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-typeof-symbol': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-unicode-escapes': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-unicode-property-regex': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-unicode-regex': 7.23.3(@babel/core@7.23.6)
- '@babel/plugin-transform-unicode-sets-regex': 7.23.3(@babel/core@7.23.6)
- '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.23.6)
- babel-plugin-polyfill-corejs2: 0.4.6(@babel/core@7.23.6)
- babel-plugin-polyfill-corejs3: 0.8.5(@babel/core@7.23.6)
- babel-plugin-polyfill-regenerator: 0.5.3(@babel/core@7.23.6)
- core-js-compat: 3.33.0
+ '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.23.7(@babel/core@7.23.9)
+ '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.9)
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.9)
+ '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.9)
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.9)
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-import-attributes': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.23.9)
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.9)
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.9)
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.9)
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.9)
+ '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.23.9)
+ '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.23.9)
+ '@babel/plugin-transform-arrow-functions': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-async-generator-functions': 7.23.9(@babel/core@7.23.9)
+ '@babel/plugin-transform-async-to-generator': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-block-scoped-functions': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-class-properties': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-class-static-block': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-classes': 7.23.8(@babel/core@7.23.9)
+ '@babel/plugin-transform-computed-properties': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-destructuring': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-dotall-regex': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-duplicate-keys': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-dynamic-import': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-exponentiation-operator': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-export-namespace-from': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-for-of': 7.23.6(@babel/core@7.23.9)
+ '@babel/plugin-transform-function-name': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-json-strings': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-literals': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-logical-assignment-operators': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-member-expression-literals': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-modules-amd': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-modules-systemjs': 7.23.9(@babel/core@7.23.9)
+ '@babel/plugin-transform-modules-umd': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.23.9)
+ '@babel/plugin-transform-new-target': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-nullish-coalescing-operator': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-numeric-separator': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-object-rest-spread': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-object-super': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-optional-catch-binding': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-private-methods': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-private-property-in-object': 7.23.4(@babel/core@7.23.9)
+ '@babel/plugin-transform-property-literals': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-regenerator': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-reserved-words': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-shorthand-properties': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-spread': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-sticky-regex': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-template-literals': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-typeof-symbol': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-unicode-escapes': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-unicode-property-regex': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-unicode-regex': 7.23.3(@babel/core@7.23.9)
+ '@babel/plugin-transform-unicode-sets-regex': 7.23.3(@babel/core@7.23.9)
+ '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.23.9)
+ babel-plugin-polyfill-corejs2: 0.4.8(@babel/core@7.23.9)
+ babel-plugin-polyfill-corejs3: 0.9.0(@babel/core@7.23.9)
+ babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.23.9)
+ core-js-compat: 3.35.0
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dev: false
- /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.23.6):
+ /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.23.9):
resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==}
peerDependencies:
'@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/helper-plugin-utils': 7.22.5
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
esutils: 2.0.3
dev: false
@@ -2745,11 +2796,11 @@ packages:
resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==}
dev: false
- /@babel/runtime@7.23.6:
- resolution: {integrity: sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==}
+ /@babel/runtime@7.23.9:
+ resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==}
engines: {node: '>=6.9.0'}
dependencies:
- regenerator-runtime: 0.14.0
+ regenerator-runtime: 0.14.1
dev: false
/@babel/standalone@7.22.20:
@@ -2762,11 +2813,20 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.23.5
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
+ dev: false
+
+ /@babel/template@7.23.9:
+ resolution: {integrity: sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/code-frame': 7.23.5
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
- /@babel/traverse@7.23.6:
- resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==}
+ /@babel/traverse@7.23.9:
+ resolution: {integrity: sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.23.5
@@ -2775,23 +2835,23 @@ packages:
'@babel/helper-function-name': 7.23.0
'@babel/helper-hoist-variables': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
debug: 4.3.4
globals: 11.12.0
transitivePeerDependencies:
- supports-color
- /@babel/types@7.23.6:
- resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==}
+ /@babel/types@7.23.9:
+ resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-string-parser': 7.23.4
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
- /@cloudflare/workerd-darwin-64@1.20231030.0:
- resolution: {integrity: sha512-J4PQ9utPxLya9yHdMMx3AZeC5M/6FxcoYw6jo9jbDDFTy+a4Gslqf4Im9We3aeOEdPXa3tgQHVQOSelJSZLhIw==}
+ /@cloudflare/workerd-darwin-64@1.20240129.0:
+ resolution: {integrity: sha512-DfVVB5IsQLVcWPJwV019vY3nEtU88c2Qu2ST5SQxqcGivZ52imagLRK0RHCIP8PK4piSiq90qUC6ybppUsw8eg==}
engines: {node: '>=16'}
cpu: [x64]
os: [darwin]
@@ -2799,8 +2859,8 @@ packages:
dev: true
optional: true
- /@cloudflare/workerd-darwin-arm64@1.20231030.0:
- resolution: {integrity: sha512-WSJJjm11Del4hSneiNB7wTXGtBXI4QMCH9l5qf4iT5PAW8cESGcCmdHtWDWDtGAAGcvmLT04KNvmum92vRKKQQ==}
+ /@cloudflare/workerd-darwin-arm64@1.20240129.0:
+ resolution: {integrity: sha512-t0q8ABkmumG1zRM/MZ/vIv/Ysx0vTAXnQAPy/JW5aeQi/tqrypXkO9/NhPc0jbF/g/hIPrWEqpDgEp3CB7Da7Q==}
engines: {node: '>=16'}
cpu: [arm64]
os: [darwin]
@@ -2808,8 +2868,8 @@ packages:
dev: true
optional: true
- /@cloudflare/workerd-linux-64@1.20231030.0:
- resolution: {integrity: sha512-2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g==}
+ /@cloudflare/workerd-linux-64@1.20240129.0:
+ resolution: {integrity: sha512-sFV1uobHgDI+6CKBS/ZshQvOvajgwl6BtiYaH4PSFSpvXTmRx+A9bcug+6BnD+V4WgwxTiEO2iR97E1XuwDAVw==}
engines: {node: '>=16'}
cpu: [x64]
os: [linux]
@@ -2817,8 +2877,8 @@ packages:
dev: true
optional: true
- /@cloudflare/workerd-linux-arm64@1.20231030.0:
- resolution: {integrity: sha512-4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ==}
+ /@cloudflare/workerd-linux-arm64@1.20240129.0:
+ resolution: {integrity: sha512-O7q7htHaFRp8PgTqNJx1/fYc3+LnvAo6kWWB9a14C5OWak6AAZk42PNpKPx+DXTmGvI+8S1+futBGUeJ8NPDXg==}
engines: {node: '>=16'}
cpu: [arm64]
os: [linux]
@@ -2826,8 +2886,8 @@ packages:
dev: true
optional: true
- /@cloudflare/workerd-windows-64@1.20231030.0:
- resolution: {integrity: sha512-fb/Jgj8Yqy3PO1jLhk7mTrHMkR8jklpbQFud6rL/aMAn5d6MQbaSrYOCjzkKGp0Zng8D2LIzSl+Fc0C9Sggxjg==}
+ /@cloudflare/workerd-windows-64@1.20240129.0:
+ resolution: {integrity: sha512-YqGno0XSqqqkDmNoGEX6M8kJlI2lEfWntbTPVtHaZlaXVR9sWfoD7TEno0NKC95cXFz+ioyFLbgbOdnfWwmVAA==}
engines: {node: '>=16'}
cpu: [x64]
os: [win32]
@@ -2883,6 +2943,15 @@ packages:
- '@algolia/client-search'
dev: true
+ /@esbuild/aix-ppc64@0.19.11:
+ resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==}
+ engines: {node: '>=12'}
+ cpu: [ppc64]
+ os: [aix]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/android-arm64@0.18.20:
resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
engines: {node: '>=12'}
@@ -2892,6 +2961,15 @@ packages:
dev: true
optional: true
+ /@esbuild/android-arm64@0.19.11:
+ resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/android-arm64@0.19.3:
resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==}
engines: {node: '>=12'}
@@ -2909,6 +2987,15 @@ packages:
dev: true
optional: true
+ /@esbuild/android-arm@0.19.11:
+ resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/android-arm@0.19.3:
resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==}
engines: {node: '>=12'}
@@ -2926,6 +3013,15 @@ packages:
dev: true
optional: true
+ /@esbuild/android-x64@0.19.11:
+ resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/android-x64@0.19.3:
resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==}
engines: {node: '>=12'}
@@ -2943,6 +3039,15 @@ packages:
dev: true
optional: true
+ /@esbuild/darwin-arm64@0.19.11:
+ resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [darwin]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/darwin-arm64@0.19.3:
resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==}
engines: {node: '>=12'}
@@ -2960,6 +3065,15 @@ packages:
dev: true
optional: true
+ /@esbuild/darwin-x64@0.19.11:
+ resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [darwin]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/darwin-x64@0.19.3:
resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==}
engines: {node: '>=12'}
@@ -2977,6 +3091,15 @@ packages:
dev: true
optional: true
+ /@esbuild/freebsd-arm64@0.19.11:
+ resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [freebsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/freebsd-arm64@0.19.3:
resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==}
engines: {node: '>=12'}
@@ -2994,6 +3117,15 @@ packages:
dev: true
optional: true
+ /@esbuild/freebsd-x64@0.19.11:
+ resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [freebsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/freebsd-x64@0.19.3:
resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==}
engines: {node: '>=12'}
@@ -3011,6 +3143,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-arm64@0.19.11:
+ resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-arm64@0.19.3:
resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==}
engines: {node: '>=12'}
@@ -3028,6 +3169,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-arm@0.19.11:
+ resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-arm@0.19.3:
resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==}
engines: {node: '>=12'}
@@ -3045,6 +3195,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-ia32@0.19.11:
+ resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-ia32@0.19.3:
resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==}
engines: {node: '>=12'}
@@ -3062,6 +3221,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-loong64@0.19.11:
+ resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==}
+ engines: {node: '>=12'}
+ cpu: [loong64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-loong64@0.19.3:
resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==}
engines: {node: '>=12'}
@@ -3079,6 +3247,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-mips64el@0.19.11:
+ resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==}
+ engines: {node: '>=12'}
+ cpu: [mips64el]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-mips64el@0.19.3:
resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==}
engines: {node: '>=12'}
@@ -3096,6 +3273,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-ppc64@0.19.11:
+ resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==}
+ engines: {node: '>=12'}
+ cpu: [ppc64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-ppc64@0.19.3:
resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==}
engines: {node: '>=12'}
@@ -3113,6 +3299,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-riscv64@0.19.11:
+ resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==}
+ engines: {node: '>=12'}
+ cpu: [riscv64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-riscv64@0.19.3:
resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==}
engines: {node: '>=12'}
@@ -3130,6 +3325,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-s390x@0.19.11:
+ resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==}
+ engines: {node: '>=12'}
+ cpu: [s390x]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-s390x@0.19.3:
resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==}
engines: {node: '>=12'}
@@ -3147,6 +3351,15 @@ packages:
dev: true
optional: true
+ /@esbuild/linux-x64@0.19.11:
+ resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-x64@0.19.3:
resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==}
engines: {node: '>=12'}
@@ -3164,6 +3377,15 @@ packages:
dev: true
optional: true
+ /@esbuild/netbsd-x64@0.19.11:
+ resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [netbsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/netbsd-x64@0.19.3:
resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==}
engines: {node: '>=12'}
@@ -3181,6 +3403,15 @@ packages:
dev: true
optional: true
+ /@esbuild/openbsd-x64@0.19.11:
+ resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [openbsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/openbsd-x64@0.19.3:
resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==}
engines: {node: '>=12'}
@@ -3198,6 +3429,15 @@ packages:
dev: true
optional: true
+ /@esbuild/sunos-x64@0.19.11:
+ resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [sunos]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/sunos-x64@0.19.3:
resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==}
engines: {node: '>=12'}
@@ -3215,6 +3455,15 @@ packages:
dev: true
optional: true
+ /@esbuild/win32-arm64@0.19.11:
+ resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/win32-arm64@0.19.3:
resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==}
engines: {node: '>=12'}
@@ -3232,6 +3481,15 @@ packages:
dev: true
optional: true
+ /@esbuild/win32-ia32@0.19.11:
+ resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/win32-ia32@0.19.3:
resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==}
engines: {node: '>=12'}
@@ -3249,6 +3507,15 @@ packages:
dev: true
optional: true
+ /@esbuild/win32-x64@0.19.11:
+ resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/win32-x64@0.19.3:
resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==}
engines: {node: '>=12'}
@@ -3257,13 +3524,13 @@ packages:
requiresBuild: true
optional: true
- /@eslint-community/eslint-utils@4.4.0(eslint@8.55.0):
+ /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
- eslint: 8.55.0
+ eslint: 8.56.0
eslint-visitor-keys: 3.4.3
dev: true
@@ -3272,12 +3539,8 @@ packages:
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
dev: true
- /@eslint-types/import@2.29.0-1:
- resolution: {integrity: sha512-cmlKmWLY9PKmsxKdb5DlXZBe6SV3fIyhoMj+lBVUeW5d9Dvqs62Hk+jskz4D9B3x+dEwDez29ScTog04K8WpUQ==}
- dev: true
-
- /@eslint-types/typescript-eslint@6.12.0:
- resolution: {integrity: sha512-N8cbOYjyFl2BFgDhDgHhTGpgiMkFg0CoITG5hdBm9ZGmcEgUvFBnHvHG7qJl3qVEmFnoKUdfSAcr7MRb2/Jxvw==}
+ /@eslint-types/typescript-eslint@6.19.1:
+ resolution: {integrity: sha512-X0farz1+psE6Qfx6+ISQQ/J3ZetKlUeuTIN9Zt/agx4UXrgK6daH/n9ba776JxysK6YJCRaEHng/bcQQUm+BsA==}
dev: true
/@eslint/eslintrc@2.1.4:
@@ -3297,11 +3560,16 @@ packages:
- supports-color
dev: true
- /@eslint/js@8.55.0:
- resolution: {integrity: sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==}
+ /@eslint/js@8.56.0:
+ resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@fastify/busboy@2.1.0:
+ resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
+ engines: {node: '>=14'}
+ dev: true
+
/@humanwhocodes/config-array@0.11.13:
resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
engines: {node: '>=10.10.0'}
@@ -3350,9 +3618,9 @@ packages:
resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==}
engines: {node: '>=6.0.0'}
dependencies:
- '@jridgewell/set-array': 1.1.1
+ '@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.22
/@jridgewell/gen-mapping@0.3.3:
resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}
@@ -3360,16 +3628,12 @@ packages:
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.22
/@jridgewell/resolve-uri@3.1.1:
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
engines: {node: '>=6.0.0'}
- /@jridgewell/set-array@1.1.1:
- resolution: {integrity: sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==}
- engines: {node: '>=6.0.0'}
-
/@jridgewell/set-array@1.1.2:
resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==}
engines: {node: '>=6.0.0'}
@@ -3378,14 +3642,14 @@ packages:
resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.22
dev: true
/@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
- /@jridgewell/trace-mapping@0.3.20:
- resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==}
+ /@jridgewell/trace-mapping@0.3.22:
+ resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
@@ -3407,7 +3671,7 @@ packages:
nopt: 5.0.0
npmlog: 5.0.1
rimraf: 3.0.2
- semver: 7.5.4
+ semver: 7.6.0
tar: 6.1.11
transitivePeerDependencies:
- encoding
@@ -3439,8 +3703,8 @@ packages:
dev: true
optional: true
- /@polka/url@1.0.0-next.21:
- resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
+ /@polka/url@1.0.0-next.24:
+ resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==}
dev: true
/@rollup/plugin-alias@5.0.0(rollup@3.29.2):
@@ -3501,7 +3765,7 @@ packages:
estree-walker: 2.0.2
glob: 8.1.0
is-reference: 1.2.1
- magic-string: 0.30.5
+ magic-string: 0.30.7
rollup: 4.2.0
dev: true
@@ -3518,7 +3782,7 @@ packages:
astring: 1.8.6
estree-walker: 2.0.2
fast-glob: 3.3.2
- magic-string: 0.30.5
+ magic-string: 0.30.7
rollup: 4.2.0
dev: true
@@ -3535,8 +3799,8 @@ packages:
rollup: 3.29.2
dev: true
- /@rollup/plugin-json@6.0.1(rollup@4.2.0):
- resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==}
+ /@rollup/plugin-json@6.1.0(rollup@4.2.0):
+ resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
@@ -3598,8 +3862,8 @@ packages:
rollup: 3.29.2
dev: true
- /@rollup/plugin-typescript@11.1.5(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2):
- resolution: {integrity: sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==}
+ /@rollup/plugin-typescript@11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2):
+ resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^2.14.0||^3.0.0||^4.0.0
@@ -3747,6 +4011,16 @@ packages:
requiresBuild: true
optional: true
+ /@shikijs/core@1.0.0:
+ resolution: {integrity: sha512-UMKGMZ+8b88N0/n6DWwWth1PHsOaxjW+R2u+hzSiargZWTv+l3s1l8dhuIxUSsEUPlBDKLs2CSMiFZeviKQM1w==}
+ dev: true
+
+ /@shikijs/transformers@1.0.0:
+ resolution: {integrity: sha512-US0Sc0OdH7eGL64BtfvX3XezPfqhqF5mPyBFLlbZqSpFt2/emnv9GveAWzELGsIuvXoJ6N1RjeAdmQx5Xni6BQ==}
+ dependencies:
+ shiki: 1.0.0
+ dev: true
+
/@sinclair/typebox@0.27.8:
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
dev: true
@@ -3766,8 +4040,8 @@ packages:
/@types/babel__core@7.20.5:
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
dependencies:
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
'@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1
'@types/babel__traverse': 7.17.1
@@ -3776,7 +4050,7 @@ packages:
/@types/babel__generator@7.6.4:
resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: true
/@types/babel__preset-env@7.9.6:
@@ -3786,14 +4060,14 @@ packages:
/@types/babel__template@7.4.1:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies:
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
dev: true
/@types/babel__traverse@7.17.1:
resolution: {integrity: sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: true
/@types/braces@3.0.1:
@@ -3807,7 +4081,7 @@ packages:
/@types/cross-spawn@6.0.6:
resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==}
dependencies:
- '@types/node': 20.10.4
+ '@types/node': 20.11.16
dev: true
/@types/debug@4.1.12:
@@ -3835,38 +4109,24 @@ packages:
/@types/etag@1.8.3:
resolution: {integrity: sha512-QYHv9Yeh1ZYSMPQOoxY4XC4F1r+xRUiAriB303F4G6uBsT3KKX60DjiogvVv+2VISVDuJhcIzMdbjT+Bm938QQ==}
dependencies:
- '@types/node': 20.10.4
+ '@types/node': 20.11.16
dev: true
/@types/fs-extra@11.0.4:
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
dependencies:
'@types/jsonfile': 6.1.1
- '@types/node': 20.10.4
- dev: true
-
- /@types/hast@3.0.3:
- resolution: {integrity: sha512-2fYGlaDy/qyLlhidX42wAH0KBi2TCjKMH8CHmBXgRlJ3Y+OXTiqsPQ6IWarZKwF1JoUcAJdPogv1d4b0COTpmQ==}
- dependencies:
- '@types/unist': 3.0.2
+ '@types/node': 20.11.16
dev: true
/@types/json-schema@7.0.12:
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==}
dev: true
- /@types/json-stable-stringify@1.0.36:
- resolution: {integrity: sha512-b7bq23s4fgBB76n34m2b3RBf6M369B0Z9uRR8aHTMd8kZISRkmDEpPD8hhpYvDFzr3bJCPES96cm3Q6qRNDbQw==}
- dev: true
-
- /@types/json5@0.0.29:
- resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
- dev: true
-
/@types/jsonfile@6.1.1:
resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==}
dependencies:
- '@types/node': 20.10.4
+ '@types/node': 20.11.16
dev: true
/@types/less@3.0.6:
@@ -3888,12 +4148,6 @@ packages:
'@types/mdurl': 1.0.2
dev: true
- /@types/mdast@4.0.3:
- resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==}
- dependencies:
- '@types/unist': 3.0.2
- dev: true
-
/@types/mdurl@1.0.2:
resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==}
dev: true
@@ -3918,8 +4172,8 @@ packages:
undici-types: 5.26.5
dev: true
- /@types/node@20.10.4:
- resolution: {integrity: sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==}
+ /@types/node@20.11.16:
+ resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==}
dependencies:
undici-types: 5.26.5
@@ -3949,7 +4203,7 @@ packages:
/@types/sass@1.43.1:
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
dependencies:
- '@types/node': 20.10.4
+ '@types/node': 20.11.16
dev: true
/@types/semver@7.5.6:
@@ -3959,11 +4213,7 @@ packages:
/@types/stylus@0.48.42:
resolution: {integrity: sha512-CPGlr5teL4sqdap+EOowMifLuNGeIoLwc0VQ7u/BPxo+ocqiNa5jeVt0H0IVBblEh6ZwX1sGpIQIFnSSr8NBQA==}
dependencies:
- '@types/node': 20.10.4
- dev: true
-
- /@types/unist@3.0.2:
- resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
+ '@types/node': 20.11.16
dev: true
/@types/web-bluetooth@0.0.20:
@@ -3973,11 +4223,11 @@ packages:
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
- '@types/node': 20.10.4
+ '@types/node': 20.11.16
dev: true
- /@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.2.2):
- resolution: {integrity: sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==}
+ /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
@@ -3988,25 +4238,25 @@ packages:
optional: true
dependencies:
'@eslint-community/regexpp': 4.9.1
- '@typescript-eslint/parser': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
- '@typescript-eslint/scope-manager': 6.14.0
- '@typescript-eslint/type-utils': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
- '@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
- '@typescript-eslint/visitor-keys': 6.14.0
+ '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/scope-manager': 6.21.0
+ '@typescript-eslint/type-utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2)
+ '@typescript-eslint/visitor-keys': 6.21.0
debug: 4.3.4
- eslint: 8.55.0
+ eslint: 8.56.0
graphemer: 1.4.0
ignore: 5.2.4
natural-compare: 1.4.0
- semver: 7.5.4
+ semver: 7.6.0
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser@6.14.0(eslint@8.55.0)(typescript@5.2.2):
- resolution: {integrity: sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==}
+ /@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
@@ -4015,27 +4265,27 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 6.14.0
- '@typescript-eslint/types': 6.14.0
- '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2)
- '@typescript-eslint/visitor-keys': 6.14.0
+ '@typescript-eslint/scope-manager': 6.21.0
+ '@typescript-eslint/types': 6.21.0
+ '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2)
+ '@typescript-eslint/visitor-keys': 6.21.0
debug: 4.3.4
- eslint: 8.55.0
+ eslint: 8.56.0
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/scope-manager@6.14.0:
- resolution: {integrity: sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==}
+ /@typescript-eslint/scope-manager@6.21.0:
+ resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.14.0
- '@typescript-eslint/visitor-keys': 6.14.0
+ '@typescript-eslint/types': 6.21.0
+ '@typescript-eslint/visitor-keys': 6.21.0
dev: true
- /@typescript-eslint/type-utils@6.14.0(eslint@8.55.0)(typescript@5.2.2):
- resolution: {integrity: sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==}
+ /@typescript-eslint/type-utils@6.21.0(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
@@ -4044,23 +4294,23 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2)
- '@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
+ '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2)
+ '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.2.2)
debug: 4.3.4
- eslint: 8.55.0
+ eslint: 8.56.0
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/types@6.14.0:
- resolution: {integrity: sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==}
+ /@typescript-eslint/types@6.21.0:
+ resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
- /@typescript-eslint/typescript-estree@6.14.0(typescript@5.2.2):
- resolution: {integrity: sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==}
+ /@typescript-eslint/typescript-estree@6.21.0(typescript@5.2.2):
+ resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
@@ -4068,42 +4318,43 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 6.14.0
- '@typescript-eslint/visitor-keys': 6.14.0
+ '@typescript-eslint/types': 6.21.0
+ '@typescript-eslint/visitor-keys': 6.21.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
- semver: 7.5.4
+ minimatch: 9.0.3
+ semver: 7.6.0
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/utils@6.14.0(eslint@8.55.0)(typescript@5.2.2):
- resolution: {integrity: sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==}
+ /@typescript-eslint/utils@6.21.0(eslint@8.56.0)(typescript@5.2.2):
+ resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@types/json-schema': 7.0.12
'@types/semver': 7.5.6
- '@typescript-eslint/scope-manager': 6.14.0
- '@typescript-eslint/types': 6.14.0
- '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2)
- eslint: 8.55.0
- semver: 7.5.4
+ '@typescript-eslint/scope-manager': 6.21.0
+ '@typescript-eslint/types': 6.21.0
+ '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.2.2)
+ eslint: 8.56.0
+ semver: 7.6.0
transitivePeerDependencies:
- supports-color
- typescript
dev: true
- /@typescript-eslint/visitor-keys@6.14.0:
- resolution: {integrity: sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==}
+ /@typescript-eslint/visitor-keys@6.21.0:
+ resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.14.0
+ '@typescript-eslint/types': 6.21.0
eslint-visitor-keys: 3.4.3
dev: true
@@ -4111,15 +4362,15 @@ packages:
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true
- /@vitejs/plugin-vue@4.5.0(vite@packages+vite)(vue@3.3.11):
- resolution: {integrity: sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==}
- engines: {node: ^14.18.0 || >=16.0.0}
+ /@vitejs/plugin-vue@5.0.3(vite@packages+vite)(vue@3.4.15):
+ resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==}
+ engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
vite: '*'
vue: ^3.2.25
dependencies:
vite: link:packages/vite
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
dev: true
/@vitejs/release-scripts@1.3.1:
@@ -4130,43 +4381,44 @@ packages:
picocolors: 1.0.0
prompts: 2.4.2
publint: 0.2.2
- semver: 7.5.4
+ semver: 7.6.0
dev: true
- /@vitest/expect@1.0.4:
- resolution: {integrity: sha512-/NRN9N88qjg3dkhmFcCBwhn/Ie4h064pY3iv7WLRsDJW7dXnEgeoa8W9zy7gIPluhz6CkgqiB3HmpIXgmEY5dQ==}
+ /@vitest/expect@1.2.2:
+ resolution: {integrity: sha512-3jpcdPAD7LwHUUiT2pZTj2U82I2Tcgg2oVPvKxhn6mDI2On6tfvPQTjAI4628GUGDZrCm4Zna9iQHm5cEexOAg==}
dependencies:
- '@vitest/spy': 1.0.4
- '@vitest/utils': 1.0.4
+ '@vitest/spy': 1.2.2
+ '@vitest/utils': 1.2.2
chai: 4.3.10
dev: true
- /@vitest/runner@1.0.4:
- resolution: {integrity: sha512-rhOQ9FZTEkV41JWXozFM8YgOqaG9zA7QXbhg5gy6mFOVqh4PcupirIJ+wN7QjeJt8S8nJRYuZH1OjJjsbxAXTQ==}
+ /@vitest/runner@1.2.2:
+ resolution: {integrity: sha512-JctG7QZ4LSDXr5CsUweFgcpEvrcxOV1Gft7uHrvkQ+fsAVylmWQvnaAr/HDp3LAH1fztGMQZugIheTWjaGzYIg==}
dependencies:
- '@vitest/utils': 1.0.4
+ '@vitest/utils': 1.2.2
p-limit: 5.0.0
- pathe: 1.1.1
+ pathe: 1.1.2
dev: true
- /@vitest/snapshot@1.0.4:
- resolution: {integrity: sha512-vkfXUrNyNRA/Gzsp2lpyJxh94vU2OHT1amoD6WuvUAA12n32xeVZQ0KjjQIf8F6u7bcq2A2k969fMVxEsxeKYA==}
+ /@vitest/snapshot@1.2.2:
+ resolution: {integrity: sha512-SmGY4saEw1+bwE1th6S/cZmPxz/Q4JWsl7LvbQIky2tKE35US4gd0Mjzqfr84/4OD0tikGWaWdMja/nWL5NIPA==}
dependencies:
- magic-string: 0.30.5
- pathe: 1.1.1
+ magic-string: 0.30.7
+ pathe: 1.1.2
pretty-format: 29.7.0
dev: true
- /@vitest/spy@1.0.4:
- resolution: {integrity: sha512-9ojTFRL1AJVh0hvfzAQpm0QS6xIS+1HFIw94kl/1ucTfGCaj1LV/iuJU4Y6cdR03EzPDygxTHwE1JOm+5RCcvA==}
+ /@vitest/spy@1.2.2:
+ resolution: {integrity: sha512-k9Gcahssw8d7X3pSLq3e3XEu/0L78mUkCjivUqCQeXJm9clfXR/Td8+AP+VC1O6fKPIDLcHDTAmBOINVuv6+7g==}
dependencies:
tinyspy: 2.2.0
dev: true
- /@vitest/utils@1.0.4:
- resolution: {integrity: sha512-gsswWDXxtt0QvtK/y/LWukN7sGMYmnCcv1qv05CsY6cU/Y1zpGX1QuvLs+GO1inczpE6Owixeel3ShkjhYtGfA==}
+ /@vitest/utils@1.2.2:
+ resolution: {integrity: sha512-WKITBHLsBHlpjnDQahr+XK6RE7MiAsgrIkr0pGhQ9ygoxBfUeG0lUG5iLlzqjmKSlBv3+j5EGsriBzh+C3Tq9g==}
dependencies:
diff-sequences: 29.6.3
+ estree-walker: 3.0.3
loupe: 2.3.7
pretty-format: 29.7.0
dev: true
@@ -4174,18 +4426,19 @@ packages:
/@vue/compiler-core@3.2.0:
resolution: {integrity: sha512-+kfA4pisto26tcEh9Naf/qrizplYWnkBLHu3fX5Yu0c47RVBteVG3dHENFczl3Egwra+5NP5f3YuOgxK1ZMbNQ==}
dependencies:
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
'@vue/shared': 3.2.0
estree-walker: 2.0.2
source-map: 0.6.1
dev: true
- /@vue/compiler-core@3.3.11:
- resolution: {integrity: sha512-h97/TGWBilnLuRaj58sxNrsUU66fwdRKLOLQ9N/5iNDfp+DZhYH9Obhe0bXxhedl8fjAgpRANpiZfbgWyruQ0w==}
+ /@vue/compiler-core@3.4.15:
+ resolution: {integrity: sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==}
dependencies:
- '@babel/parser': 7.23.6
- '@vue/shared': 3.3.11
+ '@babel/parser': 7.23.9
+ '@vue/shared': 3.4.15
+ entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.0.2
@@ -4196,48 +4449,61 @@ packages:
'@vue/shared': 3.2.0
dev: true
- /@vue/compiler-dom@3.3.11:
- resolution: {integrity: sha512-zoAiUIqSKqAJ81WhfPXYmFGwDRuO+loqLxvXmfUdR5fOitPoUiIeFI9cTTyv9MU5O1+ZZglJVTusWzy+wfk5hw==}
+ /@vue/compiler-dom@3.4.15:
+ resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==}
dependencies:
- '@vue/compiler-core': 3.3.11
- '@vue/shared': 3.3.11
+ '@vue/compiler-core': 3.4.15
+ '@vue/shared': 3.4.15
- /@vue/compiler-sfc@3.3.11:
- resolution: {integrity: sha512-U4iqPlHO0KQeK1mrsxCN0vZzw43/lL8POxgpzcJweopmqtoYy9nljJzWDIQS3EfjiYhfdtdk9Gtgz7MRXnz3GA==}
+ /@vue/compiler-sfc@3.4.15:
+ resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==}
dependencies:
- '@babel/parser': 7.23.6
- '@vue/compiler-core': 3.3.11
- '@vue/compiler-dom': 3.3.11
- '@vue/compiler-ssr': 3.3.11
- '@vue/reactivity-transform': 3.3.11
- '@vue/shared': 3.3.11
+ '@babel/parser': 7.23.9
+ '@vue/compiler-core': 3.4.15
+ '@vue/compiler-dom': 3.4.15
+ '@vue/compiler-ssr': 3.4.15
+ '@vue/shared': 3.4.15
estree-walker: 2.0.2
- magic-string: 0.30.5
- postcss: 8.4.32
+ magic-string: 0.30.7
+ postcss: 8.4.35
source-map-js: 1.0.2
- /@vue/compiler-ssr@3.3.11:
- resolution: {integrity: sha512-Zd66ZwMvndxRTgVPdo+muV4Rv9n9DwQ4SSgWWKWkPFebHQfVYRrVjeygmmDmPewsHyznCNvJ2P2d6iOOhdv8Qg==}
+ /@vue/compiler-ssr@3.4.15:
+ resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==}
dependencies:
- '@vue/compiler-dom': 3.3.11
- '@vue/shared': 3.3.11
+ '@vue/compiler-dom': 3.4.15
+ '@vue/shared': 3.4.15
/@vue/devtools-api@6.5.0:
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
dev: false
- /@vue/devtools-api@6.5.1:
- resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
+ /@vue/devtools-api@7.0.14:
+ resolution: {integrity: sha512-TluWR9qZ6aO11bwtYK8+fzXxBqLfsE0mWZz1q/EQBmO9k82Cm6deieLwNNXjNFJz7xutazoia5Qa+zTYkPPOfw==}
+ dependencies:
+ '@vue/devtools-kit': 7.0.14
dev: true
- /@vue/reactivity-transform@3.3.11:
- resolution: {integrity: sha512-fPGjH0wqJo68A0wQ1k158utDq/cRyZNlFoxGwNScE28aUFOKFEnCBsvyD8jHn+0kd0UKVpuGuaZEQ6r9FJRqCg==}
+ /@vue/devtools-kit@7.0.14:
+ resolution: {integrity: sha512-wAAJazr4hI0aVRpgWOCVPw+NzMQdthhnprHHIg4njp1MkKrpCNGQ7MtQbZF1AltAA7xpMCGyyt+0kYH0FqTiPg==}
dependencies:
- '@babel/parser': 7.23.6
- '@vue/compiler-core': 3.3.11
- '@vue/shared': 3.3.11
- estree-walker: 2.0.2
- magic-string: 0.30.5
+ '@vue/devtools-schema': 7.0.14
+ '@vue/devtools-shared': 7.0.14
+ hookable: 5.5.3
+ mitt: 3.0.1
+ perfect-debounce: 1.0.0
+ speakingurl: 14.0.1
+ dev: true
+
+ /@vue/devtools-schema@7.0.14:
+ resolution: {integrity: sha512-tpUeCLVrdHX+KzWMLTAwx/vAPFbo6jAUi7sr6Q+0mBIqIVSSIxNr5wEhegiFvYva+OtDeM2OrT+f7/X/5bvZNg==}
+ dev: true
+
+ /@vue/devtools-shared@7.0.14:
+ resolution: {integrity: sha512-79RP1NDakBVWou9rDpVnT1WMjTbL1lJKm6YEOodjQ0dq5ehf0wsRbeYDhgAlnjehWRzTq5GAYFBFUPYBs0/QpA==}
+ dependencies:
+ rfdc: 1.3.1
+ dev: true
/@vue/reactivity@3.2.0:
resolution: {integrity: sha512-39L3UJe8+jYeCTM/QrDglDM05O11UrmyhazUOHOOj7+a9pPVu95HGInh5CkKQf98mx2gq6t3PPN8bCN5wK8Wwg==}
@@ -4245,10 +4511,10 @@ packages:
'@vue/shared': 3.2.0
dev: true
- /@vue/reactivity@3.3.11:
- resolution: {integrity: sha512-D5tcw091f0nuu+hXq5XANofD0OXnBmaRqMYl5B3fCR+mX+cXJIGNw/VNawBqkjLNWETrFW0i+xH9NvDbTPVh7g==}
+ /@vue/reactivity@3.4.15:
+ resolution: {integrity: sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==}
dependencies:
- '@vue/shared': 3.3.11
+ '@vue/shared': 3.4.15
/@vue/runtime-core@3.2.0:
resolution: {integrity: sha512-mZlkYTcw3mVwClwFTpql4hkDfOweHE/w+9r3Yb3UPwRs75bSJXMBRUikw1GVx01bZQ8VQPjBYowCElcWNSlKig==}
@@ -4257,11 +4523,11 @@ packages:
'@vue/shared': 3.2.0
dev: true
- /@vue/runtime-core@3.3.11:
- resolution: {integrity: sha512-g9ztHGwEbS5RyWaOpXuyIVFTschclnwhqEbdy5AwGhYOgc7m/q3NFwr50MirZwTTzX55JY8pSkeib9BX04NIpw==}
+ /@vue/runtime-core@3.4.15:
+ resolution: {integrity: sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==}
dependencies:
- '@vue/reactivity': 3.3.11
- '@vue/shared': 3.3.11
+ '@vue/reactivity': 3.4.15
+ '@vue/shared': 3.4.15
/@vue/runtime-dom@3.2.0:
resolution: {integrity: sha512-NCHMfrUwpJelCTINpMRLFhzWKJkl07slabmTbECZFJnkdDfFkptGCWll42q58bbvwGmpAPDzNI3yYch72pcKwg==}
@@ -4271,43 +4537,47 @@ packages:
csstype: 2.6.21
dev: true
- /@vue/runtime-dom@3.3.11:
- resolution: {integrity: sha512-OlhtV1PVpbgk+I2zl+Y5rQtDNcCDs12rsRg71XwaA2/Rbllw6mBLMi57VOn8G0AjOJ4Mdb4k56V37+g8ukShpQ==}
+ /@vue/runtime-dom@3.4.15:
+ resolution: {integrity: sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==}
dependencies:
- '@vue/runtime-core': 3.3.11
- '@vue/shared': 3.3.11
- csstype: 3.1.2
+ '@vue/runtime-core': 3.4.15
+ '@vue/shared': 3.4.15
+ csstype: 3.1.3
- /@vue/server-renderer@3.3.11(vue@3.3.11):
- resolution: {integrity: sha512-AIWk0VwwxCAm4wqtJyxBylRTXSy1wCLOKbWxHaHiu14wjsNYtiRCSgVuqEPVuDpErOlRdNnuRgipQfXRLjLN5A==}
+ /@vue/server-renderer@3.4.15(vue@3.4.15):
+ resolution: {integrity: sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==}
peerDependencies:
- vue: 3.3.11
+ vue: 3.4.15
dependencies:
- '@vue/compiler-ssr': 3.3.11
- '@vue/shared': 3.3.11
- vue: 3.3.11(typescript@5.2.2)
+ '@vue/compiler-ssr': 3.4.15
+ '@vue/shared': 3.4.15
+ vue: 3.4.15(typescript@5.2.2)
/@vue/shared@3.2.0:
resolution: {integrity: sha512-MgdilC3YHYSCFuNlxZBgugh8B9/h/h+nQ6lkeaxqFWW+FnV/JzCwW4Bh5bYIYvBleG8QZjFwxdmdqSAWLXzgEA==}
dev: true
- /@vue/shared@3.3.11:
- resolution: {integrity: sha512-u2G8ZQ9IhMWTMXaWqZycnK4UthG1fA238CD+DP4Dm4WJi5hdUKKLg0RMRaRpDPNMdkTwIDkp7WtD0Rd9BH9fLw==}
+ /@vue/shared@3.4.15:
+ resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==}
+
+ /@vue/shared@3.4.16:
+ resolution: {integrity: sha512-HKCjeaxR+R95dCw1BDaytcHdlzZj9lxj7RlFnxWtcKq670t8oSeMsbPlkzkNc2V6IUzHaMtUxdBcdREAhb+7NA==}
+ dev: false
- /@vueuse/core@10.6.1(vue@3.3.11):
- resolution: {integrity: sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==}
+ /@vueuse/core@10.7.2(vue@3.4.15):
+ resolution: {integrity: sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==}
dependencies:
'@types/web-bluetooth': 0.0.20
- '@vueuse/metadata': 10.6.1
- '@vueuse/shared': 10.6.1(vue@3.3.11)
- vue-demi: 0.14.6(vue@3.3.11)
+ '@vueuse/metadata': 10.7.2
+ '@vueuse/shared': 10.7.2(vue@3.4.15)
+ vue-demi: 0.14.6(vue@3.4.15)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: true
- /@vueuse/integrations@10.6.1(focus-trap@7.5.4)(vue@3.3.11):
- resolution: {integrity: sha512-mPDupuofMJ4DPmtX/FfP1MajmWRzYDv8WSaTCo8LQ5kFznjWgmUQ16ApjYqgMquqffNY6+IRMdMgosLDRZOSZA==}
+ /@vueuse/integrations@10.7.2(focus-trap@7.5.4)(vue@3.4.15):
+ resolution: {integrity: sha512-+u3RLPFedjASs5EKPc69Ge49WNgqeMfSxFn+qrQTzblPXZg6+EFzhjarS5edj2qAf6xQ93f95TUxRwKStXj/sQ==}
peerDependencies:
async-validator: '*'
axios: '*'
@@ -4347,23 +4617,23 @@ packages:
universal-cookie:
optional: true
dependencies:
- '@vueuse/core': 10.6.1(vue@3.3.11)
- '@vueuse/shared': 10.6.1(vue@3.3.11)
+ '@vueuse/core': 10.7.2(vue@3.4.15)
+ '@vueuse/shared': 10.7.2(vue@3.4.15)
focus-trap: 7.5.4
- vue-demi: 0.14.6(vue@3.3.11)
+ vue-demi: 0.14.6(vue@3.4.15)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: true
- /@vueuse/metadata@10.6.1:
- resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==}
+ /@vueuse/metadata@10.7.2:
+ resolution: {integrity: sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==}
dev: true
- /@vueuse/shared@10.6.1(vue@3.3.11):
- resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==}
+ /@vueuse/shared@10.7.2(vue@3.4.15):
+ resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
dependencies:
- vue-demi: 0.14.6(vue@3.3.11)
+ vue-demi: 0.14.6(vue@3.4.15)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -4388,21 +4658,24 @@ packages:
mime-types: 2.1.35
negotiator: 0.6.3
- /acorn-jsx@5.3.2(acorn@8.11.2):
+ /acorn-jsx@5.3.2(acorn@8.11.3):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
dev: true
- /acorn-walk@8.3.1(acorn@8.11.2):
- resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==}
+ /acorn-walk@8.3.2(acorn@8.11.3):
+ resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
engines: {node: '>=0.4.0'}
peerDependencies:
acorn: '*'
+ peerDependenciesMeta:
+ acorn:
+ optional: true
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
/acorn@7.4.1:
resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==}
@@ -4410,8 +4683,8 @@ packages:
hasBin: true
dev: true
- /acorn@8.11.2:
- resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==}
+ /acorn@8.11.3:
+ resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
engines: {node: '>=0.4.0'}
hasBin: true
@@ -4528,13 +4801,6 @@ packages:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: true
- /array-buffer-byte-length@1.0.0:
- resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
- dependencies:
- call-bind: 1.0.2
- is-array-buffer: 3.0.2
- dev: true
-
/array-find-index@1.0.2:
resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==}
engines: {node: '>=0.10.0'}
@@ -4547,63 +4813,14 @@ packages:
resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==}
dev: true
- /array-includes@3.1.7:
- resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- get-intrinsic: 1.2.1
- is-string: 1.0.7
- dev: true
-
/array-union@2.1.0:
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
dev: true
- /array.prototype.findlastindex@1.2.3:
- resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- es-shim-unscopables: 1.0.0
- get-intrinsic: 1.2.1
- dev: true
-
- /array.prototype.flat@1.3.2:
- resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- es-shim-unscopables: 1.0.0
- dev: true
-
- /array.prototype.flatmap@1.3.2:
- resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- es-shim-unscopables: 1.0.0
- dev: true
-
- /arraybuffer.prototype.slice@1.0.1:
- resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==}
- engines: {node: '>= 0.4'}
- dependencies:
- array-buffer-byte-length: 1.0.0
- call-bind: 1.0.2
- define-properties: 1.2.0
- get-intrinsic: 1.2.1
- is-array-buffer: 3.0.2
- is-shared-array-buffer: 1.0.2
+ /artichokie@0.2.0:
+ resolution: {integrity: sha512-LXtOFWUNABHEo49FJpwOf8VLzOJ1iGV9xu9ezwnveI75LIqGhUDDjMFo3MkUmtc+t3oDZRMATuVMrt6d8FCvrQ==}
+ engines: {node: ^18.0.0 || >=20.0.0}
dev: true
/as-table@1.0.55:
@@ -4633,8 +4850,8 @@ packages:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
dev: false
- /autoprefixer@10.4.16:
- resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==}
+ /autoprefixer@10.4.17:
+ resolution: {integrity: sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
peerDependencies:
@@ -4643,61 +4860,56 @@ packages:
postcss:
optional: true
dependencies:
- browserslist: 4.22.2
- caniuse-lite: 1.0.30001538
- fraction.js: 4.3.6
+ browserslist: 4.22.3
+ caniuse-lite: 1.0.30001579
+ fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.0.0
postcss-value-parser: 4.2.0
dev: false
- /available-typed-arrays@1.0.5:
- resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==}
- engines: {node: '>= 0.4'}
- dev: true
-
- /axios@1.6.2:
- resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==}
+ /axios@1.6.7:
+ resolution: {integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==}
dependencies:
- follow-redirects: 1.15.0(debug@4.3.4)
+ follow-redirects: 1.15.4
form-data: 4.0.0
proxy-from-env: 1.1.0
transitivePeerDependencies:
- debug
dev: false
- /babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.23.6):
- resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==}
+ /babel-plugin-polyfill-corejs2@0.4.8(@babel/core@7.23.9):
+ resolution: {integrity: sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
'@babel/compat-data': 7.23.5
- '@babel/core': 7.23.6
- '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.9)
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dev: false
- /babel-plugin-polyfill-corejs3@0.8.5(@babel/core@7.23.6):
- resolution: {integrity: sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA==}
+ /babel-plugin-polyfill-corejs3@0.9.0(@babel/core@7.23.9):
+ resolution: {integrity: sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.6)
- core-js-compat: 3.33.0
+ '@babel/core': 7.23.9
+ '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.9)
+ core-js-compat: 3.35.0
transitivePeerDependencies:
- supports-color
dev: false
- /babel-plugin-polyfill-regenerator@0.5.3(@babel/core@7.23.6):
- resolution: {integrity: sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==}
+ /babel-plugin-polyfill-regenerator@0.5.5(@babel/core@7.23.9):
+ resolution: {integrity: sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==}
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
dependencies:
- '@babel/core': 7.23.6
- '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.6)
+ '@babel/core': 7.23.9
+ '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.9)
transitivePeerDependencies:
- supports-color
dev: false
@@ -4706,7 +4918,7 @@ packages:
resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==}
engines: {node: '>= 10.0.0'}
dependencies:
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
dev: true
/balanced-match@1.0.2:
@@ -4769,15 +4981,15 @@ packages:
dependencies:
fill-range: 7.0.1
- /browserslist@4.22.2:
- resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
+ /browserslist@4.22.3:
+ resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
- caniuse-lite: 1.0.30001566
- electron-to-chromium: 1.4.601
+ caniuse-lite: 1.0.30001585
+ electron-to-chromium: 1.4.661
node-releases: 2.0.14
- update-browserslist-db: 1.0.13(browserslist@4.22.2)
+ update-browserslist-db: 1.0.13(browserslist@4.22.3)
/buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
@@ -4791,14 +5003,7 @@ packages:
/builtins@5.0.1:
resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==}
dependencies:
- semver: 7.5.4
- dev: true
-
- /busboy@1.6.0:
- resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
- engines: {node: '>=10.16.0'}
- dependencies:
- streamsearch: 1.1.0
+ semver: 7.6.0
dev: true
/bytes@3.1.2:
@@ -4816,14 +5021,6 @@ packages:
function-bind: 1.1.2
get-intrinsic: 1.2.1
- /call-bind@1.0.5:
- resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==}
- dependencies:
- function-bind: 1.1.2
- get-intrinsic: 1.2.1
- set-function-length: 1.1.1
- dev: true
-
/callsites@3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
@@ -4833,12 +5030,12 @@ packages:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
engines: {node: '>= 6'}
- /caniuse-lite@1.0.30001538:
- resolution: {integrity: sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==}
+ /caniuse-lite@1.0.30001579:
+ resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==}
dev: false
- /caniuse-lite@1.0.30001566:
- resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==}
+ /caniuse-lite@1.0.30001585:
+ resolution: {integrity: sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==}
/capnp-ts@0.7.0:
resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==}
@@ -4849,10 +5046,6 @@ packages:
- supports-color
dev: true
- /ccount@2.0.1:
- resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
- dev: true
-
/chai@4.3.10:
resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==}
engines: {node: '>=4'}
@@ -4888,14 +5081,6 @@ packages:
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
dev: true
- /character-entities-html4@2.1.0:
- resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
- dev: true
-
- /character-entities-legacy@3.0.0:
- resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==}
- dev: true
-
/character-parser@2.2.0:
resolution: {integrity: sha1-x84o821LzZdE5f/CxfzeHHMmH8A=}
dependencies:
@@ -4908,8 +5093,8 @@ packages:
get-func-name: 2.0.2
dev: true
- /chokidar@3.5.3(patch_hash=dzxbf3kgof5pdmbsyih2x43sq4):
- resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
+ /chokidar@3.6.0(patch_hash=bckcfsslxcffppz65mxcq6naau):
+ resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
engines: {node: '>= 8.10.0'}
dependencies:
anymatch: 3.1.2
@@ -4994,10 +5179,6 @@ packages:
delayed-stream: 1.0.0
dev: false
- /comma-separated-tokens@2.0.3:
- resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
- dev: true
-
/commander@11.1.0:
resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
engines: {node: '>=16'}
@@ -5059,8 +5240,8 @@ packages:
/constantinople@4.0.1:
resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==}
dependencies:
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
dev: true
/content-disposition@0.5.4:
@@ -5165,7 +5346,7 @@ packages:
handlebars: 4.7.7
json-stringify-safe: 5.0.1
meow: 12.1.1
- semver: 7.5.4
+ semver: 7.6.0
split2: 4.2.0
dev: true
@@ -5218,14 +5399,14 @@ packages:
is-what: 3.14.1
dev: true
- /core-js-compat@3.33.0:
- resolution: {integrity: sha512-0w4LcLXsVEuNkIqwjjf9rjCoPhK8uqA4tMRh4Ge26vfLtUutshn+aRJU21I9LCJlh2QQHfisNToLjw1XEJLTWw==}
+ /core-js-compat@3.35.0:
+ resolution: {integrity: sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==}
dependencies:
- browserslist: 4.22.2
+ browserslist: 4.22.3
dev: false
- /core-js@3.34.0:
- resolution: {integrity: sha512-aDdvlDder8QmY91H88GzNi9EtQi2TjvQhpCX6B1v/dAZHU1AuLgHvRh54RiOerpEhEW46Tkf+vgAViB/CWC0ag==}
+ /core-js@3.35.1:
+ resolution: {integrity: sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==}
requiresBuild: true
dev: false
@@ -5262,8 +5443,8 @@ packages:
resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==}
dev: true
- /csstype@3.1.2:
- resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
+ /csstype@3.1.3:
+ resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
/d@1.0.1:
resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==}
@@ -5334,28 +5515,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
- /define-data-property@1.1.1:
- resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- get-intrinsic: 1.2.1
- gopd: 1.0.1
- has-property-descriptors: 1.0.0
- dev: true
-
/define-lazy-prop@2.0.0:
resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
engines: {node: '>=8'}
dev: true
- /define-properties@1.2.0:
- resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-property-descriptors: 1.0.0
- object-keys: 1.1.1
- dev: true
-
/defu@6.1.2:
resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==}
dev: true
@@ -5377,11 +5541,6 @@ packages:
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
engines: {node: '>= 0.8'}
- /dequal@2.0.3:
- resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
- engines: {node: '>=6'}
- dev: true
-
/destroy@1.2.0:
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
@@ -5397,12 +5556,6 @@ packages:
engines: {node: '>=8'}
dev: false
- /devlop@1.1.0:
- resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
- dependencies:
- dequal: 2.0.3
- dev: true
-
/didyoumean@1.2.2:
resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
@@ -5425,13 +5578,6 @@ packages:
/dlv@1.1.3:
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
- /doctrine@2.1.0:
- resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
- engines: {node: '>=0.10.0'}
- dependencies:
- esutils: 2.0.3
- dev: true
-
/doctrine@3.0.0:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
@@ -5456,8 +5602,8 @@ packages:
dev: true
patched: true
- /dotenv@16.3.1:
- resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==}
+ /dotenv@16.4.1:
+ resolution: {integrity: sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==}
engines: {node: '>=12'}
dev: true
@@ -5468,8 +5614,8 @@ packages:
/ee-first@1.1.1:
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
- /electron-to-chromium@1.4.601:
- resolution: {integrity: sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==}
+ /electron-to-chromium@1.4.661:
+ resolution: {integrity: sha512-AFg4wDHSOk5F+zA8aR+SVIOabu7m0e7BiJnigCvPXzIGy731XENw/lmNxTySpVFtkFEy+eyt4oHhh5FF3NjQNw==}
/emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
@@ -5491,6 +5637,10 @@ packages:
engines: {node: '>=0.12'}
dev: true
+ /entities@4.5.0:
+ resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
+ engines: {node: '>=0.12'}
+
/errno@0.1.8:
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
hasBin: true
@@ -5506,79 +5656,10 @@ packages:
is-arrayish: 0.2.1
dev: true
- /es-abstract@1.22.1:
- resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==}
- engines: {node: '>= 0.4'}
- dependencies:
- array-buffer-byte-length: 1.0.0
- arraybuffer.prototype.slice: 1.0.1
- 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
- get-intrinsic: 1.2.1
- get-symbol-description: 1.0.0
- globalthis: 1.0.3
- gopd: 1.0.1
- has: 1.0.3
- has-property-descriptors: 1.0.0
- has-proto: 1.0.1
- has-symbols: 1.0.3
- internal-slot: 1.0.5
- is-array-buffer: 3.0.2
- is-callable: 1.2.7
- is-negative-zero: 2.0.2
- is-regex: 1.1.4
- is-shared-array-buffer: 1.0.2
- is-string: 1.0.7
- is-typed-array: 1.1.10
- 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
- safe-regex-test: 1.0.0
- string.prototype.trim: 1.2.7
- string.prototype.trimend: 1.0.6
- string.prototype.trimstart: 1.0.6
- 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.11
- dev: true
-
/es-module-lexer@1.4.1:
resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==}
dev: true
- /es-set-tostringtag@2.0.1:
- resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==}
- engines: {node: '>= 0.4'}
- dependencies:
- get-intrinsic: 1.2.1
- has: 1.0.3
- has-tostringtag: 1.0.0
- dev: true
-
- /es-shim-unscopables@1.0.0:
- resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==}
- dependencies:
- has: 1.0.3
- dev: true
-
- /es-to-primitive@1.2.1:
- resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
- engines: {node: '>= 0.4'}
- dependencies:
- is-callable: 1.2.7
- is-date-object: 1.0.5
- is-symbol: 1.0.4
- dev: true
-
/es5-ext@0.10.62:
resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==}
engines: {node: '>=0.10'}
@@ -5604,6 +5685,20 @@ packages:
ext: 1.6.0
dev: false
+ /esbuild-plugin-browserslist@0.11.1(browserslist@4.22.3):
+ resolution: {integrity: sha512-yNdZRdDBEbm0PT4q2bJBhXvnwakXG5mG8ipiwGe5SRDPnKa7L7kQm2tHuBMowBtcFz6kRtZTv5njK7PJwU+tCQ==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ browserslist: ^4.21.8
+ esbuild: ~0.20.0
+ dependencies:
+ browserslist: 4.22.3
+ debug: 4.3.4
+ zod: 3.21.4
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
+
/esbuild@0.18.20:
resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
engines: {node: '>=12'}
@@ -5634,6 +5729,37 @@ packages:
'@esbuild/win32-x64': 0.18.20
dev: true
+ /esbuild@0.19.11:
+ resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==}
+ engines: {node: '>=12'}
+ hasBin: true
+ requiresBuild: true
+ optionalDependencies:
+ '@esbuild/aix-ppc64': 0.19.11
+ '@esbuild/android-arm': 0.19.11
+ '@esbuild/android-arm64': 0.19.11
+ '@esbuild/android-x64': 0.19.11
+ '@esbuild/darwin-arm64': 0.19.11
+ '@esbuild/darwin-x64': 0.19.11
+ '@esbuild/freebsd-arm64': 0.19.11
+ '@esbuild/freebsd-x64': 0.19.11
+ '@esbuild/linux-arm': 0.19.11
+ '@esbuild/linux-arm64': 0.19.11
+ '@esbuild/linux-ia32': 0.19.11
+ '@esbuild/linux-loong64': 0.19.11
+ '@esbuild/linux-mips64el': 0.19.11
+ '@esbuild/linux-ppc64': 0.19.11
+ '@esbuild/linux-riscv64': 0.19.11
+ '@esbuild/linux-s390x': 0.19.11
+ '@esbuild/linux-x64': 0.19.11
+ '@esbuild/netbsd-x64': 0.19.11
+ '@esbuild/openbsd-x64': 0.19.11
+ '@esbuild/sunos-x64': 0.19.11
+ '@esbuild/win32-arm64': 0.19.11
+ '@esbuild/win32-ia32': 0.19.11
+ '@esbuild/win32-x64': 0.19.11
+ dev: true
+
/esbuild@0.19.3:
resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==}
engines: {node: '>=12'}
@@ -5680,17 +5806,17 @@ packages:
engines: {node: '>=10'}
dev: true
- /eslint-compat-utils@0.1.2(eslint@8.55.0):
+ /eslint-compat-utils@0.1.2(eslint@8.56.0):
resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==}
engines: {node: '>=12'}
peerDependencies:
eslint: '>=6.0.0'
dependencies:
- eslint: 8.55.0
+ eslint: 8.56.0
dev: true
- /eslint-define-config@2.0.0:
- resolution: {integrity: sha512-M8ao9mAE35BGwjZeT8ZlsRA42wcJHWS29Avd0qfeclRXig6uTnGXcaO7UxVyFzUA1VJtxeV/acw4KrhJA3JqxQ==}
+ /eslint-define-config@2.1.0:
+ resolution: {integrity: sha512-QUp6pM9pjKEVannNAbSJNeRuYwW3LshejfyBBpjeMGaJjaDUpVps4C6KVR8R7dWZnD3i0synmrE36znjTkJvdQ==}
engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>=8.6.0'}
dev: true
@@ -5704,7 +5830,7 @@ packages:
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.14.0)(eslint-import-resolver-node@0.3.9)(eslint@8.55.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
@@ -5725,90 +5851,78 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
+ '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.2.2)
debug: 3.2.7
- eslint: 8.55.0
+ eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-plugin-es-x@7.5.0(eslint@8.55.0):
+ /eslint-plugin-es-x@7.5.0(eslint@8.56.0):
resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
eslint: '>=8'
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@eslint-community/regexpp': 4.9.1
- eslint: 8.55.0
- eslint-compat-utils: 0.1.2(eslint@8.55.0)
+ eslint: 8.56.0
+ eslint-compat-utils: 0.1.2(eslint@8.56.0)
dev: true
- /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0):
- resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==}
- engines: {node: '>=4'}
+ /eslint-plugin-i@2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.56.0):
+ resolution: {integrity: sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==}
+ engines: {node: '>=12'}
peerDependencies:
- '@typescript-eslint/parser': '*'
- eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
- peerDependenciesMeta:
- '@typescript-eslint/parser':
- optional: true
+ eslint: ^7.2.0 || ^8
dependencies:
- '@typescript-eslint/parser': 6.14.0(eslint@8.55.0)(typescript@5.2.2)
- array-includes: 3.1.7
- array.prototype.findlastindex: 1.2.3
- array.prototype.flat: 1.3.2
- array.prototype.flatmap: 1.3.2
- debug: 3.2.7
- doctrine: 2.1.0
- eslint: 8.55.0
+ debug: 4.3.4
+ doctrine: 3.0.0
+ eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.14.0)(eslint-import-resolver-node@0.3.9)(eslint@8.55.0)
- hasown: 2.0.0
- is-core-module: 2.13.1
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0)
+ get-tsconfig: 4.7.2
is-glob: 4.0.3
minimatch: 3.1.2
- object.fromentries: 2.0.7
- object.groupby: 1.0.1
- object.values: 1.1.7
- semver: 6.3.1
- tsconfig-paths: 3.14.2
+ semver: 7.6.0
transitivePeerDependencies:
+ - '@typescript-eslint/parser'
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
dev: true
- /eslint-plugin-n@16.4.0(eslint@8.55.0):
- resolution: {integrity: sha512-IkqJjGoWYGskVaJA7WQuN8PINIxc0N/Pk/jLeYT4ees6Fo5lAhpwGsYek6gS9tCUxgDC4zJ+OwY2bY/6/9OMKQ==}
+ /eslint-plugin-n@16.6.2(eslint@8.56.0):
+ resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==}
engines: {node: '>=16.0.0'}
peerDependencies:
eslint: '>=7.0.0'
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
builtins: 5.0.1
- eslint: 8.55.0
- eslint-plugin-es-x: 7.5.0(eslint@8.55.0)
+ eslint: 8.56.0
+ eslint-plugin-es-x: 7.5.0(eslint@8.56.0)
get-tsconfig: 4.7.2
+ globals: 13.24.0
ignore: 5.2.4
is-builtin-module: 3.2.1
is-core-module: 2.13.1
minimatch: 3.1.2
resolve: 1.22.4
- semver: 7.5.4
+ semver: 7.6.0
dev: true
- /eslint-plugin-regexp@2.1.2(eslint@8.55.0):
- resolution: {integrity: sha512-nnhNqHblaD8YTJiEHfyVRhiw8sm0eFQ9h+ee3rMqJhf2R9sJWbSXkjrLxIeCNZSNqitUOdaYFfrPVyvS9i72AA==}
+ /eslint-plugin-regexp@2.2.0(eslint@8.56.0):
+ resolution: {integrity: sha512-0kwpiWiLRVBkVr3oIRQLl196sXP/NF6DQFefv9jtR4ZOgQR+6WID2pIZ0I+wIt54qgBPwBB7Gm2a+ueh8/WsFQ==}
engines: {node: ^18 || >=20}
peerDependencies:
eslint: '>=8.44.0'
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@eslint-community/regexpp': 4.9.1
comment-parser: 1.4.0
- eslint: 8.55.0
+ eslint: 8.56.0
jsdoc-type-pratt-parser: 4.0.0
refa: 0.12.1
regexp-ast-analysis: 0.7.1
@@ -5828,15 +5942,15 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /eslint@8.55.0:
- resolution: {integrity: sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==}
+ /eslint@8.56.0:
+ resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@eslint-community/regexpp': 4.9.1
'@eslint/eslintrc': 2.1.4
- '@eslint/js': 8.55.0
+ '@eslint/js': 8.56.0
'@humanwhocodes/config-array': 0.11.13
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
@@ -5879,8 +5993,8 @@ packages:
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
- acorn: 8.11.2
- acorn-jsx: 5.3.2(acorn@8.11.2)
+ acorn: 8.11.3
+ acorn-jsx: 5.3.2(acorn@8.11.3)
eslint-visitor-keys: 3.4.3
dev: true
@@ -6120,13 +6234,18 @@ packages:
optional: true
dependencies:
debug: 4.3.4
-
- /for-each@0.3.3:
- resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
- dependencies:
- is-callable: 1.2.7
dev: true
+ /follow-redirects@1.15.4:
+ resolution: {integrity: sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==}
+ engines: {node: '>=4.0'}
+ peerDependencies:
+ debug: '*'
+ peerDependenciesMeta:
+ debug:
+ optional: true
+ dev: false
+
/foreground-child@3.1.1:
resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
engines: {node: '>=14'}
@@ -6155,8 +6274,8 @@ packages:
resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
engines: {node: '>= 0.6'}
- /fraction.js@4.3.6:
- resolution: {integrity: sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==}
+ /fraction.js@4.3.7:
+ resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
dev: false
/fresh@0.5.2:
@@ -6195,20 +6314,6 @@ packages:
/function-bind@1.1.2:
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
- /function.prototype.name@1.1.5:
- resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- functions-have-names: 1.2.3
- dev: true
-
- /functions-have-names@1.2.3:
- resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
- dev: true
-
/gauge@3.0.2:
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
engines: {node: '>=10'}
@@ -6263,14 +6368,6 @@ packages:
engines: {node: '>=16'}
dev: true
- /get-symbol-description@1.0.0:
- resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- dev: true
-
/get-them-args@1.3.2:
resolution: {integrity: sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==}
dev: true
@@ -6297,7 +6394,7 @@ packages:
hasBin: true
dependencies:
meow: 12.1.1
- semver: 7.5.4
+ semver: 7.6.0
dev: true
/glob-parent@5.1.2:
@@ -6370,11 +6467,11 @@ packages:
type-fest: 0.20.2
dev: true
- /globalthis@1.0.3:
- resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
- engines: {node: '>= 0.4'}
+ /globals@13.24.0:
+ resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
+ engines: {node: '>=8'}
dependencies:
- define-properties: 1.2.0
+ type-fest: 0.20.2
dev: true
/globby@11.1.0:
@@ -6406,12 +6503,6 @@ packages:
delegate: 3.2.0
dev: false
- /gopd@1.0.1:
- resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
- dependencies:
- get-intrinsic: 1.2.1
- dev: true
-
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
requiresBuild: true
@@ -6434,10 +6525,6 @@ packages:
uglify-js: 3.17.4
dev: true
- /has-bigints@1.0.2:
- resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
- dev: true
-
/has-flag@3.0.0:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
@@ -6448,12 +6535,6 @@ packages:
engines: {node: '>=8'}
dev: true
- /has-property-descriptors@1.0.0:
- resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
- dependencies:
- get-intrinsic: 1.2.1
- dev: true
-
/has-proto@1.0.1:
resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
engines: {node: '>= 0.4'}
@@ -6484,89 +6565,6 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
function-bind: 1.1.2
- dev: true
-
- /hast-util-from-parse5@8.0.1:
- resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==}
- dependencies:
- '@types/hast': 3.0.3
- '@types/unist': 3.0.2
- devlop: 1.1.0
- hastscript: 8.0.0
- property-information: 6.4.0
- vfile: 6.0.1
- vfile-location: 5.0.2
- web-namespaces: 2.0.1
- dev: true
-
- /hast-util-parse-selector@4.0.0:
- resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==}
- dependencies:
- '@types/hast': 3.0.3
- dev: true
-
- /hast-util-raw@9.0.1:
- resolution: {integrity: sha512-5m1gmba658Q+lO5uqL5YNGQWeh1MYWZbZmWrM5lncdcuiXuo5E2HT/CIOp0rLF8ksfSwiCVJ3twlgVRyTGThGA==}
- dependencies:
- '@types/hast': 3.0.3
- '@types/unist': 3.0.2
- '@ungap/structured-clone': 1.2.0
- hast-util-from-parse5: 8.0.1
- hast-util-to-parse5: 8.0.0
- html-void-elements: 3.0.0
- mdast-util-to-hast: 13.0.2
- parse5: 7.1.2
- unist-util-position: 5.0.0
- unist-util-visit: 5.0.0
- vfile: 6.0.1
- web-namespaces: 2.0.1
- zwitch: 2.0.4
- dev: true
-
- /hast-util-to-html@9.0.0:
- resolution: {integrity: sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==}
- dependencies:
- '@types/hast': 3.0.3
- '@types/unist': 3.0.2
- ccount: 2.0.1
- comma-separated-tokens: 2.0.3
- hast-util-raw: 9.0.1
- hast-util-whitespace: 3.0.0
- html-void-elements: 3.0.0
- mdast-util-to-hast: 13.0.2
- property-information: 6.4.0
- space-separated-tokens: 2.0.2
- stringify-entities: 4.0.3
- zwitch: 2.0.4
- dev: true
-
- /hast-util-to-parse5@8.0.0:
- resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==}
- dependencies:
- '@types/hast': 3.0.3
- comma-separated-tokens: 2.0.3
- devlop: 1.1.0
- property-information: 6.4.0
- space-separated-tokens: 2.0.2
- web-namespaces: 2.0.1
- zwitch: 2.0.4
- dev: true
-
- /hast-util-whitespace@3.0.0:
- resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}
- dependencies:
- '@types/hast': 3.0.3
- dev: true
-
- /hastscript@8.0.0:
- resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==}
- dependencies:
- '@types/hast': 3.0.3
- comma-separated-tokens: 2.0.3
- hast-util-parse-selector: 4.0.0
- property-information: 6.4.0
- space-separated-tokens: 2.0.2
- dev: true
/hookable@5.5.3:
resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}
@@ -6579,10 +6577,6 @@ packages:
lru-cache: 10.0.1
dev: true
- /html-void-elements@3.0.0:
- resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}
- dev: true
-
/http-errors@2.0.0:
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
engines: {node: '>= 0.8'}
@@ -6634,7 +6628,7 @@ packages:
dev: true
optional: true
- /icss-utils@5.1.0(postcss@8.4.32):
+ /icss-utils@5.1.0(postcss@8.4.35):
resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
@@ -6643,7 +6637,7 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.35
dev: true
/ignore-walk@5.0.1:
@@ -6692,51 +6686,20 @@ packages:
/inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
- /internal-slot@1.0.5:
- resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- get-intrinsic: 1.2.1
- has: 1.0.3
- side-channel: 1.0.4
- dev: true
-
/ipaddr.js@1.9.1:
resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}
engines: {node: '>= 0.10'}
- /is-array-buffer@3.0.2:
- resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- is-typed-array: 1.1.10
- dev: true
-
/is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
dev: true
- /is-bigint@1.0.4:
- resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
- dependencies:
- has-bigints: 1.0.2
- dev: true
-
/is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'}
dependencies:
binary-extensions: 2.2.0
- /is-boolean-object@1.1.2:
- resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- has-tostringtag: 1.0.0
- dev: true
-
/is-builtin-module@3.2.1:
resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==}
engines: {node: '>=6'}
@@ -6744,33 +6707,10 @@ packages:
builtin-modules: 3.3.0
dev: true
- /is-callable@1.2.7:
- resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
- engines: {node: '>= 0.4'}
- dev: true
-
- /is-core-module@2.11.0:
- resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==}
- dependencies:
- has: 1.0.3
-
- /is-core-module@2.13.0:
- resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==}
- dependencies:
- has: 1.0.3
-
/is-core-module@2.13.1:
resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
dependencies:
hasown: 2.0.0
- dev: true
-
- /is-date-object@1.0.5:
- resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: true
/is-docker@2.2.1:
resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
@@ -6815,18 +6755,6 @@ packages:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
dev: true
- /is-negative-zero@2.0.2:
- resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
- engines: {node: '>= 0.4'}
- dev: true
-
- /is-number-object@1.0.7:
- resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: true
-
/is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
@@ -6865,31 +6793,11 @@ packages:
has-tostringtag: 1.0.0
dev: true
- /is-shared-array-buffer@1.0.2:
- resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==}
- dependencies:
- call-bind: 1.0.2
- dev: true
-
/is-stream@3.0.0:
resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
- /is-string@1.0.7:
- resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-tostringtag: 1.0.0
- dev: true
-
- /is-symbol@1.0.4:
- resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==}
- engines: {node: '>= 0.4'}
- dependencies:
- has-symbols: 1.0.3
- dev: true
-
/is-text-path@2.0.0:
resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==}
engines: {node: '>=8'}
@@ -6897,23 +6805,6 @@ packages:
text-extensions: 2.4.0
dev: true
- /is-typed-array@1.1.10:
- resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==}
- engines: {node: '>= 0.4'}
- dependencies:
- available-typed-arrays: 1.0.5
- call-bind: 1.0.2
- for-each: 0.3.3
- gopd: 1.0.1
- has-tostringtag: 1.0.0
- dev: true
-
- /is-weakref@1.0.2:
- resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==}
- dependencies:
- call-bind: 1.0.2
- dev: true
-
/is-what@3.14.1:
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
dev: true
@@ -6925,10 +6816,6 @@ packages:
is-docker: 2.2.1
dev: true
- /isarray@2.0.5:
- resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
- dev: true
-
/isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
dev: true
@@ -6953,6 +6840,10 @@ packages:
/js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
+ /js-tokens@8.0.2:
+ resolution: {integrity: sha512-Olnt+V7xYdvGze9YTbGFZIfQXuGV4R3nQwwl8BrtgaPE/wq8UFpUHWuTNc05saowhSr1ZO6tx+V6RjE9D5YQog==}
+ dev: true
+
/js-yaml@4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
@@ -6988,27 +6879,10 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true
- /json-stable-stringify@1.1.0:
- resolution: {integrity: sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.5
- isarray: 2.0.5
- jsonify: 0.0.1
- object-keys: 1.1.1
- dev: true
-
/json-stringify-safe@5.0.1:
resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
dev: true
- /json5@1.0.2:
- resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
- hasBin: true
- dependencies:
- minimist: 1.2.8
- dev: true
-
/json5@2.2.3:
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
@@ -7026,10 +6900,6 @@ packages:
graceful-fs: 4.2.11
dev: true
- /jsonify@0.0.1:
- resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==}
- dev: true
-
/jsonparse@1.3.1:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0}
@@ -7100,8 +6970,8 @@ packages:
type-check: 0.4.0
dev: true
- /lightningcss-darwin-arm64@1.22.1:
- resolution: {integrity: sha512-ldvElu+R0QimNTjsKpaZkUv3zf+uefzLy/R1R19jtgOfSRM+zjUCUgDhfEDRmVqJtMwYsdhMI2aJtJChPC6Osg==}
+ /lightningcss-darwin-arm64@1.23.0:
+ resolution: {integrity: sha512-kl4Pk3Q2lnE6AJ7Qaij47KNEfY2/UXRZBT/zqGA24B8qwkgllr/j7rclKOf1axcslNXvvUdztjo4Xqh39Yq1aA==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [darwin]
@@ -7109,8 +6979,8 @@ packages:
dev: true
optional: true
- /lightningcss-darwin-x64@1.22.1:
- resolution: {integrity: sha512-5p2rnlVTv6Gpw4PlTLq925nTVh+HFh4MpegX8dPDYJae+NFVjQ67gY7O6iHIzQjLipDiYejFF0yHrhjU3XgLBQ==}
+ /lightningcss-darwin-x64@1.23.0:
+ resolution: {integrity: sha512-KeRFCNoYfDdcolcFXvokVw+PXCapd2yHS1Diko1z1BhRz/nQuD5XyZmxjWdhmhN/zj5sH8YvWsp0/lPLVzqKpg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [darwin]
@@ -7118,8 +6988,8 @@ packages:
dev: true
optional: true
- /lightningcss-freebsd-x64@1.22.1:
- resolution: {integrity: sha512-1FaBtcFrZqB2hkFbAxY//Pnp8koThvyB6AhjbdVqKD4/pu13Rl91fKt2N9qyeQPUt3xy7ORUvSO+dPk3J6EjXg==}
+ /lightningcss-freebsd-x64@1.23.0:
+ resolution: {integrity: sha512-xhnhf0bWPuZxcqknvMDRFFo2TInrmQRWZGB0f6YoAsZX8Y+epfjHeeOIGCfAmgF0DgZxHwYc8mIR5tQU9/+ROA==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [freebsd]
@@ -7127,8 +6997,8 @@ packages:
dev: true
optional: true
- /lightningcss-linux-arm-gnueabihf@1.22.1:
- resolution: {integrity: sha512-6rub98tYGfE5I5j0BP8t/2d4BZyu1S7Iz9vUkm0H26snAFHYxLfj3RbQn0xHHIePSetjLnhcg3QlfwUAkD/FYg==}
+ /lightningcss-linux-arm-gnueabihf@1.23.0:
+ resolution: {integrity: sha512-fBamf/bULvmWft9uuX+bZske236pUZEoUlaHNBjnueaCTJ/xd8eXgb0cEc7S5o0Nn6kxlauMBnqJpF70Bgq3zg==}
engines: {node: '>= 12.0.0'}
cpu: [arm]
os: [linux]
@@ -7136,8 +7006,8 @@ packages:
dev: true
optional: true
- /lightningcss-linux-arm64-gnu@1.22.1:
- resolution: {integrity: sha512-nYO5qGtb/1kkTZu3FeTiM+2B2TAb7m2DkLCTgQIs2bk2o9aEs7I96fwySKcoHWQAiQDGR9sMux9vkV4KQXqPaQ==}
+ /lightningcss-linux-arm64-gnu@1.23.0:
+ resolution: {integrity: sha512-RS7sY77yVLOmZD6xW2uEHByYHhQi5JYWmgVumYY85BfNoVI3DupXSlzbw+b45A9NnVKq45+oXkiN6ouMMtTwfg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
@@ -7145,8 +7015,8 @@ packages:
dev: true
optional: true
- /lightningcss-linux-arm64-musl@1.22.1:
- resolution: {integrity: sha512-MCV6RuRpzXbunvzwY644iz8cw4oQxvW7oer9xPkdadYqlEyiJJ6wl7FyJOH7Q6ZYH4yjGAUCvxDBxPbnDu9ZVg==}
+ /lightningcss-linux-arm64-musl@1.23.0:
+ resolution: {integrity: sha512-cU00LGb6GUXCwof6ACgSMKo3q7XYbsyTj0WsKHLi1nw7pV0NCq8nFTn6ZRBYLoKiV8t+jWl0Hv8KkgymmK5L5g==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
@@ -7154,8 +7024,8 @@ packages:
dev: true
optional: true
- /lightningcss-linux-x64-gnu@1.22.1:
- resolution: {integrity: sha512-RjNgpdM20VUXgV7us/VmlO3Vn2ZRiDnc3/bUxCVvySZWPiVPprpqW/QDWuzkGa+NCUf6saAM5CLsZLSxncXJwg==}
+ /lightningcss-linux-x64-gnu@1.23.0:
+ resolution: {integrity: sha512-q4jdx5+5NfB0/qMbXbOmuC6oo7caPnFghJbIAV90cXZqgV8Am3miZhC4p+sQVdacqxfd+3nrle4C8icR3p1AYw==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
@@ -7163,8 +7033,8 @@ packages:
dev: true
optional: true
- /lightningcss-linux-x64-musl@1.22.1:
- resolution: {integrity: sha512-ZgO4C7Rd6Hv/5MnyY2KxOYmIlzk4rplVolDt3NbkNR8DndnyX0Q5IR4acJWNTBICQ21j3zySzKbcJaiJpk/4YA==}
+ /lightningcss-linux-x64-musl@1.23.0:
+ resolution: {integrity: sha512-G9Ri3qpmF4qef2CV/80dADHKXRAQeQXpQTLx7AiQrBYQHqBjB75oxqj06FCIe5g4hNCqLPnM9fsO4CyiT1sFSQ==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
@@ -7172,8 +7042,8 @@ packages:
dev: true
optional: true
- /lightningcss-win32-x64-msvc@1.22.1:
- resolution: {integrity: sha512-4pozV4eyD0MDET41ZLHAeBo+H04Nm2UEYIk5w/ts40231dRFV7E0cjwbnZvSoc1DXFgecAhiC0L16ruv/ZDCpg==}
+ /lightningcss-win32-x64-msvc@1.23.0:
+ resolution: {integrity: sha512-1rcBDJLU+obPPJM6qR5fgBUiCdZwZLafZM5f9kwjFLkb/UBNIzmae39uCSmh71nzPCTXZqHbvwu23OWnWEz+eg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [win32]
@@ -7181,21 +7051,21 @@ packages:
dev: true
optional: true
- /lightningcss@1.22.1:
- resolution: {integrity: sha512-Fy45PhibiNXkm0cK5FJCbfO8Y6jUpD/YcHf/BtuI+jvYYqSXKF4muk61jjE8YxCR9y+hDYIWSzHTc+bwhDE6rQ==}
+ /lightningcss@1.23.0:
+ resolution: {integrity: sha512-SEArWKMHhqn/0QzOtclIwH5pXIYQOUEkF8DgICd/105O+GCgd7jxjNod/QPnBCSWvpRHQBGVz5fQ9uScby03zA==}
engines: {node: '>= 12.0.0'}
dependencies:
detect-libc: 1.0.3
optionalDependencies:
- lightningcss-darwin-arm64: 1.22.1
- lightningcss-darwin-x64: 1.22.1
- lightningcss-freebsd-x64: 1.22.1
- lightningcss-linux-arm-gnueabihf: 1.22.1
- lightningcss-linux-arm64-gnu: 1.22.1
- lightningcss-linux-arm64-musl: 1.22.1
- lightningcss-linux-x64-gnu: 1.22.1
- lightningcss-linux-x64-musl: 1.22.1
- lightningcss-win32-x64-msvc: 1.22.1
+ lightningcss-darwin-arm64: 1.23.0
+ lightningcss-darwin-x64: 1.23.0
+ lightningcss-freebsd-x64: 1.23.0
+ lightningcss-linux-arm-gnueabihf: 1.23.0
+ lightningcss-linux-arm64-gnu: 1.23.0
+ lightningcss-linux-arm64-musl: 1.23.0
+ lightningcss-linux-x64-gnu: 1.23.0
+ lightningcss-linux-x64-musl: 1.23.0
+ lightningcss-win32-x64-msvc: 1.23.0
dev: true
/lilconfig@2.1.0:
@@ -7214,8 +7084,8 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
- /lint-staged@15.2.0:
- resolution: {integrity: sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ==}
+ /lint-staged@15.2.2:
+ resolution: {integrity: sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==}
engines: {node: '>=18.12.0'}
hasBin: true
dependencies:
@@ -7224,7 +7094,7 @@ packages:
debug: 4.3.4
execa: 8.0.1
lilconfig: 3.0.0
- listr2: 8.0.0
+ listr2: 8.0.1
micromatch: 4.0.5
pidtree: 0.6.0
string-argv: 0.3.2
@@ -7233,8 +7103,8 @@ packages:
- supports-color
dev: true
- /listr2@8.0.0:
- resolution: {integrity: sha512-u8cusxAcyqAiQ2RhYvV7kRKNLgUvtObIbhOX2NCXqvp1UU32xIg5CT22ykS2TPKJXZWJwtK3IKLiqAGlGNE+Zg==}
+ /listr2@8.0.1:
+ resolution: {integrity: sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==}
engines: {node: '>=18.0.0'}
dependencies:
cli-truncate: 4.0.0
@@ -7254,7 +7124,7 @@ packages:
resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
engines: {node: '>=14'}
dependencies:
- mlly: 1.4.2
+ mlly: 1.5.0
pkg-types: 1.0.3
dev: true
@@ -7349,8 +7219,8 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
- /magic-string@0.30.5:
- resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==}
+ /magic-string@0.30.7:
+ resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
@@ -7379,19 +7249,6 @@ packages:
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
dev: true
- /mdast-util-to-hast@13.0.2:
- resolution: {integrity: sha512-U5I+500EOOw9e3ZrclN3Is3fRpw8c19SMyNZlZ2IS+7vLsNzb2Om11VpIVOR+/0137GhZsFEF6YiKD5+0Hr2Og==}
- dependencies:
- '@types/hast': 3.0.3
- '@types/mdast': 4.0.3
- '@ungap/structured-clone': 1.2.0
- devlop: 1.1.0
- micromark-util-sanitize-uri: 2.0.0
- trim-lines: 3.0.1
- unist-util-position: 5.0.0
- unist-util-visit: 5.0.0
- dev: true
-
/media-typer@0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
@@ -7421,33 +7278,6 @@ packages:
resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}
engines: {node: '>= 0.6'}
- /micromark-util-character@2.0.1:
- resolution: {integrity: sha512-3wgnrmEAJ4T+mGXAUfMvMAbxU9RDG43XmGce4j6CwPtVxB3vfwXSZ6KhFwDzZ3mZHhmPimMAXg71veiBGzeAZw==}
- dependencies:
- micromark-util-symbol: 2.0.0
- micromark-util-types: 2.0.0
- dev: true
-
- /micromark-util-encode@2.0.0:
- resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==}
- dev: true
-
- /micromark-util-sanitize-uri@2.0.0:
- resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==}
- dependencies:
- micromark-util-character: 2.0.1
- micromark-util-encode: 2.0.0
- micromark-util-symbol: 2.0.0
- dev: true
-
- /micromark-util-symbol@2.0.0:
- resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==}
- dev: true
-
- /micromark-util-types@2.0.0:
- resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==}
- dev: true
-
/micromatch@4.0.5:
resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
engines: {node: '>=8.6'}
@@ -7480,21 +7310,21 @@ packages:
engines: {node: '>=12'}
dev: true
- /miniflare@3.20231030.3:
- resolution: {integrity: sha512-lquHSh0XiO8uoWDujOLHtDS9mkUTJTc5C5amiQ6A++5y0f+DWiMqbDBvvwjlYf4Dvqk6ChFya9dztk7fg2ZVxA==}
+ /miniflare@3.20240129.1:
+ resolution: {integrity: sha512-GfqclPxbTnam4S8GKHRkFyr+s+szELK/ORtQ3ZFUiGBO4HNJsaeA6RhBMKBH7iHqn5ng035cyPsLZvH35lwtsA==}
engines: {node: '>=16.13'}
hasBin: true
dependencies:
- acorn: 8.11.2
- acorn-walk: 8.3.1(acorn@8.11.2)
+ '@cspotcode/source-map-support': 0.8.1
+ acorn: 8.11.3
+ acorn-walk: 8.3.2(acorn@8.11.3)
capnp-ts: 0.7.0
exit-hook: 2.2.1
glob-to-regexp: 0.4.1
- source-map-support: 0.5.21
stoppable: 1.1.0
- undici: 5.23.0
- workerd: 1.20231030.0
- ws: 8.15.0
+ undici: 5.28.3
+ workerd: 1.20240129.0
+ ws: 8.16.0
youch: 3.2.3
zod: 3.21.4
transitivePeerDependencies:
@@ -7522,6 +7352,13 @@ packages:
brace-expansion: 2.0.1
dev: true
+ /minimatch@9.0.3:
+ resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ dependencies:
+ brace-expansion: 2.0.1
+ dev: true
+
/minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
dev: true
@@ -7550,6 +7387,10 @@ packages:
yallist: 4.0.0
dev: false
+ /mitt@3.0.1:
+ resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
+ dev: true
+
/mkdirp@1.0.4:
resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}
engines: {node: '>=10'}
@@ -7580,19 +7421,28 @@ packages:
fs-extra: 11.2.0
globby: 13.2.2
jiti: 1.20.0
- mlly: 1.4.2
+ mlly: 1.5.0
mri: 1.2.0
- pathe: 1.1.1
+ pathe: 1.1.2
typescript: 5.2.2
dev: true
/mlly@1.4.2:
resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
dependencies:
- acorn: 8.11.2
- pathe: 1.1.1
+ acorn: 8.11.3
+ pathe: 1.1.2
pkg-types: 1.0.3
- ufo: 1.3.2
+ ufo: 1.4.0
+ dev: true
+
+ /mlly@1.5.0:
+ resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==}
+ dependencies:
+ acorn: 8.11.3
+ pathe: 1.1.2
+ pkg-types: 1.0.3
+ ufo: 1.4.0
dev: true
/moment@2.29.3:
@@ -7604,8 +7454,8 @@ packages:
engines: {node: '>=4'}
dev: true
- /mrmime@1.0.1:
- resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
+ /mrmime@2.0.0:
+ resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==}
engines: {node: '>=10'}
dev: true
@@ -7712,7 +7562,7 @@ packages:
dependencies:
hosted-git-info: 7.0.1
is-core-module: 2.13.1
- semver: 7.5.4
+ semver: 7.6.0
validate-npm-package-license: 3.0.4
dev: true
@@ -7741,6 +7591,11 @@ packages:
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
dev: true
+ /npm-normalize-package-bin@3.0.1:
+ resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==}
+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+ dev: true
+
/npm-packlist@5.1.3:
resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
@@ -7752,17 +7607,17 @@ packages:
npm-normalize-package-bin: 2.0.0
dev: true
- /npm-run-all2@6.1.1:
- resolution: {integrity: sha512-lWLbkPZ5BSdXtN8lR+0rc8caKoPdymycpZksyDEC9MOBvfdwTXZ0uVhb7bMcGeXv2/BKtfQuo6Zn3zfc8rxNXA==}
+ /npm-run-all2@6.1.2:
+ resolution: {integrity: sha512-WwwnS8Ft+RpXve6T2EIEVpFLSqN+ORHRvgNk3H9N62SZXjmzKoRhMFg3I17TK3oMaAEr+XFbRirWS2Fn3BCPSg==}
engines: {node: ^14.18.0 || >=16.0.0, npm: '>= 8'}
hasBin: true
dependencies:
ansi-styles: 6.2.1
cross-spawn: 7.0.3
memorystream: 0.3.1
- minimatch: 9.0.1
+ minimatch: 9.0.3
pidtree: 0.6.0
- read-pkg: 8.1.0
+ read-package-json-fast: 3.0.2
shell-quote: 1.8.1
dev: true
@@ -7793,53 +7648,6 @@ packages:
/object-inspect@1.12.3:
resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
- /object-keys@1.1.1:
- resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
- engines: {node: '>= 0.4'}
- dev: true
-
- /object.assign@4.1.4:
- resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- has-symbols: 1.0.3
- object-keys: 1.1.1
- dev: true
-
- /object.fromentries@2.0.7:
- resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- dev: true
-
- /object.groupby@1.0.1:
- resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- get-intrinsic: 1.2.1
- dev: true
-
- /object.values@1.1.7:
- resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- dev: true
-
- /okie@1.0.1:
- resolution: {integrity: sha512-JQh5TdSYhzXSuKN3zzX8Rw9Q/Tec1fm0jwP/k9+cBDk6tyLjlARVu936MLY//2NZp76UGHH+5gXPzRejU1bTjQ==}
- engines: {node: '>=12.0.0'}
- dev: true
-
/on-finished@2.3.0:
resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==}
engines: {node: '>= 0.8'}
@@ -8013,10 +7821,18 @@ packages:
resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==}
dev: true
+ /pathe@1.1.2:
+ resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
+ dev: true
+
/pathval@1.1.1:
resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
dev: true
+ /perfect-debounce@1.0.0:
+ resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
+ dev: true
+
/periscopic@4.0.2:
resolution: {integrity: sha512-sqpQDUy8vgB7ycLkendSKS6HnVz1Rneoc3Rc+ZBUCe2pbqlVuCC5vF52l0NJ1aiMg/r1qfYF9/myz8CZeI2rjA==}
dependencies:
@@ -8025,8 +7841,8 @@ packages:
zimmerframe: 1.0.0
dev: true
- /phoenix@1.7.10:
- resolution: {integrity: sha512-akfr/QvLPFRB8sORyc8FQFY/YoGwjWhka/YRcu45sKlBOZHvA80EkLYBUsYlW63UicxgrXABZdrjDkv54LTE+g==}
+ /phoenix@1.7.11:
+ resolution: {integrity: sha512-aeikMR/Qh6gAygY45d5p/B7srqH60h0GbCIauEAStAtRUq4hvlkzDTyDj1NJidJEV9IKFhZe7f9L+zosUJdF/g==}
dev: false
/picocolors@1.0.0:
@@ -8061,26 +7877,26 @@ packages:
resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
dependencies:
jsonc-parser: 3.2.0
- mlly: 1.4.2
- pathe: 1.1.1
+ mlly: 1.5.0
+ pathe: 1.1.2
dev: true
- /playwright-chromium@1.40.1:
- resolution: {integrity: sha512-3atylP47OCTBW0siGI7LOEG/XKL/vnrFH8xdr4uaTnqMsc0Xq4gOLk2gGwniPJ76LSc++9ASc0w/nfqtLAmm3A==}
+ /playwright-chromium@1.41.2:
+ resolution: {integrity: sha512-1XoW4aGGRbS2BJLldtLcv2QW3deMv8myE5iCtfGRPq99BWqmBLJvJTgY/SyfBCoklwQvl91zUWYWHjCAuvKGkw==}
engines: {node: '>=16'}
hasBin: true
requiresBuild: true
dependencies:
- playwright-core: 1.40.1
+ playwright-core: 1.41.2
dev: true
- /playwright-core@1.40.1:
- resolution: {integrity: sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==}
+ /playwright-core@1.41.2:
+ resolution: {integrity: sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==}
engines: {node: '>=16'}
hasBin: true
dev: true
- /postcss-import@15.1.0(postcss@8.4.32):
+ /postcss-import@15.1.0(postcss@8.4.35):
resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==}
engines: {node: '>=14.0.0'}
peerDependencies:
@@ -8089,12 +7905,27 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.35
+ postcss-value-parser: 4.2.0
+ read-cache: 1.0.0
+ resolve: 1.22.4
+
+ /postcss-import@16.0.0(postcss@8.4.35):
+ resolution: {integrity: sha512-e77lhVvrD1I2y7dYmBv0k9ULTdArgEYZt97T4w6sFIU5uxIHvDFQlKgUUyY7v7Barj0Yf/zm5A4OquZN7jKm5Q==}
+ engines: {node: '>=18.0.0'}
+ peerDependencies:
+ postcss: ^8.0.0
+ peerDependenciesMeta:
+ postcss:
+ optional: true
+ dependencies:
+ postcss: 8.4.35
postcss-value-parser: 4.2.0
read-cache: 1.0.0
- resolve: 1.22.1
+ resolve: 1.22.4
+ dev: true
- /postcss-js@4.0.1(postcss@8.4.32):
+ /postcss-js@4.0.1(postcss@8.4.35):
resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==}
engines: {node: ^12 || ^14 || >= 16}
peerDependencies:
@@ -8104,9 +7935,9 @@ packages:
optional: true
dependencies:
camelcase-css: 2.0.1
- postcss: 8.4.32
+ postcss: 8.4.35
- /postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.2):
+ /postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2):
resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==}
engines: {node: '>= 14'}
peerDependencies:
@@ -8119,11 +7950,11 @@ packages:
optional: true
dependencies:
lilconfig: 3.0.0
- postcss: 8.4.32
- ts-node: 10.9.2(@types/node@20.10.4)(typescript@5.2.2)
+ postcss: 8.4.35
+ ts-node: 10.9.2(@types/node@20.11.16)(typescript@5.2.2)
yaml: 2.3.4
- /postcss-modules-extract-imports@3.0.0(postcss@8.4.32):
+ /postcss-modules-extract-imports@3.0.0(postcss@8.4.35):
resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
@@ -8132,10 +7963,10 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.35
dev: true
- /postcss-modules-local-by-default@4.0.0(postcss@8.4.32):
+ /postcss-modules-local-by-default@4.0.0(postcss@8.4.35):
resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
@@ -8144,13 +7975,13 @@ packages:
postcss:
optional: true
dependencies:
- icss-utils: 5.1.0(postcss@8.4.32)
- postcss: 8.4.32
+ icss-utils: 5.1.0(postcss@8.4.35)
+ postcss: 8.4.35
postcss-selector-parser: 6.0.11
postcss-value-parser: 4.2.0
dev: true
- /postcss-modules-scope@3.0.0(postcss@8.4.32):
+ /postcss-modules-scope@3.0.0(postcss@8.4.35):
resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
@@ -8159,11 +7990,11 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.35
postcss-selector-parser: 6.0.11
dev: true
- /postcss-modules-values@4.0.0(postcss@8.4.32):
+ /postcss-modules-values@4.0.0(postcss@8.4.35):
resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
@@ -8172,11 +8003,11 @@ packages:
postcss:
optional: true
dependencies:
- icss-utils: 5.1.0(postcss@8.4.32)
- postcss: 8.4.32
+ icss-utils: 5.1.0(postcss@8.4.35)
+ postcss: 8.4.35
dev: true
- /postcss-modules@6.0.0(postcss@8.4.32):
+ /postcss-modules@6.0.0(postcss@8.4.35):
resolution: {integrity: sha512-7DGfnlyi/ju82BRzTIjWS5C4Tafmzl3R79YP/PASiocj+aa6yYphHhhKUOEoXQToId5rgyFgJ88+ccOUydjBXQ==}
peerDependencies:
postcss: ^8.0.0
@@ -8185,17 +8016,17 @@ packages:
optional: true
dependencies:
generic-names: 4.0.0
- icss-utils: 5.1.0(postcss@8.4.32)
+ icss-utils: 5.1.0(postcss@8.4.35)
lodash.camelcase: 4.3.0
- postcss: 8.4.32
- postcss-modules-extract-imports: 3.0.0(postcss@8.4.32)
- postcss-modules-local-by-default: 4.0.0(postcss@8.4.32)
- postcss-modules-scope: 3.0.0(postcss@8.4.32)
- postcss-modules-values: 4.0.0(postcss@8.4.32)
+ postcss: 8.4.35
+ postcss-modules-extract-imports: 3.0.0(postcss@8.4.35)
+ postcss-modules-local-by-default: 4.0.0(postcss@8.4.35)
+ postcss-modules-scope: 3.0.0(postcss@8.4.35)
+ postcss-modules-values: 4.0.0(postcss@8.4.35)
string-hash: 1.1.3
dev: true
- /postcss-nested@6.0.1(postcss@8.4.32):
+ /postcss-nested@6.0.1(postcss@8.4.35):
resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==}
engines: {node: '>=12.0'}
peerDependencies:
@@ -8204,7 +8035,7 @@ packages:
postcss:
optional: true
dependencies:
- postcss: 8.4.32
+ postcss: 8.4.35
postcss-selector-parser: 6.0.11
/postcss-selector-parser@6.0.11:
@@ -8217,8 +8048,8 @@ packages:
/postcss-value-parser@4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
- /postcss@8.4.32:
- resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==}
+ /postcss@8.4.35:
+ resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.7
@@ -8234,8 +8065,8 @@ packages:
engines: {node: '>= 0.8.0'}
dev: true
- /prettier@3.1.1:
- resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==}
+ /prettier@3.2.5:
+ resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
engines: {node: '>=14'}
hasBin: true
dev: true
@@ -8272,10 +8103,6 @@ packages:
sisteransi: 1.0.5
dev: true
- /property-information@6.4.0:
- resolution: {integrity: sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ==}
- dev: true
-
/proxy-addr@2.0.7:
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
@@ -8456,6 +8283,14 @@ packages:
dependencies:
pify: 2.3.0
+ /read-package-json-fast@3.0.2:
+ resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==}
+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+ dependencies:
+ json-parse-even-better-errors: 3.0.0
+ npm-normalize-package-bin: 3.0.1
+ dev: true
+
/read-pkg-up@10.1.0:
resolution: {integrity: sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==}
engines: {node: '>=16'}
@@ -8508,14 +8343,14 @@ packages:
resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==}
dev: false
- /regenerator-runtime@0.14.0:
- resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==}
+ /regenerator-runtime@0.14.1:
+ resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
dev: false
/regenerator-transform@0.15.2:
resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==}
dependencies:
- '@babel/runtime': 7.23.6
+ '@babel/runtime': 7.23.9
dev: false
/regexp-ast-analysis@0.7.1:
@@ -8526,15 +8361,6 @@ packages:
refa: 0.12.1
dev: true
- /regexp.prototype.flags@1.5.0:
- resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- functions-have-names: 1.2.3
- dev: true
-
/regexpu-core@5.3.2:
resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==}
engines: {node: '>=4'}
@@ -8572,19 +8398,11 @@ packages:
engines: {node: '>=10'}
dev: true
- /resolve@1.22.1:
- resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
- hasBin: true
- dependencies:
- is-core-module: 2.11.0
- path-parse: 1.0.7
- supports-preserve-symlinks-flag: 1.0.0
-
/resolve@1.22.4:
resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==}
hasBin: true
dependencies:
- is-core-module: 2.13.0
+ is-core-module: 2.13.1
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
@@ -8604,6 +8422,10 @@ packages:
resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==}
dev: true
+ /rfdc@1.3.1:
+ resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==}
+ dev: true
+
/rimraf@3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
hasBin: true
@@ -8625,7 +8447,7 @@ packages:
rollup: ^3.25
typescript: ^4.5 || ^5.0
dependencies:
- magic-string: 0.30.5
+ magic-string: 0.30.7
rollup: 3.29.2
typescript: 5.2.2
optionalDependencies:
@@ -8639,7 +8461,7 @@ packages:
rollup: ^3.29.4 || ^4
typescript: ^4.5 || ^5.0
dependencies:
- magic-string: 0.30.5
+ magic-string: 0.30.7
rollup: 4.2.0
typescript: 5.2.2
optionalDependencies:
@@ -8655,7 +8477,7 @@ packages:
commenting: 1.1.0
glob: 7.2.0
lodash: 4.17.21
- magic-string: 0.30.5
+ magic-string: 0.30.7
mkdirp: 3.0.1
moment: 2.29.3
package-name-regex: 2.0.6
@@ -8703,36 +8525,18 @@ packages:
mri: 1.2.0
dev: true
- /safe-array-concat@1.0.0:
- resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==}
- engines: {node: '>=0.4'}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- has-symbols: 1.0.3
- isarray: 2.0.5
- dev: true
-
/safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
- /safe-regex-test@1.0.0:
- resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- is-regex: 1.1.4
- dev: true
-
/safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
- /sass@1.69.5:
- resolution: {integrity: sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==}
+ /sass@1.70.0:
+ resolution: {integrity: sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==}
engines: {node: '>=14.0.0'}
hasBin: true
dependencies:
- chokidar: 3.5.3(patch_hash=dzxbf3kgof5pdmbsyih2x43sq4)
+ chokidar: 3.6.0(patch_hash=bckcfsslxcffppz65mxcq6naau)
immutable: 4.0.0
source-map-js: 1.0.2
dev: true
@@ -8775,8 +8579,8 @@ packages:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
- /semver@7.5.4:
- resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
+ /semver@7.6.0:
+ resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@@ -8817,16 +8621,6 @@ packages:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
dev: false
- /set-function-length@1.1.1:
- resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==}
- engines: {node: '>= 0.4'}
- dependencies:
- define-data-property: 1.1.1
- get-intrinsic: 1.2.1
- gopd: 1.0.1
- has-property-descriptors: 1.0.0
- dev: true
-
/setprototypeof@1.2.0:
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
@@ -8850,16 +8644,10 @@ packages:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
dev: true
- /shikiji-transformers@0.7.4:
- resolution: {integrity: sha512-oykilNekcW2FnRGbvZm+RNWHYroSeCVMOaMMwAbxozZgpTdcJtHoA+1+MDFw6/o2hCkX88kKbxG6FwAZoUZ6WQ==}
+ /shiki@1.0.0:
+ resolution: {integrity: sha512-rOUGJa3yFGgOrEoiELYxraoBbag3ZWf9bpodlr05Wjm85Scx8OIX+otdSefq9Pk7L47TKEzGodSQb4L38jka6A==}
dependencies:
- shikiji: 0.7.4
- dev: true
-
- /shikiji@0.7.4:
- resolution: {integrity: sha512-N5dmPvyhH/zfcsuWysUEAMwRJDMz26LUns2VEUs5y4Ozbf5jkAODU0Yswjcf/tZAwpFnk5x3y34dupFMnF2+NA==}
- dependencies:
- hast-util-to-html: 9.0.0
+ '@shikijs/core': 1.0.0
dev: true
/side-channel@1.0.4:
@@ -8887,12 +8675,12 @@ packages:
requiresBuild: true
dev: true
- /sirv@2.0.3(patch_hash=z45f224eewh2pgpijxcc3aboqm):
- resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==}
+ /sirv@2.0.4(patch_hash=amdes53ifqfntejkflpaq5ifce):
+ resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
engines: {node: '>= 10'}
dependencies:
- '@polka/url': 1.0.0-next.21
- mrmime: 1.0.1
+ '@polka/url': 1.0.0-next.24
+ mrmime: 2.0.0
totalist: 3.0.0
dev: true
patched: true
@@ -8951,10 +8739,6 @@ packages:
engines: {node: '>= 8'}
dev: true
- /space-separated-tokens@2.0.2:
- resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
- dev: true
-
/spdx-compare@1.0.0:
resolution: {integrity: sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==}
dependencies:
@@ -9003,6 +8787,11 @@ packages:
spdx-ranges: 2.1.1
dev: true
+ /speakingurl@14.0.1:
+ resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==}
+ engines: {node: '>=0.10.0'}
+ dev: true
+
/split2@4.2.0:
resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
engines: {node: '>= 10.x'}
@@ -9037,11 +8826,6 @@ packages:
engines: {node: '>=4', npm: '>=6'}
dev: true
- /streamsearch@1.1.0:
- resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
- engines: {node: '>=10.0.0'}
- dev: true
-
/string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
@@ -9077,44 +8861,12 @@ packages:
strip-ansi: 7.1.0
dev: true
- /string.prototype.trim@1.2.7:
- resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- dev: true
-
- /string.prototype.trimend@1.0.6:
- resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- dev: true
-
- /string.prototype.trimstart@1.0.6:
- resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==}
- dependencies:
- call-bind: 1.0.2
- define-properties: 1.2.0
- es-abstract: 1.22.1
- dev: true
-
/string_decoder@1.3.0:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
dependencies:
safe-buffer: 5.2.1
dev: false
- /stringify-entities@4.0.3:
- resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==}
- dependencies:
- character-entities-html4: 2.1.0
- character-entities-legacy: 3.0.0
- dev: true
-
/strip-ansi@6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
@@ -9128,11 +8880,6 @@ packages:
ansi-regex: 6.0.1
dev: true
- /strip-bom@3.0.0:
- resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
- engines: {node: '>=4'}
- dev: true
-
/strip-final-newline@3.0.0:
resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
engines: {node: '>=12'}
@@ -9146,7 +8893,13 @@ packages:
/strip-literal@1.3.0:
resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==}
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
+ dev: true
+
+ /strip-literal@2.0.0:
+ resolution: {integrity: sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==}
+ dependencies:
+ js-tokens: 8.0.2
dev: true
/stylus@0.62.0:
@@ -9203,22 +8956,22 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
- /systemjs@6.14.2:
- resolution: {integrity: sha512-1TlOwvKWdXxAY9vba+huLu99zrQURDWA8pUTYsRIYDZYQbGyK+pyEP4h4dlySsqo7ozyJBmYD20F+iUHhAltEg==}
+ /systemjs@6.14.3:
+ resolution: {integrity: sha512-hQv45irdhXudAOr8r6SVSpJSGtogdGZUbJBRKCE5nsIS7tsxxvnIHqT4IOPWj+P+HcSzeWzHlGCGpmhPDIKe+w==}
dev: false
/tabbable@6.2.0:
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
dev: true
- /tailwindcss@3.3.6(ts-node@10.9.2):
- resolution: {integrity: sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==}
+ /tailwindcss@3.4.1(ts-node@10.9.2):
+ resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==}
engines: {node: '>=14.0.0'}
hasBin: true
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
- chokidar: 3.5.3(patch_hash=dzxbf3kgof5pdmbsyih2x43sq4)
+ chokidar: 3.6.0(patch_hash=bckcfsslxcffppz65mxcq6naau)
didyoumean: 1.2.2
dlv: 1.1.3
fast-glob: 3.3.2
@@ -9230,11 +8983,11 @@ packages:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.0.0
- postcss: 8.4.32
- postcss-import: 15.1.0(postcss@8.4.32)
- postcss-js: 4.0.1(postcss@8.4.32)
- postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2)
- postcss-nested: 6.0.1(postcss@8.4.32)
+ postcss: 8.4.35
+ postcss-import: 15.1.0(postcss@8.4.35)
+ postcss-js: 4.0.1(postcss@8.4.35)
+ postcss-load-config: 4.0.2(postcss@8.4.35)(ts-node@10.9.2)
+ postcss-nested: 6.0.1(postcss@8.4.35)
postcss-selector-parser: 6.0.11
resolve: 1.22.4
sucrase: 3.32.0
@@ -9265,13 +9018,13 @@ packages:
temp-dir: 3.0.0
dev: true
- /terser@5.26.0:
- resolution: {integrity: sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==}
+ /terser@5.27.0:
+ resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jridgewell/source-map': 0.3.3
- acorn: 8.11.2
+ acorn: 8.11.3
commander: 2.20.3
source-map-support: 0.5.21
dev: true
@@ -9308,15 +9061,14 @@ packages:
resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==}
dev: true
- /tinypool@0.8.1:
- resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==}
+ /tinypool@0.8.2:
+ resolution: {integrity: sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==}
engines: {node: '>=14.0.0'}
dev: true
/tinyspy@2.2.0:
resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==}
engines: {node: '>=14.0.0'}
- dev: true
/to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
@@ -9345,10 +9097,6 @@ packages:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: false
- /trim-lines@3.0.1:
- resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
- dev: true
-
/ts-api-utils@1.0.1(typescript@5.2.2):
resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==}
engines: {node: '>=16.13.0'}
@@ -9361,7 +9109,7 @@ packages:
/ts-interface-checker@0.1.13:
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
- /ts-node@10.9.2(@types/node@20.10.4)(typescript@5.2.2):
+ /ts-node@10.9.2(@types/node@20.11.16)(typescript@5.2.2):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
@@ -9380,9 +9128,9 @@ packages:
'@tsconfig/node12': 1.0.9
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
- '@types/node': 20.10.4
- acorn: 8.11.2
- acorn-walk: 8.3.1(acorn@8.11.2)
+ '@types/node': 20.11.16
+ acorn: 8.11.3
+ acorn-walk: 8.3.2(acorn@8.11.3)
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
@@ -9391,8 +9139,8 @@ packages:
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
- /tsconfck@3.0.0(typescript@5.2.2):
- resolution: {integrity: sha512-w3wnsIrJNi7avf4Zb0VjOoodoO0woEqGgZGQm+LHH9przdUI+XDKsWAXwxHA1DaRTjeuZNcregSzr7RaA8zG9A==}
+ /tsconfck@3.0.2(typescript@5.2.2):
+ resolution: {integrity: sha512-6lWtFjwuhS3XI4HsX4Zg0izOI3FU/AI9EGVlPEUMDIhvLPMD4wkiof0WCoDgW7qY+Dy198g4d9miAqUHWHFH6Q==}
engines: {node: ^18 || >=20}
hasBin: true
peerDependencies:
@@ -9404,25 +9152,16 @@ packages:
typescript: 5.2.2
dev: true
- /tsconfig-paths@3.14.2:
- resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==}
- dependencies:
- '@types/json5': 0.0.29
- json5: 1.0.2
- minimist: 1.2.8
- strip-bom: 3.0.0
- dev: true
-
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true
- /tsx@4.6.2:
- resolution: {integrity: sha512-QPpBdJo+ZDtqZgAnq86iY/PD2KYCUPSUGIunHdGwyII99GKH+f3z3FZ8XNFLSGQIA4I365ui8wnQpl8OKLqcsg==}
+ /tsx@4.7.0:
+ resolution: {integrity: sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==}
engines: {node: '>=18.0.0'}
hasBin: true
dependencies:
- esbuild: 0.18.20
+ esbuild: 0.19.11
get-tsconfig: 4.7.2
optionalDependencies:
fsevents: 2.3.3
@@ -9470,51 +9209,13 @@ packages:
resolution: {integrity: sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==}
dev: false
- /typed-array-buffer@1.0.0:
- resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- get-intrinsic: 1.2.1
- is-typed-array: 1.1.10
- dev: true
-
- /typed-array-byte-length@1.0.0:
- resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==}
- engines: {node: '>= 0.4'}
- dependencies:
- call-bind: 1.0.2
- for-each: 0.3.3
- has-proto: 1.0.1
- is-typed-array: 1.1.10
- dev: true
-
- /typed-array-byte-offset@1.0.0:
- resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
- engines: {node: '>= 0.4'}
- dependencies:
- available-typed-arrays: 1.0.5
- call-bind: 1.0.2
- for-each: 0.3.3
- has-proto: 1.0.1
- is-typed-array: 1.1.10
- dev: true
-
- /typed-array-length@1.0.4:
- resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==}
- dependencies:
- call-bind: 1.0.2
- for-each: 0.3.3
- is-typed-array: 1.1.10
- dev: true
-
/typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
hasBin: true
- /ufo@1.3.2:
- resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==}
+ /ufo@1.4.0:
+ resolution: {integrity: sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==}
dev: true
/uglify-js@3.17.4:
@@ -9525,15 +9226,6 @@ packages:
dev: true
optional: true
- /unbox-primitive@1.0.2:
- resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
- dependencies:
- call-bind: 1.0.2
- has-bigints: 1.0.2
- has-symbols: 1.0.3
- which-boxed-primitive: 1.0.2
- dev: true
-
/unbuild@2.0.0(typescript@5.2.2):
resolution: {integrity: sha512-JWCUYx3Oxdzvw2J9kTAp+DKE8df/BnH/JTSj6JyA4SH40ECdFu7FoJJcrm8G92B7TjofQ6GZGjJs50TRxoH6Wg==}
hasBin: true
@@ -9576,11 +9268,11 @@ packages:
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
- /undici@5.23.0:
- resolution: {integrity: sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg==}
+ /undici@5.28.3:
+ resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==}
engines: {node: '>=14.0'}
dependencies:
- busboy: 1.6.0
+ '@fastify/busboy': 2.1.0
dev: true
/unicode-canonical-property-names-ecmascript@2.0.0:
@@ -9606,39 +9298,6 @@ packages:
engines: {node: '>=4'}
dev: false
- /unist-util-is@6.0.0:
- resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
- dependencies:
- '@types/unist': 3.0.2
- dev: true
-
- /unist-util-position@5.0.0:
- resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}
- dependencies:
- '@types/unist': 3.0.2
- dev: true
-
- /unist-util-stringify-position@4.0.0:
- resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==}
- dependencies:
- '@types/unist': 3.0.2
- dev: true
-
- /unist-util-visit-parents@6.0.1:
- resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==}
- dependencies:
- '@types/unist': 3.0.2
- unist-util-is: 6.0.0
- dev: true
-
- /unist-util-visit@5.0.0:
- resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==}
- dependencies:
- '@types/unist': 3.0.2
- unist-util-is: 6.0.0
- unist-util-visit-parents: 6.0.1
- dev: true
-
/universalify@2.0.0:
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
engines: {node: '>= 10.0.0'}
@@ -9652,9 +9311,9 @@ packages:
resolution: {integrity: sha512-Egkr/s4zcMTEuulcIb7dgURS6QpN7DyqQYdf+jBtiaJvQ+eRsrtWUoX84SbvQWuLkXsOjM+8sJC9u6KoMK/U7Q==}
hasBin: true
dependencies:
- '@babel/core': 7.23.6
+ '@babel/core': 7.23.9
'@babel/standalone': 7.22.20
- '@babel/types': 7.23.6
+ '@babel/types': 7.23.9
defu: 6.1.2
jiti: 1.20.0
mri: 1.2.0
@@ -9663,13 +9322,13 @@ packages:
- supports-color
dev: true
- /update-browserslist-db@1.0.13(browserslist@4.22.2):
+ /update-browserslist-db@1.0.13(browserslist@4.22.3):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
- browserslist: 4.22.2
+ browserslist: 4.22.3
escalade: 3.1.1
picocolors: 1.0.0
@@ -9706,48 +9365,26 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
- /vfile-location@5.0.2:
- resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==}
- dependencies:
- '@types/unist': 3.0.2
- vfile: 6.0.1
- dev: true
-
- /vfile-message@4.0.2:
- resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
- dependencies:
- '@types/unist': 3.0.2
- unist-util-stringify-position: 4.0.0
- dev: true
-
- /vfile@6.0.1:
- resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==}
- dependencies:
- '@types/unist': 3.0.2
- unist-util-stringify-position: 4.0.0
- vfile-message: 4.0.2
- dev: true
-
- /vite-node@1.0.4:
- resolution: {integrity: sha512-9xQQtHdsz5Qn8hqbV7UKqkm8YkJhzT/zr41Dmt5N7AlD8hJXw/Z7y0QiD5I8lnTthV9Rvcvi0QW7PI0Fq83ZPg==}
+ /vite-node@1.2.2:
+ resolution: {integrity: sha512-1as4rDTgVWJO3n1uHmUYqq7nsFgINQ9u+mRcXpjeOMJUmviqNKjcZB7UfRZrlM7MjYXMKpuWp5oGkjaFLnjawg==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4
- pathe: 1.1.1
+ pathe: 1.1.2
picocolors: 1.0.0
vite: link:packages/vite
transitivePeerDependencies:
- supports-color
dev: true
- /vitepress@1.0.0-rc.31(typescript@5.2.2):
- resolution: {integrity: sha512-ikH9pIjOOAbyoYAGBVfTz8TzuXp+UoWaIRMU4bw/oiTg8R65SbAaGKY84xx6TuL+f4VqUJ8lhzW82YyxSLvstA==}
+ /vitepress@1.0.0-rc.42(typescript@5.2.2):
+ resolution: {integrity: sha512-VeiVVXFblt/sjruFSJBNChMWwlztMrRMe8UXdNpf4e05mKtTYEY38MF5qoP90KxPTCfMQiKqwEGwXAGuOTK8HQ==}
hasBin: true
peerDependencies:
markdown-it-mathjax3: ^4.3.2
- postcss: ^8.4.31
+ postcss: ^8.4.34
peerDependenciesMeta:
markdown-it-mathjax3:
optional: true
@@ -9756,19 +9393,19 @@ packages:
dependencies:
'@docsearch/css': 3.5.2
'@docsearch/js': 3.5.2
+ '@shikijs/core': 1.0.0
+ '@shikijs/transformers': 1.0.0
'@types/markdown-it': 13.0.7
- '@vitejs/plugin-vue': 4.5.0(vite@packages+vite)(vue@3.3.11)
- '@vue/devtools-api': 6.5.1
- '@vueuse/core': 10.6.1(vue@3.3.11)
- '@vueuse/integrations': 10.6.1(focus-trap@7.5.4)(vue@3.3.11)
+ '@vitejs/plugin-vue': 5.0.3(vite@packages+vite)(vue@3.4.15)
+ '@vue/devtools-api': 7.0.14
+ '@vueuse/core': 10.7.2(vue@3.4.15)
+ '@vueuse/integrations': 10.7.2(focus-trap@7.5.4)(vue@3.4.15)
focus-trap: 7.5.4
mark.js: 8.11.1
minisearch: 6.3.0
- mrmime: 1.0.1
- shikiji: 0.7.4
- shikiji-transformers: 0.7.4
+ shiki: 1.0.0
vite: link:packages/vite
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
transitivePeerDependencies:
- '@algolia/client-search'
- '@types/react'
@@ -9790,8 +9427,8 @@ packages:
- universal-cookie
dev: true
- /vitest@1.0.4(@types/node@20.10.4):
- resolution: {integrity: sha512-s1GQHp/UOeWEo4+aXDOeFBJwFzL6mjycbQwwKWX2QcYfh/7tIerS59hWQ20mxzupTJluA2SdwiBuWwQHH67ckg==}
+ /vitest@1.2.2(@types/node@20.11.16):
+ resolution: {integrity: sha512-d5Ouvrnms3GD9USIK36KG8OZ5bEvKEkITFtnGv56HFaSlbItJuYr7hv2Lkn903+AvRAgSixiamozUVfORUekjw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -9815,27 +9452,27 @@ packages:
jsdom:
optional: true
dependencies:
- '@types/node': 20.10.4
- '@vitest/expect': 1.0.4
- '@vitest/runner': 1.0.4
- '@vitest/snapshot': 1.0.4
- '@vitest/spy': 1.0.4
- '@vitest/utils': 1.0.4
- acorn-walk: 8.3.1(acorn@8.11.2)
+ '@types/node': 20.11.16
+ '@vitest/expect': 1.2.2
+ '@vitest/runner': 1.2.2
+ '@vitest/snapshot': 1.2.2
+ '@vitest/spy': 1.2.2
+ '@vitest/utils': 1.2.2
+ acorn-walk: 8.3.2(acorn@8.11.3)
cac: 6.7.14
chai: 4.3.10
debug: 4.3.4
execa: 8.0.1
local-pkg: 0.5.0
- magic-string: 0.30.5
- pathe: 1.1.1
+ magic-string: 0.30.7
+ pathe: 1.1.2
picocolors: 1.0.0
std-env: 3.5.0
strip-literal: 1.3.0
tinybench: 2.5.1
- tinypool: 0.8.1
+ tinypool: 0.8.2
vite: link:packages/vite
- vite-node: 1.0.4
+ vite-node: 1.2.2
why-is-node-running: 2.2.2
transitivePeerDependencies:
- acorn
@@ -9847,7 +9484,7 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
- /vue-demi@0.14.6(vue@3.3.11):
+ /vue-demi@0.14.6(vue@3.4.15):
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
engines: {node: '>=12'}
hasBin: true
@@ -9859,16 +9496,16 @@ packages:
'@vue/composition-api':
optional: true
dependencies:
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
dev: true
- /vue-router@4.2.5(vue@3.3.11):
+ /vue-router@4.2.5(vue@3.4.15):
resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.5.0
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
dev: false
/vue@3.2.0:
@@ -9879,34 +9516,30 @@ packages:
'@vue/shared': 3.2.0
dev: true
- /vue@3.3.11(typescript@5.2.2):
- resolution: {integrity: sha512-d4oBctG92CRO1cQfVBZp6WJAs0n8AK4Xf5fNjQCBeKCvMI1efGQ5E3Alt1slFJS9fZuPcFoiAiqFvQlv1X7t/w==}
+ /vue@3.4.15(typescript@5.2.2):
+ resolution: {integrity: sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@vue/compiler-dom': 3.3.11
- '@vue/compiler-sfc': 3.3.11
- '@vue/runtime-dom': 3.3.11
- '@vue/server-renderer': 3.3.11(vue@3.3.11)
- '@vue/shared': 3.3.11
+ '@vue/compiler-dom': 3.4.15
+ '@vue/compiler-sfc': 3.4.15
+ '@vue/runtime-dom': 3.4.15
+ '@vue/server-renderer': 3.4.15(vue@3.4.15)
+ '@vue/shared': 3.4.15
typescript: 5.2.2
- /vuex@4.1.0(vue@3.3.11):
+ /vuex@4.1.0(vue@3.4.15):
resolution: {integrity: sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.5.0
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
dev: false
- /web-namespaces@2.0.1:
- resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==}
- dev: true
-
/web-streams-polyfill@3.2.1:
resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==}
engines: {node: '>= 8'}
@@ -9923,27 +9556,6 @@ packages:
webidl-conversions: 3.0.1
dev: false
- /which-boxed-primitive@1.0.2:
- resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
- dependencies:
- is-bigint: 1.0.4
- is-boolean-object: 1.1.2
- is-number-object: 1.0.7
- is-string: 1.0.7
- is-symbol: 1.0.4
- dev: true
-
- /which-typed-array@1.1.11:
- resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==}
- engines: {node: '>= 0.4'}
- dependencies:
- available-typed-arrays: 1.0.5
- call-bind: 1.0.2
- for-each: 0.3.3
- gopd: 1.0.1
- has-tostringtag: 1.0.0
- dev: true
-
/which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
@@ -9971,8 +9583,8 @@ packages:
resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==}
engines: {node: '>= 10.0.0'}
dependencies:
- '@babel/parser': 7.23.6
- '@babel/types': 7.23.6
+ '@babel/parser': 7.23.9
+ '@babel/types': 7.23.9
assert-never: 1.2.1
babel-walk: 3.0.0-canary-5
dev: true
@@ -9981,17 +9593,17 @@ packages:
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
dev: true
- /workerd@1.20231030.0:
- resolution: {integrity: sha512-+FSW+d31f8RrjHanFf/R9A+Z0csf3OtsvzdPmAKuwuZm/5HrBv83cvG9fFeTxl7/nI6irUUXIRF9xcj/NomQzQ==}
+ /workerd@1.20240129.0:
+ resolution: {integrity: sha512-t4pnsmjjk/u+GdVDgH2M1AFmJaBUABshYK/vT/HNrAXsHSwN6VR8Yqw0JQ845OokO34VLkuUtYQYyxHHKpdtsw==}
engines: {node: '>=16'}
hasBin: true
requiresBuild: true
optionalDependencies:
- '@cloudflare/workerd-darwin-64': 1.20231030.0
- '@cloudflare/workerd-darwin-arm64': 1.20231030.0
- '@cloudflare/workerd-linux-64': 1.20231030.0
- '@cloudflare/workerd-linux-arm64': 1.20231030.0
- '@cloudflare/workerd-windows-64': 1.20231030.0
+ '@cloudflare/workerd-darwin-64': 1.20240129.0
+ '@cloudflare/workerd-darwin-arm64': 1.20240129.0
+ '@cloudflare/workerd-linux-64': 1.20240129.0
+ '@cloudflare/workerd-linux-arm64': 1.20240129.0
+ '@cloudflare/workerd-windows-64': 1.20240129.0
dev: true
/wrap-ansi@7.0.0:
@@ -10024,8 +9636,8 @@ packages:
/wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
- /ws@8.15.0:
- resolution: {integrity: sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==}
+ /ws@8.16.0:
+ resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
@@ -10082,11 +9694,6 @@ packages:
/zod@3.21.4:
resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
- dev: true
-
- /zwitch@2.0.4:
- resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
- dev: true
file:playground/alias/dir/module:
resolution: {directory: playground/alias/dir/module, type: directory}
@@ -10109,6 +9716,17 @@ packages:
resolution: {directory: playground/css/css-proxy-dep-nested, type: directory}
name: '@vitejs/test-css-proxy-dep-nested'
+ file:playground/css/scss-proxy-dep:
+ resolution: {directory: playground/css/scss-proxy-dep, type: directory}
+ name: '@vitejs/test-scss-proxy-dep'
+ dependencies:
+ '@vitejs/test-scss-proxy-dep-nested': file:playground/css/scss-proxy-dep-nested
+ dev: true
+
+ file:playground/css/scss-proxy-dep-nested:
+ resolution: {directory: playground/css/scss-proxy-dep-nested, type: directory}
+ name: '@vitejs/test-scss-proxy-dep-nested'
+
file:playground/define/commonjs-dep:
resolution: {directory: playground/define/commonjs-dep, type: directory}
name: '@vitejs/test-commonjs-dep'
@@ -10126,7 +9744,7 @@ packages:
dependencies:
slash3: /slash@3.0.0
slash5: /slash@5.1.0
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
transitivePeerDependencies:
- typescript
dev: false
@@ -10138,7 +9756,7 @@ packages:
dependencies:
slash3: /slash@3.0.0
slash5: /slash@5.1.0
- vue: 3.3.11(typescript@5.2.2)
+ vue: 3.4.15(typescript@5.2.2)
transitivePeerDependencies:
- typescript
dev: false
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 7c6523c6cbb288..19efe2ba1fc494 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,3 +1,4 @@
packages:
- 'packages/*'
- 'playground/**'
+ - 'packages/**/__tests__/**'