diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 1a729dc3237553..9c3150eb1d0c1b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -150,7 +150,7 @@ export default defineConfig({ link: '/guide/comparisons' }, { - text: 'Migration from v1', + text: 'Migration from v2', link: '/guide/migration' } ] diff --git a/docs/guide/features.md b/docs/guide/features.md index 2006b5850fd4a2..d58a09e4cbf2cb 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -210,6 +210,15 @@ Vite improves `@import` resolving for Sass and Less so that Vite aliases are als You can also use CSS modules combined with pre-processors by prepending `.module` to the file extension, for example `style.module.scss`. +### Disabling CSS injection into the page + +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 +import styles from './foo.css' // will be injected into the page +import otherStyles from './bar.css?inline' // will not be injected into the page +``` + ## Static Assets Importing a static asset will return the resolved public URL when it is served: diff --git a/docs/guide/migration.md b/docs/guide/migration.md index 23d80795ce9599..78b738afb82ddf 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -1,133 +1,113 @@ -# Migration from v1 +# Migration from v2 -## Config Options Change +## Node Support -- The following options have been removed and should be implemented via [plugins](./api-plugin): +Vite no longer supports Node v12, which reached its EOL. Node 14.6+ is now required. - - `resolvers` - - `transforms` - - `indexHtmlTransforms` +## Modern Browser Baseline change -- `jsx` and `enableEsbuild` have been removed; Use the new [`esbuild`](/config/#esbuild) option instead. +The production bundle assumes support for modern JavaScript. By default, Vite targets browsers which support the [native ES Modules](https://caniuse.com/es6-module) and [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import) and [`import.meta`](https://caniuse.com/mdn-javascript_statements_import_meta): -- [CSS related options](/config/#css-modules) are now nested under `css`. +- Chrome >=87 +- Firefox >=78 +- Safari >=13 +- Edge >=88 -- All [build-specific options](/config/#build-options) are now nested under `build`. +A small fraction of users will now require using [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy), which will automatically generate legacy chunks and corresponding ES language feature polyfills. - - `rollupInputOptions` and `rollupOutputOptions` are replaced by [`build.rollupOptions`](/config/#build-rollupoptions). - - `esbuildTarget` is now [`build.target`](/config/#build-target). - - `emitManifest` is now [`build.manifest`](/config/#build-manifest). - - The following build options have been removed since they can be achieved via plugin hooks or other options: - - `entry` - - `rollupDedupe` - - `emitAssets` - - `emitIndex` - - `shouldPreload` - - `configureBuild` +## Config Options Changes -- All [server-specific options](/config/#server-options) are now nested under - `server`. +- The following options that were already deprecated in v2 have been removed: - - `hostname` is now [`server.host`](/config/#server-host). - - `httpsOptions` has been removed. [`server.https`](/config/#server-https) can directly accept the options object. - - `chokidarWatchOptions` is now [`server.watch`](/config/#server-watch). + - `alias` (switch to [`resolve.alias`](../config/shared-options.md#resolvealias)) + - `dedupe` (switch to [`resolve.dedupe`](../config/shared-options.md#resolvededupe)) + - `build.base` (switch to [`base`](../config/shared-options.md#base)) + - `build.brotliSize` (switch to [`build.reportCompressedSize`](../config/build-options.md#build-reportcompressedsize)) + - `build.cleanCssOptions` (Vite now uses esbuild for CSS minification) + - `build.polyfillDynamicImport` (use [`@vitejs/plugin-legacy`](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy) for browsers without dynamic import support) + - `optimizeDeps.keepNames` (switch to [`optimizeDeps.esbuildOptions.keepNames`](../config/dep-optimization-options.md#optimizedepsesbuildoptions)) -- [`assetsInclude`](/config/#assetsinclude) now expects `string | RegExp | (string | RegExp)[]` instead of a function. +## Dev Server Changes -- All Vue specific options are removed; Pass options to the Vue plugin instead. +Vite's default dev server port is now 5173. You can use [`server.port`](../config/server-options.md#server-port) to set it to 3000. -## Alias Behavior Change +Vite optimizes dependencies with esbuild to both convert CJS-only deps to ESM and to reduce the number of modules the browser needs to request. In v3, the default strategy to discover and batch dependencies has changed. Vite no longer pre-scans user code with esbuild to get an initial list of dependencies on cold start. Instead, it delays the first dependency optimization run until every imported user module on load is processed. -[`alias`](/config/#resolve-alias) is now being passed to `@rollup/plugin-alias` and no longer require start/ending slashes. The behavior is now a direct replacement, so 1.0-style directory alias key should remove the ending slash: +To get back the v2 strategy, you can use [`optimizeDeps.devScan`](../config/dep-optimization-options.md#optimizedepsdevscan). -```diff -- alias: { '/@foo/': path.resolve(__dirname, 'some-special-dir') } -+ alias: { '/@foo': path.resolve(__dirname, 'some-special-dir') } -``` +## Build Changes -Alternatively, you can use the `[{ find: RegExp, replacement: string }]` option format for more precise control. +In v3, Vite uses esbuild to optimize dependencies by default. Doing so, it removes one of the most significant differences between dev and prod present in v2. Because esbuild converts CJS-only dependencies to ESM, [`@rollupjs/plugin-commonjs`](https://github.com/rollup/plugins/tree/master/packages/commonjs) is no longer used. -## Vue Support +If you need to get back to the v2 strategy, you can use [`optimizeDeps.disabled: 'build'`](../config/dep-optimization-options.md#optimizedepsdisabled). -Vite 2.0 core is now framework agnostic. Vue support is now provided via [`@vitejs/plugin-vue`](https://github.com/vitejs/vite/tree/main/packages/plugin-vue). Simply install it and add it in the Vite config: +## SSR Changes -```js -import vue from '@vitejs/plugin-vue' -import { defineConfig } from 'vite' +Vite v3 uses ESM for the SSR build by default. When using ESM, the [SSR externalization heuristics](https://vitejs.dev/guide/ssr.html#ssr-externals) are no longer needed. By default, all dependencies are externalized. You can use [`ssr.noExternal`](../config/ssr-options.md#ssrnoexternal) to control what dependencies to include in the SSR bundle. -export default defineConfig({ - plugins: [vue()] -}) -``` +If using ESM for SSR isn't possible in your project, you can set `ssr.format: 'cjs'` to generate a CJS bundle. In this case, the same externalization strategy of Vite v2 will be used. -### Custom Blocks Transforms - -A custom plugin can be used to transform Vue custom blocks like the one below: - -```ts -// vite.config.js -import vue from '@vitejs/plugin-vue' -import { defineConfig } from 'vite' - -const vueI18nPlugin = { - name: 'vue-i18n', - transform(code, id) { - if (!/vue&type=i18n/.test(id)) { - return - } - if (/\.ya?ml$/.test(id)) { - code = JSON.stringify(require('js-yaml').load(code.trim())) - } - return `export default Comp => { - Comp.i18n = ${code} - }` - } -} +## General Changes -export default defineConfig({ - plugins: [vue(), vueI18nPlugin] -}) -``` +- JS file extensions in SSR and lib mode now use a valid extension (`js`, `mjs`, or `cjs`) for output JS entries and chunks based on their format and the package type. -## React Support +### `import.meta.glob` -React Fast Refresh support is now provided via [`@vitejs/plugin-react`](https://github.com/vitejs/vite/tree/main/packages/plugin-react). +- [Raw `import.meta.glob`](features.md#glob-import-as) switched from `{ assert: { type: 'raw' }}` to `{ as: 'raw' }` +- Keys of `import.meta.glob` are now relative to the current module. -## HMR API Change + ```diff + // file: /foo/index.js + const modules = import.meta.glob('../foo/*.js') -`import.meta.hot.acceptDeps()` have been deprecated. [`import.meta.hot.accept()`](./api-hmr#hot-accept-deps-cb) can now accept single or multiple deps. + // transformed: + const modules = { + - '../foo/bar.js': () => {} + + './bar.js': () => {} + } + ``` -## Manifest Format Change +- When using an alias with `import.meta.glob`, the keys are always absolute. +- `import.meta.globEager` is now deprecated. Use `import.meta.glob('*', { eager: true })` instead. -The build manifest now uses the following format: +### WebAssembly support -```json -{ - "index.js": { - "file": "assets/index.acaf2b48.js", - "imports": [...] - }, - "index.css": { - "file": "assets/index.7b7dbd85.css" - } - "asset.png": { - "file": "assets/asset.0ab0f9cd.png" - } -} +`import init from 'example.wasm'` syntax is dropped to prevent future collision with ["ESM integration for Wasm"](https://github.com/WebAssembly/esm-integration). +You can use `?init` which is similar to the previous behavior. + +```diff +-import init from 'example.wasm' ++import init from 'example.wasm?init' + +-init().then((instance) => { ++init().then(({ exports }) => { + exports.test() +}) ``` -For entry JS chunks, it also lists its imported chunks which can be used to render preload directives. +## Advanced + +There are some changes which only affects plugin/tool creators. -## For Plugin Authors +- [[#5868] refactor: remove deprecated api for 3.0](https://github.com/vitejs/vite/pull/5868) + - `printHttpServerUrls` is removed + - `server.app`, `server.transformWithEsbuild` are removed + - `import.meta.hot.acceptDeps` is removed +- [[#7995] chore: do not fixStacktrace](https://github.com/vitejs/vite/pull/7995) + - `ssrLoadModule`'s `fixStacktrace` option's default is now `false` +- [[#8178] feat!: migrate to ESM](https://github.com/vitejs/vite/pull/8178) + - `formatPostcssSourceMap` is now async + - `resolvePackageEntry`, `resolvePackageData` are no longer available from CJS build (dynamic import is needed to use in CJS) -Vite 2 uses a completely redesigned plugin interface which extends Rollup plugins. Please read the new [Plugin Development Guide](./api-plugin). +Also there are other breaking changes which only affect few users. -Some general pointers on migrating a v1 plugin to v2: +- [[#5018] feat: enable `generatedCode: 'es2015'` for rollup build](https://github.com/vitejs/vite/pull/5018) + - Transpile to ES5 is now necessary even if the user code only includes ES5. +- [[#7877] fix: vite client types](https://github.com/vitejs/vite/pull/7877) + - `/// ` is removed from `vite/client.d.ts`. `{ "lib": ["dom"] }` or `{ "lib": ["webworker"] }` is necessary in `tsconfig.json`. +- [[#8280] feat: non-blocking esbuild optimization at build time](https://github.com/vitejs/vite/pull/8280) + - `server.force` option was removed in favor of `force` option. -- `resolvers` -> use the [`resolveId`](https://rollupjs.org/guide/en/#resolveid) hook -- `transforms` -> use the [`transform`](https://rollupjs.org/guide/en/#transform) hook -- `indexHtmlTransforms` -> use the [`transformIndexHtml`](./api-plugin#transformindexhtml) hook -- Serving virtual files -> use [`resolveId`](https://rollupjs.org/guide/en/#resolveid) + [`load`](https://rollupjs.org/guide/en/#load) hooks -- Adding `alias`, `define` or other config options -> use the [`config`](./api-plugin#config) hook +## Migration from v1 -Since most of the logic should be done via plugin hooks instead of middlewares, the need for middlewares is greatly reduced. The internal server app is now a good old [connect](https://github.com/senchalabs/connect) instance instead of Koa. +Check the [Migration from v1 Guide](https://v2.vitejs.dev/guide/migration.html) in the Vite v2 docs first to see the needed changes to port your app to Vite v2, and then proceed with the changes on this page. diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index 7b732cb990cbf6..97ebae14372340 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -266,12 +266,17 @@ You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-do # creates a new app with a specified name $ heroku apps:create example + ``` + +6. Set buildpacks. We use `heroku/nodejs` to build the project and `heroku-buildpack-static` to serve it. - # set buildpack for static sites - $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git + ```bash + # set buildpacks + $ heroku buildpacks:set heroku/nodejs + $ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-static.git ``` -6. Deploy your site: +7. Deploy your site: ```bash # publish site diff --git a/docs/index.md b/docs/index.md index 40e6df844db31a..bdf716bc3d20a7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,10 +14,10 @@ hero: actions: - theme: brand text: Get Started - link: /guide/why + link: /guide/ - theme: alt text: Why Vite? - link: /guide/ + link: /guide/why - theme: alt text: View on GitHub link: https://github.com/vitejs/vite diff --git a/package.json b/package.json index 6fe896eccb3662..b44e7ddfa99091 100644 --- a/package.json +++ b/package.json @@ -62,21 +62,21 @@ "conventional-changelog-cli": "^2.2.2", "cross-env": "^7.0.3", "esbuild": "^0.14.38", - "eslint": "^8.16.0", - "eslint-define-config": "^1.4.1", + "eslint": "^8.17.0", + "eslint-define-config": "^1.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "esno": "^0.16.3", "execa": "^5.1.1", "fs-extra": "^10.1.0", "kill-port": "^1.6.1", - "lint-staged": "^12.4.3", + "lint-staged": "^13.0.0", "minimist": "^1.2.6", "node-fetch": "^2.6.7", "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", "playwright-chromium": "^1.22.2", - "pnpm": "^7.1.7", + "pnpm": "^7.1.9", "prettier": "2.6.2", "prompts": "^2.4.2", "rimraf": "^3.0.2", @@ -89,8 +89,8 @@ "unbuild": "^0.7.4", "vite": "workspace:*", "vitepress": "1.0.0-draft.8", - "vitest": "^0.13.0", - "vue": "^3.2.36" + "vitest": "^0.14.1", + "vue": "^3.2.37" }, "simple-git-hooks": { "pre-commit": "pnpm exec lint-staged --concurrent false", @@ -110,7 +110,7 @@ "eslint --fix" ] }, - "packageManager": "pnpm@7.1.7", + "packageManager": "pnpm@7.1.9", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index daa47a76c434bc..1f3d95c2b2f74e 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.7.2" + "preact": "^10.7.3" }, "devDependencies": { "@preact/preset-vite": "^2.2.0", diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index 438307a4c75b61..a2bcbdbd2aa6da 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.7.2" + "preact": "^10.7.3" }, "devDependencies": { "@preact/preset-vite": "^2.2.0", diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 7e91f9c6589b16..09683bac609c91 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.1.0" }, "devDependencies": { - "@types/react": "^18.0.9", + "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", "@vitejs/plugin-react": "^1.3.2", "typescript": "^4.6.4", diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index b79e9889800e06..034891165e9d92 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.1.0" }, "devDependencies": { - "@types/react": "^18.0.9", + "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", "@vitejs/plugin-react": "^1.3.2", "vite": "^2.9.9" diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index 53a4c5ea8e01a0..cae318abece338 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -10,11 +10,11 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.0-next.46", + "@sveltejs/vite-plugin-svelte": "^1.0.0-next.47", "@tsconfig/svelte": "^3.0.0", "svelte": "^3.48.0", - "svelte-check": "^2.7.1", - "svelte-preprocess": "^4.10.6", + "svelte-check": "^2.7.2", + "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", "vite": "^2.9.9" diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 5d469f55d796b9..0f7550c9ac713b 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.0-next.46", + "@sveltejs/vite-plugin-svelte": "^1.0.0-next.47", "svelte": "^3.48.0", "vite": "^2.9.9" } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index 5f352e2519aa25..ca1cdd385ef710 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -9,12 +9,12 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "^2.3.3", "typescript": "^4.6.4", "vite": "^2.9.9", - "vue-tsc": "^0.35.2" + "vue-tsc": "^0.37.0" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index c519cb36270f61..9f70700a3a6134 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "^2.3.3", diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index bf7a09e5527acd..0c77100be3b56f 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { "@babel/standalone": "^7.18.4", - "core-js": "^3.22.7", + "core-js": "^3.22.8", "magic-string": "^0.26.2", "regenerator-runtime": "^0.13.9", "systemjs": "^6.12.1" diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts index bc21d4d917d8df..4aaab1aab2412d 100644 --- a/packages/plugin-legacy/src/index.ts +++ b/packages/plugin-legacy/src/index.ts @@ -47,6 +47,8 @@ const forceDynamicImportUsage = `export function __vite_legacy_guard(){import('d const legacyEnvVarMarker = `__VITE_IS_LEGACY__` +const _require = createRequire(import.meta.url) + function viteLegacyPlugin(options: Options = {}): Plugin[] { let config: ResolvedConfig const targets = options.targets || 'defaults' @@ -61,12 +63,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { const facadeToLegacyPolyfillMap = new Map() const facadeToModernPolyfillMap = new Map() const modernPolyfills = new Set() - // System JS relies on the Promise interface. It needs to be polyfilled for IE 11. (array.iterator is mandatory for supporting Promise.all) - const DEFAULT_LEGACY_POLYFILL = [ - 'core-js/modules/es.promise', - 'core-js/modules/es.array.iterator' - ] - const legacyPolyfills = new Set(DEFAULT_LEGACY_POLYFILL) + const legacyPolyfills = new Set() if (Array.isArray(options.modernPolyfills)) { options.modernPolyfills.forEach((i) => { @@ -148,11 +145,13 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { // legacy bundle if (legacyPolyfills.size || genDynamicFallback) { - if (!legacyPolyfills.has('es.promise')) { - // check if the target needs Promise polyfill because SystemJS relies - // on it - await detectPolyfills(`Promise.resolve()`, targets, legacyPolyfills) - } + // check if the target needs Promise polyfill because SystemJS relies on it + // https://github.com/systemjs/systemjs#ie11-support + await detectPolyfills( + `Promise.resolve(); Promise.all();`, + targets, + legacyPolyfills + ) isDebug && console.log( @@ -175,7 +174,6 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { } } - const _require = createRequire(import.meta.url) const legacyPostPlugin: Plugin = { name: 'vite:legacy-post-process', enforce: 'post', @@ -328,21 +326,10 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { ], [ 'env', - { - targets, - modules: false, - bugfixes: true, - loose: false, - useBuiltIns: needPolyfills ? 'usage' : false, - corejs: needPolyfills - ? { - version: _require('core-js/package.json').version, - proposals: false - } - : undefined, - shippedProposals: true, + createBabelPresetEnvOptions(targets, { + needPolyfills, ignoreBrowserslistConfig: options.ignoreBrowserslistConfig - } + }) ] ] }) @@ -373,6 +360,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { tag: 'script', attrs: { type: 'module', + crossorigin: true, src: `${config.base}${modernPolyfillFilename}` } }) @@ -403,6 +391,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { tag: 'script', attrs: { nomodule: true, + crossorigin: true, id: legacyPolyfillId, src: `${config.base}${legacyPolyfillFilename}` }, @@ -425,6 +414,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { tag: 'script', attrs: { nomodule: true, + crossorigin: true, // we set the entry path on the element as an attribute so that the // script content will stay consistent - which allows using a constant // hash value for CSP. @@ -528,14 +518,7 @@ export async function detectPolyfills( presets: [ [ 'env', - { - targets, - modules: false, - useBuiltIns: 'usage', - corejs: { version: 3, proposals: false }, - shippedProposals: true, - ignoreBrowserslistConfig: true - } + createBabelPresetEnvOptions(targets, { ignoreBrowserslistConfig: true }) ] ] }) @@ -552,6 +535,30 @@ export async function detectPolyfills( } } +function createBabelPresetEnvOptions( + targets: any, + { + needPolyfills = true, + ignoreBrowserslistConfig + }: { needPolyfills?: boolean; ignoreBrowserslistConfig?: boolean } +) { + return { + targets, + bugfixes: true, + loose: false, + modules: false, + useBuiltIns: needPolyfills ? 'usage' : false, + corejs: needPolyfills + ? { + version: _require('core-js/package.json').version, + proposals: false + } + : undefined, + shippedProposals: true, + ignoreBrowserslistConfig + } +} + async function buildPolyfillChunk( imports: Set, bundle: OutputBundle, diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 999cda6486ad9f..d1ca5fd8f9ce46 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -46,7 +46,7 @@ "slash": "^4.0.0", "source-map": "^0.6.1", "vite": "workspace:*", - "vue": "^3.2.36" + "vue": "^3.2.37" }, "dependencies": { "@rollup/pluginutils": "^4.2.1" diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index c8bea7c58ca913..7711aee6dc3b1f 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,30 @@ +## 3.0.0-alpha.9 (2022-06-01) + +* fix: make array `acornInjectPlugins` work (fixes #8410) (#8415) ([08d594b](https://github.com/vitejs/vite/commit/08d594b)), closes [#8410](https://github.com/vitejs/vite/issues/8410) [#8415](https://github.com/vitejs/vite/issues/8415) +* fix: SSR deep imports externalization (fixes #8420) (#8421) ([89d6711](https://github.com/vitejs/vite/commit/89d6711)), closes [#8420](https://github.com/vitejs/vite/issues/8420) [#8421](https://github.com/vitejs/vite/issues/8421) +* chore: reapply #5930 (#8423) ([ab23e6e](https://github.com/vitejs/vite/commit/ab23e6e)), closes [#5930](https://github.com/vitejs/vite/issues/5930) [#8423](https://github.com/vitejs/vite/issues/8423) + + + +## 3.0.0-alpha.8 (2022-05-31) + +* feat: add ssr.format to force esm output for ssr (#6812) ([337b197](https://github.com/vitejs/vite/commit/337b197)), closes [#6812](https://github.com/vitejs/vite/issues/6812) +* feat: default esm SSR build, simplified externalization (#8348) ([f8c92d1](https://github.com/vitejs/vite/commit/f8c92d1)), closes [#8348](https://github.com/vitejs/vite/issues/8348) +* feat: derive proper js extension from package type (#8382) ([95cdd81](https://github.com/vitejs/vite/commit/95cdd81)), closes [#8382](https://github.com/vitejs/vite/issues/8382) +* feat: ssr build using optimized deps (#8403) ([6a5a5b5](https://github.com/vitejs/vite/commit/6a5a5b5)), closes [#8403](https://github.com/vitejs/vite/issues/8403) +* fix: `import.meta.accept()` -> `import.meta.hot.accept()` (#8361) ([c5185cf](https://github.com/vitejs/vite/commit/c5185cf)), closes [#8361](https://github.com/vitejs/vite/issues/8361) +* fix: return type of `handleHMRUpdate` (#8367) ([79d5ce1](https://github.com/vitejs/vite/commit/79d5ce1)), closes [#8367](https://github.com/vitejs/vite/issues/8367) +* fix: sourcemap source point to null (#8299) ([356b896](https://github.com/vitejs/vite/commit/356b896)), closes [#8299](https://github.com/vitejs/vite/issues/8299) +* fix: ssr-manifest no base (#8371) ([37eb5b3](https://github.com/vitejs/vite/commit/37eb5b3)), closes [#8371](https://github.com/vitejs/vite/issues/8371) +* fix(deps): update all non-major dependencies (#8391) ([842f995](https://github.com/vitejs/vite/commit/842f995)), closes [#8391](https://github.com/vitejs/vite/issues/8391) +* chore: enable `@typescript-eslint/explicit-module-boundary-types` (#8372) ([104caf9](https://github.com/vitejs/vite/commit/104caf9)), closes [#8372](https://github.com/vitejs/vite/issues/8372) +* chore: enable reportUnusedDisableDirectives (#8384) ([9a99bc4](https://github.com/vitejs/vite/commit/9a99bc4)), closes [#8384](https://github.com/vitejs/vite/issues/8384) +* chore: improve jsdoc of library options (#8381) ([44dc27d](https://github.com/vitejs/vite/commit/44dc27d)), closes [#8381](https://github.com/vitejs/vite/issues/8381) +* chore: improve public assets warning message (#6738) ([f6bd317](https://github.com/vitejs/vite/commit/f6bd317)), closes [#6738](https://github.com/vitejs/vite/issues/6738) +* chore: update comments (#8394) ([3d14372](https://github.com/vitejs/vite/commit/3d14372)), closes [#8394](https://github.com/vitejs/vite/issues/8394) + + + ## 3.0.0-alpha.7 (2022-05-27) * fix: preserve annotations during build deps optimization (#8358) ([334cd9f](https://github.com/vitejs/vite/commit/334cd9f)), closes [#8358](https://github.com/vitejs/vite/issues/8358) diff --git a/packages/vite/package.json b/packages/vite/package.json index 013e40dffa35ce..36b58b122fbf44 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.0.0-alpha.7", + "version": "3.0.0-alpha.9", "type": "module", "license": "MIT", "author": "Evan You", @@ -77,7 +77,7 @@ "@rollup/plugin-node-resolve": "13.3.0", "@rollup/plugin-typescript": "^8.3.2", "@rollup/pluginutils": "^4.2.1", - "@vue/compiler-dom": "^3.2.36", + "@vue/compiler-dom": "^3.2.37", "acorn": "^8.7.1", "cac": "6.7.9", "chokidar": "^3.5.3", diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index 6713f3ea8d08c1..62f14f7790fa1d 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -179,7 +179,7 @@ function createNodeConfig(isProduction: boolean) { ], plugins: createNodePlugins( isProduction, - false, + !isProduction, // in production we use api-extractor for dts generation // in development we need to rely on the rollup ts plugin isProduction ? false : path.resolve(__dirname, 'dist/node') diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index 25b752d7512df6..705465400ca5ca 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -306,7 +306,7 @@ export function resolveBuildPlugins(config: ResolvedConfig): { pre: [ ...(options.watch ? [ensureWatchPlugin()] : []), watchPackageDataPlugin(config), - ...(!isDepsOptimizerEnabled(config) || options.ssr + ...(!isDepsOptimizerEnabled(config) ? [commonjsPlugin(options.commonjsOptions)] : []), dataURIPlugin(), @@ -402,7 +402,7 @@ async function doBuild( external = await cjsSsrResolveExternal(config, userExternal) } - if (isDepsOptimizerEnabled(config) && !ssr) { + if (isDepsOptimizerEnabled(config)) { await initDepsOptimizer(config) } @@ -437,6 +437,16 @@ async function doBuild( try { const buildOutputOptions = (output: OutputOptions = {}): OutputOptions => { + // See https://github.com/vitejs/vite/issues/5812#issuecomment-984345618 + // @ts-ignore + if (output.output) { + config.logger.warn( + `You've set "rollupOptions.output.output" in your config. ` + + `This is deprecated and will override all Vite.js default output options. ` + + `Please use "rollupOptions.output" instead.` + ) + } + const cjsSsrBuild = ssr && config.ssr?.format === 'cjs' const format = output.format || (cjsSsrBuild ? 'cjs' : 'es') const jsExt = diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index d80f5a60583abc..a9e6ba33f1d0ba 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -41,6 +41,8 @@ import type { PluginContainer } from './server/pluginContainer' import { createPluginContainer } from './server/pluginContainer' import type { PackageCache } from './packages' import { loadEnv, resolveEnvPrefix } from './env' +import type { ResolvedSSROptions, SSROptions } from './ssr' +import { resolveSSROptions } from './ssr' const debug = createDebugger('vite:config') @@ -228,29 +230,6 @@ export interface ExperimentalOptions { importGlobRestoreExtension?: boolean } -export type SSRTarget = 'node' | 'webworker' - -export type SSRFormat = 'esm' | 'cjs' - -export interface SSROptions { - external?: string[] - noExternal?: string | RegExp | (string | RegExp)[] | true - /** - * Define the target for the ssr build. The browser field in package.json - * is ignored for node but used if webworker is the target - * Default: 'node' - */ - target?: SSRTarget - /** - * Define the format for the ssr build. Since Vite v3 the SSR build generates ESM by default. - * `'cjs'` can be selected to generate a CJS build, but it isn't recommended. This option is - * left marked as experimental to give users more time to update to ESM. CJS builds requires - * complex externalization heuristics that aren't present in the ESM format. - * @experimental - */ - format?: SSRFormat -} - export interface ResolveWorkerOptions { format: 'es' | 'iife' plugins: Plugin[] @@ -285,6 +264,7 @@ export type ResolvedConfig = Readonly< server: ResolvedServerOptions build: ResolvedBuildOptions preview: ResolvedPreviewOptions + ssr: ResolvedSSROptions | undefined assetsInclude: (file: string) => boolean logger: Logger createResolver: (options?: Partial) => ResolveFn @@ -491,6 +471,7 @@ export async function resolveConfig( : '' const server = resolveServerOptions(resolvedRoot, config.server, logger) + const ssr = resolveSSROptions(config.ssr) const optimizeDeps = config.optimizeDeps || {} @@ -508,6 +489,7 @@ export async function resolveConfig( cacheDir, command, mode, + ssr, isWorker: false, mainConfig: null, isProduction, diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts index ff8c0ebdf6abab..2eb69befb4ee2a 100644 --- a/packages/vite/src/node/index.ts +++ b/packages/vite/src/node/index.ts @@ -39,6 +39,12 @@ export type { DepsOptimizer, ExportsData } from './optimizer' +export type { + ResolvedSSROptions, + SSROptions, + SSRFormat, + SSRTarget +} from './ssr' export type { Plugin } from './plugin' export type { PackageCache, PackageData } from './packages' export type { diff --git a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts index 0c32af75219438..fbfb658e9f7505 100644 --- a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts +++ b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts @@ -13,6 +13,10 @@ import { import { browserExternalId } from '../plugins/resolve' import type { ExportsData } from '.' +const externalWithConversionNamespace = + 'vite:dep-pre-bundle:external-conversion' +const convertedExternalPrefix = 'vite-dep-pre-bundle-external:' + const externalTypes = [ 'css', // supported pre-processor types @@ -80,20 +84,42 @@ export function esbuildDepPlugin( name: 'vite:dep-pre-bundle', setup(build) { // externalize assets and commonly known non-js file types + // See #8459 for more details about this require-import conversion build.onResolve( { filter: new RegExp(`\\.(` + allExternalTypes.join('|') + `)(\\?.*)?$`) }, async ({ path: id, importer, kind }) => { + // if the prefix exist, it is already converted to `import`, so set `external: true` + if (id.startsWith(convertedExternalPrefix)) { + return { + path: id.slice(convertedExternalPrefix.length), + external: true + } + } + const resolved = await resolve(id, importer, kind) if (resolved) { + // here it is not set to `external: true` to convert `require` to `import` return { path: resolved, - external: true + namespace: externalWithConversionNamespace } } } ) + build.onLoad( + { filter: /./, namespace: externalWithConversionNamespace }, + (args) => { + // import itself with prefix (this is the actual part of require-import conversion) + return { + contents: + `export { default } from "${convertedExternalPrefix}${args.path}";` + + `export * from "${convertedExternalPrefix}${args.path}";`, + loader: 'js' + } + } + ) function resolveEntry(id: string) { const flatId = flattenId(id) @@ -193,15 +219,37 @@ export function esbuildDepPlugin( build.onLoad( { filter: /.*/, namespace: 'browser-external' }, - ({ path: id }) => { + ({ path }) => { return { - contents: - `export default new Proxy({}, { - get() { - throw new Error('Module "${id}" has been externalized for ` + - `browser compatibility and cannot be accessed in client code.') + // Return in CJS to intercept named imports. Use `Object.create` to + // create the Proxy in the prototype to workaround esbuild issue. Why? + // + // In short, esbuild cjs->esm flow: + // 1. Create empty object using `Object.create(Object.getPrototypeOf(module.exports))`. + // 2. Assign props of `module.exports` to the object. + // 3. Return object for ESM use. + // + // If we do `module.exports = new Proxy({}, {})`, step 1 returns empty object, + // step 2 does nothing as there's no props for `module.exports`. The final object + // is just an empty object. + // + // Creating the Proxy in the prototype satisfies step 1 immediately, which means + // the returned object is a Proxy that we can intercept. + // + // Note: Skip keys that are accessed by esbuild and browser devtools. + contents: `\ +module.exports = Object.create(new Proxy({}, { + get(_, key) { + if ( + key !== '__esModule' && + key !== '__proto__' && + key !== 'constructor' && + key !== 'splice' + ) { + throw new Error(\`Module "${path}" has been externalized for browser compatibility. Cannot access "${path}.\${key}" in client code.\`) + } } -})` +}))` } } ) diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index 4f4231354e0a6a..ea291675ccc8cf 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -610,13 +610,23 @@ export function getOptimizedDepPath( ) } +function getDepsCacheSuffix(config: ResolvedConfig): string { + let suffix = '' + if (config.command === 'build') { + suffix += '_build' + if (config.build.ssr) { + suffix += '_ssr' + } + } + return suffix +} export function getDepsCacheDir(config: ResolvedConfig): string { - const dirName = config.command === 'build' ? 'depsBuild' : 'deps' + const dirName = 'deps' + getDepsCacheSuffix(config) return normalizePath(path.resolve(config.cacheDir, dirName)) } function getProcessingDepsCacheDir(config: ResolvedConfig) { - const dirName = config.command === 'build' ? 'processingBuild' : 'processing' + const dirName = 'deps' + getDepsCacheSuffix(config) + '_temp' return normalizePath(path.resolve(config.cacheDir, dirName)) } diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index ccc068f4d0c3e8..ce068ac6104f81 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -559,8 +559,8 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { .replace(/\./g, '\\.') const emptyChunkRE = new RegExp( opts.format === 'es' || opts.format === 'system' - ? `\\bimport\\s*"[^"]*(?:${emptyChunkFiles})";\n?` - : `\\brequire\\(\\s*"[^"]*(?:${emptyChunkFiles})"\\);\n?`, + ? `\\bimport\\s*["'][^"']*(?:${emptyChunkFiles})["'];\n?` + : `\\brequire\\(\\s*["'][^"']*(?:${emptyChunkFiles})["']\\);\n?`, 'g' ) for (const file in bundle) { @@ -838,15 +838,19 @@ async function compileCSS( ...postcssOptions, to: id, from: id, - map: { - inline: false, - annotation: false, - // postcss may return virtual files - // we cannot obtain content of them, so this needs to be enabled - sourcesContent: true - // when "prev: preprocessorMap", the result map may include duplicate filename in `postcssResult.map.sources` - // prev: preprocessorMap, - } + ...(devSourcemap + ? { + map: { + inline: false, + annotation: false, + // postcss may return virtual files + // we cannot obtain content of them, so this needs to be enabled + sourcesContent: true + // when "prev: preprocessorMap", the result map may include duplicate filename in `postcssResult.map.sources` + // prev: preprocessorMap, + } + } + : {}) }) // record CSS dependencies from @imports diff --git a/packages/vite/src/node/plugins/define.ts b/packages/vite/src/node/plugins/define.ts index ca0f446cc1f58e..6edb1bd8858a11 100644 --- a/packages/vite/src/node/plugins/define.ts +++ b/packages/vite/src/node/plugins/define.ts @@ -10,15 +10,23 @@ const isNonJsRequest = (request: string): boolean => nonJsRe.test(request) export function definePlugin(config: ResolvedConfig): Plugin { const isBuild = config.command === 'build' - - const processNodeEnv: Record = { - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || config.mode), - 'global.process.env.NODE_ENV': JSON.stringify( - process.env.NODE_ENV || config.mode - ), - 'globalThis.process.env.NODE_ENV': JSON.stringify( - process.env.NODE_ENV || config.mode - ) + const isBuildLib = isBuild && config.build.lib + + // ignore replace process.env in lib build + const processEnv: Record = {} + const processNodeEnv: Record = {} + if (!isBuildLib) { + const nodeEnv = process.env.NODE_ENV || config.mode + Object.assign(processEnv, { + 'process.env.': `({}).`, + 'global.process.env.': `({}).`, + 'globalThis.process.env.': `({}).` + }) + Object.assign(processNodeEnv, { + 'process.env.NODE_ENV': JSON.stringify(nodeEnv), + 'global.process.env.NODE_ENV': JSON.stringify(nodeEnv), + 'globalThis.process.env.NODE_ENV': JSON.stringify(nodeEnv) + }) } const userDefine: Record = {} @@ -27,7 +35,8 @@ export function definePlugin(config: ResolvedConfig): Plugin { userDefine[key] = typeof val === 'string' ? val : JSON.stringify(val) } - // during dev, import.meta properties are handled by importAnalysis plugin + // during dev, import.meta properties are handled by importAnalysis plugin. + // ignore replace import.meta.env in lib build const importMetaKeys: Record = {} if (isBuild) { const env: Record = { @@ -47,22 +56,13 @@ export function definePlugin(config: ResolvedConfig): Plugin { function generatePattern( ssr: boolean ): [Record, RegExp | null] { - const processEnv: Record = {} - const isNeedProcessEnv = !ssr || config.ssr?.target === 'webworker' - - if (isNeedProcessEnv) { - Object.assign(processEnv, { - 'process.env.': `({}).`, - 'global.process.env.': `({}).`, - 'globalThis.process.env.': `({}).` - }) - } + const replaceProcessEnv = !ssr || config.ssr?.target === 'webworker' const replacements: Record = { - ...(isNeedProcessEnv ? processNodeEnv : {}), + ...(replaceProcessEnv ? processNodeEnv : {}), ...userDefine, ...importMetaKeys, - ...processEnv + ...(replaceProcessEnv ? processEnv : {}) } const replacementsKeys = Object.keys(replacements) diff --git a/packages/vite/src/node/plugins/esbuild.ts b/packages/vite/src/node/plugins/esbuild.ts index 22fabf27099c00..11f5ea4dd6cec0 100644 --- a/packages/vite/src/node/plugins/esbuild.ts +++ b/packages/vite/src/node/plugins/esbuild.ts @@ -27,9 +27,9 @@ import { searchForWorkspaceRoot } from '..' const debug = createDebugger('vite:esbuild') const INJECT_HELPERS_IIFE_RE = - /(.*)((?:const|var) [^\s]+=function\([^)]*?\){"use strict";)(.*)/ + /(.*)((?:const|var) [^\s]+=function\([^)]*?\){"use strict";)(.*)/s const INJECT_HELPERS_UMD_RE = - /(.*)(\(function\([^)]*?\){.+amd.+function\([^)]*?\){"use strict";)(.*)/ + /(.*)(\(function\([^)]*?\){.+amd.+function\([^)]*?\){"use strict";)(.*)/s let server: ViteDevServer diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index ba221b4b1d5283..0c279da0601727 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -58,6 +58,7 @@ import { delayDepsOptimizerUntil } from './optimizedDeps' import { isCSSRequest, isDirectCSSRequest } from './css' +import { browserExternalId } from './resolve' const isDebug = !!process.env.DEBUG const debug = createDebugger('vite:import-analysis') @@ -322,11 +323,9 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { s: start, e: end, ss: expStart, - se: expEnd, d: dynamicIndex, // #2083 User may use escape path, // so use imports[index].n to get the unescaped string - // @ts-ignore n: specifier } = imports[index] @@ -434,29 +433,20 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { } } else if (needsInterop) { debug(`${url} needs interop`) - if (isDynamicImport) { - // rewrite `import('package')` to expose the default directly - str().overwrite( - expStart, - expEnd, - `import('${url}').then(m => m.default && m.default.__esModule ? m.default : ({ ...m.default, default: m.default }))`, - { contentOnly: true } - ) - } else { - const exp = source.slice(expStart, expEnd) - const rewritten = transformCjsImport(exp, url, rawUrl, index) - if (rewritten) { - str().overwrite(expStart, expEnd, rewritten, { - contentOnly: true - }) - } else { - // #1439 export * from '...' - str().overwrite(start, end, url, { contentOnly: true }) - } - } + interopNamedImports(str(), imports[index], url, index) rewriteDone = true } } + // If source code imports builtin modules via named imports, the stub proxy export + // would fail as it's `export default` only. Apply interop for builtin modules to + // correctly throw the error message. + else if ( + url.includes(browserExternalId) && + source.slice(expStart, start).includes('{') + ) { + interopNamedImports(str(), imports[index], url, index) + rewriteDone = true + } if (!rewriteDone) { str().overwrite(start, end, isDynamicImport ? `'${url}'` : url, { contentOnly: true @@ -639,6 +629,41 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { } } +function interopNamedImports( + str: MagicString, + importSpecifier: ImportSpecifier, + rewrittenUrl: string, + importIndex: number +) { + const source = str.original + const { + s: start, + e: end, + ss: expStart, + se: expEnd, + d: dynamicIndex + } = importSpecifier + if (dynamicIndex > -1) { + // rewrite `import('package')` to expose the default directly + str.overwrite( + expStart, + expEnd, + `import('${rewrittenUrl}').then(m => m.default && m.default.__esModule ? m.default : ({ ...m.default, default: m.default }))`, + { contentOnly: true } + ) + } else { + const exp = source.slice(expStart, expEnd) + const rawUrl = source.slice(start, end) + const rewritten = transformCjsImport(exp, rewrittenUrl, rawUrl, importIndex) + if (rewritten) { + str.overwrite(expStart, expEnd, rewritten, { contentOnly: true }) + } else { + // #1439 export * from '...' + str.overwrite(start, end, rewrittenUrl, { contentOnly: true }) + } + } +} + type ImportNameSpecifier = { importedName: string; localName: string } /** diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index f1f940c218716a..7ccc3a7eb5cb7a 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -89,6 +89,7 @@ export interface InternalResolveOptions extends ResolveOptions { export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { const { root, + isBuild, isProduction, asSrc, ssrConfig, @@ -261,12 +262,11 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { // bare package imports, perform node resolve if (bareImportRE.test(id)) { const external = options.shouldExternalize?.(id) - if ( !external && asSrc && depsOptimizer && - !ssr && + (isBuild || !ssr) && !options.scan && (res = await tryOptimizedResolve(depsOptimizer, id, importer)) ) { @@ -339,15 +339,17 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { load(id) { if (id.startsWith(browserExternalId)) { - return isProduction - ? `export default {}` - : `export default new Proxy({}, { - get() { - throw new Error('Module "${id.slice( - browserExternalId.length + 1 - )}" has been externalized for browser compatibility and cannot be accessed in client code.') + if (isProduction) { + return `export default {}` + } else { + id = id.slice(browserExternalId.length + 1) + return `\ +export default new Proxy({}, { + get(_, key) { + throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code.\`) } })` + } } } } @@ -635,8 +637,17 @@ export function tryNodeResolve( return resolved } const resolvedExt = path.extname(resolved.id) - const resolvedId = - isDeepImport && path.extname(id) !== resolvedExt ? id + resolvedExt : id + let resolvedId = id + if (isDeepImport) { + // check ext before externalizing - only externalize + // extension-less imports and explicit .js imports + if (resolvedExt && !resolved.id.match(/(.js|.mjs|.cjs)$/)) { + return + } + if (!pkg?.data.exports && path.extname(id) !== resolvedExt) { + resolvedId += resolvedExt + } + } return { ...resolved, id: resolvedId, external: true } } @@ -668,7 +679,7 @@ export function tryNodeResolve( exclude?.includes(pkgId) || exclude?.includes(nestedPath) || SPECIAL_QUERY_RE.test(resolved) || - ssr + (!isBuild && ssr) ) { // excluded from optimization // Inject a version query to npm deps so that the browser @@ -682,7 +693,6 @@ export function tryNodeResolve( } } } else { - // TODO: depsBuild // this is a missing import, queue optimize-deps re-run and // get a resolved its optimized info const optimizedInfo = depsOptimizer.registerMissingImport(id, resolved) diff --git a/packages/vite/src/node/publicUtils.ts b/packages/vite/src/node/publicUtils.ts index e24db763814dec..31c7135965a3d8 100644 --- a/packages/vite/src/node/publicUtils.ts +++ b/packages/vite/src/node/publicUtils.ts @@ -3,6 +3,7 @@ * This file will be bundled to ESM and CJS and redirected by ../index.cjs * Please control the side-effects by checking the ./dist/node-cjs/publicUtils.cjs bundle */ +export { VERSION as version } from './constants' export { splitVendorChunkPlugin, splitVendorChunk diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 983fa05efec6e0..33565d7390d601 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -320,18 +320,7 @@ export async function createServer( }, transformIndexHtml: null!, // to be immediately set async ssrLoadModule(url, opts?: { fixStacktrace?: boolean }) { - if (!server._ssrExternals) { - let knownImports: string[] = [] - const depsOptimizer = getDepsOptimizer(config) - if (depsOptimizer) { - await depsOptimizer.scanProcessing - knownImports = [ - ...Object.keys(depsOptimizer.metadata.optimized), - ...Object.keys(depsOptimizer.metadata.discovered) - ] - } - server._ssrExternals = cjsSsrResolveExternals(config, knownImports) - } + await updateCjsSsrExternals(server) return ssrLoadModule( url, server, @@ -488,7 +477,9 @@ export async function createServer( // this applies before the transform middleware so that these files are served // as-is without transforms. if (config.publicDir) { - middlewares.use(servePublicMiddleware(config.publicDir)) + middlewares.use( + servePublicMiddleware(config.publicDir, config.server.headers) + ) } // main transform middleware @@ -755,3 +746,18 @@ async function restartServer(server: ViteDevServer) { // new server (the current server) can restart now newServer._restartPromise = null } + +async function updateCjsSsrExternals(server: ViteDevServer) { + if (!server._ssrExternals) { + let knownImports: string[] = [] + const depsOptimizer = getDepsOptimizer(server.config) + if (depsOptimizer) { + await depsOptimizer.scanProcessing + knownImports = [ + ...Object.keys(depsOptimizer.metadata.optimized), + ...Object.keys(depsOptimizer.metadata.discovered) + ] + } + server._ssrExternals = cjsSsrResolveExternals(server.config, knownImports) + } +} diff --git a/packages/vite/src/node/server/middlewares/static.ts b/packages/vite/src/node/server/middlewares/static.ts index 5d4a948885baa3..3d0f453971803e 100644 --- a/packages/vite/src/node/server/middlewares/static.ts +++ b/packages/vite/src/node/server/middlewares/static.ts @@ -1,5 +1,5 @@ import path from 'path' -import type { ServerResponse } from 'http' +import type { OutgoingHttpHeaders, ServerResponse } from 'http' import type { Options } from 'sirv' import sirv from 'sirv' import type { Connect } from 'types/connect' @@ -20,24 +20,34 @@ import { const { isMatch } = micromatch -const sirvOptions: Options = { - dev: true, - etag: true, - extensions: [], - setHeaders(res, pathname) { - // Matches js, jsx, ts, tsx. - // The reason this is done, is that the .ts file extension is reserved - // for the MIME type video/mp2t. In almost all cases, we can expect - // these files to be TypeScript files, and for Vite to serve them with - // this Content-Type. - if (/\.[tj]sx?$/.test(pathname)) { - res.setHeader('Content-Type', 'application/javascript') +const sirvOptions = (headers?: OutgoingHttpHeaders): Options => { + return { + dev: true, + etag: true, + extensions: [], + setHeaders(res, pathname) { + // Matches js, jsx, ts, tsx. + // The reason this is done, is that the .ts file extension is reserved + // for the MIME type video/mp2t. In almost all cases, we can expect + // these files to be TypeScript files, and for Vite to serve them with + // this Content-Type. + if (/\.[tj]sx?$/.test(pathname)) { + res.setHeader('Content-Type', 'application/javascript') + } + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]!) + } + } } } } -export function servePublicMiddleware(dir: string): Connect.NextHandleFunction { - const serve = sirv(dir, sirvOptions) +export function servePublicMiddleware( + dir: string, + headers?: OutgoingHttpHeaders +): Connect.NextHandleFunction { + const serve = sirv(dir, sirvOptions(headers)) // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` return function viteServePublicMiddleware(req, res, next) { @@ -53,7 +63,7 @@ export function serveStaticMiddleware( dir: string, server: ViteDevServer ): Connect.NextHandleFunction { - const serve = sirv(dir, sirvOptions) + const serve = sirv(dir, sirvOptions(server.config.server.headers)) // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` return function viteServeStaticMiddleware(req, res, next) { @@ -109,7 +119,7 @@ export function serveStaticMiddleware( export function serveRawFsMiddleware( server: ViteDevServer ): Connect.NextHandleFunction { - const serveFromRoot = sirv('/', sirvOptions) + const serveFromRoot = sirv('/', sirvOptions(server.config.server.headers)) // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` return function viteServeRawFsMiddleware(req, res, next) { diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts index 1b7e2e421960ad..ec051205eee379 100644 --- a/packages/vite/src/node/server/pluginContainer.ts +++ b/packages/vite/src/node/server/pluginContainer.ts @@ -58,6 +58,7 @@ import colors from 'picocolors' import type * as postcss from 'postcss' import type { Plugin } from '../plugin' import { + arraify, cleanUrl, combineSourcemaps, createDebugger, @@ -496,7 +497,9 @@ export async function createPluginContainer( (await plugin.options.call(minimalContext, options)) || options } if (options.acornInjectPlugins) { - parser = acorn.Parser.extend(options.acornInjectPlugins as any) + parser = acorn.Parser.extend( + ...(arraify(options.acornInjectPlugins) as any) + ) } return { acorn, diff --git a/packages/vite/src/node/ssr/index.ts b/packages/vite/src/node/ssr/index.ts new file mode 100644 index 00000000000000..84f050ff8e41d4 --- /dev/null +++ b/packages/vite/src/node/ssr/index.ts @@ -0,0 +1,39 @@ +export type SSRTarget = 'node' | 'webworker' +export type SSRFormat = 'esm' | 'cjs' + +export interface SSROptions { + external?: string[] + noExternal?: string | RegExp | (string | RegExp)[] | true + /** + * Define the target for the ssr build. The browser field in package.json + * is ignored for node but used if webworker is the target + * Default: 'node' + */ + target?: SSRTarget + /** + * Define the format for the ssr build. Since Vite v3 the SSR build generates ESM by default. + * `'cjs'` can be selected to generate a CJS build, but it isn't recommended. This option is + * left marked as experimental to give users more time to update to ESM. CJS builds requires + * complex externalization heuristics that aren't present in the ESM format. + * @experimental + */ + format?: SSRFormat +} + +export interface ResolvedSSROptions extends SSROptions { + target: SSRTarget + format: SSRFormat +} + +export function resolveSSROptions( + ssr: SSROptions | undefined +): ResolvedSSROptions | undefined { + if (ssr === undefined) { + return undefined + } + return { + format: 'esm', + target: 'node', + ...ssr + } +} diff --git a/packages/vite/src/node/ssr/ssrExternal.ts b/packages/vite/src/node/ssr/ssrExternal.ts index 512ec038a21244..fbba0e735f7df1 100644 --- a/packages/vite/src/node/ssr/ssrExternal.ts +++ b/packages/vite/src/node/ssr/ssrExternal.ts @@ -139,29 +139,19 @@ function createIsSsrExternal( isBuild: true } - const isPackageEntry = (id: string) => { + const isValidPackageEntry = (id: string) => { if (!bareImportRE.test(id) || id.includes('\0')) { return false } - if ( - tryNodeResolve( - id, - undefined, - resolveOptions, - ssr?.target === 'webworker', - undefined, - true - ) - ) { - return true - } - try { - // no main entry, but deep imports may be allowed - if (resolveFrom(`${id}/package.json`, root)) { - return true - } - } catch {} - return false + return !!tryNodeResolve( + id, + undefined, + resolveOptions, + ssr?.target === 'webworker', + undefined, + true, + true // try to externalize, will return undefined if not possible + ) } return (id: string) => { @@ -171,7 +161,7 @@ function createIsSsrExternal( const external = !id.startsWith('.') && !path.isAbsolute(id) && - (isBuiltin(id) || (isConfiguredAsExternal(id) && isPackageEntry(id))) + (isBuiltin(id) || (isConfiguredAsExternal(id) && isValidPackageEntry(id))) processedIds.set(id, external) return external } diff --git a/playground/alias/package.json b/playground/alias/package.json index c9883422d785d4..ee345bf1f9ce13 100644 --- a/playground/alias/package.json +++ b/playground/alias/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "aliased-module": "file:./dir/module", - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "resolve-linked": "workspace:*" diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index f235b613e17922..bfa9e5934c1d7a 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -11,7 +11,7 @@ "devDependencies": { "less": "^4.1.2", "magic-string": "^0.26.2", - "sass": "^1.52.1", - "stylus": "^0.58.0" + "sass": "^1.52.2", + "stylus": "^0.58.1" } } diff --git a/playground/css/package.json b/playground/css/package.json index b83dcf384ad7e6..29b1318945a93c 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -13,7 +13,7 @@ "fast-glob": "^3.2.11", "less": "^4.1.2", "postcss-nested": "^5.0.6", - "sass": "^1.52.1", - "stylus": "^0.58.0" + "sass": "^1.52.2", + "stylus": "^0.58.1" } } diff --git a/playground/extensions/package.json b/playground/extensions/package.json index 3224757b1c4e0d..380aaa142fd0c4 100644 --- a/playground/extensions/package.json +++ b/playground/extensions/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" } } diff --git a/playground/json/package.json b/playground/json/package.json index 5b7b28da0bafe2..ef60b42ff96971 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -15,6 +15,6 @@ "cross-env": "^7.0.3", "express": "^4.18.1", "json-module": "file:./json-module", - "vue": "^3.2.36" + "vue": "^3.2.37" } } diff --git a/playground/legacy/__tests__/legacy.spec.ts b/playground/legacy/__tests__/legacy.spec.ts index cbf44112b122c1..f68371b1df7438 100644 --- a/playground/legacy/__tests__/legacy.spec.ts +++ b/playground/legacy/__tests__/legacy.spec.ts @@ -104,5 +104,6 @@ describe.runIf(isBuild)('build', () => { test('includes structuredClone polyfill which is supported after core-js v3', () => { expect(findAssetFile(/polyfills-legacy/)).toMatch('"structuredClone"') + expect(findAssetFile(/polyfills\./)).toMatch('"structuredClone"') }) }) diff --git a/playground/lib/__tests__/lib.spec.ts b/playground/lib/__tests__/lib.spec.ts index 32c6edba1bdeb9..9046097f7e8375 100644 --- a/playground/lib/__tests__/lib.spec.ts +++ b/playground/lib/__tests__/lib.spec.ts @@ -1,11 +1,9 @@ -import path from 'path' -import fs from 'fs' import { isBuild, isServe, page, + readFile, serverLogs, - testDir, untilUpdated } from '~utils' @@ -16,20 +14,14 @@ describe.runIf(isBuild)('build', () => { test('umd', async () => { expect(await page.textContent('.umd')).toBe('It works') - const code = fs.readFileSync( - path.join(testDir, 'dist/my-lib-custom-filename.umd.js'), - 'utf-8' - ) + const code = readFile('dist/my-lib-custom-filename.umd.js') // esbuild helpers are injected inside of the UMD wrapper expect(code).toMatch(/^\(function\(/) }) test('iife', async () => { expect(await page.textContent('.iife')).toBe('It works') - const code = fs.readFileSync( - path.join(testDir, 'dist/my-lib-custom-filename.iife.js'), - 'utf-8' - ) + const code = readFile('dist/my-lib-custom-filename.iife.js') // esbuild helpers are injected inside of the IIFE wrapper expect(code).toMatch(/^const MyLib=function\(\){"use strict";/) }) @@ -39,10 +31,7 @@ describe.runIf(isBuild)('build', () => { () => page.textContent('.dynamic-import-message'), 'hello vite' ) - const code = fs.readFileSync( - path.join(testDir, 'dist/lib/dynamic-import-message.es.mjs'), - 'utf-8' - ) + const code = readFile('dist/lib/dynamic-import-message.es.mjs') expect(code).not.toMatch('__vitePreload') // Test that library chunks are hashed @@ -55,6 +44,15 @@ describe.runIf(isBuild)('build', () => { expect(log).not.toMatch('All "@import" rules must come first') }) }) + + test('preserve process.env', () => { + const es = readFile('dist/my-lib-custom-filename.mjs') + const iife = readFile('dist/my-lib-custom-filename.iife.js') + const umd = readFile('dist/my-lib-custom-filename.umd.js') + expect(es).toMatch('process.env.NODE_ENV') + expect(iife).toMatch('process.env.NODE_ENV') + expect(umd).toMatch('process.env.NODE_ENV') + }) }) test.runIf(isServe)('dev', async () => { diff --git a/playground/lib/index.dist.html b/playground/lib/index.dist.html index 02362a9c111e5e..99f08c73396fea 100644 --- a/playground/lib/index.dist.html +++ b/playground/lib/index.dist.html @@ -4,6 +4,15 @@
+ + + + + + + + + + diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json index 055d23bc9ce597..3a274ff63b5fdf 100644 --- a/playground/optimize-deps/package.json +++ b/playground/optimize-deps/package.json @@ -13,20 +13,23 @@ "clipboard": "^2.0.11", "dep-cjs-compiled-from-cjs": "file:./dep-cjs-compiled-from-cjs", "dep-cjs-compiled-from-esm": "file:./dep-cjs-compiled-from-esm", + "dep-cjs-with-assets": "file:./dep-cjs-with-assets", "dep-esbuild-plugin-transform": "file:./dep-esbuild-plugin-transform", "dep-linked": "link:./dep-linked", "dep-linked-include": "link:./dep-linked-include", "dep-node-env": "file:./dep-node-env", "dep-not-js": "file:./dep-not-js", + "dep-with-builtin-module-cjs": "file:./dep-with-builtin-module-cjs", + "dep-with-builtin-module-esm": "file:./dep-with-builtin-module-esm", "dep-with-dynamic-import": "file:./dep-with-dynamic-import", "lodash-es": "^4.17.21", "nested-exclude": "file:./nested-exclude", - "phoenix": "^1.6.9", + "phoenix": "^1.6.10", "react": "^17.0.2", "react-dom": "^17.0.2", "resolve-linked": "workspace:0.0.0", "url": "^0.11.0", - "vue": "^3.2.36", + "vue": "^3.2.37", "vuex": "^4.0.2" }, "devDependencies": { diff --git a/playground/optimize-deps/vite.config.js b/playground/optimize-deps/vite.config.js index fb3bbfc4a33eb5..d5da62f3331fc2 100644 --- a/playground/optimize-deps/vite.config.js +++ b/playground/optimize-deps/vite.config.js @@ -62,6 +62,19 @@ module.exports = { return { code } } } + }, + // TODO: Remove this one support for prebundling in build lands. + // It is expected that named importing in build doesn't work + // as it incurs a lot of overhead in build. + { + name: 'polyfill-named-fs-build', + apply: 'build', + enforce: 'pre', + load(id) { + if (id === '__vite-browser-external:fs') { + return `export default {}; export function readFileSync() {}` + } + } } ] } diff --git a/playground/preload/package.json b/playground/preload/package.json index 26d5dcc1f3e676..cb160b90482524 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36", + "vue": "^3.2.37", "vue-router": "^4.0.15" }, "devDependencies": { diff --git a/playground/ssr-vue/__tests__/ssr-vue.spec.ts b/playground/ssr-vue/__tests__/ssr-vue.spec.ts index a70586a5427df5..47dc436b45d72e 100644 --- a/playground/ssr-vue/__tests__/ssr-vue.spec.ts +++ b/playground/ssr-vue/__tests__/ssr-vue.spec.ts @@ -159,7 +159,10 @@ test('hydration', async () => { }) test('hmr', async () => { - await page.goto(url) + // This is test is flaky in Mac CI, but can't be reproduced locally. Wait until + // network idle to avoid the issue. TODO: This may be caused by a bug when + // modifying a file while loading, we should remove this guard + await page.goto(url, { waitUntil: 'networkidle' }) editFile('src/pages/Home.vue', (code) => code.replace('Home', 'changed')) await untilUpdated(() => page.textContent('h1'), 'changed') }) diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 28ad825ccb455b..085aa145f399ac 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "example-external-component": "file:example-external-component", - "vue": "^3.2.36", + "vue": "^3.2.37", "vue-router": "^4.0.15", "vuex": "^4.0.2" }, diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index 454ce968fbd82d..b67102570f338b 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -11,11 +11,11 @@ "dependencies": { "autoprefixer": "^10.4.7", "tailwindcss": "^2.2.19", - "vue": "^3.2.36", + "vue": "^3.2.37", "vue-router": "^4.0.15" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", - "ts-node": "^10.8.0" + "ts-node": "^10.8.1" } } diff --git a/playground/vue-jsx/package.json b/playground/vue-jsx/package.json index dd10e5506ba99b..af84606ab64eea 100644 --- a/playground/vue-jsx/package.json +++ b/playground/vue-jsx/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-lib/package.json b/playground/vue-lib/package.json index cfd37778ac9d9a..c10f1729c5a71a 100644 --- a/playground/vue-lib/package.json +++ b/playground/vue-lib/package.json @@ -8,7 +8,7 @@ "build-consumer": "vite build --config ./vite.config.consumer.ts" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-server-origin/package.json b/playground/vue-server-origin/package.json index e2b984b365e681..8d379e3ee194d1 100644 --- a/playground/vue-server-origin/package.json +++ b/playground/vue-server-origin/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-sourcemap/package.json b/playground/vue-sourcemap/package.json index b5e42d8d3f83d4..40bd2fecc788a0 100644 --- a/playground/vue-sourcemap/package.json +++ b/playground/vue-sourcemap/package.json @@ -12,9 +12,9 @@ "@vitejs/plugin-vue": "workspace:*", "less": "^4.1.2", "postcss-nested": "^5.0.6", - "sass": "^1.52.1" + "sass": "^1.52.2" }, "dependencies": { - "vue": "^3.2.36" + "vue": "^3.2.37" } } diff --git a/playground/vue/package.json b/playground/vue/package.json index 7bed9b7083bf88..a4911f76cc6e84 100644 --- a/playground/vue/package.json +++ b/playground/vue/package.json @@ -10,14 +10,14 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "vue": "^3.2.36" + "vue": "^3.2.37" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", "js-yaml": "^4.1.0", "less": "^4.1.2", "pug": "^3.0.2", - "sass": "^1.52.1", - "stylus": "^0.58.0" + "sass": "^1.52.2", + "stylus": "^0.58.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1050ffa2f05fae..08492822578d23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,21 +38,21 @@ importers: conventional-changelog-cli: ^2.2.2 cross-env: ^7.0.3 esbuild: ^0.14.38 - eslint: ^8.16.0 - eslint-define-config: ^1.4.1 + eslint: ^8.17.0 + eslint-define-config: ^1.5.0 eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 esno: ^0.16.3 execa: ^5.1.1 fs-extra: ^10.1.0 kill-port: ^1.6.1 - lint-staged: ^12.4.3 + lint-staged: ^13.0.0 minimist: ^1.2.6 node-fetch: ^2.6.7 npm-run-all: ^4.1.5 picocolors: ^1.0.0 playwright-chromium: ^1.22.2 - pnpm: ^7.1.7 + pnpm: ^7.1.9 prettier: 2.6.2 prompts: ^2.4.2 rimraf: ^3.0.2 @@ -65,8 +65,8 @@ importers: unbuild: ^0.7.4 vite: workspace:* vitepress: 1.0.0-draft.8 - vitest: ^0.13.0 - vue: ^3.2.36 + vitest: ^0.14.1 + vue: ^3.2.37 devDependencies: '@babel/types': 7.18.4 '@microsoft/api-extractor': 7.24.2 @@ -91,26 +91,26 @@ importers: '@types/semver': 7.3.9 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.27.0_wty7taswolhs3dkiohqfkuwyye - '@typescript-eslint/parser': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/eslint-plugin': 5.27.0_bmkwjfsdzl3qsmmksash2s7t5q + '@typescript-eslint/parser': 5.27.0_pm7osnb22e4oktq33hptgspr5i conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 esbuild: 0.14.38 - eslint: 8.16.0 - eslint-define-config: 1.4.1 - eslint-plugin-import: 2.26.0_xsmuhwqsfrjm7m3kqio7zoeziq - eslint-plugin-node: 11.1.0_eslint@8.16.0 + eslint: 8.17.0 + eslint-define-config: 1.5.0 + eslint-plugin-import: 2.26.0_er3f6f6cekbq4lwnvn7afiwhn4 + eslint-plugin-node: 11.1.0_eslint@8.17.0 esno: 0.16.3 execa: 5.1.1 fs-extra: 10.1.0 kill-port: 1.6.1 - lint-staged: 12.4.3 + lint-staged: 13.0.0 minimist: 1.2.6 node-fetch: 2.6.7 npm-run-all: 4.1.5 picocolors: 1.0.0 playwright-chromium: 1.22.2 - pnpm: 7.1.7 + pnpm: 7.1.9 prettier: 2.6.2 prompts: 2.4.2 rimraf: 3.0.2 @@ -123,8 +123,8 @@ importers: unbuild: 0.7.4 vite: link:packages/vite vitepress: 1.0.0-draft.8 - vitest: 0.13.0 - vue: 3.2.36 + vitest: 0.14.1 + vue: 3.2.37 packages/create-vite: specifiers: @@ -140,14 +140,14 @@ importers: specifiers: '@babel/core': ^7.18.2 '@babel/standalone': ^7.18.4 - core-js: ^3.22.7 + core-js: ^3.22.8 magic-string: ^0.26.2 regenerator-runtime: ^0.13.9 systemjs: ^6.12.1 vite: workspace:* dependencies: '@babel/standalone': 7.18.4 - core-js: 3.22.7 + core-js: 3.22.8 magic-string: 0.26.2 regenerator-runtime: 0.13.9 systemjs: 6.12.1 @@ -188,7 +188,7 @@ importers: slash: ^4.0.0 source-map: ^0.6.1 vite: workspace:* - vue: ^3.2.36 + vue: ^3.2.37 dependencies: '@rollup/pluginutils': 4.2.1 devDependencies: @@ -199,7 +199,7 @@ importers: slash: 4.0.0 source-map: 0.6.1 vite: link:../vite - vue: 3.2.36 + vue: 3.2.37 packages/plugin-vue-jsx: specifiers: @@ -231,7 +231,7 @@ importers: '@rollup/plugin-node-resolve': 13.3.0 '@rollup/plugin-typescript': ^8.3.2 '@rollup/pluginutils': ^4.2.1 - '@vue/compiler-dom': ^3.2.36 + '@vue/compiler-dom': ^3.2.37 acorn: ^8.7.1 cac: 6.7.9 chokidar: ^3.5.3 @@ -298,7 +298,7 @@ importers: '@rollup/plugin-node-resolve': 13.3.0_rollup@2.72.1 '@rollup/plugin-typescript': 8.3.2_rollup@2.72.1+tslib@2.4.0 '@rollup/pluginutils': 4.2.1 - '@vue/compiler-dom': 3.2.36 + '@vue/compiler-dom': 3.2.37 acorn: 8.7.1 cac: 6.7.9 chokidar: 3.5.3 @@ -354,10 +354,10 @@ importers: specifiers: aliased-module: file:./dir/module resolve-linked: workspace:* - vue: ^3.2.36 + vue: ^3.2.37 dependencies: aliased-module: file:playground/alias/dir/module - vue: 3.2.36 + vue: 3.2.37 devDependencies: resolve-linked: link:../resolve-linked @@ -388,15 +388,15 @@ importers: fast-glob: ^3.2.11 less: ^4.1.2 postcss-nested: ^5.0.6 - sass: ^1.52.1 - stylus: ^0.58.0 + sass: ^1.52.2 + stylus: ^0.58.1 devDependencies: css-dep: link:css-dep fast-glob: 3.2.11 less: 4.1.2 postcss-nested: 5.0.6 - sass: 1.52.1 - stylus: 0.58.0 + sass: 1.52.2 + stylus: 0.58.1 playground/css-codesplit: specifiers: {} @@ -408,13 +408,13 @@ importers: specifiers: less: ^4.1.2 magic-string: ^0.26.2 - sass: ^1.52.1 - stylus: ^0.58.0 + sass: ^1.52.2 + stylus: ^0.58.1 devDependencies: less: 4.1.2 magic-string: 0.26.2 - sass: 1.52.1 - stylus: 0.58.0 + sass: 1.52.2 + stylus: 0.58.1 playground/css/css-dep: specifiers: {} @@ -454,9 +454,9 @@ importers: playground/extensions: specifiers: - vue: ^3.2.36 + vue: ^3.2.37 dependencies: - vue: 3.2.36 + vue: 3.2.37 playground/file-delete-restore: specifiers: @@ -489,12 +489,12 @@ importers: cross-env: ^7.0.3 express: ^4.18.1 json-module: file:./json-module - vue: ^3.2.36 + vue: ^3.2.37 devDependencies: cross-env: 7.0.3 express: 4.18.1 json-module: file:playground/json/json-module - vue: 3.2.36 + vue: 3.2.37 playground/json/json-module: specifiers: {} @@ -515,10 +515,10 @@ importers: playground/multiple-entrypoints: specifiers: fast-glob: ^3.2.11 - sass: ^1.52.1 + sass: ^1.52.2 devDependencies: fast-glob: 3.2.11 - sass: 1.52.1 + sass: 1.52.2 playground/nested-deps: specifiers: @@ -576,41 +576,47 @@ importers: clipboard: ^2.0.11 dep-cjs-compiled-from-cjs: file:./dep-cjs-compiled-from-cjs dep-cjs-compiled-from-esm: file:./dep-cjs-compiled-from-esm + dep-cjs-with-assets: file:./dep-cjs-with-assets dep-esbuild-plugin-transform: file:./dep-esbuild-plugin-transform dep-linked: link:./dep-linked dep-linked-include: link:./dep-linked-include dep-node-env: file:./dep-node-env dep-not-js: file:./dep-not-js + dep-with-builtin-module-cjs: file:./dep-with-builtin-module-cjs + dep-with-builtin-module-esm: file:./dep-with-builtin-module-esm dep-with-dynamic-import: file:./dep-with-dynamic-import lodash-es: ^4.17.21 nested-exclude: file:./nested-exclude - phoenix: ^1.6.9 + phoenix: ^1.6.10 react: ^17.0.2 react-dom: ^17.0.2 resolve-linked: workspace:0.0.0 url: ^0.11.0 - vue: ^3.2.36 + vue: ^3.2.37 vuex: ^4.0.2 dependencies: axios: 0.27.2 clipboard: 2.0.11 dep-cjs-compiled-from-cjs: file:playground/optimize-deps/dep-cjs-compiled-from-cjs dep-cjs-compiled-from-esm: file:playground/optimize-deps/dep-cjs-compiled-from-esm + dep-cjs-with-assets: file:playground/optimize-deps/dep-cjs-with-assets dep-esbuild-plugin-transform: file:playground/optimize-deps/dep-esbuild-plugin-transform dep-linked: link:dep-linked dep-linked-include: link:dep-linked-include dep-node-env: file:playground/optimize-deps/dep-node-env dep-not-js: file:playground/optimize-deps/dep-not-js + dep-with-builtin-module-cjs: file:playground/optimize-deps/dep-with-builtin-module-cjs + dep-with-builtin-module-esm: file:playground/optimize-deps/dep-with-builtin-module-esm dep-with-dynamic-import: file:playground/optimize-deps/dep-with-dynamic-import lodash-es: 4.17.21 nested-exclude: file:playground/optimize-deps/nested-exclude - phoenix: 1.6.9 + phoenix: 1.6.10 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 resolve-linked: link:../resolve-linked url: 0.11.0 - vue: 3.2.36 - vuex: 4.0.2_vue@3.2.36 + vue: 3.2.37 + vuex: 4.0.2_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -620,6 +626,9 @@ importers: playground/optimize-deps/dep-cjs-compiled-from-esm: specifiers: {} + playground/optimize-deps/dep-cjs-with-assets: + specifiers: {} + playground/optimize-deps/dep-esbuild-plugin-transform: specifiers: {} @@ -641,6 +650,12 @@ importers: playground/optimize-deps/dep-not-js: specifiers: {} + playground/optimize-deps/dep-with-builtin-module-cjs: + specifiers: {} + + playground/optimize-deps/dep-with-builtin-module-esm: + specifiers: {} + playground/optimize-deps/dep-with-dynamic-import: specifiers: {} @@ -675,11 +690,11 @@ importers: specifiers: '@vitejs/plugin-vue': workspace:* terser: ^5.13.1 - vue: ^3.2.36 + vue: ^3.2.37 vue-router: ^4.0.15 dependencies: - vue: 3.2.36 - vue-router: 4.0.15_vue@3.2.36 + vue: 3.2.37 + vue-router: 4.0.15_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue terser: 5.14.0 @@ -887,14 +902,14 @@ importers: example-external-component: file:example-external-component express: ^4.18.1 serve-static: ^1.15.0 - vue: ^3.2.36 + vue: ^3.2.37 vue-router: ^4.0.15 vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component - vue: 3.2.36 - vue-router: 4.0.15_vue@3.2.36 - vuex: 4.0.2_vue@3.2.36 + vue: 3.2.37 + vue-router: 4.0.15_vue@3.2.37 + vuex: 4.0.2_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -926,17 +941,17 @@ importers: '@vitejs/plugin-vue': workspace:* autoprefixer: ^10.4.7 tailwindcss: ^2.2.19 - ts-node: ^10.8.0 - vue: ^3.2.36 + ts-node: ^10.8.1 + vue: ^3.2.37 vue-router: ^4.0.15 dependencies: autoprefixer: 10.4.7 - tailwindcss: 2.2.19_tob5czlylbhxx3vaetl5hdifjq - vue: 3.2.36 - vue-router: 4.0.15_vue@3.2.36 + tailwindcss: 2.2.19_lbvqn3ypbknass5qgyhojko2ui + vue: 3.2.37 + vue-router: 4.0.15_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue - ts-node: 10.8.0 + ts-node: 10.8.1 playground/tailwind-sourcemap: specifiers: @@ -957,27 +972,27 @@ importers: less: ^4.1.2 lodash-es: ^4.17.21 pug: ^3.0.2 - sass: ^1.52.1 - stylus: ^0.58.0 - vue: ^3.2.36 + sass: ^1.52.2 + stylus: ^0.58.1 + vue: ^3.2.37 dependencies: lodash-es: 4.17.21 - vue: 3.2.36 + vue: 3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue js-yaml: 4.1.0 less: 4.1.2 pug: 3.0.2 - sass: 1.52.1 - stylus: 0.58.0 + sass: 1.52.2 + stylus: 0.58.1 playground/vue-jsx: specifiers: '@vitejs/plugin-vue': workspace:* '@vitejs/plugin-vue-jsx': workspace:* - vue: ^3.2.36 + vue: ^3.2.37 dependencies: - vue: 3.2.36 + vue: 3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -985,18 +1000,18 @@ importers: playground/vue-lib: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.36 + vue: ^3.2.37 dependencies: - vue: 3.2.36 + vue: 3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue playground/vue-server-origin: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.36 + vue: ^3.2.37 dependencies: - vue: 3.2.36 + vue: 3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1005,15 +1020,15 @@ importers: '@vitejs/plugin-vue': workspace:* less: ^4.1.2 postcss-nested: ^5.0.6 - sass: ^1.52.1 - vue: ^3.2.36 + sass: ^1.52.2 + vue: ^3.2.37 dependencies: - vue: 3.2.36 + vue: 3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue less: 4.1.2 postcss-nested: 5.0.6 - sass: 1.52.1 + sass: 1.52.2 playground/wasm: specifiers: {} @@ -1429,7 +1444,6 @@ packages: hasBin: true dependencies: '@babel/types': 7.18.4 - dev: true /@babel/plugin-proposal-pipeline-operator/7.18.2: resolution: {integrity: sha512-EeXGb75lqRe+BRJeRRgyPJtbYykdgoCZtIXMWohhGvxnAwmrQv/x4d6WYtk6pGk+wAkqIqVb8ySUp5rJNBTDAA==} @@ -2351,7 +2365,7 @@ packages: '@types/node': 17.0.32 dev: true - /@typescript-eslint/eslint-plugin/5.27.0_wty7taswolhs3dkiohqfkuwyye: + /@typescript-eslint/eslint-plugin/5.27.0_bmkwjfsdzl3qsmmksash2s7t5q: resolution: {integrity: sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2362,12 +2376,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.27.0_pm7osnb22e4oktq33hptgspr5i '@typescript-eslint/scope-manager': 5.27.0 - '@typescript-eslint/type-utils': 5.27.0_utdtartgf6fqqgkivzeynh76la - '@typescript-eslint/utils': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/type-utils': 5.27.0_pm7osnb22e4oktq33hptgspr5i + '@typescript-eslint/utils': 5.27.0_pm7osnb22e4oktq33hptgspr5i debug: 4.3.4 - eslint: 8.16.0 + eslint: 8.17.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 @@ -2378,7 +2392,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.27.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/parser/5.27.0_pm7osnb22e4oktq33hptgspr5i: resolution: {integrity: sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2392,7 +2406,7 @@ packages: '@typescript-eslint/types': 5.27.0 '@typescript-eslint/typescript-estree': 5.27.0_typescript@4.6.4 debug: 4.3.4 - eslint: 8.16.0 + eslint: 8.17.0 typescript: 4.6.4 transitivePeerDependencies: - supports-color @@ -2406,7 +2420,7 @@ packages: '@typescript-eslint/visitor-keys': 5.27.0 dev: true - /@typescript-eslint/type-utils/5.27.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/type-utils/5.27.0_pm7osnb22e4oktq33hptgspr5i: resolution: {integrity: sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2416,9 +2430,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/utils': 5.27.0_pm7osnb22e4oktq33hptgspr5i debug: 4.3.4 - eslint: 8.16.0 + eslint: 8.17.0 tsutils: 3.21.0_typescript@4.6.4 typescript: 4.6.4 transitivePeerDependencies: @@ -2451,7 +2465,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.27.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/utils/5.27.0_pm7osnb22e4oktq33hptgspr5i: resolution: {integrity: sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2461,9 +2475,9 @@ packages: '@typescript-eslint/scope-manager': 5.27.0 '@typescript-eslint/types': 5.27.0 '@typescript-eslint/typescript-estree': 5.27.0_typescript@4.6.4 - eslint: 8.16.0 + eslint: 8.17.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint-utils: 3.0.0_eslint@8.17.0 transitivePeerDependencies: - supports-color - typescript @@ -2507,11 +2521,11 @@ packages: source-map: 0.6.1 dev: true - /@vue/compiler-core/3.2.36: - resolution: {integrity: sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==} + /@vue/compiler-core/3.2.37: + resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==} dependencies: - '@babel/parser': 7.18.0 - '@vue/shared': 3.2.36 + '@babel/parser': 7.18.4 + '@vue/shared': 3.2.37 estree-walker: 2.0.2 source-map: 0.6.1 @@ -2522,11 +2536,11 @@ packages: '@vue/shared': 3.2.33 dev: true - /@vue/compiler-dom/3.2.36: - resolution: {integrity: sha512-tcOTAOiW4s24QLnq+ON6J+GRONXJ+A/mqKCORi0LSlIh8XQlNnlm24y8xIL8la+ZDgkdbjarQ9ZqYSvEja6gVA==} + /@vue/compiler-dom/3.2.37: + resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==} dependencies: - '@vue/compiler-core': 3.2.36 - '@vue/shared': 3.2.36 + '@vue/compiler-core': 3.2.37 + '@vue/shared': 3.2.37 /@vue/compiler-sfc/3.2.33: resolution: {integrity: sha512-H8D0WqagCr295pQjUYyO8P3IejM3vEzeCO1apzByAEaAR/WimhMYczHfZVvlCE/9yBaEu/eu9RdiWr0kF8b71Q==} @@ -2543,15 +2557,15 @@ packages: source-map: 0.6.1 dev: true - /@vue/compiler-sfc/3.2.36: - resolution: {integrity: sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA==} + /@vue/compiler-sfc/3.2.37: + resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} dependencies: - '@babel/parser': 7.18.0 - '@vue/compiler-core': 3.2.36 - '@vue/compiler-dom': 3.2.36 - '@vue/compiler-ssr': 3.2.36 - '@vue/reactivity-transform': 3.2.36 - '@vue/shared': 3.2.36 + '@babel/parser': 7.18.4 + '@vue/compiler-core': 3.2.37 + '@vue/compiler-dom': 3.2.37 + '@vue/compiler-ssr': 3.2.37 + '@vue/reactivity-transform': 3.2.37 + '@vue/shared': 3.2.37 estree-walker: 2.0.2 magic-string: 0.25.9 postcss: 8.4.14 @@ -2564,11 +2578,11 @@ packages: '@vue/shared': 3.2.33 dev: true - /@vue/compiler-ssr/3.2.36: - resolution: {integrity: sha512-+KugInUFRvOxEdLkZwE+W43BqHyhBh0jpYXhmqw1xGq2dmE6J9eZ8UUSOKNhdHtQ/iNLWWeK/wPZkVLUf3YGaw==} + /@vue/compiler-ssr/3.2.37: + resolution: {integrity: sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==} dependencies: - '@vue/compiler-dom': 3.2.36 - '@vue/shared': 3.2.36 + '@vue/compiler-dom': 3.2.37 + '@vue/shared': 3.2.37 /@vue/devtools-api/6.1.4: resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==} @@ -2584,12 +2598,12 @@ packages: magic-string: 0.25.9 dev: true - /@vue/reactivity-transform/3.2.36: - resolution: {integrity: sha512-Jk5o2BhpODC9XTA7o4EL8hSJ4JyrFWErLtClG3NH8wDS7ri9jBDWxI7/549T7JY9uilKsaNM+4pJASLj5dtRwA==} + /@vue/reactivity-transform/3.2.37: + resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} dependencies: - '@babel/parser': 7.18.0 - '@vue/compiler-core': 3.2.36 - '@vue/shared': 3.2.36 + '@babel/parser': 7.18.4 + '@vue/compiler-core': 3.2.37 + '@vue/shared': 3.2.37 estree-walker: 2.0.2 magic-string: 0.25.9 @@ -2599,10 +2613,10 @@ packages: '@vue/shared': 3.2.33 dev: true - /@vue/reactivity/3.2.36: - resolution: {integrity: sha512-c2qvopo0crh9A4GXi2/2kfGYMxsJW4tVILrqRPydVGZHhq0fnzy6qmclWOhBFckEhmyxmpHpdJtIRYGeKcuhnA==} + /@vue/reactivity/3.2.37: + resolution: {integrity: sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==} dependencies: - '@vue/shared': 3.2.36 + '@vue/shared': 3.2.37 /@vue/runtime-core/3.2.33: resolution: {integrity: sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==} @@ -2611,11 +2625,11 @@ packages: '@vue/shared': 3.2.33 dev: true - /@vue/runtime-core/3.2.36: - resolution: {integrity: sha512-PTWBD+Lub+1U3/KhbCExrfxyS14hstLX+cBboxVHaz+kXoiDLNDEYAovPtxeTutbqtClIXtft+wcGdC+FUQ9qQ==} + /@vue/runtime-core/3.2.37: + resolution: {integrity: sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==} dependencies: - '@vue/reactivity': 3.2.36 - '@vue/shared': 3.2.36 + '@vue/reactivity': 3.2.37 + '@vue/shared': 3.2.37 /@vue/runtime-dom/3.2.33: resolution: {integrity: sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==} @@ -2625,11 +2639,11 @@ packages: csstype: 2.6.20 dev: true - /@vue/runtime-dom/3.2.36: - resolution: {integrity: sha512-gYPYblm7QXHVuBohqNRRT7Wez0f2Mx2D40rb4fleehrJU9CnkjG0phhcGEZFfGwCmHZRqBCRgbFWE98bPULqkg==} + /@vue/runtime-dom/3.2.37: + resolution: {integrity: sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==} dependencies: - '@vue/runtime-core': 3.2.36 - '@vue/shared': 3.2.36 + '@vue/runtime-core': 3.2.37 + '@vue/shared': 3.2.37 csstype: 2.6.20 /@vue/server-renderer/3.2.33_vue@3.2.33: @@ -2642,21 +2656,21 @@ packages: vue: 3.2.33 dev: true - /@vue/server-renderer/3.2.36_vue@3.2.36: - resolution: {integrity: sha512-uZE0+jfye6yYXWvAQYeHZv+f50sRryvy16uiqzk3jn8hEY8zTjI+rzlmZSGoE915k+W/Ol9XSw6vxOUD8dGkUg==} + /@vue/server-renderer/3.2.37_vue@3.2.37: + resolution: {integrity: sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==} peerDependencies: - vue: 3.2.36 + vue: 3.2.37 dependencies: - '@vue/compiler-ssr': 3.2.36 - '@vue/shared': 3.2.36 - vue: 3.2.36 + '@vue/compiler-ssr': 3.2.37 + '@vue/shared': 3.2.37 + vue: 3.2.37 /@vue/shared/3.2.33: resolution: {integrity: sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==} dev: true - /@vue/shared/3.2.36: - resolution: {integrity: sha512-JtB41wXl7Au3+Nl3gD16Cfpj7k/6aCroZ6BbOiCMFCMvrOpkg/qQUXTso2XowaNqBbnkuGHurLAqkLBxNGc1hQ==} + /@vue/shared/3.2.37: + resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} /@vueuse/core/8.5.0_vue@3.2.33: resolution: {integrity: sha512-VEJ6sGNsPlUp0o9BGda2YISvDZbhWJSOJu5zlp2TufRGVrLcYUKr31jyFEOj6RXzG3k/H4aCYeZyjpItfU8glw==} @@ -3611,8 +3625,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.22.7: - resolution: {integrity: sha512-Jt8SReuDKVNZnZEzyEQT5eK6T2RRCXkfTq7Lo09kpm+fHjgGewSbNjV+Wt4yZMhPDdzz2x1ulI5z/w4nxpBseg==} + /core-js/3.22.8: + resolution: {integrity: sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA==} requiresBuild: true dev: false @@ -3767,19 +3781,6 @@ packages: dependencies: ms: 2.1.2 - /debug/4.3.4_supports-color@9.2.2: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 9.2.2 - dev: true - /decamelize-keys/1.1.0: resolution: {integrity: sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=} engines: {node: '>=0.10.0'} @@ -4429,8 +4430,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-define-config/1.4.1: - resolution: {integrity: sha512-3kjqLpYgAjr8XtI0ufInSX7cIWe1rDbiG1AjyOHY+00BgWhce8LZ/xd2BMKpgSsDI6bqd59eMmRcxOZSLme+Mg==} + /eslint-define-config/1.5.0: + resolution: {integrity: sha512-2C6tmeMRAXQ+y5vxbXsOjn/CTmMseJ0eRXsK+ThFEjeibSpMmurPq2SjBGzl5Ha4pTpVSMJQc0lzE8Y3hPYbHQ==} engines: {node: '>= 14.6.0', npm: '>= 6.0.0', pnpm: '>= 7.0.0'} dev: true @@ -4461,7 +4462,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.27.0_pm7osnb22e4oktq33hptgspr5i debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -4469,18 +4470,18 @@ packages: - supports-color dev: true - /eslint-plugin-es/3.0.1_eslint@8.16.0: + /eslint-plugin-es/3.0.1_eslint@8.17.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.16.0 + eslint: 8.17.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_xsmuhwqsfrjm7m3kqio7zoeziq: + /eslint-plugin-import/2.26.0_er3f6f6cekbq4lwnvn7afiwhn4: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4490,12 +4491,12 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.27.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.27.0_pm7osnb22e4oktq33hptgspr5i array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.16.0 + eslint: 8.17.0 eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.3_nd4nb6nccnlbwilvit6hlaep3q has: 1.0.3 @@ -4511,14 +4512,14 @@ packages: - supports-color dev: true - /eslint-plugin-node/11.1.0_eslint@8.16.0: + /eslint-plugin-node/11.1.0_eslint@8.17.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.16.0 - eslint-plugin-es: 3.0.1_eslint@8.16.0 + eslint: 8.17.0 + eslint-plugin-es: 3.0.1_eslint@8.17.0 eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.1.2 @@ -4549,13 +4550,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.16.0: + /eslint-utils/3.0.0_eslint@8.17.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.16.0 + eslint: 8.17.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4574,8 +4575,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.16.0: - resolution: {integrity: sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==} + /eslint/8.17.0: + resolution: {integrity: sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -4588,7 +4589,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint-utils: 3.0.0_eslint@8.17.0 eslint-visitor-keys: 3.3.0 espree: 9.3.2 esquery: 1.4.0 @@ -4699,6 +4700,21 @@ packages: strip-final-newline: 2.0.0 dev: true + /execa/6.1.0: + resolution: {integrity: sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 3.0.1 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.1.0 + onetime: 6.0.0 + signal-exit: 3.0.7 + strip-final-newline: 3.0.0 + dev: true + /express/4.18.1: resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} engines: {node: '>= 0.10.0'} @@ -4763,7 +4779,7 @@ packages: dev: true /fast-levenshtein/2.0.6: - resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=} + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true /fastq/1.13.0: @@ -4931,7 +4947,7 @@ packages: dev: true /functional-red-black-tree/1.0.1: - resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=} + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} dev: true /functions-have-names/1.2.3: @@ -5258,6 +5274,11 @@ packages: engines: {node: '>=10.17.0'} dev: true + /human-signals/3.0.1: + resolution: {integrity: sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==} + engines: {node: '>=12.20.0'} + dev: true + /iconv-lite/0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -5308,7 +5329,7 @@ packages: dev: true /imurmurhash/0.1.4: - resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} dev: true @@ -5516,6 +5537,11 @@ packages: engines: {node: '>=8'} dev: true + /is-stream/3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /is-string/1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -5611,7 +5637,7 @@ packages: dev: true /json-stable-stringify-without-jsonify/1.0.1: - resolution: {integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=} + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true /json-stringify-safe/5.0.1: @@ -5733,16 +5759,16 @@ packages: /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /lint-staged/12.4.3: - resolution: {integrity: sha512-eH6SKOmdm/ZwCRMTZAmM3q3dPkpq6vco/BfrOw8iGun4Xs/thYegPD/MLIwKO+iPkzibkLJuQcRhRLXKvaKreg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + /lint-staged/13.0.0: + resolution: {integrity: sha512-vWban5utFt78VZohbosUxNIa46KKJ+KOQTDWTQ8oSl1DLEEVl9zhUtaQbiiydAmx+h2wKJK2d0+iMaRmknuWRQ==} + engines: {node: ^14.13.1 || >=16.0.0} hasBin: true dependencies: cli-truncate: 3.1.0 colorette: 2.0.16 commander: 9.3.0 - debug: 4.3.4_supports-color@9.2.2 - execa: 5.1.1 + debug: 4.3.4 + execa: 6.1.0 lilconfig: 2.0.5 listr2: 4.0.5 micromatch: 4.0.5 @@ -5750,10 +5776,10 @@ packages: object-inspect: 1.12.2 pidtree: 0.5.0 string-argv: 0.3.1 - supports-color: 9.2.2 - yaml: 1.10.2 + yaml: 2.1.1 transitivePeerDependencies: - enquirer + - supports-color dev: true /listr2/4.0.5: @@ -6014,6 +6040,11 @@ packages: engines: {node: '>=6'} dev: true + /mimic-fn/4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /min-indent/1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -6182,7 +6213,7 @@ packages: hasBin: true /natural-compare/1.4.0: - resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true /needle/2.9.1: @@ -6322,6 +6353,13 @@ packages: path-key: 3.1.1 dev: true + /npm-run-path/5.1.0: + resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + /npmlog/5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} dependencies: @@ -6413,6 +6451,13 @@ packages: mimic-fn: 2.1.0 dev: true + /onetime/6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + /open/8.4.0: resolution: {integrity: sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==} engines: {node: '>=12'} @@ -6551,6 +6596,11 @@ packages: engines: {node: '>=8'} dev: true + /path-key/4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -6590,8 +6640,8 @@ packages: is-reference: 1.2.1 dev: true - /phoenix/1.6.9: - resolution: {integrity: sha512-YZ5mXU2cHd/VUuPSv5AELv/bT+0uJ94PQjiuDS7jVNBU8n75WzrpWzQ5OJ5qSuMVCqOtZK0GJd6WlFVUSmTKAQ==} + /phoenix/1.6.10: + resolution: {integrity: sha512-KfYAJrrw95JGaOlvmZ+lFJZhSfQmo4SVOj6s175/V8YxqhYGO5EGacdrJxQmJ6uhaK4H3S6b0wkC1T33qU/d8Q==} dev: false /picocolors/1.0.0: @@ -6652,8 +6702,8 @@ packages: hasBin: true dev: true - /pnpm/7.1.7: - resolution: {integrity: sha512-8+IAfyunrOHfNmVu03E9rSBVUgypFGMKeyhVif0Drv/gcWgXuzxSBkCxrfNJbEf0cHtA+ftTqMQ20uSlrtnSEg==} + /pnpm/7.1.9: + resolution: {integrity: sha512-YWA+iqayHb0MndHTyqvVPKQVYVCOoBYlQNLP3hAf2DT/Iw2EHVcP18yCT+xnsPNvkC4VYfQepE6AZvySQue1TA==} engines: {node: '>=14.19'} hasBin: true dev: true @@ -6738,7 +6788,7 @@ packages: yaml: 1.10.2 dev: true - /postcss-load-config/3.1.4_ts-node@10.8.0: + /postcss-load-config/3.1.4_ts-node@10.8.1: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -6751,7 +6801,7 @@ packages: optional: true dependencies: lilconfig: 2.0.5 - ts-node: 10.8.0 + ts-node: 10.8.1 yaml: 1.10.2 dev: false @@ -7440,8 +7490,8 @@ packages: truncate-utf8-bytes: 1.0.2 dev: true - /sass/1.52.1: - resolution: {integrity: sha512-fSzYTbr7z8oQnVJ3Acp9hV80dM1fkMN7mSD/25mpcct9F7FPBMOI8krEYALgU1aZoqGhQNhTPsuSmxjnIvAm4Q==} + /sass/1.52.2: + resolution: {integrity: sha512-mfHB2VSeFS7sZlPv9YohB9GB7yWIgQNTGniQwfQ04EoQN0wsQEv7SwpCwy/x48Af+Z3vDeFXz+iuXM3HK/phZQ==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -7855,6 +7905,11 @@ packages: engines: {node: '>=6'} dev: true + /strip-final-newline/3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -7876,8 +7931,8 @@ packages: /stylis/4.0.13: resolution: {integrity: sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==} - /stylus/0.58.0: - resolution: {integrity: sha512-q27Pof0PINInv/gTO1AH+6C1VkoedEOPp38CB/DFWdSgu4fBCwnxM8cZEm4M1zU+Jr6rmZ75hkmqk2QyDze10g==} + /stylus/0.58.1: + resolution: {integrity: sha512-AYiCHm5ogczdCPMfe9aeQa4NklB2gcf4D/IhzYPddJjTgPc+k4D/EVE0yfQbZD43MHP3lPy+8NZ9fcFxkrgs/w==} hasBin: true dependencies: css: 3.0.0 @@ -7901,11 +7956,6 @@ packages: dependencies: has-flag: 4.0.0 - /supports-color/9.2.2: - resolution: {integrity: sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==} - engines: {node: '>=12'} - dev: true - /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -7962,7 +8012,7 @@ packages: - ts-node dev: false - /tailwindcss/2.2.19_tob5czlylbhxx3vaetl5hdifjq: + /tailwindcss/2.2.19_lbvqn3ypbknass5qgyhojko2ui: resolution: {integrity: sha512-6Ui7JSVtXadtTUo2NtkBBacobzWiQYVjYW0ZnKaP9S1ZCKQ0w7KVNz+YSDI/j7O7KCMHbOkz94ZMQhbT9pOqjw==} engines: {node: '>=12.13.0'} hasBin: true @@ -7993,7 +8043,7 @@ packages: normalize-path: 3.0.0 object-hash: 2.2.0 postcss-js: 3.0.3 - postcss-load-config: 3.1.4_ts-node@10.8.0 + postcss-load-config: 3.1.4_ts-node@10.8.1 postcss-nested: 5.0.6 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 @@ -8177,8 +8227,8 @@ packages: utf8-byte-length: 1.0.4 dev: true - /ts-node/10.8.0: - resolution: {integrity: sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==} + /ts-node/10.8.1: + resolution: {integrity: sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -8492,8 +8542,8 @@ packages: - react-dom dev: true - /vitest/0.13.0: - resolution: {integrity: sha512-vuYt3+G25MMnANgyMHHG3VK86C9K/VFi/8uH5myQ2v660W4WArv99ElakPlVFxxSXXM1jqQPiPj2ht35Bod9LQ==} + /vitest/0.14.1: + resolution: {integrity: sha512-2UUm6jYgkwh7Y3VKSRR8OuaNCm+iA5LPDnal7jyITN39maZK9L+JVxqjtQ39PSFo5Fl3/BgaJvER6GGHX9JLxg==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -8551,13 +8601,13 @@ packages: vue: 3.2.33 dev: true - /vue-router/4.0.15_vue@3.2.36: + /vue-router/4.0.15_vue@3.2.37: resolution: {integrity: sha512-xa+pIN9ZqORdIW1MkN2+d9Ui2pCM1b/UMgwYUCZOiFYHAvz/slKKBDha8DLrh5aCG/RibtrpyhKjKOZ85tYyWg==} peerDependencies: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.1.4 - vue: 3.2.36 + vue: 3.2.37 dev: false /vue/3.2.33: @@ -8570,22 +8620,22 @@ packages: '@vue/shared': 3.2.33 dev: true - /vue/3.2.36: - resolution: {integrity: sha512-5yTXmrE6gW8IQgttzHW5bfBiFA6mx35ZXHjGLDmKYzW6MMmYvCwuKybANRepwkMYeXw2v1buGg3/lPICY5YlZw==} + /vue/3.2.37: + resolution: {integrity: sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==} dependencies: - '@vue/compiler-dom': 3.2.36 - '@vue/compiler-sfc': 3.2.36 - '@vue/runtime-dom': 3.2.36 - '@vue/server-renderer': 3.2.36_vue@3.2.36 - '@vue/shared': 3.2.36 + '@vue/compiler-dom': 3.2.37 + '@vue/compiler-sfc': 3.2.37 + '@vue/runtime-dom': 3.2.37 + '@vue/server-renderer': 3.2.37_vue@3.2.37 + '@vue/shared': 3.2.37 - /vuex/4.0.2_vue@3.2.36: + /vuex/4.0.2_vue@3.2.37: resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==} peerDependencies: vue: ^3.0.2 dependencies: '@vue/devtools-api': 6.1.4 - vue: 3.2.36 + vue: 3.2.37 dev: false /web-streams-polyfill/3.2.1: @@ -8739,6 +8789,11 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} + /yaml/2.1.1: + resolution: {integrity: sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==} + engines: {node: '>= 14'} + dev: true + /yargs-parser/20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -8812,6 +8867,12 @@ packages: version: 0.0.0 dev: false + file:playground/optimize-deps/dep-cjs-with-assets: + resolution: {directory: playground/optimize-deps/dep-cjs-with-assets, type: directory} + name: dep-cjs-with-assets + version: 0.0.0 + dev: false + file:playground/optimize-deps/dep-esbuild-plugin-transform: resolution: {directory: playground/optimize-deps/dep-esbuild-plugin-transform, type: directory} name: dep-esbuild-plugin-transform @@ -8830,6 +8891,18 @@ packages: version: 1.0.0 dev: false + file:playground/optimize-deps/dep-with-builtin-module-cjs: + resolution: {directory: playground/optimize-deps/dep-with-builtin-module-cjs, type: directory} + name: dep-with-builtin-module-cjs + version: 0.0.0 + dev: false + + file:playground/optimize-deps/dep-with-builtin-module-esm: + resolution: {directory: playground/optimize-deps/dep-with-builtin-module-esm, type: directory} + name: dep-with-builtin-module-esm + version: 0.0.0 + dev: false + file:playground/optimize-deps/dep-with-dynamic-import: resolution: {directory: playground/optimize-deps/dep-with-dynamic-import, type: directory} name: dep-with-dynamic-import