diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index ad88cf1e2618dc..ea73fa458aa64b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,4 +1,5 @@ import { defineConfig, DefaultTheme } from 'vitepress' +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' import { buildEnd } from './buildEnd.config' const ogDescription = 'Next Generation Frontend Tooling' @@ -342,5 +343,8 @@ export default defineConfig({ ]) return pageData }, + markdown: { + codeTransformers: [transformerTwoslash()], + }, buildEnd, }) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index a85c67e1df22f5..5fa0d638a3f9a1 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,6 +1,8 @@ import { h } from 'vue' import type { Theme } from 'vitepress' import DefaultTheme from 'vitepress/theme' +import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' +import '@shikijs/vitepress-twoslash/style.css' import './styles/vars.css' import HomeSponsors from './components/HomeSponsors.vue' import AsideSponsors from './components/AsideSponsors.vue' @@ -16,5 +18,6 @@ export default { }, enhanceApp({ app }) { app.component('SvgImage', SvgImage) + app.use(TwoslashFloatingVue) }, } satisfies Theme diff --git a/docs/.vitepress/tsconfig.json b/docs/.vitepress/tsconfig.json new file mode 100644 index 00000000000000..20b9618d576e3e --- /dev/null +++ b/docs/.vitepress/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "noImplicitOverride": true, + "noUnusedLocals": true, + "esModuleInterop": true, + "noEmit": true + }, + "exclude": ["cache", "dist"] +} diff --git a/docs/config/build-options.md b/docs/config/build-options.md index 86de923fcf8590..4d4214e6a6b73b 100644 --- a/docs/config/build-options.md +++ b/docs/config/build-options.md @@ -48,13 +48,22 @@ type ResolveModulePreloadDependenciesFn = ( The `resolveDependencies` function will be called for each dynamic import with a list of the chunks it depends on, and it will also be called for each chunk imported in entry HTML files. A new dependencies array can be returned with these filtered or more dependencies injected, and their paths modified. The `deps` paths are relative to the `build.outDir`. Returning a relative path to the `hostId` for `hostType === 'js'` is allowed, in which case `new URL(dep, import.meta.url)` is used to get an absolute path when injecting this module preload in the HTML head. -```js + +```js twoslash +/** @type {import('vite').UserConfig} */ +const config = { + build: { +// ---cut-before--- modulePreload: { resolveDependencies: (filename, deps, { hostId, hostType }) => { return deps.filter(condition) - } + }, +}, +// ---cut-after--- + }, } ``` + The resolved dependency paths can be further modified using [`experimental.renderBuiltUrl`](../guide/build.md#advanced-base-options). diff --git a/docs/config/dep-optimization-options.md b/docs/config/dep-optimization-options.md index e8ddddb09ceaf0..6f8b52d0ad7e78 100644 --- a/docs/config/dep-optimization-options.md +++ b/docs/config/dep-optimization-options.md @@ -19,7 +19,9 @@ Dependencies to exclude from pre-bundling. :::warning CommonJS CommonJS dependencies should not be excluded from optimization. If an ESM dependency is excluded from optimization, but has a nested CommonJS dependency, the CommonJS dependency should be added to `optimizeDeps.include`. Example: -```js +```js twoslash +import { defineConfig } from 'vite' +// ---cut--- export default defineConfig({ optimizeDeps: { include: ['esm-dep > cjs-dep'], @@ -37,7 +39,9 @@ By default, linked packages not inside `node_modules` are not pre-bundled. Use t **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 +```js twoslash +import { defineConfig } from 'vite' +// ---cut--- export default defineConfig({ optimizeDeps: { include: ['my-lib/components/**/*.vue'], diff --git a/docs/config/index.md b/docs/config/index.md index 6932c7f29dc595..e599295b3bd80b 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -50,7 +50,9 @@ Vite also directly supports TS config files. You can use `vite.config.ts` with t If the config needs to conditionally determine options based on the command (`serve` or `build`), the [mode](/guide/env-and-mode) being used, if it's an SSR build (`isSsrBuild`), or is previewing the build (`isPreview`), it can export a function instead: -```js +```js twoslash +import { defineConfig } from 'vite' +// ---cut--- export default defineConfig(({ command, mode, isSsrBuild, isPreview }) => { if (command === 'serve') { return { @@ -65,7 +67,7 @@ export default defineConfig(({ command, mode, isSsrBuild, isPreview }) => { }) ``` -It is important to note that in Vite's API the `command` value is `serve` during dev (in the cli `vite`, `vite dev`, and `vite serve` are aliases), and `build` when building for production (`vite build`). +It is important to note that in Vite's API the `command` value is `serve` during dev (in the cli [`vite`](/guide/cli#vite), `vite dev`, and `vite serve` are aliases), and `build` when building for production ([`vite build`](/guide/cli#vite-build)). `isSsrBuild` and `isPreview` are additional optional flags to differentiate the kind of `build` and `serve` commands respectively. Some tools that load the Vite config may not support these flags and will pass `undefined` instead. Hence, it's recommended to use explicit comparison against `true` and `false`. @@ -73,7 +75,9 @@ It is important to note that in Vite's API the `command` value is `serve` during If the config needs to call async functions, it can export an async function instead. And this async function can also be passed through `defineConfig` for improved intellisense support: -```js +```js twoslash +import { defineConfig } from 'vite' +// ---cut--- export default defineConfig(async ({ command, mode }) => { const data = await asyncFunction() return { @@ -88,7 +92,7 @@ Environmental Variables can be obtained from `process.env` as usual. Note that Vite doesn't load `.env` files by default as the files to load can only be determined after evaluating the Vite config, for example, the `root` and `envDir` options affect the loading behaviour. However, you can use the exported `loadEnv` helper to load the specific `.env` file if needed. -```js +```js twoslash import { defineConfig, loadEnv } from 'vite' export default defineConfig(({ command, mode }) => { diff --git a/docs/config/server-options.md b/docs/config/server-options.md index 8ae5f5cb5f3624..8008562de02509 100644 --- a/docs/config/server-options.md +++ b/docs/config/server-options.md @@ -18,10 +18,10 @@ The first case is when `localhost` is used. Node.js under v17 reorders the resul You can set [`dns.setDefaultResultOrder('verbatim')`](https://nodejs.org/api/dns.html#dns_dns_setdefaultresultorder_order) to disable the reordering behavior. Vite will then print the address as `localhost`. -```js +```js twoslash // vite.config.js import { defineConfig } from 'vite' -import dns from 'dns' +import dns from 'node:dns' dns.setDefaultResultOrder('verbatim') @@ -238,7 +238,7 @@ Create Vite server in middleware mode. - **Example:** -```js +```js twoslash import express from 'express' import { createServer as createViteServer } from 'vite' @@ -358,9 +358,9 @@ export default defineConfig({ // in their paths to the ignore list. sourcemapIgnoreList(sourcePath, sourcemapPath) { return sourcePath.includes('node_modules') - } - } -}; + }, + }, +}) ``` ::: tip Note diff --git a/docs/config/shared-options.md b/docs/config/shared-options.md index d8b81b4531f571..45bfe61859f80c 100644 --- a/docs/config/shared-options.md +++ b/docs/config/shared-options.md @@ -163,6 +163,13 @@ Enabling this setting causes vite to determine file identity by the original fil - **Related:** [esbuild#preserve-symlinks](https://esbuild.github.io/api/#preserve-symlinks), [webpack#resolve.symlinks ](https://webpack.js.org/configuration/resolve/#resolvesymlinks) +## html.cspNonce + +- **Type:** `string` +- **Related:** [Content Security Policy (CSP)](/guide/features#content-security-policy-csp) + +A nonce value placeholder that will be used when generating script / style tags. Setting this value will also generate a meta tag with nonce value. + ## css.modules - **Type:** @@ -408,7 +415,7 @@ Adjust console output verbosity. Default is `'info'`. Use a custom logger to log messages. You can use Vite's `createLogger` API to get the default logger and customize it to, for example, change the message or filter out certain warnings. -```js +```ts twoslash import { createLogger, defineConfig } from 'vite' const logger = createLogger() diff --git a/docs/config/ssr-options.md b/docs/config/ssr-options.md index 0111aa56031e15..1f5cd8e47f325a 100644 --- a/docs/config/ssr-options.md +++ b/docs/config/ssr-options.md @@ -18,7 +18,7 @@ Note that the explicitly listed dependencies (using `string[]` type) will always 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. +If `true`, no dependencies are externalized. However, dependencies explicitly listed in `ssr.external` (using `string[]` type) can take priority and still be externalized. If `ssr.target: 'node'` is set, Node.js built-ins will also be externalized by default. Note that if both `ssr.noExternal: true` and `ssr.external: true` are configured, `ssr.noExternal` takes priority and no dependencies are externalized. diff --git a/docs/guide/api-hmr.md b/docs/guide/api-hmr.md index e0cd9485527e1c..189fe693cf02f0 100644 --- a/docs/guide/api-hmr.md +++ b/docs/guide/api-hmr.md @@ -8,15 +8,15 @@ The manual HMR API is primarily intended for framework and tooling authors. As a Vite exposes its manual HMR API via the special `import.meta.hot` object: -```ts +```ts twoslash +import type { ModuleNamespace } from 'vite/types/hot.d.ts' +import type { InferCustomEventPayload } from 'vite/types/customEvent.d.ts' + +// ---cut--- interface ImportMeta { readonly hot?: ViteHotContext } -type ModuleNamespace = Record & { - [Symbol.toStringTag]: 'Module' -} - interface ViteHotContext { readonly data: any @@ -32,7 +32,6 @@ interface ViteHotContext { prune(cb: (data: any) => void): void invalidate(message?: string): void - // `InferCustomEventPayload` provides types for built-in Vite events on( event: T, cb: (payload: InferCustomEventPayload) => void, @@ -67,7 +66,9 @@ Vite provides type definitions for `import.meta.hot` in [`vite/client.d.ts`](htt For a module to self-accept, use `import.meta.hot.accept` with a callback which receives the updated module: -```js +```js twoslash +import 'vite/client' +// ---cut--- export const count = 1 if (import.meta.hot) { @@ -90,7 +91,13 @@ Vite requires that the call to this function appears as `import.meta.hot.accept( A module can also accept updates from direct dependencies without reloading itself: -```js +```js twoslash +// @filename: /foo.d.ts +export declare const foo: () => void + +// @filename: /example.js +import 'vite/client' +// ---cut--- import { foo } from './foo.js' foo() @@ -117,7 +124,9 @@ if (import.meta.hot) { A self-accepting module or a module that expects to be accepted by others can use `hot.dispose` to clean-up any persistent side effects created by its updated copy: -```js +```js twoslash +import 'vite/client' +// ---cut--- function setupSideEffect() {} setupSideEffect() @@ -133,7 +142,9 @@ if (import.meta.hot) { Register a callback that will call when the module is no longer imported on the page. Compared to `hot.dispose`, this can be used if the source code cleans up side-effects by itself on updates and you only need to clean-up when it's removed from the page. Vite currently uses this for `.css` imports. -```js +```js twoslash +import 'vite/client' +// ---cut--- function setupOrReuseSideEffect() {} setupOrReuseSideEffect() @@ -151,7 +162,9 @@ The `import.meta.hot.data` object is persisted across different instances of the Note that re-assignment of `data` itself is not supported. Instead, you should mutate properties of the `data` object so information added from other handlers are preserved. -```js +```js twoslash +import 'vite/client' +// ---cut--- // ok import.meta.hot.data.someValue = 'hello' @@ -169,7 +182,9 @@ A self-accepting module may realize during runtime that it can't handle a HMR up Note that you should always call `import.meta.hot.accept` even if you plan to call `invalidate` immediately afterwards, or else the HMR client won't listen for future changes to the self-accepting module. To communicate your intent clearly, we recommend calling `invalidate` within the `accept` callback like so: -```js +```js twoslash +import 'vite/client' +// ---cut--- import.meta.hot.accept((module) => { // You may use the new module instance to decide whether to invalidate. if (cannotHandleUpdate(module)) { diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index fbfba3b7d9e2c8..eda204c2cf951d 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -12,26 +12,24 @@ async function createServer(inlineConfig?: InlineConfig): Promise **Example Usage:** -```js -import { fileURLToPath } from 'url' +```ts twoslash +import { fileURLToPath } from 'node:url' import { createServer } from 'vite' const __dirname = fileURLToPath(new URL('.', import.meta.url)) -;(async () => { - const server = await createServer({ - // any valid user config options, plus `mode` and `configFile` - configFile: false, - root: __dirname, - server: { - port: 1337, - }, - }) - await server.listen() +const server = await createServer({ + // any valid user config options, plus `mode` and `configFile` + configFile: false, + root: __dirname, + server: { + port: 1337, + }, +}) +await server.listen() - server.printUrls() - server.bindCLIShortcuts({ print: true }) -})() +server.printUrls() +server.bindCLIShortcuts({ print: true }) ``` ::: tip NOTE @@ -44,7 +42,7 @@ When using [middleware mode](/config/server-options.html#server-middlewaremode)
Example -```ts +```ts twoslash import http from 'http' import { createServer } from 'vite' @@ -57,16 +55,17 @@ const vite = await createServer({ // Provide the parent http server for proxy WebSocket server: parentServer, }, - }, - proxy: { - '/ws': { - target: 'ws://localhost:3000', - // Proxying WebSocket - ws: true, + proxy: { + '/ws': { + target: 'ws://localhost:3000', + // Proxying WebSocket + ws: true, + }, }, }, }) +// @noErrors: 2339 parentServer.use(vite.middlewares) ``` @@ -183,9 +182,21 @@ interface ViteDevServer { * Bind CLI shortcuts */ bindCLIShortcuts(options?: BindCLIShortcutsOptions): void + /** + * Calling `await server.waitForRequestsIdle(id)` will wait until all static imports + * are processed. If called from a load or transform plugin hook, the id needs to be + * passed as a parameter to avoid deadlocks. Calling this function after the first + * static imports section of the module graph has been processed will resolve immediately. + * @experimental + */ + waitForRequestsIdle: (ignoredId?: string) => Promise } ``` +:::info +`waitForRequestsIdle` is meant to be used as a escape hatch to improve DX for features that can't be implemented following the on-demand nature of the Vite dev server. It can be used during startup by tools like Tailwind to delay generating the app CSS classes until the app code has been seen, avoiding flashes of style changes. When this function is used in a load or transform hook, and the default HTTP1 server is used, one of the six http channels will be blocked until the server processes all static imports. Vite's dependency optimizer currently uses this function to avoid full-page reloads on missing dependencies by delaying loading of pre-bundled dependencies until all imported dependencies have been collected from static imported sources. Vite may switch to a different strategy in a future major release, setting `optimizeDeps.crawlUntilStaticImports: false` by default to avoid the performance hit in large applications during cold start. +::: + ## `build` **Type Signature:** @@ -198,24 +209,22 @@ async function build( **Example Usage:** -```js -import path from 'path' -import { fileURLToPath } from 'url' +```ts twoslash +import path from 'node:path' +import { fileURLToPath } from 'node:url' import { build } from 'vite' const __dirname = fileURLToPath(new URL('.', import.meta.url)) -;(async () => { - await build({ - root: path.resolve(__dirname, './project'), - base: '/foo/', - build: { - rollupOptions: { - // ... - }, +await build({ + root: path.resolve(__dirname, './project'), + base: '/foo/', + build: { + rollupOptions: { + // ... }, - }) -})() + }, +}) ``` ## `preview` @@ -228,20 +237,19 @@ async function preview(inlineConfig?: InlineConfig): Promise **Example Usage:** -```js +```ts twoslash import { preview } from 'vite' -;(async () => { - const previewServer = await preview({ - // any valid user config options, plus `mode` and `configFile` - preview: { - port: 8080, - open: true, - }, - }) - previewServer.printUrls() - previewServer.bindCLIShortcuts({ print: true }) -})() +const previewServer = await preview({ + // any valid user config options, plus `mode` and `configFile` + preview: { + port: 8080, + open: true, + }, +}) + +previewServer.printUrls() +previewServer.bindCLIShortcuts({ print: true }) ``` ## `PreviewServer` @@ -316,7 +324,17 @@ Deeply merge two Vite configs. `isRoot` represents the level within the Vite con You can use the `defineConfig` helper to merge a config in callback form with another config: -```ts +```ts twoslash +import { + defineConfig, + mergeConfig, + type UserConfigFnObject, + type UserConfig, +} from 'vite' +declare const configAsCallback: UserConfigFnObject +declare const configAsObject: UserConfig + +// ---cut--- export default defineConfig((configEnv) => mergeConfig(configAsCallback(configEnv), configAsObject), ) diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index eb62b70cc809d8..4d8066ff4dddb3 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -579,7 +579,9 @@ We recommend **always prefixing** your event names to avoid collisions with othe On the client side, use [`hot.on`](/guide/api-hmr.html#hot-on-event-cb) to listen to the events: -```ts +```ts twoslash +import 'vite/client' +// ---cut--- // client side if (import.meta.hot) { import.meta.hot.on('my:greetings', (data) => { diff --git a/docs/guide/assets.md b/docs/guide/assets.md index 657db9de24fca0..4f81d04e496a80 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -7,7 +7,9 @@ Importing a static asset will return the resolved public URL when it is served: -```js +```js twoslash +import 'vite/client' +// ---cut--- import imgUrl from './img.png' document.getElementById('hero-img').src = imgUrl ``` @@ -33,7 +35,9 @@ The behavior is similar to webpack's `file-loader`. The difference is that the i ::: tip Inlining SVGs through `url()` When passing a URL of SVG to a manually constructed `url()` by JS, the variable should be wrapped within double quotes. -```js +```js twoslash +import 'vite/client' +// ---cut--- import imgUrl from './img.svg' document.getElementById('hero-img').style.background = `url("${imgUrl}")` ``` @@ -44,7 +48,9 @@ document.getElementById('hero-img').style.background = `url("${imgUrl}")` Assets that are not included in the internal list or in `assetsInclude`, can be explicitly imported as a URL using the `?url` suffix. This is useful, for example, to import [Houdini Paint Worklets](https://houdini.how/usage). -```js +```js twoslash +import 'vite/client' +// ---cut--- import workletURL from 'extra-scalloped-border/worklet.js?url' CSS.paintWorklet.addModule(workletURL) ``` @@ -53,7 +59,9 @@ CSS.paintWorklet.addModule(workletURL) Assets can be imported as strings using the `?raw` suffix. -```js +```js twoslash +import 'vite/client' +// ---cut--- import shaderString from './shader.glsl?raw' ``` @@ -61,19 +69,25 @@ import shaderString from './shader.glsl?raw' Scripts can be imported as web workers with the `?worker` or `?sharedworker` suffix. -```js +```js twoslash +import 'vite/client' +// ---cut--- // Separate chunk in the production build import Worker from './shader.js?worker' const worker = new Worker() ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- // sharedworker import SharedWorker from './shader.js?sharedworker' const sharedWorker = new SharedWorker() ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- // Inlined as base64 strings import InlineWorker from './shader.js?worker&inline' ``` diff --git a/docs/guide/backend-integration.md b/docs/guide/backend-integration.md index 6e391e48b23261..f154be130eefb4 100644 --- a/docs/guide/backend-integration.md +++ b/docs/guide/backend-integration.md @@ -8,7 +8,9 @@ If you need a custom integration, you can follow the steps in this guide to conf 1. In your Vite config, configure the entry and enable build manifest: - ```js + ```js twoslash + import { defineConfig } from 'vite' + // ---cut--- // vite.config.js export default defineConfig({ build: { @@ -66,7 +68,8 @@ If you need a custom integration, you can follow the steps in this guide to conf "isEntry": true, "dynamicImports": ["views/foo.js"], "css": ["assets/main.b82dbe22.css"], - "assets": ["assets/asset.0ab0f9cd.png"] + "assets": ["assets/asset.0ab0f9cd.png"], + "imports": ["_shared.83069a53.js"] }, "views/foo.js": { "file": "assets/foo.869aea0d.js", @@ -75,7 +78,8 @@ If you need a custom integration, you can follow the steps in this guide to conf "imports": ["_shared.83069a53.js"] }, "_shared.83069a53.js": { - "file": "assets/shared.83069a53.js" + "file": "assets/shared.83069a53.js", + "css": ["assets/shared.a834bfc3.css"] } } ``` @@ -85,10 +89,54 @@ If you need a custom integration, you can follow the steps in this guide to conf - For non entry chunks, the key is the base name of the generated file prefixed with `_`. - Chunks will contain information on its static and dynamic imports (both are keys that map to the corresponding chunk in the manifest), and also its corresponding CSS and asset files (if any). - You can use this file to render links or preload directives with hashed filenames (note: the syntax here is for explanation only, substitute with your server templating language): +4. You can use this file to render links or preload directives with hashed filenames. + + Here is an example HTML template to render the proper links. The syntax here is for + explanation only, substitute with your server templating language. The `importedChunks` + function is for illustration and isn't provided by Vite. ```html - - + + + + + + + + + + + + + ``` + + Specifically, a backend generating HTML should include the following tags given a manifest + file and an entry point: + + - A `` tag for each file in the entry point chunk's `css` list + - Recursively follow all chunks in the entry point's `imports` list and include a + `` tag for each css file of each imported chunk. + - A tag for the `file` key of the entry point chunk (` + + + ``` + + While the following should be included for the entry point `views/foo.js`: + + ```html + + + + ``` diff --git a/docs/guide/build.md b/docs/guide/build.md index a9c79c3d44c1f5..6fe034e8df735e 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -34,7 +34,6 @@ For advanced base path control, check out [Advanced Base Options](#advanced-base The build can be customized via various [build config options](/config/build-options.md). Specifically, you can directly adjust the underlying [Rollup options](https://rollupjs.org/configuration-options/) via `build.rollupOptions`: ```js -// vite.config.js export default defineConfig({ build: { rollupOptions: { @@ -68,9 +67,9 @@ You should use `build.rollupOptions.output.manualChunks` function form when usin Vite emits `vite:preloadError` event when it fails to load dynamic imports. `event.payload` contains the original import error. If you call `event.preventDefault()`, the error will not be thrown. -```js +```js twoslash window.addEventListener('vite:preloadError', (event) => { - window.reload() // for example, refresh the page + window.location.reload() // for example, refresh the page }) ``` @@ -111,7 +110,7 @@ During dev, simply navigate or link to `/nested/` - it works as expected, just l During build, all you need to do is to specify multiple `.html` files as entry points: -```js +```js twoslash // vite.config.js import { resolve } from 'path' import { defineConfig } from 'vite' @@ -138,7 +137,7 @@ When you are developing a browser-oriented library, you are likely spending most When it is time to bundle your library for distribution, use the [`build.lib` config option](/config/build-options.md#build-lib). Make sure to also externalize any dependencies that you do not want to bundle into your library, e.g. `vue` or `react`: -```js +```js twoslash // vite.config.js import { resolve } from 'path' import { defineConfig } from 'vite' @@ -253,32 +252,45 @@ A user may choose to deploy in three different paths: A single static [base](#public-base-path) isn't enough in these scenarios. Vite provides experimental support for advanced base options during build, using `experimental.renderBuiltUrl`. -```ts + +```ts twoslash +import type { UserConfig } from 'vite' +const config: UserConfig = { +// ---cut-before--- experimental: { - renderBuiltUrl(filename: string, { hostType }: { hostType: 'js' | 'css' | 'html' }) { + renderBuiltUrl(filename, { hostType }) { if (hostType === 'js') { return { runtime: `window.__toCdnUrl(${JSON.stringify(filename)})` } } else { return { relative: true } } - } + }, +}, +// ---cut-after--- } ``` + If the hashed assets and public files aren't deployed together, options for each group can be defined independently using asset `type` included in the second `context` param given to the function. -```ts -experimental: { - renderBuiltUrl(filename: string, { hostId, hostType, type }: { hostId: string, hostType: 'js' | 'css' | 'html', type: 'public' | 'asset' }) { - if (type === 'public') { - return 'https://www.domain.com/' + filename - } - else if (path.extname(hostId) === '.js') { - return { runtime: `window.__assetsPath(${JSON.stringify(filename)})` } - } - else { - return 'https://cdn.domain.com/assets/' + filename - } - } +```ts twoslash +import type { UserConfig } from 'vite' +import path from 'node:path' +const config: UserConfig = { + // ---cut-before--- + experimental: { + renderBuiltUrl(filename, { hostId, hostType, type }) { + if (type === 'public') { + return 'https://www.domain.com/' + filename + } else if (path.extname(hostId) === '.js') { + return { runtime: `window.__assetsPath(${JSON.stringify(filename)})` } + } else { + return 'https://cdn.domain.com/assets/' + filename + } + }, + }, + // ---cut-after--- } ``` + +Note that the `filename` passed is a decoded URL, and if the function returns a URL string, it should also be decoded. Vite will handle the encoding automatically when rendering the URLs. If an object with `runtime` is returned, encoding should be handled yourself where needed as the runtime code will be rendered as is. diff --git a/docs/guide/cli.md b/docs/guide/cli.md index bfbd6ca7de6e0c..8256f0811ddf29 100644 --- a/docs/guide/cli.md +++ b/docs/guide/cli.md @@ -4,7 +4,7 @@ ### `vite` -Start Vite dev server in the current directory. +Start Vite dev server in the current directory. `vite dev` and `vite serve` are aliases for `vite`. #### Usage diff --git a/docs/guide/dep-pre-bundling.md b/docs/guide/dep-pre-bundling.md index 331563fd4c36af..e387a6ae1b8a48 100644 --- a/docs/guide/dep-pre-bundling.md +++ b/docs/guide/dep-pre-bundling.md @@ -37,7 +37,9 @@ In a monorepo setup, a dependency may be a linked package from the same repo. Vi However, this requires the linked dep to be exported as ESM. If not, you can add the dependency to [`optimizeDeps.include`](/config/dep-optimization-options.md#optimizedeps-include) and [`build.commonjsOptions.include`](/config/build-options.md#build-commonjsoptions) in your config. -```js +```js twoslash +import { defineConfig } from 'vite' +// ---cut--- export default defineConfig({ optimizeDeps: { include: ['linked-dep'], diff --git a/docs/guide/features.md b/docs/guide/features.md index 19e4e3adc22617..4d7d674f413743 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -65,7 +65,7 @@ It is because `esbuild` only performs transpilation without type information, it You must set `"isolatedModules": true` in your `tsconfig.json` under `compilerOptions`, so that TS will warn you against the features that do not work with isolated transpilation. -However, some libraries (e.g. [`vue`](https://github.com/vuejs/core/issues/1228)) don't work well with `"isolatedModules": true`. You can use `"skipLibCheck": true` to temporarily suppress the errors until it is fixed upstream. +If a dependency doesn't work well with `"isolatedModules": true`. You can use `"skipLibCheck": true` to temporarily suppress the errors until it is fixed upstream. #### `useDefineForClassFields` @@ -176,7 +176,7 @@ Vue users should use the official [@vitejs/plugin-vue-jsx](https://github.com/vi If using JSX without React or Vue, custom `jsxFactory` and `jsxFragment` can be configured using the [`esbuild` option](/config/shared-options.md#esbuild). For example for Preact: -```js +```js twoslash // vite.config.js import { defineConfig } from 'vite' @@ -192,7 +192,7 @@ More details in [esbuild docs](https://esbuild.github.io/content-types/#jsx). You can inject the JSX helpers using `jsxInject` (which is a Vite-only option) to avoid manual imports: -```js +```js twoslash // vite.config.js import { defineConfig } from 'vite' @@ -230,7 +230,9 @@ Any CSS file ending with `.module.css` is considered a [CSS modules file](https: } ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- import classes from './example.module.css' document.getElementById('foo').className = classes.red ``` @@ -239,7 +241,9 @@ CSS modules behavior can be configured via the [`css.modules` option](/config/sh If `css.modules.localsConvention` is set to enable camelCase locals (e.g. `localsConvention: 'camelCaseOnly'`), you can also use named imports: -```js +```js twoslash +import 'vite/client' +// ---cut--- // .apply-color -> applyColor import { applyColor } from './example.module.css' document.getElementById('foo').className = applyColor @@ -274,7 +278,9 @@ You can also use CSS modules combined with pre-processors by prepending `.module The automatic injection of CSS contents can be turned off via the `?inline` query parameter. In this case, the processed CSS string is returned as the module's default export as usual, but the styles aren't injected to the page. -```js +```js twoslash +import 'vite/client' +// ---cut--- import './foo.css' // will be injected into the page import otherStyles from './bar.css?inline' // will not be injected ``` @@ -305,29 +311,39 @@ By default, Vite uses esbuild to minify CSS. Lightning CSS can also be used as t Importing a static asset will return the resolved public URL when it is served: -```js +```js twoslash +import 'vite/client' +// ---cut--- import imgUrl from './img.png' document.getElementById('hero-img').src = imgUrl ``` Special queries can modify how assets are loaded: -```js +```js twoslash +import 'vite/client' +// ---cut--- // Explicitly load assets as URL import assetAsURL from './asset.js?url' ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- // Load assets as strings import assetAsString from './shader.glsl?raw' ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- // Load Web Workers import Worker from './worker.js?worker' ``` -```js +```js twoslash +import 'vite/client' +// ---cut--- // Web Workers inlined as base64 strings at build time import InlineWorker from './worker.js?worker&inline' ``` @@ -338,7 +354,9 @@ More details in [Static Asset Handling](./assets). JSON files can be directly imported - named imports are also supported: -```js +```js twoslash +import 'vite/client' +// ---cut--- // import the entire object import json from './example.json' // import a root field as named exports - helps with tree-shaking! @@ -349,7 +367,9 @@ import { field } from './example.json' Vite supports importing multiple modules from the file system via the special `import.meta.glob` function: -```js +```js twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js') ``` @@ -375,7 +395,9 @@ for (const path in modules) { Matched files are by default lazy-loaded via dynamic import and will be split into separate chunks during build. If you'd rather import all the modules directly (e.g. relying on side-effects in these modules to be applied first), you can pass `{ eager: true }` as the second argument: -```js +```js twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js', { eager: true }) ``` @@ -395,7 +417,9 @@ const modules = { The first argument can be an array of globs, for example -```js +```js twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob(['./dir/*.js', './another/*.js']) ``` @@ -403,7 +427,9 @@ const modules = import.meta.glob(['./dir/*.js', './another/*.js']) Negative glob patterns are also supported (prefixed with `!`). To ignore some files from the result, you can add exclude glob patterns to the first argument: -```js +```js twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob(['./dir/*.js', '!**/bar.js']) ``` @@ -418,7 +444,9 @@ const modules = { It's possible to only import parts of the modules with the `import` options. -```ts +```ts twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js', { import: 'setup' }) ``` @@ -432,7 +460,9 @@ const modules = { When combined with `eager` it's even possible to have tree-shaking enabled for those modules. -```ts +```ts twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js', { import: 'setup', eager: true, @@ -451,7 +481,9 @@ const modules = { Set `import` to `default` to import the default export. -```ts +```ts twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js', { import: 'default', eager: true, @@ -472,7 +504,9 @@ const modules = { 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 +```ts twoslash +import 'vite/client' +// ---cut--- const moduleStrings = import.meta.glob('./dir/*.svg', { query: '?raw', import: 'default', @@ -497,7 +531,9 @@ const moduleUrls = { You can also provide custom queries for other plugins to consume: -```ts +```ts twoslash +import 'vite/client' +// ---cut--- const modules = import.meta.glob('./dir/*.js', { query: { foo: 'bar', bar: true }, }) @@ -527,7 +563,9 @@ Note that variables only represent file names one level deep. If `file` is `'foo Pre-compiled `.wasm` files can be imported with `?init`. The default export will be an initialization function that returns a Promise of the [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Instance): -```js +```js twoslash +import 'vite/client' +// ---cut--- import init from './example.wasm?init' init().then((instance) => { @@ -537,7 +575,10 @@ init().then((instance) => { The init function can also take an importObject which is passed along to [`WebAssembly.instantiate`](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/instantiate) as its second argument: -```js +```js twoslash +import 'vite/client' +import init from './example.wasm?init' +// ---cut--- init({ imports: { someFunc: () => { @@ -560,7 +601,9 @@ Use [`vite-plugin-wasm`](https://github.com/Menci/vite-plugin-wasm) or other com If you need access to the `Module` object, e.g. to instantiate it multiple times, use an [explicit URL import](./assets#explicit-url-imports) to resolve the asset, and then perform the instantiation: -```js +```js twoslash +import 'vite/client' +// ---cut--- import wasmUrl from 'foo.wasm?url' const main = async () => { @@ -580,7 +623,9 @@ See the issue [Support wasm in SSR](https://github.com/vitejs/vite/issues/8882). Here is an alternative, assuming the project base is the current directory: -```js +```js twoslash +import 'vite/client' +// ---cut--- import wasmUrl from 'foo.wasm?url' import { readFile } from 'node:fs/promises' @@ -620,7 +665,9 @@ The worker detection will only work if the `new URL()` constructor is used direc 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: -```js +```js twoslash +import 'vite/client' +// ---cut--- import MyWorker from './worker?worker' const worker = new MyWorker() @@ -630,18 +677,44 @@ The worker script can also use ESM `import` statements instead of `importScripts By default, the worker script will be emitted as a separate chunk in the production build. If you wish to inline the worker as base64 strings, add the `inline` query: -```js +```js twoslash +import 'vite/client' +// ---cut--- import MyWorker from './worker?worker&inline' ``` If you wish to retrieve the worker as a URL, add the `url` query: -```js +```js twoslash +import 'vite/client' +// ---cut--- import MyWorker from './worker?worker&url' ``` See [Worker Options](/config/worker-options.md) for details on configuring the bundling of all workers. +## Content Security Policy (CSP) + +To deploy CSP, certain directives or configs must be set due to Vite's internals. + +### [`'nonce-{RANDOM}'`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#nonce-base64-value) + +When [`html.cspNonce`](/config/shared-options#html-cspnonce) is set, Vite adds a nonce attribute with the specified value to the output script tag and link tag for stylesheets. Note that Vite will not add a nonce attribute to other tags, such as ` -
-
-
-

-    

-    

-    
- Click outside, press Esc key, or fix the code to dismiss.
- You can also disable this overlay by setting - server.hmr.overlay to false in ${hmrConfigName}. -
-
-
` +// Error Template +const template = h( + 'div', + { class: 'backdrop', part: 'backdrop' }, + h( + 'div', + { class: 'window', part: 'window' }, + h( + 'pre', + { class: 'message', part: 'message' }, + h('span', { class: 'plugin', part: 'plugin' }), + h('span', { class: 'message-body', part: 'message-body' }), + ), + h('pre', { class: 'file', part: 'file' }), + h('pre', { class: 'frame', part: 'frame' }), + h('pre', { class: 'stack', part: 'stack' }), + h( + 'div', + { class: 'tip', part: 'tip' }, + 'Click outside, press ', + h('kbd', {}, 'Esc'), + ' key, or fix the code to dismiss.', + h('br'), + 'You can also disable this overlay by setting ', + h('code', { part: 'config-option-name' }, 'server.hmr.overlay'), + ' to ', + h('code', { part: 'config-option-value' }, 'false'), + ' in ', + h('code', { part: 'config-file-name' }, hmrConfigName), + '.', + ), + ), + h('style', {}, templateStyle), +) + const fileRE = /(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm @@ -177,7 +212,8 @@ export class ErrorOverlay extends HTMLElement { constructor(err: ErrorPayload['err'], links = true) { super() this.root = this.attachShadow({ mode: 'open' }) - this.root.innerHTML = template + + this.root.appendChild(template) codeframeRE.lastIndex = 0 const hasFrame = err.frame && codeframeRE.test(err.frame) diff --git a/packages/vite/src/node/__tests__/utils.spec.ts b/packages/vite/src/node/__tests__/utils.spec.ts index 549371a2f395de..ac10229fc1b2e5 100644 --- a/packages/vite/src/node/__tests__/utils.spec.ts +++ b/packages/vite/src/node/__tests__/utils.spec.ts @@ -339,6 +339,20 @@ describe('processSrcSetSync', () => { expect(processSrcSetSync(base64, ({ url }) => url)).toBe(base64) }) + test('should not split the comma inside image URI', async () => { + const imageURIWithComma = + 'asset.png?param1=true,param2=false 400w, asset.png?param1=true,param2=false 800w' + expect(processSrcSetSync(imageURIWithComma, ({ url }) => url)).toBe( + imageURIWithComma, + ) + }) + + test('should handle srcset when descriptor is not present', async () => { + const srcsetNoDescriptor = 'asset.png, test.png 400w' + const result = 'asset.png, test.png 400w' + expect(processSrcSetSync(srcsetNoDescriptor, ({ url }) => url)).toBe(result) + }) + test('should not break a regular URL in srcSet', async () => { const source = 'https://anydomain/image.jpg' expect( diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index b093ecfb5e213a..7e37ac71ad1b6f 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -40,6 +40,7 @@ import { emptyDir, joinUrlSegments, normalizePath, + partialEncodeURI, requireResolveFromRootWithFallback, } from './utils' import { manifestPlugin } from './plugins/manifest' @@ -1092,7 +1093,7 @@ const getResolveUrl = (path: string, URL = 'URL') => `new ${URL}(${path}).href` const getRelativeUrlFromDocument = (relativePath: string, umd = false) => getResolveUrl( - `'${escapeId(relativePath)}', ${ + `'${escapeId(partialEncodeURI(relativePath))}', ${ umd ? `typeof document === 'undefined' ? location.href : ` : '' }document.currentScript && document.currentScript.src || document.baseURI`, ) @@ -1118,11 +1119,15 @@ const relativeUrlMechanisms: Record< relativePath, )} : ${getRelativeUrlFromDocument(relativePath)})`, es: (relativePath) => - getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`), + getResolveUrl( + `'${escapeId(partialEncodeURI(relativePath))}', import.meta.url`, + ), iife: (relativePath) => getRelativeUrlFromDocument(relativePath), // NOTE: make sure rollup generate `module` params system: (relativePath) => - getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`), + getResolveUrl( + `'${escapeId(partialEncodeURI(relativePath))}', module.meta.url`, + ), umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( relativePath, @@ -1133,7 +1138,9 @@ const relativeUrlMechanisms: Record< const customRelativeUrlMechanisms = { ...relativeUrlMechanisms, 'worker-iife': (relativePath) => - getResolveUrl(`'${escapeId(relativePath)}', self.location.href`), + getResolveUrl( + `'${escapeId(partialEncodeURI(relativePath))}', self.location.href`, + ), } as const satisfies Record string> export type RenderBuiltAssetUrl = ( diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 21fe544497262a..83a5e455609a0c 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -76,6 +76,10 @@ const debug = createDebugger('vite:config') const promisifiedRealpath = promisify(fs.realpath) export interface ConfigEnv { + /** + * 'serve': during dev (`vite` command) + * 'build': when building for production (`vite build` command) + */ command: 'build' | 'serve' mode: string isSsrBuild?: boolean @@ -105,8 +109,7 @@ export type UserConfigExport = /** * Type helper to make it easier to use vite.config.ts * accepts a direct {@link UserConfig} object, or a function that returns it. - * The function receives a {@link ConfigEnv} object that exposes two properties: - * `command` (either `'build'` or `'serve'`), and `mode`. + * The function receives a {@link ConfigEnv} object. */ export function defineConfig(config: UserConfig): UserConfig export function defineConfig(config: Promise): Promise @@ -173,6 +176,10 @@ export interface UserConfig { * Configure resolver */ resolve?: ResolveOptions & { alias?: AliasOptions } + /** + * HTML related options + */ + html?: HTMLOptions /** * CSS related options (preprocessors and CSS modules) */ @@ -281,6 +288,15 @@ export interface UserConfig { appType?: AppType } +export interface HTMLOptions { + /** + * A nonce value placeholder that will be used when generating script/style tags. + * + * Make sure that this placeholder will be replaced with a unique value for each request by the server. + */ + cspNonce?: string +} + export interface ExperimentalOptions { /** * Append fake `&lang.(ext)` when queries are specified, to preserve the file extension for following plugins to process. @@ -1054,6 +1070,8 @@ async function bundleConfigFile( __dirname: dirnameVarName, __filename: filenameVarName, 'import.meta.url': importMetaUrlVarName, + 'import.meta.dirname': dirnameVarName, + 'import.meta.filename': filenameVarName, }, plugins: [ { diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts index d640f51d31939e..3b84c34b0626a8 100644 --- a/packages/vite/src/node/index.ts +++ b/packages/vite/src/node/index.ts @@ -24,6 +24,7 @@ export type { AppType, ConfigEnv, ExperimentalOptions, + HTMLOptions, InlineConfig, LegacyOptions, PluginHookUtils, diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index b3f6533c86ad09..4c98a289c5077a 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -22,7 +22,10 @@ import { tryStatSync, unique, } from '../utils' -import { transformWithEsbuild } from '../plugins/esbuild' +import { + defaultEsbuildSupported, + transformWithEsbuild, +} from '../plugins/esbuild' import { ESBUILD_MODULES_TARGET, METADATA_FILENAME } from '../constants' import { isWindows } from '../../shared/utils' import { esbuildCjsExternalPlugin, esbuildDepPlugin } from './esbuildDepPlugin' @@ -56,7 +59,6 @@ export interface DepsOptimizer { isOptimizedDepFile: (id: string) => boolean isOptimizedDepUrl: (url: string) => boolean getOptimizedDepId: (depInfo: OptimizedDepInfo) => string - delayDepsOptimizerUntil: (id: string, done: () => Promise) => void close: () => Promise @@ -799,8 +801,7 @@ async function prepareEsbuildOptimizerRun( charset: 'utf8', ...esbuildOptions, supported: { - 'dynamic-import': true, - 'import-meta': true, + ...defaultEsbuildSupported, ...esbuildOptions.supported, }, }) diff --git a/packages/vite/src/node/optimizer/optimizer.ts b/packages/vite/src/node/optimizer/optimizer.ts index 721a2f45c8035c..096d0bef2cdd54 100644 --- a/packages/vite/src/node/optimizer/optimizer.ts +++ b/packages/vite/src/node/optimizer/optimizer.ts @@ -41,7 +41,7 @@ export function getDepsOptimizer( export async function initDepsOptimizer( config: ResolvedConfig, - server?: ViteDevServer, + server: ViteDevServer, ): Promise { if (!getDepsOptimizer(config, false)) { await createDepsOptimizer(config, server) @@ -78,7 +78,7 @@ export async function initDevSsrDepsOptimizer( async function createDepsOptimizer( config: ResolvedConfig, - server?: ViteDevServer, + server: ViteDevServer, ): Promise { const { logger } = config const ssr = false @@ -105,7 +105,6 @@ async function createDepsOptimizer( isOptimizedDepUrl: createIsOptimizedDepUrl(config), getOptimizedDepId: (depInfo: OptimizedDepInfo) => `${depInfo.file}?v=${depInfo.browserHash}`, - delayDepsOptimizerUntil, close, options, } @@ -167,9 +166,10 @@ async function createDepsOptimizer( // 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 + let waitingForCrawlEnd = false if (!cachedMetadata) { - crawlEndFinder = setupOnCrawlEnd(onCrawlEnd) + server._onCrawlEnd(onCrawlEnd) + waitingForCrawlEnd = true } let optimizationResult: @@ -188,7 +188,6 @@ async function createDepsOptimizer( async function close() { closed = true - crawlEndFinder?.cancel() await Promise.allSettled([ discover?.cancel(), depsOptimizer.scanProcessing, @@ -271,7 +270,7 @@ async function createDepsOptimizer( 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 + if (!waitingForCrawlEnd) return optimizationResult = undefined // signal that we'll be using the result @@ -535,17 +534,15 @@ async function createDepsOptimizer( } function fullReload() { - if (server) { - // Cached transform results have stale imports (resolved to - // old locations) so they need to be invalidated before the page is - // reloaded. - server.moduleGraph.invalidateAll() - - server.hot.send({ - type: 'full-reload', - path: '*', - }) - } + // Cached transform results have stale imports (resolved to + // old locations) so they need to be invalidated before the page is + // reloaded. + server.moduleGraph.invalidateAll() + + server.hot.send({ + type: 'full-reload', + path: '*', + }) } async function rerun() { @@ -594,7 +591,7 @@ async function createDepsOptimizer( // we can get a list of every missing dependency before giving to the // browser a dependency that may be outdated, thus avoiding full page reloads - if (!crawlEndFinder) { + if (!waitingForCrawlEnd) { // Debounced rerun, let other missing dependencies be discovered before // the running next optimizeDeps debouncedProcessing() @@ -649,7 +646,7 @@ async function createDepsOptimizer( // be crawled if the browser requests them right away). async function onCrawlEnd() { // switch after this point to a simple debounce strategy - crawlEndFinder = undefined + waitingForCrawlEnd = false debug?.(colors.green(`✨ static imports crawl ended`)) if (closed) { @@ -757,71 +754,6 @@ async function createDepsOptimizer( debouncedProcessing(0) } } - - function delayDepsOptimizerUntil(id: string, done: () => Promise) { - if (crawlEndFinder && !depsOptimizer.isOptimizedDepFile(id)) { - crawlEndFinder.delayDepsOptimizerUntil(id, done) - } - } -} - -const callCrawlEndIfIdleAfterMs = 50 - -interface CrawlEndFinder { - delayDepsOptimizerUntil: (id: string, done: () => Promise) => void - cancel: () => void -} - -function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder { - const registeredIds = new Set() - const seenIds = new Set() - let timeoutHandle: NodeJS.Timeout | undefined - - let cancelled = false - function cancel() { - cancelled = true - } - - let crawlEndCalled = false - function callOnCrawlEnd() { - if (!cancelled && !crawlEndCalled) { - crawlEndCalled = true - onCrawlEnd() - } - } - - function delayDepsOptimizerUntil(id: string, done: () => Promise): void { - if (!seenIds.has(id)) { - seenIds.add(id) - registeredIds.add(id) - done() - .catch(() => {}) - .finally(() => markIdAsDone(id)) - } - } - function markIdAsDone(id: string): void { - registeredIds.delete(id) - checkIfCrawlEndAfterTimeout() - } - - function checkIfCrawlEndAfterTimeout() { - if (cancelled || registeredIds.size > 0) return - - if (timeoutHandle) clearTimeout(timeoutHandle) - timeoutHandle = setTimeout( - callOnCrawlEndWhenIdle, - callCrawlEndIfIdleAfterMs, - ) - } - async function callOnCrawlEndWhenIdle() { - if (cancelled || registeredIds.size > 0) return - callOnCrawlEnd() - } - - return { - delayDepsOptimizerUntil, - cancel, - } } async function createDevSsrDepsOptimizer( @@ -844,7 +776,6 @@ async function createDevSsrDepsOptimizer( // noop, there is no scanning during dev SSR // the optimizer blocks the server start run: () => {}, - delayDepsOptimizerUntil: (id: string, done: () => Promise) => {}, close: async () => {}, options: config.ssr.optimizeDeps, diff --git a/packages/vite/src/node/packages.ts b/packages/vite/src/node/packages.ts index c3504a0959b117..5af667d2417cc9 100644 --- a/packages/vite/src/node/packages.ts +++ b/packages/vite/src/node/packages.ts @@ -4,6 +4,7 @@ import { createRequire } from 'node:module' import { createFilter, isInNodeModules, + normalizePath, safeRealpathSync, tryStatSync, } from './utils' @@ -44,7 +45,7 @@ function invalidatePackageData( packageCache: PackageCache, pkgPath: string, ): void { - const pkgDir = path.dirname(pkgPath) + const pkgDir = normalizePath(path.dirname(pkgPath)) packageCache.forEach((pkg, cacheKey) => { if (pkg.dir === pkgDir) { packageCache.delete(cacheKey) @@ -169,27 +170,33 @@ export function findNearestMainPackageData( export function loadPackageData(pkgPath: string): PackageData { const data = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) - const pkgDir = path.dirname(pkgPath) + const pkgDir = normalizePath(path.dirname(pkgPath)) const { sideEffects } = data let hasSideEffects: (id: string) => boolean | null if (typeof sideEffects === 'boolean') { hasSideEffects = () => sideEffects } else if (Array.isArray(sideEffects)) { - const finalPackageSideEffects = sideEffects.map((sideEffect) => { - /* - * The array accepts simple glob patterns to the relevant files... Patterns like *.css, which do not include a /, will be treated like **\/*.css. - * https://webpack.js.org/guides/tree-shaking/ - * https://github.com/vitejs/vite/pull/11807 - */ - if (sideEffect.includes('/')) { - return sideEffect - } - return `**/${sideEffect}` - }) + if (sideEffects.length <= 0) { + // createFilter always returns true if `includes` is an empty array + // but here we want it to always return false + hasSideEffects = () => false + } else { + const finalPackageSideEffects = sideEffects.map((sideEffect) => { + /* + * The array accepts simple glob patterns to the relevant files... Patterns like *.css, which do not include a /, will be treated like **\/*.css. + * https://webpack.js.org/guides/tree-shaking/ + * https://github.com/vitejs/vite/pull/11807 + */ + if (sideEffect.includes('/')) { + return sideEffect + } + return `**/${sideEffect}` + }) - hasSideEffects = createFilter(finalPackageSideEffects, null, { - resolve: pkgDir, - }) + hasSideEffects = createFilter(finalPackageSideEffects, null, { + resolve: pkgDir, + }) + } } else { hasSideEffects = () => null } diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index ac18fb1772a4d6..e867bd1ace2b80 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -100,7 +100,7 @@ export function renderAssetUrlInJS( ) const replacementString = typeof replacement === 'string' - ? JSON.stringify(replacement).slice(1, -1) + ? JSON.stringify(encodeURI(replacement)).slice(1, -1) : `"+${replacement.runtime}+"` s.update(match.index, match.index + full.length, replacementString) } @@ -123,7 +123,7 @@ export function renderAssetUrlInJS( ) const replacementString = typeof replacement === 'string' - ? JSON.stringify(replacement).slice(1, -1) + ? JSON.stringify(encodeURI(replacement)).slice(1, -1) : `"+${replacement.runtime}+"` s.update(match.index, match.index + full.length, replacementString) } @@ -205,7 +205,17 @@ export function assetPlugin(config: ResolvedConfig): Plugin { } } - return `export default ${JSON.stringify(url)}` + return { + code: `export default ${JSON.stringify( + url.startsWith('data:') ? url : encodeURI(url), + )}`, + // Force rollup to keep this module from being shared between other entry points if it's an entrypoint. + // If the resulting chunk is empty, it will be removed in generateBundle. + moduleSideEffects: + config.command === 'build' && this.getModuleInfo(id)?.isEntry + ? 'no-treeshake' + : false, + } }, renderChunk(code, chunk, opts) { @@ -224,6 +234,19 @@ export function assetPlugin(config: ResolvedConfig): Plugin { }, generateBundle(_, bundle) { + // Remove empty entry point file + for (const file in bundle) { + const chunk = bundle[file] + if ( + chunk.type === 'chunk' && + chunk.isEntry && + chunk.moduleIds.length === 1 && + config.assetsInclude(chunk.moduleIds[0]) + ) { + delete bundle[file] + } + } + // do not emit assets for SSR build if ( config.command === 'build' && @@ -340,7 +363,7 @@ async function fileToBuiltUrl( const content = await fsp.readFile(file) let url: string - if (shouldInline(config, file, id, content, forceInline)) { + if (shouldInline(config, file, id, content, pluginContext, forceInline)) { if (config.build.lib && isGitLfsPlaceholder(content)) { config.logger.warn( colors.yellow(`Inlined file ${id} was not downloaded via Git LFS`), @@ -405,9 +428,11 @@ const shouldInline = ( file: string, id: string, content: Buffer, + pluginContext: PluginContext, forceInline: boolean | undefined, ): boolean => { if (config.build.lib) return true + if (pluginContext.getModuleInfo(id)?.isEntry) return false if (forceInline !== undefined) return forceInline let limit: number if (typeof config.build.assetsInlineLimit === 'function') { diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index f656c8c8aed4fd..3375fa7415c439 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -542,7 +542,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { map: { mappings: '' }, // avoid the css module from being tree-shaken so that we can retrieve // it in renderChunk() - moduleSideEffects: inlined ? false : 'no-treeshake', + moduleSideEffects: modulesCode || inlined ? false : 'no-treeshake', } }, @@ -593,13 +593,15 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { chunkCSS = chunkCSS.replace(assetUrlRE, (_, fileHash, postfix = '') => { const filename = this.getFileName(fileHash) + postfix chunk.viteMetadata!.importedAssets.add(cleanUrl(filename)) - return toOutputFilePathInCss( - filename, - 'asset', - cssAssetName, - 'css', - config, - toRelative, + return encodeURI( + toOutputFilePathInCss( + filename, + 'asset', + cssAssetName, + 'css', + config, + toRelative, + ), ) }) // resolve public URL from CSS paths @@ -610,13 +612,15 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { ) chunkCSS = chunkCSS.replace(publicAssetUrlRE, (_, hash) => { const publicUrl = publicAssetUrlMap.get(hash)!.slice(1) - return toOutputFilePathInCss( - publicUrl, - 'public', - cssAssetName, - 'css', - config, - () => `${relativePathToPublicFromCSS}/${publicUrl}`, + return encodeURI( + toOutputFilePathInCss( + publicUrl, + 'public', + cssAssetName, + 'css', + config, + () => `${relativePathToPublicFromCSS}/${publicUrl}`, + ), ) }) } @@ -711,7 +715,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { ) const replacementString = typeof replacement === 'string' - ? JSON.stringify(replacement).slice(1, -1) + ? JSON.stringify(encodeURI(replacement)).slice(1, -1) : `"+${replacement.runtime}+"` s.update(start, end, replacementString) } diff --git a/packages/vite/src/node/plugins/esbuild.ts b/packages/vite/src/node/plugins/esbuild.ts index 7076d0e6291c1b..54f1796afd6381 100644 --- a/packages/vite/src/node/plugins/esbuild.ts +++ b/packages/vite/src/node/plugins/esbuild.ts @@ -33,6 +33,14 @@ const IIFE_BEGIN_RE = const validExtensionRE = /\.\w+$/ const jsxExtensionsRE = /\.(?:j|t)sx\b/ +// the final build should always support dynamic import and import.meta. +// if they need to be polyfilled, plugin-legacy should be used. +// plugin-legacy detects these two features when checking for modern code. +export const defaultEsbuildSupported = { + 'dynamic-import': true, + 'import-meta': true, +} + let server: ViteDevServer export interface ESBuildOptions extends TransformOptions { @@ -235,6 +243,10 @@ export function esbuildPlugin(config: ResolvedConfig): Plugin { // Also transforming multiple times with keepNames enabled breaks // tree-shaking. (#9164) keepNames: false, + supported: { + ...defaultEsbuildSupported, + ...esbuildTransformOptions.supported, + }, } return { @@ -360,12 +372,8 @@ export function resolveEsbuildTranspileOptions( loader: 'js', target: target || undefined, format: rollupToEsbuildFormatMap[format], - // the final build should always support dynamic import and import.meta. - // if they need to be polyfilled, plugin-legacy should be used. - // plugin-legacy detects these two features when checking for modern code. supported: { - 'dynamic-import': true, - 'import-meta': true, + ...defaultEsbuildSupported, ...esbuildOptions.supported, }, } diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index eb7973296af86b..f9f47b570cc209 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -18,6 +18,7 @@ import { isDataUrl, isExternalUrl, normalizePath, + partialEncodeURI, processSrcSet, removeLeadingSlash, urlCanParse, @@ -308,8 +309,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { config.plugins, config.logger, ) + preHooks.unshift(injectCspNonceMetaTagHook(config)) preHooks.unshift(preImportMapHook(config)) preHooks.push(htmlEnvHook(config)) + postHooks.push(injectNonceAttributeTagHook(config)) postHooks.push(postImportMapHook()) const processedHtml = new Map() @@ -436,7 +439,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { overwriteAttrValue( s, sourceCodeLocation!, - toOutputPublicFilePath(url), + partialEncodeURI(toOutputPublicFilePath(url)), ) } @@ -488,22 +491,24 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { if (attrKey === 'srcset') { assetUrlsPromises.push( (async () => { - const processedUrl = await processSrcSet( + const processedEncodedUrl = await processSrcSet( p.value, async ({ url }) => { const decodedUrl = decodeURI(url) if (!isExcludedUrl(decodedUrl)) { const result = await processAssetUrl(url) - return result !== decodedUrl ? result : url + return result !== decodedUrl + ? encodeURI(result) + : url } return url }, ) - if (processedUrl !== p.value) { + if (processedEncodedUrl !== p.value) { overwriteAttrValue( s, getAttrSourceCodeLocation(node, attrKey), - processedUrl, + processedEncodedUrl, ) } })(), @@ -514,7 +519,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { overwriteAttrValue( s, getAttrSourceCodeLocation(node, attrKey), - toOutputPublicFilePath(url), + partialEncodeURI(toOutputPublicFilePath(url)), ) } else if (!isExcludedUrl(url)) { if ( @@ -543,11 +548,9 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { node.attrs.some( (p) => p.name === 'rel' && - p.value - .split(spaceRe) - .some((v) => - noInlineLinkRels.has(v.toLowerCase()), - ), + parseRelAttr(p.value).some((v) => + noInlineLinkRels.has(v), + ), ) const shouldInline = isNoInlineLink ? false : undefined assetUrlsPromises.push( @@ -560,7 +563,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { overwriteAttrValue( s, getAttrSourceCodeLocation(node, attrKey), - processedUrl, + partialEncodeURI(processedUrl), ) } })(), @@ -633,9 +636,13 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { // emit asset for (const { start, end, url } of scriptUrls) { if (checkPublicFile(url, config)) { - s.update(start, end, toOutputPublicFilePath(url)) + s.update(start, end, partialEncodeURI(toOutputPublicFilePath(url))) } else if (!isExcludedUrl(url)) { - s.update(start, end, await urlToBuiltUrl(url, id, config, this)) + s.update( + start, + end, + partialEncodeURI(await urlToBuiltUrl(url, id, config, this)), + ) } } @@ -897,7 +904,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { if (chunk) { chunk.viteMetadata!.importedAssets.add(cleanUrl(file)) } - return toOutputAssetFilePath(file) + postfix + return encodeURI(toOutputAssetFilePath(file)) + postfix }) result = result.replace(publicAssetUrlRE, (_, fileHash) => { @@ -905,9 +912,11 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { getPublicAssetFilename(fileHash, config)!, ) - return urlCanParse(publicAssetPath) - ? publicAssetPath - : normalizePath(publicAssetPath) + return encodeURI( + urlCanParse(publicAssetPath) + ? publicAssetPath + : normalizePath(publicAssetPath), + ) }) if (chunk && canInlineEntry) { @@ -930,6 +939,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { } } +export function parseRelAttr(attr: string): string[] { + return attr.split(spaceRe).map((v) => v.toLowerCase()) +} + // // extract inline styles as virtual css export function findNeedTransformStyleAttribute( @@ -1079,6 +1092,24 @@ export function postImportMapHook(): IndexHtmlTransformHook { } } +export function injectCspNonceMetaTagHook( + config: ResolvedConfig, +): IndexHtmlTransformHook { + return () => { + if (!config.html?.cspNonce) return + + return [ + { + tag: 'meta', + injectTo: 'head', + // use nonce attribute so that it's hidden + // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce#accessing_nonces_and_nonce_hiding + attrs: { property: 'csp-nonce', nonce: config.html.cspNonce }, + }, + ] + } +} + /** * Support `%ENV_NAME%` syntax in html files */ @@ -1128,6 +1159,42 @@ export function htmlEnvHook(config: ResolvedConfig): IndexHtmlTransformHook { } } +export function injectNonceAttributeTagHook( + config: ResolvedConfig, +): IndexHtmlTransformHook { + const processRelType = new Set(['stylesheet', 'modulepreload', 'preload']) + + return async (html, { filename }) => { + const nonce = config.html?.cspNonce + if (!nonce) return + + const s = new MagicString(html) + + await traverseHtml(html, filename, (node) => { + if (!nodeIsElement(node)) { + return + } + + if ( + node.nodeName === 'script' || + (node.nodeName === 'link' && + node.attrs.some( + (attr) => + attr.name === 'rel' && + parseRelAttr(attr.value).some((a) => processRelType.has(a)), + )) + ) { + s.appendRight( + node.sourceCodeLocation!.startTag!.endOffset - 1, + ` nonce="${nonce}"`, + ) + } + }) + + return s.toString() + } +} + export function resolveHtmlTransforms( plugins: readonly Plugin[], logger: Logger, diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index 6b28636cc66bed..db8256ec3d9bbb 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -40,6 +40,7 @@ import { joinUrlSegments, moduleListContains, normalizePath, + partialEncodeURI, prettifyUrl, removeImportQuery, removeTimestampQuery, @@ -67,6 +68,7 @@ import { isCSSRequest, isDirectCSSRequest } from './css' import { browserExternalId } from './resolve' import { serializeDefine } from './define' import { WORKER_FILE_ID } from './worker' +import { getAliasPatternMatcher } from './preAlias' const debug = createDebugger('vite:import-analysis') @@ -171,6 +173,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const fsUtils = getFsUtils(config) const clientPublicPath = path.posix.join(base, CLIENT_PUBLIC_PATH) const enablePartialAccept = config.experimental?.hmrPartialAccept + const matchAlias = getAliasPatternMatcher(config.resolve.alias) let server: ViteDevServer let _env: string | undefined @@ -486,7 +489,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { return } // skip ssr external - if (ssr) { + if (ssr && !matchAlias(specifier)) { if (shouldExternalizeForSSR(specifier, importer, config)) { return } @@ -591,7 +594,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { rewriteDone = true } if (!rewriteDone) { - const rewrittenUrl = JSON.stringify(url) + const rewrittenUrl = JSON.stringify(partialEncodeURI(url)) const s = isDynamicImport ? start : start - 1 const e = isDynamicImport ? end : end + 1 str().overwrite(s, e, rewrittenUrl, { diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index 8779ef80f78e20..718ff6190cfeac 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -80,6 +80,13 @@ function preload( // @ts-expect-error __VITE_IS_MODERN__ will be replaced with boolean later if (__VITE_IS_MODERN__ && deps && deps.length > 0) { const links = document.getElementsByTagName('link') + const cspNonceMeta = document.querySelector( + 'meta[property=csp-nonce]', + ) + // `.nonce` should be used to get along with nonce hiding (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce#accessing_nonces_and_nonce_hiding) + // Firefox 67-74 uses modern chunks and supports CSP nonce, but does not support `.nonce` + // in that case fallback to getAttribute + const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute('nonce') promise = Promise.all( deps.map((dep) => { @@ -116,6 +123,9 @@ function preload( link.crossOrigin = '' } link.href = dep + if (cspNonce) { + link.setAttribute('nonce', cspNonce) + } document.head.appendChild(link) if (isCss) { return new Promise((res, rej) => { diff --git a/packages/vite/src/node/plugins/manifest.ts b/packages/vite/src/node/plugins/manifest.ts index a82897ca6adb36..84602e78268866 100644 --- a/packages/vite/src/node/plugins/manifest.ts +++ b/packages/vite/src/node/plugins/manifest.ts @@ -21,6 +21,7 @@ export interface ManifestChunk { css?: string[] assets?: string[] isEntry?: boolean + name?: string isDynamicEntry?: boolean imports?: string[] dynamicImports?: string[] @@ -60,6 +61,7 @@ export function manifestPlugin(config: ResolvedConfig): Plugin { function createChunk(chunk: OutputChunk): ManifestChunk { const manifestChunk: ManifestChunk = { file: chunk.fileName, + name: chunk.name, } if (chunk.facadeModuleId) { diff --git a/packages/vite/src/node/plugins/optimizedDeps.ts b/packages/vite/src/node/plugins/optimizedDeps.ts index cdde20891b836b..6d6a8d22eb9468 100644 --- a/packages/vite/src/node/plugins/optimizedDeps.ts +++ b/packages/vite/src/node/plugins/optimizedDeps.ts @@ -10,6 +10,8 @@ import { cleanUrl } from '../../shared/utils' export const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = 'ERR_OPTIMIZE_DEPS_PROCESSING_ERROR' export const ERR_OUTDATED_OPTIMIZED_DEP = 'ERR_OUTDATED_OPTIMIZED_DEP' +export const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = + 'ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR' const debug = createDebugger('vite:optimize-deps') @@ -68,8 +70,12 @@ export function optimizedDepsPlugin(config: ResolvedConfig): Plugin { try { return await fsp.readFile(file, 'utf-8') } catch (e) { - // Outdated non-entry points (CHUNK), loaded after a rerun - throwOutdatedRequest(id) + const newMetadata = depsOptimizer.metadata + if (optimizedDepInfoFromFile(newMetadata, file)) { + // Outdated non-entry points (CHUNK), loaded after a rerun + throwOutdatedRequest(id) + } + throwFileNotFoundInOptimizedDep(id) } } }, @@ -97,3 +103,15 @@ export function throwOutdatedRequest(id: string): never { // send a 504 status code request timeout throw err } + +export function throwFileNotFoundInOptimizedDep(id: string): never { + const err: any = new Error( + `The file does not exist at "${id}" which is in the optimize deps directory. ` + + `The dependency might be incompatible with the dep optimizer. ` + + `Try adding it to \`optimizeDeps.exclude\`.`, + ) + err.code = ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR + // This error will be caught by the transform middleware that will + // send a 404 status code not found + throw err +} diff --git a/packages/vite/src/node/plugins/preAlias.ts b/packages/vite/src/node/plugins/preAlias.ts index e88173061de122..eaefdb7e6eb65d 100644 --- a/packages/vite/src/node/plugins/preAlias.ts +++ b/packages/vite/src/node/plugins/preAlias.ts @@ -128,3 +128,11 @@ function getAliasPatterns( } return Object.entries(entries).map(([find]) => find) } + +export function getAliasPatternMatcher( + entries: (AliasOptions | undefined) & Alias[], +): (importee: string) => boolean { + const patterns = getAliasPatterns(entries) + return (importee: string) => + patterns.some((pattern) => matches(pattern, importee)) +} diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index a9b68b1fe5ba30..ccffd1c152972c 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -402,6 +402,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { if (isBuiltin(id)) { if (ssr) { if ( + targetWeb && 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. @@ -735,7 +736,19 @@ export function tryNodeResolve( basedir = root } - const pkg = resolvePackageData(pkgId, basedir, preserveSymlinks, packageCache) + let selfPkg = null + if (!isBuiltin(id) && !id.includes('\0') && bareImportRE.test(id)) { + // check if it's a self reference dep. + const selfPackageData = findNearestPackageData(basedir, packageCache) + selfPkg = + selfPackageData?.data.exports && selfPackageData?.data.name === pkgId + ? selfPackageData + : null + } + + const pkg = + selfPkg || + resolvePackageData(pkgId, basedir, preserveSymlinks, packageCache) if (!pkg) { // if import can't be found, check if it's an optional peer dep. // if so, we can resolve to a special id that errors only when imported. diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index 22201fa8816cf8..0a200cdb71007d 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -411,7 +411,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { ) const replacementString = typeof replacement === 'string' - ? JSON.stringify(replacement).slice(1, -1) + ? JSON.stringify(encodeURI(replacement)).slice(1, -1) : `"+${replacement.runtime}+"` s.update(match.index, match.index + full.length, replacementString) } diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index 74a4728529b55a..4d2e1e645bbcdc 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -1,6 +1,7 @@ import fs from 'node:fs' import path from 'node:path' import sirv from 'sirv' +import compression from '@polka/compression' import connect from 'connect' import type { Connect } from 'dep-types/connect' import corsMiddleware from 'cors' @@ -19,7 +20,6 @@ import { setClientErrorHandler, } from './http' import { openBrowser } from './server/openBrowser' -import compression from './server/middlewares/compression' import { baseMiddleware } from './server/middlewares/base' import { htmlFallbackMiddleware } from './server/middlewares/htmlFallback' import { indexHtmlMiddleware } from './server/middlewares/indexHtml' diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index bc4b62d070bf98..8a508dbbd46c5c 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1,4 +1,5 @@ import path from 'node:path' +import { execSync } from 'node:child_process' import type * as net from 'node:net' import { get as httpGet } from 'node:http' import { get as httpsGet } from 'node:https' @@ -31,6 +32,7 @@ import { isParentDirectory, mergeConfig, normalizePath, + promiseWithResolvers, resolveHostname, resolveServerUrls, } from '../utils' @@ -343,6 +345,22 @@ export interface ViteDevServer { * Open browser */ openBrowser(): void + /** + * Calling `await server.waitForRequestsIdle(id)` will wait until all static imports + * are processed. If called from a load or transform plugin hook, the id needs to be + * passed as a parameter to avoid deadlocks. Calling this function after the first + * static imports section of the module graph has been processed will resolve immediately. + * @experimental + */ + waitForRequestsIdle: (ignoredId?: string) => Promise + /** + * @internal + */ + _registerRequestProcessing: (id: string, done: () => Promise) => void + /** + * @internal + */ + _onCrawlEnd(cb: () => void): void /** * @internal */ @@ -458,6 +476,20 @@ export async function _createServer( const devHtmlTransformFn = createDevHtmlTransformFn(config) + const onCrawlEndCallbacks: (() => void)[] = [] + const crawlEndFinder = setupOnCrawlEnd(() => { + onCrawlEndCallbacks.forEach((cb) => cb()) + }) + function waitForRequestsIdle(ignoredId?: string): Promise { + return crawlEndFinder.waitForRequestsIdle(ignoredId) + } + function _registerRequestProcessing(id: string, done: () => Promise) { + crawlEndFinder.registerRequestProcessing(id, done) + } + function _onCrawlEnd(cb: () => void) { + onCrawlEndCallbacks.push(cb) + } + let server: ViteDevServer = { config, middlewares, @@ -589,6 +621,7 @@ export async function _createServer( watcher.close(), hot.close(), container.close(), + crawlEndFinder?.cancel(), getDepsOptimizer(server.config)?.close(), getDepsOptimizer(server.config, true)?.close(), closeHttpServer(), @@ -637,6 +670,10 @@ export async function _createServer( return server._restartPromise }, + waitForRequestsIdle, + _registerRequestProcessing, + _onCrawlEnd, + _setInternalServer(_server: ViteDevServer) { // Rebind internal the server variable so functions reference the user // server instance after a restart @@ -989,6 +1026,26 @@ export function resolveServerOptions( allowDirs = [searchForWorkspaceRoot(root)] } + if (process.versions.pnp) { + try { + const enableGlobalCache = + execSync('yarn config get enableGlobalCache', { cwd: root }) + .toString() + .trim() === 'true' + const yarnCacheDir = execSync( + `yarn config get ${enableGlobalCache ? 'globalFolder' : 'cacheFolder'}`, + { cwd: root }, + ) + .toString() + .trim() + allowDirs.push(yarnCacheDir) + } catch (e) { + logger.warn(`Get yarn cache dir error: ${e.message}`, { + timestamp: true, + }) + } + } + allowDirs = allowDirs.map((i) => resolvedAllowDir(root, i)) // only push client dir when vite itself is outside-of-root @@ -1112,3 +1169,81 @@ export async function restartServerWithUrls( server.printUrls() } } + +const callCrawlEndIfIdleAfterMs = 50 + +interface CrawlEndFinder { + registerRequestProcessing: (id: string, done: () => Promise) => void + waitForRequestsIdle: (ignoredId?: string) => Promise + cancel: () => void +} + +function setupOnCrawlEnd(onCrawlEnd: () => void): CrawlEndFinder { + const registeredIds = new Set() + const seenIds = new Set() + const onCrawlEndPromiseWithResolvers = promiseWithResolvers() + + let timeoutHandle: NodeJS.Timeout | undefined + + let cancelled = false + function cancel() { + cancelled = true + } + + let crawlEndCalled = false + function callOnCrawlEnd() { + if (!cancelled && !crawlEndCalled) { + crawlEndCalled = true + onCrawlEnd() + } + onCrawlEndPromiseWithResolvers.resolve() + } + + function registerRequestProcessing( + id: string, + done: () => Promise, + ): void { + if (!seenIds.has(id)) { + seenIds.add(id) + registeredIds.add(id) + done() + .catch(() => {}) + .finally(() => markIdAsDone(id)) + } + } + + function waitForRequestsIdle(ignoredId?: string): Promise { + if (ignoredId) { + seenIds.add(ignoredId) + markIdAsDone(ignoredId) + } + return onCrawlEndPromiseWithResolvers.promise + } + + function markIdAsDone(id: string): void { + if (registeredIds.has(id)) { + registeredIds.delete(id) + checkIfCrawlEndAfterTimeout() + } + } + + function checkIfCrawlEndAfterTimeout() { + if (cancelled || registeredIds.size > 0) return + + if (timeoutHandle) clearTimeout(timeoutHandle) + timeoutHandle = setTimeout( + callOnCrawlEndWhenIdle, + callCrawlEndIfIdleAfterMs, + ) + } + async function callOnCrawlEndWhenIdle() { + if (cancelled || registeredIds.size > 0) return + callOnCrawlEnd() + } + + return { + registerRequestProcessing, + waitForRequestsIdle, + cancel, + } +} diff --git a/packages/vite/src/node/server/middlewares/compression.ts b/packages/vite/src/node/server/middlewares/compression.ts deleted file mode 100644 index e7bc133bf3682c..00000000000000 --- a/packages/vite/src/node/server/middlewares/compression.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -//TODO: replace this code with https://github.com/lukeed/polka/pull/148 once it's released - -// This is based on https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/polkompress.js -// MIT Licensed https://github.com/preactjs/wmr/blob/main/LICENSE -import zlib from 'node:zlib' - -/* global Buffer */ - -const noop = () => {} - -const mimes = /text|javascript|\/json|xml/i -const threshold = 1024 -const level = -1 -let brotli = false -const gzip = true - -const getChunkSize = (chunk, enc) => (chunk ? Buffer.byteLength(chunk, enc) : 0) - -export default function compression() { - const brotliOpts = (typeof brotli === 'object' && brotli) || {} - const gzipOpts = (typeof gzip === 'object' && gzip) || {} - - // disable Brotli on Node<12.7 where it is unsupported: - if (!zlib.createBrotliCompress) brotli = false - - return function viteCompressionMiddleware(req, res, next = noop) { - const accept = req.headers['accept-encoding'] + '' - const encoding = ((brotli && accept.match(/\bbr\b/)) || - (gzip && accept.match(/\bgzip\b/)) || - [])[0] - - // skip if no response body or no supported encoding: - if (req.method === 'HEAD' || !encoding) return next() - - /** @type {zlib.Gzip | zlib.BrotliCompress} */ - let compress - let pendingStatus - /** @type {[string, function][]?} */ - let pendingListeners = [] - let started = false - let size = 0 - - function start() { - started = true - size = res.getHeader('Content-Length') | 0 || size - const compressible = mimes.test( - String(res.getHeader('Content-Type') || 'text/plain'), - ) - const cleartext = !res.getHeader('Content-Encoding') - const listeners = pendingListeners || [] - if (compressible && cleartext && size >= threshold) { - res.setHeader('Content-Encoding', encoding) - res.removeHeader('Content-Length') - if (encoding === 'br') { - const params = { - [zlib.constants.BROTLI_PARAM_QUALITY]: level, - [zlib.constants.BROTLI_PARAM_SIZE_HINT]: size, - } - compress = zlib.createBrotliCompress({ - params: Object.assign(params, brotliOpts), - }) - } else { - compress = zlib.createGzip(Object.assign({ level }, gzipOpts)) - } - // backpressure - compress.on( - 'data', - (chunk) => write.call(res, chunk) === false && compress.pause(), - ) - on.call(res, 'drain', () => compress.resume()) - compress.on('end', () => end.call(res)) - listeners.forEach((p) => compress.on.apply(compress, p)) - } else { - pendingListeners = null - listeners.forEach((p) => on.apply(res, p)) - } - - writeHead.call(res, pendingStatus || res.statusCode) - } - - const { end, write, on, writeHead } = res - - res.writeHead = function (status, reason, headers) { - if (typeof reason !== 'string') [headers, reason] = [reason, headers] - if (headers) for (let i in headers) res.setHeader(i, headers[i]) - pendingStatus = status - return this - } - - res.write = function (chunk, enc, cb) { - size += getChunkSize(chunk, enc) - if (!started) start() - if (!compress) return write.apply(this, arguments) - return compress.write.apply(compress, arguments) - } - - res.end = function (chunk, enc, cb) { - if (arguments.length > 0 && typeof chunk !== 'function') { - size += getChunkSize(chunk, enc) - } - if (!started) start() - if (!compress) return end.apply(this, arguments) - return compress.end.apply(compress, arguments) - } - - res.on = function (type, listener) { - if (!pendingListeners || type !== 'drain') on.call(this, type, listener) - else if (compress) compress.on(type, listener) - else pendingListeners.push([type, listener]) - return this - } - - next() - } -} diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index d9232b9d629e72..5d06f1292b87fa 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -15,6 +15,8 @@ import { getScriptInfo, htmlEnvHook, htmlProxyResult, + injectCspNonceMetaTagHook, + injectNonceAttributeTagHook, nodeIsElement, overwriteAttrValue, postImportMapHook, @@ -69,11 +71,13 @@ export function createDevHtmlTransformFn( ) const transformHooks = [ preImportMapHook(config), + injectCspNonceMetaTagHook(config), ...preHooks, htmlEnvHook(config), devHtmlHook, ...normalHooks, ...postHooks, + injectNonceAttributeTagHook(config), postImportMapHook(), ] return ( diff --git a/packages/vite/src/node/server/middlewares/transform.ts b/packages/vite/src/node/server/middlewares/transform.ts index a0239aab7fcb4e..12a440d4c10774 100644 --- a/packages/vite/src/node/server/middlewares/transform.ts +++ b/packages/vite/src/node/server/middlewares/transform.ts @@ -27,6 +27,7 @@ import { isDirectRequest, } from '../../plugins/css' import { + ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ERR_OUTDATED_OPTIMIZED_DEP, } from '../../plugins/optimizedDeps' @@ -253,6 +254,15 @@ export function transformMiddleware( // error but a normal part of the missing deps discovery flow return } + if (e?.code === ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR) { + // Skip if response has already been sent + if (!res.writableEnded) { + res.statusCode = 404 + res.end() + } + server.config.logger.warn(colors.yellow(e.message)) + return + } if (e?.code === ERR_LOAD_URL) { // Let other middleware handle if we can't load the url via transformRequest return next() diff --git a/packages/vite/src/node/server/sourcemap.ts b/packages/vite/src/node/server/sourcemap.ts index eafde8c25b67d1..a0ed31968b6c41 100644 --- a/packages/vite/src/node/server/sourcemap.ts +++ b/packages/vite/src/node/server/sourcemap.ts @@ -1,8 +1,9 @@ import path from 'node:path' import fsp from 'node:fs/promises' +import convertSourceMap from 'convert-source-map' import type { ExistingRawSourceMap, SourceMap } from 'rollup' import type { Logger } from '../logger' -import { createDebugger } from '../utils' +import { blankReplacer, createDebugger } from '../utils' const debug = createDebugger('vite:sourcemap', { onlyWhenFocused: true, @@ -143,3 +144,32 @@ export function applySourcemapIgnoreList( if (!map.x_google_ignoreList) map.x_google_ignoreList = x_google_ignoreList } } + +export async function extractSourcemapFromFile( + code: string, + filePath: string, +): Promise<{ code: string; map: SourceMap } | undefined> { + const map = ( + convertSourceMap.fromSource(code) || + (await convertSourceMap.fromMapFileSource( + code, + createConvertSourceMapReadMap(filePath), + )) + )?.toObject() + + if (map) { + return { + code: code.replace(convertSourceMap.mapFileCommentRegex, blankReplacer), + map, + } + } +} + +function createConvertSourceMapReadMap(originalFileName: string) { + return (filename: string) => { + return fsp.readFile( + path.resolve(path.dirname(originalFileName), filename), + 'utf-8', + ) + } +} diff --git a/packages/vite/src/node/server/transformRequest.ts b/packages/vite/src/node/server/transformRequest.ts index 2813128af5b1dd..5dc6e3921215af 100644 --- a/packages/vite/src/node/server/transformRequest.ts +++ b/packages/vite/src/node/server/transformRequest.ts @@ -2,14 +2,12 @@ import fsp from 'node:fs/promises' import path from 'node:path' import { performance } from 'node:perf_hooks' import getEtag from 'etag' -import convertSourceMap from 'convert-source-map' import MagicString from 'magic-string' import { init, parse as parseImports } from 'es-module-lexer' import type { PartialResolvedId, SourceDescription, SourceMap } from 'rollup' import colors from 'picocolors' import type { ModuleNode, ViteDevServer } from '..' import { - blankReplacer, createDebugger, ensureWatchedFile, injectQuery, @@ -24,7 +22,11 @@ import { checkPublicFile } from '../publicDir' import { isDepsOptimizerEnabled } from '../config' import { getDepsOptimizer, initDevSsrDepsOptimizer } from '../optimizer' import { cleanUrl, unwrapId } from '../../shared/utils' -import { applySourcemapIgnoreList, injectSourcesContent } from './sourcemap' +import { + applySourcemapIgnoreList, + extractSourcemapFromFile, + injectSourcesContent, +} from './sourcemap' import { isFileServingAllowed } from './middlewares/static' import { throwClosedServerError } from './pluginContainer' @@ -181,7 +183,10 @@ async function doTransform( resolved, ) - getDepsOptimizer(config, ssr)?.delayDepsOptimizerUntil(id, () => result) + const depsOptimizer = getDepsOptimizer(config, ssr) + if (!depsOptimizer?.isOptimizedDepFile(id)) { + server._registerRequestProcessing(id, () => result) + } return result } @@ -260,21 +265,19 @@ async function loadAndTransform( throw e } } - ensureWatchedFile(server.watcher, file, config.root) + if (code != null) { + ensureWatchedFile(server.watcher, file, config.root) + } } if (code) { try { - map = ( - convertSourceMap.fromSource(code) || - (await convertSourceMap.fromMapFileSource( - code, - createConvertSourceMapReadMap(file), - )) - )?.toObject() - - code = code.replace(convertSourceMap.mapFileCommentRegex, blankReplacer) + const extracted = await extractSourcemapFromFile(code, file) + if (extracted) { + code = extracted.code + map = extracted.map + } } catch (e) { - logger.warn(`Failed to load source map for ${url}.`, { + logger.warn(`Failed to load source map for ${file}.\n${e}`, { timestamp: true, }) } @@ -403,15 +406,6 @@ async function loadAndTransform( return result } -function createConvertSourceMapReadMap(originalFileName: string) { - return (filename: string) => { - return fsp.readFile( - path.resolve(path.dirname(originalFileName), filename), - 'utf-8', - ) - } -} - /** * When a module is soft-invalidated, we can preserve its previous `transformResult` and * return similar code to before: diff --git a/packages/vite/src/node/ssr/__tests__/fixtures/modules/import-meta.js b/packages/vite/src/node/ssr/__tests__/fixtures/modules/import-meta.js new file mode 100644 index 00000000000000..cdaa5035d7ef4e --- /dev/null +++ b/packages/vite/src/node/ssr/__tests__/fixtures/modules/import-meta.js @@ -0,0 +1,2 @@ +export const dirname = import.meta.dirname +export const filename = import.meta.filename diff --git a/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts index 192b0b8cd3326f..b3f3c2364ef04b 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrLoadModule.spec.ts @@ -52,3 +52,13 @@ test('error has same instance', async () => { expect(e[s]).toBe(true) } }) + +test('import.meta.filename/dirname returns same value with Node', async () => { + const server = await createDevServer() + const moduleRelativePath = '/fixtures/modules/import-meta.js' + const filename = path.resolve(root, '.' + moduleRelativePath) + + const viteValue = await server.ssrLoadModule(moduleRelativePath) + expect(viteValue.dirname).toBe(path.dirname(filename)) + expect(viteValue.filename).toBe(filename) +}) diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts index 4935c13c9d6b2f..5c99e5cab3ecdb 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -104,9 +104,9 @@ test('export * from', async () => { ).toMatchInlineSnapshot(` "const __vite_ssr_import_0__ = await __vite_ssr_import__("vue"); __vite_ssr_exportAll__(__vite_ssr_import_0__); + const __vite_ssr_import_1__ = await __vite_ssr_import__("react"); __vite_ssr_exportAll__(__vite_ssr_import_1__); - " `) }) @@ -964,14 +964,14 @@ console.log(foo + 2) `), ).toMatchInlineSnapshot(` "const __vite_ssr_import_0__ = await __vite_ssr_import__("./foo", {"importedNames":["foo"]}); - const __vite_ssr_import_1__ = await __vite_ssr_import__("./a"); - __vite_ssr_exportAll__(__vite_ssr_import_1__); - const __vite_ssr_import_2__ = await __vite_ssr_import__("./b"); - __vite_ssr_exportAll__(__vite_ssr_import_2__); console.log(__vite_ssr_import_0__.foo + 1) + const __vite_ssr_import_1__ = await __vite_ssr_import__("./a"); + __vite_ssr_exportAll__(__vite_ssr_import_1__); + const __vite_ssr_import_2__ = await __vite_ssr_import__("./b"); + __vite_ssr_exportAll__(__vite_ssr_import_2__); console.log(__vite_ssr_import_0__.foo + 2) " diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index 49428987956904..186922ff84c40b 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -10,6 +10,7 @@ import { genSourceMapUrl } from '../server/sourcemap' import { AsyncFunction, asyncFunctionDeclarationPaddingLineCount, + isWindows, unwrapId, } from '../../shared/utils' import { @@ -112,7 +113,12 @@ async function instantiateModule( // referenced before it's been instantiated. mod.ssrModule = ssrModule + // replace '/' with '\\' on Windows to match Node.js + const osNormalizedFilename = isWindows ? path.resolve(mod.file!) : mod.file! + const ssrImportMeta = { + dirname: path.dirname(osNormalizedFilename), + filename: osNormalizedFilename, // The filesystem URL, matching native Node.js modules url: pathToFileURL(mod.file!).toString(), } diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index 0c22577c888155..c3800a48a8d138 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -94,7 +94,11 @@ async function ssrTransformScript( // hoist at the start of the file, after the hashbang const hoistIndex = code.match(hashbangRE)?.[0].length ?? 0 - function defineImport(source: string, metadata?: DefineImportMetadata) { + function defineImport( + index: number, + source: string, + metadata?: DefineImportMetadata, + ) { deps.add(source) const importId = `__vite_ssr_import_${uid++}__` @@ -110,7 +114,7 @@ async function ssrTransformScript( // There will be an error if the module is called before it is imported, // so the module import statement is hoisted to the top s.appendLeft( - hoistIndex, + index, `const ${importId} = await ${ssrImportKey}(${JSON.stringify( source, )}${metadataStr});\n`, @@ -132,7 +136,7 @@ async function ssrTransformScript( // import { baz } from 'foo' --> baz -> __import_foo__.baz // import * as ok from 'foo' --> ok -> __import_foo__ if (node.type === 'ImportDeclaration') { - const importId = defineImport(node.source.value as string, { + const importId = defineImport(hoistIndex, node.source.value as string, { importedNames: node.specifiers .map((s) => { if (s.type === 'ImportSpecifier') return s.imported.name @@ -182,13 +186,16 @@ async function ssrTransformScript( s.remove(node.start, node.end) if (node.source) { // export { foo, bar } from './foo' - const importId = defineImport(node.source.value as string, { - importedNames: node.specifiers.map((s) => s.local.name), - }) - // hoist re-exports near the defined import so they are immediately exported + const importId = defineImport( + node.start, + node.source.value as string, + { + importedNames: node.specifiers.map((s) => s.local.name), + }, + ) for (const spec of node.specifiers) { defineExport( - hoistIndex, + node.start, spec.exported.name, `${importId}.${spec.local.name}`, ) @@ -234,12 +241,11 @@ async function ssrTransformScript( // export * from './foo' if (node.type === 'ExportAllDeclaration') { s.remove(node.start, node.end) - const importId = defineImport(node.source.value as string) - // hoist re-exports near the defined import so they are immediately exported + const importId = defineImport(node.start, node.source.value as string) if (node.exported) { - defineExport(hoistIndex, node.exported.name, `${importId}`) + defineExport(node.start, node.exported.name, `${importId}`) } else { - s.appendLeft(hoistIndex, `${ssrExportAllKey}(${importId});\n`) + s.appendLeft(node.start, `${ssrExportAllKey}(${importId});\n`) } } } diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 7a682a6cfb3373..da754f215dac61 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -731,6 +731,8 @@ function joinSrcset(ret: ImageCandidate[]) { .join(', ') } +// NOTE: The returned `url` should perhaps be decoded so all handled URLs within Vite are consistently decoded. +// However, this may also require a refactor for `cssReplacer` to accept decoded URLs instead. function splitSrcSetDescriptor(srcs: string): ImageCandidate[] { return splitSrcSet(srcs) .map((s) => { @@ -770,10 +772,17 @@ export function processSrcSetSync( } const cleanSrcSetRE = - /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'|data:\w+\/[\w.+\-]+;base64,[\w+/=]+/g + /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'|data:\w+\/[\w.+\-]+;base64,[\w+/=]+|\?\S+,/g function splitSrcSet(srcs: string) { const parts: string[] = [] - // There could be a ',' inside of url(data:...), linear-gradient(...), "data:..." or data:... + /** + * There could be a ',' inside of: + * - url(data:...) + * - linear-gradient(...) + * - "data:..." + * - data:... + * - query parameter ?... + */ const cleanedSrcs = srcs.replace(cleanSrcSetRE, blankReplacer) let startIndex = 0 let splitIndex: number @@ -1407,3 +1416,11 @@ export function displayTime(time: number): string { // display: {X}m {Y}s return `${mins}m${seconds < 1 ? '' : ` ${seconds.toFixed(0)}s`}` } + +/** + * Like `encodeURI`, but only replacing `%` as `%25`. This is useful for environments + * that can handle un-encoded URIs, where `%` is the only ambiguous character. + */ +export function partialEncodeURI(uri: string): string { + return uri.replaceAll('%', '%25') +} diff --git a/packages/vite/src/runtime/hmrHandler.ts b/packages/vite/src/runtime/hmrHandler.ts index 0b8363eac52dea..b0b9fdd5fd6f32 100644 --- a/packages/vite/src/runtime/hmrHandler.ts +++ b/packages/vite/src/runtime/hmrHandler.ts @@ -67,7 +67,7 @@ export async function handleHMRPayload( } case 'prune': await hmrClient.notifyListeners('vite:beforePrune', payload) - hmrClient.prunePaths(payload.paths) + await hmrClient.prunePaths(payload.paths) break case 'error': { await hmrClient.notifyListeners('vite:error', payload) diff --git a/packages/vite/src/shared/hmr.ts b/packages/vite/src/shared/hmr.ts index 05f2f742c4f247..0f2cb23b4ad71f 100644 --- a/packages/vite/src/shared/hmr.ts +++ b/packages/vite/src/shared/hmr.ts @@ -232,8 +232,13 @@ export class HMRClient { // 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) - // TODO Trigger their dispose callbacks. - public prunePaths(paths: string[]): void { + public async prunePaths(paths: string[]): Promise { + await Promise.all( + paths.map((path) => { + const disposer = this.disposeMap.get(path) + if (disposer) return disposer(this.dataMap.get(path)) + }), + ) paths.forEach((path) => { const fn = this.pruneMap.get(path) if (fn) { diff --git a/packages/vite/types/customEvent.d.ts b/packages/vite/types/customEvent.d.ts index a72c1b85fc1ad0..b816a4c6c22907 100644 --- a/packages/vite/types/customEvent.d.ts +++ b/packages/vite/types/customEvent.d.ts @@ -31,5 +31,8 @@ export interface InvalidatePayload { message: string | undefined } +/** + * provides types for built-in Vite events + */ export type InferCustomEventPayload = T extends keyof CustomEventMap ? CustomEventMap[T] : any diff --git a/playground/assets/__tests__/assets.spec.ts b/playground/assets/__tests__/assets.spec.ts index 5933db4d76c08d..6fb337a9484bb6 100644 --- a/playground/assets/__tests__/assets.spec.ts +++ b/playground/assets/__tests__/assets.spec.ts @@ -369,11 +369,11 @@ test('?url import on css', async () => { describe('unicode url', () => { test('from js import', async () => { - const src = readFile('テスト-測試-white space.js') + const src = readFile('テスト-測試-white space%.js') expect(await page.textContent('.unicode-url')).toMatch( isBuild ? `data:text/javascript;base64,${Buffer.from(src).toString('base64')}` - : `/foo/bar/テスト-測試-white space.js`, + : encodeURI(`/foo/bar/テスト-測試-white space%.js`), ) }) }) diff --git a/playground/assets/index.html b/playground/assets/index.html index 7230c09c1d09ee..80fbf14be8bc59 100644 --- a/playground/assets/index.html +++ b/playground/assets/index.html @@ -135,7 +135,7 @@

CSS url references

Unicode URL

- +

Filename including single quote

@@ -147,7 +147,7 @@

encodeURI for the address

@@ -442,7 +442,7 @@

assets in noscript

import fooUrl from './foo.js?url' text('.url', fooUrl) - import unicodeUrl from './テスト-測試-white space.js?url' + import unicodeUrl from './テスト-測試-white space%.js?url' text('.unicode-url', unicodeUrl) import filenameIncludingSingleQuoteUrl from "./nested/with-single'quote.png" diff --git "a/playground/assets/nested/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space.png" "b/playground/assets/nested/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space%.png" similarity index 100% rename from "playground/assets/nested/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space.png" rename to "playground/assets/nested/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space%.png" diff --git "a/playground/assets/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space.js" "b/playground/assets/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space%.js" similarity index 100% rename from "playground/assets/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space.js" rename to "playground/assets/\343\203\206\343\202\271\343\203\210-\346\270\254\350\251\246-white space%.js" diff --git a/playground/backend-integration/__tests__/backend-integration.spec.ts b/playground/backend-integration/__tests__/backend-integration.spec.ts index 563e03b5f4e7c9..669239af237846 100644 --- a/playground/backend-integration/__tests__/backend-integration.spec.ts +++ b/playground/backend-integration/__tests__/backend-integration.spec.ts @@ -6,8 +6,10 @@ import { getColor, isBuild, isServe, + listAssets, page, readManifest, + serverLogs, untilBrowserLogAfter, untilUpdated, } from '~utils' @@ -39,6 +41,7 @@ describe.runIf(isBuild)('build', () => { const scssAssetEntry = manifest['nested/blue.scss'] const imgAssetEntry = manifest['../images/logo.png'] const dirFooAssetEntry = manifest['../../dir/foo.css'] + const iconEntrypointEntry = manifest['icon.png'] expect(htmlEntry.css.length).toEqual(1) expect(htmlEntry.assets.length).toEqual(1) expect(cssAssetEntry?.file).not.toBeUndefined() @@ -53,6 +56,7 @@ describe.runIf(isBuild)('build', () => { expect(dirFooAssetEntry).not.toBeUndefined() // '\\' should not be used even on windows // use the entry name expect(dirFooAssetEntry.file).toMatch('assets/bar-') + expect(iconEntrypointEntry?.file).not.toBeUndefined() }) test('CSS imported from JS entry should have a non-nested chunk name', () => { @@ -61,6 +65,17 @@ describe.runIf(isBuild)('build', () => { expect(mainTsEntryCss.length).toBe(1) expect(mainTsEntryCss[0].replace('assets/', '')).not.toContain('/') }) + + test('entrypoint assets should not generate empty JS file', () => { + expect(serverLogs).not.toContainEqual( + 'Generated an empty chunk: "icon.png".', + ) + + const assets = listAssets('dev') + expect(assets).not.toContainEqual( + expect.stringMatching(/icon.png-[-\w]{8}\.js$/), + ) + }) }) describe.runIf(isServe)('serve', () => { diff --git a/playground/backend-integration/frontend/entrypoints/icon.png b/playground/backend-integration/frontend/entrypoints/icon.png new file mode 100644 index 00000000000000..4388bfdca3d4d7 Binary files /dev/null and b/playground/backend-integration/frontend/entrypoints/icon.png differ diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index 8318b694028b76..7df8a58df61ff6 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -10,7 +10,7 @@ "preview": "vite preview" }, "devDependencies": { - "sass": "^1.71.1", + "sass": "^1.72.0", "tailwindcss": "^3.4.1", "fast-glob": "^3.3.2" } diff --git a/playground/config/packages/siblings/package.json b/playground/config/packages/siblings/package.json index 14c8726811acb4..049019bd1abfd7 100644 --- a/playground/config/packages/siblings/package.json +++ b/playground/config/packages/siblings/package.json @@ -2,7 +2,7 @@ "name": "@vite/test-config-sibling", "type": "module", "devDependencies": { - "@types/lodash": "^4.14.202", + "@types/lodash": "^4.17.0", "lodash": "^4.17.21" } } diff --git a/playground/csp/__tests__/csp.spec.ts b/playground/csp/__tests__/csp.spec.ts new file mode 100644 index 00000000000000..49155665a4143f --- /dev/null +++ b/playground/csp/__tests__/csp.spec.ts @@ -0,0 +1,33 @@ +import { expect, test } from 'vitest' +import { expectWithRetry, getColor, page } from '~utils' + +test('linked css', async () => { + expect(await getColor('.linked')).toBe('blue') +}) + +test('inline style tag', async () => { + expect(await getColor('.inline')).toBe('green') +}) + +test('imported css', async () => { + expect(await getColor('.from-js')).toBe('blue') +}) + +test('dynamic css', async () => { + expect(await getColor('.dynamic')).toBe('red') +}) + +test('script tag', async () => { + await expectWithRetry(() => page.textContent('.js')).toBe('js: ok') +}) + +test('dynamic js', async () => { + await expectWithRetry(() => page.textContent('.dynamic-js')).toBe( + 'dynamic-js: ok', + ) +}) + +test('meta[property=csp-nonce] is injected', async () => { + const meta = await page.$('meta[property=csp-nonce]') + expect(await (await meta.getProperty('nonce')).jsonValue()).not.toBe('') +}) diff --git a/playground/csp/dynamic.css b/playground/csp/dynamic.css new file mode 100644 index 00000000000000..ca5140e1c23d94 --- /dev/null +++ b/playground/csp/dynamic.css @@ -0,0 +1,3 @@ +.dynamic { + color: red; +} diff --git a/playground/csp/dynamic.js b/playground/csp/dynamic.js new file mode 100644 index 00000000000000..3d3e3a413e5677 --- /dev/null +++ b/playground/csp/dynamic.js @@ -0,0 +1,3 @@ +import './dynamic.css' + +document.querySelector('.dynamic-js').textContent = 'dynamic-js: ok' diff --git a/playground/csp/from-js.css b/playground/csp/from-js.css new file mode 100644 index 00000000000000..fb48429dc60ab4 --- /dev/null +++ b/playground/csp/from-js.css @@ -0,0 +1,3 @@ +.from-js { + color: blue; +} diff --git a/playground/csp/index.html b/playground/csp/index.html new file mode 100644 index 00000000000000..e782bad46e1b8c --- /dev/null +++ b/playground/csp/index.html @@ -0,0 +1,13 @@ + + + +

direct

+

inline

+

from-js

+

dynamic

+

js: error

+

dynamic-js: error

diff --git a/playground/csp/index.js b/playground/csp/index.js new file mode 100644 index 00000000000000..465359baca8297 --- /dev/null +++ b/playground/csp/index.js @@ -0,0 +1,5 @@ +import './from-js.css' + +document.querySelector('.js').textContent = 'js: ok' + +import('./dynamic.js') diff --git a/playground/csp/linked.css b/playground/csp/linked.css new file mode 100644 index 00000000000000..51636e6cfad81f --- /dev/null +++ b/playground/csp/linked.css @@ -0,0 +1,3 @@ +.linked { + color: blue; +} diff --git a/playground/csp/package.json b/playground/csp/package.json new file mode 100644 index 00000000000000..e8a834d93abd25 --- /dev/null +++ b/playground/csp/package.json @@ -0,0 +1,12 @@ +{ + "name": "@vitejs/test-csp", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "debug": "node --inspect-brk ../../packages/vite/bin/vite", + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + } +} diff --git a/playground/csp/vite.config.js b/playground/csp/vite.config.js new file mode 100644 index 00000000000000..08d2b74f9dde3c --- /dev/null +++ b/playground/csp/vite.config.js @@ -0,0 +1,67 @@ +import fs from 'node:fs/promises' +import url from 'node:url' +import path from 'node:path' +import crypto from 'node:crypto' +import { defineConfig } from 'vite' + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) + +const noncePlaceholder = '#$NONCE$#' +const createNonce = () => crypto.randomBytes(16).toString('base64') + +/** + * @param {import('node:http').ServerResponse} res + * @param {string} nonce + */ +const setNonceHeader = (res, nonce) => { + res.setHeader( + 'Content-Security-Policy', + `default-src 'nonce-${nonce}'; connect-src 'self'`, + ) +} + +/** + * @param {string} file + * @param {(input: string, originalUrl: string) => Promise} transform + * @returns {import('vite').Connect.NextHandleFunction} + */ +const createMiddleware = (file, transform) => async (req, res) => { + const nonce = createNonce() + setNonceHeader(res, nonce) + const content = await fs.readFile(path.join(__dirname, file), 'utf8') + const transformedContent = await transform(content, req.originalUrl) + res.setHeader('Content-Type', 'text/html') + res.end(transformedContent.replaceAll(noncePlaceholder, nonce)) +} + +export default defineConfig({ + plugins: [ + { + name: 'nonce-inject', + config() { + return { + appType: 'custom', + html: { + cspNonce: noncePlaceholder, + }, + } + }, + configureServer({ transformIndexHtml, middlewares }) { + return () => { + middlewares.use( + createMiddleware('./index.html', (input, originalUrl) => + transformIndexHtml(originalUrl, input), + ), + ) + } + }, + configurePreviewServer({ middlewares }) { + return () => { + middlewares.use( + createMiddleware('./dist/index.html', async (input) => input), + ) + } + }, + }, + ], +}) diff --git a/playground/css-lightningcss-proxy/package.json b/playground/css-lightningcss-proxy/package.json index 5ac9b0f4a804e2..4e335a3184b382 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.24.0", + "lightningcss": "^1.24.1", "express": "^4.18.3" } } diff --git a/playground/css-lightningcss/package.json b/playground/css-lightningcss/package.json index 1ebca75d1ab941..8a73fd408dcccc 100644 --- a/playground/css-lightningcss/package.json +++ b/playground/css-lightningcss/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "lightningcss": "^1.24.0" + "lightningcss": "^1.24.1" } } diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 5a1ed1ce1c8fb0..53f41868add3bd 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -12,7 +12,7 @@ "devDependencies": { "less": "^4.2.0", "magic-string": "^0.30.8", - "sass": "^1.71.1", + "sass": "^1.72.0", "stylus": "^0.63.0", "sugarss": "^4.0.1" } diff --git a/playground/css/__tests__/css.spec.ts b/playground/css/__tests__/css.spec.ts index 89226a8fbd5ba1..c0efb130bf00f9 100644 --- a/playground/css/__tests__/css.spec.ts +++ b/playground/css/__tests__/css.spec.ts @@ -533,3 +533,8 @@ test.runIf(isBuild)('manual chunk path', async () => { findAssetFile(/dir\/dir2\/manual-chunk-[-\w]{8}\.css$/), ).not.toBeUndefined() }) + +test.runIf(isBuild)('CSS modules should be treeshaken if not used', () => { + const css = findAssetFile(/\.css$/, undefined, undefined, true) + expect(css).not.toContain('treeshake-module-b') +}) diff --git a/playground/css/index.html b/playground/css/index.html index 508744160526de..a0e92b205e79f6 100644 --- a/playground/css/index.html +++ b/playground/css/index.html @@ -105,6 +105,8 @@

CSS

Imported SASS module:


 
+  

CSS modules should treeshake in build

+

Imported compose/from CSS/SASS module:

CSS modules composes path resolving: this should be turquoise diff --git a/playground/css/main.js b/playground/css/main.js index 8b3eb488fe813b..05a9c426f3419c 100644 --- a/playground/css/main.js +++ b/playground/css/main.js @@ -20,6 +20,11 @@ import sassMod from './mod.module.scss' document.querySelector('.modules-sass').classList.add(sassMod['apply-color']) text('.modules-sass-code', JSON.stringify(sassMod, null, 2)) +import { a as treeshakeMod } from './treeshake-module/index.js' +document + .querySelector('.modules-treeshake') + .classList.add(treeshakeMod()['treeshake-module-a']) + import composesPathResolvingMod from './composes-path-resolving.module.css' document .querySelector('.path-resolved-modules-css') diff --git a/playground/css/package.json b/playground/css/package.json index 7c34140d9e9b53..02b8bb4baf2486 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -24,7 +24,7 @@ "fast-glob": "^3.3.2", "less": "^4.2.0", "postcss-nested": "^6.0.1", - "sass": "^1.71.1", + "sass": "^1.72.0", "stylus": "^0.63.0", "sugarss": "^4.0.1" }, diff --git a/playground/css/treeshake-module/a.js b/playground/css/treeshake-module/a.js new file mode 100644 index 00000000000000..7272fa1dc1d9c1 --- /dev/null +++ b/playground/css/treeshake-module/a.js @@ -0,0 +1,5 @@ +import style from './a.module.css' + +export function a() { + return style +} diff --git a/playground/css/treeshake-module/a.module.css b/playground/css/treeshake-module/a.module.css new file mode 100644 index 00000000000000..72ab1a9fdb001a --- /dev/null +++ b/playground/css/treeshake-module/a.module.css @@ -0,0 +1,3 @@ +.treeshake-module-a { + color: red; +} diff --git a/playground/css/treeshake-module/b.js b/playground/css/treeshake-module/b.js new file mode 100644 index 00000000000000..b3db996f7f64cd --- /dev/null +++ b/playground/css/treeshake-module/b.js @@ -0,0 +1,5 @@ +import style from './b.module.css' + +export function b() { + return style +} diff --git a/playground/css/treeshake-module/b.module.css b/playground/css/treeshake-module/b.module.css new file mode 100644 index 00000000000000..5ad402ef7353e8 --- /dev/null +++ b/playground/css/treeshake-module/b.module.css @@ -0,0 +1,3 @@ +.treeshake-module-b { + color: red; +} diff --git a/playground/css/treeshake-module/index.js b/playground/css/treeshake-module/index.js new file mode 100644 index 00000000000000..67332c5a21eb3d --- /dev/null +++ b/playground/css/treeshake-module/index.js @@ -0,0 +1,2 @@ +export { a } from './a.js' +export { b } from './b.js' diff --git a/playground/hmr-ssr/__tests__/hmr.spec.ts b/playground/hmr-ssr/__tests__/hmr-ssr.spec.ts similarity index 95% rename from playground/hmr-ssr/__tests__/hmr.spec.ts rename to playground/hmr-ssr/__tests__/hmr-ssr.spec.ts index 0998ee8ddb406f..f28b620f565131 100644 --- a/playground/hmr-ssr/__tests__/hmr.spec.ts +++ b/playground/hmr-ssr/__tests__/hmr-ssr.spec.ts @@ -7,7 +7,14 @@ import type { InlineConfig, Logger, ViteDevServer } from 'vite' import { createServer, createViteRuntime } from 'vite' import type { ViteRuntime } from 'vite/runtime' import type { RollupError } from 'rollup' -import { page, promiseWithResolvers, slash, untilUpdated } from '~utils' +import { + addFile, + page, + promiseWithResolvers, + readFile, + slash, + untilUpdated, +} from '~utils' let server: ViteDevServer const clientLogs: string[] = [] @@ -737,31 +744,19 @@ test.todo('should hmr when file is deleted and restored', async () => { ) await untilUpdated(() => hmr('.file-delete-restore'), 'parent:child1') + // delete the file editFile(parentFile, (code) => code.replace( "export { value as childValue } from './child'", "export const childValue = 'not-child'", ), ) + const originalChildFileCode = readFile(childFile) removeFile(childFile) await untilUpdated(() => hmr('.file-delete-restore'), 'parent:not-child') - createFile( - childFile, - ` -import { rerender } from './runtime' - -export const value = 'child' - -if (import.meta.hot) { - import.meta.hot.accept((newMod) => { - if (!newMod) return - - rerender({ child: newMod.value }) - }) -} -`, - ) + // restore the file + createFile(childFile, originalChildFileCode) editFile(parentFile, (code) => code.replace( "export const childValue = 'not-child'", @@ -822,6 +817,45 @@ test.todo('delete file should not break hmr', async () => { ) }) +test.todo( + 'deleted file should trigger dispose and prune callbacks', + async () => { + await setupViteRuntime('/hmr.ts') + + const parentFile = 'file-delete-restore/parent.js' + const childFile = 'file-delete-restore/child.js' + + // delete the file + editFile(parentFile, (code) => + code.replace( + "export { value as childValue } from './child'", + "export const childValue = 'not-child'", + ), + ) + const originalChildFileCode = readFile(childFile) + removeFile(childFile) + await untilUpdated( + () => page.textContent('.file-delete-restore'), + 'parent:not-child', + ) + expect(clientLogs).to.include('file-delete-restore/child.js is disposed') + expect(clientLogs).to.include('file-delete-restore/child.js is pruned') + + // restore the file + addFile(childFile, originalChildFileCode) + editFile(parentFile, (code) => + code.replace( + "export const childValue = 'not-child'", + "export { value as childValue } from './child'", + ), + ) + await untilUpdated( + () => page.textContent('.file-delete-restore'), + 'parent:child', + ) + }, +) + test('import.meta.hot?.accept', async () => { await setupViteRuntime('/hmr.ts') await untilConsoleLogAfter( diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts index 0d95557aa65fb3..5f82716df9203d 100644 --- a/playground/hmr/__tests__/hmr.spec.ts +++ b/playground/hmr/__tests__/hmr.spec.ts @@ -8,6 +8,7 @@ import { getColor, isBuild, page, + readFile, removeFile, serverLogs, untilBrowserLogAfter, @@ -784,34 +785,21 @@ if (!isBuild) { 'parent:child1', ) + // delete the file editFile(parentFile, (code) => code.replace( "export { value as childValue } from './child'", "export const childValue = 'not-child'", ), ) + const originalChildFileCode = readFile(childFile) removeFile(childFile) await untilUpdated( () => page.textContent('.file-delete-restore'), 'parent:not-child', ) - addFile( - childFile, - ` -import { rerender } from './runtime' - -export const value = 'child' - -if (import.meta.hot) { - import.meta.hot.accept((newMod) => { - if (!newMod) return - - rerender({ child: newMod.value }) - }) -} -`, - ) + addFile(childFile, originalChildFileCode) editFile(parentFile, (code) => code.replace( "export const childValue = 'not-child'", @@ -875,6 +863,42 @@ if (import.meta.hot) { ) }) + test('deleted file should trigger dispose and prune callbacks', async () => { + await page.goto(viteTestUrl) + + const parentFile = 'file-delete-restore/parent.js' + const childFile = 'file-delete-restore/child.js' + + // delete the file + editFile(parentFile, (code) => + code.replace( + "export { value as childValue } from './child'", + "export const childValue = 'not-child'", + ), + ) + const originalChildFileCode = readFile(childFile) + removeFile(childFile) + await untilUpdated( + () => page.textContent('.file-delete-restore'), + 'parent:not-child', + ) + expect(browserLogs).to.include('file-delete-restore/child.js is disposed') + expect(browserLogs).to.include('file-delete-restore/child.js is pruned') + + // restore the file + addFile(childFile, originalChildFileCode) + editFile(parentFile, (code) => + code.replace( + "export const childValue = 'not-child'", + "export { value as childValue } from './child'", + ), + ) + await untilUpdated( + () => page.textContent('.file-delete-restore'), + 'parent:child', + ) + }) + test('import.meta.hot?.accept', async () => { const el = await page.$('.optional-chaining') await untilBrowserLogAfter( diff --git a/playground/hmr/file-delete-restore/child.js b/playground/hmr/file-delete-restore/child.js index 704c7d8c7e98cc..7031ef7db067c3 100644 --- a/playground/hmr/file-delete-restore/child.js +++ b/playground/hmr/file-delete-restore/child.js @@ -8,4 +8,12 @@ if (import.meta.hot) { rerender({ child: newMod.value }) }) + + import.meta.hot.dispose(() => { + console.log('file-delete-restore/child.js is disposed') + }) + + import.meta.hot.prune(() => { + console.log('file-delete-restore/child.js is pruned') + }) } diff --git a/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts b/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts index cf8b0555e2f2f4..fd5d91a26af1b1 100644 --- a/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts +++ b/playground/js-sourcemap/__tests__/js-sourcemap.spec.ts @@ -134,11 +134,11 @@ describe.runIf(isBuild)('build tests', () => { }) test('sourcemap is correct when preload information is injected', async () => { - const map = findAssetFile(/after-preload-dynamic.*\.js\.map/) + const map = findAssetFile(/after-preload-dynamic-[-\w]{8}\.js\.map/) expect(formatSourcemapForSnapshot(JSON.parse(map))).toMatchInlineSnapshot(` { "ignoreList": [], - "mappings": ";;;;;;i3BAAA,OAAO,2BAAuB,EAAC,wBAE/B,QAAQ,IAAI,uBAAuB", + "mappings": ";;;;;;w+BAAA,OAAO,2BAAuB,EAAC,wBAE/B,QAAQ,IAAI,uBAAuB", "sources": [ "../../after-preload-dynamic.js", ], diff --git a/playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts b/playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts index 7fd7f9391316fa..8dfffc5aa4f83a 100644 --- a/playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts +++ b/playground/legacy/__tests__/watch/legacy-styles-only-entry-watch.spec.ts @@ -10,10 +10,10 @@ import { test.runIf(isBuild)('rebuilds styles only entry on change', async () => { expect(findAssetFile(/style-only-entry-.+\.css/, 'watch')).toContain( - 'hotpink', + '#ff69b4', ) expect(findAssetFile(/style-only-entry-legacy-.+\.js/, 'watch')).toContain( - 'hotpink', + '#ff69b4', ) expect(findAssetFile(/polyfills-legacy-.+\.js/, 'watch')).toBeTruthy() const numberOfManifestEntries = Object.keys(readManifest('watch')).length @@ -21,7 +21,7 @@ test.runIf(isBuild)('rebuilds styles only entry on change', async () => { editFile( 'style-only-entry.css', - (originalContents) => originalContents.replace('hotpink', 'lightpink'), + (originalContents) => originalContents.replace('#ff69b4', '#ffb6c1'), true, ) await notifyRebuildComplete(watcher) @@ -35,13 +35,13 @@ test.runIf(isBuild)('rebuilds styles only entry on change', async () => { updatedManifest['style-only-entry.css']!.file.substring('assets/'.length), 'watch', ) - expect(reRenderedCssFile).toContain('lightpink') + expect(reRenderedCssFile).toContain('#ffb6c1') const reRenderedCssLegacyFile = findAssetFile( updatedManifest['style-only-entry-legacy.css']!.file.substring( 'assets/'.length, ), 'watch', ) - expect(reRenderedCssLegacyFile).toContain('lightpink') + expect(reRenderedCssLegacyFile).toContain('#ffb6c1') expect(findAssetFile(/polyfills-legacy-.+\.js/, 'watch')).toBeTruthy() }) diff --git a/playground/legacy/package.json b/playground/legacy/package.json index f98575286fde4d..f39cc6fba1e0eb 100644 --- a/playground/legacy/package.json +++ b/playground/legacy/package.json @@ -17,6 +17,6 @@ "devDependencies": { "@vitejs/plugin-legacy": "workspace:*", "express": "^4.18.3", - "terser": "^5.29.1" + "terser": "^5.29.2" } } diff --git a/playground/legacy/style-only-entry.css b/playground/legacy/style-only-entry.css index d88f88426437a3..2212f7a84ad32f 100644 --- a/playground/legacy/style-only-entry.css +++ b/playground/legacy/style-only-entry.css @@ -1,3 +1,3 @@ :root { - background: hotpink; + background: #ff69b4; } diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json index bbd738497c2000..61c745973af6df 100644 --- a/playground/multiple-entrypoints/package.json +++ b/playground/multiple-entrypoints/package.json @@ -10,6 +10,6 @@ "preview": "vite preview" }, "devDependencies": { - "sass": "^1.71.1" + "sass": "^1.72.0" } } diff --git a/playground/nested-deps/__tests__/nested-deps.spec.ts b/playground/nested-deps/__tests__/nested-deps.spec.ts index 04618ece544ad9..d59c571db832f1 100644 --- a/playground/nested-deps/__tests__/nested-deps.spec.ts +++ b/playground/nested-deps/__tests__/nested-deps.spec.ts @@ -14,4 +14,5 @@ test('handle nested package', async () => { // expect(await page.textContent('.nested-e')).toBe('1') expect(await page.textContent('.absolute-f')).toBe('F@2.0.0') + expect(await page.textContent('.self-referencing')).toBe('true') }) diff --git a/playground/nested-deps/index.html b/playground/nested-deps/index.html index 86dbc149fff32e..d06916f77b7860 100644 --- a/playground/nested-deps/index.html +++ b/playground/nested-deps/index.html @@ -24,6 +24,9 @@

exclude dependency of pre-bundled dependency

absolute dependency path:

+

self referencing

+

+
 
+
+
diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json
index a1cf32ebc73a22..1f64f6af5c587e 100644
--- a/playground/optimize-deps/package.json
+++ b/playground/optimize-deps/package.json
@@ -10,7 +10,7 @@
     "preview": "vite preview"
   },
   "dependencies": {
-    "axios": "^1.6.7",
+    "axios": "^1.6.8",
     "clipboard": "^2.0.11",
     "@vitejs/longfilename-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": "file:./longfilename",
     "@vitejs/test-dep-alias-using-absolute-path": "file:./dep-alias-using-absolute-path",
@@ -20,6 +20,7 @@
     "@vitejs/test-dep-cjs-with-assets": "file:./dep-cjs-with-assets",
     "@vitejs/test-dep-css-require": "file:./dep-css-require",
     "@vitejs/test-dep-esbuild-plugin-transform": "file:./dep-esbuild-plugin-transform",
+    "@vitejs/test-dep-incompatible": "file:./dep-incompatible",
     "@vitejs/test-dep-linked": "link:./dep-linked",
     "@vitejs/test-dep-linked-include": "link:./dep-linked-include",
     "@vitejs/test-dep-node-env": "file:./dep-node-env",
diff --git a/playground/preload/package.json b/playground/preload/package.json
index a2b7d3a134db79..f5c01384a0f656 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.29.1",
+    "terser": "^5.29.2",
     "@vitejs/test-dep-a": "file:./dep-a",
     "@vitejs/test-dep-including-a": "file:./dep-including-a"
   }
diff --git a/playground/self-referencing/index.js b/playground/self-referencing/index.js
new file mode 100644
index 00000000000000..677689175daccb
--- /dev/null
+++ b/playground/self-referencing/index.js
@@ -0,0 +1 @@
+export const isSelfReference = true
diff --git a/playground/self-referencing/package.json b/playground/self-referencing/package.json
new file mode 100644
index 00000000000000..d0022da4e4ab17
--- /dev/null
+++ b/playground/self-referencing/package.json
@@ -0,0 +1,8 @@
+{
+  "name": "@vitejs/self-referencing",
+  "type": "module",
+  "exports": {
+    ".": "./index.js",
+    "./test": "./test/index.js"
+  }
+}
diff --git a/playground/self-referencing/test/index.js b/playground/self-referencing/test/index.js
new file mode 100644
index 00000000000000..2192a75f466e22
--- /dev/null
+++ b/playground/self-referencing/test/index.js
@@ -0,0 +1 @@
+export { isSelfReference } from '@vitejs/self-referencing'
diff --git a/playground/ssr-alias/__tests__/ssr-alias.spec.ts b/playground/ssr-alias/__tests__/ssr-alias.spec.ts
new file mode 100644
index 00000000000000..93001865ce84e5
--- /dev/null
+++ b/playground/ssr-alias/__tests__/ssr-alias.spec.ts
@@ -0,0 +1,20 @@
+import { expect, test } from 'vitest'
+import { isServe, testDir, viteServer } from '~utils'
+
+test.runIf(isServe)('dev', async () => {
+  const mod = await viteServer.ssrLoadModule('/src/main.js')
+  expect(mod.default).toEqual({
+    dep: 'ok',
+    nonDep: 'ok',
+    builtin: 'ok',
+  })
+})
+
+test.runIf(!isServe)('build', async () => {
+  const mod = await import(`${testDir}/dist/main.js`)
+  expect(mod.default).toEqual({
+    dep: 'ok',
+    nonDep: 'ok',
+    builtin: 'ok',
+  })
+})
diff --git a/playground/ssr-alias/alias-original/index.js b/playground/ssr-alias/alias-original/index.js
new file mode 100644
index 00000000000000..cc9a88ac598de3
--- /dev/null
+++ b/playground/ssr-alias/alias-original/index.js
@@ -0,0 +1 @@
+export default 'original'
diff --git a/playground/ssr-alias/alias-original/package.json b/playground/ssr-alias/alias-original/package.json
new file mode 100644
index 00000000000000..a8a86b500b90fa
--- /dev/null
+++ b/playground/ssr-alias/alias-original/package.json
@@ -0,0 +1,9 @@
+{
+  "name": "@vitejs/test-alias-original",
+  "version": "0.0.0",
+  "private": true,
+  "type": "module",
+  "exports": {
+    ".": "./index.js"
+  }
+}
diff --git a/playground/ssr-alias/package.json b/playground/ssr-alias/package.json
new file mode 100644
index 00000000000000..f765f8ac70d60b
--- /dev/null
+++ b/playground/ssr-alias/package.json
@@ -0,0 +1,12 @@
+{
+  "name": "@vitejs/test-ssr-html",
+  "private": true,
+  "version": "0.0.0",
+  "type": "module",
+  "scripts": {
+    "build": "vite build"
+  },
+  "dependencies": {
+    "@vitejs/test-alias-original": "file:./alias-original"
+  }
+}
diff --git a/playground/ssr-alias/src/alias-process.js b/playground/ssr-alias/src/alias-process.js
new file mode 100644
index 00000000000000..9cd9e7ddeb637d
--- /dev/null
+++ b/playground/ssr-alias/src/alias-process.js
@@ -0,0 +1,3 @@
+export default {
+  env: { __TEST_ALIAS__: 'ok' },
+}
diff --git a/playground/ssr-alias/src/alias-replaced.js b/playground/ssr-alias/src/alias-replaced.js
new file mode 100644
index 00000000000000..60c71f346d9a3e
--- /dev/null
+++ b/playground/ssr-alias/src/alias-replaced.js
@@ -0,0 +1 @@
+export default 'ok'
diff --git a/playground/ssr-alias/src/main.js b/playground/ssr-alias/src/main.js
new file mode 100644
index 00000000000000..14ded7d14b17ff
--- /dev/null
+++ b/playground/ssr-alias/src/main.js
@@ -0,0 +1,9 @@
+import process from 'node:process'
+import dep from '@vitejs/test-alias-original'
+import nonDep from '@vitejs/test-alias-non-dep'
+
+export default {
+  dep,
+  nonDep,
+  builtin: process.env['__TEST_ALIAS__'],
+}
diff --git a/playground/ssr-alias/vite.config.js b/playground/ssr-alias/vite.config.js
new file mode 100644
index 00000000000000..deb71aee5714a9
--- /dev/null
+++ b/playground/ssr-alias/vite.config.js
@@ -0,0 +1,14 @@
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+  build: {
+    ssr: './src/main.js',
+  },
+  resolve: {
+    alias: {
+      '@vitejs/test-alias-original': '/src/alias-replaced.js',
+      '@vitejs/test-alias-non-dep': '/src/alias-replaced.js',
+      'node:process': '/src/alias-process.js',
+    },
+  },
+})
diff --git a/playground/ssr-webworker/package.json b/playground/ssr-webworker/package.json
index 99a4132aed73ff..1073d07516e519 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.20240304.0",
+    "miniflare": "^3.20240304.2",
     "@vitejs/test-resolve-linked": "workspace:*"
   }
 }
