From dfef49f508ebd381fcd748c9eb9b58e88e8790e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 18:09:01 +0200 Subject: [PATCH 01/34] chore(deps): update all non-major dependencies (main) (#21921) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- package.json | 8 +-- packages/kit/package.json | 4 +- packages/nuxi/package.json | 2 +- packages/nuxt/package.json | 6 +- packages/schema/package.json | 2 +- packages/vite/package.json | 2 +- packages/webpack/package.json | 2 +- pnpm-lock.yaml | 119 +++++++++++++++++----------------- 8 files changed, 73 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 8f60a6f15a..53738f09de 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "nuxt": "workspace:*", "vite": "4.3.9", "vue": "3.3.4", - "magic-string": "^0.30.0" + "magic-string": "^0.30.1" }, "devDependencies": { "@actions/core": "1.10.0", @@ -48,7 +48,7 @@ "@types/semver": "7.5.0", "case-police": "0.6.1", "chalk": "5.3.0", - "changelogen": "0.5.3", + "changelogen": "0.5.4", "cheerio": "1.0.0-rc.12", "consola": "3.2.2", "devalue": "4.3.2", @@ -60,7 +60,7 @@ "fs-extra": "11.1.1", "globby": "13.2.1", "h3": "1.7.1", - "jiti": "1.18.2", + "jiti": "1.19.1", "markdownlint-cli": "^0.33.0", "nuxi": "workspace:*", "nuxt": "workspace:*", @@ -80,7 +80,7 @@ "vue-eslint-parser": "9.3.1", "vue-tsc": "1.8.3" }, - "packageManager": "pnpm@8.6.5", + "packageManager": "pnpm@8.6.6", "engines": { "node": "^14.18.0 || >=16.10.0" } diff --git a/packages/kit/package.json b/packages/kit/package.json index f6cd074d39..5b0673e862 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -27,7 +27,7 @@ "globby": "^13.2.1", "hash-sum": "^2.0.0", "ignore": "^5.2.4", - "jiti": "^1.18.2", + "jiti": "^1.19.1", "knitwork": "^1.0.0", "mlly": "^1.4.0", "pathe": "^1.1.1", @@ -35,7 +35,7 @@ "scule": "^1.0.0", "semver": "^7.5.3", "unctx": "^2.3.1", - "unimport": "^3.0.11", + "unimport": "^3.0.12", "untyped": "^1.3.2" }, "devDependencies": { diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index f1cd049d78..2e1bee1159 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -37,7 +37,7 @@ "flat": "5.0.2", "giget": "1.1.2", "h3": "1.7.1", - "jiti": "1.18.2", + "jiti": "1.19.1", "listhen": "1.0.4", "mlly": "1.4.0", "mri": "1.2.0", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index b808122aca..610d7ddb32 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -75,11 +75,11 @@ "globby": "^13.2.1", "h3": "^1.7.1", "hookable": "^5.5.3", - "jiti": "^1.18.2", + "jiti": "^1.19.1", "klona": "^2.0.6", "knitwork": "^1.0.0", "local-pkg": "^0.4.3", - "magic-string": "^0.30.0", + "magic-string": "^0.30.1", "mlly": "^1.4.0", "nitropack": "^2.5.2", "nuxi": "workspace:../nuxi", @@ -96,7 +96,7 @@ "uncrypto": "^0.1.3", "unctx": "^2.3.1", "unenv": "^1.5.1", - "unimport": "^3.0.11", + "unimport": "^3.0.12", "unplugin": "^1.3.2", "unplugin-vue-router": "^0.6.4", "untyped": "^1.3.2", diff --git a/packages/schema/package.json b/packages/schema/package.json index 046fc8f8fa..935cd938af 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -56,7 +56,7 @@ "postcss-import-resolver": "^2.0.0", "std-env": "^3.3.3", "ufo": "^1.1.2", - "unimport": "^3.0.11", + "unimport": "^3.0.12", "untyped": "^1.3.2" }, "engines": { diff --git a/packages/vite/package.json b/packages/vite/package.json index 3ecfbc9309..ca7ad69499 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -42,7 +42,7 @@ "get-port-please": "^3.0.1", "h3": "^1.7.1", "knitwork": "^1.0.0", - "magic-string": "^0.30.0", + "magic-string": "^0.30.1", "mlly": "^1.4.0", "ohash": "^1.1.2", "pathe": "^1.1.1", diff --git a/packages/webpack/package.json b/packages/webpack/package.json index ae5c3f8221..ceeba50694 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -34,7 +34,7 @@ "h3": "^1.7.1", "hash-sum": "^2.0.0", "lodash-es": "^4.17.21", - "magic-string": "^0.30.0", + "magic-string": "^0.30.1", "memfs": "^4.2.0", "mini-css-extract-plugin": "^2.7.6", "mlly": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 777aa08fe4..b9cc1dc8f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ overrides: nuxt: workspace:* vite: 4.3.9 vue: 3.3.4 - magic-string: ^0.30.0 + magic-string: ^0.30.1 importers: @@ -45,8 +45,8 @@ importers: specifier: 5.3.0 version: 5.3.0 changelogen: - specifier: 0.5.3 - version: 0.5.3 + specifier: 0.5.4 + version: 0.5.4 cheerio: specifier: 1.0.0-rc.12 version: 1.0.0-rc.12 @@ -81,8 +81,8 @@ importers: specifier: 1.7.1 version: 1.7.1 jiti: - specifier: 1.18.2 - version: 1.18.2 + specifier: 1.19.1 + version: 1.19.1 markdownlint-cli: specifier: ^0.33.0 version: 0.33.0 @@ -162,8 +162,8 @@ importers: specifier: ^5.2.4 version: 5.2.4 jiti: - specifier: ^1.18.2 - version: 1.18.2 + specifier: ^1.19.1 + version: 1.19.1 knitwork: specifier: ^1.0.0 version: 1.0.0 @@ -186,8 +186,8 @@ importers: specifier: ^2.3.1 version: 2.3.1 unimport: - specifier: ^3.0.11 - version: 3.0.11(rollup@3.26.0) + specifier: ^3.0.12 + version: 3.0.12(rollup@3.26.0) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -284,8 +284,8 @@ importers: specifier: 1.7.1 version: 1.7.1 jiti: - specifier: 1.18.2 - version: 1.18.2 + specifier: 1.19.1 + version: 1.19.1 listhen: specifier: 1.0.4 version: 1.0.4 @@ -395,8 +395,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 jiti: - specifier: ^1.18.2 - version: 1.18.2 + specifier: ^1.19.1 + version: 1.19.1 klona: specifier: ^2.0.6 version: 2.0.6 @@ -407,8 +407,8 @@ importers: specifier: ^0.4.3 version: 0.4.3 magic-string: - specifier: ^0.30.0 - version: 0.30.0 + specifier: ^0.30.1 + version: 0.30.1 mlly: specifier: ^1.4.0 version: 1.4.0 @@ -458,8 +458,8 @@ importers: specifier: ^1.5.1 version: 1.5.1 unimport: - specifier: ^3.0.11 - version: 3.0.11(rollup@3.26.0) + specifier: ^3.0.12 + version: 3.0.12(rollup@3.26.0) unplugin: specifier: ^1.3.2 version: 1.3.2 @@ -531,8 +531,8 @@ importers: specifier: ^1.1.2 version: 1.1.2 unimport: - specifier: ^3.0.11 - version: 3.0.11(rollup@3.26.0) + specifier: ^3.0.12 + version: 3.0.12(rollup@3.26.0) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -701,8 +701,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 magic-string: - specifier: ^0.30.0 - version: 0.30.0 + specifier: ^0.30.1 + version: 0.30.1 mlly: specifier: ^1.4.0 version: 1.4.0 @@ -819,8 +819,8 @@ importers: specifier: ^4.17.21 version: 4.17.21 magic-string: - specifier: ^0.30.0 - version: 0.30.0 + specifier: ^0.30.1 + version: 0.30.1 memfs: specifier: ^4.2.0 version: 4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) @@ -2032,7 +2032,7 @@ packages: git-url-parse: 13.1.0 inquirer: 9.1.5 is-docker: 3.0.0 - jiti: 1.18.2 + jiti: 1.19.1 mri: 1.2.0 nanoid: 4.0.2 node-fetch: 3.3.1 @@ -2244,7 +2244,7 @@ packages: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.0 + magic-string: 0.30.1 rollup: 3.26.0 dev: true @@ -2262,7 +2262,7 @@ packages: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.0 + magic-string: 0.30.1 rollup: 3.26.0 /@rollup/plugin-inject@5.0.3(rollup@3.26.0): @@ -2276,7 +2276,7 @@ packages: dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.0) estree-walker: 2.0.2 - magic-string: 0.30.0 + magic-string: 0.30.1 rollup: 3.26.0 /@rollup/plugin-json@6.0.0(rollup@3.26.0): @@ -2318,7 +2318,7 @@ packages: optional: true dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.0) - magic-string: 0.30.0 + magic-string: 0.30.1 rollup: 3.26.0 /@rollup/plugin-terser@0.4.3(rollup@3.26.0): @@ -2861,7 +2861,7 @@ packages: /@vitest/snapshot@0.32.4: resolution: {integrity: sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==} dependencies: - magic-string: 0.30.0 + magic-string: 0.30.1 pathe: 1.1.1 pretty-format: 29.5.0 dev: true @@ -2977,7 +2977,7 @@ packages: '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.0 + magic-string: 0.30.1 postcss: 8.4.24 source-map-js: 1.0.2 @@ -3015,7 +3015,7 @@ packages: '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.0 + magic-string: 0.30.1 /@vue/reactivity@3.3.4: resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} @@ -3629,7 +3629,7 @@ packages: defu: 6.1.2 dotenv: 16.3.1 giget: 1.1.2 - jiti: 1.18.2 + jiti: 1.19.1 mlly: 1.4.0 ohash: 1.1.2 pathe: 1.1.1 @@ -3711,8 +3711,8 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - /changelogen@0.5.3: - resolution: {integrity: sha512-RjTrgJlTHhbGlMo/s73j7uSTspla3ykr0UA5zwRs/HIZvElY6qZHu3X70httgC2Du5poS2wFCS10WLfwZr7ZTQ==} + /changelogen@0.5.4: + resolution: {integrity: sha512-ady7TjLW3ZKMWzVF8MG3vJRqLVctNTGIZnO5XoFbMbcC59BVNTZXNXL8tovB+OK6DHLk4NeTHUWzdwMaKmFyUA==} hasBin: true dependencies: c12: 1.4.2 @@ -3728,7 +3728,8 @@ packages: pkg-types: 1.0.3 scule: 1.0.0 semver: 7.5.3 - yaml: 2.3.0 + std-env: 3.3.3 + yaml: 2.3.1 transitivePeerDependencies: - supports-color dev: true @@ -6150,8 +6151,8 @@ packages: merge-stream: 2.0.0 supports-color: 8.1.1 - /jiti@1.18.2: - resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} + /jiti@1.19.1: + resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==} hasBin: true /js-beautify@1.14.6: @@ -6440,11 +6441,11 @@ packages: resolution: {integrity: sha512-P53AZrzq7hclCU6HWj88xNZHmP15DKjMmK/vBytO1qnpYP3ul4IEZlyCE0aU3JRnmgWmZPmoTKj4Bls7v0pMyA==} engines: {node: '>=14.19.0'} dependencies: - magic-string: 0.30.0 + magic-string: 0.30.1 dev: false - /magic-string@0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + /magic-string@0.30.1: + resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -6674,7 +6675,7 @@ packages: esbuild: 0.17.19 fs-extra: 11.1.1 globby: 13.2.1 - jiti: 1.18.2 + jiti: 1.19.1 mlly: 1.4.0 mri: 1.2.0 pathe: 1.1.1 @@ -6772,11 +6773,11 @@ packages: http-graceful-shutdown: 3.1.13 http-proxy: 1.18.1 is-primitive: 3.0.1 - jiti: 1.18.2 + jiti: 1.19.1 klona: 2.0.6 knitwork: 1.0.0 listhen: 1.0.4 - magic-string: 0.30.0 + magic-string: 0.30.1 mime: 3.0.0 mlly: 1.4.0 mri: 1.2.0 @@ -6800,7 +6801,7 @@ packages: ufo: 1.1.2 uncrypto: 0.1.3 unenv: 1.5.1 - unimport: 3.0.11(rollup@3.26.0) + unimport: 3.0.12(rollup@3.26.0) unstorage: 1.7.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -7358,7 +7359,7 @@ packages: webpack: ^5.0.0 dependencies: cosmiconfig: 8.2.0 - jiti: 1.18.2 + jiti: 1.19.1 postcss: 8.4.24 semver: 7.5.3 webpack: 5.88.1 @@ -7997,7 +7998,7 @@ packages: rollup: ^3.0.0 typescript: ^4.1 || ^5.0 dependencies: - magic-string: 0.30.0 + magic-string: 0.30.1 rollup: 3.26.0 typescript: 5.0.4 optionalDependencies: @@ -8753,8 +8754,8 @@ packages: esbuild: 0.17.19 globby: 13.2.1 hookable: 5.5.3 - jiti: 1.18.2 - magic-string: 0.30.0 + jiti: 1.19.1 + magic-string: 0.30.1 mkdist: 1.2.0(typescript@5.0.4) mlly: 1.4.0 mri: 1.2.0 @@ -8779,7 +8780,7 @@ packages: dependencies: acorn: 8.9.0 estree-walker: 3.0.3 - magic-string: 0.30.0 + magic-string: 0.30.1 unplugin: 1.3.2 /undici@5.22.1: @@ -8806,14 +8807,14 @@ packages: hookable: 5.5.3 dev: false - /unimport@3.0.11(rollup@3.26.0): - resolution: {integrity: sha512-UaaLu7TiqiEwjm5a9FGsL8RL87U65wyr1jBeIAAvLChgJZRMTTkknU9bkWjBsVGutXLT2Yq8/dPyWXSC3/ELRg==} + /unimport@3.0.12(rollup@3.26.0): + resolution: {integrity: sha512-wETYjro+wK0lGlate7JNDu4OI89m6hNt2bfqL8ysAGgStXyIplISZrktAqr2psfY9/ft/jU5HWatk7wZeUUPdQ==} dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.0) escape-string-regexp: 5.0.0 fast-glob: 3.3.0 local-pkg: 0.4.3 - magic-string: 0.30.0 + magic-string: 0.30.1 mlly: 1.4.0 pathe: 1.1.1 pkg-types: 1.0.3 @@ -8848,7 +8849,7 @@ packages: scule: 1.0.0 unplugin: 1.3.2 vue-router: 4.2.2(vue@3.3.4) - yaml: 2.3.0 + yaml: 2.3.1 transitivePeerDependencies: - rollup - vue @@ -8921,7 +8922,7 @@ packages: '@babel/standalone': 7.22.5 '@babel/types': 7.22.5 defu: 6.1.2 - jiti: 1.18.2 + jiti: 1.19.1 mri: 1.2.0 scule: 1.0.0 transitivePeerDependencies: @@ -9093,7 +9094,7 @@ packages: estree-walker: 3.0.3 h3: 1.7.1 happy-dom: 9.20.3 - magic-string: 0.30.0 + magic-string: 0.30.1 ofetch: 1.1.1 unenv: 1.5.1 vitest: 0.32.4(playwright@1.35.1) @@ -9149,7 +9150,7 @@ packages: chai: 4.3.7 debug: 4.3.4 local-pkg: 0.4.3 - magic-string: 0.30.0 + magic-string: 0.30.1 pathe: 1.1.1 picocolors: 1.0.0 playwright: 1.35.1 @@ -9582,9 +9583,9 @@ packages: engines: {node: '>= 6'} dev: false - /yaml@2.3.0: - resolution: {integrity: sha512-8/1wgzdKc7bc9E6my5wZjmdavHLvO/QOmLG1FBugblEvY4IXrLjlViIOmL24HthU042lWTDRO90Fz1Yp66UnMw==} - engines: {node: '>= 14', npm: '>= 7'} + /yaml@2.3.1: + resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + engines: {node: '>= 14'} /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} From 28e91a7aada83628867bcdd12b65bae74957ac71 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 5 Jul 2023 11:25:21 +0200 Subject: [PATCH 02/34] fix(nuxt): regenerate imports after template (#21934) --- packages/nuxt/src/imports/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/imports/module.ts b/packages/nuxt/src/imports/module.ts index 033ef78d49..f86a6243f9 100644 --- a/packages/nuxt/src/imports/module.ts +++ b/packages/nuxt/src/imports/module.ts @@ -126,7 +126,7 @@ export default defineNuxtModule>({ } }) - nuxt.hook('builder:generateApp', async () => { + nuxt.hook('app:templatesGenerated', async () => { await regenerateImports() }) } From e70ff83e72dc8ae5892bdc20d47f47bc007ca62a Mon Sep 17 00:00:00 2001 From: anhao <117057608+ah-dc@users.noreply.github.com> Date: Wed, 5 Jul 2023 17:35:45 +0800 Subject: [PATCH 03/34] fix(vite): fix issue detecting shadowed keyed composables (#21891) --- packages/vite/src/plugins/composable-keys.ts | 4 +-- packages/vite/test/composable-keys.test.ts | 27 +++++++++++++++++++ test/fixtures/basic/nuxt.config.ts | 2 +- .../custom-keyed-composable.ts | 3 +++ .../basic/pages/keyed-composables/index.vue | 3 ++- .../basic/pages/keyed-composables/local.vue | 7 +++-- 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 packages/vite/test/composable-keys.test.ts create mode 100644 test/fixtures/basic/other-composables-folder/custom-keyed-composable.ts diff --git a/packages/vite/src/plugins/composable-keys.ts b/packages/vite/src/plugins/composable-keys.ts index 86df9a2659..43cd18b353 100644 --- a/packages/vite/src/plugins/composable-keys.ts +++ b/packages/vite/src/plugins/composable-keys.ts @@ -224,7 +224,7 @@ class ScopedVarsCollector { const NUXT_IMPORT_RE = /nuxt|#app|#imports/ -function detectImportNames (code: string, composableMeta: Record) { +export function detectImportNames (code: string, composableMeta: Record) { const imports = findStaticImports(code) const names = new Set() for (const i of imports) { @@ -235,7 +235,7 @@ function detectImportNames (code: string, composableMeta: Record { + const keyedComposables = { + useFetch: { source: '#app', argumentLength: 2 }, + useCustomFetch: { source: 'custom-fetch', argumentLength: 2 } + } + it('should not include imports from nuxt', () => { + expect([...detectImportNames('import { useFetch } from \'#app\'', {})]).toMatchInlineSnapshot('[]') + expect([...detectImportNames('import { useFetch } from \'nuxt/app\'', {})]).toMatchInlineSnapshot('[]') + }) + it('should pick up other imports', () => { + expect([...detectImportNames('import { useCustomFetch, someThing as someThingRenamed } from \'custom-fetch\'', {})]).toMatchInlineSnapshot(` + [ + "useCustomFetch", + "someThingRenamed", + ] + `) + expect([...detectImportNames('import { useCustomFetch, someThing as someThingRenamed } from \'custom-fetch\'', keyedComposables)]).toMatchInlineSnapshot(` + [ + "someThingRenamed", + ] + `) + }) +}) diff --git a/test/fixtures/basic/nuxt.config.ts b/test/fixtures/basic/nuxt.config.ts index 19f8dfb8b7..5a6d38d138 100644 --- a/test/fixtures/basic/nuxt.config.ts +++ b/test/fixtures/basic/nuxt.config.ts @@ -63,7 +63,7 @@ export default defineNuxtConfig({ keyedComposables: [ { name: 'useCustomKeyedComposable', - source: 'pages/keyed-composables/index.vue', + source: '~/other-composables-folder/custom-keyed-composable', argumentLength: 1 } ] diff --git a/test/fixtures/basic/other-composables-folder/custom-keyed-composable.ts b/test/fixtures/basic/other-composables-folder/custom-keyed-composable.ts new file mode 100644 index 0000000000..f149fd3585 --- /dev/null +++ b/test/fixtures/basic/other-composables-folder/custom-keyed-composable.ts @@ -0,0 +1,3 @@ +export function useCustomKeyedComposable (arg?: string) { + return arg +} diff --git a/test/fixtures/basic/pages/keyed-composables/index.vue b/test/fixtures/basic/pages/keyed-composables/index.vue index e08d87b814..97428b2814 100644 --- a/test/fixtures/basic/pages/keyed-composables/index.vue +++ b/test/fixtures/basic/pages/keyed-composables/index.vue @@ -1,4 +1,6 @@ From 02a6aecd4e5b998d257fc46af5ab74d258609131 Mon Sep 17 00:00:00 2001 From: Muhamad Jamil Date: Wed, 5 Jul 2023 16:35:59 +0700 Subject: [PATCH 04/34] docs: update docs for `` (#21952) --- docs/3.api/2.components/5.nuxt-loading-indicator.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/3.api/2.components/5.nuxt-loading-indicator.md b/docs/3.api/2.components/5.nuxt-loading-indicator.md index 13fe8a104b..17b96d6111 100644 --- a/docs/3.api/2.components/5.nuxt-loading-indicator.md +++ b/docs/3.api/2.components/5.nuxt-loading-indicator.md @@ -11,13 +11,15 @@ Add `` in your `app.vue` or layouts. ```vue [app.vue] ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/examples/tree/main/routing/pages?file=app.vue&terminal=dev" blank} ::alert{type=warning} If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition. From 52a427d5837b328782e7a4b1d98c92699091dc78 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Wed, 5 Jul 2023 17:48:01 +0800 Subject: [PATCH 05/34] fix(nuxt): use `$fetch.raw` in dev client mode for islands (#21904) --- packages/nuxt/src/app/components/nuxt-island.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/app/components/nuxt-island.ts b/packages/nuxt/src/app/components/nuxt-island.ts index 56bacbafb6..4cd284b1eb 100644 --- a/packages/nuxt/src/app/components/nuxt-island.ts +++ b/packages/nuxt/src/app/components/nuxt-island.ts @@ -5,6 +5,7 @@ import { appendResponseHeader } from 'h3' import { useHead } from '@unhead/vue' import { randomUUID } from 'uncrypto' import { withQuery } from 'ufo' +import type { FetchResponse } from 'ofetch' // eslint-disable-next-line import/no-restricted-paths import type { NuxtIslandResponse } from '../../core/runtime/nitro/renderer' @@ -42,7 +43,8 @@ export default defineComponent({ const hashId = computed(() => hash([props.name, props.props, props.context])) const instance = getCurrentInstance()! const event = useRequestEvent() - const eventFetch = process.server ? event.fetch : globalThis.fetch + // TODO: remove use of `$fetch.raw` when nitro 503 issues on windows dev server are resolved + const eventFetch = process.server ? event.fetch : process.dev ? $fetch.raw : globalThis.fetch const mounted = ref(false) onMounted(() => { mounted.value = true }) @@ -81,7 +83,7 @@ export default defineComponent({ ...props.context, props: props.props ? JSON.stringify(props.props) : undefined })) - const result = await r.json() as NuxtIslandResponse + const result = process.server || !process.dev ? await r.json() : (r as FetchResponse)._data // TODO: support passing on more headers if (process.server && process.env.prerender) { const hints = r.headers.get('x-nitro-prerender') From 381e0f834928dee4d21641f3f09f8879cc1521e2 Mon Sep 17 00:00:00 2001 From: Nozomu Ikuta <16436160+NozomuIkuta@users.noreply.github.com> Date: Wed, 5 Jul 2023 18:59:23 +0900 Subject: [PATCH 06/34] fix(schema): warn if user provides `vite.publicDir` (#21847) --- packages/schema/src/config/vite.ts | 7 ++++++- packages/schema/src/types/config.ts | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/config/vite.ts b/packages/schema/src/config/vite.ts index 5a6d07b44b..deba6f99be 100644 --- a/packages/schema/src/config/vite.ts +++ b/packages/schema/src/config/vite.ts @@ -30,7 +30,12 @@ export default defineUntypedSchema({ extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, publicDir: { - $resolve: async (val, get) => val ?? resolve((await get('srcDir')), (await get('dir')).public) + $resolve: async (val, get) => { + if (val) { + console.warn('Directly configuring the `vite.publicDir` option is not supported. Instead, set `dir.public`. You can read more in `https://nuxt.com/docs/api/configuration/nuxt-config#public`.') + } + return val ?? resolve((await get('srcDir')), (await get('dir')).public) + } }, vue: { isProduction: { diff --git a/packages/schema/src/types/config.ts b/packages/schema/src/types/config.ts index 398291ebf4..0b44452f9c 100644 --- a/packages/schema/src/types/config.ts +++ b/packages/schema/src/types/config.ts @@ -96,7 +96,7 @@ export interface NuxtOptions extends Omit { $schema: SchemaDefinition } -export interface ViteConfig extends ViteUserConfig { +export interface ViteConfig extends Omit { /** The path to the entrypoint for the Vite build. */ entry?: string /** @@ -126,6 +126,14 @@ export interface ViteConfig extends ViteUserConfig { * Use environment variables or top level `server` options to configure Nuxt server. */ server?: Omit + /** + * Directly configuring the `vite.publicDir` option is not supported. Instead, set `dir.public`. + * + * You can read more in . + * + * @deprecated + */ + publicDir?: never } From 13a8923613551ca0a2cc3a6c6d2557acab74550e Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 5 Jul 2023 12:05:59 +0200 Subject: [PATCH 07/34] docs: update more links to examples repo --- docs/3.api/1.composables/use-cookie.md | 2 +- docs/3.api/2.components/2.nuxt-page.md | 2 +- docs/3.api/2.components/4.nuxt-link.md | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/3.api/1.composables/use-cookie.md b/docs/3.api/1.composables/use-cookie.md index 94edcd6998..4a69032bd7 100644 --- a/docs/3.api/1.composables/use-cookie.md +++ b/docs/3.api/1.composables/use-cookie.md @@ -38,7 +38,7 @@ counter.value = counter.value || Math.round(Math.random() * 1000) ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/composables/use-cookie?terminal=dev&file=app.vue" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/examples/tree/main/advanced/use-cookie?terminal=dev&file=app.vue" blank} ## Options diff --git a/docs/3.api/2.components/2.nuxt-page.md b/docs/3.api/2.components/2.nuxt-page.md index 952d256a88..0e99ad4bb8 100644 --- a/docs/3.api/2.components/2.nuxt-page.md +++ b/docs/3.api/2.components/2.nuxt-page.md @@ -44,7 +44,7 @@ definePageMeta({ ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?file=app.vue" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/examples/tree/main/routing/pages?file=app.vue" blank} ## Accessing a page's component ref diff --git a/docs/3.api/2.components/4.nuxt-link.md b/docs/3.api/2.components/4.nuxt-link.md index 91c9db84ba..00eb84a50c 100644 --- a/docs/3.api/2.components/4.nuxt-link.md +++ b/docs/3.api/2.components/4.nuxt-link.md @@ -24,8 +24,6 @@ In this example, we use `` component to link to a website. ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} - ### Internal Routing In this example, we use `` component to link to another page of the application. @@ -39,8 +37,6 @@ In this example, we use `` component to link to another page of the ap ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} - ### `target` and `rel` Attributes In this example, we use `` with `target`, `rel`, and `noRel` props. @@ -69,8 +65,6 @@ In this example, we use `` with `target`, `rel`, and `noRel` props. ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} - ## Props - **to**: Any URL or a [route location object](https://router.vuejs.org/api/interfaces/RouteLocation.html) from Vue Router @@ -104,8 +98,6 @@ export default defineNuxtLink({ You can then use `` component as usual with your new defaults. -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/components/MyNuxtLink.ts" blank} - ### `defineNuxtLink` Signature ```ts From 00fb33379c06c8a4d407b0d07e56e46577308e71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:18:44 +0200 Subject: [PATCH 08/34] chore(deps): update all non-major dependencies (main) (#21939) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- package.json | 2 +- packages/kit/package.json | 2 +- packages/nuxt/package.json | 6 +- packages/schema/package.json | 4 +- packages/test-utils/package.json | 2 +- pnpm-lock.yaml | 315 +++++++++++++++---------------- test/bundle.test.ts | 2 +- 7 files changed, 163 insertions(+), 170 deletions(-) diff --git a/package.json b/package.json index 53738f09de..47a5d44092 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "vitest-environment-nuxt": "0.8.7", "vue": "3.3.4", "vue-eslint-parser": "9.3.1", - "vue-tsc": "1.8.3" + "vue-tsc": "1.8.4" }, "packageManager": "pnpm@8.6.6", "engines": { diff --git a/packages/kit/package.json b/packages/kit/package.json index 5b0673e862..86e417ebf7 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -35,7 +35,7 @@ "scule": "^1.0.0", "semver": "^7.5.3", "unctx": "^2.3.1", - "unimport": "^3.0.12", + "unimport": "^3.0.14", "untyped": "^1.3.2" }, "devDependencies": { diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 610d7ddb32..f2dba41973 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -58,8 +58,8 @@ "@nuxt/telemetry": "^2.2.0", "@nuxt/ui-templates": "^1.2.0", "@nuxt/vite-builder": "workspace:../vite", - "@unhead/ssr": "^1.1.29", - "@unhead/vue": "^1.1.29", + "@unhead/ssr": "^1.1.30", + "@unhead/vue": "^1.1.30", "@vue/shared": "^3.3.4", "acorn": "8.9.0", "c12": "^1.4.2", @@ -96,7 +96,7 @@ "uncrypto": "^0.1.3", "unctx": "^2.3.1", "unenv": "^1.5.1", - "unimport": "^3.0.12", + "unimport": "^3.0.14", "unplugin": "^1.3.2", "unplugin-vue-router": "^0.6.4", "untyped": "^1.3.2", diff --git a/packages/schema/package.json b/packages/schema/package.json index 935cd938af..bd9eb5a230 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -30,7 +30,7 @@ "@types/file-loader": "5.0.1", "@types/pug": "2.0.6", "@types/sass-loader": "8.0.5", - "@unhead/schema": "1.1.29", + "@unhead/schema": "1.1.30", "@vitejs/plugin-vue": "4.2.3", "@vitejs/plugin-vue-jsx": "3.0.1", "@vue/compiler-core": "3.3.4", @@ -56,7 +56,7 @@ "postcss-import-resolver": "^2.0.0", "std-env": "^3.3.3", "ufo": "^1.1.2", - "unimport": "^3.0.12", + "unimport": "^3.0.14", "untyped": "^1.3.2" }, "engines": { diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 2ca9fc0590..09a4f3dd3c 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -33,7 +33,7 @@ "ufo": "^1.1.2" }, "devDependencies": { - "@jest/globals": "29.5.0", + "@jest/globals": "29.6.0", "playwright": "1.35.1", "unbuild": "latest", "vitest": "0.32.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9cc1dc8f8..97c2b3c947 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,8 +135,8 @@ importers: specifier: 9.3.1 version: 9.3.1(eslint@8.44.0) vue-tsc: - specifier: 1.8.3 - version: 1.8.3(typescript@5.0.4) + specifier: 1.8.4 + version: 1.8.4(typescript@5.0.4) packages/kit: dependencies: @@ -186,8 +186,8 @@ importers: specifier: ^2.3.1 version: 2.3.1 unimport: - specifier: ^3.0.12 - version: 3.0.12(rollup@3.26.0) + specifier: ^3.0.14 + version: 3.0.14(rollup@3.26.0) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -344,11 +344,11 @@ importers: specifier: ^14.18.0 || >=16.10.0 version: 18.16.19 '@unhead/ssr': - specifier: ^1.1.29 - version: 1.1.29 + specifier: ^1.1.30 + version: 1.1.30 '@unhead/vue': - specifier: ^1.1.29 - version: 1.1.29(vue@3.3.4) + specifier: ^1.1.30 + version: 1.1.30(vue@3.3.4) '@vue/shared': specifier: ^3.3.4 version: 3.3.4 @@ -458,8 +458,8 @@ importers: specifier: ^1.5.1 version: 1.5.1 unimport: - specifier: ^3.0.12 - version: 3.0.12(rollup@3.26.0) + specifier: ^3.0.14 + version: 3.0.14(rollup@3.26.0) unplugin: specifier: ^1.3.2 version: 1.3.2 @@ -531,8 +531,8 @@ importers: specifier: ^1.1.2 version: 1.1.2 unimport: - specifier: ^3.0.12 - version: 3.0.12(rollup@3.26.0) + specifier: ^3.0.14 + version: 3.0.14(rollup@3.26.0) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -550,8 +550,8 @@ importers: specifier: 8.0.5 version: 8.0.5 '@unhead/schema': - specifier: 1.1.29 - version: 1.1.29 + specifier: 1.1.30 + version: 1.1.30 '@vitejs/plugin-vue': specifier: 4.2.3 version: 4.2.3(vite@4.3.9)(vue@3.3.4) @@ -635,8 +635,8 @@ importers: version: 3.3.4 devDependencies: '@jest/globals': - specifier: 29.5.0 - version: 29.5.0 + specifier: 29.6.0 + version: 29.6.0 playwright: specifier: 1.35.1 version: 1.35.1 @@ -750,7 +750,7 @@ importers: version: 0.32.4(@types/node@18.16.19) vite-plugin-checker: specifier: ^0.6.1 - version: 0.6.1(eslint@8.44.0)(typescript@5.0.4)(vite@4.3.9)(vue-tsc@1.8.3) + version: 0.6.1(eslint@8.44.0)(typescript@5.0.4)(vite@4.3.9)(vue-tsc@1.8.4) vue-bundle-renderer: specifier: ^1.0.3 version: 1.0.3 @@ -1833,78 +1833,78 @@ packages: engines: {node: '>=8'} dev: true - /@jest/environment@29.5.0: - resolution: {integrity: sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==} + /@jest/environment@29.6.0: + resolution: {integrity: sha512-bUZLYUxYlUIsslBbxII0fq0kr1+friI3Gty+cRLmocGB1jdcAHs7FS8QdCDqedE8q4DZE1g/AJHH6OJZBLGGsg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/fake-timers': 29.5.0 - '@jest/types': 29.5.0 + '@jest/fake-timers': 29.6.0 + '@jest/types': 29.6.0 '@types/node': 18.16.19 - jest-mock: 29.5.0 + jest-mock: 29.6.0 dev: true - /@jest/expect-utils@29.5.0: - resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} + /@jest/expect-utils@29.6.0: + resolution: {integrity: sha512-LLSQQN7oypMSETKoPWpsWYVKJd9LQWmSDDAc4hUQ4JocVC7LAMy9R3ZMhlnLwbcFvQORZnZR7HM893Px6cJhvA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.4.3 dev: true - /@jest/expect@29.5.0: - resolution: {integrity: sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==} + /@jest/expect@29.6.0: + resolution: {integrity: sha512-a7pISPW28Q3c0/pLwz4mQ6tbAI+hc8/0CJp9ix6e9U4dQ6TiHQX82CT5DV5BMWaw8bFH4E6zsfZxXdn6Ka23Bw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - expect: 29.5.0 - jest-snapshot: 29.5.0 + expect: 29.6.0 + jest-snapshot: 29.6.0 transitivePeerDependencies: - supports-color dev: true - /@jest/fake-timers@29.5.0: - resolution: {integrity: sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==} + /@jest/fake-timers@29.6.0: + resolution: {integrity: sha512-nuCU46AsZoskthWSDS2Aj6LARgyNcp5Fjx2qxsO/fPl1Wp1CJ+dBDqs0OkEcJK8FBeV/MbjH5efe79M2sHcV+A==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@sinonjs/fake-timers': 10.0.2 '@types/node': 18.16.19 - jest-message-util: 29.5.0 - jest-mock: 29.5.0 - jest-util: 29.5.0 + jest-message-util: 29.6.0 + jest-mock: 29.6.0 + jest-util: 29.6.0 dev: true - /@jest/globals@29.5.0: - resolution: {integrity: sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==} + /@jest/globals@29.6.0: + resolution: {integrity: sha512-IQQ3hZ2D/hwEwXSMv5GbfhzdH0nTQR3KPYxnuW6gYWbd6+7/zgMz7Okn6EgBbNtJNONq03k5EKA6HqGyzRbpeg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.5.0 - '@jest/expect': 29.5.0 - '@jest/types': 29.5.0 - jest-mock: 29.5.0 + '@jest/environment': 29.6.0 + '@jest/expect': 29.6.0 + '@jest/types': 29.6.0 + jest-mock: 29.6.0 transitivePeerDependencies: - supports-color dev: true - /@jest/schemas@29.4.3: - resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} + /@jest/schemas@29.6.0: + resolution: {integrity: sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@sinclair/typebox': 0.25.24 + '@sinclair/typebox': 0.27.8 - /@jest/transform@29.5.0: - resolution: {integrity: sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==} + /@jest/transform@29.6.0: + resolution: {integrity: sha512-bhP/KxPo3e322FJ0nKAcb6WVK76ZYyQd1lWygJzoSqP8SYMSLdxHqP4wnPTI4WvbB8PKPDV30y5y7Tya4RHOBA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/core': 7.22.5 - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@jridgewell/trace-mapping': 0.3.18 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.11 - jest-haste-map: 29.5.0 + jest-haste-map: 29.6.0 jest-regex-util: 29.4.3 - jest-util: 29.5.0 + jest-util: 29.6.0 micromatch: 4.0.5 pirates: 4.0.5 slash: 3.0.0 @@ -1913,11 +1913,11 @@ packages: - supports-color dev: true - /@jest/types@29.5.0: - resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} + /@jest/types@29.6.0: + resolution: {integrity: sha512-8XCgL9JhqbJTFnMRjEAO+TuW251+MoMd5BSzLiE3vvzpQ8RlBxy8NoyNkDhs3K3OL3HeVinlOl9or5p7GTeOLg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 + '@jest/schemas': 29.6.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 '@types/node': 18.16.19 @@ -2367,8 +2367,8 @@ packages: picomatch: 2.3.1 rollup: 3.26.0 - /@sinclair/typebox@0.25.24: - resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -2387,12 +2387,6 @@ packages: engines: {node: '>=10.13.0'} dev: false - /@types/babel__traverse@7.18.3: - resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==} - dependencies: - '@babel/types': 7.22.5 - dev: true - /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: @@ -2759,41 +2753,41 @@ packages: eslint-visitor-keys: 3.4.1 dev: true - /@unhead/dom@1.1.29: - resolution: {integrity: sha512-CyCblipMp3HNf6AJTABHn/F8U5bTA36FDHky/zcXX3MEaj/XzI6uxr6z813H67pxKw+tMlzYb+XM8Lfax61OvQ==} + /@unhead/dom@1.1.30: + resolution: {integrity: sha512-EvASOkk36lW5sRfIe+StCojpkPEExsQNt+cqcpdVr9iiRH54jziCDFxcLfjawc+jp4NO86KvmfHo86GIly3/SQ==} dependencies: - '@unhead/schema': 1.1.29 - '@unhead/shared': 1.1.29 + '@unhead/schema': 1.1.30 + '@unhead/shared': 1.1.30 dev: false - /@unhead/schema@1.1.29: - resolution: {integrity: sha512-ihgzC2VlEcC7SAt4hlRZAVubgBKvunHqEfSQmWbTNEiPI/Lkjry9rJuDjswo2go54xrDpAqOu3ZOVHq03YtOWQ==} + /@unhead/schema@1.1.30: + resolution: {integrity: sha512-lgz0aw+OP1PlKHBhNWAVabV2iAHBhSXCt3Ynswu0m++MwJxOVXizYJRZOVKK7Zx3u7vwPRV/nweYc6rmNHv5gA==} dependencies: hookable: 5.5.3 - zhead: 2.0.7 + zhead: 2.0.9 - /@unhead/shared@1.1.29: - resolution: {integrity: sha512-jYERAozHXGYT1jh/1friuRUajqKt/tU5oeLyIBSY+GDPs9k6mSpYHcrRhimqE3PJSN/hvg3UhyeH1/ltpSbyXA==} + /@unhead/shared@1.1.30: + resolution: {integrity: sha512-OPS+d4SZuYSWquQZVLfbyFYggdqKz8DtcdHXObRoKWnosrgVPyGJoOaFnjfkYYuvU6BFYnUtnZNMRQVUjmER1g==} dependencies: - '@unhead/schema': 1.1.29 + '@unhead/schema': 1.1.30 dev: false - /@unhead/ssr@1.1.29: - resolution: {integrity: sha512-vzDhWgYHWR99sYGke0+g5L8o35eIQfU2nXuePiNGK5+qn4OLn48TuSJzVjnbT6EVKfHxQ7P0v0ZvaE/b9v09/A==} + /@unhead/ssr@1.1.30: + resolution: {integrity: sha512-0XBgoPZoPjLCEQpGc/PhTYPvXEcWufcpcHWo6jxRham3VCoQN5RoSzFNGPEtd4ZhMMVRMQLJ7yPDGfFXtu78Pg==} dependencies: - '@unhead/schema': 1.1.29 - '@unhead/shared': 1.1.29 + '@unhead/schema': 1.1.30 + '@unhead/shared': 1.1.30 dev: false - /@unhead/vue@1.1.29(vue@3.3.4): - resolution: {integrity: sha512-BNNNvP3CJUmYAQw9z2SNHaemiXnbmBorPwpEdjvcb8mLC4IRBC6JHSrgsSl0SgHF6u3tulvi0zqQNHMo8MEnIQ==} + /@unhead/vue@1.1.30(vue@3.3.4): + resolution: {integrity: sha512-jWDfYDjiNj8a8GTQoYeJrpKisI7YKIWwuMP1IREKa4cx41oCsbCKUDjomjnpmdBcpqvb/Kw32Tm+EMcuE/CYkA==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/schema': 1.1.29 - '@unhead/shared': 1.1.29 + '@unhead/schema': 1.1.30 + '@unhead/shared': 1.1.30 hookable: 5.5.3 - unhead: 1.1.29 + unhead: 1.1.30 vue: 3.3.4 dev: false @@ -2863,7 +2857,7 @@ packages: dependencies: magic-string: 0.30.1 pathe: 1.1.1 - pretty-format: 29.5.0 + pretty-format: 29.6.0 dev: true /@vitest/spy@0.32.4: @@ -2897,23 +2891,23 @@ packages: dependencies: diff-sequences: 29.4.3 loupe: 2.3.6 - pretty-format: 29.5.0 + pretty-format: 29.6.0 dev: true - /@volar/language-core@1.7.10: - resolution: {integrity: sha512-18Gmth5M0UI3hDDqhZngjMnb6WCslcfglkOdepRIhGxRYe7xR7DRRzciisYDMZsvOQxDYme+uaohg0dKUxLV2Q==} + /@volar/language-core@1.8.0: + resolution: {integrity: sha512-ZHTvZPM3pEbOOuaq+ybNz5TQlHUqPQPK0G1+SonvApGq0e3qgGijjhtL5T7hsCtUEmxfix8FrAuCH14tMBOhTg==} dependencies: - '@volar/source-map': 1.7.10 + '@volar/source-map': 1.8.0 - /@volar/source-map@1.7.10: - resolution: {integrity: sha512-FBpLEOKJpRxeh2nYbw1mTI5sZOPXYU8LlsCz6xuBY3yNtAizDTTIZtBHe1V8BaMpoSMgRysZe4gVxMEi3rDGVA==} + /@volar/source-map@1.8.0: + resolution: {integrity: sha512-d35aV0yFkIrkynRSKgrN5hgbMv6ekkFvcJsJGmOZ8UEjqLStto9zq7RSvpp6/PZ7/pa4Gn1f6K1qDt0bq0oUew==} dependencies: muggle-string: 0.3.1 - /@volar/typescript@1.7.10: - resolution: {integrity: sha512-yqIov4wndLU3GE1iE25bU5W6T+P+exPePcE1dFPPBKzQIBki1KvmdQN5jBlJp3Wo+wp7UIxa/RsdNkXT+iFBjg==} + /@volar/typescript@1.8.0: + resolution: {integrity: sha512-T/U1XLLhXv6tNr40Awznfc6QZWizSL99t6M0DeXtIMbnvSCqjjCVRnwlsq+DK9C1RlO3k8+i0Z8iJn7O1GGtoA==} dependencies: - '@volar/language-core': 1.7.10 + '@volar/language-core': 1.8.0 /@vue-macros/common@1.3.1(rollup@3.26.0)(vue@3.3.4): resolution: {integrity: sha512-Lc5aP/8HNJD1XrnvpeNuWcCf82bZdR3auN/chA1b/1rKZgSnmQkH9f33tKO9qLwXSy+u4hpCi8Rw+oUuF1KCeg==} @@ -2990,16 +2984,16 @@ packages: /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} - /@vue/language-core@1.8.3(typescript@5.0.4): - resolution: {integrity: sha512-AzhvMYoQkK/tg8CpAAttO19kx1zjS3+weYIr2AhlH/M5HebVzfftQoq4jZNFifjq+hyLKi8j9FiDMS8oqA89+A==} + /@vue/language-core@1.8.4(typescript@5.0.4): + resolution: {integrity: sha512-pnNtNcJVfkGYluW0vsVO+Y1gyX+eA0voaS7+1JOhCp5zKeCaL/PAmGYOgfvwML62neL+2H8pnhY7sffmrGpEhw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@volar/language-core': 1.7.10 - '@volar/source-map': 1.7.10 + '@volar/language-core': 1.8.0 + '@volar/source-map': 1.8.0 '@vue/compiler-dom': 3.3.4 '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 @@ -3064,11 +3058,11 @@ packages: vue-component-type-helpers: 1.6.5 dev: true - /@vue/typescript@1.8.3(typescript@5.0.4): - resolution: {integrity: sha512-6bdgSnIFpRYHlt70pHmnmNksPU00bfXgqAISeaNz3W6d2cH0OTfH8h/IhligQ82sJIhsuyfftQJ5518ZuKIhtA==} + /@vue/typescript@1.8.4(typescript@5.0.4): + resolution: {integrity: sha512-sioQfIY5xcmEAz+cPLvv6CtzGPtGhIdR0Za87zB8M4mPe4OSsE3MBGkXcslf+EzQgF+fm6Gr1SRMSX8r5ZmzDA==} dependencies: - '@volar/typescript': 1.7.10 - '@vue/language-core': 1.8.3(typescript@5.0.4) + '@volar/typescript': 1.8.0 + '@vue/language-core': 1.8.4(typescript@5.0.4) transitivePeerDependencies: - typescript @@ -4067,7 +4061,7 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.18 cssnano: 6.0.1(postcss@8.4.24) - jest-worker: 29.5.0 + jest-worker: 29.6.0 postcss: 8.4.24 schema-utils: 4.0.1 serialize-javascript: 6.0.1 @@ -5051,15 +5045,16 @@ packages: signal-exit: 3.0.7 strip-final-newline: 3.0.0 - /expect@29.5.0: - resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==} + /expect@29.6.0: + resolution: {integrity: sha512-AV+HaBtnDJ2YEUhPPo25HyUHBLaetM+y/Dq6pEC8VPQyt1dK+k8MfGkMy46djy2bddcqESc1kl4/K1uLWSfk9g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.5.0 + '@jest/expect-utils': 29.6.0 + '@types/node': 18.16.19 jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + jest-matcher-utils: 29.6.0 + jest-message-util: 29.6.0 + jest-util: 29.6.0 dev: true /external-editor@3.1.0: @@ -6019,14 +6014,14 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true - /jest-diff@29.5.0: - resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} + /jest-diff@29.6.0: + resolution: {integrity: sha512-ZRm7cd2m9YyZ0N3iMyuo1iUiprxQ/MFpYWXzEEj7hjzL3WnDffKW8192XBDcrAI8j7hnrM1wed3bL/oEnYF/8w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 diff-sequences: 29.4.3 jest-get-type: 29.4.3 - pretty-format: 29.5.0 + pretty-format: 29.6.0 dev: true /jest-get-type@29.4.3: @@ -6034,57 +6029,57 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-haste-map@29.5.0: - resolution: {integrity: sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==} + /jest-haste-map@29.6.0: + resolution: {integrity: sha512-dY1DKufptj7hcJSuhpqlYPGcnN3XjlOy/g0jinpRTMsbb40ivZHiuIPzeminOZkrek8C+oDxC54ILGO3vMLojg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@types/graceful-fs': 4.1.6 '@types/node': 18.16.19 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 jest-regex-util: 29.4.3 - jest-util: 29.5.0 - jest-worker: 29.5.0 + jest-util: 29.6.0 + jest-worker: 29.6.0 micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: fsevents: 2.3.2 dev: true - /jest-matcher-utils@29.5.0: - resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==} + /jest-matcher-utils@29.6.0: + resolution: {integrity: sha512-oSlqfGN+sbkB2Q5um/zL7z80w84FEAcLKzXBZIPyRk2F2Srg1ubhrHVKW68JCvb2+xKzAeGw35b+6gciS24PHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.5.0 + jest-diff: 29.6.0 jest-get-type: 29.4.3 - pretty-format: 29.5.0 + pretty-format: 29.6.0 dev: true - /jest-message-util@29.5.0: - resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} + /jest-message-util@29.6.0: + resolution: {integrity: sha512-mkCp56cETbpoNtsaeWVy6SKzk228mMi9FPHSObaRIhbR2Ujw9PqjW/yqVHD2tN1bHbC8ol6h3UEo7dOPmIYwIA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/code-frame': 7.22.5 - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.5.0 + pretty-format: 29.6.0 slash: 3.0.0 stack-utils: 2.0.6 dev: true - /jest-mock@29.5.0: - resolution: {integrity: sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==} + /jest-mock@29.6.0: + resolution: {integrity: sha512-2Pb7R2w24Q0aUVn+2/vdRDL6CqGqpheDZy7zrXav8FotOpSGw/4bS2hyVoKHMEx4xzOn6EyCAGwc5czWxXeN7w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@types/node': 18.16.19 - jest-util: 29.5.0 + jest-util: 29.6.0 dev: true /jest-regex-util@29.4.3: @@ -6092,42 +6087,40 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-snapshot@29.5.0: - resolution: {integrity: sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==} + /jest-snapshot@29.6.0: + resolution: {integrity: sha512-H3kUE9NwWDEDoutcOSS921IqdlkdjgnMdj1oMyxAHNflscdLc9dB8OudZHV6kj4OHJxbMxL8CdI5DlwYrs4wQg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/core': 7.22.5 '@babel/generator': 7.22.5 '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.5) '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.5) - '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 - '@jest/expect-utils': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@types/babel__traverse': 7.18.3 + '@jest/expect-utils': 29.6.0 + '@jest/transform': 29.6.0 + '@jest/types': 29.6.0 '@types/prettier': 2.7.2 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) chalk: 4.1.2 - expect: 29.5.0 + expect: 29.6.0 graceful-fs: 4.2.11 - jest-diff: 29.5.0 + jest-diff: 29.6.0 jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + jest-matcher-utils: 29.6.0 + jest-message-util: 29.6.0 + jest-util: 29.6.0 natural-compare: 1.4.0 - pretty-format: 29.5.0 + pretty-format: 29.6.0 semver: 7.5.3 transitivePeerDependencies: - supports-color dev: true - /jest-util@29.5.0: - resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} + /jest-util@29.6.0: + resolution: {integrity: sha512-S0USx9YwcvEm4pQ5suisVm/RVxBmi0GFR7ocJhIeaCuW5AXnAnffXbaVKvIFodyZNOc9ygzVtTxmBf40HsHXaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.0 '@types/node': 18.16.19 chalk: 4.1.2 ci-info: 3.8.0 @@ -6142,12 +6135,12 @@ packages: merge-stream: 2.0.0 supports-color: 8.1.1 - /jest-worker@29.5.0: - resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} + /jest-worker@29.6.0: + resolution: {integrity: sha512-oiQHH1SnKmZIwwPnpOrXTq4kHBk3lKGY/07DpnH0sAu+x7J8rXlbLDROZsU6vy9GwB0hPiZeZpu6YlJ48QoKcA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@types/node': 18.16.19 - jest-util: 29.5.0 + jest-util: 29.6.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -6801,7 +6794,7 @@ packages: ufo: 1.1.2 uncrypto: 0.1.3 unenv: 1.5.1 - unimport: 3.0.12(rollup@3.26.0) + unimport: 3.0.14(rollup@3.26.0) unstorage: 1.7.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -7666,11 +7659,11 @@ packages: react-is: 17.0.2 dev: true - /pretty-format@29.5.0: - resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} + /pretty-format@29.6.0: + resolution: {integrity: sha512-XH+D4n7Ey0iSR6PdAnBs99cWMZdGsdKrR33iUHQNr79w1szKTCIZDVdXuccAsHVwDBp0XeWPfNEoaxP9EZgRmQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 + '@jest/schemas': 29.6.0 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -8798,17 +8791,17 @@ packages: node-fetch-native: 1.2.0 pathe: 1.1.1 - /unhead@1.1.29: - resolution: {integrity: sha512-EmFma66Bn0YXIeW4VLHQInSAGNEjmIRnBMGbhpF2T6OEhNnNVbSeMd36xp2d7KwUKajEirZLWmg0ZxLGzaAVXA==} + /unhead@1.1.30: + resolution: {integrity: sha512-25N/P1GnnC8EYCDerzE0hl2nOdRqS1NOFh1STEyKWRo/Bi5dXn8Z2NTaqzkbr5ExJTZEAiDfZ+eALvMTmvlXlA==} dependencies: - '@unhead/dom': 1.1.29 - '@unhead/schema': 1.1.29 - '@unhead/shared': 1.1.29 + '@unhead/dom': 1.1.30 + '@unhead/schema': 1.1.30 + '@unhead/shared': 1.1.30 hookable: 5.5.3 dev: false - /unimport@3.0.12(rollup@3.26.0): - resolution: {integrity: sha512-wETYjro+wK0lGlate7JNDu4OI89m6hNt2bfqL8ysAGgStXyIplISZrktAqr2psfY9/ft/jU5HWatk7wZeUUPdQ==} + /unimport@3.0.14(rollup@3.26.0): + resolution: {integrity: sha512-67Rh/sGpEuVqdHWkXaZ6NOq+I7sKt86o+DUtKeGB6dh4Hk1A8AQrzyVGg2+LaVEYotStH7HwvV9YSaRjyT7Uqg==} dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.0) escape-string-regexp: 5.0.0 @@ -8995,7 +8988,7 @@ packages: - supports-color - terser - /vite-plugin-checker@0.6.1(eslint@8.44.0)(typescript@5.0.4)(vite@4.3.9)(vue-tsc@1.8.3): + /vite-plugin-checker@0.6.1(eslint@8.44.0)(typescript@5.0.4)(vite@4.3.9)(vue-tsc@1.8.4): resolution: {integrity: sha512-4fAiu3W/IwRJuJkkUZlWbLunSzsvijDf0eDN6g/MGh6BUK4SMclOTGbLJCPvdAcMOQvVmm8JyJeYLYd4//8CkA==} engines: {node: '>=14.16'} peerDependencies: @@ -9046,7 +9039,7 @@ packages: vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.8 vscode-uri: 3.0.7 - vue-tsc: 1.8.3(typescript@5.0.4) + vue-tsc: 1.8.4(typescript@5.0.4) dev: false /vite@4.3.9(@types/node@18.16.19): @@ -9278,14 +9271,14 @@ packages: de-indent: 1.0.2 he: 1.2.0 - /vue-tsc@1.8.3(typescript@5.0.4): - resolution: {integrity: sha512-Ua4DHuYxjudlhCW2nRZtaXbhIDVncRGIbDjZhHpF8Z8vklct/G/35/kAPuGNSOmq0JcvhPAe28Oa7LWaUerZVA==} + /vue-tsc@1.8.4(typescript@5.0.4): + resolution: {integrity: sha512-+hgpOhIx11vbi8/AxEdaPj3fiRwN9wy78LpsNNw2V995/IWa6TMyQxHbaw2ZKUpdwjySSHgrT6ohDEhUgFxGYw==} hasBin: true peerDependencies: typescript: '*' dependencies: - '@vue/language-core': 1.8.3(typescript@5.0.4) - '@vue/typescript': 1.8.3(typescript@5.0.4) + '@vue/language-core': 1.8.4(typescript@5.0.4) + '@vue/typescript': 1.8.4(typescript@5.0.4) semver: 7.5.3 typescript: 5.0.4 @@ -9612,8 +9605,8 @@ packages: engines: {node: '>=12.20'} dev: true - /zhead@2.0.7: - resolution: {integrity: sha512-q9iCCXBWndfYNMGCN7S970+e3ILAPzmX78Skblx7+SGlo6x6SXW0GJ5mJzigYsq2mkHCGqEUhe0QGDEDZauw8g==} + /zhead@2.0.9: + resolution: {integrity: sha512-Y3g6EegQc6PVrYXPq2OS7/s27UGVS5Y6NY6SY3XGH4Hg+yQWbQTtWsjCgmpR8kZnYrv8auB54sz+x5FEDrvqzQ==} /zip-stream@4.1.0: resolution: {integrity: sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==} diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 19d4f68b8f..59521916c6 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM for (const outputDir of ['.output', '.output-inline']) { it('default client bundle size', async () => { const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public')) - expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.1k"') + expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.2k"') expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(` [ "_nuxt/entry.js", From d0dde6426fe6ae58ec1ea94e47c66f6e0e2a4d63 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 5 Jul 2023 12:39:39 +0200 Subject: [PATCH 09/34] fix(nuxt): preserve old vnode when leaving nested route (#21823) --- .../nuxt/src/app/components/injections.ts | 10 ++ packages/nuxt/src/app/components/layout.ts | 43 +++--- .../nuxt/src/app/components/nuxt-root.vue | 3 +- .../nuxt/src/app/components/route-provider.ts | 57 ++++++++ packages/nuxt/src/app/composables/router.ts | 3 +- packages/nuxt/src/pages/runtime/page.ts | 93 ++++++------- test/basic.test.ts | 126 +++++++++++++++++- test/bundle.test.ts | 2 +- test/fixtures/basic/pages/suspense.vue | 34 ++++- .../basic/pages/suspense/async-[parent].vue | 4 +- .../suspense/async-[parent]/async-[child].vue | 2 +- .../suspense/async-[parent]/sync-[child].vue | 2 +- .../basic/pages/suspense/sync-[parent].vue | 4 +- .../suspense/sync-[parent]/async-[child].vue | 4 +- .../suspense/sync-[parent]/sync-[child].vue | 2 +- 15 files changed, 305 insertions(+), 84 deletions(-) create mode 100644 packages/nuxt/src/app/components/injections.ts create mode 100644 packages/nuxt/src/app/components/route-provider.ts diff --git a/packages/nuxt/src/app/components/injections.ts b/packages/nuxt/src/app/components/injections.ts new file mode 100644 index 0000000000..3f9660e607 --- /dev/null +++ b/packages/nuxt/src/app/components/injections.ts @@ -0,0 +1,10 @@ +import type { InjectionKey } from 'vue' +import type { RouteLocationNormalizedLoaded } from 'vue-router' + +export interface LayoutMeta { + isCurrent: (route: RouteLocationNormalizedLoaded) => boolean +} + +export const LayoutMetaSymbol: InjectionKey = Symbol('layout-meta') + +export const PageRouteSymbol: InjectionKey = Symbol('route') diff --git a/packages/nuxt/src/app/components/layout.ts b/packages/nuxt/src/app/components/layout.ts index e2253c42b5..8a0d633996 100644 --- a/packages/nuxt/src/app/components/layout.ts +++ b/packages/nuxt/src/app/components/layout.ts @@ -1,7 +1,9 @@ -import type { InjectionKey, Ref, VNode } from 'vue' +import type { Ref, VNode } from 'vue' import { Suspense, Transition, computed, defineComponent, h, inject, mergeProps, nextTick, onMounted, provide, ref, unref } from 'vue' import type { RouteLocationNormalizedLoaded } from 'vue-router' import { _wrapIf } from './utils' +import { LayoutMetaSymbol, PageRouteSymbol } from './injections' + import { useRoute } from '#app/composables/router' // @ts-expect-error virtual file import { useRoute as useVueRouterRoute } from '#build/pages' @@ -11,12 +13,6 @@ import layouts from '#build/layouts' import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs' import { useNuxtApp } from '#app' -export interface LayoutMeta { - isCurrent: (route: RouteLocationNormalizedLoaded) => boolean -} - -export const LayoutMetaSymbol: InjectionKey = Symbol('layout-meta') - export default defineComponent({ name: 'NuxtLayout', inheritAttrs: false, @@ -29,7 +25,7 @@ export default defineComponent({ setup (props, context) { const nuxtApp = useNuxtApp() // Need to ensure (if we are not a child of ``) that we use synchronous route (not deferred) - const injectedRoute = inject('_route') as RouteLocationNormalizedLoaded + const injectedRoute = inject(PageRouteSymbol) const route = injectedRoute === useRoute() ? useVueRouterRoute() : injectedRoute const layout = computed(() => unref(props.name) ?? route.meta.layout as string ?? 'default') @@ -49,13 +45,14 @@ export default defineComponent({ // We avoid rendering layout transition if there is no layout to render return _wrapIf(Transition, hasLayout && transitionProps, { default: () => h(Suspense, { suspensible: true, onResolve: () => { nextTick(done) } }, { - default: () => _wrapIf(LayoutProvider, hasLayout && { + // @ts-expect-error seems to be an issue in vue types + default: () => h(LayoutProvider, { layoutProps: mergeProps(context.attrs, { ref: layoutRef }), key: layout.value, name: layout.value, shouldProvide: !props.name, hasTransition: !!transitionProps - }, context.slots).default() + }, context.slots) }) }).default() } @@ -67,7 +64,7 @@ const LayoutProvider = defineComponent({ inheritAttrs: false, props: { name: { - type: String + type: [String, Boolean] }, layoutProps: { type: Object @@ -81,33 +78,45 @@ const LayoutProvider = defineComponent({ }, setup (props, context) { // Prevent reactivity when the page will be rerendered in a different suspense fork + // eslint-disable-next-line vue/no-setup-props-destructure + const name = props.name if (props.shouldProvide) { - // eslint-disable-next-line vue/no-setup-props-destructure - const name = props.name provide(LayoutMetaSymbol, { isCurrent: (route: RouteLocationNormalizedLoaded) => name === (route.meta.layout ?? 'default') }) } - let vnode: VNode + let vnode: VNode | undefined if (process.dev && process.client) { onMounted(() => { nextTick(() => { if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { - console.warn(`[nuxt] \`${props.name}\` layout does not have a single root node and will cause errors when navigating between routes.`) + if (name) { + console.warn(`[nuxt] \`${name}\` layout does not have a single root node and will cause errors when navigating between routes.`) + } else { + console.warn('[nuxt] `` needs to be passed a single root node in its default slot.') + } } }) }) } return () => { + if (!name || (typeof name === 'string' && !(name in layouts))) { + if (process.dev && process.client && props.hasTransition) { + vnode = context.slots.default?.() as VNode | undefined + return vnode + } + return context.slots.default?.() + } + if (process.dev && process.client && props.hasTransition) { - vnode = h(layouts[props.name], props.layoutProps, context.slots) + vnode = h(layouts[name], props.layoutProps, context.slots) return vnode } - return h(layouts[props.name], props.layoutProps, context.slots) + return h(layouts[name], props.layoutProps, context.slots) } } }) diff --git a/packages/nuxt/src/app/components/nuxt-root.vue b/packages/nuxt/src/app/components/nuxt-root.vue index 08a9fc669e..c39c0d7041 100644 --- a/packages/nuxt/src/app/components/nuxt-root.vue +++ b/packages/nuxt/src/app/components/nuxt-root.vue @@ -12,6 +12,7 @@ import { defineAsyncComponent, onErrorCaptured, onServerPrefetch, provide } from import { useNuxtApp } from '#app/nuxt' import { isNuxtError, showError, useError } from '#app/composables/error' import { useRoute } from '#app/composables/router' +import { PageRouteSymbol } from '#app/components/injections' import AppComponent from '#build/app-component.mjs' import ErrorComponent from '#build/error-component.mjs' @@ -27,7 +28,7 @@ const SingleRenderer = process.test && process.dev && process.server && url.star .then(r => r.default(process.server ? url : window.location.href))) // Inject default route (outside of pages) as active route -provide('_route', useRoute()) +provide(PageRouteSymbol, useRoute()) // vue:setup hook const results = nuxtApp.hooks.callHookWith(hooks => hooks.map(hook => hook()), 'vue:setup') diff --git a/packages/nuxt/src/app/components/route-provider.ts b/packages/nuxt/src/app/components/route-provider.ts new file mode 100644 index 0000000000..9e283895a9 --- /dev/null +++ b/packages/nuxt/src/app/components/route-provider.ts @@ -0,0 +1,57 @@ +import { computed, defineComponent, h, nextTick, onMounted, provide, reactive } from 'vue' +import type { Ref, VNode } from 'vue' +import type { RouteLocation, RouteLocationNormalizedLoaded } from '#vue-router' +import { PageRouteSymbol } from '#app/components/injections' + +export const RouteProvider = defineComponent({ + name: 'RouteProvider', + props: { + vnode: { + type: Object as () => VNode, + required: true + }, + route: { + type: Object as () => RouteLocationNormalizedLoaded, + required: true + }, + vnodeRef: Object as () => Ref, + renderKey: String, + trackRootNodes: Boolean + }, + setup (props) { + // Prevent reactivity when the page will be rerendered in a different suspense fork + // eslint-disable-next-line vue/no-setup-props-destructure + const previousKey = props.renderKey + // eslint-disable-next-line vue/no-setup-props-destructure + const previousRoute = props.route + + // Provide a reactive route within the page + const route = {} as RouteLocation + for (const key in props.route) { + (route as any)[key] = computed(() => previousKey === props.renderKey ? props.route[key as keyof RouteLocationNormalizedLoaded] : previousRoute[key as keyof RouteLocationNormalizedLoaded]) + } + + provide(PageRouteSymbol, reactive(route)) + + let vnode: VNode + if (process.dev && process.client && props.trackRootNodes) { + onMounted(() => { + nextTick(() => { + if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { + const filename = (vnode?.type as any).__file + console.warn(`[nuxt] \`${filename}\` does not have a single root node and will cause errors when navigating between routes.`) + } + }) + }) + } + + return () => { + if (process.dev && process.client) { + vnode = h(props.vnode, { ref: props.vnodeRef }) + return vnode + } + + return h(props.vnode, { ref: props.vnodeRef }) + } + } +}) diff --git a/packages/nuxt/src/app/composables/router.ts b/packages/nuxt/src/app/composables/router.ts index 84be97eb2c..131fa17858 100644 --- a/packages/nuxt/src/app/composables/router.ts +++ b/packages/nuxt/src/app/composables/router.ts @@ -10,6 +10,7 @@ import { createError, showError } from './error' import { useState } from './state' import type { PageMeta } from '#app' +import { PageRouteSymbol } from '#app/components/injections' export const useRouter: typeof _useRouter = () => { return useNuxtApp()?.$router as Router @@ -20,7 +21,7 @@ export const useRoute: typeof _useRoute = () => { console.warn('[nuxt] Calling `useRoute` within middleware may lead to misleading results. Instead, use the (to, from) arguments passed to the middleware to access the new and old routes.') } if (hasInjectionContext()) { - return inject('_route', useNuxtApp()._route) + return inject(PageRouteSymbol, useNuxtApp()._route) } return useNuxtApp()._route } diff --git a/packages/nuxt/src/pages/runtime/page.ts b/packages/nuxt/src/pages/runtime/page.ts index 02b065fbb8..b7cebd25a9 100644 --- a/packages/nuxt/src/pages/runtime/page.ts +++ b/packages/nuxt/src/pages/runtime/page.ts @@ -1,14 +1,15 @@ -import { Suspense, Transition, computed, defineComponent, h, inject, nextTick, onMounted, provide, reactive, ref } from 'vue' +import { Suspense, Transition, defineComponent, h, inject, nextTick, ref } from 'vue' import type { KeepAliveProps, TransitionProps, VNode } from 'vue' import { RouterView } from '#vue-router' import { defu } from 'defu' -import type { RouteLocation, RouteLocationNormalized, RouteLocationNormalizedLoaded } from '#vue-router' +import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from '#vue-router' import type { RouterViewSlotProps } from './utils' import { generateRouteKey, wrapInKeepAlive } from './utils' +import { RouteProvider } from '#app/components/route-provider' import { useNuxtApp } from '#app/nuxt' import { _wrapIf } from '#app/components/utils' -import { LayoutMetaSymbol } from '#app/components/layout' +import { LayoutMetaSymbol, PageRouteSymbol } from '#app/components/injections' // @ts-expect-error virtual file import { appKeepalive as defaultKeepaliveConfig, appPageTransition as defaultPageTransition } from '#build/nuxt.config.mjs' @@ -38,6 +39,7 @@ export default defineComponent({ setup (props, { attrs, expose }) { const nuxtApp = useNuxtApp() const pageRef = ref() + const forkRoute = inject(PageRouteSymbol, null) expose({ pageRef }) @@ -47,13 +49,32 @@ export default defineComponent({ return () => { return h(RouterView, { name: props.name, route: props.route, ...attrs }, { default: (routeProps: RouterViewSlotProps) => { - if (!routeProps.Component) { return } + const isRenderingNewRouteInOldFork = process.client && haveParentRoutesRendered(forkRoute, routeProps.route, routeProps.Component) + const hasSameChildren = process.client && forkRoute && forkRoute.matched.length === routeProps.route.matched.length + + if (!routeProps.Component) { + // If we're rendering a `` child route on navigation to a route which lacks a child page + // we'll render the old vnode until the new route finishes resolving + if (process.client && vnode && !hasSameChildren) { + return vnode + } + return + } // Return old vnode if we are rendering _new_ page suspense fork in _old_ layout suspense fork - if (vnode && _layoutMeta && !_layoutMeta.isCurrent(routeProps.route)) { + if (process.client && vnode && _layoutMeta && !_layoutMeta.isCurrent(routeProps.route)) { return vnode } + if (process.client && isRenderingNewRouteInOldFork && forkRoute && (!_layoutMeta || _layoutMeta?.isCurrent(forkRoute))) { + // if leaving a route with an existing child route, render the old vnode + if (hasSameChildren) { + return vnode + } + // If _leaving_ null child route, return null vnode + return null + } + const key = generateRouteKey(routeProps, props.pageKey) const done = nuxtApp.deferHydration() @@ -70,7 +91,17 @@ export default defineComponent({ suspensible: true, onPending: () => nuxtApp.callHook('page:start', routeProps.Component), onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) } - }, { default: () => h(RouteProvider, { key, routeProps, pageKey: key, hasTransition, pageRef } as {}) }) + }, { + // @ts-expect-error seems to be an issue in vue types + default: () => h(RouteProvider, { + key, + vnode: routeProps.Component, + route: routeProps.route, + renderKey: key, + trackRootNodes: hasTransition, + vnodeRef: pageRef + }) + }) )).default() return vnode @@ -92,45 +123,15 @@ function _mergeTransitionProps (routeProps: TransitionProps[]): TransitionProps return defu(..._props as [TransitionProps, TransitionProps]) } -const RouteProvider = defineComponent({ - name: 'RouteProvider', - // TODO: Type props - // eslint-disable-next-line vue/require-prop-types - props: ['routeProps', 'pageKey', 'hasTransition', 'pageRef'], - setup (props) { - // Prevent reactivity when the page will be rerendered in a different suspense fork - // eslint-disable-next-line vue/no-setup-props-destructure - const previousKey = props.pageKey - // eslint-disable-next-line vue/no-setup-props-destructure - const previousRoute = props.routeProps.route +function haveParentRoutesRendered (fork: RouteLocationNormalizedLoaded | null, newRoute: RouteLocationNormalizedLoaded, Component?: VNode) { + if (!fork) { return false } - // Provide a reactive route within the page - const route = {} as RouteLocation - for (const key in props.routeProps.route) { - (route as any)[key] = computed(() => previousKey === props.pageKey ? props.routeProps.route[key] : previousRoute[key]) - } + const index = newRoute.matched.findIndex(m => m.components?.default === Component?.type) + if (!index || index === -1) { return false } - provide('_route', reactive(route)) - - let vnode: VNode - if (process.dev && process.client && props.hasTransition) { - onMounted(() => { - nextTick(() => { - if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { - const filename = (vnode?.type as any).__file - console.warn(`[nuxt] \`${filename}\` does not have a single root node and will cause errors when navigating between routes.`) - } - }) - }) - } - - return () => { - if (process.dev && process.client) { - vnode = h(props.routeProps.Component, { ref: props.pageRef }) - return vnode - } - - return h(props.routeProps.Component, { ref: props.pageRef }) - } - } -}) + // we only care whether the parent route components have had to rerender + return newRoute.matched.slice(0, index) + .some( + (c, i) => c.components?.default !== fork.matched[i]?.components?.default) || + (Component && generateRouteKey({ route: newRoute, Component }) !== generateRouteKey({ route: fork, Component })) +} diff --git a/test/basic.test.ts b/test/basic.test.ts index 7b28c950e4..da48d3defa 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1037,21 +1037,31 @@ describe('deferred app suspense resolve', () => { }) describe('nested suspense', () => { - const navigations = [ + const navigations = ([ ['/suspense/sync-1/async-1/', '/suspense/sync-2/async-1/'], ['/suspense/sync-1/sync-1/', '/suspense/sync-2/async-1/'], ['/suspense/async-1/async-1/', '/suspense/async-2/async-1/'], ['/suspense/async-1/sync-1/', '/suspense/async-2/async-1/'] - ] + ]).flatMap(([start, end]) => [ + [start, end], + [start, end + '?layout=custom'], + [start + '?layout=custom', end] + ]) it.each(navigations)('should navigate from %s to %s with no white flash', async (start, nav) => { const page = await createPage(start, {}) + const logs: string[] = [] + page.on('console', (msg) => { + const text = msg.text() + if (text.includes('[vite]') || text.includes(' is an experimental feature')) { return } + logs.push(msg.text()) + }) await page.waitForLoadState('networkidle') - const slug = nav.replace(/[/-]+/g, '-') + const slug = nav.replace(/\?.*$/, '').replace(/[/-]+/g, '-') await page.click(`[href^="${nav}"]`) - const text = await page.waitForFunction(slug => document.querySelector(`#${slug}`)?.innerHTML, slug) + const text = await page.waitForFunction(slug => document.querySelector(`main:has(#child${slug})`)?.innerHTML, slug) // @ts-expect-error TODO: fix upstream in playwright - types for evaluate are broken .then(r => r.evaluate(r => r)) @@ -1061,6 +1071,114 @@ describe('nested suspense', () => { // const text = await parent.innerText() expect(text).toContain('Async child: 2 - 1') + expect(text).toContain('parent: 2') + + const first = start.match(/\/suspense\/(?a?sync)-(?\d)\/(?a?sync)-(?\d)\//)!.groups! + const last = nav.match(/\/suspense\/(?a?sync)-(?\d)\/(?a?sync)-(?\d)\//)!.groups! + + expect(logs.sort()).toEqual([ + // [first load] from parent + `[${first.parentType}]`, + ...first.parentType === 'async' ? ['[async] running async data'] : [], + // [first load] from child + `[${first.parentType}] [${first.childType}]`, + ...first.childType === 'async' ? [`[${first.parentType}] [${first.parentNum}] [async] [${first.childNum}] running async data`] : [], + // [navigation] from parent + `[${last.parentType}]`, + ...last.parentType === 'async' ? ['[async] running async data'] : [], + // [navigation] from child + `[${last.parentType}] [${last.childType}]`, + ...last.childType === 'async' ? [`[${last.parentType}] [${last.parentNum}] [async] [${last.childNum}] running async data`] : [] + ].sort()) + + await page.close() + }) + + const outwardNavigations = [ + ['/suspense/async-2/async-1/', '/suspense/async-1/'], + ['/suspense/async-2/sync-1/', '/suspense/async-1/'] + ] + + it.each(outwardNavigations)('should navigate from %s to a parent %s with no white flash', async (start, nav) => { + const page = await createPage(start, {}) + const logs: string[] = [] + page.on('console', (msg) => { + const text = msg.text() + if (text.includes('[vite]') || text.includes(' is an experimental feature')) { return } + logs.push(msg.text()) + }) + await page.waitForLoadState('networkidle') + + await page.waitForSelector(`main:has(#child${start.replace(/[/-]+/g, '-')})`) + + const slug = start.replace(/[/-]+/g, '-') + await page.click(`[href^="${nav}"]`) + + // wait until child selector disappears and grab HTML of parent + const text = await page.waitForFunction(slug => document.querySelector(`main:not(:has(#child${slug}))`)?.innerHTML, slug) + // @ts-expect-error TODO: fix upstream in playwright - types for evaluate are broken + .then(r => r.evaluate(r => r)) + + expect(text).toContain('Async parent: 1') + + const first = start.match(/\/suspense\/(?a?sync)-(?\d)\/(?a?sync)-(?\d)\//)!.groups! + const last = nav.match(/\/suspense\/(?a?sync)-(?\d)\//)!.groups! + + expect(logs.sort()).toEqual([ + // [first load] from parent + `[${first.parentType}]`, + ...first.parentType === 'async' ? ['[async] running async data'] : [], + // [first load] from child + `[${first.parentType}] [${first.childType}]`, + ...first.childType === 'async' ? [`[${first.parentType}] [${first.parentNum}] [async] [${first.childNum}] running async data`] : [], + // [navigation] from parent + `[${last.parentType}]`, + ...last.parentType === 'async' ? ['[async] running async data'] : [] + ].sort()) + + await page.close() + }) + + const inwardNavigations = [ + ['/suspense/async-2/', '/suspense/async-1/async-1/'], + ['/suspense/async-2/', '/suspense/async-1/sync-1/'] + ] + + it.each(inwardNavigations)('should navigate from %s to a child %s with no white flash', async (start, nav) => { + const page = await createPage(start, {}) + const logs: string[] = [] + page.on('console', (msg) => { + const text = msg.text() + if (text.includes('[vite]') || text.includes(' is an experimental feature')) { return } + logs.push(msg.text()) + }) + await page.waitForLoadState('networkidle') + + const slug = nav.replace(/[/-]+/g, '-') + await page.click(`[href^="${nav}"]`) + + // wait until child selector appears and grab HTML of parent + const text = await page.waitForFunction(slug => document.querySelector(`main:has(#child${slug})`)?.innerHTML, slug) + // @ts-expect-error TODO: fix upstream in playwright - types for evaluate are broken + .then(r => r.evaluate(r => r)) + + // const text = await parent.innerText() + expect(text).toContain('Async parent: 1') + + const first = start.match(/\/suspense\/(?a?sync)-(?\d)\//)!.groups! + const last = nav.match(/\/suspense\/(?a?sync)-(?\d)\/(?a?sync)-(?\d)\//)!.groups! + + expect(logs.sort()).toEqual([ + // [first load] from parent + `[${first.parentType}]`, + ...first.parentType === 'async' ? ['[async] running async data'] : [], + // [navigation] from parent + `[${last.parentType}]`, + ...last.parentType === 'async' ? ['[async] running async data'] : [], + // [navigation] from child + `[${last.parentType}] [${last.childType}]`, + ...last.childType === 'async' ? [`[${last.parentType}] [${last.parentNum}] [async] [${last.childNum}] running async data`] : [] + ].sort()) await page.close() }) diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 59521916c6..87b06720d5 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -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('"64.0k"') + expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.1k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2329k"') diff --git a/test/fixtures/basic/pages/suspense.vue b/test/fixtures/basic/pages/suspense.vue index 0e082baa04..9621feb431 100644 --- a/test/fixtures/basic/pages/suspense.vue +++ b/test/fixtures/basic/pages/suspense.vue @@ -1,18 +1,42 @@