From 21e3e17cfa7676f02c66bf2bc8e054f06ef03822 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 2 Mar 2023 15:28:15 +0000 Subject: [PATCH 01/30] feat(vite): add `node_modules` and buildDir to `x_google_ignoreList` (#19243) --- packages/vite/src/vite.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index 4797ec4090..f6491a8243 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -64,6 +64,9 @@ export async function bundle (nuxt: Nuxt) { copyPublicDir: false, rollupOptions: { output: { + sourcemapIgnoreList: (relativeSourcePath) => { + return relativeSourcePath.includes('/node_modules/') || relativeSourcePath.includes(ctx.nuxt.options.buildDir) + }, sanitizeFileName: sanitizeFilePath, // https://github.com/vitejs/vite/tree/main/packages/vite/src/node/build.ts#L464-L478 assetFileNames: nuxt.options.dev From e3fe706625aaf751d5f9990bfaa66ef30f562d8b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 08:54:03 -0800 Subject: [PATCH 02/30] chore(deps): update all non-major dependencies to ^1.1.15 (main) (#19395) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/nuxt/package.json | 6 +-- packages/schema/package.json | 2 +- pnpm-lock.yaml | 74 ++++++++++++++++++------------------ 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 82ec4f66bd..59f3ebea03 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -47,10 +47,10 @@ "@nuxt/telemetry": "^2.1.10", "@nuxt/ui-templates": "^1.1.1", "@nuxt/vite-builder": "3.2.3", - "@unhead/ssr": "^1.1.14", + "@unhead/ssr": "^1.1.15", "@vue/reactivity": "^3.2.47", "@vue/shared": "^3.2.47", - "@vueuse/head": "^1.1.9", + "@vueuse/head": "^1.1.15", "chokidar": "^3.5.3", "cookie-es": "^0.5.0", "defu": "^6.1.2", @@ -77,7 +77,7 @@ "ufo": "^1.1.1", "unctx": "^2.1.2", "unenv": "^1.2.1", - "unhead": "^1.1.14", + "unhead": "^1.1.15", "unimport": "^3.0.2", "unplugin": "^1.1.0", "untyped": "^1.2.2", diff --git a/packages/schema/package.json b/packages/schema/package.json index b1f98f03ac..b9a55fbb7f 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@types/lodash.template": "^4", "@types/semver": "^7.3.13", - "@unhead/schema": "^1.1.14", + "@unhead/schema": "^1.1.15", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.0", "nitropack": "^2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9aae88774..0721fed0fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -418,10 +418,10 @@ importers: '@nuxt/vite-builder': workspace:* '@types/fs-extra': ^11.0.1 '@types/hash-sum': ^1.0.0 - '@unhead/ssr': ^1.1.14 + '@unhead/ssr': ^1.1.15 '@vue/reactivity': ^3.2.47 '@vue/shared': ^3.2.47 - '@vueuse/head': ^1.1.9 + '@vueuse/head': ^1.1.15 chokidar: ^3.5.3 cookie-es: ^0.5.0 defu: ^6.1.2 @@ -449,7 +449,7 @@ importers: unbuild: ^1.1.2 unctx: ^2.1.2 unenv: ^1.2.1 - unhead: ^1.1.14 + unhead: ^1.1.15 unimport: ^3.0.2 unplugin: ^1.1.0 untyped: ^1.2.2 @@ -464,10 +464,10 @@ importers: '@nuxt/telemetry': 2.1.10 '@nuxt/ui-templates': 1.1.1 '@nuxt/vite-builder': link:../vite - '@unhead/ssr': 1.1.14 + '@unhead/ssr': 1.1.15 '@vue/reactivity': 3.2.47 '@vue/shared': 3.2.47 - '@vueuse/head': 1.1.9_vue@3.2.47 + '@vueuse/head': 1.1.15_vue@3.2.47 chokidar: 3.5.3 cookie-es: 0.5.0 defu: 6.1.2 @@ -494,7 +494,7 @@ importers: ufo: 1.1.1 unctx: 2.1.2 unenv: 1.2.1 - unhead: 1.1.14 + unhead: 1.1.15 unimport: 3.0.2 unplugin: 1.1.0 untyped: 1.2.2 @@ -511,7 +511,7 @@ importers: specifiers: '@types/lodash.template': ^4 '@types/semver': ^7.3.13 - '@unhead/schema': ^1.1.14 + '@unhead/schema': ^1.1.15 '@vitejs/plugin-vue': ^4.0.0 '@vitejs/plugin-vue-jsx': ^3.0.0 c12: ^1.1.2 @@ -547,7 +547,7 @@ importers: devDependencies: '@types/lodash.template': 4.5.1 '@types/semver': 7.3.13 - '@unhead/schema': 1.1.14 + '@unhead/schema': 1.1.15 '@vitejs/plugin-vue': 4.0.0_vite@4.1.4 '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.4 nitropack: 2.2.3 @@ -2300,41 +2300,41 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@unhead/dom/1.1.14: - resolution: {integrity: sha512-a1sc1m+MknBdhecYbH3ubYRgNly5mIi+u35OJ6wo0jKclsdO0TsQ1uNwfEqxZZTs2RUH0p67w6fvjk2QSSjv4A==} + /@unhead/dom/1.1.15: + resolution: {integrity: sha512-b1S8avVokif15pankINlFrKrxW2pEJ4R4vt/IEDLhjsAq4oDeLpbFUQNvFeEQafaXBdryCTWICJX8MQrzs9INA==} dependencies: - '@unhead/schema': 1.1.14 - '@unhead/shared': 1.1.14 + '@unhead/schema': 1.1.15 + '@unhead/shared': 1.1.15 dev: false - /@unhead/schema/1.1.14: - resolution: {integrity: sha512-oxC9JyMJGjhFpRJRzD78sJutdVzkPnmxAse+9s2GCBmYiLuBbkzaTUozutjor6Y7/DkoD3MsqPGEIOo+H/UsUw==} + /@unhead/schema/1.1.15: + resolution: {integrity: sha512-331yP1JrJfvaa2TvfiVGLlgwl9bVgFVJ0pMy1hPBM/0+J09d6SKy4khZb2j0WtgVofY6FnThmKWDNCngCzRZhg==} dependencies: hookable: 5.4.2 zhead: 2.0.4 - /@unhead/shared/1.1.14: - resolution: {integrity: sha512-V230FvL39gkMqDHocI7cDg1oFSyn/bQa8xbKVNOrDVRVDc9QKoMccLMyE0T7cwXWcA4tAwJF2NlLRZbowpwFcw==} + /@unhead/shared/1.1.15: + resolution: {integrity: sha512-s41AbZFeTAV982pP5+MUno3UlKcSxziMjs+D6TAKP+OdNhyN/W557TUVKbBY/4EWWYl5c0wJhjeuVduJBQpSSQ==} dependencies: - '@unhead/schema': 1.1.14 + '@unhead/schema': 1.1.15 dev: false - /@unhead/ssr/1.1.14: - resolution: {integrity: sha512-t7TBISnDj9xgqBPlSxahx7kzJs+eaDBjcINsv+2CY7Q7A7XpZ4bJiOSem86/rY1nBNV+Gx/WPdLs9D81y8DO+Q==} + /@unhead/ssr/1.1.15: + resolution: {integrity: sha512-ZDj3lJuMOTrhDrNFQLETC1xQN2z53GzXV4kRQ6Baeqb9uDR+3q1yeHV+eL7DEqR8aPCHt26gs5c8OYJsfE1HFQ==} dependencies: - '@unhead/schema': 1.1.14 - '@unhead/shared': 1.1.14 + '@unhead/schema': 1.1.15 + '@unhead/shared': 1.1.15 dev: false - /@unhead/vue/1.1.14_vue@3.2.47: - resolution: {integrity: sha512-CRb8YgfcKm8/FtbWip/kiZEkGfYD6iCYXigbIrPFOKJr/EsZoFWH3FeJiu4ZL4hkaSydTmFGMSQxCxkwTQ9e0w==} + /@unhead/vue/1.1.15_vue@3.2.47: + resolution: {integrity: sha512-EX8zsb3dNhC72tpz6BExK3oIpy2t6f2QbpYsr6gthgtLMJqe8SPjgJlKGcVEegZhPw4bmMzMk72Dak3qomb98A==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/schema': 1.1.14 - '@unhead/shared': 1.1.14 + '@unhead/schema': 1.1.15 + '@unhead/shared': 1.1.15 hookable: 5.4.2 - unhead: 1.1.14 + unhead: 1.1.15 vue: 3.2.47 dev: false @@ -2790,15 +2790,15 @@ packages: - vue dev: true - /@vueuse/head/1.1.9_vue@3.2.47: - resolution: {integrity: sha512-J6OT32x1MnFs6a90DdusFfxPZYupYGR1kItDTw06Lj6ZORJRG1Del1BEy5FFXI7mhuIM4/nGLXgW+FtLE6JJQQ==} + /@vueuse/head/1.1.15_vue@3.2.47: + resolution: {integrity: sha512-LJqvb7dpSqnsdn6YWUxv97vWCnn/s6IfBrE4ih5kRlh8XQXr/HjXJ8IyIxxp0X7QDr3FhOsjRDpJSiQbDYbBdQ==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/dom': 1.1.14 - '@unhead/schema': 1.1.14 - '@unhead/ssr': 1.1.14 - '@unhead/vue': 1.1.14_vue@3.2.47 + '@unhead/dom': 1.1.15 + '@unhead/schema': 1.1.15 + '@unhead/ssr': 1.1.15 + '@unhead/vue': 1.1.15_vue@3.2.47 vue: 3.2.47 dev: false @@ -8188,12 +8188,12 @@ packages: node-fetch-native: 1.0.2 pathe: 1.1.0 - /unhead/1.1.14: - resolution: {integrity: sha512-tFy0nLOyiKmIVzfz5HuSRzVi55XuRS1G8LslrWn42tezssuZw6JqiscUJZRI14rNdcwhtcQV2iTy4Uw7s1uZrA==} + /unhead/1.1.15: + resolution: {integrity: sha512-rpOTD35CDz9KFvBKt42KRKZRsYIDY7Sjh5XhBL2SH6XUHdRdqTDIVjHtrxIwRQkfnMdUAZUSy6KYaiAMQFUOiw==} dependencies: - '@unhead/dom': 1.1.14 - '@unhead/schema': 1.1.14 - '@unhead/shared': 1.1.14 + '@unhead/dom': 1.1.15 + '@unhead/schema': 1.1.15 + '@unhead/shared': 1.1.15 hookable: 5.4.2 dev: false From f3c82d5797a04ed6981bb021a1658645dd18d232 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 2 Mar 2023 16:57:55 +0000 Subject: [PATCH 03/30] chore: bump edge version based on commits (#19397) --- scripts/bump-edge.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/bump-edge.ts b/scripts/bump-edge.ts index f48951bb70..1d1cbc9e7e 100644 --- a/scripts/bump-edge.ts +++ b/scripts/bump-edge.ts @@ -1,6 +1,8 @@ import { execSync } from 'node:child_process' import { $fetch } from 'ofetch' import { inc } from 'semver' +import { getGitDiff, determineSemverChange, loadChangelogConfig, parseCommits } from 'changelogen' +import { execaSync } from 'execa' import { loadWorkspace } from './_utils' async function main () { @@ -14,9 +16,15 @@ async function main () { const latestNitro = nitroInfo['dist-tags'].latest nuxtPkg.data.dependencies.nitropack = `npm:nitropack-edge@^${latestNitro}` + const config = await loadChangelogConfig(process.cwd()) + + const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0']).stdout + + const commits = await getGitDiff(latestTag) + const bumpType = determineSemverChange(parseCommits(commits, config), config) + for (const pkg of workspace.packages.filter(p => !p.data.private)) { - // TODO: Set release type based on changelog after 3.0.0 - const newVersion = inc(pkg.data.version, 'prerelease', 'rc') + const newVersion = inc(pkg.data.version, bumpType || 'prerelease') workspace.setVersion(pkg.data.name, `${newVersion}-${date}.${commit}`) const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge') workspace.rename(pkg.data.name, newname) From 2cf5f486212bb5deab21d7f177bbaf831abb5f2c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 06:46:30 +0000 Subject: [PATCH 04/30] chore(deps): update all non-major dependencies (main) (#19404) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +-- packages/test-utils/package.json | 2 +- pnpm-lock.yaml | 62 ++++++++++++++++++++++++-------- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index e6b0b2bff0..43e082efbc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "changelogen": "^0.4.1", "crawler": "^1.4.0", "eslint": "^8.35.0", - "eslint-plugin-jsdoc": "^40.0.0", + "eslint-plugin-jsdoc": "^40.0.1", "execa": "^7.0.0", "expect-type": "^0.15.0", "globby": "^13.1.3", @@ -67,7 +67,7 @@ "nuxt": "workspace:*", "ofetch": "^1.0.1", "pathe": "^1.1.0", - "rimraf": "^4.1.3", + "rimraf": "^4.2.0", "semver": "^7.3.8", "std-env": "^3.3.2", "typescript": "^4.9.5", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 9722c1755a..3b2249fdae 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -24,7 +24,7 @@ "pathe": "^1.1.0" }, "devDependencies": { - "playwright": "^1.31.1", + "playwright": "^1.31.2", "unbuild": "latest", "vitest": "^0.29.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0721fed0fa..9a482528c6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: changelogen: ^0.4.1 crawler: ^1.4.0 eslint: ^8.35.0 - eslint-plugin-jsdoc: ^40.0.0 + eslint-plugin-jsdoc: ^40.0.1 execa: ^7.0.0 expect-type: ^0.15.0 globby: ^13.1.3 @@ -44,7 +44,7 @@ importers: nuxt: workspace:* ofetch: ^1.0.1 pathe: ^1.1.0 - rimraf: ^4.1.3 + rimraf: ^4.2.0 semver: ^7.3.8 std-env: ^3.3.2 typescript: ^4.9.5 @@ -70,7 +70,7 @@ importers: changelogen: 0.4.1 crawler: 1.4.0 eslint: 8.35.0 - eslint-plugin-jsdoc: 40.0.0_eslint@8.35.0 + eslint-plugin-jsdoc: 40.0.1_eslint@8.35.0 execa: 7.0.0 expect-type: 0.15.0 globby: 13.1.3 @@ -80,7 +80,7 @@ importers: nuxt: link:packages/nuxt ofetch: 1.0.1 pathe: 1.1.0 - rimraf: 4.1.3 + rimraf: 4.2.0 semver: 7.3.8 std-env: 3.3.2 typescript: 4.9.5 @@ -565,7 +565,7 @@ importers: jiti: ^1.17.1 ofetch: ^1.0.1 pathe: ^1.1.0 - playwright: ^1.31.1 + playwright: ^1.31.2 unbuild: ^1.1.2 vitest: ^0.29.2 dependencies: @@ -579,7 +579,7 @@ importers: ofetch: 1.0.1 pathe: 1.1.0 devDependencies: - playwright: 1.31.1 + playwright: 1.31.2 unbuild: 1.1.2 vitest: 0.29.2 @@ -4462,8 +4462,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/40.0.0_eslint@8.35.0: - resolution: {integrity: sha512-LOPyIu1vAVvGPkye3ci0moj0iNf3f8bmin6do2DYDj+77NRXWnkmhKRy8swWsatUs3mB5jYPWPUsFg9pyfEiyA==} + /eslint-plugin-jsdoc/40.0.1_eslint@8.35.0: + resolution: {integrity: sha512-KkiRInury7YrjjV5aCHDxwsPy6XFt5p2b2CnpDMITnWs8patNPf5kj24+VXIWw45kP6z/B0GOKfrYczB56OjQQ==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -5160,6 +5160,16 @@ packages: minimatch: 5.1.6 once: 1.4.0 + /glob/9.2.1: + resolution: {integrity: sha512-Pxxgq3W0HyA3XUvSXcFhRSs+43Jsx0ddxcFrbjxNGkL2Ak5BAUBxLqI5G6ADDeCHLfzzXFhe0b1yYcctGmytMA==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + fs.realpath: 1.0.0 + minimatch: 7.4.2 + minipass: 4.2.4 + path-scurry: 1.6.1 + dev: true + /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -6187,6 +6197,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch/7.4.2: + resolution: {integrity: sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist/1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -6201,6 +6218,11 @@ packages: resolution: {integrity: sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==} engines: {node: '>=8'} + /minipass/4.2.4: + resolution: {integrity: sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==} + engines: {node: '>=8'} + dev: true + /minizlib/2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} @@ -6698,6 +6720,14 @@ packages: /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + /path-scurry/1.6.1: + resolution: {integrity: sha512-OW+5s+7cw6253Q4E+8qQ/u1fVvcJQCJo/VFD8pje+dbJCF1n5ZRMV2AEHbGp+5Q7jxQIYJxkHopnj6nzdGeZLA==} + engines: {node: '>=14'} + dependencies: + lru-cache: 7.16.0 + minipass: 4.2.4 + dev: true + /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -6744,19 +6774,19 @@ packages: mlly: 1.1.1 pathe: 1.1.0 - /playwright-core/1.31.1: - resolution: {integrity: sha512-JTyX4kV3/LXsvpHkLzL2I36aCdml4zeE35x+G5aPc4bkLsiRiQshU5lWeVpHFAuC8xAcbI6FDcw/8z3q2xtJSQ==} + /playwright-core/1.31.2: + resolution: {integrity: sha512-a1dFgCNQw4vCsG7bnojZjDnPewZcw7tZUNFN0ZkcLYKj+mPmXvg4MpaaKZ5SgqPsOmqIf2YsVRkgqiRDxD+fDQ==} engines: {node: '>=14'} hasBin: true dev: true - /playwright/1.31.1: - resolution: {integrity: sha512-zKJabsIA2rvOwJ12lGTqWv4HVJzlfw2JtUvO4hAr7J8UXQZ1qEPpX20E1vcz/9fotnTkwgqp3CVdIBwptBN3Fg==} + /playwright/1.31.2: + resolution: {integrity: sha512-jpC47n2PKQNtzB7clmBuWh6ftBRS/Bt5EGLigJ9k2QAKcNeYXZkEaDH5gmvb6+AbcE0DO6GnXdbl9ogG6Eh+og==} engines: {node: '>=14'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.31.1 + playwright-core: 1.31.2 dev: true /pluralize/8.0.0: @@ -7352,10 +7382,12 @@ packages: dependencies: glob: 7.2.3 - /rimraf/4.1.3: - resolution: {integrity: sha512-iyzalDLo3l5FZxxaIGUY7xI4Bf90Xt7pCipc1Mr7RsdU7H3538z+M0tlsUDrz0aHeGS9uNqiKHUJyTewwRP91Q==} + /rimraf/4.2.0: + resolution: {integrity: sha512-tPt+gLORNVqRCk0NwuJ5SlMEcOGvt4CCU8sUPqgCFtCbnoNCTd9Q6vq7JlBbxQlACiH14OR28y7piA2Bak9Sxw==} engines: {node: '>=14'} hasBin: true + dependencies: + glob: 9.2.1 dev: true /rollup-plugin-dts/5.2.0_fn2onl6nbsljlgjr3jlzr6w7we: From 654b9a21d7af83589f5f40ce11455f8623785a32 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Fri, 3 Mar 2023 10:20:15 +0000 Subject: [PATCH 05/30] fix(schema): update vite `import.meta` types (#19338) --- packages/nuxt/src/app/config.ts | 2 +- packages/schema/src/types/global/vite.ts | 117 +++++++++++++++++++++-- 2 files changed, 109 insertions(+), 10 deletions(-) diff --git a/packages/nuxt/src/app/config.ts b/packages/nuxt/src/app/config.ts index 0c3dd95baa..99eddf85a9 100644 --- a/packages/nuxt/src/app/config.ts +++ b/packages/nuxt/src/app/config.ts @@ -65,7 +65,7 @@ if (process.dev) { // Vite if (import.meta.hot) { import.meta.hot.accept((newModule) => { - const newConfig = newModule._getAppConfig() + const newConfig = newModule?._getAppConfig() applyHMR(newConfig) }) } diff --git a/packages/schema/src/types/global/vite.ts b/packages/schema/src/types/global/vite.ts index 18979845e3..58199475b9 100644 --- a/packages/schema/src/types/global/vite.ts +++ b/packages/schema/src/types/global/vite.ts @@ -1,35 +1,134 @@ /** * Reference: https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts */ +export type ModuleNamespace = Record & { + [Symbol.toStringTag]: 'Module' +} export interface ViteHot { readonly data: any accept (): void - accept (cb: (mod: any) => void): void - accept (dep: string, cb: (mod: any) => void): void - accept (deps: readonly string[], cb: (mods: any[]) => void): void + accept (cb: (mod: ModuleNamespace | undefined) => void): void + accept (dep: string, cb: (mod: ModuleNamespace | undefined) => void): void + accept (deps: readonly string[], cb: (mods: Array) => void): void + acceptExports (exportNames: string | readonly string[], cb?: (mod: ModuleNamespace | undefined) => void): void dispose (cb: (data: any) => void): void - decline (): void - invalidate (): void + prune (cb: (data: any) => void): void + invalidate (message?: string): void on (event: any, cb: (payload: any) => void): void send (event: any, data?: any): void } -export interface ViteGlobOptions { - as?: string - eager?: boolean +export interface KnownAsTypeMap { + raw: string + url: string + worker: Worker +} + +export interface ImportGlobOptions< + Eager extends boolean, + AsType extends string +> { + /** + * Import type for the import url. + */ + as?: AsType + /** + * Import as static or dynamic + * + * @default false + */ + eager?: Eager + /** + * Import only the specific named export. Set to `default` to import the default export. + */ import?: string + /** + * Custom queries + */ query?: string | Record + /** + * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance. + * + * @default false + */ exhaustive?: boolean } +export interface ImportGlobFunction { + /** + * Import a list of files with a glob pattern. + * + * Overload 1: No generic provided, infer the type from `eager` and `as` + */ + < + Eager extends boolean, + As extends string, + T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown + >( + glob: string | string[], + options?: ImportGlobOptions + ): (Eager extends true + ? true + : false) extends true + ? Record + : Record Promise> + /** + * Import a list of files with a glob pattern. + * + * Overload 2: Module generic provided, infer the type from `eager: false` + */ + ( + glob: string | string[], + options?: ImportGlobOptions + ): Record Promise> + /** + * Import a list of files with a glob pattern. + * + * Overload 3: Module generic provided, infer the type from `eager: true` + */ + ( + glob: string | string[], + options: ImportGlobOptions + ): Record +} + +export interface ImportGlobEagerFunction { + /** + * Eagerly import a list of files with a glob pattern. + * + * Overload 1: No generic provided, infer the type from `as` + */ + < + As extends string, + T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown + >( + glob: string | string[], + options?: Omit, 'eager'> + ): Record + /** + * Eagerly import a list of files with a glob pattern. + * + * Overload 2: Module generic provided + */ + ( + glob: string | string[], + options?: Omit, 'eager'> + ): Record +} + export interface ViteImportMeta { /** Vite client HMR API - see https://vitejs.dev/guide/api-hmr.html */ readonly hot?: ViteHot /** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */ - glob (glob: string | string[], options?: ViteGlobOptions): Record Promise>> + glob: ImportGlobFunction + + /** + * @deprecated Use `import.meta.glob('*', { eager: true })` instead + */ + globEager: ImportGlobEagerFunction } From 171288586d09897701fdce2418ac5e5bceffa6fb Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 10:34:47 +0000 Subject: [PATCH 06/30] chore: add branch to edge release script --- scripts/bump-edge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bump-edge.ts b/scripts/bump-edge.ts index 1d1cbc9e7e..aa33d76f86 100644 --- a/scripts/bump-edge.ts +++ b/scripts/bump-edge.ts @@ -18,7 +18,7 @@ async function main () { const config = await loadChangelogConfig(process.cwd()) - const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0']).stdout + const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0', 'main']).stdout const commits = await getGitDiff(latestTag) const bumpType = determineSemverChange(parseCommits(commits, config), config) From 73ade185b2e5d5fa1b2d659cb5c8f7d8d63a8ac5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 10:35:25 +0000 Subject: [PATCH 07/30] fix(vite): omit `/` from `sourcemapIgnoreList` for windows support --- packages/vite/src/vite.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index f6491a8243..e3bcd17d14 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -65,7 +65,7 @@ export async function bundle (nuxt: Nuxt) { rollupOptions: { output: { sourcemapIgnoreList: (relativeSourcePath) => { - return relativeSourcePath.includes('/node_modules/') || relativeSourcePath.includes(ctx.nuxt.options.buildDir) + return relativeSourcePath.includes('node_modules') || relativeSourcePath.includes(ctx.nuxt.options.buildDir) }, sanitizeFileName: sanitizeFilePath, // https://github.com/vitejs/vite/tree/main/packages/vite/src/node/build.ts#L464-L478 From 6084f6416be4192c891e6ee4c06525dfa96951b3 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 3 Mar 2023 11:40:24 +0100 Subject: [PATCH 08/30] fix(nuxt): pass transform options to component loader plugin (#19414) --- packages/nuxt/src/components/module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nuxt/src/components/module.ts b/packages/nuxt/src/components/module.ts index afc7047f43..71472e66d6 100644 --- a/packages/nuxt/src/components/module.ts +++ b/packages/nuxt/src/components/module.ts @@ -202,6 +202,7 @@ export default defineNuxtModule({ sourcemap: nuxt.options.sourcemap[mode], getComponents, mode, + transform: typeof nuxt.options.components === 'object' && !Array.isArray(nuxt.options.components) ? nuxt.options.components.transform : undefined, experimentalComponentIslands: nuxt.options.experimental.componentIslands })) }) @@ -219,6 +220,7 @@ export default defineNuxtModule({ sourcemap: nuxt.options.sourcemap[mode], getComponents, mode, + transform: typeof nuxt.options.components === 'object' && !Array.isArray(nuxt.options.components) ? nuxt.options.components.transform : undefined, experimentalComponentIslands: nuxt.options.experimental.componentIslands })) }) From e11d55a4922978b89a2c50bf577124b09449e89c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 10:45:47 +0000 Subject: [PATCH 09/30] ci: fetch git history --- .github/workflows/ci.yml | 2 ++ scripts/bump-edge.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6726e35d44..9114eeb532 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,6 +172,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - run: corepack enable - uses: actions/setup-node@v3 with: diff --git a/scripts/bump-edge.ts b/scripts/bump-edge.ts index aa33d76f86..1d1cbc9e7e 100644 --- a/scripts/bump-edge.ts +++ b/scripts/bump-edge.ts @@ -18,7 +18,7 @@ async function main () { const config = await loadChangelogConfig(process.cwd()) - const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0', 'main']).stdout + const latestTag = execaSync('git', ['describe', '--tags', '--abbrev=0']).stdout const commits = await getGitDiff(latestTag) const bumpType = determineSemverChange(parseCommits(commits, config), config) From 842c4e635db683822a77bc35cb5c3715bf31f342 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Fri, 3 Mar 2023 10:57:56 +0000 Subject: [PATCH 10/30] chore: add chore to type of change in pr template (#19420) --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 98aa03da49..ebfdd8c008 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,6 +17,7 @@ Please carefully read the contribution docs before creating a pull request - [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue) - [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance) - [ ] โœจ New feature (a non-breaking change that adds functionality) +- [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries) - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change) ### ๐Ÿ“š Description @@ -33,4 +34,3 @@ Please carefully read the contribution docs before creating a pull request - [ ] I have linked an issue or discussion. - [ ] I have updated the documentation accordingly. - From 93c31cfd5be91f401f88333aa32d9b964ac96b32 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Fri, 3 Mar 2023 10:58:15 +0000 Subject: [PATCH 11/30] chore: mark `@nuxt/test-utils` package as external group (#19419) --- .eslintrc | 10 ++++++++++ test/basic.test.ts | 1 - test/hmr.test.ts | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index ccc3ae8e4f..ab0d96eefd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -24,6 +24,16 @@ "jsdoc/require-returns": "off", "jsdoc/require-param-type": "off", "no-redeclare": "off", + "import/order": [ + "error", { + "pathGroups": [ + { + "pattern": "@nuxt/test-utils", + "group": "external" + } + ] + } + ], "import/no-restricted-paths": [ "error", { diff --git a/test/basic.test.ts b/test/basic.test.ts index 3bb086397a..6c7410def1 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -3,7 +3,6 @@ import { describe, expect, it } from 'vitest' import { joinURL, withQuery } from 'ufo' import { isCI, isWindows } from 'std-env' import { normalize } from 'pathe' -// eslint-disable-next-line import/order import { setup, fetch, $fetch, startServer, isDev, createPage, url } from '@nuxt/test-utils' import type { NuxtIslandResponse } from '../packages/nuxt/src/core/runtime/nitro/renderer' diff --git a/test/hmr.test.ts b/test/hmr.test.ts index 184975d280..1be25aca44 100644 --- a/test/hmr.test.ts +++ b/test/hmr.test.ts @@ -3,7 +3,6 @@ import { fileURLToPath } from 'node:url' import { describe, expect, it } from 'vitest' import { isWindows } from 'std-env' import { join } from 'pathe' -// eslint-disable-next-line import/order import { setup, $fetch } from '@nuxt/test-utils' import { expectWithPolling, renderPage } from './utils' From 78f1c330c13430f261ec125da3e31e3e61179d3f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 11:35:59 +0000 Subject: [PATCH 12/30] chore(deps): update devdependency @types/node to ^18.14.5 (main) (#19409) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 46 +++++++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 43e082efbc..e2c0a0d976 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@nuxt/webpack-builder": "workspace:*", "@nuxtjs/eslint-config-typescript": "^12.0.0", "@types/crawler": "^1.2.2", - "@types/node": "^18.14.4", + "@types/node": "^18.14.5", "@types/rimraf": "^3", "@types/semver": "^7.3.13", "@unocss/reset": "^0.50.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a482528c6..5ac463a921 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: '@nuxt/webpack-builder': workspace:* '@nuxtjs/eslint-config-typescript': ^12.0.0 '@types/crawler': ^1.2.2 - '@types/node': ^18.14.4 + '@types/node': ^18.14.5 '@types/rimraf': ^3 '@types/semver': ^7.3.13 '@unocss/reset': ^0.50.3 @@ -62,7 +62,7 @@ importers: '@nuxt/webpack-builder': link:packages/webpack '@nuxtjs/eslint-config-typescript': 12.0.0_ycpbpc6yetojsgtrx3mwntkhsu '@types/crawler': 1.2.2 - '@types/node': 18.14.4 + '@types/node': 18.14.5 '@types/rimraf': 3.0.2 '@types/semver': 7.3.13 '@unocss/reset': 0.50.3 @@ -86,7 +86,7 @@ importers: typescript: 4.9.5 ufo: 1.1.1 unbuild: 1.1.2 - vite: 4.1.4_@types+node@18.14.4 + vite: 4.1.4_@types+node@18.14.5 vitest: 0.29.2 vue-tsc: 1.2.0_typescript@4.9.5 @@ -1529,7 +1529,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.14.4 + '@types/node': 18.14.5 '@types/yargs': 17.0.22 chalk: 4.1.2 dev: false @@ -1932,7 +1932,7 @@ packages: /@types/cheerio/0.22.31: resolution: {integrity: sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 dev: true /@types/clear/0.1.2: @@ -1942,7 +1942,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 dev: true /@types/crawler/1.2.2: @@ -1993,7 +1993,7 @@ packages: resolution: {integrity: sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.14.4 + '@types/node': 18.14.5 dev: true /@types/hash-sum/1.0.0: @@ -2026,7 +2026,7 @@ packages: /@types/jsonfile/6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 dev: true /@types/lodash-es/4.17.6: @@ -2055,6 +2055,10 @@ packages: /@types/node/18.14.4: resolution: {integrity: sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==} + dev: true + + /@types/node/18.14.5: + resolution: {integrity: sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -2075,7 +2079,7 @@ packages: resolution: {integrity: sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==} dependencies: '@types/glob': 8.0.1 - '@types/node': 18.14.4 + '@types/node': 18.14.5 dev: true /@types/semver/7.3.13: @@ -2138,7 +2142,7 @@ packages: /@types/webpack-sources/3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -2152,7 +2156,7 @@ packages: /@types/webpack/4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.1 '@types/webpack-sources': 3.2.0 @@ -5726,7 +5730,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.4.3 - '@types/node': 18.14.4 + '@types/node': 18.14.5 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.10 @@ -5737,7 +5741,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -5745,7 +5749,7 @@ packages: resolution: {integrity: sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 jest-util: 29.4.3 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -8466,7 +8470,7 @@ packages: - terser dev: false - /vite-node/0.29.2_@types+node@18.14.4: + /vite-node/0.29.2_@types+node@18.14.5: resolution: {integrity: sha512-5oe1z6wzI3gkvc4yOBbDBbgpiWiApvuN4P55E8OI131JGrSuo4X3SOZrNmZYo4R8Zkze/dhi572blX0zc+6SdA==} engines: {node: '>=v14.16.0'} hasBin: true @@ -8476,7 +8480,7 @@ packages: mlly: 1.1.1 pathe: 1.1.0 picocolors: 1.0.0 - vite: 4.1.4_@types+node@18.14.4 + vite: 4.1.4_@types+node@18.14.5 transitivePeerDependencies: - '@types/node' - less @@ -8569,7 +8573,7 @@ packages: optionalDependencies: fsevents: 2.3.2 - /vite/4.1.4_@types+node@18.14.4: + /vite/4.1.4_@types+node@18.14.5: resolution: {integrity: sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -8594,7 +8598,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.5 esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 @@ -8627,7 +8631,7 @@ packages: dependencies: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 - '@types/node': 18.14.4 + '@types/node': 18.14.5 '@vitest/expect': 0.29.2 '@vitest/runner': 0.29.2 '@vitest/spy': 0.29.2 @@ -8646,8 +8650,8 @@ packages: tinybench: 2.3.1 tinypool: 0.3.1 tinyspy: 1.1.1 - vite: 4.1.4_@types+node@18.14.4 - vite-node: 0.29.2_@types+node@18.14.4 + vite: 4.1.4_@types+node@18.14.5 + vite-node: 0.29.2_@types+node@18.14.5 why-is-node-running: 2.2.2 transitivePeerDependencies: - less From db5ea91916b9d6bdbf56043e428fc6096a243f13 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 3 Mar 2023 14:45:38 +0100 Subject: [PATCH 13/30] feat(nuxi): cli wrapper for self restart (#18641) --- docs/3.api/4.advanced/1.hooks.md | 2 +- packages/nuxi/bin/nuxi.mjs | 3 +-- packages/nuxi/build.config.ts | 2 ++ packages/nuxi/src/cli-run.ts | 4 +++ packages/nuxi/src/cli-wrapper.ts | 40 ++++++++++++++++++++++++++++++ packages/nuxi/src/commands/dev.ts | 9 +++++++ packages/nuxi/src/constants.ts | 11 ++++++++ packages/nuxi/src/index.ts | 1 + packages/schema/src/types/hooks.ts | 7 +++++- 9 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 packages/nuxi/src/cli-run.ts create mode 100644 packages/nuxi/src/cli-wrapper.ts create mode 100644 packages/nuxi/src/constants.ts diff --git a/docs/3.api/4.advanced/1.hooks.md b/docs/3.api/4.advanced/1.hooks.md index af93555a06..151446493d 100644 --- a/docs/3.api/4.advanced/1.hooks.md +++ b/docs/3.api/4.advanced/1.hooks.md @@ -38,7 +38,7 @@ Hook | Arguments | Description `kit:compatibility` | `compatibility, issues` | Allows extending compatibility checks. `ready` | `nuxt` | Called after Nuxt initialization, when the Nuxt instance is ready to work. `close` | `nuxt` | Called when Nuxt instance is gracefully closing. -`restart` | - | Called to restart the current Nuxt instance. **This hook is currently only available on the [Edge Channel](/docs/guide/going-further/edge-channel/).** +`restart` | `{ hard?: boolean }` | To be called to restart the current Nuxt instance. **This hook is currently only available on the [Edge Channel](/docs/guide/going-further/edge-channel/).** `modules:before` | - | Called during Nuxt initialization, before installing user modules. `modules:done` | - | Called during Nuxt initialization, after installing user modules. `app:resolve` | `app` | Called after resolving the `app` instance. diff --git a/packages/nuxi/bin/nuxi.mjs b/packages/nuxi/bin/nuxi.mjs index b6bf5f6a68..8dcfc256bd 100755 --- a/packages/nuxi/bin/nuxi.mjs +++ b/packages/nuxi/bin/nuxi.mjs @@ -1,3 +1,2 @@ #!/usr/bin/env node -process._startTime = Date.now() -import('../dist/cli.mjs').then(r => (r.default || r).main()) +import('../dist/cli-wrapper.mjs') diff --git a/packages/nuxi/build.config.ts b/packages/nuxi/build.config.ts index 294834abe4..522086d61a 100644 --- a/packages/nuxi/build.config.ts +++ b/packages/nuxi/build.config.ts @@ -10,6 +10,8 @@ export default defineBuildConfig({ }, entries: [ 'src/cli', + 'src/cli-run', + 'src/cli-wrapper', 'src/index' ], externals: [ diff --git a/packages/nuxi/src/cli-run.ts b/packages/nuxi/src/cli-run.ts new file mode 100644 index 0000000000..56c55f22b4 --- /dev/null +++ b/packages/nuxi/src/cli-run.ts @@ -0,0 +1,4 @@ +// @ts-ignore +process._startTime = Date.now() +// @ts-ignore +import('./cli').then(r => (r.default || r).main()) diff --git a/packages/nuxi/src/cli-wrapper.ts b/packages/nuxi/src/cli-wrapper.ts new file mode 100644 index 0000000000..58a25250ab --- /dev/null +++ b/packages/nuxi/src/cli-wrapper.ts @@ -0,0 +1,40 @@ +/** + * This file is used to wrap the CLI entrypoint in a restartable process. + */ +import { fileURLToPath } from 'node:url' +import { execa } from 'execa' +import { EXIT_CODE_RESTART } from './constants' + +const cliEntry = fileURLToPath(new URL('../dist/cli-run.mjs', import.meta.url)) + +async function startSubprocess (preArgs: string[], postArgs: string[]) { + const child = await execa( + 'node', + [ + ...preArgs, + cliEntry, + ...postArgs + ], + { + reject: false, + stdio: 'inherit', + env: { + ...process.env, + NUXI_CLI_WRAPPER: 'true' + } + } + ) + if (child.exitCode === EXIT_CODE_RESTART) { + await startSubprocess(preArgs, postArgs) + } else { + process.exit(child.exitCode) + } +} + +const args = process.argv.slice(2) +// only enable wrapper in dev command +if (args[0] === 'dev') { + await startSubprocess([], args) +} else { + await import(cliEntry) +} diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 139d69e629..52cb53fa39 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -14,6 +14,7 @@ import { loadKit } from '../utils/kit' import { importModule } from '../utils/cjs' import { overrideEnv } from '../utils/env' import { writeNuxtManifest, loadNuxtManifest, cleanupNuxtDirs } from '../utils/nuxt' +import { EXIT_CODE_RESTART } from '../constants' import { defineNuxtCommand } from './index' export default defineNuxtCommand({ @@ -89,6 +90,14 @@ export default defineNuxtCommand({ } currentNuxt = await loadNuxt({ rootDir, dev: true, ready: false }) + // Hard restart + if (process.env.NUXI_CLI_WRAPPER) { + currentNuxt.hooks.hook('restart', (options) => { + if (options?.hard) { + process.exit(EXIT_CODE_RESTART) + } + }) + } currentNuxt.hooks.hookOnce('restart', () => load(true)) if (!isRestart) { diff --git a/packages/nuxi/src/constants.ts b/packages/nuxi/src/constants.ts new file mode 100644 index 0000000000..36ebe5dfd8 --- /dev/null +++ b/packages/nuxi/src/constants.ts @@ -0,0 +1,11 @@ +/** + * Special exit code to restart the process + * + * Usage: + * ```ts + * if (process.env.NUXI_CLI_WRAPPER) { + * process.exit(EXIT_CODE_RESTART) + * } + * ``` + */ +export const EXIT_CODE_RESTART = 85 diff --git a/packages/nuxi/src/index.ts b/packages/nuxi/src/index.ts index b8492c1b01..119ab45c2a 100755 --- a/packages/nuxi/src/index.ts +++ b/packages/nuxi/src/index.ts @@ -1 +1,2 @@ export * from './run' +export * from './constants' diff --git a/packages/schema/src/types/hooks.ts b/packages/schema/src/types/hooks.ts index 566b89042b..ea19a809b7 100644 --- a/packages/schema/src/types/hooks.ts +++ b/packages/schema/src/types/hooks.ts @@ -77,7 +77,12 @@ export interface NuxtHooks { * Called to restart the current Nuxt instance. * @returns Promise */ - 'restart': () => HookResult + 'restart': (options?: { + /** + * Try to restart the whole process if supported + */ + hard?: boolean + }) => HookResult /** * Called during Nuxt initialization, before installing user modules. From 44068420da2e0300a41a769c45048d900a8e1c33 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 13:51:47 +0000 Subject: [PATCH 14/30] fix(nuxi): avoid top-level await in wrapper --- packages/nuxi/src/cli-wrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxi/src/cli-wrapper.ts b/packages/nuxi/src/cli-wrapper.ts index 58a25250ab..8a20e6ffd5 100644 --- a/packages/nuxi/src/cli-wrapper.ts +++ b/packages/nuxi/src/cli-wrapper.ts @@ -34,7 +34,7 @@ async function startSubprocess (preArgs: string[], postArgs: string[]) { const args = process.argv.slice(2) // only enable wrapper in dev command if (args[0] === 'dev') { - await startSubprocess([], args) + startSubprocess([], args) } else { - await import(cliEntry) + import(cliEntry) } From 7131aef82045b297530f679782a1ce50b53daceb Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 3 Mar 2023 17:07:42 +0300 Subject: [PATCH 15/30] feat(schema): allow adding page routes without a matching file (#19173) --- packages/nuxt/src/pages/module.ts | 8 ++-- packages/nuxt/src/pages/utils.ts | 42 +++++++++++------- .../treeshake-client.test.ts.snap | Bin 7081 -> 7121 bytes packages/schema/src/types/hooks.ts | 2 +- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index f7e85439ab..46fa4cc62d 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -146,9 +146,11 @@ export default defineNuxtModule({ // Add router plugin addPlugin(resolve(runtimeDir, 'plugins/router')) - const getSources = (pages: NuxtPage[]): string[] => pages.flatMap(p => - [relative(nuxt.options.srcDir, p.file), ...getSources(p.children || [])] - ) + const getSources = (pages: NuxtPage[]): string[] => pages + .filter(p => Boolean(p.file)) + .flatMap(p => + [relative(nuxt.options.srcDir, p.file as string), ...getSources(p.children || [])] + ) // Do not prefetch page chunks nuxt.hook('build:manifest', async (manifest) => { diff --git a/packages/nuxt/src/pages/utils.ts b/packages/nuxt/src/pages/utils.ts index 946b67b5b0..66070c53e3 100644 --- a/packages/nuxt/src/pages/utils.ts +++ b/packages/nuxt/src/pages/utils.ts @@ -249,28 +249,40 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set = return { imports: metaImports, routes: genArrayFromRaw(routes.map((page) => { + const route = Object.fromEntries( + Object.entries(page) + .filter(([key, value]) => key !== 'file' && (Array.isArray(value) ? value.length : value)) + .map(([key, value]) => [key, JSON.stringify(value)]) + ) as Record, string> & { component?: string } + + if (page.children?.length) { + route.children = normalizeRoutes(page.children, metaImports).routes + } + + // Without a file, we can't use `definePageMeta` to extract route-level meta from the file + if (!page.file) { + for (const key of ['name', 'path', 'meta', 'alias', 'redirect'] as const) { + if (page[key]) { route[key] = JSON.stringify(page[key]) } + } + return route + } + const file = normalize(page.file) const metaImportName = genSafeVariableName(filename(file) + hash(file)) + 'Meta' metaImports.add(genImport(`${file}?macro=true`, [{ name: 'default', as: metaImportName }])) let aliasCode = `${metaImportName}?.alias || []` - if (Array.isArray(page.alias) && page.alias.length) { - aliasCode = `${JSON.stringify(page.alias)}.concat(${aliasCode})` + const alias = Array.isArray(page.alias) ? page.alias : [page.alias].filter(Boolean) + if (alias.length) { + aliasCode = `${JSON.stringify(alias)}.concat(${aliasCode})` } - const route = { - ...Object.fromEntries(Object.entries(page).map(([key, value]) => [key, JSON.stringify(value)])), - file: undefined, - name: `${metaImportName}?.name ?? ${page.name ? JSON.stringify(page.name) : 'undefined'}`, - path: `${metaImportName}?.path ?? ${JSON.stringify(page.path)}`, - children: page.children ? normalizeRoutes(page.children, metaImports).routes : [], - meta: page.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(page.meta)}}` : `${metaImportName} || {}`, - alias: aliasCode, - redirect: page.redirect ? JSON.stringify(page.redirect) : `${metaImportName}?.redirect || undefined`, - component: genDynamicImport(file, { interopDefault: true }) - } - - delete route.file + route.name = `${metaImportName}?.name ?? ${page.name ? JSON.stringify(page.name) : 'undefined'}` + route.path = `${metaImportName}?.path ?? ${JSON.stringify(page.path)}` + route.meta = page.meta && Object.values(page.meta).filter(value => value !== undefined).length ? `{...(${metaImportName} || {}), ...${JSON.stringify(page.meta)}}` : `${metaImportName} || {}` + route.alias = aliasCode + route.redirect = page.redirect ? JSON.stringify(page.redirect) : `${metaImportName}?.redirect || undefined` + route.component = genDynamicImport(file, { interopDefault: true }) return route })) diff --git a/packages/nuxt/test/__snapshots__/treeshake-client.test.ts.snap b/packages/nuxt/test/__snapshots__/treeshake-client.test.ts.snap index 76ed86bfa42083749de3bd61bc1e9c61cde343c0..8ca4bc8af731d57177b6607d112cfb5505f7ff6f 100644 GIT binary patch delta 55 zcmZ2!e$jk_sD_S0MoCFQv6a4lS!PLUafx0^YMFj|X=X~QesNx6L2*WYiC#uYZqDR& Ke8C$t9Hjv|wG^)a delta 10 Rcmca;zS4Yx=tkQq(f}EA1S
alias?: string[] | string redirect?: string From bc9ffa4d1580db55a8e069f6db9fe2ee2d5adca7 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 14:48:04 +0000 Subject: [PATCH 16/30] feat(nuxt): add support for `nuxt/kit` subpath for local use (#19422) --- packages/nuxt/kit.d.ts | 1 + packages/nuxt/kit.mjs | 1 + packages/nuxt/package.json | 4 ++++ 3 files changed, 6 insertions(+) create mode 100644 packages/nuxt/kit.d.ts create mode 100644 packages/nuxt/kit.mjs diff --git a/packages/nuxt/kit.d.ts b/packages/nuxt/kit.d.ts new file mode 100644 index 0000000000..4625be9a95 --- /dev/null +++ b/packages/nuxt/kit.d.ts @@ -0,0 +1 @@ +export * from '@nuxt/kit' diff --git a/packages/nuxt/kit.mjs b/packages/nuxt/kit.mjs new file mode 100644 index 0000000000..4625be9a95 --- /dev/null +++ b/packages/nuxt/kit.mjs @@ -0,0 +1 @@ +export * from '@nuxt/kit' diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 59f3ebea03..98898165ee 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -21,6 +21,10 @@ "types": "./schema.d.ts", "import": "./schema.mjs" }, + "./kit": { + "types": "./kit.d.ts", + "import": "./kit.mjs" + }, "./app": "./dist/app/index.mjs", "./package.json": "./package.json" }, From 008426cd30e2a2262af7ed63787a2be36122d94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Fri, 3 Mar 2023 16:40:47 +0100 Subject: [PATCH 17/30] docs: add frontmatter note for docs readme to remove from live preview --- docs/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/README.md b/docs/README.md index bd8432f899..18bc0d5ec4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,7 @@ +--- +navigation: false +--- + # Nuxt Docs This repository contains the documentation of Nuxt hosted on nuxt.com. From 588c3ff24c5b09ab03855c3a81e7aaec96a5f8e7 Mon Sep 17 00:00:00 2001 From: Horu <73709188+HigherOrderLogic@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:04:03 +0700 Subject: [PATCH 18/30] fix(nuxt): add `kit.*` files to published package (#19430) --- packages/nuxt/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 98898165ee..e28c22e2a7 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -39,6 +39,7 @@ "types.d.ts", "dist", "config.*", + "kit.*", "schema.*" ], "scripts": { From a420369c9077765f1ca714d98afac7495287a2e5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 16:47:08 +0000 Subject: [PATCH 19/30] fix(nuxt): don't print layout warning if page is not ssr (#19434) --- packages/nuxt/src/app/composables/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/app/composables/router.ts b/packages/nuxt/src/app/composables/router.ts index 6f61e55ad1..8650778a99 100644 --- a/packages/nuxt/src/app/composables/router.ts +++ b/packages/nuxt/src/app/composables/router.ts @@ -142,7 +142,7 @@ export const setPageLayout = (layout: string) => { useState('_layout').value = layout } const nuxtApp = useNuxtApp() - if (process.dev && nuxtApp.isHydrating && useState('_layout').value !== layout) { + if (process.dev && nuxtApp.isHydrating && nuxtApp.payload.serverRendered && useState('_layout').value !== layout) { console.warn('[warn] [nuxt] `setPageLayout` should not be called to change the layout during hydration as this will cause hydration errors.') } const inMiddleware = isProcessingMiddleware() From 3681bddfd5051196f57c8b9b8a26fb87d8c5fb66 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 3 Mar 2023 17:52:55 +0000 Subject: [PATCH 20/30] feat(nuxt): auto-register modules in `~/modules` (#19394) --- .../2.directory-structure/1.modules.md | 48 +++++++++++++++++++ packages/nuxt/src/core/nuxt.ts | 40 +++++++++++++--- packages/schema/src/config/common.ts | 5 ++ test/basic.test.ts | 7 +++ .../basic/modules/auto-registered/index.ts | 15 ++++++ .../auto-registered/runtime/handler.ts | 1 + test/fixtures/basic/modules/example.ts | 9 ++-- 7 files changed, 115 insertions(+), 10 deletions(-) create mode 100644 docs/2.guide/2.directory-structure/1.modules.md create mode 100644 test/fixtures/basic/modules/auto-registered/index.ts create mode 100644 test/fixtures/basic/modules/auto-registered/runtime/handler.ts diff --git a/docs/2.guide/2.directory-structure/1.modules.md b/docs/2.guide/2.directory-structure/1.modules.md new file mode 100644 index 0000000000..a4f6734fc1 --- /dev/null +++ b/docs/2.guide/2.directory-structure/1.modules.md @@ -0,0 +1,48 @@ +--- +navigation.icon: IconDirectory +title: 'modules' +head.title: 'modules/' +description: Use the modules/ directory to automatically register local modules within your application. +--- + +# Modules Directory + +Nuxt scans the `modules/` directory and loads them before starting. It is a good place to place any local modules you develop while building your application. + +The auto-registered files patterns are: +- `modules/*/index.ts` +- `modules/*.ts` + +You don't need to add those local modules to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) separately. + +::code-group +```ts [modules/hello/index.ts] +// `nuxt/kit` is a helper subpath import you can use when defining local modules +// that means you do not need to add `@nuxt/kit` to your project's dependencies +import { createResolver, defineNuxtModule, addServerHandler } from 'nuxt/kit' + +export default defineNuxtModule({ + meta: { + name: 'hello' + }, + setup () { + const { resolve } = createResolver(import.meta.url) + + // Add an API route + addServerHandler({ + route: '/api/hello', + handler: resolve('./runtime/api-route') + }) + } +}) +``` +```ts [modules/hello/runtime/api-route.ts] +export default defineEventHandler(() => { + return { hello: 'world' } +} +``` +:: + +When starting Nuxt, the `hello` module will be registered and the `/api/hello` route will be available. + +:ReadMore{link="/docs/guide/going-further/modules"} diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 3fd4365507..1b86ea03bb 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -1,7 +1,7 @@ -import { join, normalize, resolve } from 'pathe' +import { join, normalize, relative, resolve } from 'pathe' import { createHooks, createDebugger } from 'hookable' import type { LoadNuxtOptions } from '@nuxt/kit' -import { loadNuxtConfig, nuxtCtx, installModule, addComponent, addVitePlugin, addWebpackPlugin, tryResolveModule, addPlugin } from '@nuxt/kit' +import { resolvePath, resolveAlias, resolveFiles, loadNuxtConfig, nuxtCtx, installModule, addComponent, addVitePlugin, addWebpackPlugin, tryResolveModule, addPlugin } from '@nuxt/kit' import escapeRE from 'escape-string-regexp' import fse from 'fs-extra' @@ -122,10 +122,38 @@ async function initNuxt (nuxt: Nuxt) { // Init user modules await nuxt.callHook('modules:before') - const modulesToInstall = [ - ...nuxt.options.modules, - ...nuxt.options._modules - ] + const modulesToInstall = [] + + const watchedPaths = new Set() + const specifiedModules = new Set() + + for (const _mod of nuxt.options.modules) { + const mod = Array.isArray(_mod) ? _mod[0] : _mod + if (typeof mod !== 'string') { continue } + const modPath = await resolvePath(resolveAlias(mod)) + specifiedModules.add(modPath) + } + + // Automatically register user modules + for (const config of nuxt.options._layers.map(layer => layer.config).reverse()) { + const layerModules = await resolveFiles(config.srcDir, [ + `${config.dir?.modules || 'modules'}/*{${nuxt.options.extensions.join(',')}}`, + `${config.dir?.modules || 'modules'}/*/index{${nuxt.options.extensions.join(',')}}` + ]) + for (const mod of layerModules) { + watchedPaths.add(relative(config.srcDir, mod)) + if (specifiedModules.has(mod)) { continue } + specifiedModules.add(mod) + modulesToInstall.push(mod) + } + } + + // Register user and then ad-hoc modules + modulesToInstall.push(...nuxt.options.modules, ...nuxt.options._modules) + + nuxt.hooks.hookOnce('builder:watch', (event, path) => { + if (watchedPaths.has(path)) { nuxt.callHook('restart', { hard: true }) } + }) // Add addComponent({ diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index 97ebd5520e..cda2f8b736 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -219,6 +219,11 @@ export default defineUntypedSchema({ */ middleware: 'middleware', + /** + * The modules directory, each file in which will be auto-registered as a Nuxt module. + */ + modules: 'modules', + /** * The directory which will be processed to auto-generate your application page routes. */ diff --git a/test/basic.test.ts b/test/basic.test.ts index 6c7410def1..10a04b7b7e 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -46,6 +46,13 @@ describe('route rules', () => { }) }) +describe('modules', () => { + it('should auto-register modules in ~/modules', async () => { + const result = await $fetch('/auto-registered-module') + expect(result).toEqual('handler added by auto-registered module') + }) +}) + describe('pages', () => { it('render index', async () => { const html = await $fetch('/') diff --git a/test/fixtures/basic/modules/auto-registered/index.ts b/test/fixtures/basic/modules/auto-registered/index.ts new file mode 100644 index 0000000000..98e5ad9cbb --- /dev/null +++ b/test/fixtures/basic/modules/auto-registered/index.ts @@ -0,0 +1,15 @@ +import { createResolver, defineNuxtModule, addServerHandler } from 'nuxt/kit' + +export default defineNuxtModule({ + meta: { + name: 'auto-registered-module' + }, + setup () { + const resolver = createResolver(import.meta.url) + + addServerHandler({ + handler: resolver.resolve('./runtime/handler'), + route: '/auto-registered-module' + }) + } +}) diff --git a/test/fixtures/basic/modules/auto-registered/runtime/handler.ts b/test/fixtures/basic/modules/auto-registered/runtime/handler.ts new file mode 100644 index 0000000000..563d40e0b9 --- /dev/null +++ b/test/fixtures/basic/modules/auto-registered/runtime/handler.ts @@ -0,0 +1 @@ +export default defineEventHandler(() => 'handler added by auto-registered module') diff --git a/test/fixtures/basic/modules/example.ts b/test/fixtures/basic/modules/example.ts index d55c2c4253..d4eca6c235 100644 --- a/test/fixtures/basic/modules/example.ts +++ b/test/fixtures/basic/modules/example.ts @@ -1,5 +1,4 @@ -import { fileURLToPath } from 'node:url' -import { defineNuxtModule, addPlugin, useNuxt } from '@nuxt/kit' +import { defineNuxtModule, createResolver, addPlugin, useNuxt } from 'nuxt/kit' export default defineNuxtModule({ defaults: { @@ -11,11 +10,13 @@ export default defineNuxtModule({ configKey: 'sampleModule' }, setup () { - addPlugin(fileURLToPath(new URL('./runtime/plugin', import.meta.url))) + const resolver = createResolver(import.meta.url) + + addPlugin(resolver.resolve('./runtime/plugin')) useNuxt().hook('app:resolve', (app) => { app.middleware.push({ name: 'unctx-test', - path: fileURLToPath(new URL('./runtime/middleware', import.meta.url)), + path: resolver.resolve('./runtime/middleware'), global: true }) }) From 8fa3fba11ff423d566224655ccf9a9c6f8f0e71f Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Fri, 3 Mar 2023 20:24:49 +0100 Subject: [PATCH 21/30] refactor(nuxi): hard restart with communication channel (#19423) --- packages/nuxi/src/cli-run.ts | 1 + packages/nuxi/src/cli-wrapper.ts | 59 +++++++++++++++---------------- packages/nuxi/src/cli.ts | 2 +- packages/nuxi/src/commands/dev.ts | 24 +++++++------ packages/nuxi/src/constants.ts | 11 ------ packages/nuxi/src/index.ts | 1 - 6 files changed, 44 insertions(+), 54 deletions(-) delete mode 100644 packages/nuxi/src/constants.ts diff --git a/packages/nuxi/src/cli-run.ts b/packages/nuxi/src/cli-run.ts index 56c55f22b4..07aef4afac 100644 --- a/packages/nuxi/src/cli-run.ts +++ b/packages/nuxi/src/cli-run.ts @@ -1,4 +1,5 @@ // @ts-ignore process._startTime = Date.now() + // @ts-ignore import('./cli').then(r => (r.default || r).main()) diff --git a/packages/nuxi/src/cli-wrapper.ts b/packages/nuxi/src/cli-wrapper.ts index 8a20e6ffd5..66891d694d 100644 --- a/packages/nuxi/src/cli-wrapper.ts +++ b/packages/nuxi/src/cli-wrapper.ts @@ -2,39 +2,38 @@ * This file is used to wrap the CLI entrypoint in a restartable process. */ import { fileURLToPath } from 'node:url' -import { execa } from 'execa' -import { EXIT_CODE_RESTART } from './constants' +import { fork } from 'node:child_process' +import type { ChildProcess } from 'node:child_process' const cliEntry = fileURLToPath(new URL('../dist/cli-run.mjs', import.meta.url)) -async function startSubprocess (preArgs: string[], postArgs: string[]) { - const child = await execa( - 'node', - [ - ...preArgs, - cliEntry, - ...postArgs - ], - { - reject: false, - stdio: 'inherit', - env: { - ...process.env, - NUXI_CLI_WRAPPER: 'true' - } - } - ) - if (child.exitCode === EXIT_CODE_RESTART) { - await startSubprocess(preArgs, postArgs) - } else { - process.exit(child.exitCode) - } -} - -const args = process.argv.slice(2) -// only enable wrapper in dev command -if (args[0] === 'dev') { - startSubprocess([], args) +// Only enable wrapper for nuxt dev command +if (process.argv[2] === 'dev') { + process.env.__CLI_ARGV__ = JSON.stringify(process.argv) + startSubprocess() } else { import(cliEntry) } + +function startSubprocess () { + let childProc: ChildProcess + + process.on('exit', () => { + if (childProc) { + childProc.kill() + } + }) + + start() + + function start () { + childProc = fork(cliEntry) + childProc.on('close', (code) => { if (code) { process.exit(code) } }) + childProc.on('message', (message) => { + if ((message as { type: string })?.type === 'nuxt:restart') { + childProc.kill() + startSubprocess() + } + }) + } +} diff --git a/packages/nuxi/src/cli.ts b/packages/nuxi/src/cli.ts index 5f4023eeac..71a1dfc6e3 100755 --- a/packages/nuxi/src/cli.ts +++ b/packages/nuxi/src/cli.ts @@ -9,7 +9,7 @@ import { showHelp } from './utils/help' import { showBanner } from './utils/banner' async function _main () { - const _argv = process.argv.slice(2) + const _argv = (process.env.__CLI_ARGV__ ? JSON.parse(process.env.__CLI_ARGV__) : process.argv).slice(2) const args = mri(_argv, { boolean: [ 'no-clear' diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 52cb53fa39..26abe0cbf3 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -14,7 +14,6 @@ import { loadKit } from '../utils/kit' import { importModule } from '../utils/cjs' import { overrideEnv } from '../utils/env' import { writeNuxtManifest, loadNuxtManifest, cleanupNuxtDirs } from '../utils/nuxt' -import { EXIT_CODE_RESTART } from '../constants' import { defineNuxtCommand } from './index' export default defineNuxtCommand({ @@ -90,15 +89,18 @@ export default defineNuxtCommand({ } currentNuxt = await loadNuxt({ rootDir, dev: true, ready: false }) - // Hard restart - if (process.env.NUXI_CLI_WRAPPER) { - currentNuxt.hooks.hook('restart', (options) => { - if (options?.hard) { - process.exit(EXIT_CODE_RESTART) - } - }) - } - currentNuxt.hooks.hookOnce('restart', () => load(true)) + + currentNuxt.hooks.hookOnce('restart', async (options) => { + if (options?.hard && process.send) { + await listener.close().catch(() => {}) + await currentNuxt.close().catch(() => {}) + await watcher.close().catch(() => {}) + await distWatcher.close().catch(() => {}) + process.send({ type: 'nuxt:restart' }) + } else { + await load(true) + } + }) if (!isRestart) { showURL() @@ -121,7 +123,7 @@ export default defineNuxtCommand({ await currentNuxt.ready() await currentNuxt.hooks.callHook('listen', listener.server, listener) - const address = listener.server.address() as AddressInfo + const address = (listener.server.address() || {}) as AddressInfo currentNuxt.options.devServer.url = listener.url currentNuxt.options.devServer.port = address.port currentNuxt.options.devServer.host = address.address diff --git a/packages/nuxi/src/constants.ts b/packages/nuxi/src/constants.ts deleted file mode 100644 index 36ebe5dfd8..0000000000 --- a/packages/nuxi/src/constants.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Special exit code to restart the process - * - * Usage: - * ```ts - * if (process.env.NUXI_CLI_WRAPPER) { - * process.exit(EXIT_CODE_RESTART) - * } - * ``` - */ -export const EXIT_CODE_RESTART = 85 diff --git a/packages/nuxi/src/index.ts b/packages/nuxi/src/index.ts index 119ab45c2a..b8492c1b01 100755 --- a/packages/nuxi/src/index.ts +++ b/packages/nuxi/src/index.ts @@ -1,2 +1 @@ export * from './run' -export * from './constants' From 4aa35b61d67cd6ea3b741e2690d1daa501edc86b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:07:45 +0000 Subject: [PATCH 22/30] chore(deps): update devdependency changelogen to ^0.5.0 (main) (#19433) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 51 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index e2c0a0d976..53cc6cb651 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@types/semver": "^7.3.13", "@unocss/reset": "^0.50.3", "case-police": "^0.5.13", - "changelogen": "^0.4.1", + "changelogen": "^0.5.0", "crawler": "^1.4.0", "eslint": "^8.35.0", "eslint-plugin-jsdoc": "^40.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ac463a921..457e8d6c2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: '@types/semver': ^7.3.13 '@unocss/reset': ^0.50.3 case-police: ^0.5.13 - changelogen: ^0.4.1 + changelogen: ^0.5.0 crawler: ^1.4.0 eslint: ^8.35.0 eslint-plugin-jsdoc: ^40.0.1 @@ -67,7 +67,7 @@ importers: '@types/semver': 7.3.13 '@unocss/reset': 0.50.3 case-police: 0.5.13 - changelogen: 0.4.1 + changelogen: 0.5.0 crawler: 1.4.0 eslint: 8.35.0 eslint-plugin-jsdoc: 40.0.1_eslint@8.35.0 @@ -1752,7 +1752,7 @@ packages: dependencies: cross-spawn: 7.0.3 is-glob: 4.0.3 - open: 8.4.1 + open: 8.4.2 picocolors: 1.0.0 tiny-glob: 0.2.9 tslib: 2.5.0 @@ -3438,19 +3438,24 @@ packages: resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - /changelogen/0.4.1: - resolution: {integrity: sha512-p1dJO1Z995odIxdypzAykHIaUu+XnEvwYPSTyKJsbpL82o99sxN1G24tbecoMxTsV4PI+ZId82GJXRL2hhOeJA==} + /changelogen/0.5.0: + resolution: {integrity: sha512-fmP5Xpi7KvGCM86dgXYChBQSQAkwoUEEy/2mXCTtEqSo8FgVOo0/mUfNZ2UD1NquHP2XEl7yiZ4R8jlPWiY8Zg==} hasBin: true dependencies: c12: 1.1.2 + colorette: 2.0.19 consola: 2.15.3 convert-gitmoji: 0.1.3 - execa: 6.1.0 + execa: 7.0.0 mri: 1.2.0 node-fetch-native: 1.0.2 + ofetch: 1.0.1 + open: 8.4.2 + pathe: 1.1.0 pkg-types: 1.0.2 scule: 1.0.0 semver: 7.3.8 + yaml: 2.2.1 transitivePeerDependencies: - supports-color dev: true @@ -4731,21 +4736,6 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - /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 - /execa/7.0.0: resolution: {integrity: sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} @@ -5397,11 +5387,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - /human-signals/3.0.1: - resolution: {integrity: sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==} - engines: {node: '>=12.20.0'} - dev: true - /human-signals/4.3.0: resolution: {integrity: sha512-zyzVyMjpGBX2+6cDVZeFPCdtOtdsxOeseRhB9tkQ6xXmGUNrcnBzdEKPy3VPNYz+4gy1oukVOXcrJCunSyc6QQ==} engines: {node: '>=14.18.0'} @@ -6588,6 +6573,15 @@ packages: is-docker: 2.2.1 is-wsl: 2.2.0 + /open/8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + dev: true + /opener/1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true @@ -9054,6 +9048,11 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} + /yaml/2.2.1: + resolution: {integrity: sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==} + engines: {node: '>= 14'} + dev: true + /yargs-parser/21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} From f14b896c35ca474fb2b78feb802a19ba5c98cb26 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Mar 2023 06:34:20 -0800 Subject: [PATCH 23/30] chore(deps): update all non-major dependencies (main) (#19439) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +- packages/vite/package.json | 2 +- pnpm-lock.yaml | 275 ++++++++++++++++++++++++++++++++----- 3 files changed, 244 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 53cc6cb651..e246e6c781 100644 --- a/package.json +++ b/package.json @@ -49,12 +49,12 @@ "@nuxt/webpack-builder": "workspace:*", "@nuxtjs/eslint-config-typescript": "^12.0.0", "@types/crawler": "^1.2.2", - "@types/node": "^18.14.5", + "@types/node": "^18.14.6", "@types/rimraf": "^3", "@types/semver": "^7.3.13", "@unocss/reset": "^0.50.3", "case-police": "^0.5.13", - "changelogen": "^0.5.0", + "changelogen": "^0.5.1", "crawler": "^1.4.0", "eslint": "^8.35.0", "eslint-plugin-jsdoc": "^40.0.1", @@ -67,7 +67,7 @@ "nuxt": "workspace:*", "ofetch": "^1.0.1", "pathe": "^1.1.0", - "rimraf": "^4.2.0", + "rimraf": "^4.3.0", "semver": "^7.3.8", "std-env": "^3.3.2", "typescript": "^4.9.5", diff --git a/packages/vite/package.json b/packages/vite/package.json index 64f01cd6d1..e404a9ece9 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -27,7 +27,7 @@ "chokidar": "^3.5.3", "cssnano": "^5.1.15", "defu": "^6.1.2", - "esbuild": "^0.17.10", + "esbuild": "^0.17.11", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "externality": "^1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 457e8d6c2c..2b52988600 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,12 +26,12 @@ importers: '@nuxt/webpack-builder': workspace:* '@nuxtjs/eslint-config-typescript': ^12.0.0 '@types/crawler': ^1.2.2 - '@types/node': ^18.14.5 + '@types/node': ^18.14.6 '@types/rimraf': ^3 '@types/semver': ^7.3.13 '@unocss/reset': ^0.50.3 case-police: ^0.5.13 - changelogen: ^0.5.0 + changelogen: ^0.5.1 crawler: ^1.4.0 eslint: ^8.35.0 eslint-plugin-jsdoc: ^40.0.1 @@ -44,7 +44,7 @@ importers: nuxt: workspace:* ofetch: ^1.0.1 pathe: ^1.1.0 - rimraf: ^4.2.0 + rimraf: ^4.3.0 semver: ^7.3.8 std-env: ^3.3.2 typescript: ^4.9.5 @@ -62,12 +62,12 @@ importers: '@nuxt/webpack-builder': link:packages/webpack '@nuxtjs/eslint-config-typescript': 12.0.0_ycpbpc6yetojsgtrx3mwntkhsu '@types/crawler': 1.2.2 - '@types/node': 18.14.5 + '@types/node': 18.14.6 '@types/rimraf': 3.0.2 '@types/semver': 7.3.13 '@unocss/reset': 0.50.3 case-police: 0.5.13 - changelogen: 0.5.0 + changelogen: 0.5.1 crawler: 1.4.0 eslint: 8.35.0 eslint-plugin-jsdoc: 40.0.1_eslint@8.35.0 @@ -80,13 +80,13 @@ importers: nuxt: link:packages/nuxt ofetch: 1.0.1 pathe: 1.1.0 - rimraf: 4.2.0 + rimraf: 4.3.0 semver: 7.3.8 std-env: 3.3.2 typescript: 4.9.5 ufo: 1.1.1 unbuild: 1.1.2 - vite: 4.1.4_@types+node@18.14.5 + vite: 4.1.4_@types+node@18.14.6 vitest: 0.29.2 vue-tsc: 1.2.0_typescript@4.9.5 @@ -595,7 +595,7 @@ importers: chokidar: ^3.5.3 cssnano: ^5.1.15 defu: ^6.1.2 - esbuild: ^0.17.10 + esbuild: ^0.17.11 escape-string-regexp: ^5.0.0 estree-walker: ^3.0.3 externality: ^1.0.0 @@ -632,7 +632,7 @@ importers: chokidar: 3.5.3 cssnano: 5.1.15_postcss@8.4.21 defu: 6.1.2 - esbuild: 0.17.10 + esbuild: 0.17.11 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 externality: 1.0.0 @@ -1111,6 +1111,14 @@ packages: requiresBuild: true optional: true + /@esbuild/android-arm/0.17.11: + resolution: {integrity: sha512-CdyX6sRVh1NzFCsf5vw3kULwlAhfy9wVt8SZlrhQ7eL2qBjGbFhRBWkkAzuZm9IIEOCKJw4DXA6R85g+qc8RDw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + optional: true + /@esbuild/android-arm64/0.16.17: resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} @@ -1127,6 +1135,14 @@ packages: requiresBuild: true optional: true + /@esbuild/android-arm64/0.17.11: + resolution: {integrity: sha512-QnK4d/zhVTuV4/pRM4HUjcsbl43POALU2zvBynmrrqZt9LPcLA3x1fTZPBg2RRguBQnJcnU059yKr+bydkntjg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + optional: true + /@esbuild/android-x64/0.16.17: resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} engines: {node: '>=12'} @@ -1143,6 +1159,14 @@ packages: requiresBuild: true optional: true + /@esbuild/android-x64/0.17.11: + resolution: {integrity: sha512-3PL3HKtsDIXGQcSCKtWD/dy+mgc4p2Tvo2qKgKHj9Yf+eniwFnuoQ0OUhlSfAEpKAFzF9N21Nwgnap6zy3L3MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + optional: true + /@esbuild/darwin-arm64/0.16.17: resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} engines: {node: '>=12'} @@ -1159,6 +1183,14 @@ packages: requiresBuild: true optional: true + /@esbuild/darwin-arm64/0.17.11: + resolution: {integrity: sha512-pJ950bNKgzhkGNO3Z9TeHzIFtEyC2GDQL3wxkMApDEghYx5Qers84UTNc1bAxWbRkuJOgmOha5V0WUeh8G+YGw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + /@esbuild/darwin-x64/0.16.17: resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} engines: {node: '>=12'} @@ -1175,6 +1207,14 @@ packages: requiresBuild: true optional: true + /@esbuild/darwin-x64/0.17.11: + resolution: {integrity: sha512-iB0dQkIHXyczK3BZtzw1tqegf0F0Ab5texX2TvMQjiJIWXAfM4FQl7D909YfXWnB92OQz4ivBYQ2RlxBJrMJOw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + /@esbuild/freebsd-arm64/0.16.17: resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} engines: {node: '>=12'} @@ -1191,6 +1231,14 @@ packages: requiresBuild: true optional: true + /@esbuild/freebsd-arm64/0.17.11: + resolution: {integrity: sha512-7EFzUADmI1jCHeDRGKgbnF5sDIceZsQGapoO6dmw7r/ZBEKX7CCDnIz8m9yEclzr7mFsd+DyasHzpjfJnmBB1Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + optional: true + /@esbuild/freebsd-x64/0.16.17: resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} engines: {node: '>=12'} @@ -1207,6 +1255,14 @@ packages: requiresBuild: true optional: true + /@esbuild/freebsd-x64/0.17.11: + resolution: {integrity: sha512-iPgenptC8i8pdvkHQvXJFzc1eVMR7W2lBPrTE6GbhR54sLcF42mk3zBOjKPOodezzuAz/KSu8CPyFSjcBMkE9g==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + optional: true + /@esbuild/linux-arm/0.16.17: resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} engines: {node: '>=12'} @@ -1223,6 +1279,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-arm/0.17.11: + resolution: {integrity: sha512-M9iK/d4lgZH0U5M1R2p2gqhPV/7JPJcRz+8O8GBKVgqndTzydQ7B2XGDbxtbvFkvIs53uXTobOhv+RyaqhUiMg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-arm64/0.16.17: resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} engines: {node: '>=12'} @@ -1239,6 +1303,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-arm64/0.17.11: + resolution: {integrity: sha512-Qxth3gsWWGKz2/qG2d5DsW/57SeA2AmpSMhdg9TSB5Svn2KDob3qxfQSkdnWjSd42kqoxIPy3EJFs+6w1+6Qjg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-ia32/0.16.17: resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} engines: {node: '>=12'} @@ -1255,6 +1327,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-ia32/0.17.11: + resolution: {integrity: sha512-dB1nGaVWtUlb/rRDHmuDQhfqazWE0LMro/AIbT2lWM3CDMHJNpLckH+gCddQyhhcLac2OYw69ikUMO34JLt3wA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-loong64/0.16.17: resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} @@ -1271,6 +1351,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-loong64/0.17.11: + resolution: {integrity: sha512-aCWlq70Q7Nc9WDnormntGS1ar6ZFvUpqr8gXtO+HRejRYPweAFQN615PcgaSJkZjhHp61+MNLhzyVALSF2/Q0g==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-mips64el/0.16.17: resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} engines: {node: '>=12'} @@ -1287,6 +1375,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-mips64el/0.17.11: + resolution: {integrity: sha512-cGeGNdQxqY8qJwlYH1BP6rjIIiEcrM05H7k3tR7WxOLmD1ZxRMd6/QIOWMb8mD2s2YJFNRuNQ+wjMhgEL2oCEw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-ppc64/0.16.17: resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} engines: {node: '>=12'} @@ -1303,6 +1399,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-ppc64/0.17.11: + resolution: {integrity: sha512-BdlziJQPW/bNe0E8eYsHB40mYOluS+jULPCjlWiHzDgr+ZBRXPtgMV1nkLEGdpjrwgmtkZHEGEPaKdS/8faLDA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-riscv64/0.16.17: resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} engines: {node: '>=12'} @@ -1319,6 +1423,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-riscv64/0.17.11: + resolution: {integrity: sha512-MDLwQbtF+83oJCI1Cixn68Et/ME6gelmhssPebC40RdJaect+IM+l7o/CuG0ZlDs6tZTEIoxUe53H3GmMn8oMA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-s390x/0.16.17: resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} engines: {node: '>=12'} @@ -1335,6 +1447,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-s390x/0.17.11: + resolution: {integrity: sha512-4N5EMESvws0Ozr2J94VoUD8HIRi7X0uvUv4c0wpTHZyZY9qpaaN7THjosdiW56irQ4qnJ6Lsc+i+5zGWnyqWqQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/linux-x64/0.16.17: resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} engines: {node: '>=12'} @@ -1351,6 +1471,14 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-x64/0.17.11: + resolution: {integrity: sha512-rM/v8UlluxpytFSmVdbCe1yyKQd/e+FmIJE2oPJvbBo+D0XVWi1y/NQ4iTNx+436WmDHQBjVLrbnAQLQ6U7wlw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@esbuild/netbsd-x64/0.16.17: resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} engines: {node: '>=12'} @@ -1367,6 +1495,14 @@ packages: requiresBuild: true optional: true + /@esbuild/netbsd-x64/0.17.11: + resolution: {integrity: sha512-4WaAhuz5f91h3/g43VBGdto1Q+X7VEZfpcWGtOFXnggEuLvjV+cP6DyLRU15IjiU9fKLLk41OoJfBFN5DhPvag==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + optional: true + /@esbuild/openbsd-x64/0.16.17: resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} engines: {node: '>=12'} @@ -1383,6 +1519,14 @@ packages: requiresBuild: true optional: true + /@esbuild/openbsd-x64/0.17.11: + resolution: {integrity: sha512-UBj135Nx4FpnvtE+C8TWGp98oUgBcmNmdYgl5ToKc0mBHxVVqVE7FUS5/ELMImOp205qDAittL6Ezhasc2Ev/w==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + optional: true + /@esbuild/sunos-x64/0.16.17: resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} engines: {node: '>=12'} @@ -1399,6 +1543,14 @@ packages: requiresBuild: true optional: true + /@esbuild/sunos-x64/0.17.11: + resolution: {integrity: sha512-1/gxTifDC9aXbV2xOfCbOceh5AlIidUrPsMpivgzo8P8zUtczlq1ncFpeN1ZyQJ9lVs2hILy1PG5KPp+w8QPPg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + optional: true + /@esbuild/win32-arm64/0.16.17: resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} engines: {node: '>=12'} @@ -1415,6 +1567,14 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-arm64/0.17.11: + resolution: {integrity: sha512-vtSfyx5yRdpiOW9yp6Ax0zyNOv9HjOAw8WaZg3dF5djEHKKm3UnoohftVvIJtRh0Ec7Hso0RIdTqZvPXJ7FdvQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + /@esbuild/win32-ia32/0.16.17: resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} engines: {node: '>=12'} @@ -1431,6 +1591,14 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-ia32/0.17.11: + resolution: {integrity: sha512-GFPSLEGQr4wHFTiIUJQrnJKZhZjjq4Sphf+mM76nQR6WkQn73vm7IsacmBRPkALfpOCHsopSvLgqdd4iUW2mYw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + /@esbuild/win32-x64/0.16.17: resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} engines: {node: '>=12'} @@ -1447,6 +1615,14 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-x64/0.17.11: + resolution: {integrity: sha512-N9vXqLP3eRL8BqSy8yn4Y98cZI2pZ8fyuHx6lKjiG2WABpT2l01TXdzq5Ma2ZUBzfB7tx5dXVhge8X9u0S70ZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@eslint/eslintrc/2.0.0: resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1529,7 +1705,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.14.5 + '@types/node': 18.14.6 '@types/yargs': 17.0.22 chalk: 4.1.2 dev: false @@ -1932,7 +2108,7 @@ packages: /@types/cheerio/0.22.31: resolution: {integrity: sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 dev: true /@types/clear/0.1.2: @@ -1942,7 +2118,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 dev: true /@types/crawler/1.2.2: @@ -1993,7 +2169,7 @@ packages: resolution: {integrity: sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.14.5 + '@types/node': 18.14.6 dev: true /@types/hash-sum/1.0.0: @@ -2026,7 +2202,7 @@ packages: /@types/jsonfile/6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 dev: true /@types/lodash-es/4.17.6: @@ -2057,8 +2233,8 @@ packages: resolution: {integrity: sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==} dev: true - /@types/node/18.14.5: - resolution: {integrity: sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw==} + /@types/node/18.14.6: + resolution: {integrity: sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -2079,7 +2255,7 @@ packages: resolution: {integrity: sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==} dependencies: '@types/glob': 8.0.1 - '@types/node': 18.14.5 + '@types/node': 18.14.6 dev: true /@types/semver/7.3.13: @@ -2142,7 +2318,7 @@ packages: /@types/webpack-sources/3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -2156,7 +2332,7 @@ packages: /@types/webpack/4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.1 '@types/webpack-sources': 3.2.0 @@ -3438,8 +3614,8 @@ packages: resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - /changelogen/0.5.0: - resolution: {integrity: sha512-fmP5Xpi7KvGCM86dgXYChBQSQAkwoUEEy/2mXCTtEqSo8FgVOo0/mUfNZ2UD1NquHP2XEl7yiZ4R8jlPWiY8Zg==} + /changelogen/0.5.1: + resolution: {integrity: sha512-vBaHKtnjsQHSQMVgVlDTTShRdIdYfadFVGaPhik2OR0VI+NeZuQNKcNfnruG7Ap37ecsZSKXhp5j9GVmtEGguQ==} hasBin: true dependencies: c12: 1.1.2 @@ -4257,7 +4433,7 @@ packages: peerDependencies: webpack: ^4.40.0 || ^5.0.0 dependencies: - esbuild: 0.17.10 + esbuild: 0.17.11 get-tsconfig: 4.4.0 loader-utils: 2.0.4 webpack: 5.75.0 @@ -4322,6 +4498,35 @@ packages: '@esbuild/win32-ia32': 0.17.10 '@esbuild/win32-x64': 0.17.10 + /esbuild/0.17.11: + resolution: {integrity: sha512-pAMImyokbWDtnA/ufPxjQg0fYo2DDuzAlqwnDvbXqHLphe+m80eF++perYKVm8LeTuj2zUuFXC+xgSVxyoHUdg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.11 + '@esbuild/android-arm64': 0.17.11 + '@esbuild/android-x64': 0.17.11 + '@esbuild/darwin-arm64': 0.17.11 + '@esbuild/darwin-x64': 0.17.11 + '@esbuild/freebsd-arm64': 0.17.11 + '@esbuild/freebsd-x64': 0.17.11 + '@esbuild/linux-arm': 0.17.11 + '@esbuild/linux-arm64': 0.17.11 + '@esbuild/linux-ia32': 0.17.11 + '@esbuild/linux-loong64': 0.17.11 + '@esbuild/linux-mips64el': 0.17.11 + '@esbuild/linux-ppc64': 0.17.11 + '@esbuild/linux-riscv64': 0.17.11 + '@esbuild/linux-s390x': 0.17.11 + '@esbuild/linux-x64': 0.17.11 + '@esbuild/netbsd-x64': 0.17.11 + '@esbuild/openbsd-x64': 0.17.11 + '@esbuild/sunos-x64': 0.17.11 + '@esbuild/win32-arm64': 0.17.11 + '@esbuild/win32-ia32': 0.17.11 + '@esbuild/win32-x64': 0.17.11 + /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -5715,7 +5920,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.4.3 - '@types/node': 18.14.5 + '@types/node': 18.14.6 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.10 @@ -5726,7 +5931,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -5734,7 +5939,7 @@ packages: resolution: {integrity: sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 jest-util: 29.4.3 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -6241,7 +6446,7 @@ packages: optional: true dependencies: defu: 6.1.2 - esbuild: 0.17.10 + esbuild: 0.17.11 fs-extra: 11.1.0 globby: 13.1.3 jiti: 1.17.1 @@ -7380,8 +7585,8 @@ packages: dependencies: glob: 7.2.3 - /rimraf/4.2.0: - resolution: {integrity: sha512-tPt+gLORNVqRCk0NwuJ5SlMEcOGvt4CCU8sUPqgCFtCbnoNCTd9Q6vq7JlBbxQlACiH14OR28y7piA2Bak9Sxw==} + /rimraf/4.3.0: + resolution: {integrity: sha512-5qVDXPbByA1qSJEWMv1qAwKsoS22vVpsL2QyxCKBw4gf6XiFo1K3uRLY6uSOOBFDwnqAZtnbILqWKKlzh8bkGg==} engines: {node: '>=14'} hasBin: true dependencies: @@ -8464,7 +8669,7 @@ packages: - terser dev: false - /vite-node/0.29.2_@types+node@18.14.5: + /vite-node/0.29.2_@types+node@18.14.6: resolution: {integrity: sha512-5oe1z6wzI3gkvc4yOBbDBbgpiWiApvuN4P55E8OI131JGrSuo4X3SOZrNmZYo4R8Zkze/dhi572blX0zc+6SdA==} engines: {node: '>=v14.16.0'} hasBin: true @@ -8474,7 +8679,7 @@ packages: mlly: 1.1.1 pathe: 1.1.0 picocolors: 1.0.0 - vite: 4.1.4_@types+node@18.14.5 + vite: 4.1.4_@types+node@18.14.6 transitivePeerDependencies: - '@types/node' - less @@ -8567,7 +8772,7 @@ packages: optionalDependencies: fsevents: 2.3.2 - /vite/4.1.4_@types+node@18.14.5: + /vite/4.1.4_@types+node@18.14.6: resolution: {integrity: sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -8592,7 +8797,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.14.5 + '@types/node': 18.14.6 esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 @@ -8625,7 +8830,7 @@ packages: dependencies: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 - '@types/node': 18.14.5 + '@types/node': 18.14.6 '@vitest/expect': 0.29.2 '@vitest/runner': 0.29.2 '@vitest/spy': 0.29.2 @@ -8644,8 +8849,8 @@ packages: tinybench: 2.3.1 tinypool: 0.3.1 tinyspy: 1.1.1 - vite: 4.1.4_@types+node@18.14.5 - vite-node: 0.29.2_@types+node@18.14.5 + vite: 4.1.4_@types+node@18.14.6 + vite-node: 0.29.2_@types+node@18.14.6 why-is-node-running: 2.2.2 transitivePeerDependencies: - less From 44d4aba283976cdb50c39fd14a949821c158bf24 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 4 Mar 2023 14:34:34 +0000 Subject: [PATCH 24/30] docs: add edge banners on `versions` and modules (#19448) --- docs/2.guide/2.directory-structure/1.modules.md | 4 ++++ docs/2.guide/3.going-further/1.internals.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/2.guide/2.directory-structure/1.modules.md b/docs/2.guide/2.directory-structure/1.modules.md index a4f6734fc1..62dd6e1460 100644 --- a/docs/2.guide/2.directory-structure/1.modules.md +++ b/docs/2.guide/2.directory-structure/1.modules.md @@ -7,6 +7,8 @@ description: Use the modules/ directory to automatically register local modules # Modules Directory +::StabilityEdge + Nuxt scans the `modules/` directory and loads them before starting. It is a good place to place any local modules you develop while building your application. The auto-registered files patterns are: @@ -46,3 +48,5 @@ export default defineEventHandler(() => { When starting Nuxt, the `hello` module will be registered and the `/api/hello` route will be available. :ReadMore{link="/docs/guide/going-further/modules"} + +:: diff --git a/docs/2.guide/3.going-further/1.internals.md b/docs/2.guide/3.going-further/1.internals.md index 2220aae10a..79b8ec1b72 100644 --- a/docs/2.guide/3.going-further/1.internals.md +++ b/docs/2.guide/3.going-further/1.internals.md @@ -70,6 +70,8 @@ const nuxtApp = { } ``` +:StabilityEdge{title="nuxtApp.versions"} + For more details, check out [the source code](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/nuxt.ts). ## Runtime Context vs. Build Context From 71225e50c5bc45c3feb7b189997659d880fe03f3 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Sat, 4 Mar 2023 15:39:26 +0100 Subject: [PATCH 25/30] feat(nuxt): enable config schema by default (#19172) --- packages/nuxt/src/core/schema.ts | 35 ++++++++++------------ packages/schema/src/config/experimental.ts | 4 +-- packages/schema/src/types/config.ts | 7 +++-- test/fixtures/basic/nuxt.config.ts | 4 +-- test/fixtures/basic/types.ts | 3 +- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/packages/nuxt/src/core/schema.ts b/packages/nuxt/src/core/schema.ts index 4544bfe920..77fa41f094 100644 --- a/packages/nuxt/src/core/schema.ts +++ b/packages/nuxt/src/core/schema.ts @@ -1,5 +1,5 @@ import { existsSync } from 'node:fs' -import { writeFile, mkdir, rm } from 'node:fs/promises' +import { writeFile, mkdir } from 'node:fs/promises' import { dirname, resolve } from 'pathe' import chokidar from 'chokidar' import { defu } from 'defu' @@ -7,7 +7,6 @@ import { debounce } from 'perfect-debounce' import { defineNuxtModule, createResolver } from '@nuxt/kit' import { resolveSchema as resolveUntypedSchema, - generateMarkdown, generateTypes } from 'untyped' import type { Schema, SchemaDefinition } from 'untyped' @@ -39,9 +38,14 @@ export default defineNuxtModule({ }) // Register module types - nuxt.hook('prepare:types', (ctx) => { + nuxt.hook('prepare:types', async (ctx) => { ctx.references.push({ path: 'nuxt-config-schema' }) ctx.references.push({ path: 'schema/nuxt.schema.d.ts' }) + if (nuxt.options._prepare) { + await nuxt.hooks.callHook('schema:beforeWrite', schema) + await writeSchema(schema) + await nuxt.hooks.callHook('schema:written') + } }) // Resolve schema after all modules initialized @@ -122,13 +126,6 @@ export default defineNuxtModule({ } async function writeSchema (schema: Schema) { - // Avoid writing empty schema - const isEmptySchema = !schema.properties || Object.keys(schema.properties).length === 0 - if (isEmptySchema) { - await rm(resolve(nuxt.options.buildDir, 'schema'), { recursive: true }).catch(() => { }) - return - } - // Write it to build dir await mkdir(resolve(nuxt.options.buildDir, 'schema'), { recursive: true }) await writeFile( @@ -136,12 +133,6 @@ export default defineNuxtModule({ JSON.stringify(schema, null, 2), 'utf8' ) - const markdown = '# Nuxt Custom Config Schema' + generateMarkdown(schema) - await writeFile( - resolve(nuxt.options.buildDir, 'schema/nuxt.schema.md'), - markdown, - 'utf8' - ) const _types = generateTypes(schema, { addExport: true, interfaceName: 'NuxtCustomSchema', @@ -152,12 +143,18 @@ export default defineNuxtModule({ ` export type CustomAppConfig = Exclude +declare module '@nuxt/schema' { + interface NuxtConfig extends NuxtCustomSchema {} + interface NuxtOptions extends NuxtCustomSchema {} + interface CustomAppConfig extends CustomAppConfig {} +} + declare module 'nuxt/schema' { interface NuxtConfig extends NuxtCustomSchema {} interface NuxtOptions extends NuxtCustomSchema {} - interface AppConfigInput extends CustomAppConfig {} - interface AppConfig extends CustomAppConfig {} -}` + interface CustomAppConfig extends CustomAppConfig {} +} +` const typesPath = resolve( nuxt.options.buildDir, 'schema/nuxt.schema.d.ts' diff --git a/packages/schema/src/config/experimental.ts b/packages/schema/src/config/experimental.ts index 00694d45ac..112233deab 100644 --- a/packages/schema/src/config/experimental.ts +++ b/packages/schema/src/config/experimental.ts @@ -115,10 +115,10 @@ export default defineUntypedSchema({ componentIslands: false, /** - * Enable experimental config schema support + * Config schema support * * @see https://github.com/nuxt/nuxt/issues/15592 */ - configSchema: false + configSchema: true } }) diff --git a/packages/schema/src/types/config.ts b/packages/schema/src/types/config.ts index ed9827f875..9bc2602e17 100644 --- a/packages/schema/src/types/config.ts +++ b/packages/schema/src/types/config.ts @@ -135,7 +135,10 @@ export interface RuntimeConfig extends RuntimeConfigNamespace { } // -- App Config -- -export interface AppConfigInput extends Record { + +export interface CustomAppConfig extends Record { } + +export interface AppConfigInput extends CustomAppConfig { /** @deprecated reserved */ private?: never /** @deprecated reserved */ @@ -153,4 +156,4 @@ export interface NuxtAppConfig { keepalive: boolean | KeepAliveProps } -export interface AppConfig { } +export interface AppConfig extends CustomAppConfig { } diff --git a/test/fixtures/basic/nuxt.config.ts b/test/fixtures/basic/nuxt.config.ts index df9b888ac2..f09079b074 100644 --- a/test/fixtures/basic/nuxt.config.ts +++ b/test/fixtures/basic/nuxt.config.ts @@ -11,6 +11,7 @@ declare module 'nitropack' { } export default defineNuxtConfig({ + typescript: { strict: true }, app: { pageTransition: true, layoutTransition: true, @@ -161,8 +162,7 @@ export default defineNuxtConfig({ componentIslands: true, reactivityTransform: true, treeshakeClientOnly: true, - payloadExtraction: true, - configSchema: true + payloadExtraction: true }, appConfig: { fromNuxtConfig: true, diff --git a/test/fixtures/basic/types.ts b/test/fixtures/basic/types.ts index 9052f0dcc7..c1ba1b0df7 100644 --- a/test/fixtures/basic/types.ts +++ b/test/fixtures/basic/types.ts @@ -247,8 +247,9 @@ describe('app config', () => { val: number }, userConfig: number + [key: string]: any } - expectTypeOf().toMatchTypeOf() + expectTypeOf().toEqualTypeOf() }) }) From b73ca9143710a30620945e08ca56805dc5679b90 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 4 Mar 2023 15:10:40 +0000 Subject: [PATCH 26/30] fix(kit): match commit hashes of other lengths (#19450) --- packages/kit/src/compatibility.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kit/src/compatibility.ts b/packages/kit/src/compatibility.ts index abd83a6653..98462f9db9 100644 --- a/packages/kit/src/compatibility.ts +++ b/packages/kit/src/compatibility.ts @@ -12,7 +12,7 @@ export async function checkNuxtCompatibility (constraints: NuxtCompatibility, nu if (constraints.nuxt) { const nuxtVersion = getNuxtVersion(nuxt) const nuxtSemanticVersion = nuxtVersion - .replace(/-[0-9]+\.[0-9a-f]{7,8}/, '') // Remove edge prefix + .replace(/-[0-9]+\.[0-9a-f]+/, '') // Remove edge prefix if (!satisfies(nuxtSemanticVersion, constraints.nuxt, { includePrerelease: true })) { issues.push({ name: 'nuxt', From 5977adb4d47aa386770843c127a87484bf47a7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 5 Mar 2023 10:51:10 +0100 Subject: [PATCH 27/30] docs: add local modules ordering --- docs/2.guide/2.directory-structure/1.modules.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/2.guide/2.directory-structure/1.modules.md b/docs/2.guide/2.directory-structure/1.modules.md index 62dd6e1460..b2dbc75c24 100644 --- a/docs/2.guide/2.directory-structure/1.modules.md +++ b/docs/2.guide/2.directory-structure/1.modules.md @@ -47,6 +47,15 @@ export default defineEventHandler(() => { When starting Nuxt, the `hello` module will be registered and the `/api/hello` route will be available. +The local modules are registered by alphabetical order. You can change the order by prefixing with a number if front of each directory: + +`ห‹`md +modules/ + 1.first-module/ + index.ts + 2.second-module.ts +ห‹`ห‹ + :ReadMore{link="/docs/guide/going-further/modules"} :: From a670e0770323f7d1943db1731670f322123e233b Mon Sep 17 00:00:00 2001 From: Alexander Lichter Date: Sun, 5 Mar 2023 11:10:56 +0100 Subject: [PATCH 28/30] docs: fix link to nitro `routeRules` (#19455) --- packages/schema/src/config/nitro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/src/config/nitro.ts b/packages/schema/src/config/nitro.ts index 6dbe9919a3..9935128c2f 100644 --- a/packages/schema/src/config/nitro.ts +++ b/packages/schema/src/config/nitro.ts @@ -22,7 +22,7 @@ export default defineUntypedSchema({ * * @experimental This is an experimental feature and API may change in the future. * - * @see https://nitro.unjs.io/config/#routes + * @see https://nitro.unjs.io/config/#routerules * * @type {typeof import('nitropack')['NitroConfig']['routeRules']} */ From 4310d2a0ee4151a397efd8bbea989ca1c2a0c923 Mon Sep 17 00:00:00 2001 From: Alexander Lichter Date: Sun, 5 Mar 2023 15:42:16 +0100 Subject: [PATCH 29/30] docs: fix dead link to useSeoMeta guide (#19463) --- docs/1.getting-started/5.seo-meta.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/1.getting-started/5.seo-meta.md b/docs/1.getting-started/5.seo-meta.md index 09c868aa54..c0e2ec533a 100644 --- a/docs/1.getting-started/5.seo-meta.md +++ b/docs/1.getting-started/5.seo-meta.md @@ -112,7 +112,7 @@ useServerSeoMeta({ ``` -::ReadMore{link="https://unhead.harlanzw.com/guide/guides/useseometa"} +::ReadMore{link="https://unhead.harlanzw.com/guide/composables/use-seo-meta"} :: ## Components From a7d75a84659b9c9cd93e099df4a7bf66409771b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 5 Mar 2023 12:59:50 -0800 Subject: [PATCH 30/30] chore(deps): update all non-major dependencies to ^1.1.16 (main) (#19466) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- packages/nuxt/package.json | 4 +- packages/schema/package.json | 2 +- pnpm-lock.yaml | 301 +++++------------------------------ 3 files changed, 42 insertions(+), 265 deletions(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index e28c22e2a7..9a74c2b473 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -52,7 +52,7 @@ "@nuxt/telemetry": "^2.1.10", "@nuxt/ui-templates": "^1.1.1", "@nuxt/vite-builder": "3.2.3", - "@unhead/ssr": "^1.1.15", + "@unhead/ssr": "^1.1.16", "@vue/reactivity": "^3.2.47", "@vue/shared": "^3.2.47", "@vueuse/head": "^1.1.15", @@ -82,7 +82,7 @@ "ufo": "^1.1.1", "unctx": "^2.1.2", "unenv": "^1.2.1", - "unhead": "^1.1.15", + "unhead": "^1.1.16", "unimport": "^3.0.2", "unplugin": "^1.1.0", "untyped": "^1.2.2", diff --git a/packages/schema/package.json b/packages/schema/package.json index b9a55fbb7f..e0ca4fe48d 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@types/lodash.template": "^4", "@types/semver": "^7.3.13", - "@unhead/schema": "^1.1.15", + "@unhead/schema": "^1.1.16", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.0", "nitropack": "^2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b52988600..1c45f36448 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -418,7 +418,7 @@ importers: '@nuxt/vite-builder': workspace:* '@types/fs-extra': ^11.0.1 '@types/hash-sum': ^1.0.0 - '@unhead/ssr': ^1.1.15 + '@unhead/ssr': ^1.1.16 '@vue/reactivity': ^3.2.47 '@vue/shared': ^3.2.47 '@vueuse/head': ^1.1.15 @@ -449,7 +449,7 @@ importers: unbuild: ^1.1.2 unctx: ^2.1.2 unenv: ^1.2.1 - unhead: ^1.1.15 + unhead: ^1.1.16 unimport: ^3.0.2 unplugin: ^1.1.0 untyped: ^1.2.2 @@ -464,7 +464,7 @@ importers: '@nuxt/telemetry': 2.1.10 '@nuxt/ui-templates': 1.1.1 '@nuxt/vite-builder': link:../vite - '@unhead/ssr': 1.1.15 + '@unhead/ssr': 1.1.16 '@vue/reactivity': 3.2.47 '@vue/shared': 3.2.47 '@vueuse/head': 1.1.15_vue@3.2.47 @@ -494,7 +494,7 @@ importers: ufo: 1.1.1 unctx: 2.1.2 unenv: 1.2.1 - unhead: 1.1.15 + unhead: 1.1.16 unimport: 3.0.2 unplugin: 1.1.0 untyped: 1.2.2 @@ -511,7 +511,7 @@ importers: specifiers: '@types/lodash.template': ^4 '@types/semver': ^7.3.13 - '@unhead/schema': ^1.1.15 + '@unhead/schema': ^1.1.16 '@vitejs/plugin-vue': ^4.0.0 '@vitejs/plugin-vue-jsx': ^3.0.0 c12: ^1.1.2 @@ -547,7 +547,7 @@ importers: devDependencies: '@types/lodash.template': 4.5.1 '@types/semver': 7.3.13 - '@unhead/schema': 1.1.15 + '@unhead/schema': 1.1.16 '@vitejs/plugin-vue': 4.0.0_vite@4.1.4 '@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.4 nitropack: 2.2.3 @@ -1103,14 +1103,6 @@ packages: requiresBuild: true optional: true - /@esbuild/android-arm/0.17.10: - resolution: {integrity: sha512-7YEBfZ5lSem9Tqpsz+tjbdsEshlO9j/REJrfv4DXgKTt1+/MHqGwbtlyxQuaSlMeUZLxUKBaX8wdzlTfHkmnLw==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - optional: true - /@esbuild/android-arm/0.17.11: resolution: {integrity: sha512-CdyX6sRVh1NzFCsf5vw3kULwlAhfy9wVt8SZlrhQ7eL2qBjGbFhRBWkkAzuZm9IIEOCKJw4DXA6R85g+qc8RDw==} engines: {node: '>=12'} @@ -1127,14 +1119,6 @@ packages: requiresBuild: true optional: true - /@esbuild/android-arm64/0.17.10: - resolution: {integrity: sha512-ht1P9CmvrPF5yKDtyC+z43RczVs4rrHpRqrmIuoSvSdn44Fs1n6DGlpZKdK6rM83pFLbVaSUwle8IN+TPmkv7g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - optional: true - /@esbuild/android-arm64/0.17.11: resolution: {integrity: sha512-QnK4d/zhVTuV4/pRM4HUjcsbl43POALU2zvBynmrrqZt9LPcLA3x1fTZPBg2RRguBQnJcnU059yKr+bydkntjg==} engines: {node: '>=12'} @@ -1151,14 +1135,6 @@ packages: requiresBuild: true optional: true - /@esbuild/android-x64/0.17.10: - resolution: {integrity: sha512-CYzrm+hTiY5QICji64aJ/xKdN70IK8XZ6iiyq0tZkd3tfnwwSWTYH1t3m6zyaaBxkuj40kxgMyj1km/NqdjQZA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - optional: true - /@esbuild/android-x64/0.17.11: resolution: {integrity: sha512-3PL3HKtsDIXGQcSCKtWD/dy+mgc4p2Tvo2qKgKHj9Yf+eniwFnuoQ0OUhlSfAEpKAFzF9N21Nwgnap6zy3L3MQ==} engines: {node: '>=12'} @@ -1175,14 +1151,6 @@ packages: requiresBuild: true optional: true - /@esbuild/darwin-arm64/0.17.10: - resolution: {integrity: sha512-3HaGIowI+nMZlopqyW6+jxYr01KvNaLB5znXfbyyjuo4lE0VZfvFGcguIJapQeQMS4cX/NEispwOekJt3gr5Dg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - /@esbuild/darwin-arm64/0.17.11: resolution: {integrity: sha512-pJ950bNKgzhkGNO3Z9TeHzIFtEyC2GDQL3wxkMApDEghYx5Qers84UTNc1bAxWbRkuJOgmOha5V0WUeh8G+YGw==} engines: {node: '>=12'} @@ -1199,14 +1167,6 @@ packages: requiresBuild: true optional: true - /@esbuild/darwin-x64/0.17.10: - resolution: {integrity: sha512-J4MJzGchuCRG5n+B4EHpAMoJmBeAE1L3wGYDIN5oWNqX0tEr7VKOzw0ymSwpoeSpdCa030lagGUfnfhS7OvzrQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - /@esbuild/darwin-x64/0.17.11: resolution: {integrity: sha512-iB0dQkIHXyczK3BZtzw1tqegf0F0Ab5texX2TvMQjiJIWXAfM4FQl7D909YfXWnB92OQz4ivBYQ2RlxBJrMJOw==} engines: {node: '>=12'} @@ -1223,14 +1183,6 @@ packages: requiresBuild: true optional: true - /@esbuild/freebsd-arm64/0.17.10: - resolution: {integrity: sha512-ZkX40Z7qCbugeK4U5/gbzna/UQkM9d9LNV+Fro8r7HA7sRof5Rwxc46SsqeMvB5ZaR0b1/ITQ/8Y1NmV2F0fXQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - optional: true - /@esbuild/freebsd-arm64/0.17.11: resolution: {integrity: sha512-7EFzUADmI1jCHeDRGKgbnF5sDIceZsQGapoO6dmw7r/ZBEKX7CCDnIz8m9yEclzr7mFsd+DyasHzpjfJnmBB1Q==} engines: {node: '>=12'} @@ -1247,14 +1199,6 @@ packages: requiresBuild: true optional: true - /@esbuild/freebsd-x64/0.17.10: - resolution: {integrity: sha512-0m0YX1IWSLG9hWh7tZa3kdAugFbZFFx9XrvfpaCMMvrswSTvUZypp0NFKriUurHpBA3xsHVE9Qb/0u2Bbi/otg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true - /@esbuild/freebsd-x64/0.17.11: resolution: {integrity: sha512-iPgenptC8i8pdvkHQvXJFzc1eVMR7W2lBPrTE6GbhR54sLcF42mk3zBOjKPOodezzuAz/KSu8CPyFSjcBMkE9g==} engines: {node: '>=12'} @@ -1271,14 +1215,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-arm/0.17.10: - resolution: {integrity: sha512-whRdrrl0X+9D6o5f0sTZtDM9s86Xt4wk1bf7ltx6iQqrIIOH+sre1yjpcCdrVXntQPCNw/G+XqsD4HuxeS+2QA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-arm/0.17.11: resolution: {integrity: sha512-M9iK/d4lgZH0U5M1R2p2gqhPV/7JPJcRz+8O8GBKVgqndTzydQ7B2XGDbxtbvFkvIs53uXTobOhv+RyaqhUiMg==} engines: {node: '>=12'} @@ -1295,14 +1231,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-arm64/0.17.10: - resolution: {integrity: sha512-g1EZJR1/c+MmCgVwpdZdKi4QAJ8DCLP5uTgLWSAVd9wlqk9GMscaNMEViG3aE1wS+cNMzXXgdWiW/VX4J+5nTA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-arm64/0.17.11: resolution: {integrity: sha512-Qxth3gsWWGKz2/qG2d5DsW/57SeA2AmpSMhdg9TSB5Svn2KDob3qxfQSkdnWjSd42kqoxIPy3EJFs+6w1+6Qjg==} engines: {node: '>=12'} @@ -1319,14 +1247,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-ia32/0.17.10: - resolution: {integrity: sha512-1vKYCjfv/bEwxngHERp7huYfJ4jJzldfxyfaF7hc3216xiDA62xbXJfRlradiMhGZbdNLj2WA1YwYFzs9IWNPw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-ia32/0.17.11: resolution: {integrity: sha512-dB1nGaVWtUlb/rRDHmuDQhfqazWE0LMro/AIbT2lWM3CDMHJNpLckH+gCddQyhhcLac2OYw69ikUMO34JLt3wA==} engines: {node: '>=12'} @@ -1343,14 +1263,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-loong64/0.17.10: - resolution: {integrity: sha512-mvwAr75q3Fgc/qz3K6sya3gBmJIYZCgcJ0s7XshpoqIAIBszzfXsqhpRrRdVFAyV1G9VUjj7VopL2HnAS8aHFA==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-loong64/0.17.11: resolution: {integrity: sha512-aCWlq70Q7Nc9WDnormntGS1ar6ZFvUpqr8gXtO+HRejRYPweAFQN615PcgaSJkZjhHp61+MNLhzyVALSF2/Q0g==} engines: {node: '>=12'} @@ -1367,14 +1279,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-mips64el/0.17.10: - resolution: {integrity: sha512-XilKPgM2u1zR1YuvCsFQWl9Fc35BqSqktooumOY2zj7CSn5czJn279j9TE1JEqSqz88izJo7yE4x3LSf7oxHzg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-mips64el/0.17.11: resolution: {integrity: sha512-cGeGNdQxqY8qJwlYH1BP6rjIIiEcrM05H7k3tR7WxOLmD1ZxRMd6/QIOWMb8mD2s2YJFNRuNQ+wjMhgEL2oCEw==} engines: {node: '>=12'} @@ -1391,14 +1295,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-ppc64/0.17.10: - resolution: {integrity: sha512-kM4Rmh9l670SwjlGkIe7pYWezk8uxKHX4Lnn5jBZYBNlWpKMBCVfpAgAJqp5doLobhzF3l64VZVrmGeZ8+uKmQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-ppc64/0.17.11: resolution: {integrity: sha512-BdlziJQPW/bNe0E8eYsHB40mYOluS+jULPCjlWiHzDgr+ZBRXPtgMV1nkLEGdpjrwgmtkZHEGEPaKdS/8faLDA==} engines: {node: '>=12'} @@ -1415,14 +1311,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-riscv64/0.17.10: - resolution: {integrity: sha512-r1m9ZMNJBtOvYYGQVXKy+WvWd0BPvSxMsVq8Hp4GzdMBQvfZRvRr5TtX/1RdN6Va8JMVQGpxqde3O+e8+khNJQ==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-riscv64/0.17.11: resolution: {integrity: sha512-MDLwQbtF+83oJCI1Cixn68Et/ME6gelmhssPebC40RdJaect+IM+l7o/CuG0ZlDs6tZTEIoxUe53H3GmMn8oMA==} engines: {node: '>=12'} @@ -1439,14 +1327,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-s390x/0.17.10: - resolution: {integrity: sha512-LsY7QvOLPw9WRJ+fU5pNB3qrSfA00u32ND5JVDrn/xG5hIQo3kvTxSlWFRP0NJ0+n6HmhPGG0Q4jtQsb6PFoyg==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-s390x/0.17.11: resolution: {integrity: sha512-4N5EMESvws0Ozr2J94VoUD8HIRi7X0uvUv4c0wpTHZyZY9qpaaN7THjosdiW56irQ4qnJ6Lsc+i+5zGWnyqWqQ==} engines: {node: '>=12'} @@ -1463,14 +1343,6 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-x64/0.17.10: - resolution: {integrity: sha512-zJUfJLebCYzBdIz/Z9vqwFjIA7iSlLCFvVi7glMgnu2MK7XYigwsonXshy9wP9S7szF+nmwrelNaP3WGanstEg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-x64/0.17.11: resolution: {integrity: sha512-rM/v8UlluxpytFSmVdbCe1yyKQd/e+FmIJE2oPJvbBo+D0XVWi1y/NQ4iTNx+436WmDHQBjVLrbnAQLQ6U7wlw==} engines: {node: '>=12'} @@ -1487,14 +1359,6 @@ packages: requiresBuild: true optional: true - /@esbuild/netbsd-x64/0.17.10: - resolution: {integrity: sha512-lOMkailn4Ok9Vbp/q7uJfgicpDTbZFlXlnKT2DqC8uBijmm5oGtXAJy2ZZVo5hX7IOVXikV9LpCMj2U8cTguWA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - optional: true - /@esbuild/netbsd-x64/0.17.11: resolution: {integrity: sha512-4WaAhuz5f91h3/g43VBGdto1Q+X7VEZfpcWGtOFXnggEuLvjV+cP6DyLRU15IjiU9fKLLk41OoJfBFN5DhPvag==} engines: {node: '>=12'} @@ -1511,14 +1375,6 @@ packages: requiresBuild: true optional: true - /@esbuild/openbsd-x64/0.17.10: - resolution: {integrity: sha512-/VE0Kx6y7eekqZ+ZLU4AjMlB80ov9tEz4H067Y0STwnGOYL8CsNg4J+cCmBznk1tMpxMoUOf0AbWlb1d2Pkbig==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - optional: true - /@esbuild/openbsd-x64/0.17.11: resolution: {integrity: sha512-UBj135Nx4FpnvtE+C8TWGp98oUgBcmNmdYgl5ToKc0mBHxVVqVE7FUS5/ELMImOp205qDAittL6Ezhasc2Ev/w==} engines: {node: '>=12'} @@ -1535,14 +1391,6 @@ packages: requiresBuild: true optional: true - /@esbuild/sunos-x64/0.17.10: - resolution: {integrity: sha512-ERNO0838OUm8HfUjjsEs71cLjLMu/xt6bhOlxcJ0/1MG3hNqCmbWaS+w/8nFLa0DDjbwZQuGKVtCUJliLmbVgg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - optional: true - /@esbuild/sunos-x64/0.17.11: resolution: {integrity: sha512-1/gxTifDC9aXbV2xOfCbOceh5AlIidUrPsMpivgzo8P8zUtczlq1ncFpeN1ZyQJ9lVs2hILy1PG5KPp+w8QPPg==} engines: {node: '>=12'} @@ -1559,14 +1407,6 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-arm64/0.17.10: - resolution: {integrity: sha512-fXv+L+Bw2AeK+XJHwDAQ9m3NRlNemG6Z6ijLwJAAVdu4cyoFbBWbEtyZzDeL+rpG2lWI51cXeMt70HA8g2MqIg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - optional: true - /@esbuild/win32-arm64/0.17.11: resolution: {integrity: sha512-vtSfyx5yRdpiOW9yp6Ax0zyNOv9HjOAw8WaZg3dF5djEHKKm3UnoohftVvIJtRh0Ec7Hso0RIdTqZvPXJ7FdvQ==} engines: {node: '>=12'} @@ -1583,14 +1423,6 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-ia32/0.17.10: - resolution: {integrity: sha512-3s+HADrOdCdGOi5lnh5DMQEzgbsFsd4w57L/eLKKjMnN0CN4AIEP0DCP3F3N14xnxh3ruNc32A0Na9zYe1Z/AQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - optional: true - /@esbuild/win32-ia32/0.17.11: resolution: {integrity: sha512-GFPSLEGQr4wHFTiIUJQrnJKZhZjjq4Sphf+mM76nQR6WkQn73vm7IsacmBRPkALfpOCHsopSvLgqdd4iUW2mYw==} engines: {node: '>=12'} @@ -1607,14 +1439,6 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-x64/0.17.10: - resolution: {integrity: sha512-oP+zFUjYNaMNmjTwlFtWep85hvwUu19cZklB3QsBOcZSs6y7hmH4LNCJ7075bsqzYaNvZFXJlAVaQ2ApITDXtw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true - /@esbuild/win32-x64/0.17.11: resolution: {integrity: sha512-N9vXqLP3eRL8BqSy8yn4Y98cZI2pZ8fyuHx6lKjiG2WABpT2l01TXdzq5Ma2ZUBzfB7tx5dXVhge8X9u0S70ZQ==} engines: {node: '>=12'} @@ -2162,7 +1986,7 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 18.14.4 + '@types/node': 18.14.6 dev: true /@types/glob/8.0.1: @@ -2229,10 +2053,6 @@ packages: resolution: {integrity: sha512-nJOuiTlsvmClSr3+a/trTSx4DTuY/VURsWGKSf/eeavh0LRMqdsK60ti0TlwM5iHiGOK3/Ibkxsbr7i9rzGreA==} dev: true - /@types/node/18.14.4: - resolution: {integrity: sha512-VhCw7I7qO2X49+jaKcAUwi3rR+hbxT5VcYF493+Z5kMLI0DL568b7JI4IDJaxWFH0D/xwmGJNoXisyX+w7GH/g==} - dev: true - /@types/node/18.14.6: resolution: {integrity: sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==} @@ -2283,7 +2103,7 @@ packages: /@types/webpack-bundle-analyzer/4.6.0: resolution: {integrity: sha512-XeQmQCCXdZdap+A/60UKmxW5Mz31Vp9uieGlHB3T4z/o2OLVLtTI3bvTuS6A2OWd/rbAAQiGGWIEFQACu16szA==} dependencies: - '@types/node': 18.14.4 + '@types/node': 18.14.6 tapable: 2.2.1 webpack: 5.75.0 transitivePeerDependencies: @@ -2480,41 +2300,41 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@unhead/dom/1.1.15: - resolution: {integrity: sha512-b1S8avVokif15pankINlFrKrxW2pEJ4R4vt/IEDLhjsAq4oDeLpbFUQNvFeEQafaXBdryCTWICJX8MQrzs9INA==} + /@unhead/dom/1.1.16: + resolution: {integrity: sha512-4JlwF4pNVynZsxT5687ntvS2yafGtWg7Y76IAPmLSOVrZ6fpYqF/vUn5+eCbMb0Og4C9ECrkbD9NSIqAiQ/0/Q==} dependencies: - '@unhead/schema': 1.1.15 - '@unhead/shared': 1.1.15 + '@unhead/schema': 1.1.16 + '@unhead/shared': 1.1.16 dev: false - /@unhead/schema/1.1.15: - resolution: {integrity: sha512-331yP1JrJfvaa2TvfiVGLlgwl9bVgFVJ0pMy1hPBM/0+J09d6SKy4khZb2j0WtgVofY6FnThmKWDNCngCzRZhg==} + /@unhead/schema/1.1.16: + resolution: {integrity: sha512-I9xIM9A5q4MBkHM0GTleed47WztJKpA8tJ0HSM74dVl887R3H5qwH9h3RMOo6y9xVhqgFt1MGL6wxTDAjqRczg==} dependencies: hookable: 5.4.2 zhead: 2.0.4 - /@unhead/shared/1.1.15: - resolution: {integrity: sha512-s41AbZFeTAV982pP5+MUno3UlKcSxziMjs+D6TAKP+OdNhyN/W557TUVKbBY/4EWWYl5c0wJhjeuVduJBQpSSQ==} + /@unhead/shared/1.1.16: + resolution: {integrity: sha512-Fien3han5vZ4sIaH89Tk9o7eensIDEdRynbwnik+WNo0PTfmaN/LCa3EYsacOdNYeZ3eMjjYpmQt6r+FJCqzSA==} dependencies: - '@unhead/schema': 1.1.15 + '@unhead/schema': 1.1.16 dev: false - /@unhead/ssr/1.1.15: - resolution: {integrity: sha512-ZDj3lJuMOTrhDrNFQLETC1xQN2z53GzXV4kRQ6Baeqb9uDR+3q1yeHV+eL7DEqR8aPCHt26gs5c8OYJsfE1HFQ==} + /@unhead/ssr/1.1.16: + resolution: {integrity: sha512-SCay47uCx7jHL30iX/D0chxOLLY5m2/WCU5bepCQlzFO25OFC6cEEYtG6/BQOIRVnyN8a2KvOU38jgL9xQZN9A==} dependencies: - '@unhead/schema': 1.1.15 - '@unhead/shared': 1.1.15 + '@unhead/schema': 1.1.16 + '@unhead/shared': 1.1.16 dev: false - /@unhead/vue/1.1.15_vue@3.2.47: - resolution: {integrity: sha512-EX8zsb3dNhC72tpz6BExK3oIpy2t6f2QbpYsr6gthgtLMJqe8SPjgJlKGcVEegZhPw4bmMzMk72Dak3qomb98A==} + /@unhead/vue/1.1.16_vue@3.2.47: + resolution: {integrity: sha512-EbE0kqJHDmebF+X6fL7HqGnbTa+b6h6SzIvE+D0i0/IwhD2lXRrPcBy0XyLV9CLBpAbLVG4OByxnBX+7Kk/vUA==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/schema': 1.1.15 - '@unhead/shared': 1.1.15 + '@unhead/schema': 1.1.16 + '@unhead/shared': 1.1.16 hookable: 5.4.2 - unhead: 1.1.15 + unhead: 1.1.16 vue: 3.2.47 dev: false @@ -2975,10 +2795,10 @@ packages: peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/dom': 1.1.15 - '@unhead/schema': 1.1.15 - '@unhead/ssr': 1.1.15 - '@unhead/vue': 1.1.15_vue@3.2.47 + '@unhead/dom': 1.1.16 + '@unhead/schema': 1.1.16 + '@unhead/ssr': 1.1.16 + '@unhead/vue': 1.1.16_vue@3.2.47 vue: 3.2.47 dev: false @@ -4469,35 +4289,6 @@ packages: '@esbuild/win32-ia32': 0.16.17 '@esbuild/win32-x64': 0.16.17 - /esbuild/0.17.10: - resolution: {integrity: sha512-n7V3v29IuZy5qgxx25TKJrEm0FHghAlS6QweUcyIgh/U0zYmQcvogWROitrTyZId1mHSkuhhuyEXtI9OXioq7A==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.17.10 - '@esbuild/android-arm64': 0.17.10 - '@esbuild/android-x64': 0.17.10 - '@esbuild/darwin-arm64': 0.17.10 - '@esbuild/darwin-x64': 0.17.10 - '@esbuild/freebsd-arm64': 0.17.10 - '@esbuild/freebsd-x64': 0.17.10 - '@esbuild/linux-arm': 0.17.10 - '@esbuild/linux-arm64': 0.17.10 - '@esbuild/linux-ia32': 0.17.10 - '@esbuild/linux-loong64': 0.17.10 - '@esbuild/linux-mips64el': 0.17.10 - '@esbuild/linux-ppc64': 0.17.10 - '@esbuild/linux-riscv64': 0.17.10 - '@esbuild/linux-s390x': 0.17.10 - '@esbuild/linux-x64': 0.17.10 - '@esbuild/netbsd-x64': 0.17.10 - '@esbuild/openbsd-x64': 0.17.10 - '@esbuild/sunos-x64': 0.17.10 - '@esbuild/win32-arm64': 0.17.10 - '@esbuild/win32-ia32': 0.17.10 - '@esbuild/win32-x64': 0.17.10 - /esbuild/0.17.11: resolution: {integrity: sha512-pAMImyokbWDtnA/ufPxjQg0fYo2DDuzAlqwnDvbXqHLphe+m80eF++perYKVm8LeTuj2zUuFXC+xgSVxyoHUdg==} engines: {node: '>=12'} @@ -6408,14 +6199,9 @@ packages: dependencies: yallist: 4.0.0 - /minipass/4.0.3: - resolution: {integrity: sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==} - engines: {node: '>=8'} - /minipass/4.2.4: resolution: {integrity: sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==} engines: {node: '>=8'} - dev: true /minizlib/2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} @@ -6536,7 +6322,7 @@ packages: defu: 6.1.2 destr: 1.2.2 dot-prop: 7.2.0 - esbuild: 0.17.10 + esbuild: 0.17.11 escape-string-regexp: 5.0.0 etag: 1.8.1 fs-extra: 11.1.0 @@ -6770,14 +6556,6 @@ packages: dependencies: mimic-fn: 4.0.0 - /open/8.4.1: - resolution: {integrity: sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg==} - engines: {node: '>=12'} - dependencies: - define-lazy-prop: 2.0.0 - is-docker: 2.2.1 - is-wsl: 2.2.0 - /open/8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} @@ -6785,7 +6563,6 @@ packages: define-lazy-prop: 2.0.0 is-docker: 2.2.1 is-wsl: 2.2.0 - dev: true /opener/1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} @@ -7617,7 +7394,7 @@ packages: rollup: optional: true dependencies: - open: 8.4.1 + open: 8.4.2 picomatch: 2.3.1 rollup: 3.18.0 source-map: 0.7.4 @@ -8109,7 +7886,7 @@ packages: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 4.0.3 + minipass: 4.2.4 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 @@ -8367,7 +8144,7 @@ packages: chalk: 5.2.0 consola: 2.15.3 defu: 6.1.2 - esbuild: 0.17.10 + esbuild: 0.17.11 globby: 13.1.3 hookable: 5.4.2 jiti: 1.17.1 @@ -8423,12 +8200,12 @@ packages: node-fetch-native: 1.0.2 pathe: 1.1.0 - /unhead/1.1.15: - resolution: {integrity: sha512-rpOTD35CDz9KFvBKt42KRKZRsYIDY7Sjh5XhBL2SH6XUHdRdqTDIVjHtrxIwRQkfnMdUAZUSy6KYaiAMQFUOiw==} + /unhead/1.1.16: + resolution: {integrity: sha512-m2cPqEkgwHnA/di9P17TRS21p4aAJw4QolwTyXM+gzrlnFPe8gqOYuwEVnLRMS/NgoNWH7iPDOGyf5bbbrnTaw==} dependencies: - '@unhead/dom': 1.1.15 - '@unhead/schema': 1.1.15 - '@unhead/shared': 1.1.15 + '@unhead/dom': 1.1.16 + '@unhead/schema': 1.1.16 + '@unhead/shared': 1.1.16 hookable: 5.4.2 dev: false