diff --git a/playground/ssr/__tests__/ssr.spec.ts b/playground/ssr/__tests__/ssr.spec.ts
index 812e9323aad289..6e5d227070db29 100644
--- a/playground/ssr/__tests__/ssr.spec.ts
+++ b/playground/ssr/__tests__/ssr.spec.ts
@@ -12,6 +12,14 @@ test(`circular dependencies modules doesn't throw`, async () => {
   )
 })
 
+test(`circular import doesn't throw`, async () => {
+  await page.goto(`${url}/circular-import`)
+
+  expect(await page.textContent('.circ-import')).toMatchInlineSnapshot(
+    '"A is: __A__"',
+  )
+})
+
 test(`deadlock doesn't happen`, async () => {
   await page.goto(`${url}/forked-deadlock`)
 
diff --git a/playground/ssr/src/app.js b/playground/ssr/src/app.js
index 5e10dfe45937e3..b151504d973401 100644
--- a/playground/ssr/src/app.js
+++ b/playground/ssr/src/app.js
@@ -3,6 +3,7 @@ import { escapeHtml } from './utils'
 const pathRenderers = {
   '/': renderRoot,
   '/circular-dep': renderCircularDep,
+  '/circular-import': renderCircularImport,
   '/forked-deadlock': renderForkedDeadlock,
 }
 
@@ -34,6 +35,11 @@ async function renderCircularDep(rootDir) {
   return `
${escapeHtml(getValueAB())}
` } +async function renderCircularImport(rootDir) { + const { logA } = await import('./circular-import/index.js') + return `
${escapeHtml(logA())}
` +} + async function renderForkedDeadlock(rootDir) { const { commonModuleExport } = await import('./forked-deadlock/common-module') commonModuleExport() diff --git a/playground/ssr/src/circular-import/a.js b/playground/ssr/src/circular-import/a.js new file mode 100644 index 00000000000000..00c8645fd78b12 --- /dev/null +++ b/playground/ssr/src/circular-import/a.js @@ -0,0 +1,5 @@ +import { getB } from './b' + +export const A = '__A__' + +export const B = getB() diff --git a/playground/ssr/src/circular-import/b.js b/playground/ssr/src/circular-import/b.js new file mode 100644 index 00000000000000..c0e732b29e2035 --- /dev/null +++ b/playground/ssr/src/circular-import/b.js @@ -0,0 +1,5 @@ +export function getB() { + return '__B__' +} + +export { A } from './a' diff --git a/playground/ssr/src/circular-import/index.js b/playground/ssr/src/circular-import/index.js new file mode 100644 index 00000000000000..c9ec0fc50238b4 --- /dev/null +++ b/playground/ssr/src/circular-import/index.js @@ -0,0 +1,5 @@ +import { A } from './b' + +export function logA() { + return `A is: ${A}` +} diff --git a/playground/tailwind/vite.config.ts b/playground/tailwind/vite.config.ts index 5b97ed1053e382..86521cff913e97 100644 --- a/playground/tailwind/vite.config.ts +++ b/playground/tailwind/vite.config.ts @@ -1,4 +1,21 @@ import { defineConfig } from 'vite' +import type { Plugin } from 'vite' + +function delayIndexCssPlugin(): Plugin { + let server + return { + name: 'delay-index-css', + enforce: 'pre', + configureServer(_server) { + server = _server + }, + async load(id) { + if (server && id.includes('index.css')) { + await server.waitForRequestsIdle(id) + } + }, + } +} export default defineConfig({ resolve: { @@ -25,5 +42,6 @@ export default defineConfig({ } }, }, + delayIndexCssPlugin(), ], }) diff --git a/playground/test-utils.ts b/playground/test-utils.ts index b5fe29d2a24ae8..2916c350d12f5f 100644 --- a/playground/test-utils.ts +++ b/playground/test-utils.ts @@ -156,6 +156,7 @@ export function findAssetFile( match: string | RegExp, base = '', assets = 'assets', + matchAll = false, ): string { const assetsDir = path.join(testDir, 'dist', base, assets) let files: string[] @@ -167,10 +168,21 @@ export function findAssetFile( } throw e } - const file = files.find((file) => { - return file.match(match) - }) - return file ? fs.readFileSync(path.resolve(assetsDir, file), 'utf-8') : '' + if (matchAll) { + const matchedFiles = files.filter((file) => file.match(match)) + return matchedFiles.length + ? matchedFiles + .map((file) => + fs.readFileSync(path.resolve(assetsDir, file), 'utf-8'), + ) + .join('') + : '' + } else { + const matchedFile = files.find((file) => file.match(match)) + return matchedFile + ? fs.readFileSync(path.resolve(assetsDir, matchedFile), 'utf-8') + : '' + } } export function readManifest(base = ''): Manifest { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9416659507eaac..9dd16c491ca257 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: version: 7.0.2 '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2) + version: 11.1.6(rollup@4.13.0)(tslib@2.6.2)(typescript@5.2.2) '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -64,8 +64,8 @@ importers: specifier: ^4.0.6 version: 4.0.6 '@types/node': - specifier: ^20.11.25 - version: 20.11.25 + specifier: ^20.11.28 + version: 20.11.28 '@types/picomatch': specifier: ^2.3.3 version: 2.3.3 @@ -82,11 +82,11 @@ importers: specifier: ^8.5.10 version: 8.5.10 '@typescript-eslint/eslint-plugin': - specifier: ^7.1.1 - version: 7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.2.2) + specifier: ^7.2.0 + version: 7.2.0(@typescript-eslint/parser@7.2.0)(eslint@8.57.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^7.1.1 - version: 7.1.1(eslint@8.57.0)(typescript@5.2.2) + specifier: ^7.2.0 + version: 7.2.0(eslint@8.57.0)(typescript@5.2.2) '@vitejs/release-scripts': specifier: ^1.3.1 version: 1.3.1 @@ -101,7 +101,7 @@ importers: version: 2.1.0 eslint-plugin-i: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.2.0)(eslint@8.57.0) eslint-plugin-n: specifier: ^16.6.2 version: 16.6.2(eslint@8.57.0) @@ -136,14 +136,14 @@ importers: specifier: ^5.0.5 version: 5.0.5 rollup: - specifier: ^4.2.0 - version: 4.2.0 + specifier: ^4.13.0 + version: 4.13.0 semver: specifier: ^7.6.0 version: 7.6.0 simple-git-hooks: - specifier: ^2.10.0 - version: 2.10.0 + specifier: ^2.11.0 + version: 2.11.0 tslib: specifier: ^2.6.2 version: 2.6.2 @@ -159,12 +159,21 @@ importers: vite: specifier: workspace:* version: link:packages/vite + vitest: + specifier: ^1.4.0 + version: 1.4.0(@types/node@20.11.28) + + docs: + devDependencies: + '@shikijs/vitepress-twoslash': + specifier: ^1.2.0 + version: 1.2.0(typescript@5.2.2) + '@types/express': + specifier: ^4.17.21 + version: 4.17.21 vitepress: specifier: 1.0.0-rc.45 version: 1.0.0-rc.45(typescript@5.2.2) - vitest: - specifier: ^1.3.1 - version: 1.3.1(@types/node@20.11.25) vue: specifier: ^3.4.21 version: 3.4.21(typescript@5.2.2) @@ -233,14 +242,14 @@ importers: packages/vite: dependencies: esbuild: - specifier: ^0.19.3 - version: 0.19.3 + specifier: ^0.20.1 + version: 0.20.1 postcss: - specifier: ^8.4.35 - version: 8.4.35 + specifier: ^8.4.36 + version: 8.4.36 rollup: - specifier: ^4.2.0 - version: 4.2.0 + specifier: ^4.13.0 + version: 4.13.0 optionalDependencies: fsevents: specifier: ~2.3.3 @@ -255,27 +264,30 @@ importers: '@jridgewell/trace-mapping': specifier: ^0.3.25 version: 0.3.25 + '@polka/compression': + specifier: ^1.0.0-next.25 + version: 1.0.0-next.25 '@rollup/plugin-alias': specifier: ^5.1.0 - version: 5.1.0(rollup@4.2.0) + version: 5.1.0(rollup@4.13.0) '@rollup/plugin-commonjs': specifier: ^25.0.7 - version: 25.0.7(rollup@4.2.0) + version: 25.0.7(rollup@4.13.0) '@rollup/plugin-dynamic-import-vars': specifier: ^2.1.2 - version: 2.1.2(rollup@4.2.0) + version: 2.1.2(rollup@4.13.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.2.0) + version: 6.1.0(rollup@4.13.0) '@rollup/plugin-node-resolve': specifier: 15.2.3 - version: 15.2.3(rollup@4.2.0) + version: 15.2.3(rollup@4.13.0) '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2) + version: 11.1.6(rollup@4.13.0)(tslib@2.6.2)(typescript@5.2.2) '@rollup/pluginutils': specifier: ^5.1.0 - version: 5.1.0(rollup@4.2.0) + version: 5.1.0(rollup@4.13.0) '@types/escape-html': specifier: ^1.0.4 version: 1.0.4 @@ -343,8 +355,8 @@ importers: specifier: ^2.6.1 version: 2.6.1 lightningcss: - specifier: ^1.24.0 - version: 1.24.0 + specifier: ^1.24.1 + version: 1.24.1 magic-string: specifier: ^0.30.8 version: 0.30.8 @@ -377,25 +389,25 @@ importers: version: 2.3.1 postcss-import: specifier: ^16.0.1 - version: 16.0.1(patch_hash=fjrm7xa2co7loa5ldk32oip4ly)(postcss@8.4.35) + version: 16.0.1(patch_hash=fjrm7xa2co7loa5ldk32oip4ly)(postcss@8.4.36) postcss-load-config: specifier: ^4.0.2 - version: 4.0.2(postcss@8.4.35)(ts-node@10.9.2) + version: 4.0.2(postcss@8.4.36)(ts-node@10.9.2) postcss-modules: specifier: ^6.0.0 - version: 6.0.0(postcss@8.4.35) + version: 6.0.0(postcss@8.4.36) resolve.exports: specifier: ^2.0.2 version: 2.0.2 rollup-plugin-dts: specifier: ^6.1.0 - version: 6.1.0(rollup@4.2.0)(typescript@5.2.2) + version: 6.1.0(rollup@4.13.0)(typescript@5.2.2) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.19.3)(rollup@4.2.0) + version: 6.1.1(esbuild@0.20.1)(rollup@4.13.0) rollup-plugin-license: specifier: ^3.3.1 - version: 3.3.1(rollup@4.2.0) + version: 3.3.1(rollup@4.13.0) sirv: specifier: ^2.0.4 version: 2.0.4(patch_hash=amdes53ifqfntejkflpaq5ifce) @@ -418,8 +430,8 @@ importers: specifier: link:./types version: link:types ufo: - specifier: ^1.4.0 - version: 1.4.0 + specifier: ^1.5.1 + version: 1.5.1 ws: specifier: ^8.16.0 version: 8.16.0 @@ -509,8 +521,8 @@ importers: specifier: ^3.3.2 version: 3.3.2 sass: - specifier: ^1.71.1 - version: 1.71.1 + specifier: ^1.72.0 + version: 1.72.0 tailwindcss: specifier: ^3.4.1 version: 3.4.1(ts-node@10.9.2) @@ -536,12 +548,14 @@ importers: playground/config/packages/siblings: devDependencies: '@types/lodash': - specifier: ^4.14.202 - version: 4.14.202 + specifier: ^4.17.0 + version: 4.17.0 lodash: specifier: ^4.17.21 version: 4.17.21 + playground/csp: {} + playground/css: devDependencies: '@vitejs/test-css-dep': @@ -567,10 +581,10 @@ importers: version: 4.2.0 postcss-nested: specifier: ^6.0.1 - version: 6.0.1(postcss@8.4.35) + version: 6.0.1(postcss@8.4.36) sass: - specifier: ^1.71.1 - version: 1.71.1 + specifier: ^1.72.0 + version: 1.72.0 stylus: specifier: ^0.63.0 version: 0.63.0 @@ -587,8 +601,8 @@ importers: playground/css-lightningcss: devDependencies: lightningcss: - specifier: ^1.24.0 - version: 1.24.0 + specifier: ^1.24.1 + version: 1.24.1 playground/css-lightningcss-proxy: devDependencies: @@ -596,8 +610,8 @@ importers: specifier: ^4.18.3 version: 4.18.3 lightningcss: - specifier: ^1.24.0 - version: 1.24.0 + specifier: ^1.24.1 + version: 1.24.1 playground/css-sourcemap: devDependencies: @@ -608,8 +622,8 @@ importers: specifier: ^0.30.8 version: 0.30.8 sass: - specifier: ^1.71.1 - version: 1.71.1 + specifier: ^1.72.0 + version: 1.72.0 stylus: specifier: ^0.63.0 version: 0.63.0 @@ -784,8 +798,8 @@ importers: specifier: ^4.18.3 version: 4.18.3 terser: - specifier: ^5.29.1 - version: 5.29.1 + specifier: ^5.29.2 + version: 5.29.2 playground/lib: devDependencies: @@ -806,11 +820,14 @@ importers: playground/multiple-entrypoints: devDependencies: sass: - specifier: ^1.71.1 - version: 1.71.1 + specifier: ^1.72.0 + version: 1.72.0 playground/nested-deps: dependencies: + '@vitejs/self-referencing': + specifier: link:../self-referencing + version: link:../self-referencing '@vitejs/test-package-a': specifier: link:./test-package-a version: link:test-package-a @@ -898,6 +915,9 @@ importers: '@vitejs/test-dep-esbuild-plugin-transform': specifier: file:./dep-esbuild-plugin-transform version: file:playground/optimize-deps/dep-esbuild-plugin-transform + '@vitejs/test-dep-incompatible': + specifier: file:./dep-incompatible + version: file:playground/optimize-deps/dep-incompatible '@vitejs/test-dep-linked': specifier: link:./dep-linked version: link:dep-linked @@ -944,8 +964,8 @@ importers: specifier: workspace:0.0.0 version: link:../resolve-linked axios: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.6.8 + version: 1.6.8 clipboard: specifier: ^2.0.11 version: 2.0.11 @@ -1011,6 +1031,8 @@ importers: playground/optimize-deps/dep-esbuild-plugin-transform: {} + playground/optimize-deps/dep-incompatible: {} + playground/optimize-deps/dep-linked: dependencies: lodash-es: @@ -1084,8 +1106,8 @@ importers: specifier: file:./dep-including-a version: file:playground/preload/dep-including-a terser: - specifier: ^5.29.1 - version: 5.29.1 + specifier: ^5.29.2 + version: 5.29.2 playground/preload/dep-a: {} @@ -1249,12 +1271,22 @@ importers: specifier: 0.10.64 version: 0.10.64 + playground/self-referencing: {} + playground/ssr: devDependencies: express: specifier: ^4.18.3 version: 4.18.3 + playground/ssr-alias: + dependencies: + '@vitejs/test-alias-original': + specifier: file:./alias-original + version: file:playground/ssr-alias/alias-original + + playground/ssr-alias/alias-original: {} + playground/ssr-conditions: dependencies: '@vitejs/test-ssr-conditions-external': @@ -1487,8 +1519,8 @@ importers: specifier: workspace:* version: link:../resolve-linked miniflare: - specifier: ^3.20240304.0 - version: 3.20240304.0 + specifier: ^3.20240304.2 + version: 3.20240304.2 playground/ssr-webworker/browser-exports: {} @@ -1511,7 +1543,7 @@ importers: devDependencies: ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@20.11.25)(typescript@5.2.2) + version: 10.9.2(@types/node@20.11.28)(typescript@5.2.2) playground/tailwind-sourcemap: dependencies: @@ -1735,7 +1767,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 - '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -2958,6 +2990,14 @@ packages: dev: true optional: true + /@esbuild/aix-ppc64@0.20.1: + resolution: {integrity: sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + optional: true + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -2976,8 +3016,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.19.3: - resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} + /@esbuild/android-arm64@0.20.1: + resolution: {integrity: sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -3002,8 +3042,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.19.3: - resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} + /@esbuild/android-arm@0.20.1: + resolution: {integrity: sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -3028,8 +3068,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.19.3: - resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} + /@esbuild/android-x64@0.20.1: + resolution: {integrity: sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -3054,8 +3094,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.19.3: - resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} + /@esbuild/darwin-arm64@0.20.1: + resolution: {integrity: sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -3080,8 +3120,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.19.3: - resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} + /@esbuild/darwin-x64@0.20.1: + resolution: {integrity: sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -3106,8 +3146,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.19.3: - resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} + /@esbuild/freebsd-arm64@0.20.1: + resolution: {integrity: sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -3132,8 +3172,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.19.3: - resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} + /@esbuild/freebsd-x64@0.20.1: + resolution: {integrity: sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -3158,8 +3198,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.19.3: - resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} + /@esbuild/linux-arm64@0.20.1: + resolution: {integrity: sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -3184,8 +3224,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.19.3: - resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} + /@esbuild/linux-arm@0.20.1: + resolution: {integrity: sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -3210,8 +3250,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.19.3: - resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} + /@esbuild/linux-ia32@0.20.1: + resolution: {integrity: sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -3236,8 +3276,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.19.3: - resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} + /@esbuild/linux-loong64@0.20.1: + resolution: {integrity: sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -3262,8 +3302,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.19.3: - resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} + /@esbuild/linux-mips64el@0.20.1: + resolution: {integrity: sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -3288,8 +3328,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.19.3: - resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} + /@esbuild/linux-ppc64@0.20.1: + resolution: {integrity: sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -3314,8 +3354,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.19.3: - resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} + /@esbuild/linux-riscv64@0.20.1: + resolution: {integrity: sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -3340,8 +3380,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.19.3: - resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} + /@esbuild/linux-s390x@0.20.1: + resolution: {integrity: sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -3366,8 +3406,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.19.3: - resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} + /@esbuild/linux-x64@0.20.1: + resolution: {integrity: sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -3392,8 +3432,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.19.3: - resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} + /@esbuild/netbsd-x64@0.20.1: + resolution: {integrity: sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -3418,8 +3458,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.19.3: - resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} + /@esbuild/openbsd-x64@0.20.1: + resolution: {integrity: sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -3444,8 +3484,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.19.3: - resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} + /@esbuild/sunos-x64@0.20.1: + resolution: {integrity: sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3470,8 +3510,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.19.3: - resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} + /@esbuild/win32-arm64@0.20.1: + resolution: {integrity: sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3496,8 +3536,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.19.3: - resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} + /@esbuild/win32-ia32@0.20.1: + resolution: {integrity: sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3522,8 +3562,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.19.3: - resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} + /@esbuild/win32-x64@0.20.1: + resolution: {integrity: sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -3576,6 +3616,22 @@ packages: engines: {node: '>=14'} dev: true + /@floating-ui/core@1.6.0: + resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} + dependencies: + '@floating-ui/utils': 0.2.1 + dev: true + + /@floating-ui/dom@1.1.1: + resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==} + dependencies: + '@floating-ui/core': 1.6.0 + dev: true + + /@floating-ui/utils@0.2.1: + resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + dev: true + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -3620,14 +3676,6 @@ packages: '@sinclair/typebox': 0.27.8 dev: true - /@jridgewell/gen-mapping@0.3.3: - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.25 - /@jridgewell/gen-mapping@0.3.5: resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -3640,10 +3688,6 @@ packages: resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - /@jridgewell/set-array@1.2.1: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} @@ -3651,7 +3695,7 @@ packages: /@jridgewell/source-map@0.3.3: resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} dependencies: - '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 dev: true @@ -3713,11 +3757,16 @@ packages: dev: true optional: true + /@polka/compression@1.0.0-next.25: + resolution: {integrity: sha512-UlVkoSGRig87riHSn8QOxd2DzGhadRpNSj5Ukqj+Bt7WTE4Es+sE3ju3OYbe8SiV2OwA+8tDcSuHWUh5S3jCBQ==} + engines: {node: '>=6'} + dev: true + /@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): + /@rollup/plugin-alias@5.0.0(rollup@3.29.4): resolution: {integrity: sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3726,11 +3775,11 @@ packages: rollup: optional: true dependencies: - rollup: 3.29.2 + rollup: 3.29.4 slash: 4.0.0 dev: true - /@rollup/plugin-alias@5.1.0(rollup@4.2.0): + /@rollup/plugin-alias@5.1.0(rollup@4.13.0): resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3739,11 +3788,11 @@ packages: rollup: optional: true dependencies: - rollup: 4.2.0 + rollup: 4.13.0 slash: 4.0.0 dev: true - /@rollup/plugin-commonjs@25.0.4(rollup@3.29.2): + /@rollup/plugin-commonjs@25.0.4(rollup@3.29.4): resolution: {integrity: sha512-L92Vz9WUZXDnlQQl3EwbypJR4+DM2EbsO+/KOcEkP4Mc6Ct453EeDB2uH9lgRwj4w5yflgNpq9pHOiY8aoUXBQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3752,16 +3801,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.2) + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.27.0 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/plugin-commonjs@25.0.7(rollup@4.2.0): + /@rollup/plugin-commonjs@25.0.7(rollup@4.13.0): resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3770,16 +3819,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.8 - rollup: 4.2.0 + rollup: 4.13.0 dev: true - /@rollup/plugin-dynamic-import-vars@2.1.2(rollup@4.2.0): + /@rollup/plugin-dynamic-import-vars@2.1.2(rollup@4.13.0): resolution: {integrity: sha512-4lr2oXxs9hcxtGGaK8s0i9evfjzDrAs7ngw28TqruWKTEm0+U4Eljb+F6HXGYdFv8xRojQlrQwV7M/yxeh3yzQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3788,15 +3837,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) astring: 1.8.6 estree-walker: 2.0.2 fast-glob: 3.3.2 magic-string: 0.30.8 - rollup: 4.2.0 + rollup: 4.13.0 dev: true - /@rollup/plugin-json@6.0.0(rollup@3.29.2): + /@rollup/plugin-json@6.0.0(rollup@3.29.4): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3805,11 +3854,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.2) - rollup: 3.29.2 + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + rollup: 3.29.4 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.2.0): + /@rollup/plugin-json@6.1.0(rollup@4.13.0): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3818,11 +3867,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) - rollup: 4.2.0 + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) + rollup: 4.13.0 dev: true - /@rollup/plugin-node-resolve@15.2.1(rollup@3.29.2): + /@rollup/plugin-node-resolve@15.2.1(rollup@3.29.4): resolution: {integrity: sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3831,16 +3880,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.2) + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) '@types/resolve': 1.20.2 deepmerge: 4.2.2 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.4 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.2.0): + /@rollup/plugin-node-resolve@15.2.3(rollup@4.13.0): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3849,16 +3898,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) '@types/resolve': 1.20.2 deepmerge: 4.2.2 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.4 - rollup: 4.2.0 + rollup: 4.13.0 dev: true - /@rollup/plugin-replace@5.0.2(rollup@3.29.2): + /@rollup/plugin-replace@5.0.2(rollup@3.29.4): resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3867,12 +3916,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.2) + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) magic-string: 0.27.0 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.2.0)(tslib@2.6.2)(typescript@5.2.2): + /@rollup/plugin-typescript@11.1.6(rollup@4.13.0)(tslib@2.6.2)(typescript@5.2.2): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3885,14 +3934,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) resolve: 1.22.4 - rollup: 4.2.0 + rollup: 4.13.0 tslib: 2.6.2 typescript: 5.2.2 dev: true - /@rollup/pluginutils@5.0.4(rollup@3.29.2): + /@rollup/pluginutils@5.0.4(rollup@3.29.4): resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3904,10 +3953,10 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/pluginutils@5.1.0(rollup@3.29.2): + /@rollup/pluginutils@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3919,10 +3968,10 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.2.0): + /@rollup/pluginutils@5.1.0(rollup@4.13.0): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3934,88 +3983,95 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.2.0 + rollup: 4.13.0 dev: true - /@rollup/rollup-android-arm-eabi@4.2.0: - resolution: {integrity: sha512-8PlggAxGxavr+pkCNeV1TM2wTb2o+cUWDg9M1cm9nR27Dsn287uZtSLYXoQqQcmq+sYfF7lHfd3sWJJinH9GmA==} + /@rollup/rollup-android-arm-eabi@4.13.0: + resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==} cpu: [arm] os: [android] requiresBuild: true optional: true - /@rollup/rollup-android-arm64@4.2.0: - resolution: {integrity: sha512-+71T85hbMFrJI+zKQULNmSYBeIhru55PYoF/u75MyeN2FcxE4HSPw20319b+FcZ4lWx2Nx/Ql9tN+hoaD3GH/A==} + /@rollup/rollup-android-arm64@4.13.0: + resolution: {integrity: sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@rollup/rollup-darwin-arm64@4.2.0: - resolution: {integrity: sha512-IIIQLuG43QIElT1JZqUP/zqIdiJl4t9U/boa0GZnQTw9m1X0k3mlBuysbgYXeloLT1RozdL7bgw4lpSaI8GOXw==} + /@rollup/rollup-darwin-arm64@4.13.0: + resolution: {integrity: sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.2.0: - resolution: {integrity: sha512-BXcXvnLaea1Xz900omrGJhxHFJfH9jZ0CpJuVsbjjhpniJ6qiLXz3xA8Lekaa4MuhFcJd4f0r+Ky1G4VFbYhWw==} + /@rollup/rollup-darwin-x64@4.13.0: + resolution: {integrity: sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.2.0: - resolution: {integrity: sha512-f4K3MKw9Y4AKi4ANGnmPIglr+S+8tO858YrGVuqAHXxJdVghBmz9CPU9kDpOnGvT4g4vg5uNyIFpOOFvffXyMA==} + /@rollup/rollup-linux-arm-gnueabihf@4.13.0: + resolution: {integrity: sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.2.0: - resolution: {integrity: sha512-bNsTYQBgp4H7w6cT7FZhesxpcUPahsSIy4NgdZjH1ZwEoZHxi4XKglj+CsSEkhsKi+x6toVvMylhjRKhEMYfnA==} + /@rollup/rollup-linux-arm64-gnu@4.13.0: + resolution: {integrity: sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-musl@4.2.0: - resolution: {integrity: sha512-Jp1NxBJpGLuxRU2ihrQk4IZ+ia5nffobG6sOFUPW5PMYkF0kQtxEbeDuCa69Xif211vUOcxlOnf5IOEIpTEySA==} + /@rollup/rollup-linux-arm64-musl@4.13.0: + resolution: {integrity: sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-gnu@4.2.0: - resolution: {integrity: sha512-3p3iRtQmv2aXw+vtKNyZMLOQ+LSRsqArXjKAh2Oj9cqwfIRe7OXvdkOzWfZOIp1F/x5KJzVAxGxnniF4cMbnsQ==} + /@rollup/rollup-linux-riscv64-gnu@4.13.0: + resolution: {integrity: sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.13.0: + resolution: {integrity: sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-musl@4.2.0: - resolution: {integrity: sha512-atih7IF/reUZe4LBLC5Izd44hth2tfDIG8LaPp4/cQXdHh9jabcZEvIeRPrpDq0i/Uu487Qu5gl5KwyAnWajnw==} + /@rollup/rollup-linux-x64-musl@4.13.0: + resolution: {integrity: sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.2.0: - resolution: {integrity: sha512-vYxF3tKJeUE4ceYzpNe2p84RXk/fGK30I8frpRfv/MyPStej/mRlojztkN7Jtd1014HHVeq/tYaMBz/3IxkxZw==} + /@rollup/rollup-win32-arm64-msvc@4.13.0: + resolution: {integrity: sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.2.0: - resolution: {integrity: sha512-1LZJ6zpl93SaPQvas618bMFarVwufWTaczH4ESAbFcwiC4OtznA6Ym+hFPyIGaJaGEB8uMWWac0uXGPXOg5FGA==} + /@rollup/rollup-win32-ia32-msvc@4.13.0: + resolution: {integrity: sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-x64-msvc@4.2.0: - resolution: {integrity: sha512-dgQfFdHCNg08nM5zBmqxqc9vrm0DVzhWotpavbPa0j4//MAOKZEB75yGAfzQE9fUJ+4pvM1239Y4IhL8f6sSog==} + /@rollup/rollup-win32-x64-msvc@4.13.0: + resolution: {integrity: sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==} cpu: [x64] os: [win32] requiresBuild: true @@ -4025,12 +4081,44 @@ packages: resolution: {integrity: sha512-cKc5vGQ4p/4sjx48BHIO7CvLaN32vqpz5Wh7v2n+U1EezGdfX4Wms7khBctKz3iCg9yYq4sfGUc2t+JWj6EUsw==} dev: true + /@shikijs/core@1.2.0: + resolution: {integrity: sha512-OlFvx+nyr5C8zpcMBnSGir0YPD6K11uYhouqhNmm1qLiis4GA7SsGtu07r9gKS9omks8RtQqHrJL4S+lqWK01A==} + dev: true + /@shikijs/transformers@1.1.5: resolution: {integrity: sha512-ot6KWPmLuSN9nA9FAhttOXZIjKIy7cnwpNtI9aWmYN72RUaDz8eojRfMGUXsXXUxW/buvcvdZQAQldk7/pFpdw==} dependencies: shiki: 1.1.5 dev: true + /@shikijs/twoslash@1.2.0(typescript@5.2.2): + resolution: {integrity: sha512-rVIpuL40tXG5hItVf+4aYTEEwQO6R5pvzqMZa5r6bLMpHK720Op25e/BnCohNIdsUOEaFH9xqRSJo8ubjCiM1w==} + dependencies: + '@shikijs/core': 1.2.0 + twoslash: 0.2.4(typescript@5.2.2) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@shikijs/vitepress-twoslash@1.2.0(typescript@5.2.2): + resolution: {integrity: sha512-gE2WxHmH+SDB+PVrmz3Aucf1OGe/RXfJVHIM/vx1R1H6ZtVP1SQ996qa6iPOcwF6/LNW+AODxrxZAAUUFS4GIQ==} + dependencies: + '@shikijs/twoslash': 1.2.0(typescript@5.2.2) + floating-vue: 5.2.2(vue@3.4.21) + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm: 3.0.0 + mdast-util-to-hast: 13.1.0 + shiki: 1.2.0 + twoslash: 0.2.4(typescript@5.2.2) + twoslash-vue: 0.2.4(typescript@5.2.2) + vue: 3.4.21(typescript@5.2.2) + transitivePeerDependencies: + - '@nuxt/kit' + - supports-color + - typescript + dev: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -4080,10 +4168,23 @@ packages: '@babel/types': 7.24.0 dev: true + /@types/body-parser@1.19.5: + resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + dependencies: + '@types/connect': 3.4.38 + '@types/node': 20.11.28 + dev: true + /@types/braces@3.0.1: resolution: {integrity: sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ==} dev: true + /@types/connect@3.4.38: + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + dependencies: + '@types/node': 20.11.28 + dev: true + /@types/convert-source-map@2.0.3: resolution: {integrity: sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==} dev: true @@ -4091,7 +4192,7 @@ packages: /@types/cross-spawn@6.0.6: resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 dev: true /@types/debug@4.1.12: @@ -4114,19 +4215,46 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true /@types/etag@1.8.3: resolution: {integrity: sha512-QYHv9Yeh1ZYSMPQOoxY4XC4F1r+xRUiAriB303F4G6uBsT3KKX60DjiogvVv+2VISVDuJhcIzMdbjT+Bm938QQ==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 + dev: true + + /@types/express-serve-static-core@4.17.43: + resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} + dependencies: + '@types/node': 20.11.28 + '@types/qs': 6.9.12 + '@types/range-parser': 1.2.7 + '@types/send': 0.17.4 + dev: true + + /@types/express@4.17.21: + resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + dependencies: + '@types/body-parser': 1.19.5 + '@types/express-serve-static-core': 4.17.43 + '@types/qs': 6.9.12 + '@types/serve-static': 1.15.5 dev: true /@types/fs-extra@11.0.4: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 20.11.25 + '@types/node': 20.11.28 + dev: true + + /@types/hast@3.0.4: + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + dependencies: + '@types/unist': 3.0.2 + dev: true + + /@types/http-errors@2.0.4: + resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} dev: true /@types/json-schema@7.0.12: @@ -4136,7 +4264,7 @@ packages: /@types/jsonfile@6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 dev: true /@types/less@3.0.6: @@ -4147,8 +4275,8 @@ packages: resolution: {integrity: sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==} dev: true - /@types/lodash@4.14.202: - resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} + /@types/lodash@4.17.0: + resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} dev: true /@types/markdown-it@13.0.7: @@ -4158,6 +4286,12 @@ 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 @@ -4168,6 +4302,14 @@ packages: '@types/braces': 3.0.1 dev: true + /@types/mime@1.3.5: + resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + dev: true + + /@types/mime@3.0.4: + resolution: {integrity: sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==} + dev: true + /@types/minimist@1.2.5: resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: true @@ -4182,8 +4324,8 @@ packages: undici-types: 5.26.5 dev: true - /@types/node@20.11.25: - resolution: {integrity: sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==} + /@types/node@20.11.28: + resolution: {integrity: sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==} dependencies: undici-types: 5.26.5 @@ -4206,6 +4348,14 @@ packages: kleur: 3.0.3 dev: true + /@types/qs@6.9.12: + resolution: {integrity: sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==} + dev: true + + /@types/range-parser@1.2.7: + resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + dev: true + /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true @@ -4213,17 +4363,36 @@ packages: /@types/sass@1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 dev: true /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true + /@types/send@0.17.4: + resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} + dependencies: + '@types/mime': 1.3.5 + '@types/node': 20.11.28 + dev: true + + /@types/serve-static@1.15.5: + resolution: {integrity: sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==} + dependencies: + '@types/http-errors': 2.0.4 + '@types/mime': 3.0.4 + '@types/node': 20.11.28 + dev: true + /@types/stylus@0.48.42: resolution: {integrity: sha512-CPGlr5teL4sqdap+EOowMifLuNGeIoLwc0VQ7u/BPxo+ocqiNa5jeVt0H0IVBblEh6ZwX1sGpIQIFnSSr8NBQA==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 + dev: true + + /@types/unist@3.0.2: + resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} dev: true /@types/web-bluetooth@0.0.20: @@ -4233,11 +4402,11 @@ packages: /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.11.28 dev: true - /@typescript-eslint/eslint-plugin@7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.2.2): - resolution: {integrity: sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==} + /@typescript-eslint/eslint-plugin@7.2.0(@typescript-eslint/parser@7.2.0)(eslint@8.57.0)(typescript@5.2.2): + resolution: {integrity: sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -4248,11 +4417,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 7.1.1(eslint@8.57.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/type-utils': 7.1.1(eslint@8.57.0)(typescript@5.2.2) - '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 7.2.0 + '@typescript-eslint/type-utils': 7.2.0(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/utils': 7.2.0(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.4 eslint: 8.57.0 graphemer: 1.4.0 @@ -4265,8 +4434,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.1.1(eslint@8.57.0)(typescript@5.2.2): - resolution: {integrity: sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==} + /@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.2.2): + resolution: {integrity: sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 @@ -4275,10 +4444,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/scope-manager': 7.2.0 + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.4 eslint: 8.57.0 typescript: 5.2.2 @@ -4286,16 +4455,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@7.1.1: - resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} + /@typescript-eslint/scope-manager@7.2.0: + resolution: {integrity: sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/visitor-keys': 7.2.0 dev: true - /@typescript-eslint/type-utils@7.1.1(eslint@8.57.0)(typescript@5.2.2): - resolution: {integrity: sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==} + /@typescript-eslint/type-utils@7.2.0(eslint@8.57.0)(typescript@5.2.2): + resolution: {integrity: sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 @@ -4304,8 +4473,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.2.2) - '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.2.2) + '@typescript-eslint/utils': 7.2.0(eslint@8.57.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.0.1(typescript@5.2.2) @@ -4314,13 +4483,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@7.1.1: - resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} + /@typescript-eslint/types@7.2.0: + resolution: {integrity: sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@7.1.1(typescript@5.2.2): - resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} + /@typescript-eslint/typescript-estree@7.2.0(typescript@5.2.2): + resolution: {integrity: sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -4328,8 +4497,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -4341,8 +4510,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.2.2): - resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} + /@typescript-eslint/utils@7.2.0(eslint@8.57.0)(typescript@5.2.2): + resolution: {integrity: sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 @@ -4350,9 +4519,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.2.2) + '@typescript-eslint/scope-manager': 7.2.0 + '@typescript-eslint/types': 7.2.0 + '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.2.2) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -4360,14 +4529,22 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@7.1.1: - resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} + /@typescript-eslint/visitor-keys@7.2.0: + resolution: {integrity: sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/types': 7.2.0 eslint-visitor-keys: 3.4.3 dev: true + /@typescript/vfs@1.5.0: + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -4394,38 +4571,38 @@ packages: semver: 7.6.0 dev: true - /@vitest/expect@1.3.1: - resolution: {integrity: sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==} + /@vitest/expect@1.4.0: + resolution: {integrity: sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==} dependencies: - '@vitest/spy': 1.3.1 - '@vitest/utils': 1.3.1 + '@vitest/spy': 1.4.0 + '@vitest/utils': 1.4.0 chai: 4.3.10 dev: true - /@vitest/runner@1.3.1: - resolution: {integrity: sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==} + /@vitest/runner@1.4.0: + resolution: {integrity: sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==} dependencies: - '@vitest/utils': 1.3.1 + '@vitest/utils': 1.4.0 p-limit: 5.0.0 pathe: 1.1.2 dev: true - /@vitest/snapshot@1.3.1: - resolution: {integrity: sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==} + /@vitest/snapshot@1.4.0: + resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==} dependencies: magic-string: 0.30.8 pathe: 1.1.2 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.3.1: - resolution: {integrity: sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==} + /@vitest/spy@1.4.0: + resolution: {integrity: sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@1.3.1: - resolution: {integrity: sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==} + /@vitest/utils@1.4.0: + resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==} dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 @@ -4433,6 +4610,18 @@ packages: pretty-format: 29.7.0 dev: true + /@volar/language-core@1.11.1: + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + dependencies: + '@volar/source-map': 1.11.1 + dev: true + + /@volar/source-map@1.11.1: + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + dependencies: + muggle-string: 0.3.1 + dev: true + /@vue/compiler-core@3.2.0: resolution: {integrity: sha512-+kfA4pisto26tcEh9Naf/qrizplYWnkBLHu3fX5Yu0c47RVBteVG3dHENFczl3Egwra+5NP5f3YuOgxK1ZMbNQ==} dependencies: @@ -4475,7 +4664,7 @@ packages: '@vue/shared': 3.4.21 estree-walker: 2.0.2 magic-string: 0.30.8 - postcss: 8.4.35 + postcss: 8.4.36 source-map-js: 1.0.2 /@vue/compiler-ssr@3.4.21: @@ -4519,6 +4708,26 @@ packages: rfdc: 1.3.1 dev: true + /@vue/language-core@1.8.27(typescript@5.2.2): + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.4.21 + '@vue/shared': 3.4.21 + computeds: 0.0.1 + minimatch: 9.0.3 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + typescript: 5.2.2 + vue-template-compiler: 2.7.16 + dev: true + /@vue/reactivity@3.2.0: resolution: {integrity: sha512-39L3UJe8+jYeCTM/QrDglDM05O11UrmyhazUOHOOj7+a9pPVu95HGInh5CkKQf98mx2gq6t3PPN8bCN5wK8Wwg==} dependencies: @@ -4878,10 +5087,10 @@ packages: postcss-value-parser: 4.2.0 dev: false - /axios@1.6.7: - resolution: {integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==} + /axios@1.6.8: + resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} dependencies: - follow-redirects: 1.15.4 + follow-redirects: 1.15.6 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -5067,6 +5276,10 @@ 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'} @@ -5102,6 +5315,10 @@ packages: engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true + /character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + dev: true + /character-parser@2.2.0: resolution: {integrity: sha1-x84o821LzZdE5f/CxfzeHHMmH8A=} dependencies: @@ -5234,6 +5451,10 @@ packages: dot-prop: 5.3.0 dev: true + /computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -5492,6 +5713,10 @@ packages: engines: {node: '>= 12'} dev: true + /de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + dev: true + /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -5524,6 +5749,12 @@ packages: dependencies: ms: 2.1.2 + /decode-named-character-reference@1.0.2: + resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dependencies: + character-entities: 2.0.2 + dev: true + /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -5566,6 +5797,11 @@ 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} @@ -5581,6 +5817,12 @@ 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==} @@ -5773,34 +6015,35 @@ packages: '@esbuild/win32-x64': 0.19.11 dev: true - /esbuild@0.19.3: - resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} + /esbuild@0.20.1: + resolution: {integrity: sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.19.3 - '@esbuild/android-arm64': 0.19.3 - '@esbuild/android-x64': 0.19.3 - '@esbuild/darwin-arm64': 0.19.3 - '@esbuild/darwin-x64': 0.19.3 - '@esbuild/freebsd-arm64': 0.19.3 - '@esbuild/freebsd-x64': 0.19.3 - '@esbuild/linux-arm': 0.19.3 - '@esbuild/linux-arm64': 0.19.3 - '@esbuild/linux-ia32': 0.19.3 - '@esbuild/linux-loong64': 0.19.3 - '@esbuild/linux-mips64el': 0.19.3 - '@esbuild/linux-ppc64': 0.19.3 - '@esbuild/linux-riscv64': 0.19.3 - '@esbuild/linux-s390x': 0.19.3 - '@esbuild/linux-x64': 0.19.3 - '@esbuild/netbsd-x64': 0.19.3 - '@esbuild/openbsd-x64': 0.19.3 - '@esbuild/sunos-x64': 0.19.3 - '@esbuild/win32-arm64': 0.19.3 - '@esbuild/win32-ia32': 0.19.3 - '@esbuild/win32-x64': 0.19.3 + '@esbuild/aix-ppc64': 0.20.1 + '@esbuild/android-arm': 0.20.1 + '@esbuild/android-arm64': 0.20.1 + '@esbuild/android-x64': 0.20.1 + '@esbuild/darwin-arm64': 0.20.1 + '@esbuild/darwin-x64': 0.20.1 + '@esbuild/freebsd-arm64': 0.20.1 + '@esbuild/freebsd-x64': 0.20.1 + '@esbuild/linux-arm': 0.20.1 + '@esbuild/linux-arm64': 0.20.1 + '@esbuild/linux-ia32': 0.20.1 + '@esbuild/linux-loong64': 0.20.1 + '@esbuild/linux-mips64el': 0.20.1 + '@esbuild/linux-ppc64': 0.20.1 + '@esbuild/linux-riscv64': 0.20.1 + '@esbuild/linux-s390x': 0.20.1 + '@esbuild/linux-x64': 0.20.1 + '@esbuild/netbsd-x64': 0.20.1 + '@esbuild/openbsd-x64': 0.20.1 + '@esbuild/sunos-x64': 0.20.1 + '@esbuild/win32-arm64': 0.20.1 + '@esbuild/win32-ia32': 0.20.1 + '@esbuild/win32-x64': 0.20.1 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -5819,6 +6062,11 @@ packages: engines: {node: '>=10'} dev: true + /escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + dev: true + /eslint-compat-utils@0.1.2(eslint@8.57.0): resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} engines: {node: '>=12'} @@ -5843,7 +6091,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.1.1)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.2.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -5864,7 +6112,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.1.1(eslint@8.57.0)(typescript@5.2.2) + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.2.2) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -5884,7 +6132,7 @@ packages: eslint-compat-utils: 0.1.2(eslint@8.57.0) dev: true - /eslint-plugin-i@2.29.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0): + /eslint-plugin-i@2.29.1(@typescript-eslint/parser@7.2.0)(eslint@8.57.0): resolution: {integrity: sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==} engines: {node: '>=12'} peerDependencies: @@ -5894,7 +6142,7 @@ packages: doctrine: 3.0.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.1)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.2.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) get-tsconfig: 4.7.2 is-glob: 4.0.3 minimatch: 3.1.2 @@ -6248,6 +6496,20 @@ packages: resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} dev: true + /floating-vue@5.2.2(vue@3.4.21): + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.4.21(typescript@5.2.2) + vue-resize: 2.0.0-alpha.1(vue@3.4.21) + dev: true + /focus-trap@7.5.4: resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} dependencies: @@ -6266,8 +6528,8 @@ packages: debug: 4.3.4 dev: true - /follow-redirects@1.15.4: - resolution: {integrity: sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==} + /follow-redirects@1.15.6: + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -6450,7 +6712,7 @@ packages: dependencies: foreground-child: 3.1.1 jackspeak: 2.3.6 - minimatch: 9.0.1 + minimatch: 9.0.3 minipass: 5.0.0 path-scurry: 1.10.1 dev: true @@ -6589,6 +6851,11 @@ packages: dependencies: function-bind: 1.1.2 + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: true + /hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} dev: true @@ -6651,7 +6918,7 @@ packages: dev: true optional: true - /icss-utils@5.1.0(postcss@8.4.35): + /icss-utils@5.1.0(postcss@8.4.36): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: @@ -6660,7 +6927,7 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 dev: true /ignore-walk@5.0.1: @@ -6991,8 +7258,8 @@ packages: type-check: 0.4.0 dev: true - /lightningcss-darwin-arm64@1.24.0: - resolution: {integrity: sha512-rTNPkEiynOu4CfGdd5ZfVOQe2gd2idfQd4EfX1l2ZUUwd+2SwSdbb7cG4rlwfnZckbzCAygm85xkpekRE5/wFw==} + /lightningcss-darwin-arm64@1.24.1: + resolution: {integrity: sha512-1jQ12jBy+AE/73uGQWGSafK5GoWgmSiIQOGhSEXiFJSZxzV+OXIx+a9h2EYHxdJfX864M+2TAxWPWb0Vv+8y4w==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] @@ -7000,8 +7267,8 @@ packages: dev: true optional: true - /lightningcss-darwin-x64@1.24.0: - resolution: {integrity: sha512-4KCeF2RJjzp9xdGY8zIH68CUtptEg8uz8PfkHvsIdrP4t9t5CIgfDBhiB8AmuO75N6SofdmZexDZIKdy9vA7Ww==} + /lightningcss-darwin-x64@1.24.1: + resolution: {integrity: sha512-R4R1d7VVdq2mG4igMU+Di8GPf0b64ZLnYVkubYnGG0Qxq1KaXQtAzcLI43EkpnoWvB/kUg8JKCWH4S13NfiLcQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] @@ -7009,8 +7276,8 @@ packages: dev: true optional: true - /lightningcss-freebsd-x64@1.24.0: - resolution: {integrity: sha512-FJAYlek1wXuVTsncNU0C6YD41q126dXcIUm97KAccMn9C4s/JfLSqGWT2gIzAblavPFkyGG2gIADTWp3uWfN1g==} + /lightningcss-freebsd-x64@1.24.1: + resolution: {integrity: sha512-z6NberUUw5ALES6Ixn2shmjRRrM1cmEn1ZQPiM5IrZ6xHHL5a1lPin9pRv+w6eWfcrEo+qGG6R9XfJrpuY3e4g==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] @@ -7018,8 +7285,8 @@ packages: dev: true optional: true - /lightningcss-linux-arm-gnueabihf@1.24.0: - resolution: {integrity: sha512-N55K6JqzMx7C0hYUu1YmWqhkHwzEJlkQRMA6phY65noO0I1LOAvP4wBIoFWrzRE+O6zL0RmXJ2xppqyTbk3sYw==} + /lightningcss-linux-arm-gnueabihf@1.24.1: + resolution: {integrity: sha512-NLQLnBQW/0sSg74qLNI8F8QKQXkNg4/ukSTa+XhtkO7v3BnK19TS1MfCbDHt+TTdSgNEBv0tubRuapcKho2EWw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] @@ -7027,8 +7294,8 @@ packages: dev: true optional: true - /lightningcss-linux-arm64-gnu@1.24.0: - resolution: {integrity: sha512-MqqUB2TpYtFWeBvvf5KExDdClU3YGLW5bHKs50uKKootcvG9KoS7wYwd5UichS+W3mYLc5yXUPGD1DNWbLiYKw==} + /lightningcss-linux-arm64-gnu@1.24.1: + resolution: {integrity: sha512-AQxWU8c9E9JAjAi4Qw9CvX2tDIPjgzCTrZCSXKELfs4mCwzxRkHh2RCxX8sFK19RyJoJAjA/Kw8+LMNRHS5qEg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] @@ -7036,8 +7303,8 @@ packages: dev: true optional: true - /lightningcss-linux-arm64-musl@1.24.0: - resolution: {integrity: sha512-5wn4d9tFwa5bS1ao9mLexYVJdh3nn09HNIipsII6ZF7z9ZA5J4dOEhMgKoeCl891axTGTUYd8Kxn+Hn3XUSYRQ==} + /lightningcss-linux-arm64-musl@1.24.1: + resolution: {integrity: sha512-JCgH/SrNrhqsguUA0uJUM1PvN5+dVuzPIlXcoWDHSv2OU/BWlj2dUYr3XNzEw748SmNZPfl2NjQrAdzaPOn1lA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] @@ -7045,8 +7312,8 @@ packages: dev: true optional: true - /lightningcss-linux-x64-gnu@1.24.0: - resolution: {integrity: sha512-3j5MdTh+LSDF3o6uDwRjRUgw4J+IfDCVtdkUrJvKxL79qBLUujXY7CTe5X3IQDDLKEe/3wu49r8JKgxr0MfjbQ==} + /lightningcss-linux-x64-gnu@1.24.1: + resolution: {integrity: sha512-TYdEsC63bHV0h47aNRGN3RiK7aIeco3/keN4NkoSQ5T8xk09KHuBdySltWAvKLgT8JvR+ayzq8ZHnL1wKWY0rw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] @@ -7054,8 +7321,8 @@ packages: dev: true optional: true - /lightningcss-linux-x64-musl@1.24.0: - resolution: {integrity: sha512-HI+rNnvaLz0o36z6Ki0gyG5igVGrJmzczxA5fznr6eFTj3cHORoR/j2q8ivMzNFR4UKJDkTWUH5LMhacwOHWBA==} + /lightningcss-linux-x64-musl@1.24.1: + resolution: {integrity: sha512-HLfzVik3RToot6pQ2Rgc3JhfZkGi01hFetHt40HrUMoeKitLoqUUT5owM6yTZPTytTUW9ukLBJ1pc3XNMSvlLw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] @@ -7063,8 +7330,8 @@ packages: dev: true optional: true - /lightningcss-win32-x64-msvc@1.24.0: - resolution: {integrity: sha512-oeije/t7OZ5N9vSs6amyW/34wIYoBCpE6HUlsSKcP2SR1CVgx9oKEM00GtQmtqNnYiMIfsSm7+ppMb4NLtD5vg==} + /lightningcss-win32-x64-msvc@1.24.1: + resolution: {integrity: sha512-joEupPjYJ7PjZtDsS5lzALtlAudAbgIBMGJPNeFe5HfdmJXFd13ECmEM+5rXNxYVMRHua2w8132R6ab5Z6K9Ow==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] @@ -7072,21 +7339,21 @@ packages: dev: true optional: true - /lightningcss@1.24.0: - resolution: {integrity: sha512-y36QEEDVx4IM7/yIZNsZJMRREIu26WzTsauIysf5s76YeCmlSbRZS7aC97IGPuoFRnyZ5Wx43OBsQBFB5Ne7ng==} + /lightningcss@1.24.1: + resolution: {integrity: sha512-kUpHOLiH5GB0ERSv4pxqlL0RYKnOXtgGtVe7shDGfhS0AZ4D1ouKFYAcLcZhql8aMspDNzaUCumGHZ78tb2fTg==} engines: {node: '>= 12.0.0'} dependencies: detect-libc: 1.0.3 optionalDependencies: - lightningcss-darwin-arm64: 1.24.0 - lightningcss-darwin-x64: 1.24.0 - lightningcss-freebsd-x64: 1.24.0 - lightningcss-linux-arm-gnueabihf: 1.24.0 - lightningcss-linux-arm64-gnu: 1.24.0 - lightningcss-linux-arm64-musl: 1.24.0 - lightningcss-linux-x64-gnu: 1.24.0 - lightningcss-linux-x64-musl: 1.24.0 - lightningcss-win32-x64-msvc: 1.24.0 + lightningcss-darwin-arm64: 1.24.1 + lightningcss-darwin-x64: 1.24.1 + lightningcss-freebsd-x64: 1.24.1 + lightningcss-linux-arm-gnueabihf: 1.24.1 + lightningcss-linux-arm64-gnu: 1.24.1 + lightningcss-linux-arm64-musl: 1.24.1 + lightningcss-linux-x64-gnu: 1.24.1 + lightningcss-linux-x64-musl: 1.24.1 + lightningcss-win32-x64-msvc: 1.24.1 dev: true /lilconfig@2.1.0: @@ -7197,6 +7464,10 @@ packages: wrap-ansi: 9.0.0 dev: true + /longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + dev: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -7270,6 +7541,147 @@ packages: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: true + /markdown-table@3.0.3: + resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + dev: true + + /mdast-util-find-and-replace@3.0.1: + resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + dependencies: + '@types/mdast': 4.0.3 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: true + + /mdast-util-from-markdown@2.0.0: + resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-decode-string: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-autolink-literal@2.0.0: + resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==} + dependencies: + '@types/mdast': 4.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.1 + micromark-util-character: 2.1.0 + dev: true + + /mdast-util-gfm-footnote@2.0.0: + resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + micromark-util-normalize-identifier: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + dependencies: + '@types/mdast': 4.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + markdown-table: 3.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm@3.0.0: + resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} + dependencies: + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm-autolink-literal: 2.0.0 + mdast-util-gfm-footnote: 2.0.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + dependencies: + '@types/mdast': 4.0.3 + unist-util-is: 6.0.0 + dev: true + + /mdast-util-to-hast@13.1.0: + resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==} + dependencies: + '@types/hast': 3.0.4 + '@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 + vfile: 6.0.1 + dev: true + + /mdast-util-to-markdown@2.1.0: + resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-decode-string: 2.0.0 + unist-util-visit: 5.0.0 + zwitch: 2.0.4 + dev: true + + /mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + dependencies: + '@types/mdast': 4.0.3 + dev: true + /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -7304,6 +7716,181 @@ packages: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + /micromark-core-commonmark@2.0.0: + resolution: {integrity: sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==} + dependencies: + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-factory-destination: 2.0.0 + micromark-factory-label: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-factory-title: 2.0.0 + micromark-factory-whitespace: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-classify-character: 2.0.0 + micromark-util-html-tag-name: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-destination@2.0.0: + resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-label@2.0.0: + resolution: {integrity: sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==} + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-space@2.0.0: + resolution: {integrity: sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-title@2.0.0: + resolution: {integrity: sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-whitespace@2.0.0: + resolution: {integrity: sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-character@2.1.0: + resolution: {integrity: sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==} + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-chunked@2.0.0: + resolution: {integrity: sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-classify-character@2.0.0: + resolution: {integrity: sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-combine-extensions@2.0.0: + resolution: {integrity: sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==} + dependencies: + micromark-util-chunked: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-decode-numeric-character-reference@2.0.1: + resolution: {integrity: sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-decode-string@2.0.0: + resolution: {integrity: sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 2.1.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + dev: true + + /micromark-util-html-tag-name@2.0.0: + resolution: {integrity: sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==} + dev: true + + /micromark-util-normalize-identifier@2.0.0: + resolution: {integrity: sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-resolve-all@2.0.0: + resolution: {integrity: sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==} + dependencies: + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-subtokenize@2.0.0: + resolution: {integrity: sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==} + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 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 + + /micromark@4.0.0: + resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} + dependencies: + '@types/debug': 4.1.12 + debug: 4.3.4 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-encode: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -7336,8 +7923,8 @@ packages: engines: {node: '>=12'} dev: true - /miniflare@3.20240304.0: - resolution: {integrity: sha512-6bmFkwXbTy1x5dEfVCLg03Gd80OWUmKI8Li0BhG6nOO+bT3rlIYwctyyfXTfNMFjqbK07AnnPiMwgnfdaaAYVQ==} + /miniflare@3.20240304.2: + resolution: {integrity: sha512-yQ5TBKv7TlvF8khFvvH+1WWk8cBnaLgNzcbJ5DLQOdecxdDxUCVlN38HThd6Nhcz6EY+ckDkww8FkugUbSSpIQ==} engines: {node: '>=16.13'} hasBin: true dependencies: @@ -7371,13 +7958,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimatch@9.0.1: - resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -7459,7 +8039,7 @@ packages: acorn: 8.11.3 pathe: 1.1.2 pkg-types: 1.0.3 - ufo: 1.4.0 + ufo: 1.5.1 dev: true /mlly@1.6.1: @@ -7468,7 +8048,7 @@ packages: acorn: 8.11.3 pathe: 1.1.2 pkg-types: 1.0.3 - ufo: 1.4.0 + ufo: 1.5.1 dev: true /moment@2.30.1: @@ -7494,6 +8074,10 @@ packages: /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + /muggle-string@0.3.1: + resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + dev: true + /mustache@4.2.0: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true @@ -7797,6 +8381,10 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -7915,7 +8503,7 @@ packages: hasBin: true dev: true - /postcss-import@15.1.0(postcss@8.4.35): + /postcss-import@15.1.0(postcss@8.4.36): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: @@ -7924,12 +8512,12 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.4 - /postcss-import@16.0.1(patch_hash=fjrm7xa2co7loa5ldk32oip4ly)(postcss@8.4.35): + /postcss-import@16.0.1(patch_hash=fjrm7xa2co7loa5ldk32oip4ly)(postcss@8.4.36): resolution: {integrity: sha512-i2Pci0310NaLHr/5JUFSw1j/8hf1CzwMY13g6ZDxgOavmRHQi2ba3PmUHoihO+sjaum+KmCNzskNsw7JDrg03g==} engines: {node: '>=18.0.0'} peerDependencies: @@ -7938,14 +8526,14 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.4 dev: true patched: true - /postcss-js@4.0.1(postcss@8.4.35): + /postcss-js@4.0.1(postcss@8.4.36): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: @@ -7955,9 +8543,9 @@ packages: optional: true dependencies: camelcase-css: 2.0.1 - postcss: 8.4.35 + postcss: 8.4.36 - /postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2): + /postcss-load-config@4.0.2(postcss@8.4.36)(ts-node@10.9.2): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} peerDependencies: @@ -7970,11 +8558,11 @@ packages: optional: true dependencies: lilconfig: 3.0.0 - postcss: 8.4.35 - ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.2.2) + postcss: 8.4.36 + ts-node: 10.9.2(@types/node@20.11.28)(typescript@5.2.2) yaml: 2.3.4 - /postcss-modules-extract-imports@3.0.0(postcss@8.4.35): + /postcss-modules-extract-imports@3.0.0(postcss@8.4.36): resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: @@ -7983,10 +8571,10 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 dev: true - /postcss-modules-local-by-default@4.0.0(postcss@8.4.35): + /postcss-modules-local-by-default@4.0.0(postcss@8.4.36): resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: @@ -7995,13 +8583,13 @@ packages: postcss: optional: true dependencies: - icss-utils: 5.1.0(postcss@8.4.35) - postcss: 8.4.35 + icss-utils: 5.1.0(postcss@8.4.36) + postcss: 8.4.36 postcss-selector-parser: 6.0.11 postcss-value-parser: 4.2.0 dev: true - /postcss-modules-scope@3.0.0(postcss@8.4.35): + /postcss-modules-scope@3.0.0(postcss@8.4.36): resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: @@ -8010,11 +8598,11 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 postcss-selector-parser: 6.0.11 dev: true - /postcss-modules-values@4.0.0(postcss@8.4.35): + /postcss-modules-values@4.0.0(postcss@8.4.36): resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: @@ -8023,11 +8611,11 @@ packages: postcss: optional: true dependencies: - icss-utils: 5.1.0(postcss@8.4.35) - postcss: 8.4.35 + icss-utils: 5.1.0(postcss@8.4.36) + postcss: 8.4.36 dev: true - /postcss-modules@6.0.0(postcss@8.4.35): + /postcss-modules@6.0.0(postcss@8.4.36): resolution: {integrity: sha512-7DGfnlyi/ju82BRzTIjWS5C4Tafmzl3R79YP/PASiocj+aa6yYphHhhKUOEoXQToId5rgyFgJ88+ccOUydjBXQ==} peerDependencies: postcss: ^8.0.0 @@ -8036,17 +8624,17 @@ packages: optional: true dependencies: generic-names: 4.0.0 - icss-utils: 5.1.0(postcss@8.4.35) + icss-utils: 5.1.0(postcss@8.4.36) lodash.camelcase: 4.3.0 - 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) + postcss: 8.4.36 + postcss-modules-extract-imports: 3.0.0(postcss@8.4.36) + postcss-modules-local-by-default: 4.0.0(postcss@8.4.36) + postcss-modules-scope: 3.0.0(postcss@8.4.36) + postcss-modules-values: 4.0.0(postcss@8.4.36) string-hash: 1.1.3 dev: true - /postcss-nested@6.0.1(postcss@8.4.35): + /postcss-nested@6.0.1(postcss@8.4.36): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: @@ -8055,7 +8643,7 @@ packages: postcss: optional: true dependencies: - postcss: 8.4.35 + postcss: 8.4.36 postcss-selector-parser: 6.0.11 /postcss-selector-parser@6.0.11: @@ -8068,13 +8656,13 @@ packages: /postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - /postcss@8.4.35: - resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + /postcss@8.4.36: + resolution: {integrity: sha512-/n7eumA6ZjFHAsbX30yhHup/IMkOmlmvtEi7P+6RMYf+bGJSUHc3geH4a0NSZxAz/RJfiS9tooCTs9LAVYUZKw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 picocolors: 1.0.0 - source-map-js: 1.0.2 + source-map-js: 1.1.0 /preact@10.7.3: resolution: {integrity: sha512-giqJXP8VbtA1tyGa3f1n9wiN7PrHtONrDyE3T+ifjr/tTkg+2N4d/6sjC9WyJKv8wM7rOYDveqy5ZoFmYlwo4w==} @@ -8456,7 +9044,7 @@ packages: glob: 10.3.10 dev: true - /rollup-plugin-dts@6.0.2(rollup@3.29.2)(typescript@5.2.2): + /rollup-plugin-dts@6.0.2(rollup@3.29.4)(typescript@5.2.2): resolution: {integrity: sha512-GYCCy9DyE5csSuUObktJBpjNpW2iLZMabNDIiAqzQWBl7l/WHzjvtAXevf8Lftk8EA920tuxeB/g8dM8MVMR6A==} engines: {node: '>=v16'} peerDependencies: @@ -8464,13 +9052,13 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.8 - rollup: 3.29.2 + rollup: 3.29.4 typescript: 5.2.2 optionalDependencies: '@babel/code-frame': 7.23.5 dev: true - /rollup-plugin-dts@6.1.0(rollup@4.2.0)(typescript@5.2.2): + /rollup-plugin-dts@6.1.0(rollup@4.13.0)(typescript@5.2.2): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} peerDependencies: @@ -8478,30 +9066,30 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.8 - rollup: 4.2.0 + rollup: 4.13.0 typescript: 5.2.2 optionalDependencies: '@babel/code-frame': 7.23.5 dev: true - /rollup-plugin-esbuild@6.1.1(esbuild@0.19.3)(rollup@4.2.0): + /rollup-plugin-esbuild@6.1.1(esbuild@0.20.1)(rollup@4.13.0): resolution: {integrity: sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==} engines: {node: '>=14.18.0'} peerDependencies: esbuild: '>=0.18.0' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.2.0) + '@rollup/pluginutils': 5.1.0(rollup@4.13.0) debug: 4.3.4 es-module-lexer: 1.4.1 - esbuild: 0.19.3 + esbuild: 0.20.1 get-tsconfig: 4.7.2 - rollup: 4.2.0 + rollup: 4.13.0 transitivePeerDependencies: - supports-color dev: true - /rollup-plugin-license@3.3.1(rollup@4.2.0): + /rollup-plugin-license@3.3.1(rollup@4.13.0): resolution: {integrity: sha512-lwZ/J8QgSnP0unVOH2FQuOBkeiyp0EBvrbYdNU33lOaYD8xP9Zoki+PGoWMD31EUq8Q07GGocSABTYlWMKkwuw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -8514,36 +9102,39 @@ packages: mkdirp: 3.0.1 moment: 2.30.1 package-name-regex: 2.0.6 - rollup: 4.2.0 + rollup: 4.13.0 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 dev: true - /rollup@3.29.2: - resolution: {integrity: sha512-CJouHoZ27v6siztc21eEQGo0kIcE5D1gVPA571ez0mMYb25LGYGKnVNXpEj5MGlepmDWGXNjDB5q7uNiPHC11A==} + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.3 dev: true - /rollup@4.2.0: - resolution: {integrity: sha512-deaMa9Z+jPVeBD2dKXv+h7EbdKte9++V2potc/ADqvVgEr6DEJ3ia9u0joarjC2lX/ubaCRYz3QVx0TzuVqAJA==} + /rollup@4.13.0: + resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + dependencies: + '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.2.0 - '@rollup/rollup-android-arm64': 4.2.0 - '@rollup/rollup-darwin-arm64': 4.2.0 - '@rollup/rollup-darwin-x64': 4.2.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.2.0 - '@rollup/rollup-linux-arm64-gnu': 4.2.0 - '@rollup/rollup-linux-arm64-musl': 4.2.0 - '@rollup/rollup-linux-x64-gnu': 4.2.0 - '@rollup/rollup-linux-x64-musl': 4.2.0 - '@rollup/rollup-win32-arm64-msvc': 4.2.0 - '@rollup/rollup-win32-ia32-msvc': 4.2.0 - '@rollup/rollup-win32-x64-msvc': 4.2.0 + '@rollup/rollup-android-arm-eabi': 4.13.0 + '@rollup/rollup-android-arm64': 4.13.0 + '@rollup/rollup-darwin-arm64': 4.13.0 + '@rollup/rollup-darwin-x64': 4.13.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.13.0 + '@rollup/rollup-linux-arm64-gnu': 4.13.0 + '@rollup/rollup-linux-arm64-musl': 4.13.0 + '@rollup/rollup-linux-riscv64-gnu': 4.13.0 + '@rollup/rollup-linux-x64-gnu': 4.13.0 + '@rollup/rollup-linux-x64-musl': 4.13.0 + '@rollup/rollup-win32-arm64-msvc': 4.13.0 + '@rollup/rollup-win32-ia32-msvc': 4.13.0 + '@rollup/rollup-win32-x64-msvc': 4.13.0 fsevents: 2.3.3 /run-parallel@1.2.0: @@ -8564,8 +9155,8 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /sass@1.71.1: - resolution: {integrity: sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==} + /sass@1.72.0: + resolution: {integrity: sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -8683,6 +9274,12 @@ packages: '@shikijs/core': 1.1.5 dev: true + /shiki@1.2.0: + resolution: {integrity: sha512-xLhiTMOIUXCv5DqJ4I70GgQCtdlzsTqFLZWcMHHG3TAieBUbvEGthdrlPDlX4mL/Wszx9C6rEcxU6kMlg4YlxA==} + dependencies: + '@shikijs/core': 1.2.0 + dev: true + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -8702,8 +9299,8 @@ packages: engines: {node: '>=14'} dev: true - /simple-git-hooks@2.10.0: - resolution: {integrity: sha512-TtCytVYfV77pILCkzVxpOSgYKHQyaO7fBI/iwG5bLGb0dIo/v/K1Y1IZ5DN40RQu6WNNJiN0gkuRvSYjxOhFog==} + /simple-git-hooks@2.11.0: + resolution: {integrity: sha512-Wab2uzjGJEL8Kx+2UY8waUSfkiolt2RbaAJWvPCjaAEXrrKoS7JqPk4STiIVl/yt3asZRUzFoK2ryhwvgh5rYw==} hasBin: true requiresBuild: true dev: true @@ -8755,6 +9352,10 @@ packages: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} + /source-map-js@1.1.0: + resolution: {integrity: sha512-9vC2SfsJzlej6MAaMPLu8HiBSHGdRAJ9hVFYN1ibZoNkeanmDmLUcIrj6G9DGL7XMJ54AKg/G75akXl1/izTOw==} + engines: {node: '>=0.10.0'} + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -8947,7 +9548,7 @@ packages: engines: {node: '>=8'} hasBin: true dependencies: - '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/gen-mapping': 0.3.5 commander: 4.1.1 glob: 7.1.6 lines-and-columns: 1.2.4 @@ -9010,11 +9611,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - 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: 8.4.36 + postcss-import: 15.1.0(postcss@8.4.36) + postcss-js: 4.0.1(postcss@8.4.36) + postcss-load-config: 4.0.2(postcss@8.4.36)(ts-node@10.9.2) + postcss-nested: 6.0.1(postcss@8.4.36) postcss-selector-parser: 6.0.11 resolve: 1.22.4 sucrase: 3.32.0 @@ -9045,8 +9646,8 @@ packages: temp-dir: 3.0.0 dev: true - /terser@5.29.1: - resolution: {integrity: sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==} + /terser@5.29.2: + resolution: {integrity: sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==} engines: {node: '>=10'} hasBin: true dependencies: @@ -9124,6 +9725,10 @@ 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'} @@ -9136,7 +9741,7 @@ packages: /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - /ts-node@10.9.2(@types/node@20.11.25)(typescript@5.2.2): + /ts-node@10.9.2(@types/node@20.11.28)(typescript@5.2.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9155,7 +9760,7 @@ packages: '@tsconfig/node12': 1.0.9 '@tsconfig/node14': 1.0.1 '@tsconfig/node16': 1.0.2 - '@types/node': 20.11.25 + '@types/node': 20.11.28 acorn: 8.11.3 acorn-walk: 8.3.2(acorn@8.11.3) arg: 4.1.3 @@ -9194,6 +9799,35 @@ packages: fsevents: 2.3.3 dev: true + /twoslash-protocol@0.2.4: + resolution: {integrity: sha512-AEGTJj4mFGfvQc/M6qi0+s82Zq+mxLcjWZU+EUHGG8LQElyHDs+uDR+/3+m1l+WP7WL+QmWrVzFXgFX+hBg+bg==} + dev: true + + /twoslash-vue@0.2.4(typescript@5.2.2): + resolution: {integrity: sha512-AIcsYRSxn5WuZC+dD7/n99s1UEY6e5IljoGL3YijQvI/pylgsKk5sWXptp5NrRTH0srBLXoeVpE1re1Eo6eiJw==} + peerDependencies: + typescript: '*' + dependencies: + '@vue/language-core': 1.8.27(typescript@5.2.2) + twoslash: 0.2.4(typescript@5.2.2) + twoslash-protocol: 0.2.4 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /twoslash@0.2.4(typescript@5.2.2): + resolution: {integrity: sha512-hc3y11BjLHP4kV37TR6lUKksxpZp0LQi9kCy95ka6qobye/gV49PqXZIuWlRaRVGNvp4AJBMg8aiwkp0M8x/nQ==} + peerDependencies: + typescript: '*' + dependencies: + '@typescript/vfs': 1.5.0 + twoslash-protocol: 0.2.4 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -9241,8 +9875,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /ufo@1.4.0: - resolution: {integrity: sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==} + /ufo@1.5.1: + resolution: {integrity: sha512-HGyF79+/qZ4soRvM+nHERR2pJ3VXDZ/8sL1uLahdgEDf580NkgiWOxLk33FetExqOWp352JZRsgXbG/4MaGOSg==} dev: true /uglify-js@3.17.4: @@ -9262,12 +9896,12 @@ packages: typescript: optional: true dependencies: - '@rollup/plugin-alias': 5.0.0(rollup@3.29.2) - '@rollup/plugin-commonjs': 25.0.4(rollup@3.29.2) - '@rollup/plugin-json': 6.0.0(rollup@3.29.2) - '@rollup/plugin-node-resolve': 15.2.1(rollup@3.29.2) - '@rollup/plugin-replace': 5.0.2(rollup@3.29.2) - '@rollup/pluginutils': 5.0.4(rollup@3.29.2) + '@rollup/plugin-alias': 5.0.0(rollup@3.29.4) + '@rollup/plugin-commonjs': 25.0.4(rollup@3.29.4) + '@rollup/plugin-json': 6.0.0(rollup@3.29.4) + '@rollup/plugin-node-resolve': 15.2.1(rollup@3.29.4) + '@rollup/plugin-replace': 5.0.2(rollup@3.29.4) + '@rollup/pluginutils': 5.0.4(rollup@3.29.4) chalk: 5.3.0 citty: 0.1.4 consola: 3.2.3 @@ -9282,8 +9916,8 @@ packages: pathe: 1.1.2 pkg-types: 1.0.3 pretty-bytes: 6.1.1 - rollup: 3.29.2 - rollup-plugin-dts: 6.0.2(rollup@3.29.2)(typescript@5.2.2) + rollup: 3.29.4 + rollup-plugin-dts: 6.0.2(rollup@3.29.4)(typescript@5.2.2) scule: 1.0.0 typescript: 5.2.2 untyped: 1.4.0 @@ -9325,6 +9959,39 @@ 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'} @@ -9392,8 +10059,23 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - /vite-node@1.3.1: - resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} + /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.4.0: + resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -9454,15 +10136,15 @@ packages: - universal-cookie dev: true - /vitest@1.3.1(@types/node@20.11.25): - resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==} + /vitest@1.4.0(@types/node@20.11.28): + resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.3.1 - '@vitest/ui': 1.3.1 + '@vitest/browser': 1.4.0 + '@vitest/ui': 1.4.0 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -9479,12 +10161,12 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.25 - '@vitest/expect': 1.3.1 - '@vitest/runner': 1.3.1 - '@vitest/snapshot': 1.3.1 - '@vitest/spy': 1.3.1 - '@vitest/utils': 1.3.1 + '@types/node': 20.11.28 + '@vitest/expect': 1.4.0 + '@vitest/runner': 1.4.0 + '@vitest/snapshot': 1.4.0 + '@vitest/spy': 1.4.0 + '@vitest/utils': 1.4.0 acorn-walk: 8.3.2(acorn@8.11.3) chai: 4.3.10 debug: 4.3.4 @@ -9498,7 +10180,7 @@ packages: tinybench: 2.5.1 tinypool: 0.8.2 vite: link:packages/vite - vite-node: 1.3.1 + vite-node: 1.4.0 why-is-node-running: 2.2.2 transitivePeerDependencies: - acorn @@ -9525,6 +10207,14 @@ packages: vue: 3.4.21(typescript@5.2.2) dev: true + /vue-resize@2.0.0-alpha.1(vue@3.4.21): + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + dependencies: + vue: 3.4.21(typescript@5.2.2) + dev: true + /vue-router@4.3.0(vue@3.4.21): resolution: {integrity: sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==} peerDependencies: @@ -9534,6 +10224,13 @@ packages: vue: 3.4.21(typescript@5.2.2) dev: false + /vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + dev: true + /vue@3.2.0: resolution: {integrity: sha512-eMo5yCdkWRmBfqp/acBI/Y1Omgk0NyGqPViaU66eOpKarXNtkdImzDA57+E76jnWVr6MEp/rg1n0vnxaVvALMQ==} dependencies: @@ -9722,6 +10419,10 @@ packages: 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} name: '@vitejs/test-aliased-module' @@ -9860,6 +10561,11 @@ packages: name: '@vitejs/test-dep-esbuild-plugin-transform' dev: false + file:playground/optimize-deps/dep-incompatible: + resolution: {directory: playground/optimize-deps/dep-incompatible, type: directory} + name: '@vitejs/test-dep-incompatible' + dev: false + file:playground/optimize-deps/dep-node-env: resolution: {directory: playground/optimize-deps/dep-node-env, type: directory} name: '@vitejs/test-dep-node-env' @@ -9968,6 +10674,11 @@ packages: dep-a: file:playground/preload/dep-a dev: true + file:playground/ssr-alias/alias-original: + resolution: {directory: playground/ssr-alias/alias-original, type: directory} + name: '@vitejs/test-alias-original' + dev: false + file:playground/ssr-conditions/external: resolution: {directory: playground/ssr-conditions/external, type: directory} name: '@vitejs/test-ssr-conditions-external' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 19efe2ba1fc494..da71b7757cde0f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,3 +2,4 @@ packages: - 'packages/*' - 'playground/**' - 'packages/**/__tests__/**' + - docs