diff --git a/package.json b/package.json index 5ac4496016..10e4e6e06e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "nuxt": "workspace:*", "nuxt3": "workspace:nuxt@*", "unbuild": "^1.1.2", - "vite": "^4.1.1", + "vite": "^4.1.2", "vue": "3.2.47", "magic-string": "^0.29.0" }, @@ -52,7 +52,7 @@ "@types/node": "^18.13.0", "@types/rimraf": "^3", "@types/semver": "^7.3.13", - "@unocss/reset": "^0.49.5", + "@unocss/reset": "^0.49.6", "case-police": "^0.5.11", "changelogen": "^0.4.1", "crawler": "^1.4.0", @@ -73,7 +73,7 @@ "typescript": "^4.9.5", "ufo": "^1.1.0", "unbuild": "^1.1.2", - "vite": "^4.1.1", + "vite": "^4.1.2", "vitest": "^0.28.5", "vue-tsc": "^1.1.2" }, diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 424432219b..30187167d5 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -181,6 +181,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { nitroConfig.rollupConfig!.plugins = await nitroConfig.rollupConfig!.plugins || [] nitroConfig.rollupConfig!.plugins = Array.isArray(nitroConfig.rollupConfig!.plugins) ? nitroConfig.rollupConfig!.plugins : [nitroConfig.rollupConfig!.plugins] nitroConfig.rollupConfig!.plugins!.push( + // @ts-expect-error remove when rollup updates its types ImportProtectionPlugin.rollup({ rootDir: nuxt.options.rootDir, patterns: [ diff --git a/packages/schema/package.json b/packages/schema/package.json index 779a77bfac..38e5fb5a12 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -21,7 +21,7 @@ "@vitejs/plugin-vue-jsx": "^3.0.0", "nitropack": "^2.2.2", "unbuild": "latest", - "vite": "~4.1.1" + "vite": "~4.1.2" }, "dependencies": { "c12": "^1.1.2", diff --git a/packages/vite/package.json b/packages/vite/package.json index b64f5d0875..7673c81049 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -44,12 +44,12 @@ "postcss": "^8.4.21", "postcss-import": "^15.1.0", "postcss-url": "^10.1.3", - "rollup": "^3.15.0", + "rollup": "^3.16.0", "rollup-plugin-visualizer": "^5.9.0", "strip-literal": "^1.0.1", "ufo": "^1.1.0", "unplugin": "^1.1.0", - "vite": "~4.1.1", + "vite": "~4.1.2", "vite-node": "^0.28.5", "vite-plugin-checker": "^0.5.5", "vue-bundle-renderer": "^1.0.2" diff --git a/packages/vite/src/plugins/chunk-error.ts b/packages/vite/src/plugins/chunk-error.ts index 3ed32bc850..a42f19c41d 100644 --- a/packages/vite/src/plugins/chunk-error.ts +++ b/packages/vite/src/plugins/chunk-error.ts @@ -1,7 +1,6 @@ import MagicString from 'magic-string' import type { Plugin } from 'vite' -import type { SourceMap } from 'rollup' export function chunkErrorPlugin (options: { sourcemap?: boolean }): Plugin { return { @@ -22,7 +21,7 @@ export const __vitePreload = (...args) => ___vitePreload(...args).catch(err => { return { code: s.toString(), map: options.sourcemap - ? s.generateMap({ source: id, includeContent: true }) as SourceMap + ? s.generateMap({ source: id, includeContent: true }) : undefined } } diff --git a/packages/vite/src/plugins/paths.ts b/packages/vite/src/plugins/paths.ts index 0c86e8f4ea..a86667d5c1 100644 --- a/packages/vite/src/plugins/paths.ts +++ b/packages/vite/src/plugins/paths.ts @@ -2,7 +2,6 @@ import { pathToFileURL } from 'node:url' import MagicString from 'magic-string' import { parseQuery, parseURL } from 'ufo' import type { Plugin } from 'vite' -import type { SourceMap } from 'rollup' export interface RuntimePathsOptions { sourcemap?: boolean @@ -35,7 +34,7 @@ export function runtimePathsPlugin (options: RuntimePathsOptions): Plugin { return { code: s.toString(), map: options.sourcemap - ? s.generateMap({ source: id, includeContent: true }) as SourceMap + ? s.generateMap({ source: id, includeContent: true }) : undefined } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1cf7eb460..9c1c137abb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ overrides: nuxt: workspace:* nuxt3: workspace:nuxt@* unbuild: ^1.1.2 - vite: ^4.1.1 + vite: ^4.1.2 vue: 3.2.47 magic-string: ^0.29.0 @@ -29,7 +29,7 @@ importers: '@types/node': ^18.13.0 '@types/rimraf': ^3 '@types/semver': ^7.3.13 - '@unocss/reset': ^0.49.5 + '@unocss/reset': ^0.49.6 case-police: ^0.5.11 changelogen: ^0.4.1 crawler: ^1.4.0 @@ -50,7 +50,7 @@ importers: typescript: ^4.9.5 ufo: ^1.1.0 unbuild: ^1.1.2 - vite: ^4.1.1 + vite: ^4.1.2 vitest: ^0.28.5 vue-tsc: ^1.1.2 devDependencies: @@ -86,7 +86,7 @@ importers: typescript: 4.9.5 ufo: 1.1.0 unbuild: 1.1.2 - vite: 4.1.1_@types+node@18.13.0 + vite: 4.1.2_@types+node@18.13.0 vitest: 0.28.5 vue-tsc: 1.1.2_typescript@4.9.5 @@ -529,7 +529,7 @@ importers: unbuild: ^1.1.2 unimport: ^2.2.4 untyped: ^1.2.2 - vite: ^4.1.1 + vite: ^4.1.2 dependencies: c12: 1.1.2 create-require: 1.1.1 @@ -548,11 +548,11 @@ importers: '@types/lodash.template': 4.5.1 '@types/semver': 7.3.13 '@unhead/schema': 1.0.22 - '@vitejs/plugin-vue': 4.0.0_vite@4.1.1 - '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.1 + '@vitejs/plugin-vue': 4.0.0_vite@4.1.2 + '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.2 nitropack: 2.2.2 unbuild: 1.1.2 - vite: 4.1.1 + vite: 4.1.2 packages/test-utils: specifiers: @@ -612,22 +612,22 @@ importers: postcss: ^8.4.21 postcss-import: ^15.1.0 postcss-url: ^10.1.3 - rollup: ^3.15.0 + rollup: ^3.16.0 rollup-plugin-visualizer: ^5.9.0 strip-literal: ^1.0.1 ufo: ^1.1.0 unbuild: ^1.1.2 unplugin: ^1.1.0 - vite: ^4.1.1 + vite: ^4.1.2 vite-node: ^0.28.5 vite-plugin-checker: ^0.5.5 vue: 3.2.47 vue-bundle-renderer: ^1.0.2 dependencies: '@nuxt/kit': link:../kit - '@rollup/plugin-replace': 5.0.2_rollup@3.15.0 - '@vitejs/plugin-vue': 4.0.0_vite@4.1.1+vue@3.2.47 - '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.1+vue@3.2.47 + '@rollup/plugin-replace': 5.0.2_rollup@3.16.0 + '@vitejs/plugin-vue': 4.0.0_vite@4.1.2+vue@3.2.47 + '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.2+vue@3.2.47 autoprefixer: 10.4.13_postcss@8.4.21 chokidar: 3.5.3 cssnano: 5.1.15_postcss@8.4.21 @@ -649,14 +649,14 @@ importers: postcss: 8.4.21 postcss-import: 15.1.0_postcss@8.4.21 postcss-url: 10.1.3_postcss@8.4.21 - rollup: 3.15.0 - rollup-plugin-visualizer: 5.9.0_rollup@3.15.0 + rollup: 3.16.0 + rollup-plugin-visualizer: 5.9.0_rollup@3.16.0 strip-literal: 1.0.1 ufo: 1.1.0 unplugin: 1.1.0 - vite: 4.1.1 + vite: 4.1.2 vite-node: 0.28.5 - vite-plugin-checker: 0.5.5_vite@4.1.1 + vite-plugin-checker: 0.5.5_vite@4.1.2 vue-bundle-renderer: 1.0.2 devDependencies: '@nuxt/schema': link:../schema @@ -1846,6 +1846,20 @@ packages: magic-string: 0.29.0 rollup: 3.15.0 + /@rollup/plugin-replace/5.0.2_rollup@3.16.0: + resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@3.16.0 + magic-string: 0.29.0 + rollup: 3.16.0 + dev: false + /@rollup/plugin-terser/0.4.0_rollup@3.15.0: resolution: {integrity: sha512-Ipcf3LPNerey1q9ZMjiaWHlNPEHNU/B5/uh9zXLltfEQ1lVSLLeZSgAtTPWGyw8Ip1guOeq+mDtdOlEj/wNxQw==} engines: {node: '>=14.0.0'} @@ -1905,6 +1919,21 @@ packages: picomatch: 2.3.1 rollup: 3.15.0 + /@rollup/pluginutils/5.0.2_rollup@3.16.0: + resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.16.0 + dev: false + /@sinclair/typebox/0.25.23: resolution: {integrity: sha512-VEB8ygeP42CFLWyAJhN5OklpxUliqdNEUcXb4xZ/CINqtYGTjL5ukluKdKzQ0iWdUxyQ7B0539PAUhHKrCNWSQ==} dev: false @@ -2553,7 +2582,7 @@ packages: - encoding - supports-color - /@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.1: + /@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.2: resolution: {integrity: sha512-vurkuzgac5SYuxd2HUZqAFAWGTF10diKBwJNbCvnWijNZfXd+7jMtqjPFbGt7idOJUn584fP1Ar9j/GN2jQ3Ew==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2563,12 +2592,12 @@ packages: '@babel/core': 7.20.12 '@babel/plugin-transform-typescript': 7.20.13_@babel+core@7.20.12 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.12 - vite: 4.1.1 + vite: 4.1.2 transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.1+vue@3.2.47: + /@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.2+vue@3.2.47: resolution: {integrity: sha512-vurkuzgac5SYuxd2HUZqAFAWGTF10diKBwJNbCvnWijNZfXd+7jMtqjPFbGt7idOJUn584fP1Ar9j/GN2jQ3Ew==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2578,30 +2607,30 @@ packages: '@babel/core': 7.20.12 '@babel/plugin-transform-typescript': 7.20.13_@babel+core@7.20.12 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.12 - vite: 4.1.1 + vite: 4.1.2 vue: 3.2.47 transitivePeerDependencies: - supports-color dev: false - /@vitejs/plugin-vue/4.0.0_vite@4.1.1: + /@vitejs/plugin-vue/4.0.0_vite@4.1.2: resolution: {integrity: sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.1.1 + vite: 4.1.2 dev: true - /@vitejs/plugin-vue/4.0.0_vite@4.1.1+vue@3.2.47: + /@vitejs/plugin-vue/4.0.0_vite@4.1.2+vue@3.2.47: resolution: {integrity: sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.1.1 + vite: 4.1.2 vue: 3.2.47 dev: false @@ -7381,6 +7410,23 @@ packages: source-map: 0.7.4 yargs: 17.7.0 + /rollup-plugin-visualizer/5.9.0_rollup@3.16.0: + resolution: {integrity: sha512-bbDOv47+Bw4C/cgs0czZqfm8L82xOZssk4ayZjG40y9zbXclNk7YikrZTDao6p7+HDiGxrN0b65SgZiVm9k1Cg==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + rollup: 2.x || 3.x + peerDependenciesMeta: + rollup: + optional: true + dependencies: + open: 8.4.1 + picomatch: 2.3.1 + rollup: 3.16.0 + source-map: 0.7.4 + yargs: 17.7.0 + dev: false + /rollup/3.15.0: resolution: {integrity: sha512-F9hrCAhnp5/zx/7HYmftvsNBkMfLfk/dXUh73hPSM2E3CRgap65orDNJbLetoiUFwSAk6iHPLvBrZ5iHYvzqsg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -7388,6 +7434,13 @@ packages: optionalDependencies: fsevents: 2.3.2 + /rollup/3.16.0: + resolution: {integrity: sha512-9wE1H5N1SJqnROpQanBGJ7lrIitwlUYGj4Va4eyf3+vNhoIHLPLag2/CUGIiq3V9lHOBJB6zTsGsPvc50oeihg==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + /run-async/2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -8418,7 +8471,7 @@ packages: picocolors: 1.0.0 source-map: 0.6.1 source-map-support: 0.5.21 - vite: 4.1.1 + vite: 4.1.2 transitivePeerDependencies: - '@types/node' - less @@ -8441,7 +8494,7 @@ packages: picocolors: 1.0.0 source-map: 0.6.1 source-map-support: 0.5.21 - vite: 4.1.1_@types+node@18.13.0 + vite: 4.1.2_@types+node@18.13.0 transitivePeerDependencies: - '@types/node' - less @@ -8452,7 +8505,7 @@ packages: - terser dev: true - /vite-plugin-checker/0.5.5_vite@4.1.1: + /vite-plugin-checker/0.5.5_vite@4.1.2: resolution: {integrity: sha512-BLaRlBmiVn3Fg/wR9A0+YNwgXVteFJaH8rCIiIgYQcQ50jc3oVe2m8i0xxG5geq36UttNJsAj7DpDelN7/KjOg==} engines: {node: '>=14.16'} peerDependencies: @@ -8495,15 +8548,15 @@ packages: npm-run-path: 4.0.1 strip-ansi: 6.0.1 tiny-invariant: 1.3.1 - vite: 4.1.1 + vite: 4.1.2 vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.8 vscode-uri: 3.0.7 dev: false - /vite/4.1.1: - resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} + /vite/4.1.2: + resolution: {integrity: sha512-MWDb9Rfy3DI8omDQySbMK93nQqStwbsQWejXRY2EBzEWKmLAXWb1mkI9Yw2IJrc+oCvPCI1Os5xSSIBYY6DEAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -8530,12 +8583,12 @@ packages: esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.15.0 + rollup: 3.16.0 optionalDependencies: fsevents: 2.3.2 - /vite/4.1.1_@types+node@18.13.0: - resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} + /vite/4.1.2_@types+node@18.13.0: + resolution: {integrity: sha512-MWDb9Rfy3DI8omDQySbMK93nQqStwbsQWejXRY2EBzEWKmLAXWb1mkI9Yw2IJrc+oCvPCI1Os5xSSIBYY6DEAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -8563,7 +8616,7 @@ packages: esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.15.0 + rollup: 3.16.0 optionalDependencies: fsevents: 2.3.2 dev: true @@ -8611,7 +8664,7 @@ packages: tinybench: 2.3.1 tinypool: 0.3.1 tinyspy: 1.1.1 - vite: 4.1.1_@types+node@18.13.0 + vite: 4.1.2_@types+node@18.13.0 vite-node: 0.28.5_@types+node@18.13.0 why-is-node-running: 2.2.2 transitivePeerDependencies: