chore(deps): upgrade to nitro 2.8 (#24370)

This commit is contained in:
Pooya Parsa 2023-11-20 19:10:58 +01:00 committed by GitHub
parent a10e33c009
commit 63685431d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 376 additions and 567 deletions

View File

@ -59,11 +59,11 @@
"execa": "8.0.1",
"fs-extra": "11.1.1",
"globby": "14.0.0",
"h3": "1.8.2",
"h3": "1.9.0",
"happy-dom": "12.10.3",
"jiti": "1.21.0",
"markdownlint-cli": "0.37.0",
"nitropack": "2.7.2",
"nitropack": "2.8.0",
"nuxi": "3.9.1",
"nuxt": "workspace:*",
"nuxt-vitest": "0.11.3",

View File

@ -50,7 +50,7 @@
"@types/lodash-es": "4.17.11",
"@types/semver": "7.5.5",
"lodash-es": "4.17.21",
"nitropack": "2.7.2",
"nitropack": "2.8.0",
"unbuild": "latest",
"vite": "4.5.0",
"vitest": "0.33.0",

View File

@ -81,14 +81,14 @@
"estree-walker": "^3.0.3",
"fs-extra": "^11.1.1",
"globby": "^14.0.0",
"h3": "^1.8.2",
"h3": "^1.9.0",
"hookable": "^5.5.3",
"jiti": "^1.21.0",
"klona": "^2.0.6",
"knitwork": "^1.0.0",
"magic-string": "^0.30.5",
"mlly": "^1.4.2",
"nitropack": "^2.7.2",
"nitropack": "^2.8.0",
"nuxi": "^3.9.1",
"nypm": "^0.3.3",
"ofetch": "^1.3.3",

View File

@ -52,7 +52,6 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
asyncContext: nuxt.options.experimental.asyncContext,
typescriptBundlerResolution: nuxt.options.experimental.typescriptBundlerResolution || nuxt.options.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowerCase() === 'bundler' || _nitroConfig.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowerCase() === 'bundler'
},
// @ts-expect-error TODO: Romove after nitro 2.8 upgrade
framework: {
name: 'nuxt',
version: nuxtVersion
@ -331,6 +330,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 rollup 4 types
ImportProtectionPlugin.rollup({
rootDir: nuxt.options.rootDir,
patterns: [

View File

@ -44,9 +44,9 @@
"@vue/compiler-core": "3.3.8",
"c12": "1.5.1",
"esbuild-loader": "4.0.2",
"h3": "1.8.2",
"h3": "1.9.0",
"ignore": "5.3.0",
"nitropack": "2.7.2",
"nitropack": "2.8.0",
"ofetch": "1.3.3",
"unbuild": "latest",
"unctx": "2.3.1",

View File

@ -47,7 +47,7 @@
"externality": "^1.0.2",
"fs-extra": "^11.1.1",
"get-port-please": "^3.1.1",
"h3": "^1.8.2",
"h3": "^1.9.0",
"knitwork": "^1.0.0",
"magic-string": "^0.30.5",
"mlly": "^1.4.2",

View File

@ -24,6 +24,7 @@ export function analyzePlugin (ctx: ViteBuildContext): Plugin[] {
}
}
},
// @ts-expect-error rollup 4 types
visualizer({
...analyzeOptions,
filename: 'filename' in analyzeOptions ? analyzeOptions.filename!.replace('{name}', 'client') : undefined,

View File

@ -38,7 +38,7 @@
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fs-extra": "^11.1.1",
"h3": "^1.8.2",
"h3": "^1.9.0",
"hash-sum": "^2.0.0",
"lodash-es": "4.17.21",
"magic-string": "^0.30.5",

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
const serverDir = join(rootDir, '.output/server')
const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir)
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"198k"')
expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"199k"')
const modules = await analyzeSizes('node_modules/**/*', serverDir)
expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"1840k"')