From 2748e54aecf498942f00c73540152f3c636a4c93 Mon Sep 17 00:00:00 2001 From: StepSecurity Bot Date: Tue, 25 Jul 2023 07:47:29 -0700 Subject: [PATCH 01/57] ci: harden GitHub actions (#22321) --- .github/workflows/ecosystem-ci-trigger.yml | 8 ++++---- .github/workflows/semantic-pull-requests.yml | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ecosystem-ci-trigger.yml b/.github/workflows/ecosystem-ci-trigger.yml index c23050ad09..559feb0b81 100644 --- a/.github/workflows/ecosystem-ci-trigger.yml +++ b/.github/workflows/ecosystem-ci-trigger.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'nuxt/nuxt' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run') steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | const user = context.payload.sender.login @@ -48,7 +48,7 @@ jobs: }) throw new Error('not allowed') } - - uses: actions/github-script@v6 + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 id: get-pr-data with: script: | @@ -64,12 +64,12 @@ jobs: repo: pr.head.repo.full_name } - id: generate-token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 with: app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }} private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }} repository: "${{ github.repository_owner }}/ecosystem-ci" - - uses: actions/github-script@v6 + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 id: trigger env: COMMENT: ${{ github.event.comment.body }} diff --git a/.github/workflows/semantic-pull-requests.yml b/.github/workflows/semantic-pull-requests.yml index 571f2bff8b..2ef53df62a 100644 --- a/.github/workflows/semantic-pull-requests.yml +++ b/.github/workflows/semantic-pull-requests.yml @@ -7,14 +7,20 @@ on: - edited - synchronize +permissions: + contents: read + jobs: main: + permissions: + pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs + statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR if: github.repository == 'nuxt/nuxt' runs-on: ubuntu-latest name: Semantic pull request steps: - name: Validate PR title - uses: amannn/action-semantic-pull-request@v5 + uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 # v5.2.0 with: scopes: | kit From 6f365313c4bbff945d7acf7055b6a89bfb382520 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 25 Jul 2023 17:08:38 +0100 Subject: [PATCH 02/57] ci: pin actionlint script (#22324) --- .github/workflows/introspect.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/introspect.yml b/.github/workflows/introspect.yml index 04a897e7b0..b6d9125e64 100644 --- a/.github/workflows/introspect.yml +++ b/.github/workflows/introspect.yml @@ -25,5 +25,5 @@ jobs: # From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions - name: Check workflow files run: | - bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/590d3bd9dde0c91f7a66071d40eb84716526e5a6/scripts/download-actionlint.bash) ./actionlint -color -shellcheck="" From 03fbd30d1ca463729cb956a9557e3cf4134a6338 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 25 Jul 2023 17:09:41 +0100 Subject: [PATCH 03/57] fix(nuxt): allow `validate` return typing to be either error or boolean (#22323) --- packages/nuxt/src/pages/runtime/composables.ts | 2 +- test/fixtures/basic-types/types.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/runtime/composables.ts b/packages/nuxt/src/pages/runtime/composables.ts index 78ff8e1454..3fde4c6ccb 100644 --- a/packages/nuxt/src/pages/runtime/composables.ts +++ b/packages/nuxt/src/pages/runtime/composables.ts @@ -14,7 +14,7 @@ export interface PageMeta { * statusCode/statusMessage to respond immediately with an error (other matches * will not be checked). */ - validate?: (route: RouteLocationNormalized) => boolean | Promise | Partial | Promise> + validate?: (route: RouteLocationNormalized) => boolean | Partial | Promise> /** * Where to redirect if the route is directly matched. The redirection happens * before any navigation guard and triggers a new navigation with the new diff --git a/test/fixtures/basic-types/types.ts b/test/fixtures/basic-types/types.ts index 74d9868a90..c0b3f28d55 100644 --- a/test/fixtures/basic-types/types.ts +++ b/test/fixtures/basic-types/types.ts @@ -116,6 +116,21 @@ describe('middleware', () => { abortNavigation(true) }, { global: true }) }) + it('handles return types of validate', () => { + definePageMeta({ + validate: async () => { + await new Promise(resolve => setTimeout(resolve, 1000)) + // eslint-disable-next-line + if (0) { + return createError({ + statusCode: 404, + statusMessage: 'resource-type-not-found' + }) + } + return true + } + }) + }) }) describe('typed router integration', () => { From e7139b5104f5e4324bb09fbf2f22f8a5a0c8d3bb Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 25 Jul 2023 17:16:27 +0100 Subject: [PATCH 04/57] chore: dedupe and bump semver (#22322) --- pnpm-lock.yaml | 445 ++++++++++++++++++++++++------------------------- 1 file changed, 222 insertions(+), 223 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index caca58f09c..dae2864423 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -199,7 +199,7 @@ importers: version: 2.3.1 unimport: specifier: ^3.1.0 - version: 3.1.0(rollup@3.26.0) + version: 3.1.0(rollup@3.26.3) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -471,13 +471,13 @@ importers: version: 1.5.2 unimport: specifier: ^3.1.0 - version: 3.1.0(rollup@3.26.0) + version: 3.1.0(rollup@3.26.3) unplugin: specifier: ^1.4.0 version: 1.4.0 unplugin-vue-router: specifier: ^0.6.4 - version: 0.6.4(rollup@3.26.0)(vue-router@4.2.4)(vue@3.3.4) + version: 0.6.4(rollup@3.26.3)(vue-router@4.2.4)(vue@3.3.4) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -544,7 +544,7 @@ importers: version: 1.1.2 unimport: specifier: ^3.1.0 - version: 3.1.0(rollup@3.26.0) + version: 3.1.0(rollup@3.26.3) untyped: specifier: ^1.3.2 version: 1.3.2 @@ -666,7 +666,7 @@ importers: version: link:../kit '@rollup/plugin-replace': specifier: ^5.0.2 - version: 5.0.2(rollup@3.26.0) + version: 5.0.2(rollup@3.26.3) '@vitejs/plugin-vue': specifier: ^4.2.3 version: 4.2.3(vite@4.4.7)(vue@3.3.4) @@ -741,7 +741,7 @@ importers: version: 10.1.3(postcss@8.4.27) rollup-plugin-visualizer: specifier: ^5.9.2 - version: 5.9.2(rollup@3.26.0) + version: 5.9.2(rollup@3.26.3) std-env: specifier: ^3.3.3 version: 3.3.3 @@ -841,7 +841,7 @@ importers: version: 0.30.1 memfs: specifier: ^4.2.0 - version: 4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.1) mini-css-extract-plugin: specifier: ^2.7.6 version: 2.7.6(webpack@5.88.2) @@ -1046,34 +1046,34 @@ packages: dependencies: '@babel/highlight': 7.22.5 - /@babel/compat-data@7.22.5: - resolution: {integrity: sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==} + /@babel/compat-data@7.22.9: + resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} - /@babel/core@7.22.5: - resolution: {integrity: sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==} + /@babel/core@7.22.9: + resolution: {integrity: sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-module-transforms': 7.22.5 - '@babel/helpers': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/generator': 7.22.9 + '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.22.9) + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.9) + '@babel/helpers': 7.22.6 + '@babel/parser': 7.22.7 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.22.8 '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color - /@babel/generator@7.22.5: - resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} + /@babel/generator@7.22.9: + resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -1087,26 +1087,26 @@ packages: dependencies: '@babel/types': 7.22.5 - /@babel/helper-compilation-targets@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==} + /@babel/helper-compilation-targets@7.22.9(@babel/core@7.22.9): + resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.22.5 + '@babel/compat-data': 7.22.9 + '@babel/core': 7.22.9 '@babel/helper-validator-option': 7.22.5 browserslist: 4.21.9 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 - /@babel/helper-create-class-features-plugin@7.21.0(@babel/core@7.22.5): + /@babel/helper-create-class-features-plugin@7.21.0(@babel/core@7.22.9): resolution: {integrity: sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 @@ -1114,7 +1114,7 @@ packages: '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-replace-supers': 7.20.7 '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 - '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 transitivePeerDependencies: - supports-color @@ -1147,20 +1147,18 @@ packages: dependencies: '@babel/types': 7.22.5 - /@babel/helper-module-transforms@7.22.5: - resolution: {integrity: sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==} + /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.9): + resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 dependencies: + '@babel/core': 7.22.9 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.5 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} @@ -1180,7 +1178,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.21.0 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.22.8 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -1197,8 +1195,8 @@ packages: dependencies: '@babel/types': 7.22.5 - /@babel/helper-split-export-declaration@7.22.5: - resolution: {integrity: sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==} + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -1215,12 +1213,12 @@ packages: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} - /@babel/helpers@7.22.5: - resolution: {integrity: sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==} + /@babel/helpers@7.22.6: + resolution: {integrity: sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.22.8 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -1234,155 +1232,155 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.22.5: - resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} + /@babel/parser@7.22.7: + resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.22.5 - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.5): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.9): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.5): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.9): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.5): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.9): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-jsx@7.18.6(@babel/core@7.22.5): + /@babel/plugin-syntax-jsx@7.18.6(@babel/core@7.22.9): resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.5): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.9): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.5): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.9): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.5): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.9): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.5): + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.9): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.5): + /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.9): resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@babel/helper-plugin-utils': 7.20.2 - /@babel/plugin-transform-typescript@7.21.0(@babel/core@7.22.5): + /@babel/plugin-transform-typescript@7.21.0(@babel/core@7.22.9): resolution: {integrity: sha512-xo///XTPp3mDzTtrqXoBlK9eiAYW3wv9JXglcn/u1bi60RW11dEUxIgA8cbnDhutS1zacjMRmAwxE0gMklLnZg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.0(@babel/core@7.22.5) + '@babel/core': 7.22.9 + '@babel/helper-create-class-features-plugin': 7.21.0(@babel/core@7.22.9) '@babel/helper-plugin-utils': 7.20.2 - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.5) + '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.9) transitivePeerDependencies: - supports-color - /@babel/standalone@7.22.5: - resolution: {integrity: sha512-6Lwhzral4YDEbIM3dBC8/w0BMDvOosGBGaJWSORLkerx8byawkmwwzXKUB0jGlI1Zp90+cK2uyTl62UPtLbUjQ==} + /@babel/standalone@7.22.9: + resolution: {integrity: sha512-RRUFpN2WiHaczMqIhmy7VoruvSw+c3NSq6BczondQ6elJXtKzr9cAWWsWWZvtZ/rYFQpoQlch5VxQe4aWTt8LA==} engines: {node: '>=6.9.0'} /@babel/template@7.22.5: @@ -1390,20 +1388,20 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 - /@babel/traverse@7.22.5: - resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} + /@babel/traverse@7.22.8: + resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 + '@babel/generator': 7.22.9 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 debug: 4.3.4 globals: 11.12.0 @@ -1931,7 +1929,7 @@ packages: resolution: {integrity: sha512-URnTneIU3ZjRSaf906cvf6Hpox3hIeJXRnz3VDSw5/X93gR8ycdfSIEy19FlVx8NFmpN7fe3Gb1xF+NjXaQLWg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.9 '@jest/types': 29.6.1 '@jridgewell/trace-mapping': 0.3.18 babel-plugin-istanbul: 6.1.1 @@ -2244,17 +2242,17 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dependencies: cross-spawn: 7.0.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 is-glob: 4.0.3 open: 9.1.0 picocolors: 1.0.0 - tslib: 2.6.0 + tslib: 2.6.1 dev: true /@polka/url@1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} - /@rollup/plugin-alias@5.0.0(rollup@3.26.0): + /@rollup/plugin-alias@5.0.0(rollup@3.26.3): resolution: {integrity: sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2263,10 +2261,10 @@ packages: rollup: optional: true dependencies: - rollup: 3.26.0 + rollup: 3.26.3 slash: 4.0.0 - /@rollup/plugin-commonjs@24.1.0(rollup@3.26.0): + /@rollup/plugin-commonjs@24.1.0(rollup@3.26.3): resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2275,16 +2273,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.1 - rollup: 3.26.0 + rollup: 3.26.3 dev: true - /@rollup/plugin-commonjs@25.0.2(rollup@3.26.0): + /@rollup/plugin-commonjs@25.0.2(rollup@3.26.3): resolution: {integrity: sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2293,15 +2291,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.1 - rollup: 3.26.0 + rollup: 3.26.3 - /@rollup/plugin-inject@5.0.3(rollup@3.26.0): + /@rollup/plugin-inject@5.0.3(rollup@3.26.3): resolution: {integrity: sha512-411QlbL+z2yXpRWFXSmw/teQRMkXcAAC8aYTemc15gwJRpvEVDQwoe+N/HTFD8RFG8+88Bme9DK2V9CVm7hJdA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2310,12 +2308,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) estree-walker: 2.0.2 magic-string: 0.30.1 - rollup: 3.26.0 + rollup: 3.26.3 - /@rollup/plugin-json@6.0.0(rollup@3.26.0): + /@rollup/plugin-json@6.0.0(rollup@3.26.3): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2324,10 +2322,10 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) - rollup: 3.26.0 + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) + rollup: 3.26.3 - /@rollup/plugin-node-resolve@15.1.0(rollup@3.26.0): + /@rollup/plugin-node-resolve@15.1.0(rollup@3.26.3): resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2336,15 +2334,15 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.2 - rollup: 3.26.0 + rollup: 3.26.3 - /@rollup/plugin-replace@5.0.2(rollup@3.26.0): + /@rollup/plugin-replace@5.0.2(rollup@3.26.3): resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2353,11 +2351,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) magic-string: 0.30.1 - rollup: 3.26.0 + rollup: 3.26.3 - /@rollup/plugin-terser@0.4.3(rollup@3.26.0): + /@rollup/plugin-terser@0.4.3(rollup@3.26.3): resolution: {integrity: sha512-EF0oejTMtkyhrkwCdg0HJ0IpkcaVg1MMSf2olHb2Jp+1mnLM04OhjpJWGma4HobiDTF0WCyViWuvadyE9ch2XA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2366,12 +2364,12 @@ packages: rollup: optional: true dependencies: - rollup: 3.26.0 + rollup: 3.26.3 serialize-javascript: 6.0.1 smob: 1.1.1 terser: 5.18.1 - /@rollup/plugin-wasm@6.1.3(rollup@3.26.0): + /@rollup/plugin-wasm@6.1.3(rollup@3.26.3): resolution: {integrity: sha512-7ItTTeyauE6lwdDtQWceEHZ9+txbi4RRy0mYPFn9BW7rD7YdgBDu7HTHsLtHrRzJc313RM/1m6GKgV3np/aEaw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2380,7 +2378,7 @@ packages: rollup: optional: true dependencies: - rollup: 3.26.0 + rollup: 3.26.3 /@rollup/pluginutils@4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} @@ -2389,7 +2387,7 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 - /@rollup/pluginutils@5.0.2(rollup@3.26.0): + /@rollup/pluginutils@5.0.2(rollup@3.26.3): resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2401,7 +2399,7 @@ packages: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.26.0 + rollup: 3.26.3 /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -2854,9 +2852,9 @@ packages: vite: ^4.0.0 vue: ^3.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-transform-typescript': 7.21.0(@babel/core@7.22.5) - '@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.22.5) + '@babel/core': 7.22.9 + '@babel/plugin-transform-typescript': 7.21.0(@babel/core@7.22.9) + '@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.22.9) vite: 4.4.7(@types/node@18.17.0) vue: 3.3.4 transitivePeerDependencies: @@ -2908,7 +2906,7 @@ packages: vitest: '>=0.30.1 <1' dependencies: '@vitest/utils': 0.33.0 - fast-glob: 3.3.0 + fast-glob: 3.3.1 fflate: 0.8.0 flatted: 3.2.7 pathe: 1.1.1 @@ -2940,7 +2938,7 @@ packages: dependencies: '@volar/language-core': 1.9.0 - /@vue-macros/common@1.3.1(rollup@3.26.0)(vue@3.3.4): + /@vue-macros/common@1.3.1(rollup@3.26.3)(vue@3.3.4): resolution: {integrity: sha512-Lc5aP/8HNJD1XrnvpeNuWcCf82bZdR3auN/chA1b/1rKZgSnmQkH9f33tKO9qLwXSy+u4hpCi8Rw+oUuF1KCeg==} engines: {node: '>=14.19.0'} peerDependencies: @@ -2950,7 +2948,7 @@ packages: optional: true dependencies: '@babel/types': 7.22.5 - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) '@vue/compiler-sfc': 3.3.4 local-pkg: 0.4.3 magic-string-ast: 0.1.2 @@ -2962,13 +2960,13 @@ packages: /@vue/babel-helper-vue-transform-on@1.0.2: resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==} - /@vue/babel-plugin-jsx@1.1.1(@babel/core@7.22.5): + /@vue/babel-plugin-jsx@1.1.1(@babel/core@7.22.9): resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==} dependencies: '@babel/helper-module-imports': 7.22.5 - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.5) + '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.9) '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.22.8 '@babel/types': 7.22.5 '@vue/babel-helper-vue-transform-on': 1.0.2 camelcase: 6.3.0 @@ -2981,7 +2979,7 @@ packages: /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -2995,7 +2993,7 @@ packages: /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/compiler-core': 3.3.4 '@vue/compiler-dom': 3.3.4 '@vue/compiler-ssr': 3.3.4 @@ -3036,7 +3034,7 @@ packages: /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 @@ -3447,7 +3445,7 @@ packages: resolution: {integrity: sha512-Ro3nmapMxi/remlJdzFH0tiA7A59KDbxVoLlKWaLDrPELiftb9b8w+CCyWRM+sXZH5KHRAgv8feedW6mihvCHA==} engines: {node: '>=14.19.0'} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 dev: false @@ -3491,24 +3489,24 @@ packages: - supports-color dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.5): + /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.9): resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.5) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.5) + '@babel/core': 7.22.9 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.9) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.9) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.9) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.9) dev: true /babel-walk@3.0.0-canary-5: @@ -3920,7 +3918,7 @@ packages: /constantinople@4.0.1: resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 dev: false @@ -4360,7 +4358,7 @@ packages: dependencies: commander: 2.20.3 lru-cache: 4.1.5 - semver: 5.7.1 + semver: 5.7.2 sigmund: 1.0.1 dev: true @@ -4718,7 +4716,7 @@ packages: minimatch: 3.1.2 object.values: 1.1.6 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -4779,7 +4777,7 @@ packages: ignore: 5.2.4 minimatch: 3.1.2 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 dev: true /eslint-plugin-promise@6.1.1(eslint@8.45.0): @@ -5035,8 +5033,8 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: false - /fast-glob@3.3.0: - resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -5416,7 +5414,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -5427,7 +5425,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 @@ -5907,11 +5905,11 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/core': 7.22.9 + '@babel/parser': 7.22.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -6002,16 +6000,16 @@ packages: resolution: {integrity: sha512-G4UQE1QQ6OaCgfY+A0uR1W2AY0tGXUPQpoUClhWHq1Xdnx1H6JOrC2nH5lqnOEqaDgbHFgIwZ7bNq24HpB180A==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.5) + '@babel/core': 7.22.9 + '@babel/generator': 7.22.9 + '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.9) + '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.9) '@babel/types': 7.22.5 '@jest/expect-utils': 29.6.1 '@jest/transform': 29.6.1 '@jest/types': 29.6.1 '@types/prettier': 2.7.2 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.9) chalk: 4.1.2 expect: 29.6.1 graceful-fs: 4.2.11 @@ -6102,7 +6100,7 @@ packages: engines: {node: '>=4'} hasBin: true - /json-joy@9.3.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0): + /json-joy@9.3.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.1): resolution: {integrity: sha512-ZQiyMcbcfqki5Bsk0kWfne/Ixl4Q6cLBzCd3VE/TSp7jhns/WDBrIMTuyzDfwmLxuFtQdojiLSLX8MxTyK23QA==} engines: {node: '>=10.0'} hasBin: true @@ -6115,7 +6113,7 @@ packages: hyperdyperid: 1.2.0 quill-delta: 5.1.0 rxjs: 7.8.1 - tslib: 2.6.0 + tslib: 2.6.1 dev: false /json-parse-even-better-errors@2.3.1: @@ -6351,7 +6349,7 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} @@ -6411,15 +6409,15 @@ packages: dependencies: fs-monkey: 1.0.4 - /memfs@4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0): + /memfs@4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.1): resolution: {integrity: sha512-V5/xE+zl6+soWxlBjiVTQSkfXybTwhEBj2I8sK9LaS5lcZsTuhRftakrcRpDY7Ycac2NTK/VzEtpKMp+gpymrQ==} engines: {node: '>= 4.0.0'} peerDependencies: tslib: '2' dependencies: - json-joy: 9.3.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) - thingies: 1.11.1(tslib@2.6.0) - tslib: 2.6.0 + json-joy: 9.3.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.1) + thingies: 1.11.1(tslib@2.6.1) + tslib: 2.6.1 transitivePeerDependencies: - quill-delta - rxjs @@ -6549,20 +6547,21 @@ packages: engines: {node: '>=10'} hasBin: true - /mkdist@1.2.0(typescript@5.0.4): - resolution: {integrity: sha512-UTqu/bXmIk/+VKNVgufAeMyjUcNy1dn9Bl7wL1zZlCKVrpDgj/VllmZBeh3ZCC/2HWqUrt6frNFTKt9TRZbNvQ==} + /mkdist@1.3.0(typescript@5.0.4): + resolution: {integrity: sha512-ZQrUvcL7LkRdzMREpDyg9AT18N9Tl5jc2qeKAUeEw0KGsgykbHbuRvysGAzTuGtwuSg0WQyNit5jh/k+Er3JEg==} hasBin: true peerDependencies: - sass: ^1.60.0 - typescript: '>=4.9.5' + sass: ^1.63.6 + typescript: '>=5.1.6' peerDependenciesMeta: sass: optional: true typescript: optional: true dependencies: + citty: 0.1.2 defu: 6.1.2 - esbuild: 0.17.19 + esbuild: 0.18.16 fs-extra: 11.1.1 globby: 13.2.2 jiti: 1.19.1 @@ -6627,15 +6626,15 @@ packages: dependencies: '@cloudflare/kv-asset-handler': 0.3.0 '@netlify/functions': 1.6.0 - '@rollup/plugin-alias': 5.0.0(rollup@3.26.0) - '@rollup/plugin-commonjs': 25.0.2(rollup@3.26.0) - '@rollup/plugin-inject': 5.0.3(rollup@3.26.0) - '@rollup/plugin-json': 6.0.0(rollup@3.26.0) - '@rollup/plugin-node-resolve': 15.1.0(rollup@3.26.0) - '@rollup/plugin-replace': 5.0.2(rollup@3.26.0) - '@rollup/plugin-terser': 0.4.3(rollup@3.26.0) - '@rollup/plugin-wasm': 6.1.3(rollup@3.26.0) - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/plugin-alias': 5.0.0(rollup@3.26.3) + '@rollup/plugin-commonjs': 25.0.2(rollup@3.26.3) + '@rollup/plugin-inject': 5.0.3(rollup@3.26.3) + '@rollup/plugin-json': 6.0.0(rollup@3.26.3) + '@rollup/plugin-node-resolve': 15.1.0(rollup@3.26.3) + '@rollup/plugin-replace': 5.0.2(rollup@3.26.3) + '@rollup/plugin-terser': 0.4.3(rollup@3.26.3) + '@rollup/plugin-wasm': 6.1.3(rollup@3.26.3) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) '@types/http-proxy': 1.17.11 '@vercel/nft': 0.22.6 archiver: 5.3.1 @@ -6674,10 +6673,10 @@ packages: pathe: 1.1.1 perfect-debounce: 1.0.0 pkg-types: 1.0.3 - pretty-bytes: 6.1.0 + pretty-bytes: 6.1.1 radix3: 1.0.1 - rollup: 3.26.0 - rollup-plugin-visualizer: 5.9.2(rollup@3.26.0) + rollup: 3.26.3 + rollup-plugin-visualizer: 5.9.2(rollup@3.26.3) scule: 1.0.0 semver: 7.5.4 serve-placeholder: 2.0.1 @@ -6687,7 +6686,7 @@ packages: ufo: 1.1.2 uncrypto: 0.1.3 unenv: 1.5.2 - unimport: 3.1.0(rollup@3.26.0) + unimport: 3.1.0(rollup@3.26.3) unstorage: 1.7.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -6772,7 +6771,7 @@ packages: dependencies: hosted-git-info: 2.8.9 resolve: 1.22.2 - semver: 5.7.1 + semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: true @@ -6933,7 +6932,7 @@ packages: hasBin: true dependencies: ansi-colors: 4.1.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 js-yaml: 4.1.0 supports-color: 9.4.0 undici: 5.22.1 @@ -7514,8 +7513,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - /pretty-bytes@6.1.0: - resolution: {integrity: sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==} + /pretty-bytes@6.1.1: + resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} /pretty-format@29.6.1: @@ -7832,7 +7831,7 @@ packages: glob: 10.2.6 dev: true - /rollup-plugin-dts@5.3.0(rollup@3.26.0)(typescript@5.0.4): + /rollup-plugin-dts@5.3.0(rollup@3.26.3)(typescript@5.0.4): resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} engines: {node: '>=v14'} peerDependencies: @@ -7840,13 +7839,13 @@ packages: typescript: ^4.1 || ^5.0 dependencies: magic-string: 0.30.1 - rollup: 3.26.0 + rollup: 3.26.3 typescript: 5.0.4 optionalDependencies: '@babel/code-frame': 7.22.5 dev: true - /rollup-plugin-visualizer@5.9.2(rollup@3.26.0): + /rollup-plugin-visualizer@5.9.2(rollup@3.26.3): resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} hasBin: true @@ -7858,12 +7857,12 @@ packages: dependencies: open: 8.4.2 picomatch: 2.3.1 - rollup: 3.26.0 + rollup: 3.26.3 source-map: 0.7.4 yargs: 17.7.1 - /rollup@3.26.0: - resolution: {integrity: sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==} + /rollup@3.26.3: + resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -7894,7 +7893,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.1 dev: false /safe-buffer@5.1.2: @@ -7951,13 +7950,13 @@ packages: /scule@1.0.0: resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: true - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true /semver@7.5.4: @@ -8310,7 +8309,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.4.0 - tslib: 2.6.0 + tslib: 2.6.1 dev: true /tapable@1.1.3: @@ -8388,13 +8387,13 @@ packages: /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - /thingies@1.11.1(tslib@2.6.0): + /thingies@1.11.1(tslib@2.6.1): resolution: {integrity: sha512-SXWTuQA6TFjpfV4xiwPs4FkHashZShR/Hugosrm9sRMm63fAdgZaWKixt5YvuP6VwDaAROcDwf9cFeuw1DeekA==} engines: {node: '>=10.18'} peerDependencies: tslib: ^2 dependencies: - tslib: 2.6.0 + tslib: 2.6.1 dev: false /time-fix-plugin@2.0.7(webpack@5.88.2): @@ -8476,8 +8475,8 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.6.0: - resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.1: + resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} /tsutils@3.21.0(typescript@5.0.4): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} @@ -8565,12 +8564,12 @@ packages: resolution: {integrity: sha512-J4efk69Aye43tWcBPCsLK7TIRppGrEN4pAlDzRKo3HSE6MgTSTBxSEuE3ccx7ixc62JvGQ/CoFXYqqF2AHozow==} hasBin: true dependencies: - '@rollup/plugin-alias': 5.0.0(rollup@3.26.0) - '@rollup/plugin-commonjs': 24.1.0(rollup@3.26.0) - '@rollup/plugin-json': 6.0.0(rollup@3.26.0) - '@rollup/plugin-node-resolve': 15.1.0(rollup@3.26.0) - '@rollup/plugin-replace': 5.0.2(rollup@3.26.0) - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/plugin-alias': 5.0.0(rollup@3.26.3) + '@rollup/plugin-commonjs': 24.1.0(rollup@3.26.3) + '@rollup/plugin-json': 6.0.0(rollup@3.26.3) + '@rollup/plugin-node-resolve': 15.1.0(rollup@3.26.3) + '@rollup/plugin-replace': 5.0.2(rollup@3.26.3) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) chalk: 5.3.0 consola: 3.2.3 defu: 6.1.2 @@ -8579,14 +8578,14 @@ packages: hookable: 5.5.3 jiti: 1.19.1 magic-string: 0.30.1 - mkdist: 1.2.0(typescript@5.0.4) + mkdist: 1.3.0(typescript@5.0.4) mlly: 1.4.0 mri: 1.2.0 pathe: 1.1.1 pkg-types: 1.0.3 - pretty-bytes: 6.1.0 - rollup: 3.26.0 - rollup-plugin-dts: 5.3.0(rollup@3.26.0)(typescript@5.0.4) + pretty-bytes: 6.1.1 + rollup: 3.26.3 + rollup-plugin-dts: 5.3.0(rollup@3.26.3)(typescript@5.0.4) scule: 1.0.0 typescript: 5.0.4 untyped: 1.3.2 @@ -8630,12 +8629,12 @@ packages: hookable: 5.5.3 dev: false - /unimport@3.1.0(rollup@3.26.0): + /unimport@3.1.0(rollup@3.26.3): resolution: {integrity: sha512-ybK3NVWh30MdiqSyqakrrQOeiXyu5507tDA0tUf7VJHrsq4DM6S43gR7oAsZaFojM32hzX982Lqw02D3yf2aiA==} dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) escape-string-regexp: 5.0.0 - fast-glob: 3.3.0 + fast-glob: 3.3.1 local-pkg: 0.4.3 magic-string: 0.30.1 mlly: 1.4.0 @@ -8651,7 +8650,7 @@ packages: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} - /unplugin-vue-router@0.6.4(rollup@3.26.0)(vue-router@4.2.4)(vue@3.3.4): + /unplugin-vue-router@0.6.4(rollup@3.26.3)(vue-router@4.2.4)(vue@3.3.4): resolution: {integrity: sha512-9THVhhtbVFxbsIibjK59oPwMI1UCxRWRPX7azSkTUABsxovlOXJys5SJx0kd/0oKIqNJuYgkRfAgPuO77SqCOg==} peerDependencies: vue-router: ^4.1.0 @@ -8660,11 +8659,11 @@ packages: optional: true dependencies: '@babel/types': 7.22.5 - '@rollup/pluginutils': 5.0.2(rollup@3.26.0) - '@vue-macros/common': 1.3.1(rollup@3.26.0)(vue@3.3.4) + '@rollup/pluginutils': 5.0.2(rollup@3.26.3) + '@vue-macros/common': 1.3.1(rollup@3.26.3)(vue@3.3.4) ast-walker-scope: 0.4.1 chokidar: 3.5.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 json5: 2.2.3 local-pkg: 0.4.3 mlly: 1.4.0 @@ -8741,8 +8740,8 @@ packages: resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==} hasBin: true dependencies: - '@babel/core': 7.22.5 - '@babel/standalone': 7.22.5 + '@babel/core': 7.22.9 + '@babel/standalone': 7.22.9 '@babel/types': 7.22.5 defu: 6.1.2 jiti: 1.19.1 @@ -8856,7 +8855,7 @@ packages: chokidar: 3.5.3 commander: 8.3.0 eslint: 8.45.0 - fast-glob: 3.3.0 + fast-glob: 3.3.1 fs-extra: 11.1.1 lodash.debounce: 4.0.8 lodash.pick: 4.4.0 @@ -8904,7 +8903,7 @@ packages: '@types/node': 18.17.0 esbuild: 0.18.16 postcss: 8.4.27 - rollup: 3.26.0 + rollup: 3.26.3 optionalDependencies: fsevents: 2.3.2 @@ -9337,7 +9336,7 @@ packages: resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@babel/types': 7.22.5 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 From 694f13b18f56555e5e7b6c4f21f38d3f67761111 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 26 Jul 2023 00:04:16 +0300 Subject: [PATCH 05/57] fix(kit): handle tuple-format modules in `hasNuxtModule` (#22316) --- packages/kit/src/module/compatibility.test.ts | 13 ++++++++++++- packages/kit/src/module/compatibility.ts | 18 +++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/packages/kit/src/module/compatibility.test.ts b/packages/kit/src/module/compatibility.test.ts index 6f73c07420..ce20f54f02 100644 --- a/packages/kit/src/module/compatibility.test.ts +++ b/packages/kit/src/module/compatibility.test.ts @@ -12,11 +12,22 @@ describe('nuxt module compatibility', () => { meta: { name: 'nuxt-module-foo' } - }) + }), + [ + defineNuxtModule({ + meta: { + name: 'module-instance-with-options' + } + }), + { + foo: 'bar' + } + ] ] } }) expect(hasNuxtModule('nuxt-module-foo', nuxt)).toStrictEqual(true) + expect(hasNuxtModule('module-instance-with-options', nuxt)).toStrictEqual(true) await nuxt.close() }) it('can retrieve module version from module instance', async () => { diff --git a/packages/kit/src/module/compatibility.ts b/packages/kit/src/module/compatibility.ts index 860ed1fb76..666f4b4085 100644 --- a/packages/kit/src/module/compatibility.ts +++ b/packages/kit/src/module/compatibility.ts @@ -1,9 +1,19 @@ import satisfies from 'semver/functions/satisfies.js' // npm/node-semver#381 -import type { Nuxt, NuxtModule } from '@nuxt/schema' +import type { Nuxt, NuxtModule, NuxtOptions } from '@nuxt/schema' import { useNuxt } from '../context' import { normalizeSemanticVersion } from '../compatibility' import { loadNuxtModuleInstance } from './install' +function resolveNuxtModuleEntryName (m: NuxtOptions['modules'][number]): string | false { + if (typeof m === 'object' && !Array.isArray(m)) { + return (m as any as NuxtModule).name + } + if (Array.isArray(m)) { + return resolveNuxtModuleEntryName(m[0]) + } + return m as string || false +} + /** * Check if a Nuxt module is installed by name. * @@ -11,8 +21,10 @@ import { loadNuxtModuleInstance } from './install' * that it cannot detect if a module is _going to be_ installed programmatically by another module. */ export function hasNuxtModule (moduleName: string, nuxt: Nuxt = useNuxt()) : boolean { + // check installed modules return nuxt.options._installedModules.some(({ meta }) => meta.name === moduleName) || - nuxt.options.modules.includes(moduleName) + // check modules to be installed + nuxt.options.modules.some(m => moduleName === resolveNuxtModuleEntryName(m)) } /** @@ -46,7 +58,7 @@ export async function getNuxtModuleVersion (module: string | NuxtModule, nuxt: N return version } // it's possible that the module will be installed, it just hasn't been done yet, preemptively load the instance - if (nuxt.options.modules.includes(moduleMeta.name)) { + if (hasNuxtModule(moduleMeta.name)) { const { buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt) return buildTimeModuleMeta.version || false } From e3437c67d684cbb8cd261887933cfc088f1c9c04 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 26 Jul 2023 06:30:44 +0200 Subject: [PATCH 06/57] fix(nuxt): components auto-import for JSX (#22330) --- packages/nuxt/src/components/loader.ts | 2 +- packages/nuxt/src/components/module.ts | 8 ++++---- test/basic.test.ts | 1 + test/fixtures/basic/components/Tsx.tsx | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/nuxt/src/components/loader.ts b/packages/nuxt/src/components/loader.ts index 7063174faf..7017440611 100644 --- a/packages/nuxt/src/components/loader.ts +++ b/packages/nuxt/src/components/loader.ts @@ -31,7 +31,7 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => { if (include.some(pattern => pattern.test(id))) { return true } - return isVue(id, { type: ['template', 'script'] }) + return isVue(id, { type: ['template', 'script'] }) || !!id.match(/\.[tj]sx$/) }, transform (code) { const components = options.getComponents() diff --git a/packages/nuxt/src/components/module.ts b/packages/nuxt/src/components/module.ts index c086d6ee29..85e599f8f9 100644 --- a/packages/nuxt/src/components/module.ts +++ b/packages/nuxt/src/components/module.ts @@ -129,11 +129,11 @@ export default defineNuxtModule({ const unpluginServer = createTransformPlugin(nuxt, getComponents, 'server') const unpluginClient = createTransformPlugin(nuxt, getComponents, 'client') - addVitePlugin(unpluginServer.vite(), { server: true, client: false }) - addVitePlugin(unpluginClient.vite(), { server: false, client: true }) + addVitePlugin(() => unpluginServer.vite(), { server: true, client: false }) + addVitePlugin(() => unpluginClient.vite(), { server: false, client: true }) - addWebpackPlugin(unpluginServer.webpack(), { server: true, client: false }) - addWebpackPlugin(unpluginClient.webpack(), { server: false, client: true }) + addWebpackPlugin(() => unpluginServer.webpack(), { server: true, client: false }) + addWebpackPlugin(() => unpluginClient.webpack(), { server: false, client: true }) // Do not prefetch global components chunks nuxt.hook('build:manifest', (manifest) => { diff --git a/test/basic.test.ts b/test/basic.test.ts index 9c1d553664..03d3df8d30 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -105,6 +105,7 @@ describe('pages', () => { // should import JSX/TSX components with custom elements expect(html).toContain('TSX component') expect(html).toContain('custom') + expect(html).toContain('Sugar Counter 12 x 2 = 24') }) it('respects aliases in page metadata', async () => { diff --git a/test/fixtures/basic/components/Tsx.tsx b/test/fixtures/basic/components/Tsx.tsx index 160972e31c..21d8cc355a 100644 --- a/test/fixtures/basic/components/Tsx.tsx +++ b/test/fixtures/basic/components/Tsx.tsx @@ -3,6 +3,7 @@ export default defineComponent({ return
TSX component custom +
} }) From e2c7edd4797af7c5e137652b6e72c543d70a2d02 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 26 Jul 2023 11:16:01 +0200 Subject: [PATCH 07/57] fix(nuxt): pass (and handle) relative paths in `builder:watch` (#22333) --- packages/nuxt/src/components/module.ts | 18 +++++++++------- packages/nuxt/src/core/builder.ts | 29 +++++++++++++++---------- packages/nuxt/src/core/nuxt.ts | 7 +++--- packages/nuxt/src/imports/module.ts | 16 +++++++------- packages/nuxt/src/pages/module.ts | 30 ++++++++++++++------------ 5 files changed, 56 insertions(+), 44 deletions(-) diff --git a/packages/nuxt/src/components/module.ts b/packages/nuxt/src/components/module.ts index 85e599f8f9..94ecdac476 100644 --- a/packages/nuxt/src/components/module.ts +++ b/packages/nuxt/src/components/module.ts @@ -148,12 +148,14 @@ export default defineNuxtModule({ }) // Restart dev server when component directories are added/removed - nuxt.hook('builder:watch', (event, path) => { - const isDirChange = ['addDir', 'unlinkDir'].includes(event) - const fullPath = resolve(nuxt.options.srcDir, path) + nuxt.hook('builder:watch', (event, relativePath) => { + if (!['addDir', 'unlinkDir'].includes(event)) { + return + } - if (isDirChange && componentDirs.some(dir => dir.path === fullPath)) { - console.info(`Directory \`${path}/\` ${event === 'addDir' ? 'created' : 'removed'}`) + const path = resolve(nuxt.options.srcDir, relativePath) + if (componentDirs.some(dir => dir.path === path)) { + console.info(`Directory \`${relativePath}/\` ${event === 'addDir' ? 'created' : 'removed'}`) return nuxt.callHook('restart') } }) @@ -183,12 +185,12 @@ export default defineNuxtModule({ }) // Watch for changes - nuxt.hook('builder:watch', async (event, path) => { + nuxt.hook('builder:watch', async (event, relativePath) => { if (!['add', 'unlink'].includes(event)) { return } - const fPath = resolve(nuxt.options.srcDir, path) - if (componentDirs.find(dir => fPath.startsWith(dir.path))) { + const path = resolve(nuxt.options.srcDir, relativePath) + if (componentDirs.some(dir => path.startsWith(dir.path + '/'))) { await updateTemplates({ filter: template => [ 'components.plugin.mjs', diff --git a/packages/nuxt/src/core/builder.ts b/packages/nuxt/src/core/builder.ts index c6fd13cda3..2ba343d6e5 100644 --- a/packages/nuxt/src/core/builder.ts +++ b/packages/nuxt/src/core/builder.ts @@ -5,7 +5,7 @@ import chokidar from 'chokidar' import { isIgnored, tryResolveModule, useNuxt } from '@nuxt/kit' import { interopDefault } from 'mlly' import { debounce } from 'perfect-debounce' -import { normalize, resolve } from 'pathe' +import { normalize, relative, resolve } from 'pathe' import type { Nuxt } from 'nuxt/schema' import { generateApp as _generateApp, createApp } from './app' @@ -19,12 +19,16 @@ export async function build (nuxt: Nuxt) { if (nuxt.options.dev) { watch(nuxt) - nuxt.hook('builder:watch', async (event, path) => { - if (event !== 'change' && /^(app\.|error\.|plugins\/|middleware\/|layouts\/)/i.test(path)) { - if (path.startsWith('app')) { + nuxt.hook('builder:watch', async (event, relativePath) => { + if (event === 'change') { return } + const path = resolve(nuxt.options.srcDir, relativePath) + const relativePaths = nuxt.options._layers.map(l => relative(l.config.srcDir || l.cwd, path)) + const restartPath = relativePaths.find(relativePath => /^(app\.|error\.|plugins\/|middleware\/|layouts\/)/i.test(relativePath)) + if (restartPath) { + if (restartPath.startsWith('app')) { app.mainComponent = undefined } - if (path.startsWith('error')) { + if (restartPath.startsWith('error')) { app.errorComponent = undefined } await generateApp() @@ -72,7 +76,6 @@ function createWatcher () { const watcher = chokidar.watch(nuxt.options._layers.map(i => i.config.srcDir as string).filter(Boolean), { ...nuxt.options.watchers.chokidar, - cwd: nuxt.options.srcDir, ignoreInitial: true, ignored: [ isIgnored, @@ -80,7 +83,8 @@ function createWatcher () { ] }) - watcher.on('all', (event, path) => nuxt.callHook('builder:watch', event, normalize(path))) + // TODO: consider moving to emit absolute path in 3.8 or 4.0 + watcher.on('all', (event, path) => nuxt.callHook('builder:watch', event, normalize(relative(nuxt.options.srcDir, path)))) nuxt.hook('close', () => watcher?.close()) } @@ -94,7 +98,7 @@ function createGranularWatcher () { let pending = 0 const ignoredDirs = new Set([...nuxt.options.modulesDir, nuxt.options.buildDir]) - const pathsToWatch = nuxt.options._layers.map(layer => layer.config.srcDir).filter(d => d && !isIgnored(d)) + const pathsToWatch = nuxt.options._layers.map(layer => layer.config.srcDir || layer.cwd).filter(d => d && !isIgnored(d)) for (const pattern of nuxt.options.watch) { if (typeof pattern !== 'string') { continue } const path = resolve(nuxt.options.srcDir, pattern) @@ -109,7 +113,8 @@ function createGranularWatcher () { watcher.on('all', (event, path) => { path = normalize(path) if (!pending) { - nuxt.callHook('builder:watch', event, path) + // TODO: consider moving to emit absolute path in 3.8 or 4.0 + nuxt.callHook('builder:watch', event, relative(nuxt.options.srcDir, path)) } if (event === 'unlinkDir' && path in watchers) { watchers[path]?.close() @@ -117,7 +122,8 @@ function createGranularWatcher () { } if (event === 'addDir' && path !== dir && !ignoredDirs.has(path) && !pathsToWatch.includes(path) && !(path in watchers) && !isIgnored(path)) { watchers[path] = chokidar.watch(path, { ...nuxt.options.watchers.chokidar, ignored: [isIgnored] }) - watchers[path].on('all', (event, path) => nuxt.callHook('builder:watch', event, normalize(path))) + // TODO: consider moving to emit absolute path in 3.8 or 4.0 + watchers[path].on('all', (event, p) => nuxt.callHook('builder:watch', event, normalize(relative(nuxt.options.srcDir, p)))) nuxt.hook('close', () => watchers[path]?.close()) } }) @@ -144,7 +150,8 @@ async function createParcelWatcher () { if (err) { return } for (const event of events) { if (isIgnored(event.path)) { continue } - nuxt.callHook('builder:watch', watchEvents[event.type], normalize(event.path)) + // TODO: consider moving to emit absolute path in 3.8 or 4.0 + nuxt.callHook('builder:watch', watchEvents[event.type], normalize(relative(nuxt.options.srcDir, event.path))) } }, { ignore: [ diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 7073d8099d..9aa9a65dfc 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -1,4 +1,4 @@ -import { join, normalize, relative, resolve } from 'pathe' +import { join, normalize, resolve } from 'pathe' import { createDebugger, createHooks } from 'hookable' import type { LoadNuxtOptions } from '@nuxt/kit' import { addBuildPlugin, addComponent, addPlugin, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtCtx, resolveAlias, resolveFiles, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit' @@ -180,7 +180,7 @@ async function initNuxt (nuxt: Nuxt) { `${config.dir?.modules || 'modules'}/*/index{${nuxt.options.extensions.join(',')}}` ]) for (const mod of layerModules) { - watchedPaths.add(relative(config.srcDir, mod)) + watchedPaths.add(mod) if (specifiedModules.has(mod)) { continue } specifiedModules.add(mod) modulesToInstall.push(mod) @@ -341,7 +341,8 @@ async function initNuxt (nuxt: Nuxt) { await nuxt.callHook('modules:done') - nuxt.hooks.hook('builder:watch', (event, path) => { + nuxt.hooks.hook('builder:watch', (event, relativePath) => { + const path = resolve(nuxt.options.srcDir, relativePath) // Local module patterns if (watchedPaths.has(path)) { return nuxt.callHook('restart', { hard: true }) diff --git a/packages/nuxt/src/imports/module.ts b/packages/nuxt/src/imports/module.ts index 437671e526..75f47d30b0 100644 --- a/packages/nuxt/src/imports/module.ts +++ b/packages/nuxt/src/imports/module.ts @@ -63,12 +63,12 @@ export default defineNuxtModule>({ composablesDirs = composablesDirs.map(dir => normalize(dir)) // Restart nuxt when composable directories are added/removed - nuxt.hook('builder:watch', (event, path) => { - const isDirChange = ['addDir', 'unlinkDir'].includes(event) - const fullPath = resolve(nuxt.options.srcDir, path) + nuxt.hook('builder:watch', (event, relativePath) => { + if (!['addDir', 'unlinkDir'].includes(event)) { return } - if (isDirChange && composablesDirs.includes(fullPath)) { - console.info(`Directory \`${path}/\` ${event === 'addDir' ? 'created' : 'removed'}`) + const path = resolve(nuxt.options.srcDir, relativePath) + if (composablesDirs.includes(path)) { + console.info(`Directory \`${relativePath}/\` ${event === 'addDir' ? 'created' : 'removed'}`) return nuxt.callHook('restart') } }) @@ -119,9 +119,9 @@ export default defineNuxtModule>({ 'imports.d.ts', 'imports.mjs' ] - nuxt.hook('builder:watch', async (_, path) => { - const _resolved = resolve(nuxt.options.srcDir, path) - if (composablesDirs.find(dir => _resolved.startsWith(dir))) { + nuxt.hook('builder:watch', async (_, relativePath) => { + const path = resolve(nuxt.options.srcDir, relativePath) + if (composablesDirs.some(dir => dir === path || path.startsWith(dir + '/'))) { await updateTemplates({ filter: template => templates.includes(template.filename) }) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index 78455b57c5..6cd94aded2 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -3,7 +3,6 @@ import { mkdir, readFile } from 'node:fs/promises' import { addComponent, addPlugin, addTemplate, addVitePlugin, addWebpackPlugin, defineNuxtModule, findPath, updateTemplates } from '@nuxt/kit' import { dirname, join, relative, resolve } from 'pathe' import { genImport, genObjectFromRawEntries, genString } from 'knitwork' -import escapeRE from 'escape-string-regexp' import { joinURL } from 'ufo' import type { NuxtApp, NuxtPage } from 'nuxt/schema' import { createRoutesContext } from 'unplugin-vue-router' @@ -52,12 +51,13 @@ export default defineNuxtModule({ // Restart Nuxt when pages dir is added or removed const restartPaths = nuxt.options._layers.flatMap(layer => [ - join(layer.config.srcDir, 'app/router.options.ts'), - join(layer.config.srcDir, layer.config.dir?.pages || 'pages') + join(layer.config.srcDir || layer.cwd, 'app/router.options.ts'), + join(layer.config.srcDir || layer.cwd, layer.config.dir?.pages || 'pages') ]) - nuxt.hooks.hook('builder:watch', async (event, path) => { - const fullPath = join(nuxt.options.srcDir, path) - if (restartPaths.some(path => path === fullPath || fullPath.startsWith(path + '/'))) { + + nuxt.hooks.hook('builder:watch', async (event, relativePath) => { + const path = resolve(nuxt.options.srcDir, relativePath) + if (restartPaths.some(p => p === path || path.startsWith(p + '/'))) { const newSetting = await isPagesEnabled() if (nuxt.options.pages !== newSetting) { console.info('Pages', newSetting ? 'enabled' : 'disabled') @@ -174,15 +174,17 @@ export default defineNuxtModule({ }) // Regenerate templates when adding or removing pages - nuxt.hook('builder:watch', async (event, path) => { - const dirs = [ - nuxt.options.dir.pages, - nuxt.options.dir.layouts, - nuxt.options.dir.middleware - ].filter(Boolean) + const updateTemplatePaths = nuxt.options._layers.flatMap(l => [ + join(l.config.srcDir || l.cwd, l.config.dir?.pages || 'pages') + '/', + join(l.config.srcDir || l.cwd, l.config.dir?.layouts || 'layouts') + '/', + join(l.config.srcDir || l.cwd, l.config.dir?.middleware || 'middleware') + '/' + ]) - const pathPattern = new RegExp(`(^|\\/)(${dirs.map(escapeRE).join('|')})/`) - if (event !== 'change' && pathPattern.test(path)) { + nuxt.hook('builder:watch', async (event, relativePath) => { + if (event === 'change') { return } + + const path = resolve(nuxt.options.srcDir, relativePath) + if (updateTemplatePaths.some(dir => path.startsWith(dir))) { await updateTemplates({ filter: template => template.filename === 'routes.mjs' }) From 9741f267be1c04a69f3a25204c175f98d834565b Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 26 Jul 2023 23:07:23 +0200 Subject: [PATCH 08/57] refactor(nuxi,schema): move loading template into schema (#22336) --- packages/nuxi/src/commands/dev.ts | 2 +- packages/nuxt/package.json | 2 +- packages/schema/package.json | 1 + packages/schema/src/config/dev.ts | 8 ++++++++ pnpm-lock.yaml | 11 +++++++---- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 50e10e99ae..9da83dc685 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -46,7 +46,7 @@ export default defineNuxtCommand({ let currentHandler: RequestListener | undefined let loadingMessage = 'Nuxt is starting...' const loadingHandler: RequestListener = async (_req, res) => { - const { loading: loadingTemplate } = await importModule('@nuxt/ui-templates', config.modulesDir) + const loadingTemplate = config.devServer.loadingTemplate ?? await importModule('@nuxt/ui-templates', config.modulesDir).then(r => r.loading) res.setHeader('Content-Type', 'text/html; charset=UTF-8') res.statusCode = 503 // Service Unavailable res.end(loadingTemplate({ loading: loadingMessage })) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 6a14d21b27..18599013bd 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -56,7 +56,7 @@ "@nuxt/kit": "workspace:../kit", "@nuxt/schema": "workspace:../schema", "@nuxt/telemetry": "^2.3.2", - "@nuxt/ui-templates": "^1.2.0", + "@nuxt/ui-templates": "^1.2.1", "@nuxt/vite-builder": "workspace:../vite", "@unhead/ssr": "^1.1.32", "@unhead/vue": "^1.1.32", diff --git a/packages/schema/package.json b/packages/schema/package.json index d2edcf46b3..30edc67a79 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -49,6 +49,7 @@ "webpack-dev-middleware": "6.1.1" }, "dependencies": { + "@nuxt/ui-templates": "^1.2.1", "defu": "^6.1.2", "hookable": "^5.5.3", "pathe": "^1.1.1", diff --git a/packages/schema/src/config/dev.ts b/packages/schema/src/config/dev.ts index e56860fa86..5f46df1949 100644 --- a/packages/schema/src/config/dev.ts +++ b/packages/schema/src/config/dev.ts @@ -1,4 +1,5 @@ import { defineUntypedSchema } from 'untyped' +import { loading as loadingTemplate } from '@nuxt/ui-templates' export default defineUntypedSchema({ devServer: { @@ -36,5 +37,12 @@ export default defineUntypedSchema({ * dev server with the full URL (for module and internal use). */ url: 'http://localhost:3000', + + /** + * Template to show a loading screen + * + * @type {(data: { loading?: string }) => string} + */ + loadingTemplate: loadingTemplate } }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dae2864423..e9836020a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -347,8 +347,8 @@ importers: specifier: ^2.3.2 version: 2.3.2 '@nuxt/ui-templates': - specifier: ^1.2.0 - version: 1.2.0 + specifier: ^1.2.1 + version: 1.2.1 '@nuxt/vite-builder': specifier: workspace:* version: link:../vite @@ -521,6 +521,9 @@ importers: packages/schema: dependencies: + '@nuxt/ui-templates': + specifier: ^1.2.1 + version: 1.2.1 defu: specifier: ^6.1.2 version: 6.1.2 @@ -2075,8 +2078,8 @@ packages: rc9: 2.1.1 std-env: 3.3.3 - /@nuxt/ui-templates@1.2.0: - resolution: {integrity: sha512-MSZza7dxccNb/p7nuzGF8/m4POaFpHzVhNdR7f4xahOpH7Ja02lFeYR+rHtoHIJC0yym4qriqv0mQ+Qf/R61bQ==} + /@nuxt/ui-templates@1.2.1: + resolution: {integrity: sha512-Nt1nTkPsji/X8z/BCqUgb8uADs+kT0FZboVDwyCdMlCgjEQKrAZUlunKXGywa6ssz4/RohGmvuB1cFre6dSKXQ==} dev: false /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.45.0)(typescript@5.0.4): From ae8a2fb52154d97c2ed47a02ab530ee5cd9cad6b Mon Sep 17 00:00:00 2001 From: OhB00 <43827372+OhB00@users.noreply.github.com> Date: Sat, 29 Jul 2023 05:23:08 +0100 Subject: [PATCH 09/57] fix(nuxt): use computed path value for `useFetch` hash (#22378) --- packages/nuxt/src/app/composables/fetch.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index 11ea5aeffb..3ca36e005a 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -69,15 +69,6 @@ export function useFetch< arg2?: string ) { const [opts = {}, autoKey] = typeof arg1 === 'string' ? [{}, arg1] : [arg1, arg2] - const _key = opts.key || hash([autoKey, unref(opts.baseURL), typeof request === 'string' ? request : '', unref(opts.params || opts.query)]) - if (!_key || typeof _key !== 'string') { - throw new TypeError('[nuxt] [useFetch] key must be a string: ' + _key) - } - if (!request) { - throw new Error('[nuxt] [useFetch] request is missing.') - } - - const key = _key === autoKey ? '$f' + _key : _key const _request = computed(() => { let r = request @@ -87,6 +78,16 @@ export function useFetch< return unref(r) }) + const _key = opts.key || hash([autoKey, unref(opts.baseURL), typeof _request.value === 'string' ? _request.value : '', unref(opts.params || opts.query)]) + if (!_key || typeof _key !== 'string') { + throw new TypeError('[nuxt] [useFetch] key must be a string: ' + _key) + } + if (!request) { + throw new Error('[nuxt] [useFetch] request is missing.') + } + + const key = _key === autoKey ? '$f' + _key : _key + if (!opts.baseURL && typeof _request.value === 'string' && _request.value.startsWith('//')) { throw new Error('[nuxt] [useFetch] the request URL must not start with "//".') } From 7e05b6e7853da98ec93ca72acd72af1fe272eafe Mon Sep 17 00:00:00 2001 From: Dawid Kopys Date: Sat, 29 Jul 2023 20:14:08 +0200 Subject: [PATCH 10/57] docs: correct manually typing runtime config example (#22393) --- docs/2.guide/3.going-further/10.runtime-config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/2.guide/3.going-further/10.runtime-config.md b/docs/2.guide/3.going-further/10.runtime-config.md index d9c76dc972..268b5dd945 100644 --- a/docs/2.guide/3.going-further/10.runtime-config.md +++ b/docs/2.guide/3.going-further/10.runtime-config.md @@ -150,9 +150,9 @@ It is also possible to type your runtime config manually: declare module 'nuxt/schema' { interface RuntimeConfig { apiSecret: string - public: { - apiBase: string - } + } + interface PublicRuntimeConfig { + apiBase: string } } // It is always important to ensure you import/export something when augmenting a type From c044d0eef57467622a103776d9846b41175ce653 Mon Sep 17 00:00:00 2001 From: Aleksandra Date: Sat, 29 Jul 2023 20:32:28 +0200 Subject: [PATCH 11/57] perf(nuxt): export DefineNuxtConfig interface from `nuxt/config` (#22391) --- packages/nuxt/config.d.ts | 3 ++- packages/nuxt/types.d.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/config.d.ts b/packages/nuxt/config.d.ts index ddd2beade0..8eab74f3c6 100644 --- a/packages/nuxt/config.d.ts +++ b/packages/nuxt/config.d.ts @@ -2,4 +2,5 @@ import type { NuxtConfig } from 'nuxt/schema' import type { DefineConfig, InputConfig, UserInputConfig, ConfigLayerMeta } from 'c12' export { NuxtConfig } from 'nuxt/schema' -export declare const defineNuxtConfig: DefineConfig +export interface DefineNuxtConfig extends DefineConfig {} +export declare const defineNuxtConfig: DefineNuxtConfig diff --git a/packages/nuxt/types.d.ts b/packages/nuxt/types.d.ts index 220045a6a6..d2dddd2211 100644 --- a/packages/nuxt/types.d.ts +++ b/packages/nuxt/types.d.ts @@ -1,12 +1,13 @@ /// export * from './dist/index' +import type { DefineNuxtConfig } from 'nuxt/config' import type { SchemaDefinition, RuntimeConfig } from 'nuxt/schema' import type { H3Event } from 'h3' import type { NuxtIslandContext, NuxtIslandResponse, NuxtRenderHTMLContext } from './dist/core/runtime/nitro/renderer' declare global { - const defineNuxtConfig: typeof import('nuxt/config')['defineNuxtConfig'] + const defineNuxtConfig: DefineNuxtConfig const defineNuxtSchema: (schema: SchemaDefinition) => SchemaDefinition } From 8166fb20a544c1d3692a2822d7891d72fb78e65a Mon Sep 17 00:00:00 2001 From: Ryota Watanabe <43837308+wattanx@users.noreply.github.com> Date: Sun, 30 Jul 2023 18:11:50 +0900 Subject: [PATCH 12/57] fix(nuxi): only strip extensions from files (#22399) --- packages/nuxi/src/utils/prepare.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nuxi/src/utils/prepare.ts b/packages/nuxi/src/utils/prepare.ts index d9592fbde9..bdcb64fda6 100644 --- a/packages/nuxi/src/utils/prepare.ts +++ b/packages/nuxi/src/utils/prepare.ts @@ -73,10 +73,14 @@ export const writeTypes = async (nuxt: Nuxt) => { tsConfig.include.push(`${absolutePath}/*`) } } else { - tsConfig.compilerOptions.paths[alias] = [absolutePath.replace(/(?<=\w)\.\w+$/g, '')] /* remove extension */ + const path = stats?.isFile() + ? absolutePath.replace(/(?<=\w)\.\w+$/g, '') /* remove extension */ + : absolutePath + + tsConfig.compilerOptions.paths[alias] = [path] if (!absolutePath.startsWith(rootDirWithSlash)) { - tsConfig.include.push(absolutePath.replace(/(?<=\w)\.\w+$/g, '')) + tsConfig.include.push(path) } } } From 257cb3c8a0d8c299c2464b665d31cb8761b2056b Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 30 Jul 2023 10:16:13 +0100 Subject: [PATCH 13/57] chore(deps): bump typescript/untyped versions (#22340) --- package.json | 2 +- packages/kit/package.json | 2 +- packages/kit/src/loader/config.ts | 3 +- packages/nuxt/package.json | 2 +- packages/nuxt/src/core/templates.ts | 5 +- packages/schema/package.json | 2 +- pnpm-lock.yaml | 128 ++++++++++++++-------------- renovate.json | 1 - 8 files changed, 73 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 68f42dc8d0..3707b4661b 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "rimraf": "5.0.1", "semver": "7.5.4", "std-env": "3.3.3", - "typescript": "5.0.4", + "typescript": "5.1.6", "ufo": "1.1.2", "vite": "4.4.7", "vitest": "0.33.0", diff --git a/packages/kit/package.json b/packages/kit/package.json index 18580eb748..27eea09517 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -36,7 +36,7 @@ "semver": "^7.5.4", "unctx": "^2.3.1", "unimport": "^3.1.0", - "untyped": "^1.3.2" + "untyped": "^1.4.0" }, "devDependencies": { "@types/hash-sum": "1.0.0", diff --git a/packages/kit/src/loader/config.ts b/packages/kit/src/loader/config.ts index 368781b7de..a4bce4f0c4 100644 --- a/packages/kit/src/loader/config.ts +++ b/packages/kit/src/loader/config.ts @@ -1,4 +1,5 @@ import { resolve } from 'pathe' +import type { JSValue } from 'untyped' import { applyDefaults } from 'untyped' import type { LoadConfigOptions } from 'c12' import { loadConfig } from 'c12' @@ -50,5 +51,5 @@ export async function loadNuxtConfig (opts: LoadNuxtConfigOptions): Promise) as unknown as NuxtOptions } diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 18599013bd..34dbc89478 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -99,7 +99,7 @@ "unimport": "^3.1.0", "unplugin": "^1.4.0", "unplugin-vue-router": "^0.6.4", - "untyped": "^1.3.2", + "untyped": "^1.4.0", "vue": "^3.3.4", "vue-bundle-renderer": "^1.0.3", "vue-devtools-stub": "^0.1.0", diff --git a/packages/nuxt/src/core/templates.ts b/packages/nuxt/src/core/templates.ts index 8979f829b1..55f3013dd2 100644 --- a/packages/nuxt/src/core/templates.ts +++ b/packages/nuxt/src/core/templates.ts @@ -1,6 +1,7 @@ import { existsSync } from 'node:fs' import { genArrayFromRaw, genDynamicImport, genExport, genImport, genObjectFromRawEntries, genSafeVariableName, genString } from 'knitwork' import { isAbsolute, join, relative, resolve } from 'pathe' +import type { JSValue } from 'untyped' import { generateTypes, resolveSchema } from 'untyped' import escapeRE from 'escape-string-regexp' import { hash } from 'ohash' @@ -144,7 +145,7 @@ export const schemaTemplate: NuxtTemplate = { ), modules.length > 0 ? ` modules?: (undefined | null | false | NuxtModule | string | [NuxtModule | string, Record] | ${modules.map(([configKey, importName]) => `[${genString(importName)}, Exclude]`).join(' | ')})[],` : '', ' }', - generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nuxt.options.runtimeConfig).filter(([key]) => key !== 'public'))), + generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nuxt.options.runtimeConfig).filter(([key]) => key !== 'public')) as Record), { interfaceName: 'RuntimeConfig', addExport: false, @@ -152,7 +153,7 @@ export const schemaTemplate: NuxtTemplate = { allowExtraKeys: false, indentation: 2 }), - generateTypes(await resolveSchema(nuxt.options.runtimeConfig.public), + generateTypes(await resolveSchema(nuxt.options.runtimeConfig.public as Record), { interfaceName: 'PublicRuntimeConfig', addExport: false, diff --git a/packages/schema/package.json b/packages/schema/package.json index 30edc67a79..e04cd214ef 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -58,7 +58,7 @@ "std-env": "^3.3.3", "ufo": "^1.1.2", "unimport": "^3.1.0", - "untyped": "^1.3.2" + "untyped": "^1.4.0" }, "engines": { "node": "^14.18.0 || >=16.10.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9836020a4..407c775edd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: link:packages/webpack '@nuxtjs/eslint-config-typescript': specifier: 12.0.0 - version: 12.0.0(eslint@8.45.0)(typescript@5.0.4) + version: 12.0.0(eslint@8.45.0)(typescript@5.1.6) '@types/fs-extra': specifier: 11.0.1 version: 11.0.1 @@ -123,8 +123,8 @@ importers: specifier: 3.3.3 version: 3.3.3 typescript: - specifier: 5.0.4 - version: 5.0.4 + specifier: 5.1.6 + version: 5.1.6 ufo: specifier: 1.1.2 version: 1.1.2 @@ -148,7 +148,7 @@ importers: version: 4.2.4(vue@3.3.4) vue-tsc: specifier: 1.8.6 - version: 1.8.6(typescript@5.0.4) + version: 1.8.6(typescript@5.1.6) packages/kit: dependencies: @@ -201,8 +201,8 @@ importers: specifier: ^3.1.0 version: 3.1.0(rollup@3.26.3) untyped: - specifier: ^1.3.2 - version: 1.3.2 + specifier: ^1.4.0 + version: 1.4.0 devDependencies: '@types/hash-sum': specifier: 1.0.0 @@ -479,8 +479,8 @@ importers: specifier: ^0.6.4 version: 0.6.4(rollup@3.26.3)(vue-router@4.2.4)(vue@3.3.4) untyped: - specifier: ^1.3.2 - version: 1.3.2 + specifier: ^1.4.0 + version: 1.4.0 vue: specifier: 3.3.4 version: 3.3.4 @@ -549,8 +549,8 @@ importers: specifier: ^3.1.0 version: 3.1.0(rollup@3.26.3) untyped: - specifier: ^1.3.2 - version: 1.3.2 + specifier: ^1.4.0 + version: 1.4.0 devDependencies: '@nuxt/telemetry': specifier: 2.3.2 @@ -765,7 +765,7 @@ importers: version: 0.33.0(@types/node@18.17.0) vite-plugin-checker: specifier: ^0.6.1 - version: 0.6.1(eslint@8.45.0)(typescript@5.0.4)(vite@4.4.7)(vue-tsc@1.8.6) + version: 0.6.1(eslint@8.45.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.6) vue-bundle-renderer: specifier: ^1.0.3 version: 1.0.3 @@ -826,7 +826,7 @@ importers: version: 6.2.0(webpack@5.88.2) fork-ts-checker-webpack-plugin: specifier: ^8.0.0 - version: 8.0.0(typescript@5.0.4)(webpack@5.88.2) + version: 8.0.0(typescript@5.1.6)(webpack@5.88.2) fs-extra: specifier: ^11.1.1 version: 11.1.1 @@ -2082,14 +2082,14 @@ packages: resolution: {integrity: sha512-Nt1nTkPsji/X8z/BCqUgb8uADs+kT0FZboVDwyCdMlCgjEQKrAZUlunKXGywa6ssz4/RohGmvuB1cFre6dSKXQ==} dev: false - /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.45.0)(typescript@5.0.4): + /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.45.0)(typescript@5.1.6): resolution: {integrity: sha512-HJR0ho5MYuOCFjkL+eMX/VXbUwy36J12DUMVy+dj3Qz1GYHwX92Saxap3urFzr8oPkzzFiuOknDivfCeRBWakg==} peerDependencies: eslint: ^8.23.0 dependencies: '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - '@typescript-eslint/eslint-plugin': 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.0.4) - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/eslint-plugin': 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) eslint: 8.45.0 eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.27.5)(eslint@8.45.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) @@ -2660,7 +2660,7 @@ packages: dependencies: '@types/yargs-parser': 21.0.0 - /@typescript-eslint/eslint-plugin@5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.0.4): + /@typescript-eslint/eslint-plugin@5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.1.6): resolution: {integrity: sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2672,23 +2672,23 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) '@typescript-eslint/scope-manager': 5.59.9 - '@typescript-eslint/type-utils': 5.59.9(eslint@8.45.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/type-utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.45.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 semver: 7.5.4 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.59.9(eslint@8.45.0)(typescript@5.0.4): + /@typescript-eslint/parser@5.59.9(eslint@8.45.0)(typescript@5.1.6): resolution: {integrity: sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2700,10 +2700,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.59.9 '@typescript-eslint/types': 5.59.9 - '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) debug: 4.3.4 eslint: 8.45.0 - typescript: 5.0.4 + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -2716,7 +2716,7 @@ packages: '@typescript-eslint/visitor-keys': 5.59.9 dev: true - /@typescript-eslint/type-utils@5.59.9(eslint@8.45.0)(typescript@5.0.4): + /@typescript-eslint/type-utils@5.59.9(eslint@8.45.0)(typescript@5.1.6): resolution: {integrity: sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2726,12 +2726,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.45.0 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -2741,7 +2741,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree@5.59.9(typescript@5.0.4): + /@typescript-eslint/typescript-estree@5.59.9(typescript@5.1.6): resolution: {integrity: sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2756,13 +2756,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.59.9(eslint@8.45.0)(typescript@5.0.4): + /@typescript-eslint/utils@5.59.9(eslint@8.45.0)(typescript@5.1.6): resolution: {integrity: sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2773,7 +2773,7 @@ packages: '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.59.9 '@typescript-eslint/types': 5.59.9 - '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) eslint: 8.45.0 eslint-scope: 5.1.1 semver: 7.5.4 @@ -3016,7 +3016,7 @@ packages: /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} - /@vue/language-core@1.8.6(typescript@5.0.4): + /@vue/language-core@1.8.6(typescript@5.1.6): resolution: {integrity: sha512-PyYDMArbR7hnhqw9OEupr0s4ut0/ZfITp7WEjigF58cd2R0lRLNM1HPvzFMuULpy3ImBEOZI11KRIDirqOe+tQ==} peerDependencies: typescript: '*' @@ -3031,7 +3031,7 @@ packages: '@vue/shared': 3.3.4 minimatch: 9.0.2 muggle-string: 0.3.1 - typescript: 5.0.4 + typescript: 5.1.6 vue-template-compiler: 2.7.14 /@vue/reactivity-transform@3.3.4: @@ -3090,11 +3090,11 @@ packages: vue-component-type-helpers: 1.6.5 dev: true - /@vue/typescript@1.8.6(typescript@5.0.4): + /@vue/typescript@1.8.6(typescript@5.1.6): resolution: {integrity: sha512-sDQ5tltrSVS3lAkE3JtMRGJo91CLIxcWPy7yms/DT+ssxXpwxbVRD5Gok68HenEZBA4Klq7nW99sG/nTRnpPuQ==} dependencies: '@volar/typescript': 1.9.0 - '@vue/language-core': 1.8.6(typescript@5.0.4) + '@vue/language-core': 1.8.6(typescript@5.1.6) transitivePeerDependencies: - typescript @@ -4663,7 +4663,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) debug: 3.2.7 eslint: 8.45.0 eslint-import-resolver-node: 0.3.7 @@ -4704,7 +4704,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 @@ -5152,7 +5152,7 @@ packages: signal-exit: 4.0.2 dev: true - /fork-ts-checker-webpack-plugin@8.0.0(typescript@5.0.4)(webpack@5.88.2): + /fork-ts-checker-webpack-plugin@8.0.0(typescript@5.1.6)(webpack@5.88.2): resolution: {integrity: sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} peerDependencies: @@ -5171,7 +5171,7 @@ packages: schema-utils: 3.3.0 semver: 7.5.4 tapable: 2.2.1 - typescript: 5.0.4 + typescript: 5.1.6 webpack: 5.88.2 dev: false @@ -6550,7 +6550,7 @@ packages: engines: {node: '>=10'} hasBin: true - /mkdist@1.3.0(typescript@5.0.4): + /mkdist@1.3.0(typescript@5.1.6): resolution: {integrity: sha512-ZQrUvcL7LkRdzMREpDyg9AT18N9Tl5jc2qeKAUeEw0KGsgykbHbuRvysGAzTuGtwuSg0WQyNit5jh/k+Er3JEg==} hasBin: true peerDependencies: @@ -6571,7 +6571,7 @@ packages: mlly: 1.4.0 mri: 1.2.0 pathe: 1.1.1 - typescript: 5.0.4 + typescript: 5.1.6 dev: true /mlly@1.4.0: @@ -7834,7 +7834,7 @@ packages: glob: 10.2.6 dev: true - /rollup-plugin-dts@5.3.0(rollup@3.26.3)(typescript@5.0.4): + /rollup-plugin-dts@5.3.0(rollup@3.26.3)(typescript@5.1.6): resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} engines: {node: '>=v14'} peerDependencies: @@ -7843,7 +7843,7 @@ packages: dependencies: magic-string: 0.30.1 rollup: 3.26.3 - typescript: 5.0.4 + typescript: 5.1.6 optionalDependencies: '@babel/code-frame': 7.22.5 dev: true @@ -8481,14 +8481,14 @@ packages: /tslib@2.6.1: resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} - /tsutils@3.21.0(typescript@5.0.4): + /tsutils@3.21.0(typescript@5.1.6): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.0.4 + typescript: 5.1.6 dev: true /tunnel@0.0.6: @@ -8538,9 +8538,9 @@ packages: is-typed-array: 1.1.10 dev: true - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} hasBin: true /uc.micro@1.0.6: @@ -8581,17 +8581,17 @@ packages: hookable: 5.5.3 jiti: 1.19.1 magic-string: 0.30.1 - mkdist: 1.3.0(typescript@5.0.4) + mkdist: 1.3.0(typescript@5.1.6) mlly: 1.4.0 mri: 1.2.0 pathe: 1.1.1 pkg-types: 1.0.3 pretty-bytes: 6.1.1 rollup: 3.26.3 - rollup-plugin-dts: 5.3.0(rollup@3.26.3)(typescript@5.0.4) + rollup-plugin-dts: 5.3.0(rollup@3.26.3)(typescript@5.1.6) scule: 1.0.0 - typescript: 5.0.4 - untyped: 1.3.2 + typescript: 5.1.6 + untyped: 1.4.0 transitivePeerDependencies: - sass - supports-color @@ -8739,8 +8739,8 @@ packages: engines: {node: '>=8'} dev: true - /untyped@1.3.2: - resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==} + /untyped@1.4.0: + resolution: {integrity: sha512-Egkr/s4zcMTEuulcIb7dgURS6QpN7DyqQYdf+jBtiaJvQ+eRsrtWUoX84SbvQWuLkXsOjM+8sJC9u6KoMK/U7Q==} hasBin: true dependencies: '@babel/core': 7.22.9 @@ -8821,7 +8821,7 @@ packages: - supports-color - terser - /vite-plugin-checker@0.6.1(eslint@8.45.0)(typescript@5.0.4)(vite@4.4.7)(vue-tsc@1.8.6): + /vite-plugin-checker@0.6.1(eslint@8.45.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.6): resolution: {integrity: sha512-4fAiu3W/IwRJuJkkUZlWbLunSzsvijDf0eDN6g/MGh6BUK4SMclOTGbLJCPvdAcMOQvVmm8JyJeYLYd4//8CkA==} engines: {node: '>=14.16'} peerDependencies: @@ -8866,13 +8866,13 @@ packages: semver: 7.5.4 strip-ansi: 6.0.1 tiny-invariant: 1.3.1 - typescript: 5.0.4 + typescript: 5.1.6 vite: 4.4.7(@types/node@18.17.0) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.8 vscode-uri: 3.0.7 - vue-tsc: 1.8.6(typescript@5.0.4) + vue-tsc: 1.8.6(typescript@5.1.6) dev: false /vite@4.4.7(@types/node@18.17.0): @@ -9116,16 +9116,16 @@ packages: de-indent: 1.0.2 he: 1.2.0 - /vue-tsc@1.8.6(typescript@5.0.4): + /vue-tsc@1.8.6(typescript@5.1.6): resolution: {integrity: sha512-8ffD4NGfwyATjw/s40Lw2EgB7L2/PAqnGlJBaVQLgblr3SU4EYdhJ67TNXXuDD8NMbDAFSM24V8i3ZIJgTs32Q==} hasBin: true peerDependencies: typescript: '*' dependencies: - '@vue/language-core': 1.8.6(typescript@5.0.4) - '@vue/typescript': 1.8.6(typescript@5.0.4) + '@vue/language-core': 1.8.6(typescript@5.1.6) + '@vue/typescript': 1.8.6(typescript@5.1.6) semver: 7.5.4 - typescript: 5.0.4 + typescript: 5.1.6 /vue@3.3.4: resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} diff --git a/renovate.json b/renovate.json index d1f3a5382a..e2588189c7 100644 --- a/renovate.json +++ b/renovate.json @@ -25,7 +25,6 @@ "main" ], "ignoreDeps": [ - "typescript", "markdownlint-cli", "nuxt", "nuxt3", From f6a350e3906cb4beb96d31f07f8881d8c7b8ce41 Mon Sep 17 00:00:00 2001 From: Ted Xu Date: Sun, 30 Jul 2023 17:16:45 +0800 Subject: [PATCH 14/57] docs: update `.env` section (#22369) --- docs/2.guide/2.directory-structure/2.env.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/2.guide/2.directory-structure/2.env.md b/docs/2.guide/2.directory-structure/2.env.md index 6350415755..1d353907b6 100644 --- a/docs/2.guide/2.directory-structure/2.env.md +++ b/docs/2.guide/2.directory-structure/2.env.md @@ -7,6 +7,8 @@ head.title: ".env" # .env File +## At Build, Dev, and Generate Time + Nuxt CLI has built-in [dotenv](https://github.com/motdotla/dotenv) support in development mode and when running `nuxi build` and `nuxi generate`. In addition to any process environment variables, if you have a `.env` file in your project root directory, it will be automatically loaded **at build, dev, and generate time**, and any environment variables set there will be accessible within your `nuxt.config` file and modules. @@ -27,7 +29,17 @@ When updating `.env` in development mode, the Nuxt instance is automatically res Note that removing a variable from `.env` or removing the `.env` file entirely will not unset values that have already been set. :: -However, **after your server is built**, you are responsible for setting environment variables when you run the server. Your `.env` file will not be read at this point. How you do this is different for every environment. On a Linux server, you could pass the environment variables as arguments using the terminal `DATABASE_HOST=mydatabaseconnectionstring node .output/server/index.mjs`. Or you could source your env file using `source .env && node .output/server/index.mjs`. +## Production Preview + +**After your server is built**, you are responsible for setting environment variables when you run the server. Your `.env` file will not be read at this point. How you do this is different for every environment. + +For local production preview purpose, we recommend using [`nuxi preview`](https://nuxt.com/docs/api/commands/preview) since using this command, the `.env` file will be loaded into `process.env` for convenience. Note that this command requires dependencies to be installed in the package directory. + +Or you could pass the environment variables as arguments using the terminal. For example, on Linux or macOS: + +```bash +DATABASE_HOST=mydatabaseconnectionstring node .output/server/index.mjs +``` Note that for a purely static site, it is not possible to set runtime configuration config after your project is prerendered. From fc10da37fbb32cf55c43b427e58fec5e74f36de7 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 30 Jul 2023 10:17:36 +0100 Subject: [PATCH 15/57] docs: add example for accessing vite config programmatically (#18812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Damian GÅ‚owala <48835293+DamianGlowala@users.noreply.github.com> --- docs/3.api/4.advanced/2.kit.md | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/docs/3.api/4.advanced/2.kit.md b/docs/3.api/4.advanced/2.kit.md index 62d147b051..6cd6c3a525 100644 --- a/docs/3.api/4.advanced/2.kit.md +++ b/docs/3.api/4.advanced/2.kit.md @@ -112,3 +112,42 @@ description: Nuxt Kit provides composable utilities to help interacting with Nux - `extendViteConfig(callback, options?)` - `addWebpackPlugin(webpackPlugin, options?)` - `addVitePlugin(vitePlugin, options?)` + +## Examples + +### Accessing Nuxt Vite Config + +If you are building an integration that needs access to the runtime Vite or webpack config that Nuxt uses, it is possible to extract this using Kit utilities. + +Some examples of projects doing this already: + +- [histoire](https://github.com/histoire-dev/histoire/blob/main/packages/histoire-plugin-nuxt/src/index.ts) +- [nuxt-vitest](https://github.com/danielroe/nuxt-vitest/blob/main/packages/nuxt-vitest/src/config.ts) +- [@storybook-vue/nuxt](https://github.com/storybook-vue/nuxt/blob/main/src/preset.ts) + +Here is a brief example of how you might access the Vite config from a project; you could implement a similar approach to get the webpack configuration. + +```js +import { loadNuxt, buildNuxt } from '@nuxt/kit' + +// https://github.com/nuxt/nuxt/issues/14534 +async function getViteConfig() { + const nuxt = await loadNuxt({ cwd: process.cwd(), dev: false, overrides: { ssr: false } }) + return new Promise((resolve, reject) => { + nuxt.hook('vite:extendConfig', (config, { isClient }) => { + if (isClient) { + resolve(config) + throw new Error('_stop_') + } + }) + buildNuxt(nuxt).catch((err) => { + if (!err.toString().includes('_stop_')) { + reject(err) + } + }) + }).finally(() => nuxt.close()) +} + +const viteConfig = await getViteConfig() +console.log(viteConfig) +``` From 2616aadda6477743da7e185d45eeae022bd0f1b1 Mon Sep 17 00:00:00 2001 From: Prashant Palikhe Date: Sun, 30 Jul 2023 12:07:01 +0200 Subject: [PATCH 16/57] feat(nuxt): allow dynamic `scrollToTop` page meta (#21741) --- docs/3.api/3.utils/define-page-meta.md | 7 +++++++ packages/nuxt/src/pages/runtime/composables.ts | 2 +- packages/nuxt/src/pages/runtime/router.options.ts | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/3.api/3.utils/define-page-meta.md b/docs/3.api/3.utils/define-page-meta.md index 3380d66479..5372e0bbb8 100644 --- a/docs/3.api/3.utils/define-page-meta.md +++ b/docs/3.api/3.utils/define-page-meta.md @@ -32,6 +32,7 @@ interface PageMeta { keepalive?: boolean | KeepAliveProps layout?: false | LayoutKey | Ref | ComputedRef middleware?: MiddlewareKey | NavigationGuard | Array + scrollToTop?: boolean | ((to: RouteLocationNormalizedLoaded, from: RouteLocationNormalizedLoaded) => boolean) [key: string]: unknown } ``` @@ -98,6 +99,12 @@ interface PageMeta { Validate whether a given route can validly be rendered with this page. Return true if it is valid, or false if not. If another match can't be found, this will mean a 404. You can also directly return an object with `statusCode`/`statusMessage` to respond immediately with an error (other matches will not be checked). + **`scrollTopTop`** + + - **Type**: `boolean | (to: RouteLocationNormalized, from: RouteLocationNormalized) => boolean` + + Tell Nuxt to scroll to the top before rendering the page or not. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/app/router.options.ts` (see [docs](/docs/guide/directory-structure/pages/#router-options)) for more info. + **`[key: string]`** - **Type**: `any` diff --git a/packages/nuxt/src/pages/runtime/composables.ts b/packages/nuxt/src/pages/runtime/composables.ts index 3fde4c6ccb..a57d83371d 100644 --- a/packages/nuxt/src/pages/runtime/composables.ts +++ b/packages/nuxt/src/pages/runtime/composables.ts @@ -36,7 +36,7 @@ export interface PageMeta { /** You may define a path matcher, if you have a more complex pattern than can be expressed with the file name. */ path?: string /** Set to `false` to avoid scrolling to top on page navigations */ - scrollToTop?: boolean + scrollToTop?: boolean | ((to: RouteLocationNormalizedLoaded, from: RouteLocationNormalizedLoaded) => boolean) } declare module 'vue-router' { diff --git a/packages/nuxt/src/pages/runtime/router.options.ts b/packages/nuxt/src/pages/runtime/router.options.ts index d5c8bdbb59..42de00df3d 100644 --- a/packages/nuxt/src/pages/runtime/router.options.ts +++ b/packages/nuxt/src/pages/runtime/router.options.ts @@ -20,8 +20,10 @@ export default { // savedPosition is only available for popstate navigations (back button) let position: ScrollPosition = savedPosition || undefined + const routeAllowsScrollToTop = typeof to.meta.scrollToTop === 'function' ? to.meta.scrollToTop(to, from) : to.meta.scrollToTop + // Scroll to top if route is changed by default - if (!position && from && to && to.meta.scrollToTop !== false && _isDifferentRoute(from, to)) { + if (!position && from && to && routeAllowsScrollToTop !== false && _isDifferentRoute(from, to)) { position = { left: 0, top: 0 } } From 2f734df9b5c8b9bf34ce473cfb810648320020e8 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 30 Jul 2023 11:09:16 +0100 Subject: [PATCH 17/57] fix(nuxt): disallow redirects to more script protocols (#22366) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Damian GÅ‚owala <48835293+DamianGlowala@users.noreply.github.com> --- package.json | 2 +- packages/nuxi/package.json | 2 +- packages/nuxt/package.json | 2 +- packages/nuxt/src/app/composables/router.ts | 15 ++++--- packages/schema/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/vite/package.json | 2 +- packages/webpack/package.json | 2 +- pnpm-lock.yaml | 50 ++++++++++----------- test/bundle.test.ts | 4 +- 10 files changed, 43 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index 3707b4661b..d9734ddf9a 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "semver": "7.5.4", "std-env": "3.3.3", "typescript": "5.1.6", - "ufo": "1.1.2", + "ufo": "1.2.0", "vite": "4.4.7", "vitest": "0.33.0", "vitest-environment-nuxt": "0.10.2", diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index 656e3ebc15..f540a3eacb 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -47,7 +47,7 @@ "pkg-types": "1.0.3", "scule": "1.0.0", "semver": "7.5.4", - "ufo": "1.1.2", + "ufo": "1.2.0", "unbuild": "latest" }, "optionalDependencies": { diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 34dbc89478..6e21f147fd 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -91,7 +91,7 @@ "prompts": "^2.4.2", "scule": "^1.0.0", "strip-literal": "^1.0.1", - "ufo": "^1.1.2", + "ufo": "^1.2.0", "ultrahtml": "^1.3.0", "uncrypto": "^0.1.3", "unctx": "^2.3.1", diff --git a/packages/nuxt/src/app/composables/router.ts b/packages/nuxt/src/app/composables/router.ts index 131fa17858..905ffe63a8 100644 --- a/packages/nuxt/src/app/composables/router.ts +++ b/packages/nuxt/src/app/composables/router.ts @@ -2,7 +2,7 @@ import { getCurrentInstance, hasInjectionContext, inject, onUnmounted } from 'vu import type { Ref } from 'vue' import type { NavigationFailure, NavigationGuard, RouteLocationNormalized, RouteLocationPathRaw, RouteLocationRaw, Router, useRoute as _useRoute, useRouter as _useRouter } from '#vue-router' import { sanitizeStatusCode } from 'h3' -import { hasProtocol, joinURL, parseURL, withQuery } from 'ufo' +import { hasProtocol, isScriptProtocol, joinURL, parseURL, withQuery } from 'ufo' import { useNuxtApp, useRuntimeConfig } from '../nuxt' import type { NuxtError } from './error' @@ -133,11 +133,14 @@ export const navigateTo = (to: RouteLocationRaw | undefined | null, options?: Na } const isExternal = options?.external || hasProtocol(toPath, { acceptRelative: true }) - if (isExternal && !options?.external) { - throw new Error('Navigating to external URL is not allowed by default. Use `navigateTo (url, { external: true })`.') - } - if (isExternal && parseURL(toPath).protocol === 'script:') { - throw new Error('Cannot navigate to an URL with script protocol.') + if (isExternal) { + if (!options?.external) { + throw new Error('Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.') + } + const protocol = parseURL(toPath).protocol + if (protocol && isScriptProtocol(protocol)) { + throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`) + } } const inMiddleware = isProcessingMiddleware() diff --git a/packages/schema/package.json b/packages/schema/package.json index e04cd214ef..da56b890a2 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -56,7 +56,7 @@ "pkg-types": "^1.0.3", "postcss-import-resolver": "^2.0.0", "std-env": "^3.3.3", - "ufo": "^1.1.2", + "ufo": "^1.2.0", "unimport": "^3.1.0", "untyped": "^1.4.0" }, diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 08176b7c59..d696e4ad90 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -30,7 +30,7 @@ "get-port-please": "^3.0.1", "ofetch": "^1.1.1", "pathe": "^1.1.1", - "ufo": "^1.1.2" + "ufo": "^1.2.0" }, "devDependencies": { "@jest/globals": "29.6.1", diff --git a/packages/vite/package.json b/packages/vite/package.json index 8b7e94fc2d..fff0a6cb25 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -55,7 +55,7 @@ "rollup-plugin-visualizer": "^5.9.2", "std-env": "^3.3.3", "strip-literal": "^1.0.1", - "ufo": "^1.1.2", + "ufo": "^1.2.0", "unplugin": "^1.4.0", "vite": "^4.4.7", "vite-node": "^0.33.0", diff --git a/packages/webpack/package.json b/packages/webpack/package.json index 283bb9c8a2..c6bdebea70 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -49,7 +49,7 @@ "pug-plain-loader": "^1.1.0", "std-env": "^3.3.3", "time-fix-plugin": "^2.0.7", - "ufo": "^1.1.2", + "ufo": "^1.2.0", "unplugin": "^1.4.0", "url-loader": "^4.1.1", "vue-bundle-renderer": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 407c775edd..3678772043 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,8 +126,8 @@ importers: specifier: 5.1.6 version: 5.1.6 ufo: - specifier: 1.1.2 - version: 1.1.2 + specifier: 1.2.0 + version: 1.2.0 vite: specifier: 4.4.7 version: 4.4.7(@types/node@18.17.0) @@ -326,8 +326,8 @@ importers: specifier: 7.5.4 version: 7.5.4 ufo: - specifier: 1.1.2 - version: 1.1.2 + specifier: 1.2.0 + version: 1.2.0 unbuild: specifier: latest version: 1.2.1 @@ -455,8 +455,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 ufo: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.2.0 + version: 1.2.0 ultrahtml: specifier: ^1.3.0 version: 1.3.0 @@ -543,8 +543,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 ufo: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.2.0 + version: 1.2.0 unimport: specifier: ^3.1.0 version: 3.1.0(rollup@3.26.3) @@ -643,8 +643,8 @@ importers: specifier: ^1.1.1 version: 1.1.1 ufo: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.2.0 + version: 1.2.0 vue: specifier: ^3.3.4 version: 3.3.4 @@ -752,8 +752,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 ufo: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.2.0 + version: 1.2.0 unplugin: specifier: ^1.4.0 version: 1.4.0 @@ -882,8 +882,8 @@ importers: specifier: ^2.0.7 version: 2.0.7(webpack@5.88.2) ufo: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.2.0 + version: 1.2.0 unplugin: specifier: ^1.4.0 version: 1.4.0 @@ -966,7 +966,7 @@ importers: devDependencies: ufo: specifier: latest - version: 1.1.2 + version: 1.2.0 unplugin: specifier: latest version: 1.4.0 @@ -5026,7 +5026,7 @@ packages: enhanced-resolve: 5.15.0 mlly: 1.4.0 pathe: 1.1.1 - ufo: 1.1.2 + ufo: 1.2.0 dev: false /fast-deep-equal@3.1.3: @@ -5470,7 +5470,7 @@ packages: destr: 2.0.0 iron-webcrypto: 0.7.0 radix3: 1.0.1 - ufo: 1.1.2 + ufo: 1.2.0 uncrypto: 0.1.3 /happy-dom@10.5.2: @@ -6211,7 +6211,7 @@ packages: mlly: 1.4.0 node-forge: 1.3.1 pathe: 1.1.1 - ufo: 1.1.2 + ufo: 1.2.0 /loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} @@ -6580,7 +6580,7 @@ packages: acorn: 8.10.0 pathe: 1.1.1 pkg-types: 1.0.3 - ufo: 1.1.2 + ufo: 1.2.0 /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -6686,7 +6686,7 @@ packages: serve-static: 1.15.0 source-map-support: 0.5.21 std-env: 3.3.3 - ufo: 1.1.2 + ufo: 1.2.0 uncrypto: 0.1.3 unenv: 1.5.2 unimport: 3.1.0(rollup@3.26.3) @@ -6884,7 +6884,7 @@ packages: dependencies: destr: 2.0.0 node-fetch-native: 1.2.0 - ufo: 1.1.2 + ufo: 1.2.0 /ohash@1.1.2: resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} @@ -8547,8 +8547,8 @@ packages: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true - /ufo@1.1.2: - resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} + /ufo@1.2.0: + resolution: {integrity: sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg==} /ultrahtml@1.3.0: resolution: {integrity: sha512-xmXvE8tC8t4PVqy0/g1fe7H9USY/Brr425q4dD/0QbQMQit7siCtb06+SCqE4GfU24nwsZz8Th1g7L7mm1lL5g==} @@ -8730,7 +8730,7 @@ packages: mri: 1.2.0 node-fetch-native: 1.2.0 ofetch: 1.1.1 - ufo: 1.1.2 + ufo: 1.2.0 transitivePeerDependencies: - supports-color @@ -9056,7 +9056,7 @@ packages: /vue-bundle-renderer@1.0.3: resolution: {integrity: sha512-EfjX+5TTUl70bki9hPuVp+54JiZOvFIfoWBcfXsSwLzKEiDYyHNi5iX8srnqLIv3YRnvxgbntdcG1WPq0MvffQ==} dependencies: - ufo: 1.1.2 + ufo: 1.2.0 /vue-component-type-helpers@1.6.5: resolution: {integrity: sha512-iGdlqtajmiqed8ptURKPJ/Olz0/mwripVZszg6tygfZSIL9kYFPJTNY6+Q6OjWGznl2L06vxG5HvNvAnWrnzbg==} diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 2b4c07ba6e..ad59f13d56 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM for (const outputDir of ['.output', '.output-inline']) { it('default client bundle size', async () => { const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public')) - expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.3k"') + expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.4k"') expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(` [ "_nuxt/entry.js", @@ -32,7 +32,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM const serverDir = join(rootDir, '.output/server') const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir) - expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.4k"') + expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.5k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2330k"') From c5f94be5d16c8bd190b66e3d88764d24e947c352 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 30 Jul 2023 19:41:01 +0800 Subject: [PATCH 18/57] feat(nuxt): expose filtered templates in `app:templatesGenerated` hook (#21935) --- packages/nuxt/src/core/app.ts | 6 ++++-- packages/schema/src/types/hooks.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/nuxt/src/core/app.ts b/packages/nuxt/src/core/app.ts index dd030ed4a1..565e5e2959 100644 --- a/packages/nuxt/src/core/app.ts +++ b/packages/nuxt/src/core/app.ts @@ -33,8 +33,10 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?: // Compile templates into vfs const templateContext = { utils: templateUtils, nuxt, app } - await Promise.all((app.templates as Array>) + const filteredTemplates = (app.templates as Array>) .filter(template => !options.filter || options.filter(template)) + + await Promise.all(filteredTemplates .map(async (template) => { const contents = await compileTemplate(template, templateContext) @@ -55,7 +57,7 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?: } })) - await nuxt.callHook('app:templatesGenerated', app) + await nuxt.callHook('app:templatesGenerated', app, filteredTemplates, options) } async function resolveApp (nuxt: Nuxt, app: NuxtApp) { diff --git a/packages/schema/src/types/hooks.ts b/packages/schema/src/types/hooks.ts index ba6f7c8c2a..6bd5fc3a91 100644 --- a/packages/schema/src/types/hooks.ts +++ b/packages/schema/src/types/hooks.ts @@ -123,7 +123,7 @@ export interface NuxtHooks { * @param app The configured `NuxtApp` object * @returns Promise */ - 'app:templatesGenerated': (app: NuxtApp) => HookResult + 'app:templatesGenerated': (app: NuxtApp, templates: ResolvedNuxtTemplate[], options?: GenerateAppOptions) => HookResult /** * Called before Nuxt bundle builder. From 9e92c74d079922406c95d062ecb1fe4fe49e89f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 30 Jul 2023 16:45:37 +0100 Subject: [PATCH 19/57] chore(deps): update all non-major dependencies (main) (#22315) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- .github/workflows/ci.yml | 4 +- .github/workflows/scorecards.yml | 2 +- package.json | 14 +- packages/nuxi/package.json | 2 +- packages/nuxt/package.json | 10 +- packages/schema/package.json | 4 +- packages/test-utils/package.json | 6 +- packages/vite/package.json | 4 +- packages/webpack/package.json | 2 +- pnpm-lock.yaml | 854 ++++++++++++++++--------------- test/bundle.test.ts | 2 +- 11 files changed, 470 insertions(+), 434 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76db0d7b95..ac87ccc4c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: run: pnpm install - name: Initialize CodeQL - uses: github/codeql-action/init@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0 + uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: languages: javascript queries: +security-and-quality @@ -98,7 +98,7 @@ jobs: path: packages - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0 + uses: github/codeql-action/analyze@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: category: "/language:javascript" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index b5ad8bf273..d2e54677d7 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -66,6 +66,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0 + uses: github/codeql-action/upload-sarif@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: sarif_file: results.sarif diff --git a/package.json b/package.json index d9734ddf9a..5d788fc205 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "nuxt": "workspace:*", "vite": "4.4.7", "vue": "3.3.4", - "magic-string": "^0.30.1" + "magic-string": "^0.30.2" }, "devDependencies": { "@actions/core": "1.10.0", @@ -45,7 +45,7 @@ "@nuxt/webpack-builder": "workspace:*", "@nuxtjs/eslint-config-typescript": "12.0.0", "@types/fs-extra": "11.0.1", - "@types/node": "18.17.0", + "@types/node": "18.17.1", "@types/semver": "7.5.0", "case-police": "0.6.1", "chalk": "5.3.0", @@ -53,11 +53,11 @@ "cheerio": "1.0.0-rc.12", "consola": "3.2.3", "devalue": "4.3.2", - "eslint": "8.45.0", - "eslint-plugin-import": "2.27.5", + "eslint": "8.46.0", + "eslint-plugin-import": "2.28.0", "eslint-plugin-jsdoc": "41.1.2", "eslint-plugin-no-only-tests": "3.1.0", - "execa": "7.1.1", + "execa": "7.2.0", "fs-extra": "11.1.1", "globby": "13.2.2", "h3": "1.7.1", @@ -70,7 +70,7 @@ "nuxt-vitest": "0.10.2", "ofetch": "1.1.1", "pathe": "1.1.1", - "playwright-core": "1.36.1", + "playwright-core": "1.36.2", "rimraf": "5.0.1", "semver": "7.5.4", "std-env": "3.3.3", @@ -82,7 +82,7 @@ "vue": "3.3.4", "vue-eslint-parser": "9.3.1", "vue-router": "4.2.4", - "vue-tsc": "1.8.6" + "vue-tsc": "1.8.8" }, "packageManager": "pnpm@8.6.10", "engines": { diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index f540a3eacb..f001e3eaf0 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -33,7 +33,7 @@ "deep-object-diff": "1.1.9", "defu": "6.1.2", "destr": "2.0.0", - "execa": "7.1.1", + "execa": "7.2.0", "flat": "5.0.2", "giget": "1.1.2", "h3": "1.7.1", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 6e21f147fd..f08b82e70b 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -56,10 +56,10 @@ "@nuxt/kit": "workspace:../kit", "@nuxt/schema": "workspace:../schema", "@nuxt/telemetry": "^2.3.2", - "@nuxt/ui-templates": "^1.2.1", + "@nuxt/ui-templates": "^1.3.1", "@nuxt/vite-builder": "workspace:../vite", - "@unhead/ssr": "^1.1.32", - "@unhead/vue": "^1.1.32", + "@unhead/ssr": "^1.1.33", + "@unhead/vue": "^1.1.33", "@vue/shared": "^3.3.4", "acorn": "8.10.0", "c12": "^1.4.2", @@ -68,7 +68,7 @@ "defu": "^6.1.2", "destr": "^2.0.0", "devalue": "^4.3.2", - "esbuild": "^0.18.16", + "esbuild": "^0.18.17", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "fs-extra": "^11.1.1", @@ -79,7 +79,7 @@ "klona": "^2.0.6", "knitwork": "^1.0.0", "local-pkg": "^0.4.3", - "magic-string": "^0.30.1", + "magic-string": "^0.30.2", "mlly": "^1.4.0", "nitropack": "^2.5.2", "nuxi": "workspace:../nuxi", diff --git a/packages/schema/package.json b/packages/schema/package.json index da56b890a2..9622f4af63 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -30,7 +30,7 @@ "@types/file-loader": "5.0.1", "@types/pug": "2.0.6", "@types/sass-loader": "8.0.5", - "@unhead/schema": "1.1.32", + "@unhead/schema": "1.1.33", "@vitejs/plugin-vue": "4.2.3", "@vitejs/plugin-vue-jsx": "3.0.1", "@vue/compiler-core": "3.3.4", @@ -49,7 +49,7 @@ "webpack-dev-middleware": "6.1.1" }, "dependencies": { - "@nuxt/ui-templates": "^1.2.1", + "@nuxt/ui-templates": "^1.3.1", "defu": "^6.1.2", "hookable": "^5.5.3", "pathe": "^1.1.1", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index d696e4ad90..33f7fb67bd 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -26,15 +26,15 @@ "@nuxt/schema": "workspace:../schema", "consola": "^3.2.3", "defu": "^6.1.2", - "execa": "^7.1.1", + "execa": "^7.2.0", "get-port-please": "^3.0.1", "ofetch": "^1.1.1", "pathe": "^1.1.1", "ufo": "^1.2.0" }, "devDependencies": { - "@jest/globals": "29.6.1", - "playwright-core": "1.36.1", + "@jest/globals": "29.6.2", + "playwright-core": "1.36.2", "unbuild": "latest", "vitest": "0.33.0" }, diff --git a/packages/vite/package.json b/packages/vite/package.json index fff0a6cb25..cf0e21aa4c 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -35,7 +35,7 @@ "consola": "^3.2.3", "cssnano": "^6.0.1", "defu": "^6.1.2", - "esbuild": "^0.18.16", + "esbuild": "^0.18.17", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "externality": "^1.0.2", @@ -43,7 +43,7 @@ "get-port-please": "^3.0.1", "h3": "^1.7.1", "knitwork": "^1.0.0", - "magic-string": "^0.30.1", + "magic-string": "^0.30.2", "mlly": "^1.4.0", "ohash": "^1.1.2", "pathe": "^1.1.1", diff --git a/packages/webpack/package.json b/packages/webpack/package.json index c6bdebea70..9dc704b01a 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -35,7 +35,7 @@ "h3": "^1.7.1", "hash-sum": "^2.0.0", "lodash-es": "^4.17.21", - "magic-string": "^0.30.1", + "magic-string": "^0.30.2", "memfs": "^4.2.0", "mini-css-extract-plugin": "^2.7.6", "mlly": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3678772043..317e9f3b84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ overrides: nuxt: workspace:* vite: 4.4.7 vue: 3.3.4 - magic-string: ^0.30.1 + magic-string: ^0.30.2 importers: @@ -31,13 +31,13 @@ importers: version: link:packages/webpack '@nuxtjs/eslint-config-typescript': specifier: 12.0.0 - version: 12.0.0(eslint@8.45.0)(typescript@5.1.6) + version: 12.0.0(eslint@8.46.0)(typescript@5.1.6) '@types/fs-extra': specifier: 11.0.1 version: 11.0.1 '@types/node': - specifier: 18.17.0 - version: 18.17.0 + specifier: 18.17.1 + version: 18.17.1 '@types/semver': specifier: 7.5.0 version: 7.5.0 @@ -60,20 +60,20 @@ importers: specifier: 4.3.2 version: 4.3.2 eslint: - specifier: 8.45.0 - version: 8.45.0 + specifier: 8.46.0 + version: 8.46.0 eslint-plugin-import: - specifier: 2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + specifier: 2.28.0 + version: 2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) eslint-plugin-jsdoc: specifier: 41.1.2 - version: 41.1.2(eslint@8.45.0) + version: 41.1.2(eslint@8.46.0) eslint-plugin-no-only-tests: specifier: 3.1.0 version: 3.1.0 execa: - specifier: 7.1.1 - version: 7.1.1 + specifier: 7.2.0 + version: 7.2.0 fs-extra: specifier: 11.1.1 version: 11.1.1 @@ -111,8 +111,8 @@ importers: specifier: 1.1.1 version: 1.1.1 playwright-core: - specifier: 1.36.1 - version: 1.36.1 + specifier: 1.36.2 + version: 1.36.2 rimraf: specifier: 5.0.1 version: 5.0.1 @@ -130,7 +130,7 @@ importers: version: 1.2.0 vite: specifier: 4.4.7 - version: 4.4.7(@types/node@18.17.0) + version: 4.4.7(@types/node@18.17.1) vitest: specifier: 0.33.0 version: 0.33.0(happy-dom@10.5.2) @@ -142,13 +142,13 @@ importers: version: 3.3.4 vue-eslint-parser: specifier: 9.3.1 - version: 9.3.1(eslint@8.45.0) + version: 9.3.1(eslint@8.46.0) vue-router: specifier: 4.2.4 version: 4.2.4(vue@3.3.4) vue-tsc: - specifier: 1.8.6 - version: 1.8.6(typescript@5.1.6) + specifier: 1.8.8 + version: 1.8.8(typescript@5.1.6) packages/kit: dependencies: @@ -224,7 +224,7 @@ importers: version: 1.2.1 vite: specifier: 4.4.7 - version: 4.4.7(@types/node@18.17.0) + version: 4.4.7(@types/node@18.17.1) vitest: specifier: 0.33.0 version: 0.33.0(happy-dom@10.5.2) @@ -284,8 +284,8 @@ importers: specifier: 2.0.0 version: 2.0.0 execa: - specifier: 7.1.1 - version: 7.1.1 + specifier: 7.2.0 + version: 7.2.0 flat: specifier: 5.0.2 version: 5.0.2 @@ -347,20 +347,20 @@ importers: specifier: ^2.3.2 version: 2.3.2 '@nuxt/ui-templates': - specifier: ^1.2.1 - version: 1.2.1 + specifier: ^1.3.1 + version: 1.3.1 '@nuxt/vite-builder': specifier: workspace:* version: link:../vite '@types/node': specifier: ^14.18.0 || >=16.10.0 - version: 18.17.0 + version: 18.17.1 '@unhead/ssr': - specifier: ^1.1.32 - version: 1.1.32 + specifier: ^1.1.33 + version: 1.1.33 '@unhead/vue': - specifier: ^1.1.32 - version: 1.1.32(vue@3.3.4) + specifier: ^1.1.33 + version: 1.1.33(vue@3.3.4) '@vue/shared': specifier: ^3.3.4 version: 3.3.4 @@ -386,8 +386,8 @@ importers: specifier: ^4.3.2 version: 4.3.2 esbuild: - specifier: ^0.18.16 - version: 0.18.16 + specifier: ^0.18.17 + version: 0.18.17 escape-string-regexp: specifier: ^5.0.0 version: 5.0.0 @@ -419,8 +419,8 @@ importers: specifier: ^0.4.3 version: 0.4.3 magic-string: - specifier: ^0.30.1 - version: 0.30.1 + specifier: ^0.30.2 + version: 0.30.2 mlly: specifier: ^1.4.0 version: 1.4.0 @@ -514,7 +514,7 @@ importers: version: 1.2.1 vite: specifier: 4.4.7 - version: 4.4.7(@types/node@18.17.0) + version: 4.4.7(@types/node@18.17.1) vitest: specifier: 0.33.0 version: 0.33.0(happy-dom@10.5.2) @@ -522,8 +522,8 @@ importers: packages/schema: dependencies: '@nuxt/ui-templates': - specifier: ^1.2.1 - version: 1.2.1 + specifier: ^1.3.1 + version: 1.3.1 defu: specifier: ^6.1.2 version: 6.1.2 @@ -565,8 +565,8 @@ importers: specifier: 8.0.5 version: 8.0.5 '@unhead/schema': - specifier: 1.1.32 - version: 1.1.32 + specifier: 1.1.33 + version: 1.1.33 '@vitejs/plugin-vue': specifier: 4.2.3 version: 4.2.3(vite@4.4.7)(vue@3.3.4) @@ -596,7 +596,7 @@ importers: version: 2.3.1 vite: specifier: 4.4.7 - version: 4.4.7(@types/node@18.17.0) + version: 4.4.7(@types/node@18.17.1) vue: specifier: 3.3.4 version: 3.3.4 @@ -631,8 +631,8 @@ importers: specifier: ^6.1.2 version: 6.1.2 execa: - specifier: ^7.1.1 - version: 7.1.1 + specifier: ^7.2.0 + version: 7.2.0 get-port-please: specifier: ^3.0.1 version: 3.0.1 @@ -650,11 +650,11 @@ importers: version: 3.3.4 devDependencies: '@jest/globals': - specifier: 29.6.1 - version: 29.6.1 + specifier: 29.6.2 + version: 29.6.2 playwright-core: - specifier: 1.36.1 - version: 1.36.1 + specifier: 1.36.2 + version: 1.36.2 unbuild: specifier: latest version: 1.2.1 @@ -692,8 +692,8 @@ importers: specifier: ^6.1.2 version: 6.1.2 esbuild: - specifier: ^0.18.16 - version: 0.18.16 + specifier: ^0.18.17 + version: 0.18.17 escape-string-regexp: specifier: ^5.0.0 version: 5.0.0 @@ -716,8 +716,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 magic-string: - specifier: ^0.30.1 - version: 0.30.1 + specifier: ^0.30.2 + version: 0.30.2 mlly: specifier: ^1.4.0 version: 1.4.0 @@ -759,13 +759,13 @@ importers: version: 1.4.0 vite: specifier: 4.4.7 - version: 4.4.7(@types/node@18.17.0) + version: 4.4.7(@types/node@18.17.1) vite-node: specifier: ^0.33.0 - version: 0.33.0(@types/node@18.17.0) + version: 0.33.0(@types/node@18.17.1) vite-plugin-checker: specifier: ^0.6.1 - version: 0.6.1(eslint@8.45.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.6) + version: 0.6.1(eslint@8.46.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.8) vue-bundle-renderer: specifier: ^1.0.3 version: 1.0.3 @@ -840,8 +840,8 @@ importers: specifier: ^4.17.21 version: 4.17.21 magic-string: - specifier: ^0.30.1 - version: 0.30.1 + specifier: ^0.30.2 + version: 0.30.2 memfs: specifier: ^4.2.0 version: 4.2.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.1) @@ -1446,8 +1446,8 @@ packages: requiresBuild: true optional: true - /@esbuild/android-arm64@0.18.16: - resolution: {integrity: sha512-wsCqSPqLz+6Ov+OM4EthU43DyYVVyfn15S4j1bJzylDpc1r1jZFFfJQNfDuT8SlgwuqpmpJXK4uPlHGw6ve7eA==} + /@esbuild/android-arm64@0.18.17: + resolution: {integrity: sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -1462,8 +1462,8 @@ packages: requiresBuild: true optional: true - /@esbuild/android-arm@0.18.16: - resolution: {integrity: sha512-gCHjjQmA8L0soklKbLKA6pgsLk1byULuHe94lkZDzcO3/Ta+bbeewJioEn1Fr7kgy9NWNFy/C+MrBwC6I/WCug==} + /@esbuild/android-arm@0.18.17: + resolution: {integrity: sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -1478,8 +1478,8 @@ packages: requiresBuild: true optional: true - /@esbuild/android-x64@0.18.16: - resolution: {integrity: sha512-ldsTXolyA3eTQ1//4DS+E15xl0H/3DTRJaRL0/0PgkqDsI0fV/FlOtD+h0u/AUJr+eOTlZv4aC9gvfppo3C4sw==} + /@esbuild/android-x64@0.18.17: + resolution: {integrity: sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -1494,8 +1494,8 @@ packages: requiresBuild: true optional: true - /@esbuild/darwin-arm64@0.18.16: - resolution: {integrity: sha512-aBxruWCII+OtluORR/KvisEw0ALuw/qDQWvkoosA+c/ngC/Kwk0lLaZ+B++LLS481/VdydB2u6tYpWxUfnLAIw==} + /@esbuild/darwin-arm64@0.18.17: + resolution: {integrity: sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -1510,8 +1510,8 @@ packages: requiresBuild: true optional: true - /@esbuild/darwin-x64@0.18.16: - resolution: {integrity: sha512-6w4Dbue280+rp3LnkgmriS1icOUZDyPuZo/9VsuMUTns7SYEiOaJ7Ca1cbhu9KVObAWfmdjUl4gwy9TIgiO5eA==} + /@esbuild/darwin-x64@0.18.17: + resolution: {integrity: sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -1526,8 +1526,8 @@ packages: requiresBuild: true optional: true - /@esbuild/freebsd-arm64@0.18.16: - resolution: {integrity: sha512-x35fCebhe9s979DGKbVAwXUOcTmCIE32AIqB9CB1GralMIvxdnMLAw5CnID17ipEw9/3MvDsusj/cspYt2ZLNQ==} + /@esbuild/freebsd-arm64@0.18.17: + resolution: {integrity: sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -1542,8 +1542,8 @@ packages: requiresBuild: true optional: true - /@esbuild/freebsd-x64@0.18.16: - resolution: {integrity: sha512-YM98f+PeNXF3GbxIJlUsj+McUWG1irguBHkszCIwfr3BXtXZsXo0vqybjUDFfu9a8Wr7uUD/YSmHib+EeGAFlg==} + /@esbuild/freebsd-x64@0.18.17: + resolution: {integrity: sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -1558,8 +1558,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-arm64@0.18.16: - resolution: {integrity: sha512-XIqhNUxJiuy+zsR77+H5Z2f7s4YRlriSJKtvx99nJuG5ATuJPjmZ9n0ANgnGlPCpXGSReFpgcJ7O3SMtzIFeiQ==} + /@esbuild/linux-arm64@0.18.17: + resolution: {integrity: sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -1574,8 +1574,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-arm@0.18.16: - resolution: {integrity: sha512-b5ABb+5Ha2C9JkeZXV+b+OruR1tJ33ePmv9ZwMeETSEKlmu/WJ45XTTG+l6a2KDsQtJJ66qo/hbSGBtk0XVLHw==} + /@esbuild/linux-arm@0.18.17: + resolution: {integrity: sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -1590,8 +1590,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-ia32@0.18.16: - resolution: {integrity: sha512-no+pfEpwnRvIyH+txbBAWtjxPU9grslmTBfsmDndj7bnBmr55rOo/PfQmRfz7Qg9isswt1FP5hBbWb23fRWnow==} + /@esbuild/linux-ia32@0.18.17: + resolution: {integrity: sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -1606,8 +1606,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-loong64@0.18.16: - resolution: {integrity: sha512-Zbnczs9ZXjmo0oZSS0zbNlJbcwKXa/fcNhYQjahDs4Xg18UumpXG/lwM2lcSvHS3mTrRyCYZvJbmzYc4laRI1g==} + /@esbuild/linux-loong64@0.18.17: + resolution: {integrity: sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -1622,8 +1622,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-mips64el@0.18.16: - resolution: {integrity: sha512-YMF7hih1HVR/hQVa/ot4UVffc5ZlrzEb3k2ip0nZr1w6fnYypll9td2qcoMLvd3o8j3y6EbJM3MyIcXIVzXvQQ==} + /@esbuild/linux-mips64el@0.18.17: + resolution: {integrity: sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -1638,8 +1638,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-ppc64@0.18.16: - resolution: {integrity: sha512-Wkz++LZ29lDwUyTSEnzDaaP5OveOgTU69q9IyIw9WqLRxM4BjTBjz9un4G6TOvehWpf/J3gYVFN96TjGHrbcNQ==} + /@esbuild/linux-ppc64@0.18.17: + resolution: {integrity: sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -1654,8 +1654,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-riscv64@0.18.16: - resolution: {integrity: sha512-LFMKZ30tk78/mUv1ygvIP+568bwf4oN6reG/uczXnz6SvFn4e2QUFpUpZY9iSJT6Qpgstrhef/nMykIXZtZWGQ==} + /@esbuild/linux-riscv64@0.18.17: + resolution: {integrity: sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1670,8 +1670,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-s390x@0.18.16: - resolution: {integrity: sha512-3ZC0BgyYHYKfZo3AV2/66TD/I9tlSBaW7eWTEIkrQQKfJIifKMMttXl9FrAg+UT0SGYsCRLI35Gwdmm96vlOjg==} + /@esbuild/linux-s390x@0.18.17: + resolution: {integrity: sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1686,8 +1686,8 @@ packages: requiresBuild: true optional: true - /@esbuild/linux-x64@0.18.16: - resolution: {integrity: sha512-xu86B3647DihHJHv/wx3NCz2Dg1gjQ8bbf9cVYZzWKY+gsvxYmn/lnVlqDRazObc3UMwoHpUhNYaZset4X8IPA==} + /@esbuild/linux-x64@0.18.17: + resolution: {integrity: sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -1702,8 +1702,8 @@ packages: requiresBuild: true optional: true - /@esbuild/netbsd-x64@0.18.16: - resolution: {integrity: sha512-uVAgpimx9Ffw3xowtg/7qQPwHFx94yCje+DoBx+LNm2ePDpQXHrzE+Sb0Si2VBObYz+LcRps15cq+95YM7gkUw==} + /@esbuild/netbsd-x64@0.18.17: + resolution: {integrity: sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1718,8 +1718,8 @@ packages: requiresBuild: true optional: true - /@esbuild/openbsd-x64@0.18.16: - resolution: {integrity: sha512-6OjCQM9wf7z8/MBi6BOWaTL2AS/SZudsZtBziXMtNI8r/U41AxS9x7jn0ATOwVy08OotwkPqGRMkpPR2wcTJXA==} + /@esbuild/openbsd-x64@0.18.17: + resolution: {integrity: sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1734,8 +1734,8 @@ packages: requiresBuild: true optional: true - /@esbuild/sunos-x64@0.18.16: - resolution: {integrity: sha512-ZoNkruFYJp9d1LbUYCh8awgQDvB9uOMZqlQ+gGEZR7v6C+N6u7vPr86c+Chih8niBR81Q/bHOSKGBK3brJyvkQ==} + /@esbuild/sunos-x64@0.18.17: + resolution: {integrity: sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1750,8 +1750,8 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-arm64@0.18.16: - resolution: {integrity: sha512-+j4anzQ9hrs+iqO+/wa8UE6TVkKua1pXUb0XWFOx0FiAj6R9INJ+WE//1/Xo6FG1vB5EpH3ko+XcgwiDXTxcdw==} + /@esbuild/win32-arm64@0.18.17: + resolution: {integrity: sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1766,8 +1766,8 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-ia32@0.18.16: - resolution: {integrity: sha512-5PFPmq3sSKTp9cT9dzvI67WNfRZGvEVctcZa1KGjDDu4n3H8k59Inbk0du1fz0KrAbKKNpJbdFXQMDUz7BG4rQ==} + /@esbuild/win32-ia32@0.18.17: + resolution: {integrity: sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1782,34 +1782,34 @@ packages: requiresBuild: true optional: true - /@esbuild/win32-x64@0.18.16: - resolution: {integrity: sha512-sCIVrrtcWN5Ua7jYXNG1xD199IalrbfV2+0k/2Zf2OyV2FtnQnMgdzgpRAbi4AWlKJj1jkX+M+fEGPQj6BQB4w==} + /@esbuild/win32-x64@0.18.17: + resolution: {integrity: sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.45.0 - eslint-visitor-keys: 3.4.1 + eslint: 8.46.0 + eslint-visitor-keys: 3.4.2 - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + /@eslint-community/regexpp@4.6.2: + resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} + /@eslint/eslintrc@2.1.1: + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.6.0 + espree: 9.6.1 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -1819,8 +1819,8 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/js@8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} + /@eslint/js@8.46.0: + resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} /@humanwhocodes/config-array@0.11.10: @@ -1871,53 +1871,53 @@ packages: engines: {node: '>=8'} dev: true - /@jest/environment@29.6.1: - resolution: {integrity: sha512-RMMXx4ws+Gbvw3DfLSuo2cfQlK7IwGbpuEWXCqyYDcqYTI+9Ju3a5hDnXaxjNsa6uKh9PQF2v+qg+RLe63tz5A==} + /@jest/environment@29.6.2: + resolution: {integrity: sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/fake-timers': 29.6.1 + '@jest/fake-timers': 29.6.2 '@jest/types': 29.6.1 - '@types/node': 18.17.0 - jest-mock: 29.6.1 + '@types/node': 18.17.1 + jest-mock: 29.6.2 dev: true - /@jest/expect-utils@29.6.1: - resolution: {integrity: sha512-o319vIf5pEMx0LmzSxxkYYxo4wrRLKHq9dP1yJU7FoPTB0LfAKSz8SWD6D/6U3v/O52t9cF5t+MeJiRsfk7zMw==} + /@jest/expect-utils@29.6.2: + resolution: {integrity: sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.4.3 dev: true - /@jest/expect@29.6.1: - resolution: {integrity: sha512-N5xlPrAYaRNyFgVf2s9Uyyvr795jnB6rObuPx4QFvNJz8aAjpZUDfO4bh5G/xuplMID8PrnuF1+SfSyDxhsgYg==} + /@jest/expect@29.6.2: + resolution: {integrity: sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - expect: 29.6.1 - jest-snapshot: 29.6.1 + expect: 29.6.2 + jest-snapshot: 29.6.2 transitivePeerDependencies: - supports-color dev: true - /@jest/fake-timers@29.6.1: - resolution: {integrity: sha512-RdgHgbXyosCDMVYmj7lLpUwXA4c69vcNzhrt69dJJdf8azUrpRh3ckFCaTPNjsEeRi27Cig0oKDGxy5j7hOgHg==} + /@jest/fake-timers@29.6.2: + resolution: {integrity: sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 '@sinonjs/fake-timers': 10.0.2 - '@types/node': 18.17.0 - jest-message-util: 29.6.1 - jest-mock: 29.6.1 - jest-util: 29.6.1 + '@types/node': 18.17.1 + jest-message-util: 29.6.2 + jest-mock: 29.6.2 + jest-util: 29.6.2 dev: true - /@jest/globals@29.6.1: - resolution: {integrity: sha512-2VjpaGy78JY9n9370H8zGRCFbYVWwjY6RdDMhoJHa1sYfwe6XM/azGN0SjY8kk7BOZApIejQ1BFPyH7FPG0w3A==} + /@jest/globals@29.6.2: + resolution: {integrity: sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.1 - '@jest/expect': 29.6.1 + '@jest/environment': 29.6.2 + '@jest/expect': 29.6.2 '@jest/types': 29.6.1 - jest-mock: 29.6.1 + jest-mock: 29.6.2 transitivePeerDependencies: - supports-color dev: true @@ -1928,8 +1928,8 @@ packages: dependencies: '@sinclair/typebox': 0.27.8 - /@jest/transform@29.6.1: - resolution: {integrity: sha512-URnTneIU3ZjRSaf906cvf6Hpox3hIeJXRnz3VDSw5/X93gR8ycdfSIEy19FlVx8NFmpN7fe3Gb1xF+NjXaQLWg==} + /@jest/transform@29.6.2: + resolution: {integrity: sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/core': 7.22.9 @@ -1940,9 +1940,9 @@ packages: convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.11 - jest-haste-map: 29.6.1 + jest-haste-map: 29.6.2 jest-regex-util: 29.4.3 - jest-util: 29.6.1 + jest-util: 29.6.2 micromatch: 4.0.5 pirates: 4.0.5 slash: 3.0.0 @@ -1958,7 +1958,7 @@ packages: '@jest/schemas': 29.6.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.17.0 + '@types/node': 18.17.1 '@types/yargs': 17.0.22 chalk: 4.1.2 @@ -2078,22 +2078,22 @@ packages: rc9: 2.1.1 std-env: 3.3.3 - /@nuxt/ui-templates@1.2.1: - resolution: {integrity: sha512-Nt1nTkPsji/X8z/BCqUgb8uADs+kT0FZboVDwyCdMlCgjEQKrAZUlunKXGywa6ssz4/RohGmvuB1cFre6dSKXQ==} + /@nuxt/ui-templates@1.3.1: + resolution: {integrity: sha512-5gc02Pu1HycOVUWJ8aYsWeeXcSTPe8iX8+KIrhyEtEoOSkY0eMBuo0ssljB8wALuEmepv31DlYe5gpiRwkjESA==} dev: false - /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.45.0)(typescript@5.1.6): + /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-HJR0ho5MYuOCFjkL+eMX/VXbUwy36J12DUMVy+dj3Qz1GYHwX92Saxap3urFzr8oPkzzFiuOknDivfCeRBWakg==} peerDependencies: eslint: ^8.23.0 dependencies: - '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - '@typescript-eslint/eslint-plugin': 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.1.6) - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) - eslint: 8.45.0 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.27.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-vue: 9.14.0(eslint@8.45.0) + '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + '@typescript-eslint/eslint-plugin': 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.9(eslint@8.46.0)(typescript@5.1.6) + eslint: 8.46.0 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.28.0)(eslint@8.46.0) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-vue: 9.14.0(eslint@8.46.0) transitivePeerDependencies: - eslint-import-resolver-node - eslint-import-resolver-webpack @@ -2101,19 +2101,19 @@ packages: - typescript dev: true - /@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): + /@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): resolution: {integrity: sha512-ewenelo75x0eYEUK+9EBXjc/OopQCvdkmYmlZuoHq5kub/vtiRpyZ/autppwokpHUq8tiVyl2ejMakoiHiDTrg==} peerDependencies: eslint: ^8.23.0 dependencies: - eslint: 8.45.0 - eslint-config-standard: 17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-n: 15.7.0(eslint@8.45.0) - eslint-plugin-node: 11.1.0(eslint@8.45.0) - eslint-plugin-promise: 6.1.1(eslint@8.45.0) - eslint-plugin-unicorn: 44.0.2(eslint@8.45.0) - eslint-plugin-vue: 9.14.0(eslint@8.45.0) + eslint: 8.46.0 + eslint-config-standard: 17.0.0(eslint-plugin-import@2.28.0)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.46.0) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-n: 15.7.0(eslint@8.46.0) + eslint-plugin-node: 11.1.0(eslint@8.46.0) + eslint-plugin-promise: 6.1.1(eslint@8.46.0) + eslint-plugin-unicorn: 44.0.2(eslint@8.46.0) + eslint-plugin-vue: 9.14.0(eslint@8.46.0) local-pkg: 0.4.3 transitivePeerDependencies: - '@typescript-eslint/parser' @@ -2281,7 +2281,7 @@ packages: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.1 + magic-string: 0.30.2 rollup: 3.26.3 dev: true @@ -2299,7 +2299,7 @@ packages: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.1 + magic-string: 0.30.2 rollup: 3.26.3 /@rollup/plugin-inject@5.0.3(rollup@3.26.3): @@ -2313,7 +2313,7 @@ packages: dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.3) estree-walker: 2.0.2 - magic-string: 0.30.1 + magic-string: 0.30.2 rollup: 3.26.3 /@rollup/plugin-json@6.0.0(rollup@3.26.3): @@ -2355,7 +2355,7 @@ packages: optional: true dependencies: '@rollup/pluginutils': 5.0.2(rollup@3.26.3) - magic-string: 0.30.1 + magic-string: 0.30.2 rollup: 3.26.3 /@rollup/plugin-terser@0.4.3(rollup@3.26.3): @@ -2441,7 +2441,7 @@ packages: /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 dev: true /@types/eslint-scope@3.7.4: @@ -2473,13 +2473,13 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 18.17.0 + '@types/node': 18.17.1 dev: true /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 dev: true /@types/hash-sum@1.0.0: @@ -2489,7 +2489,7 @@ packages: /@types/http-proxy@1.17.11: resolution: {integrity: sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} @@ -2514,7 +2514,7 @@ packages: /@types/jsonfile@6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 dev: true /@types/lodash-es@4.17.8: @@ -2534,11 +2534,11 @@ packages: /@types/node-sass@4.11.3: resolution: {integrity: sha512-wXPCn3t9uu5rR4zXNSLasZHQMuRzUKBsdi4MsgT8uq4Lp1gQQo+T2G23tGj4SSgDHeNBle6vGseZtM2XV/X9bw==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 dev: true - /@types/node@18.17.0: - resolution: {integrity: sha512-GXZxEtOxYGFchyUzxvKI14iff9KZ2DI+A6a37o6EQevtg6uO9t+aUZKcaC1Te5Ng1OnLM7K9NVVj+FbecD9cJg==} + /@types/node@18.17.1: + resolution: {integrity: sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==} /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -2552,14 +2552,10 @@ packages: resolution: {integrity: sha512-UYcJBAqWLyg+eITXGIu9DR7RXJFvSupz+Hf+RqJYHzDJedvDMTsB1JmDV6Qfna2g62VIxUKvoWqTxGHy6U/bLA==} dev: true - /@types/prettier@2.7.2: - resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==} - dev: true - /@types/prompts@2.4.4: resolution: {integrity: sha512-p5N9uoTH76lLvSAaYSZtBCdEXzpOOufsRjnhjVSrZGXikVGHX9+cc9ERtHRV4hvBKHyZb1bg4K+56Bd2TqUn4A==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 kleur: 3.0.3 dev: true @@ -2573,7 +2569,7 @@ packages: /@types/sass-loader@8.0.5: resolution: {integrity: sha512-3b3lQ+UwWanaPBzOcP1YeNTR4q0Klt2UEezhdIjDXkTnQ93F+fnv+z1tMsQBAopY0b+c5ATN5pHQ+vfzxaRnFg==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 '@types/node-sass': 4.11.3 '@types/webpack': 4.41.33 sass: 1.62.1 @@ -2604,7 +2600,7 @@ packages: /@types/webpack-bundle-analyzer@4.6.0: resolution: {integrity: sha512-XeQmQCCXdZdap+A/60UKmxW5Mz31Vp9uieGlHB3T4z/o2OLVLtTI3bvTuS6A2OWd/rbAAQiGGWIEFQACu16szA==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 tapable: 2.2.1 webpack: 5.88.2 transitivePeerDependencies: @@ -2630,7 +2626,7 @@ packages: /@types/webpack-sources@3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -2644,7 +2640,7 @@ packages: /@types/webpack@4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.1 '@types/webpack-sources': 3.2.0 @@ -2660,7 +2656,7 @@ packages: dependencies: '@types/yargs-parser': 21.0.0 - /@typescript-eslint/eslint-plugin@5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.45.0)(typescript@5.1.6): + /@typescript-eslint/eslint-plugin@5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2671,13 +2667,13 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@eslint-community/regexpp': 4.6.2 + '@typescript-eslint/parser': 5.59.9(eslint@8.46.0)(typescript@5.1.6) '@typescript-eslint/scope-manager': 5.59.9 - '@typescript-eslint/type-utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) - '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 5.59.9(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.9(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.45.0 + eslint: 8.46.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -2688,7 +2684,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.59.9(eslint@8.45.0)(typescript@5.1.6): + /@typescript-eslint/parser@5.59.9(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2702,7 +2698,7 @@ packages: '@typescript-eslint/types': 5.59.9 '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) debug: 4.3.4 - eslint: 8.45.0 + eslint: 8.46.0 typescript: 5.1.6 transitivePeerDependencies: - supports-color @@ -2716,7 +2712,7 @@ packages: '@typescript-eslint/visitor-keys': 5.59.9 dev: true - /@typescript-eslint/type-utils@5.59.9(eslint@8.45.0)(typescript@5.1.6): + /@typescript-eslint/type-utils@5.59.9(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2727,9 +2723,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) - '@typescript-eslint/utils': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.59.9(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.45.0 + eslint: 8.46.0 tsutils: 3.21.0(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: @@ -2762,19 +2758,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.59.9(eslint@8.45.0)(typescript@5.1.6): + /@typescript-eslint/utils@5.59.9(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) '@types/json-schema': 7.0.11 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.59.9 '@typescript-eslint/types': 5.59.9 '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.1.6) - eslint: 8.45.0 + eslint: 8.46.0 eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: @@ -2787,44 +2783,44 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.59.9 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true - /@unhead/dom@1.1.32: - resolution: {integrity: sha512-AMpHlKEKcm1dxSAvm6GPXhjoZHzXh7ZeR8DAnXVH7Sd9a48xaJhQjmxETweFAcNBSnAn9e7TxTPZVrUcW0ej2w==} + /@unhead/dom@1.1.33: + resolution: {integrity: sha512-HKe8ppDQvFJeKkz4Hz8qmZHaEniChA3fooaE56/jW/ZQtmguU7xRU09PDm0VEV/08xiI3WRt93IYq+RtqrkzAw==} dependencies: - '@unhead/schema': 1.1.32 - '@unhead/shared': 1.1.32 + '@unhead/schema': 1.1.33 + '@unhead/shared': 1.1.33 dev: false - /@unhead/schema@1.1.32: - resolution: {integrity: sha512-XxrNazZEO9T+r1ORduy6gnKA9rDzRgxr/p5UEPRM+TZVuM8ZEFzYr2/aE5bMgTCXp20z0pjv/2rewpVSXp4pFQ==} + /@unhead/schema@1.1.33: + resolution: {integrity: sha512-QC73j5goOht4/sUQjADPM3Bg+WKHm5k+062Ns8tCrC8/YE10y7aeD33vpAF6z9BM4GCBODlDUlpOUuGfqovP5w==} dependencies: hookable: 5.5.3 - zhead: 2.0.9 + zhead: 2.0.10 - /@unhead/shared@1.1.32: - resolution: {integrity: sha512-oguyfbwbG4+wNphXQjQ3YrEe4NzabocpTQKNCKdTUPtpK9HYNiI+dffEoSiM3tWcwlG3iYrXj5WvREq3FoACWQ==} + /@unhead/shared@1.1.33: + resolution: {integrity: sha512-zEviDmj61MAFAMR3Ts4lHgnBFPmRaLhkwsS00l4K9nHOkghoj575cGImhzSJ863r0KDr3dVDCalgF8remhz9pg==} dependencies: - '@unhead/schema': 1.1.32 + '@unhead/schema': 1.1.33 dev: false - /@unhead/ssr@1.1.32: - resolution: {integrity: sha512-3DGh/EvHFuUx9k0M5CN5KmQHEaZMbrwtRlv2aQjicLqeeJGSI+okpRbaEu4A9WWwPmkR0u8FBnv1WCAPMcj3ZA==} + /@unhead/ssr@1.1.33: + resolution: {integrity: sha512-nboGQZ5X62HOZYcsdEFugLRYnz57XBoJv+7zyuH6qk8jB2ebzSnkz0cR3eawpcgIzEPi9tQ2Q3RfGuJ0m5KIhA==} dependencies: - '@unhead/schema': 1.1.32 - '@unhead/shared': 1.1.32 + '@unhead/schema': 1.1.33 + '@unhead/shared': 1.1.33 dev: false - /@unhead/vue@1.1.32(vue@3.3.4): - resolution: {integrity: sha512-rpQVxgI/crwlC+z8GnfPV6EwVN/kyeVSvEfzJO9VMIdrWMrh6vAV0WNv3v+BFd0bVLiRyNzhvbY76yhmAX4Zvw==} + /@unhead/vue@1.1.33(vue@3.3.4): + resolution: {integrity: sha512-cbq2k8RII9gDzpGC+CMaPezid6k8b8mV2KxhrtidnsHfK/ZmEaChrVCQ06C9xTtHMHfnNbCUn9vvQh96dHHF9A==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/schema': 1.1.32 - '@unhead/shared': 1.1.32 + '@unhead/schema': 1.1.33 + '@unhead/shared': 1.1.33 hookable: 5.5.3 - unhead: 1.1.32 + unhead: 1.1.33 vue: 3.3.4 dev: false @@ -2858,7 +2854,7 @@ packages: '@babel/core': 7.22.9 '@babel/plugin-transform-typescript': 7.21.0(@babel/core@7.22.9) '@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.22.9) - vite: 4.4.7(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) vue: 3.3.4 transitivePeerDependencies: - supports-color @@ -2870,7 +2866,7 @@ packages: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.4.7(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) vue: 3.3.4 /@vitest/expect@0.33.0: @@ -2892,9 +2888,9 @@ packages: /@vitest/snapshot@0.33.0: resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==} dependencies: - magic-string: 0.30.1 + magic-string: 0.30.2 pathe: 1.1.1 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true /@vitest/spy@0.33.0: @@ -2923,23 +2919,23 @@ packages: dependencies: diff-sequences: 29.4.3 loupe: 2.3.6 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true - /@volar/language-core@1.9.0: - resolution: {integrity: sha512-+PTRrGanAD2PxqMty0ZC46xhgW5BWzb67RLHhZyB3Im4+eMXsKlYjFUt7Z8ZCwTWQQOnj8NQ6gSgUEoOTwAHrQ==} + /@volar/language-core@1.10.0: + resolution: {integrity: sha512-ddyWwSYqcbEZNFHm+Z3NZd6M7Ihjcwl/9B5cZd8kECdimVXUFdFi60XHWD27nrWtUQIsUYIG7Ca1WBwV2u2LSQ==} dependencies: - '@volar/source-map': 1.9.0 + '@volar/source-map': 1.10.0 - /@volar/source-map@1.9.0: - resolution: {integrity: sha512-TQWLY8ozUOHBHTMC2pHZsNbtM25Q9QCEwAL8JFR/gmR9Yv0d9qup/gQdd5sDI7RmoPYKD+gqjLrbM4Ib41QSJQ==} + /@volar/source-map@1.10.0: + resolution: {integrity: sha512-/ibWdcOzDGiq/GM1JU2eX8fH1bvAhl66hfe8yEgLEzg9txgr6qb5sQ/DEz5PcDL75tF5H5sCRRwn8Eu8ezi9mw==} dependencies: muggle-string: 0.3.1 - /@volar/typescript@1.9.0: - resolution: {integrity: sha512-B8X4/H6V93uD7zu5VCw05eB0Ukcc39SFKsZoeylkAk2sJ50oaJLpajnQ8Ov4c+FnVQ6iPA6Xy1qdWoWJjh6xEg==} + /@volar/typescript@1.10.0: + resolution: {integrity: sha512-OtqGtFbUKYC0pLNIk3mHQp5xWnvL1CJIUc9VE39VdZ/oqpoBh5jKfb9uJ45Y4/oP/WYTrif/Uxl1k8VTPz66Gg==} dependencies: - '@volar/language-core': 1.9.0 + '@volar/language-core': 1.10.0 /@vue-macros/common@1.3.1(rollup@3.26.3)(vue@3.3.4): resolution: {integrity: sha512-Lc5aP/8HNJD1XrnvpeNuWcCf82bZdR3auN/chA1b/1rKZgSnmQkH9f33tKO9qLwXSy+u4hpCi8Rw+oUuF1KCeg==} @@ -3003,7 +2999,7 @@ packages: '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.1 + magic-string: 0.30.2 postcss: 8.4.27 source-map-js: 1.0.2 @@ -3016,16 +3012,16 @@ packages: /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} - /@vue/language-core@1.8.6(typescript@5.1.6): - resolution: {integrity: sha512-PyYDMArbR7hnhqw9OEupr0s4ut0/ZfITp7WEjigF58cd2R0lRLNM1HPvzFMuULpy3ImBEOZI11KRIDirqOe+tQ==} + /@vue/language-core@1.8.8(typescript@5.1.6): + resolution: {integrity: sha512-i4KMTuPazf48yMdYoebTkgSOJdFraE4pQf0B+FTOFkbB+6hAfjrSou/UmYWRsWyZV6r4Rc6DDZdI39CJwL0rWw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@volar/language-core': 1.9.0 - '@volar/source-map': 1.9.0 + '@volar/language-core': 1.10.0 + '@volar/source-map': 1.10.0 '@vue/compiler-dom': 3.3.4 '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 @@ -3041,7 +3037,7 @@ packages: '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.1 + magic-string: 0.30.2 /@vue/reactivity@3.3.4: resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} @@ -3090,11 +3086,11 @@ packages: vue-component-type-helpers: 1.6.5 dev: true - /@vue/typescript@1.8.6(typescript@5.1.6): - resolution: {integrity: sha512-sDQ5tltrSVS3lAkE3JtMRGJo91CLIxcWPy7yms/DT+ssxXpwxbVRD5Gok68HenEZBA4Klq7nW99sG/nTRnpPuQ==} + /@vue/typescript@1.8.8(typescript@5.1.6): + resolution: {integrity: sha512-jUnmMB6egu5wl342eaUH236v8tdcEPXXkPgj+eI/F6JwW/lb+yAU6U07ZbQ3MVabZRlupIlPESB7ajgAGixhow==} dependencies: - '@volar/typescript': 1.9.0 - '@vue/language-core': 1.8.6(typescript@5.1.6) + '@volar/typescript': 1.10.0 + '@vue/language-core': 1.8.8(typescript@5.1.6) transitivePeerDependencies: - typescript @@ -3412,6 +3408,17 @@ packages: engines: {node: '>=8'} dev: true + /array.prototype.findlastindex@1.2.2: + resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.2.1 + dev: true + /array.prototype.flat@1.3.1: resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} @@ -3724,7 +3731,7 @@ packages: colorette: 2.0.20 consola: 3.2.3 convert-gitmoji: 0.1.3 - execa: 7.1.1 + execa: 7.2.0 mri: 1.2.0 node-fetch-native: 1.2.0 ofetch: 1.1.1 @@ -4039,7 +4046,7 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.18 cssnano: 6.0.1(postcss@8.4.27) - jest-worker: 29.6.1 + jest-worker: 29.6.2 postcss: 8.4.27 schema-utils: 4.0.1 serialize-javascript: 6.0.1 @@ -4232,7 +4239,7 @@ packages: dependencies: bundle-name: 3.0.0 default-browser-id: 3.0.0 - execa: 7.1.1 + execa: 7.2.0 titleize: 3.0.0 dev: true @@ -4541,34 +4548,34 @@ packages: '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 - /esbuild@0.18.16: - resolution: {integrity: sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==} + /esbuild@0.18.17: + resolution: {integrity: sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.16 - '@esbuild/android-arm64': 0.18.16 - '@esbuild/android-x64': 0.18.16 - '@esbuild/darwin-arm64': 0.18.16 - '@esbuild/darwin-x64': 0.18.16 - '@esbuild/freebsd-arm64': 0.18.16 - '@esbuild/freebsd-x64': 0.18.16 - '@esbuild/linux-arm': 0.18.16 - '@esbuild/linux-arm64': 0.18.16 - '@esbuild/linux-ia32': 0.18.16 - '@esbuild/linux-loong64': 0.18.16 - '@esbuild/linux-mips64el': 0.18.16 - '@esbuild/linux-ppc64': 0.18.16 - '@esbuild/linux-riscv64': 0.18.16 - '@esbuild/linux-s390x': 0.18.16 - '@esbuild/linux-x64': 0.18.16 - '@esbuild/netbsd-x64': 0.18.16 - '@esbuild/openbsd-x64': 0.18.16 - '@esbuild/sunos-x64': 0.18.16 - '@esbuild/win32-arm64': 0.18.16 - '@esbuild/win32-ia32': 0.18.16 - '@esbuild/win32-x64': 0.18.16 + '@esbuild/android-arm': 0.18.17 + '@esbuild/android-arm64': 0.18.17 + '@esbuild/android-x64': 0.18.17 + '@esbuild/darwin-arm64': 0.18.17 + '@esbuild/darwin-x64': 0.18.17 + '@esbuild/freebsd-arm64': 0.18.17 + '@esbuild/freebsd-x64': 0.18.17 + '@esbuild/linux-arm': 0.18.17 + '@esbuild/linux-arm64': 0.18.17 + '@esbuild/linux-ia32': 0.18.17 + '@esbuild/linux-loong64': 0.18.17 + '@esbuild/linux-mips64el': 0.18.17 + '@esbuild/linux-ppc64': 0.18.17 + '@esbuild/linux-riscv64': 0.18.17 + '@esbuild/linux-s390x': 0.18.17 + '@esbuild/linux-x64': 0.18.17 + '@esbuild/netbsd-x64': 0.18.17 + '@esbuild/openbsd-x64': 0.18.17 + '@esbuild/sunos-x64': 0.18.17 + '@esbuild/win32-arm64': 0.18.17 + '@esbuild/win32-ia32': 0.18.17 + '@esbuild/win32-x64': 0.18.17 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -4594,7 +4601,7 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - /eslint-config-standard@17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.45.0): + /eslint-config-standard@17.0.0(eslint-plugin-import@2.28.0)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.46.0): resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -4602,10 +4609,10 @@ packages: eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.45.0 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-n: 15.7.0(eslint@8.45.0) - eslint-plugin-promise: 6.1.1(eslint@8.45.0) + eslint: 8.46.0 + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-n: 15.7.0(eslint@8.46.0) + eslint-plugin-promise: 6.1.1(eslint@8.46.0) dev: true /eslint-import-resolver-node@0.3.7: @@ -4618,7 +4625,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.27.5)(eslint@8.45.0): + /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.28.0)(eslint@8.46.0): resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -4627,9 +4634,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.15.0 - eslint: 8.45.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + eslint: 8.46.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) get-tsconfig: 4.5.0 globby: 13.2.2 is-core-module: 2.12.1 @@ -4642,7 +4649,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -4663,39 +4670,39 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.9(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7 - eslint: 8.45.0 + eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.27.5)(eslint@8.45.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.9)(eslint-plugin-import@2.28.0)(eslint@8.46.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es@3.0.1(eslint@8.45.0): + /eslint-plugin-es@3.0.1(eslint@8.46.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-es@4.1.0(eslint@8.45.0): + /eslint-plugin-es@4.1.0(eslint@8.46.0): resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} + /eslint-plugin-import@2.28.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0): + resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -4704,21 +4711,24 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.9(eslint@8.45.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.59.9(eslint@8.46.0)(typescript@5.1.6) array-includes: 3.1.6 + array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.9)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.46.0) has: 1.0.3 is-core-module: 2.12.1 is-glob: 4.0.3 minimatch: 3.1.2 + object.fromentries: 2.0.6 + object.groupby: 1.0.0 object.values: 1.1.6 - resolve: 1.22.2 + resolve: 1.22.3 semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: @@ -4727,7 +4737,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@41.1.2(eslint@8.45.0): + /eslint-plugin-jsdoc@41.1.2(eslint@8.46.0): resolution: {integrity: sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} peerDependencies: @@ -4738,7 +4748,7 @@ packages: comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.45.0 + eslint: 8.46.0 esquery: 1.5.0 semver: 7.5.4 spdx-expression-parse: 3.0.1 @@ -4746,16 +4756,16 @@ packages: - supports-color dev: true - /eslint-plugin-n@15.7.0(eslint@8.45.0): + /eslint-plugin-n@15.7.0(eslint@8.46.0): resolution: {integrity: sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: builtins: 5.0.1 - eslint: 8.45.0 - eslint-plugin-es: 4.1.0(eslint@8.45.0) - eslint-utils: 3.0.0(eslint@8.45.0) + eslint: 8.46.0 + eslint-plugin-es: 4.1.0(eslint@8.46.0) + eslint-utils: 3.0.0(eslint@8.46.0) ignore: 5.2.4 is-core-module: 2.12.1 minimatch: 3.1.2 @@ -4768,14 +4778,14 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-node@11.1.0(eslint@8.45.0): + /eslint-plugin-node@11.1.0(eslint@8.46.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.45.0 - eslint-plugin-es: 3.0.1(eslint@8.45.0) + eslint: 8.46.0 + eslint-plugin-es: 3.0.1(eslint@8.46.0) eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -4783,16 +4793,16 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-promise@6.1.1(eslint@8.45.0): + /eslint-plugin-promise@6.1.1(eslint@8.46.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true - /eslint-plugin-unicorn@44.0.2(eslint@8.45.0): + /eslint-plugin-unicorn@44.0.2(eslint@8.46.0): resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==} engines: {node: '>=14.18'} peerDependencies: @@ -4801,8 +4811,8 @@ packages: '@babel/helper-validator-identifier': 7.22.5 ci-info: 3.8.0 clean-regexp: 1.0.0 - eslint: 8.45.0 - eslint-utils: 3.0.0(eslint@8.45.0) + eslint: 8.46.0 + eslint-utils: 3.0.0(eslint@8.46.0) esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -4815,19 +4825,19 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-vue@9.14.0(eslint@8.45.0): + /eslint-plugin-vue@9.14.0(eslint@8.46.0): resolution: {integrity: sha512-4O7EuiqPGVQA1wYCzLvCzsBTv9JIPHLHhrf0k55DLzbwtmJbSw2TKS0G/l7pOwi9RWMSkjIT7ftChU5gZpgnJw==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - eslint: 8.45.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + eslint: 8.46.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.13 semver: 7.5.4 - vue-eslint-parser: 9.3.1(eslint@8.45.0) + vue-eslint-parser: 9.3.1(eslint@8.46.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -4840,8 +4850,8 @@ packages: esrecurse: 4.3.0 estraverse: 4.3.0 - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 @@ -4854,13 +4864,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.45.0): + /eslint-utils@3.0.0(eslint@8.46.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4874,19 +4884,19 @@ packages: engines: {node: '>=10'} dev: true - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + /eslint-visitor-keys@3.4.2: + resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /eslint@8.45.0: - resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} + /eslint@8.46.0: + resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.44.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.1 + '@eslint/js': 8.46.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -4896,9 +4906,9 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.6.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 + espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -4923,13 +4933,13 @@ packages: transitivePeerDependencies: - supports-color - /espree@9.6.0: - resolution: {integrity: sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -4994,8 +5004,8 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - /execa@7.1.1: - resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==} + /execa@7.2.0: + resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} dependencies: cross-spawn: 7.0.3 @@ -5008,16 +5018,16 @@ packages: signal-exit: 3.0.7 strip-final-newline: 3.0.0 - /expect@29.6.1: - resolution: {integrity: sha512-XEdDLonERCU1n9uR56/Stx9OqojaLAQtZf9PrCHH9Hl8YXiEIka3H4NXJ3NOIBmQJTg7+j7buh34PMHfJujc8g==} + /expect@29.6.2: + resolution: {integrity: sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.6.1 - '@types/node': 18.17.0 + '@jest/expect-utils': 29.6.2 + '@types/node': 18.17.1 jest-get-type: 29.4.3 - jest-matcher-utils: 29.6.1 - jest-message-util: 29.6.1 - jest-util: 29.6.1 + jest-matcher-utils: 29.6.2 + jest-message-util: 29.6.2 + jest-util: 29.6.2 dev: true /externality@1.0.2: @@ -5926,14 +5936,14 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true - /jest-diff@29.6.1: - resolution: {integrity: sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==} + /jest-diff@29.6.2: + resolution: {integrity: sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 diff-sequences: 29.4.3 jest-get-type: 29.4.3 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true /jest-get-type@29.4.3: @@ -5941,37 +5951,37 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-haste-map@29.6.1: - resolution: {integrity: sha512-0m7f9PZXxOCk1gRACiVgX85knUKPKLPg4oRCjLoqIm9brTHXaorMA0JpmtmVkQiT8nmXyIVoZd/nnH1cfC33ig==} + /jest-haste-map@29.6.2: + resolution: {integrity: sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 '@types/graceful-fs': 4.1.6 - '@types/node': 18.17.0 + '@types/node': 18.17.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 jest-regex-util: 29.4.3 - jest-util: 29.6.1 - jest-worker: 29.6.1 + jest-util: 29.6.2 + jest-worker: 29.6.2 micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: fsevents: 2.3.2 dev: true - /jest-matcher-utils@29.6.1: - resolution: {integrity: sha512-SLaztw9d2mfQQKHmJXKM0HCbl2PPVld/t9Xa6P9sgiExijviSp7TnZZpw2Fpt+OI3nwUO/slJbOfzfUMKKC5QA==} + /jest-matcher-utils@29.6.2: + resolution: {integrity: sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.6.1 + jest-diff: 29.6.2 jest-get-type: 29.4.3 - pretty-format: 29.6.1 + pretty-format: 29.6.2 dev: true - /jest-message-util@29.6.1: - resolution: {integrity: sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==} + /jest-message-util@29.6.2: + resolution: {integrity: sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/code-frame': 7.22.5 @@ -5980,18 +5990,18 @@ packages: chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.6.1 + pretty-format: 29.6.2 slash: 3.0.0 stack-utils: 2.0.6 dev: true - /jest-mock@29.6.1: - resolution: {integrity: sha512-brovyV9HBkjXAEdRooaTQK42n8usKoSRR3gihzUpYeV/vwqgSoNfrksO7UfSACnPmxasO/8TmHM3w9Hp3G1dgw==} + /jest-mock@29.6.2: + resolution: {integrity: sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 - '@types/node': 18.17.0 - jest-util: 29.6.1 + '@types/node': 18.17.1 + jest-util: 29.6.2 dev: true /jest-regex-util@29.4.3: @@ -5999,8 +6009,8 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-snapshot@29.6.1: - resolution: {integrity: sha512-G4UQE1QQ6OaCgfY+A0uR1W2AY0tGXUPQpoUClhWHq1Xdnx1H6JOrC2nH5lqnOEqaDgbHFgIwZ7bNq24HpB180A==} + /jest-snapshot@29.6.2: + resolution: {integrity: sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/core': 7.22.9 @@ -6008,32 +6018,31 @@ packages: '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.22.9) '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.9) '@babel/types': 7.22.5 - '@jest/expect-utils': 29.6.1 - '@jest/transform': 29.6.1 + '@jest/expect-utils': 29.6.2 + '@jest/transform': 29.6.2 '@jest/types': 29.6.1 - '@types/prettier': 2.7.2 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.9) chalk: 4.1.2 - expect: 29.6.1 + expect: 29.6.2 graceful-fs: 4.2.11 - jest-diff: 29.6.1 + jest-diff: 29.6.2 jest-get-type: 29.4.3 - jest-matcher-utils: 29.6.1 - jest-message-util: 29.6.1 - jest-util: 29.6.1 + jest-matcher-utils: 29.6.2 + jest-message-util: 29.6.2 + jest-util: 29.6.2 natural-compare: 1.4.0 - pretty-format: 29.6.1 + pretty-format: 29.6.2 semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true - /jest-util@29.6.1: - resolution: {integrity: sha512-NRFCcjc+/uO3ijUVyNOQJluf8PtGCe/W6cix36+M3cTFgiYqFOOW5MgN4JOOcvbUhcKTYVd1CvHz/LWi8d16Mg==} + /jest-util@29.6.2: + resolution: {integrity: sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.1 - '@types/node': 18.17.0 + '@types/node': 18.17.1 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -6043,16 +6052,16 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.17.0 + '@types/node': 18.17.1 merge-stream: 2.0.0 supports-color: 8.1.1 - /jest-worker@29.6.1: - resolution: {integrity: sha512-U+Wrbca7S8ZAxAe9L6nb6g8kPdia5hj32Puu5iOqBCMTMWFHXuK6dOV2IFrpedbTV8fjMFLdWNttQTBL6u2MRA==} + /jest-worker@29.6.2: + resolution: {integrity: sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.17.0 - jest-util: 29.6.1 + '@types/node': 18.17.1 + jest-util: 29.6.2 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -6339,11 +6348,11 @@ packages: resolution: {integrity: sha512-P53AZrzq7hclCU6HWj88xNZHmP15DKjMmK/vBytO1qnpYP3ul4IEZlyCE0aU3JRnmgWmZPmoTKj4Bls7v0pMyA==} engines: {node: '>=14.19.0'} dependencies: - magic-string: 0.30.1 + magic-string: 0.30.2 dev: false - /magic-string@0.30.1: - resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} + /magic-string@0.30.2: + resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -6564,7 +6573,7 @@ packages: dependencies: citty: 0.1.2 defu: 6.1.2 - esbuild: 0.18.16 + esbuild: 0.18.17 fs-extra: 11.1.1 globby: 13.2.2 jiti: 1.19.1 @@ -6650,7 +6659,7 @@ packages: defu: 6.1.2 destr: 2.0.0 dot-prop: 7.2.0 - esbuild: 0.18.16 + esbuild: 0.18.17 escape-string-regexp: 5.0.0 etag: 1.8.1 fs-extra: 11.1.1 @@ -6665,7 +6674,7 @@ packages: klona: 2.0.6 knitwork: 1.0.0 listhen: 1.1.2 - magic-string: 0.30.1 + magic-string: 0.30.2 mime: 3.0.0 mlly: 1.4.0 mri: 1.2.0 @@ -6828,7 +6837,7 @@ packages: get-port-please: 3.0.1 perfect-debounce: 1.0.0 std-env: 3.3.3 - vite: 4.4.7(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) vitest: 0.33.0(happy-dom@10.5.2) vitest-environment-nuxt: 0.10.2(happy-dom@10.5.2)(vitest@0.33.0)(vue-router@4.2.4)(vue@3.3.4) transitivePeerDependencies: @@ -6844,7 +6853,7 @@ packages: resolution: {integrity: sha512-O7bumfWgUXlJefT1Y41SF4vsCvzeUYmnKABuOKStheCObzrkWPDmqJc+RJVU+57oFu9bITcrUq8sKFIHgjCnTg==} engines: {node: ^14.16.0 || >=16.10.0} dependencies: - execa: 7.1.1 + execa: 7.2.0 dev: false /object-assign@4.1.1: @@ -6870,6 +6879,24 @@ packages: object-keys: 1.1.1 dev: true + /object.fromentries@2.0.6: + resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + dev: true + + /object.groupby@1.0.0: + resolution: {integrity: sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + get-intrinsic: 1.2.1 + dev: true + /object.values@1.1.6: resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} @@ -7114,8 +7141,8 @@ packages: mlly: 1.4.0 pathe: 1.1.1 - /playwright-core@1.36.1: - resolution: {integrity: sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg==} + /playwright-core@1.36.2: + resolution: {integrity: sha512-sQYZt31dwkqxOrP7xy2ggDfEzUxM1lodjhsQ3NMMv5uGTRDsLxU0e4xf4wwMkF2gplIxf17QMBCodSFgm6bFVQ==} engines: {node: '>=16'} hasBin: true dev: true @@ -7520,8 +7547,8 @@ packages: resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} - /pretty-format@29.6.1: - resolution: {integrity: sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==} + /pretty-format@29.6.2: + resolution: {integrity: sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/schemas': 29.6.0 @@ -7816,6 +7843,15 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + /resolve@1.22.3: + resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} + hasBin: true + dependencies: + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -7841,7 +7877,7 @@ packages: rollup: ^3.0.0 typescript: ^4.1 || ^5.0 dependencies: - magic-string: 0.30.1 + magic-string: 0.30.2 rollup: 3.26.3 typescript: 5.1.6 optionalDependencies: @@ -8580,7 +8616,7 @@ packages: globby: 13.2.2 hookable: 5.5.3 jiti: 1.19.1 - magic-string: 0.30.1 + magic-string: 0.30.2 mkdist: 1.3.0(typescript@5.1.6) mlly: 1.4.0 mri: 1.2.0 @@ -8605,7 +8641,7 @@ packages: dependencies: acorn: 8.10.0 estree-walker: 3.0.3 - magic-string: 0.30.1 + magic-string: 0.30.2 unplugin: 1.4.0 /undici@5.22.1: @@ -8623,12 +8659,12 @@ packages: node-fetch-native: 1.2.0 pathe: 1.1.1 - /unhead@1.1.32: - resolution: {integrity: sha512-WO1NTmljMZZzZjzmkcgZpYKpbEGGB3HC+2DIJxAZd0++WCPT9jD6o0MIgpA71UvueOCqLhIlyfGsa9Hgn0Gnog==} + /unhead@1.1.33: + resolution: {integrity: sha512-Qm94ySKOPwoXubGkdkeuLr9FcCv706PSL+GEApOcupBIf8M9kkmmYmRT5dCAoQcoUJDrvpeynTxiRkfA1jNRkA==} dependencies: - '@unhead/dom': 1.1.32 - '@unhead/schema': 1.1.32 - '@unhead/shared': 1.1.32 + '@unhead/dom': 1.1.33 + '@unhead/schema': 1.1.33 + '@unhead/shared': 1.1.33 hookable: 5.5.3 dev: false @@ -8639,7 +8675,7 @@ packages: escape-string-regexp: 5.0.0 fast-glob: 3.3.1 local-pkg: 0.4.3 - magic-string: 0.30.1 + magic-string: 0.30.2 mlly: 1.4.0 pathe: 1.1.1 pkg-types: 1.0.3 @@ -8800,7 +8836,7 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@0.33.0(@types/node@18.17.0): + /vite-node@0.33.0(@types/node@18.17.1): resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==} engines: {node: '>=v14.18.0'} hasBin: true @@ -8810,7 +8846,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.7(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) transitivePeerDependencies: - '@types/node' - less @@ -8821,7 +8857,7 @@ packages: - supports-color - terser - /vite-plugin-checker@0.6.1(eslint@8.45.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.6): + /vite-plugin-checker@0.6.1(eslint@8.46.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.8): resolution: {integrity: sha512-4fAiu3W/IwRJuJkkUZlWbLunSzsvijDf0eDN6g/MGh6BUK4SMclOTGbLJCPvdAcMOQvVmm8JyJeYLYd4//8CkA==} engines: {node: '>=14.16'} peerDependencies: @@ -8857,7 +8893,7 @@ packages: chalk: 4.1.2 chokidar: 3.5.3 commander: 8.3.0 - eslint: 8.45.0 + eslint: 8.46.0 fast-glob: 3.3.1 fs-extra: 11.1.1 lodash.debounce: 4.0.8 @@ -8867,15 +8903,15 @@ packages: strip-ansi: 6.0.1 tiny-invariant: 1.3.1 typescript: 5.1.6 - vite: 4.4.7(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.8 vscode-uri: 3.0.7 - vue-tsc: 1.8.6(typescript@5.1.6) + vue-tsc: 1.8.8(typescript@5.1.6) dev: false - /vite@4.4.7(@types/node@18.17.0): + /vite@4.4.7(@types/node@18.17.1): resolution: {integrity: sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -8903,8 +8939,8 @@ packages: terser: optional: true dependencies: - '@types/node': 18.17.0 - esbuild: 0.18.16 + '@types/node': 18.17.1 + esbuild: 0.18.17 postcss: 8.4.27 rollup: 3.26.3 optionalDependencies: @@ -8930,7 +8966,7 @@ packages: estree-walker: 3.0.3 h3: 1.7.1 happy-dom: 10.5.2 - magic-string: 0.30.1 + magic-string: 0.30.2 ofetch: 1.1.1 unenv: 1.5.2 vitest: 0.33.0(happy-dom@10.5.2) @@ -8975,7 +9011,7 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 18.17.0 + '@types/node': 18.17.1 '@vitest/expect': 0.33.0 '@vitest/runner': 0.33.0 '@vitest/snapshot': 0.33.0 @@ -8988,15 +9024,15 @@ packages: debug: 4.3.4 happy-dom: 10.5.2 local-pkg: 0.4.3 - magic-string: 0.30.1 + magic-string: 0.30.2 pathe: 1.1.1 picocolors: 1.0.0 std-env: 3.3.3 strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.6.0 - vite: 4.4.7(@types/node@18.17.0) - vite-node: 0.33.0(@types/node@18.17.0) + vite: 4.4.7(@types/node@18.17.1) + vite-node: 0.33.0(@types/node@18.17.1) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -9066,17 +9102,17 @@ packages: resolution: {integrity: sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==} dev: false - /vue-eslint-parser@9.3.1(eslint@8.45.0): + /vue-eslint-parser@9.3.1(eslint@8.46.0): resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.45.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.6.0 + eslint: 8.46.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 + espree: 9.6.1 esquery: 1.5.0 lodash: 4.17.21 semver: 7.5.4 @@ -9116,14 +9152,14 @@ packages: de-indent: 1.0.2 he: 1.2.0 - /vue-tsc@1.8.6(typescript@5.1.6): - resolution: {integrity: sha512-8ffD4NGfwyATjw/s40Lw2EgB7L2/PAqnGlJBaVQLgblr3SU4EYdhJ67TNXXuDD8NMbDAFSM24V8i3ZIJgTs32Q==} + /vue-tsc@1.8.8(typescript@5.1.6): + resolution: {integrity: sha512-bSydNFQsF7AMvwWsRXD7cBIXaNs/KSjvzWLymq/UtKE36697sboX4EccSHFVxvgdBlI1frYPc/VMKJNB7DFeDQ==} hasBin: true peerDependencies: typescript: '*' dependencies: - '@vue/language-core': 1.8.6(typescript@5.1.6) - '@vue/typescript': 1.8.6(typescript@5.1.6) + '@vue/language-core': 1.8.8(typescript@5.1.6) + '@vue/typescript': 1.8.8(typescript@5.1.6) semver: 7.5.4 typescript: 5.1.6 @@ -9445,8 +9481,8 @@ packages: engines: {node: '>=12.20'} dev: true - /zhead@2.0.9: - resolution: {integrity: sha512-Y3g6EegQc6PVrYXPq2OS7/s27UGVS5Y6NY6SY3XGH4Hg+yQWbQTtWsjCgmpR8kZnYrv8auB54sz+x5FEDrvqzQ==} + /zhead@2.0.10: + resolution: {integrity: sha512-irug8fXNKjqazkA27cFQs7C6/ZD3qNiEzLC56kDyzQART/Z9GMGfg8h2i6fb9c8ZWnIx/QgOgFJxK3A/CYHG0g==} /zip-stream@4.1.0: resolution: {integrity: sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==} diff --git a/test/bundle.test.ts b/test/bundle.test.ts index ad59f13d56..20cad7138d 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM for (const outputDir of ['.output', '.output-inline']) { it('default client bundle size', async () => { const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public')) - expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.4k"') + expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.5k"') expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(` [ "_nuxt/entry.js", From a2b5d312709666e94efc345ef38329b0680310b1 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 30 Jul 2023 17:14:42 +0100 Subject: [PATCH 20/57] perf(nuxt): write templates in single sync step + improve logs (#22384) --- packages/kit/src/internal/template.ts | 1 + packages/nuxt/src/core/app.ts | 31 +++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packages/kit/src/internal/template.ts b/packages/kit/src/internal/template.ts index 00feb2bdae..8672429638 100644 --- a/packages/kit/src/internal/template.ts +++ b/packages/kit/src/internal/template.ts @@ -6,6 +6,7 @@ import { genDynamicImport, genImport, genSafeVariableName } from 'knitwork' import type { NuxtTemplate } from '@nuxt/schema' /** @deprecated */ +// TODO: Remove support for compiling ejs templates in v4 export async function compileTemplate (template: NuxtTemplate, ctx: any) { const data = { ...ctx, options: template.options } if (template.src) { diff --git a/packages/nuxt/src/core/app.ts b/packages/nuxt/src/core/app.ts index 565e5e2959..523f1d7d5a 100644 --- a/packages/nuxt/src/core/app.ts +++ b/packages/nuxt/src/core/app.ts @@ -1,4 +1,4 @@ -import { promises as fsp } from 'node:fs' +import { promises as fsp, mkdirSync, writeFileSync } from 'node:fs' import { dirname, join, resolve } from 'pathe' import { defu } from 'defu' import { compileTemplate, findPath, normalizePlugin, normalizeTemplate, resolveAlias, resolveFiles, resolvePath, templateUtils, tryResolveModule } from '@nuxt/kit' @@ -32,15 +32,21 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?: app.templates = app.templates.map(tmpl => normalizeTemplate(tmpl)) // Compile templates into vfs + // TODO: remove utils in v4 const templateContext = { utils: templateUtils, nuxt, app } const filteredTemplates = (app.templates as Array>) .filter(template => !options.filter || options.filter(template)) - await Promise.all(filteredTemplates + const writes: Array<() => void> = [] + await Promise.allSettled(filteredTemplates .map(async (template) => { - const contents = await compileTemplate(template, templateContext) - const fullPath = template.dst || resolve(nuxt.options.buildDir, template.filename!) + const mark = performance.mark(fullPath) + const contents = await compileTemplate(template, templateContext).catch((e) => { + console.error(`[nuxt] Could not compile template \`${template.filename}\`.`) + throw e + }) + nuxt.vfs[fullPath] = contents const aliasPath = '#build/' + template.filename!.replace(/\.\w+$/, '') @@ -51,12 +57,25 @@ export async function generateApp (nuxt: Nuxt, app: NuxtApp, options: { filter?: nuxt.vfs[fullPath.replace(/\//g, '\\')] = contents } + const perf = performance.measure(fullPath, mark?.name) // TODO: remove when Node 14 reaches EOL + const setupTime = perf ? Math.round((perf.duration * 100)) / 100 : 0 // TODO: remove when Node 14 reaches EOL + + if (nuxt.options.debug || setupTime > 500) { + console.info(`[nuxt] compiled \`${template.filename}\` in ${setupTime}ms`) + } + if (template.write) { - await fsp.mkdir(dirname(fullPath), { recursive: true }) - await fsp.writeFile(fullPath, contents, 'utf8') + writes.push(() => { + mkdirSync(dirname(fullPath), { recursive: true }) + writeFileSync(fullPath, contents, 'utf8') + }) } })) + // Write template files in single synchronous step to avoid (possible) additional + // runtime overhead of cascading HMRs from vite/webpack + for (const write of writes) { write() } + await nuxt.callHook('app:templatesGenerated', app, filteredTemplates, options) } From 9b09b4d1127e3bbdbd5d97edd2309ad7f40463f9 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Sun, 30 Jul 2023 21:46:16 +0300 Subject: [PATCH 21/57] feat(nuxt): render all head tags on server with `unhead` (#22179) --- packages/nuxt/src/app/nuxt.ts | 12 +- packages/nuxt/src/core/nitro.ts | 8 - .../nuxt/src/core/runtime/nitro/renderer.ts | 208 +++++++++++------- .../nuxt/src/head/runtime/plugins/unhead.ts | 23 +- test/bundle.test.ts | 4 +- 5 files changed, 132 insertions(+), 123 deletions(-) diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index fe8aed8f05..2c0bf250fc 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -10,6 +10,7 @@ import type { H3Event } from 'h3' import type { AppConfig, AppConfigInput, RuntimeConfig } from 'nuxt/schema' import type { RenderResponse } from 'nitropack' +import type { MergeHead, VueHeadClient } from '@unhead/vue' // eslint-disable-next-line import/no-restricted-paths import type { NuxtIslandContext } from '../core/runtime/nitro/renderer' import type { RouteMiddleware } from '../../app' @@ -18,15 +19,6 @@ import type { AsyncDataRequestStatus } from '../app/composables/asyncData' const nuxtAppCtx = /* #__PURE__ */ getContext('nuxt-app') -type NuxtMeta = { - htmlAttrs?: string - headAttrs?: string - bodyAttrs?: string - headTags?: string - bodyScriptsPrepend?: string - bodyScripts?: string -} - type HookResult = Promise | void type AppRenderedContext = { ssrContext: NuxtApp['ssrContext'], renderResult: null | Awaited['renderToString']>> } @@ -59,10 +51,10 @@ export interface NuxtSSRContext extends SSRContext { error?: boolean nuxt: _NuxtApp payload: NuxtPayload + head: VueHeadClient /** This is used solely to render runtime config with SPA renderer. */ config?: Pick teleports?: Record - renderMeta?: () => Promise | NuxtMeta islandContext?: NuxtIslandContext /** @internal */ _renderResponse?: Partial diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 812d92c3ef..50176f5e5f 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -8,8 +8,6 @@ import escapeRE from 'escape-string-regexp' import { defu } from 'defu' import fsExtra from 'fs-extra' import { dynamicEventHandler } from 'h3' -import { createHeadCore } from '@unhead/vue' -import { renderSSRHead } from '@unhead/ssr' import type { Nuxt } from 'nuxt/schema' // @ts-expect-error TODO: add legacy type support for subpath imports import { template as defaultSpaLoadingTemplate } from '@nuxt/ui-templates/templates/spa-loading-icon.mjs' @@ -205,12 +203,6 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { // Resolve user-provided paths nitroConfig.srcDir = resolve(nuxt.options.rootDir, nuxt.options.srcDir, nitroConfig.srcDir!) - // Add head chunk for SPA renders - const head = createHeadCore() - head.push(nuxt.options.app.head) - const headChunk = await renderSSRHead(head) - nitroConfig.virtual!['#head-static'] = `export default ${JSON.stringify(headChunk)}` - // Add fallback server for `ssr: false` if (!nuxt.options.ssr) { nitroConfig.virtual!['#build/dist/server/server.mjs'] = 'export default () => {}' diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index 840e01281a..da2e70764d 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -1,4 +1,10 @@ -import { createRenderer, renderResourceHeaders } from 'vue-bundle-renderer/runtime' +import { + createRenderer, + getPrefetchLinks, + getPreloadLinks, + getRequestDependencies, + renderResourceHeaders +} from 'vue-bundle-renderer/runtime' import type { RenderResponse } from 'nitropack' import type { Manifest } from 'vite' import type { H3Event } from 'h3' @@ -9,14 +15,17 @@ import destr from 'destr' import { joinURL, withoutTrailingSlash } from 'ufo' import { renderToString as _renderToString } from 'vue/server-renderer' import { hash } from 'ohash' +import { renderSSRHead } from '@unhead/ssr' import { defineRenderHandler, getRouteRules, useRuntimeConfig } from '#internal/nitro' import { useNitroApp } from '#internal/nitro/app' +import type { Link, Script } from '@unhead/vue' +import { createServerHead } from '@unhead/vue' // eslint-disable-next-line import/no-restricted-paths import type { NuxtPayload, NuxtSSRContext } from '#app/nuxt' // @ts-expect-error virtual file -import { appRootId, appRootTag } from '#internal/nuxt.config.mjs' +import { appHead, appRootId, appRootTag } from '#internal/nuxt.config.mjs' // @ts-expect-error virtual file import { buildAssetsURL, publicAssetsURL } from '#paths' @@ -71,9 +80,6 @@ const getEntryIds: () => Promise = () => getClientManifest().then(r => r._globalCSS ).map(r => r.src!)) -// @ts-expect-error virtual file -const getStaticRenderedHead = (): Promise => import('#head-static').then(r => r.default || r) - // @ts-expect-error file will be produced after app build const getServerEntry = () => import('#build/dist/server/server.mjs').then(r => r.default || r) @@ -140,7 +146,6 @@ const getSPARenderer = lazyCachedFunction(async () => { public: config.public, app: config.app } - ssrContext!.renderMeta = ssrContext!.renderMeta ?? getStaticRenderedHead return Promise.resolve(result) } @@ -221,6 +226,9 @@ export default defineRenderHandler(async (event): Promise + ({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) }) + ), + style: inlinedStyles + }) + + // 4. Scripts + if (!routeOptions.experimentalNoScripts) { + head.push({ + script: Object.values(scripts).map(resource => (` + - `` + const payload: Script = { + type: 'application/json', + id: opts.id, + innerHTML: contents, + 'data-ssr': !(process.env.NUXT_NO_SSR || opts.ssrContext.noSSR) + } + if (opts.src) { + payload['data-src'] = opts.src + } + return [ + payload, + { + innerHTML: `window.__NUXT__={};window.__NUXT__.config=${uneval(opts.ssrContext.config)}` + } + ] } -function renderPayloadScript (opts: { ssrContext: NuxtSSRContext, data?: any, src?: string }) { +function renderPayloadScript (opts: { ssrContext: NuxtSSRContext, data?: any, src?: string }): Script[] { opts.data.config = opts.ssrContext.config const _PAYLOAD_EXTRACTION = process.env.prerender && process.env.NUXT_PAYLOAD_EXTRACTION && !opts.ssrContext.noSSR if (_PAYLOAD_EXTRACTION) { - return `` + return [ + { + type: 'module', + innerHTML: `import p from "${opts.src}";window.__NUXT__={...p,...(${devalue(opts.data)})` + } + ] } - return `` + return [ + { + innerHTML: `window.__NUXT__=${devalue(opts.data)}` + } + ] } function splitPayload (ssrContext: NuxtSSRContext) { diff --git a/packages/nuxt/src/head/runtime/plugins/unhead.ts b/packages/nuxt/src/head/runtime/plugins/unhead.ts index 3fd5e0c330..f16413b1b9 100644 --- a/packages/nuxt/src/head/runtime/plugins/unhead.ts +++ b/packages/nuxt/src/head/runtime/plugins/unhead.ts @@ -1,16 +1,11 @@ -import { createHead as createClientHead, createServerHead } from '@unhead/vue' -import { renderSSRHead } from '@unhead/ssr' +import { createHead as createClientHead } from '@unhead/vue' import { defineNuxtPlugin } from '#app/nuxt' -// @ts-expect-error untyped -import { appHead } from '#build/nuxt.config.mjs' export default defineNuxtPlugin({ name: 'nuxt:head', setup (nuxtApp) { - const createHead = process.server ? createServerHead : createClientHead - const head = createHead() - head.push(appHead) - + const head = process.server ? nuxtApp.ssrContext!.head : createClientHead() + // nuxt.config appHead is set server-side within the renderer nuxtApp.vueApp.use(head) if (process.client) { @@ -28,17 +23,5 @@ export default defineNuxtPlugin({ // unpause the DOM once the mount suspense is resolved nuxtApp.hooks.hook('app:suspense:resolve', unpauseDom) } - - if (process.server) { - nuxtApp.ssrContext!.renderMeta = async () => { - const meta = await renderSSRHead(head) - return { - ...meta, - bodyScriptsPrepend: meta.bodyTagsOpen, - // resolves naming difference with NuxtMeta and Unhead - bodyScripts: meta.bodyTags - } - } - } } }) diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 20cad7138d..3c6f55bac6 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM for (const outputDir of ['.output', '.output-inline']) { it('default client bundle size', async () => { const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public')) - expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.5k"') + expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.3k"') expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(` [ "_nuxt/entry.js", @@ -32,7 +32,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM const serverDir = join(rootDir, '.output/server') const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir) - expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.5k"') + expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.2k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2330k"') From 2df9a4b9db44ae831562c7fc2f7753fe2764731f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sun, 30 Jul 2023 20:47:29 +0200 Subject: [PATCH 22/57] fix(nuxt): test `watch` paths against all layer `srcDir`s (#22307) --- packages/nuxt/src/core/nuxt.ts | 11 ++++++++--- packages/schema/src/config/common.ts | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 9aa9a65dfc..5654f56572 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -1,4 +1,4 @@ -import { join, normalize, resolve } from 'pathe' +import { join, normalize, relative, resolve } from 'pathe' import { createDebugger, createHooks } from 'hookable' import type { LoadNuxtOptions } from '@nuxt/kit' import { addBuildPlugin, addComponent, addPlugin, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtCtx, resolveAlias, resolveFiles, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit' @@ -349,12 +349,17 @@ async function initNuxt (nuxt: Nuxt) { } // User provided patterns + const layerRelativePaths = nuxt.options._layers.map(l => relative(l.config.srcDir || l.cwd, path)) for (const pattern of nuxt.options.watch) { if (typeof pattern === 'string') { - if (pattern === path) { return nuxt.callHook('restart') } + // Test (normalised) strings against absolute path and relative path to any layer `srcDir` + if (pattern === path || layerRelativePaths.includes(pattern)) { return nuxt.callHook('restart') } continue } - if (pattern.test(path)) { return nuxt.callHook('restart') } + // Test regular expressions against path to _any_ layer `srcDir` + if (layerRelativePaths.some(p => pattern.test(p))) { + return nuxt.callHook('restart') + } } // Core Nuxt files: app.vue, error.vue and app.config.ts diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index d5801081f2..80df36c583 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -365,8 +365,9 @@ export default defineUntypedSchema({ /** * The watch property lets you define patterns that will restart the Nuxt dev server when changed. * - * It is an array of strings or regular expressions, which will be matched against the file path - * relative to the project `srcDir`. + * It is an array of strings or regular expressions. Strings should be either absolute paths or + * relative to the `srcDir` (and the `srcDir` of any layers). Regular expressions will be matched + * against the path relative to the project `srcDir` (and the `srcDir` of any layers). * * @type {Array} */ From 620097241a5fb647dd990d02f4a25c28a147ba73 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Carvalho <90358872+jeanpierrecarvalho@users.noreply.github.com> Date: Sun, 30 Jul 2023 21:25:00 +0100 Subject: [PATCH 23/57] feat(nuxt): auto-install `@nuxt/webpack-builder` when needed (#21747) --- packages/nuxt/package.json | 2 +- packages/nuxt/src/core/features.ts | 4 ++-- packages/nuxt/src/core/nuxt.ts | 7 +++++++ pnpm-lock.yaml | 6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index f08b82e70b..31732fa048 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -78,7 +78,6 @@ "jiti": "^1.19.1", "klona": "^2.0.6", "knitwork": "^1.0.0", - "local-pkg": "^0.4.3", "magic-string": "^0.30.2", "mlly": "^1.4.0", "nitropack": "^2.5.2", @@ -88,6 +87,7 @@ "ohash": "^1.1.2", "pathe": "^1.1.1", "perfect-debounce": "^1.0.0", + "pkg-types": "^1.0.3", "prompts": "^2.4.2", "scule": "^1.0.0", "strip-literal": "^1.0.1", diff --git a/packages/nuxt/src/core/features.ts b/packages/nuxt/src/core/features.ts index 96616c996a..6c88aaebdd 100644 --- a/packages/nuxt/src/core/features.ts +++ b/packages/nuxt/src/core/features.ts @@ -1,10 +1,10 @@ import { addDependency } from 'nypm' -import { isPackageExists } from 'local-pkg' +import { resolvePackageJSON } from 'pkg-types' import { logger } from '@nuxt/kit' import prompts from 'prompts' export async function ensurePackageInstalled (rootDir: string, name: string, searchPaths?: string[]) { - if (isPackageExists(name, { paths: searchPaths })) { + if (await resolvePackageJSON(name, { url: searchPaths }).catch(() => null)) { return true } diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 5654f56572..2588a1949c 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -411,6 +411,13 @@ export async function loadNuxt (opts: LoadNuxtOptions): Promise { } } + // Nuxt Webpack Builder is currently opt-in + if (options.builder === '@nuxt/webpack-builder') { + if (!await import('./features').then(r => r.ensurePackageInstalled(options.rootDir, '@nuxt/webpack-builder', options.modulesDir))) { + logger.warn('Failed to install `@nuxt/webpack-builder`, please install it manually, or change the `builder` option to vite in `nuxt.config`') + } + } + // Add core modules options._modules.push(pagesModule, metaModule, componentsModule) options._modules.push([importsModule, { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 317e9f3b84..41c37b4a54 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -415,9 +415,6 @@ importers: knitwork: specifier: ^1.0.0 version: 1.0.0 - local-pkg: - specifier: ^0.4.3 - version: 0.4.3 magic-string: specifier: ^0.30.2 version: 0.30.2 @@ -445,6 +442,9 @@ importers: perfect-debounce: specifier: ^1.0.0 version: 1.0.0 + pkg-types: + specifier: ^1.0.3 + version: 1.0.3 prompts: specifier: ^2.4.2 version: 2.4.2 From ffc4e798cd39d57124f11cae688f5d4132d61739 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Sun, 30 Jul 2023 23:00:41 +0200 Subject: [PATCH 24/57] feat(nuxt): allow remote sources for islands (#21592) --- .../nuxt/src/app/components/nuxt-island.ts | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/packages/nuxt/src/app/components/nuxt-island.ts b/packages/nuxt/src/app/components/nuxt-island.ts index c268265d6c..3f8bfd3876 100644 --- a/packages/nuxt/src/app/components/nuxt-island.ts +++ b/packages/nuxt/src/app/components/nuxt-island.ts @@ -36,12 +36,17 @@ export default defineComponent({ context: { type: Object, default: () => ({}) + }, + source: { + type: String, + default: () => undefined } }, async setup (props, { slots }) { + const error = ref(null) const config = useRuntimeConfig() const nuxtApp = useNuxtApp() - const hashId = computed(() => hash([props.name, props.props, props.context])) + const hashId = computed(() => hash([props.name, props.props, props.context, props.source])) const instance = getCurrentInstance()! const event = useRequestEvent() // TODO: remove use of `$fetch.raw` when nitro 503 issues on windows dev server are resolved @@ -100,7 +105,8 @@ export default defineComponent({ const key = `${props.name}_${hashId.value}` if (nuxtApp.payload.data[key] && !force) { return nuxtApp.payload.data[key] } - const url = `/__nuxt_island/${key}` + const url = props.source ? new URL(`/__nuxt_island/${key}`, props.source).href : `/__nuxt_island/${key}` + if (process.server && process.env.prerender) { // Hint to Nitro to prerender the island component appendResponseHeader(event, 'x-nitro-prerender', url) @@ -130,18 +136,23 @@ export default defineComponent({ delete nuxtApp[pKey]![uid.value] }) } - const res: NuxtIslandResponse = await nuxtApp[pKey][uid.value] - cHead.value.link = res.head.link - cHead.value.style = res.head.style - ssrHTML.value = res.html.replace(UID_ATTR, () => { - return `nuxt-ssr-component-uid="${getId()}"` - }) - key.value++ - if (process.client) { - // must await next tick for Teleport to work correctly with static node re-rendering - await nextTick() + try { + const res: NuxtIslandResponse = await nuxtApp[pKey][uid.value] + cHead.value.link = res.head.link + cHead.value.style = res.head.style + ssrHTML.value = res.html.replace(UID_ATTR, () => { + return `nuxt-ssr-component-uid="${getId()}"` + }) + key.value++ + error.value = null + if (process.client) { + // must await next tick for Teleport to work correctly with static node re-rendering + await nextTick() + } + setUid() + } catch (e) { + error.value = e } - setUid() } if (import.meta.hot) { @@ -160,6 +171,9 @@ export default defineComponent({ } return () => { + if (error.value && slots.fallback) { + return [slots.fallback({ error: error.value })] + } const nodes = [createVNode(Fragment, { key: key.value }, [h(createStaticVNode(html.value, 1))])] From 0f839dd723367ce0181b5497e80e6b8bfd66a673 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Sun, 30 Jul 2023 23:36:11 +0200 Subject: [PATCH 25/57] feat(nuxt): environment-specific plugin execution for islands (#20726) --- packages/nuxt/src/app/nuxt.ts | 12 ++++++++++++ test/basic.test.ts | 2 +- test/bundle.test.ts | 2 +- .../basic/components/islands/LongAsyncComponent.vue | 5 +++++ test/fixtures/basic/plugins/server-only.server.ts | 12 ++++++++++++ 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/basic/plugins/server-only.server.ts diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index 2c0bf250fc..9a104a1613 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -155,6 +155,16 @@ export interface PluginMeta { order?: number } +export interface PluginEnvContext { + /** + * This enable the plugin for islands components. + * Require `experimental.componentsIslands`. + * + * @default true + */ + islands?: boolean +} + export interface ResolvedPluginMeta { name?: string parallel?: boolean @@ -169,6 +179,7 @@ export interface Plugin = Record = Record> extends PluginMeta { hooks?: Partial setup?: Plugin + env?: PluginEnvContext /** * Execute plugin in parallel with other parallel plugins. * @@ -318,6 +329,7 @@ export async function applyPlugins (nuxtApp: NuxtApp, plugins: Array[] = [] const errors: Error[] = [] for (const plugin of plugins) { + if (process.server && nuxtApp.ssrContext?.islandContext && plugin.env?.islands === false) { continue } const promise = applyPlugin(nuxtApp, plugin) if (plugin.parallel) { parallels.push(promise.catch(e => errors.push(e))) diff --git a/test/basic.test.ts b/test/basic.test.ts index 03d3df8d30..06968d32ab 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1649,7 +1649,7 @@ describe('component islands', () => { "link": [], "style": [], }, - "html": "
count is above 2
that was very long ...
3

hello world !!!

fallback slot -- index: 0
fallback slot -- index: 1
fallback slot -- index: 2
fall slot -- index: 0
wonderful fallback
back slot -- index: 1
wonderful fallback
", + "html": "
count is above 2
that was very long ...
3

hello world !!!

fallback slot -- index: 0
fallback slot -- index: 1
fallback slot -- index: 2
fall slot -- index: 0
wonderful fallback
back slot -- index: 1
wonderful fallback
", "state": {}, } `) diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 3c6f55bac6..2b4c07ba6e 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -32,7 +32,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM const serverDir = join(rootDir, '.output/server') const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir) - expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.2k"') + expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot('"64.4k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2330k"') diff --git a/test/fixtures/basic/components/islands/LongAsyncComponent.vue b/test/fixtures/basic/components/islands/LongAsyncComponent.vue index 59cefd9a04..dde35da8aa 100644 --- a/test/fixtures/basic/components/islands/LongAsyncComponent.vue +++ b/test/fixtures/basic/components/islands/LongAsyncComponent.vue @@ -8,6 +8,7 @@
{{ count }}
+ {{ headers['custom-head'] }}

hello world !!!

@@ -28,8 +29,12 @@ diff --git a/test/fixtures/basic/plugins/server-only.server.ts b/test/fixtures/basic/plugins/server-only.server.ts new file mode 100644 index 0000000000..f205d70ef1 --- /dev/null +++ b/test/fixtures/basic/plugins/server-only.server.ts @@ -0,0 +1,12 @@ +import { setHeader } from 'h3' + +export default defineNuxtPlugin({ + name: 'server-only-plugin', + setup () { + const evt = useRequestEvent() + setHeader(evt, 'custom-head', 'hello') + }, + env: { + islands: false + } +}) From 38d2bb7b9577b10dc17b081e5f5e935b8357ac0e Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 31 Jul 2023 09:42:42 +0100 Subject: [PATCH 26/57] feat(kit,nuxi): add `writeTypes` utility (#22385) --- packages/kit/src/internal/cjs.ts | 16 ++- packages/kit/src/template.ts | 151 +++++++++++++++++++++++- packages/nuxi/src/commands/build.ts | 6 +- packages/nuxi/src/commands/dev.ts | 6 +- packages/nuxi/src/commands/prepare.ts | 6 +- packages/nuxi/src/commands/typecheck.ts | 7 +- packages/nuxi/src/utils/cjs.ts | 12 +- packages/nuxi/src/utils/prepare.ts | 141 ---------------------- 8 files changed, 176 insertions(+), 169 deletions(-) delete mode 100644 packages/nuxi/src/utils/prepare.ts diff --git a/packages/kit/src/internal/cjs.ts b/packages/kit/src/internal/cjs.ts index fe57f95308..d15f4cf574 100644 --- a/packages/kit/src/internal/cjs.ts +++ b/packages/kit/src/internal/cjs.ts @@ -60,15 +60,19 @@ function getRequireCacheItem (id: string) { } } +export function getModulePaths (paths?: string[] | string) { + return ([] as Array).concat( + global.__NUXT_PREPATHS__, + paths || [], + process.cwd(), + global.__NUXT_PATHS__ + ).filter(Boolean) as string[] +} + /** @deprecated Do not use CJS utils */ export function resolveModule (id: string, opts: ResolveModuleOptions = {}) { return normalize(_require.resolve(id, { - paths: ([] as Array).concat( - global.__NUXT_PREPATHS__, - opts.paths || [], - process.cwd(), - global.__NUXT_PATHS__ - ).filter(Boolean) as string[] + paths: getModulePaths(opts.paths) })) } diff --git a/packages/kit/src/template.ts b/packages/kit/src/template.ts index bce72cfd79..9de92087c9 100644 --- a/packages/kit/src/template.ts +++ b/packages/kit/src/template.ts @@ -1,8 +1,14 @@ -import { existsSync } from 'node:fs' -import { basename, parse, resolve } from 'pathe' +import { existsSync, promises as fsp } from 'node:fs' +import { basename, isAbsolute, join, parse, relative, resolve } from 'pathe' import hash from 'hash-sum' -import type { NuxtTemplate, ResolvedNuxtTemplate } from '@nuxt/schema' +import type { Nuxt, NuxtTemplate, ResolvedNuxtTemplate, TSReference } from '@nuxt/schema' +import { withTrailingSlash } from 'ufo' +import { defu } from 'defu' +import type { TSConfig } from 'pkg-types' +import { readPackageJSON } from 'pkg-types' + import { tryUseNuxt, useNuxt } from './context' +import { getModulePaths } from './internal/cjs' /** * Renders given template using lodash template during build into the project buildDir @@ -101,3 +107,142 @@ export function normalizeTemplate (template: NuxtTemplate | string): Resolv export async function updateTemplates (options?: { filter?: (template: ResolvedNuxtTemplate) => boolean }) { return await tryUseNuxt()?.hooks.callHook('builder:generateApp', options) } +export async function writeTypes (nuxt: Nuxt) { + const modulePaths = getModulePaths(nuxt.options.modulesDir) + + const rootDirWithSlash = withTrailingSlash(nuxt.options.rootDir) + + const tsConfig: TSConfig = defu(nuxt.options.typescript?.tsConfig, { + compilerOptions: { + forceConsistentCasingInFileNames: true, + jsx: 'preserve', + target: 'ESNext', + module: 'ESNext', + moduleResolution: nuxt.options.experimental?.typescriptBundlerResolution ? 'Bundler' : 'Node', + skipLibCheck: true, + strict: nuxt.options.typescript?.strict ?? true, + allowJs: true, + // TODO: remove by default in 3.7 + baseUrl: nuxt.options.srcDir, + noEmit: true, + resolveJsonModule: true, + allowSyntheticDefaultImports: true, + types: ['node'], + paths: {} + }, + include: [ + './nuxt.d.ts', + join(relative(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'), + ...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : [], + ...nuxt.options._layers.map(layer => layer.config.srcDir ?? layer.cwd) + .filter(srcOrCwd => !srcOrCwd.startsWith(rootDirWithSlash) || srcOrCwd.includes('node_modules')) + .map(srcOrCwd => join(relative(nuxt.options.buildDir, srcOrCwd), '**/*')), + ...nuxt.options.typescript.includeWorkspace && nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : [] + ], + exclude: [ + ...nuxt.options.modulesDir.map(m => relative(nuxt.options.buildDir, m)), + // nitro generate output: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/core/nitro.ts#L186 + relative(nuxt.options.buildDir, resolve(nuxt.options.rootDir, 'dist')) + ] + } satisfies TSConfig) + + const aliases: Record = { + ...nuxt.options.alias, + '#build': nuxt.options.buildDir + } + + // Exclude bridge alias types to support Volar + const excludedAlias = [/^@vue\/.*$/] + + const basePath = tsConfig.compilerOptions!.baseUrl ? resolve(nuxt.options.buildDir, tsConfig.compilerOptions!.baseUrl) : nuxt.options.buildDir + + tsConfig.compilerOptions = tsConfig.compilerOptions || {} + tsConfig.include = tsConfig.include || [] + + for (const alias in aliases) { + if (excludedAlias.some(re => re.test(alias))) { + continue + } + const absolutePath = resolve(basePath, aliases[alias]) + const relativePath = relative(nuxt.options.buildDir, absolutePath) + + const stats = await fsp.stat(absolutePath).catch(() => null /* file does not exist */) + if (stats?.isDirectory()) { + tsConfig.compilerOptions.paths[alias] = [absolutePath] + tsConfig.compilerOptions.paths[`${alias}/*`] = [`${absolutePath}/*`] + + if (!absolutePath.startsWith(rootDirWithSlash)) { + tsConfig.include.push(relativePath) + } + } else { + const path = stats?.isFile() + ? absolutePath.replace(/(?<=\w)\.\w+$/g, '') /* remove extension */ + : absolutePath + + tsConfig.compilerOptions.paths[alias] = [path] + + if (!absolutePath.startsWith(rootDirWithSlash)) { + tsConfig.include.push(path) + } + } + } + + const references: TSReference[] = await Promise.all([ + ...nuxt.options.modules, + ...nuxt.options._modules + ] + .filter(f => typeof f === 'string') + .map(async id => ({ types: (await readPackageJSON(id, { url: modulePaths }).catch(() => null))?.name || id }))) + + if (nuxt.options.experimental?.reactivityTransform) { + references.push({ types: 'vue/macros-global' }) + } + + const declarations: string[] = [] + + tsConfig.include = [...new Set(tsConfig.include)] + tsConfig.exclude = [...new Set(tsConfig.exclude)] + + await nuxt.callHook('prepare:types', { references, declarations, tsConfig }) + + const declaration = [ + ...references.map((ref) => { + if ('path' in ref && isAbsolute(ref.path)) { + ref.path = relative(nuxt.options.buildDir, ref.path) + } + return `/// ` + }), + ...declarations, + '', + 'export {}', + '' + ].join('\n') + + async function writeFile () { + const GeneratedBy = '// Generated by nuxi' + + const tsConfigPath = resolve(nuxt.options.buildDir, 'tsconfig.json') + await fsp.mkdir(nuxt.options.buildDir, { recursive: true }) + await fsp.writeFile(tsConfigPath, GeneratedBy + '\n' + JSON.stringify(tsConfig, null, 2)) + + const declarationPath = resolve(nuxt.options.buildDir, 'nuxt.d.ts') + await fsp.writeFile(declarationPath, GeneratedBy + '\n' + declaration) + } + + // This is needed for Nuxt 2 which clears the build directory again before building + // https://github.com/nuxt/nuxt/blob/2.x/packages/builder/src/builder.js#L144 + // @ts-expect-error TODO: Nuxt 2 hook + const unsub = nuxt.hook('builder:prepared', writeFile) + + await writeFile() + + unsub() +} + +function renderAttrs (obj: Record) { + return Object.entries(obj).map(e => renderAttr(e[0], e[1])).join(' ') +} + +function renderAttr (key: string, value: string) { + return value ? `${key}="${value}"` : '' +} diff --git a/packages/nuxi/src/commands/build.ts b/packages/nuxi/src/commands/build.ts index f4a9793b19..e87a22f546 100644 --- a/packages/nuxi/src/commands/build.ts +++ b/packages/nuxi/src/commands/build.ts @@ -1,6 +1,8 @@ import { relative, resolve } from 'pathe' import { consola } from 'consola' -import { writeTypes } from '../utils/prepare' + +// we are deliberately inlining this code as a backup in case user has `@nuxt/schema<3.7` +import { writeTypes as writeTypesLegacy } from '../../../kit/src/template' import { loadKit } from '../utils/kit' import { clearBuildDir } from '../utils/fs' import { overrideEnv } from '../utils/env' @@ -19,7 +21,7 @@ export default defineNuxtCommand({ const rootDir = resolve(args._[0] || '.') showVersions(rootDir) - const { loadNuxt, buildNuxt, useNitro } = await loadKit(rootDir) + const { loadNuxt, buildNuxt, useNitro, writeTypes = writeTypesLegacy } = await loadKit(rootDir) const nuxt = await loadNuxt({ rootDir, diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 9da83dc685..d979872066 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -7,8 +7,10 @@ import type { Nuxt } from '@nuxt/schema' import { consola } from 'consola' import { withTrailingSlash } from 'ufo' import { setupDotenv } from 'c12' + +// we are deliberately inlining this code as a backup in case user has `@nuxt/schema<3.7` +import { writeTypes as writeTypesLegacy } from '../../../kit/src/template' import { showBanner, showVersions } from '../utils/banner' -import { writeTypes } from '../utils/prepare' import { loadKit } from '../utils/kit' import { importModule } from '../utils/esm' import { overrideEnv } from '../utils/env' @@ -30,7 +32,7 @@ export default defineNuxtCommand({ await setupDotenv({ cwd: rootDir, fileName: args.dotenv }) - const { loadNuxt, loadNuxtConfig, buildNuxt } = await loadKit(rootDir) + const { loadNuxt, loadNuxtConfig, buildNuxt, writeTypes = writeTypesLegacy } = await loadKit(rootDir) const config = await loadNuxtConfig({ cwd: rootDir, diff --git a/packages/nuxi/src/commands/prepare.ts b/packages/nuxi/src/commands/prepare.ts index 026df38993..dfec71e16e 100644 --- a/packages/nuxi/src/commands/prepare.ts +++ b/packages/nuxi/src/commands/prepare.ts @@ -1,8 +1,10 @@ import { relative, resolve } from 'pathe' import { consola } from 'consola' + +// we are deliberately inlining this code as a backup in case user has `@nuxt/schema<3.7` +import { writeTypes as writeTypesLegacy } from '../../../kit/src/template' import { clearBuildDir } from '../utils/fs' import { loadKit } from '../utils/kit' -import { writeTypes } from '../utils/prepare' import { defineNuxtCommand } from './index' export default defineNuxtCommand({ @@ -15,7 +17,7 @@ export default defineNuxtCommand({ process.env.NODE_ENV = process.env.NODE_ENV || 'production' const rootDir = resolve(args._[0] || '.') - const { loadNuxt, buildNuxt } = await loadKit(rootDir) + const { loadNuxt, buildNuxt, writeTypes = writeTypesLegacy } = await loadKit(rootDir) const nuxt = await loadNuxt({ rootDir, overrides: { diff --git a/packages/nuxi/src/commands/typecheck.ts b/packages/nuxi/src/commands/typecheck.ts index aa21e7d1e1..ee5a28ab56 100644 --- a/packages/nuxi/src/commands/typecheck.ts +++ b/packages/nuxi/src/commands/typecheck.ts @@ -1,9 +1,10 @@ import { execa } from 'execa' import { resolve } from 'pathe' -import { tryResolveModule } from '../utils/esm' +// we are deliberately inlining this code as a backup in case user has `@nuxt/schema<3.7` +import { writeTypes as writeTypesLegacy } from '../../../kit/src/template' +import { tryResolveModule } from '../utils/esm' import { loadKit } from '../utils/kit' -import { writeTypes } from '../utils/prepare' import { defineNuxtCommand } from './index' export default defineNuxtCommand({ @@ -16,7 +17,7 @@ export default defineNuxtCommand({ process.env.NODE_ENV = process.env.NODE_ENV || 'production' const rootDir = resolve(args._[0] || '.') - const { loadNuxt, buildNuxt } = await loadKit(rootDir) + const { loadNuxt, buildNuxt, writeTypes = writeTypesLegacy } = await loadKit(rootDir) const nuxt = await loadNuxt({ rootDir, overrides: { diff --git a/packages/nuxi/src/utils/cjs.ts b/packages/nuxi/src/utils/cjs.ts index a8fefc11df..1f9c1125a0 100644 --- a/packages/nuxi/src/utils/cjs.ts +++ b/packages/nuxi/src/utils/cjs.ts @@ -1,7 +1,7 @@ import { createRequire } from 'node:module' -import { dirname, normalize } from 'pathe' +import { normalize } from 'pathe' -export function getModulePaths (paths?: string | string[]): string[] { +function getModulePaths (paths?: string | string[]): string[] { return ([] as Array) .concat( global.__NUXT_PREPATHS__, @@ -25,11 +25,3 @@ function requireModule (id: string, paths?: string | string[]) { export function tryRequireModule (id: string, paths?: string | string[]) { try { return requireModule(id, paths) } catch { return null } } - -export function getNearestPackage (id: string, paths?: string | string[]) { - while (dirname(id) !== id) { - try { return requireModule(id + '/package.json', paths) } catch {} - id = dirname(id) - } - return null -} diff --git a/packages/nuxi/src/utils/prepare.ts b/packages/nuxi/src/utils/prepare.ts deleted file mode 100644 index bdcb64fda6..0000000000 --- a/packages/nuxi/src/utils/prepare.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { promises as fsp } from 'node:fs' -import { isAbsolute, join, relative, resolve } from 'pathe' -import type { Nuxt, TSReference } from '@nuxt/schema' -import { defu } from 'defu' -import type { TSConfig } from 'pkg-types' -import { withTrailingSlash } from 'ufo' -import { getModulePaths, getNearestPackage } from './cjs' - -export const writeTypes = async (nuxt: Nuxt) => { - const modulePaths = getModulePaths(nuxt.options.modulesDir) - - const rootDirWithSlash = withTrailingSlash(nuxt.options.rootDir) - - const tsConfig: TSConfig = defu(nuxt.options.typescript?.tsConfig, { - compilerOptions: { - forceConsistentCasingInFileNames: true, - jsx: 'preserve', - target: 'ESNext', - module: 'ESNext', - moduleResolution: nuxt.options.experimental?.typescriptBundlerResolution ? 'Bundler' : 'Node', - skipLibCheck: true, - strict: nuxt.options.typescript?.strict ?? true, - allowJs: true, - // TODO: remove by default in 3.7 - baseUrl: nuxt.options.srcDir, - noEmit: true, - resolveJsonModule: true, - allowSyntheticDefaultImports: true, - types: ['node'], - paths: {} - }, - include: [ - './nuxt.d.ts', - join(relative(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'), - ...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : [], - ...nuxt.options._layers.map(layer => layer.config.srcDir ?? layer.cwd) - .filter(srcOrCwd => !srcOrCwd.startsWith(rootDirWithSlash) || srcOrCwd.includes('node_modules')) - .map(srcOrCwd => join(relative(nuxt.options.buildDir, srcOrCwd), '**/*')), - ...nuxt.options.typescript.includeWorkspace && nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : [] - ], - exclude: [ - // nitro generate output: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/core/nitro.ts#L186 - relative(nuxt.options.buildDir, resolve(nuxt.options.rootDir, 'dist')) - ] - } satisfies TSConfig) - - const aliases: Record = { - ...nuxt.options.alias, - '#build': nuxt.options.buildDir - } - - // Exclude bridge alias types to support Volar - const excludedAlias = [/^@vue\/.*$/] - - const basePath = tsConfig.compilerOptions!.baseUrl ? resolve(nuxt.options.buildDir, tsConfig.compilerOptions!.baseUrl) : nuxt.options.buildDir - - tsConfig.compilerOptions = tsConfig.compilerOptions || {} - tsConfig.include = tsConfig.include || [] - - for (const alias in aliases) { - if (excludedAlias.some(re => re.test(alias))) { - continue - } - const absolutePath = resolve(basePath, aliases[alias]) - - const stats = await fsp.stat(absolutePath).catch(() => null /* file does not exist */) - if (stats?.isDirectory()) { - tsConfig.compilerOptions.paths[alias] = [absolutePath] - tsConfig.compilerOptions.paths[`${alias}/*`] = [`${absolutePath}/*`] - - if (!absolutePath.startsWith(rootDirWithSlash)) { - tsConfig.include.push(absolutePath) - tsConfig.include.push(`${absolutePath}/*`) - } - } else { - const path = stats?.isFile() - ? absolutePath.replace(/(?<=\w)\.\w+$/g, '') /* remove extension */ - : absolutePath - - tsConfig.compilerOptions.paths[alias] = [path] - - if (!absolutePath.startsWith(rootDirWithSlash)) { - tsConfig.include.push(path) - } - } - } - - const references: TSReference[] = [ - ...nuxt.options.modules, - ...nuxt.options._modules - ] - .filter(f => typeof f === 'string') - .map(id => ({ types: getNearestPackage(id, modulePaths)?.name || id })) - - if (nuxt.options.experimental?.reactivityTransform) { - references.push({ types: 'vue/macros-global' }) - } - - const declarations: string[] = [] - - await nuxt.callHook('prepare:types', { references, declarations, tsConfig }) - - const declaration = [ - ...references.map((ref) => { - if ('path' in ref && isAbsolute(ref.path)) { - ref.path = relative(nuxt.options.buildDir, ref.path) - } - return `/// ` - }), - ...declarations, - '', - 'export {}', - '' - ].join('\n') - - async function writeFile () { - const GeneratedBy = '// Generated by nuxi' - - const tsConfigPath = resolve(nuxt.options.buildDir, 'tsconfig.json') - await fsp.mkdir(nuxt.options.buildDir, { recursive: true }) - await fsp.writeFile(tsConfigPath, GeneratedBy + '\n' + JSON.stringify(tsConfig, null, 2)) - - const declarationPath = resolve(nuxt.options.buildDir, 'nuxt.d.ts') - await fsp.writeFile(declarationPath, GeneratedBy + '\n' + declaration) - } - - // This is needed for Nuxt 2 which clears the build directory again before building - // https://github.com/nuxt/nuxt/blob/2.x/packages/builder/src/builder.js#L144 - // @ts-expect-error TODO: Nuxt 2 hook - nuxt.hook('builder:prepared', writeFile) - - await writeFile() -} - -function renderAttrs (obj: Record) { - return Object.entries(obj).map(e => renderAttr(e[0], e[1])).join(' ') -} - -function renderAttr (key: string, value: string) { - return value ? `${key}="${value}"` : '' -} From 0991e885fd7cbfeee53df9e0078fd7178b759bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20G=C5=82owala?= <48835293+DamianGlowala@users.noreply.github.com> Date: Mon, 31 Jul 2023 10:50:55 +0200 Subject: [PATCH 27/57] feat(nuxt): autocomplete layouts in `setPageLayout`/`` (#22362) --- packages/nuxt/src/app/components/layout.ts | 152 +---------------- .../nuxt/src/app/components/nuxt-layout.ts | 153 ++++++++++++++++++ packages/nuxt/src/app/composables/router.ts | 2 +- packages/nuxt/src/core/nuxt.ts | 2 +- packages/nuxt/src/pages/module.ts | 4 +- 5 files changed, 159 insertions(+), 154 deletions(-) create mode 100644 packages/nuxt/src/app/components/nuxt-layout.ts diff --git a/packages/nuxt/src/app/components/layout.ts b/packages/nuxt/src/app/components/layout.ts index bb1b149265..b88def1a94 100644 --- a/packages/nuxt/src/app/components/layout.ts +++ b/packages/nuxt/src/app/components/layout.ts @@ -1,150 +1,2 @@ -import type { Ref, VNode } from 'vue' -import { Suspense, Transition, computed, defineComponent, h, inject, mergeProps, nextTick, onMounted, provide, ref, unref } from 'vue' -import type { RouteLocationNormalizedLoaded } from 'vue-router' -import { _wrapIf } from './utils' -import { LayoutMetaSymbol, PageRouteSymbol } from './injections' - -import { useRoute } from '#app/composables/router' -// @ts-expect-error virtual file -import { useRoute as useVueRouterRoute } from '#build/pages' -// @ts-expect-error virtual file -import layouts from '#build/layouts' -// @ts-expect-error virtual file -import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs' -import { useNuxtApp } from '#app' - -// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved -const LayoutLoader = defineComponent({ - name: 'LayoutLoader', - inheritAttrs: false, - props: { - name: String, - layoutProps: Object - }, - async setup (props, context) { - const LayoutComponent = await layouts[props.name]().then((r: any) => r.default || r) - - return () => h(LayoutComponent, props.layoutProps, context.slots) - } -}) - -export default defineComponent({ - name: 'NuxtLayout', - inheritAttrs: false, - props: { - name: { - type: [String, Boolean, Object] as unknown as () => string | false | Ref, - default: null - } - }, - setup (props, context) { - const nuxtApp = useNuxtApp() - // Need to ensure (if we are not a child of ``) that we use synchronous route (not deferred) - const injectedRoute = inject(PageRouteSymbol) - const route = injectedRoute === useRoute() ? useVueRouterRoute() : injectedRoute - - const layout = computed(() => unref(props.name) ?? route.meta.layout as string ?? 'default') - - const layoutRef = ref() - context.expose({ layoutRef }) - - const done = nuxtApp.deferHydration() - - return () => { - const hasLayout = layout.value && layout.value in layouts - if (process.dev && layout.value && !hasLayout && layout.value !== 'default') { - console.warn(`Invalid layout \`${layout.value}\` selected.`) - } - - const transitionProps = route.meta.layoutTransition ?? defaultLayoutTransition - - // We avoid rendering layout transition if there is no layout to render - return _wrapIf(Transition, hasLayout && transitionProps, { - default: () => h(Suspense, { suspensible: true, onResolve: () => { nextTick(done) } }, { - default: () => h( - // @ts-expect-error seems to be an issue in vue types - LayoutProvider, - { - layoutProps: mergeProps(context.attrs, { ref: layoutRef }), - key: layout.value, - name: layout.value, - shouldProvide: !props.name, - hasTransition: !!transitionProps - }, context.slots) - }) - }).default() - } - } -}) - -const LayoutProvider = defineComponent({ - name: 'NuxtLayoutProvider', - inheritAttrs: false, - props: { - name: { - type: [String, Boolean] - }, - layoutProps: { - type: Object - }, - hasTransition: { - type: Boolean - }, - shouldProvide: { - type: Boolean - } - }, - setup (props, context) { - // Prevent reactivity when the page will be rerendered in a different suspense fork - // eslint-disable-next-line vue/no-setup-props-destructure - const name = props.name - if (props.shouldProvide) { - provide(LayoutMetaSymbol, { - isCurrent: (route: RouteLocationNormalizedLoaded) => name === (route.meta.layout ?? 'default') - }) - } - - let vnode: VNode | undefined - if (process.dev && process.client) { - onMounted(() => { - nextTick(() => { - if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { - if (name) { - console.warn(`[nuxt] \`${name}\` layout does not have a single root node and will cause errors when navigating between routes.`) - } else { - console.warn('[nuxt] `` needs to be passed a single root node in its default slot.') - } - } - }) - }) - } - - return () => { - if (!name || (typeof name === 'string' && !(name in layouts))) { - if (process.dev && process.client && props.hasTransition) { - vnode = context.slots.default?.() as VNode | undefined - return vnode - } - return context.slots.default?.() - } - - if (process.dev && process.client && props.hasTransition) { - vnode = h( - // @ts-expect-error seems to be an issue in vue types - LayoutLoader, - { key: name, layoutProps: props.layoutProps, name }, - context.slots - ) - - return vnode - } - - return h( - // @ts-expect-error seems to be an issue in vue types - LayoutLoader, - { key: name, layoutProps: props.layoutProps, name }, - context.slots - ) - } - } -}) +// TODO: remove in 4.x +export { default } from './nuxt-layout' diff --git a/packages/nuxt/src/app/components/nuxt-layout.ts b/packages/nuxt/src/app/components/nuxt-layout.ts new file mode 100644 index 0000000000..b18cc84a38 --- /dev/null +++ b/packages/nuxt/src/app/components/nuxt-layout.ts @@ -0,0 +1,153 @@ +import type { DefineComponent, MaybeRef, VNode } from 'vue' +import { Suspense, Transition, computed, defineComponent, h, inject, mergeProps, nextTick, onMounted, provide, ref, unref } from 'vue' +import type { RouteLocationNormalizedLoaded } from 'vue-router' +import { _wrapIf } from './utils' +import { LayoutMetaSymbol, PageRouteSymbol } from './injections' +import type { PageMeta } from '#app' + +import { useRoute } from '#app/composables/router' +import { useNuxtApp } from '#app/nuxt' +// @ts-expect-error virtual file +import { useRoute as useVueRouterRoute } from '#build/pages' +// @ts-expect-error virtual file +import layouts from '#build/layouts' +// @ts-expect-error virtual file +import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs' + +// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved +const LayoutLoader = defineComponent({ + name: 'LayoutLoader', + inheritAttrs: false, + props: { + name: String, + layoutProps: Object + }, + async setup (props, context) { + const LayoutComponent = await layouts[props.name]().then((r: any) => r.default || r) + + return () => h(LayoutComponent, props.layoutProps, context.slots) + } +}) + +export default defineComponent({ + name: 'NuxtLayout', + inheritAttrs: false, + props: { + name: { + type: [String, Boolean, Object] as unknown as () => unknown extends PageMeta['layout'] ? MaybeRef : PageMeta['layout'], + default: null + } + }, + setup (props, context) { + const nuxtApp = useNuxtApp() + // Need to ensure (if we are not a child of ``) that we use synchronous route (not deferred) + const injectedRoute = inject(PageRouteSymbol) + const route = injectedRoute === useRoute() ? useVueRouterRoute() : injectedRoute + + const layout = computed(() => unref(props.name) ?? route.meta.layout as string ?? 'default') + + const layoutRef = ref() + context.expose({ layoutRef }) + + const done = nuxtApp.deferHydration() + + return () => { + const hasLayout = layout.value && layout.value in layouts + if (process.dev && layout.value && !hasLayout && layout.value !== 'default') { + console.warn(`Invalid layout \`${layout.value}\` selected.`) + } + + const transitionProps = route.meta.layoutTransition ?? defaultLayoutTransition + + // We avoid rendering layout transition if there is no layout to render + return _wrapIf(Transition, hasLayout && transitionProps, { + default: () => h(Suspense, { suspensible: true, onResolve: () => { nextTick(done) } }, { + default: () => h( + // @ts-expect-error seems to be an issue in vue types + LayoutProvider, + { + layoutProps: mergeProps(context.attrs, { ref: layoutRef }), + key: layout.value, + name: layout.value, + shouldProvide: !props.name, + hasTransition: !!transitionProps + }, context.slots) + }) + }).default() + } + } +}) as unknown as DefineComponent<{ + name: unknown extends PageMeta['layout'] ? MaybeRef : PageMeta['layout'] +}> + +const LayoutProvider = defineComponent({ + name: 'NuxtLayoutProvider', + inheritAttrs: false, + props: { + name: { + type: [String, Boolean] + }, + layoutProps: { + type: Object + }, + hasTransition: { + type: Boolean + }, + shouldProvide: { + type: Boolean + } + }, + setup (props, context) { + // Prevent reactivity when the page will be rerendered in a different suspense fork + // eslint-disable-next-line vue/no-setup-props-destructure + const name = props.name + if (props.shouldProvide) { + provide(LayoutMetaSymbol, { + isCurrent: (route: RouteLocationNormalizedLoaded) => name === (route.meta.layout ?? 'default') + }) + } + + let vnode: VNode | undefined + if (process.dev && process.client) { + onMounted(() => { + nextTick(() => { + if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { + if (name) { + console.warn(`[nuxt] \`${name}\` layout does not have a single root node and will cause errors when navigating between routes.`) + } else { + console.warn('[nuxt] `` needs to be passed a single root node in its default slot.') + } + } + }) + }) + } + + return () => { + if (!name || (typeof name === 'string' && !(name in layouts))) { + if (process.dev && process.client && props.hasTransition) { + vnode = context.slots.default?.() as VNode | undefined + return vnode + } + return context.slots.default?.() + } + + if (process.dev && process.client && props.hasTransition) { + vnode = h( + // @ts-expect-error seems to be an issue in vue types + LayoutLoader, + { key: name, layoutProps: props.layoutProps, name }, + context.slots + ) + + return vnode + } + + return h( + // @ts-expect-error seems to be an issue in vue types + LayoutLoader, + { key: name, layoutProps: props.layoutProps, name }, + context.slots + ) + } + } +}) diff --git a/packages/nuxt/src/app/composables/router.ts b/packages/nuxt/src/app/composables/router.ts index 905ffe63a8..126381ce49 100644 --- a/packages/nuxt/src/app/composables/router.ts +++ b/packages/nuxt/src/app/composables/router.ts @@ -221,7 +221,7 @@ export const abortNavigation = (err?: string | Partial) => { throw err } -export const setPageLayout = (layout: string) => { +export const setPageLayout = (layout: unknown extends PageMeta['layout'] ? string : PageMeta['layout']) => { if (process.server) { if (process.dev && getCurrentInstance() && useState('_layout').value !== layout) { console.warn('[warn] [nuxt] `setPageLayout` should not be called to change the layout on the server within a component as this will cause hydration errors.') diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 2588a1949c..110b60655b 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -200,7 +200,7 @@ async function initNuxt (nuxt: Nuxt) { addComponent({ name: 'NuxtLayout', priority: 10, // built-in that we do not expect the user to override - filePath: resolve(nuxt.options.appDir, 'components/layout') + filePath: resolve(nuxt.options.appDir, 'components/nuxt-layout') }) // Add diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index 6cd94aded2..dd56da61fb 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -353,11 +353,11 @@ export default defineNuxtModule({ getContents: ({ app }: { app: NuxtApp }) => { const composablesFile = resolve(runtimeDir, 'composables') return [ - 'import { ComputedRef, Ref } from \'vue\'', + 'import { ComputedRef, MaybeRef } from \'vue\'', `export type LayoutKey = ${Object.keys(app.layouts).map(name => genString(name)).join(' | ') || 'string'}`, `declare module ${genString(composablesFile)} {`, ' interface PageMeta {', - ' layout?: false | LayoutKey | Ref | ComputedRef', + ' layout?: MaybeRef | ComputedRef', ' }', '}' ].join('\n') From 5926bbeff84362015acb134b886d64d646c270ef Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 31 Jul 2023 09:51:09 +0100 Subject: [PATCH 28/57] feat(nuxt): allow 'lazy' (non-blocking) server components (#21918) --- .../nuxt/src/app/components/nuxt-island.ts | 14 ++++--- .../components/runtime/server-component.ts | 4 +- test/basic.test.ts | 37 +++++++++++++++++++ .../pages/server-components/lazy/end.vue | 26 +++++++++++++ .../pages/server-components/lazy/start.vue | 10 +++++ 5 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 test/fixtures/basic/pages/server-components/lazy/end.vue create mode 100644 test/fixtures/basic/pages/server-components/lazy/start.vue diff --git a/packages/nuxt/src/app/components/nuxt-island.ts b/packages/nuxt/src/app/components/nuxt-island.ts index 3f8bfd3876..e2990cfed6 100644 --- a/packages/nuxt/src/app/components/nuxt-island.ts +++ b/packages/nuxt/src/app/components/nuxt-island.ts @@ -29,6 +29,7 @@ export default defineComponent({ type: String, required: true }, + lazy: Boolean, props: { type: Object, default: () => undefined @@ -66,7 +67,7 @@ export default defineComponent({ } } - const ssrHTML = ref('
') + const ssrHTML = ref('') if (process.client) { const renderedHTML = getFragmentHTML(instance.vnode?.el ?? null).join('') if (renderedHTML && nuxtApp.isHydrating) { @@ -79,7 +80,7 @@ export default defineComponent({ } }) } - ssrHTML.value = renderedHTML ?? '
' + ssrHTML.value = renderedHTML } const slotProps = computed(() => getSlotProps(ssrHTML.value)) const uid = ref(ssrHTML.value.match(SSR_UID_RE)?.[1] ?? randomUUID()) @@ -165,18 +166,19 @@ export default defineComponent({ watch(props, debounce(() => fetchComponent(), 100)) } - // TODO: allow lazy loading server islands - if (process.server || !nuxtApp.isHydrating) { + if (process.client && !nuxtApp.isHydrating && props.lazy) { + fetchComponent() + } else if (process.server || !nuxtApp.isHydrating) { await fetchComponent() } return () => { - if (error.value && slots.fallback) { + if ((!html.value || error.value) && slots.fallback) { return [slots.fallback({ error: error.value })] } const nodes = [createVNode(Fragment, { key: key.value - }, [h(createStaticVNode(html.value, 1))])] + }, [h(createStaticVNode(html.value || '
', 1))])] if (uid.value && (mounted.value || nuxtApp.isHydrating || process.server)) { for (const slot in slots) { if (availableSlots.value.includes(slot)) { diff --git a/packages/nuxt/src/components/runtime/server-component.ts b/packages/nuxt/src/components/runtime/server-component.ts index 4dcfa8cce5..777204209e 100644 --- a/packages/nuxt/src/components/runtime/server-component.ts +++ b/packages/nuxt/src/components/runtime/server-component.ts @@ -5,9 +5,11 @@ export const createServerComponent = (name: string) => { return defineComponent({ name, inheritAttrs: false, - setup (_props, { attrs, slots }) { + props: { lazy: Boolean }, + setup (props, { attrs, slots }) { return () => h(NuxtIsland, { name, + lazy: props.lazy, props: attrs }, slots) } diff --git a/test/basic.test.ts b/test/basic.test.ts index 06968d32ab..879bc8c886 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1419,6 +1419,43 @@ describe('server components/islands', () => { await page.close() }) + it('lazy server components', async () => { + const page = await createPage('/server-components/lazy/start') + await page.waitForLoadState('networkidle') + await page.getByText('Go to page with lazy server component').click() + + const text = await page.innerText('pre') + expect(text).toMatchInlineSnapshot('" End page
Loading server component
"') + expect(text).not.toContain('async component that was very long') + expect(text).toContain('Loading server component') + + // Wait for all pending micro ticks to be cleared + // await page.waitForLoadState('networkidle') + // await page.evaluate(() => new Promise(resolve => setTimeout(resolve, 10))) + await page.waitForFunction(() => (document.querySelector('#no-fallback') as HTMLElement)?.innerText?.includes('async component')) + await page.waitForFunction(() => (document.querySelector('#fallback') as HTMLElement)?.innerText?.includes('async component')) + + await page.close() + }) + + it('non-lazy server components', async () => { + const page = await createPage('/server-components/lazy/start') + await page.waitForLoadState('networkidle') + await page.getByText('Go to page without lazy server component').click() + + const text = await page.innerText('pre') + expect(text).toMatchInlineSnapshot('" End page
This is a .server (20ms) async component that was very long ...
42
This is a .server (20ms) async component that was very long ...
42
"') + expect(text).toContain('async component that was very long') + + // Wait for all pending micro ticks to be cleared + // await page.waitForLoadState('networkidle') + // await page.evaluate(() => new Promise(resolve => setTimeout(resolve, 10))) + await page.waitForFunction(() => (document.querySelector('#no-fallback') as HTMLElement)?.innerText?.includes('async component')) + await page.waitForFunction(() => (document.querySelector('#fallback') as HTMLElement)?.innerText?.includes('async component')) + + await page.close() + }) + it.skipIf(isDev)('should allow server-only components to set prerender hints', async () => { // @ts-expect-error ssssh! untyped secret property const publicDir = useTestContext().nuxt._nitro.options.output.publicDir diff --git a/test/fixtures/basic/pages/server-components/lazy/end.vue b/test/fixtures/basic/pages/server-components/lazy/end.vue new file mode 100644 index 0000000000..7009c1e7ac --- /dev/null +++ b/test/fixtures/basic/pages/server-components/lazy/end.vue @@ -0,0 +1,26 @@ + + + diff --git a/test/fixtures/basic/pages/server-components/lazy/start.vue b/test/fixtures/basic/pages/server-components/lazy/start.vue new file mode 100644 index 0000000000..a14cf6eada --- /dev/null +++ b/test/fixtures/basic/pages/server-components/lazy/start.vue @@ -0,0 +1,10 @@ + From 5edf00f069919d8ff6707dec03277a61983d550c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 31 Jul 2023 11:22:24 +0100 Subject: [PATCH 29/57] chore: update codesandbox links --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- .github/ISSUE_TEMPLATE/z-bug-report-2.yml | 2 +- docs/5.community/3.reporting-bugs.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index bbea7f9746..adb2612a93 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -10,7 +10,7 @@ body: Please use a template below to create a minimal reproduction 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz - 👉 https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox + 👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox - type: textarea id: bug-env attributes: diff --git a/.github/ISSUE_TEMPLATE/z-bug-report-2.yml b/.github/ISSUE_TEMPLATE/z-bug-report-2.yml index ff81322879..d4124367b2 100644 --- a/.github/ISSUE_TEMPLATE/z-bug-report-2.yml +++ b/.github/ISSUE_TEMPLATE/z-bug-report-2.yml @@ -10,7 +10,7 @@ body: Please use a template below to create a minimal reproduction 👉 https://stackblitz.com/github/nuxt/starter/tree/v2 - 👉 https://codesandbox.io/p/github/nuxt/starter/v2 + 👉 https://codesandbox.io/s/github/nuxt/starter/v2 - type: textarea id: bug-env attributes: diff --git a/docs/5.community/3.reporting-bugs.md b/docs/5.community/3.reporting-bugs.md index 5d0f055584..7f8337a0a9 100644 --- a/docs/5.community/3.reporting-bugs.md +++ b/docs/5.community/3.reporting-bugs.md @@ -33,16 +33,16 @@ If your issue concerns Vue 3 or Vite, please try to reproduce it first with the **Nuxt 3**: :button-link[Nuxt 3 on StackBlitz]{href="https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz" blank .mr-2} -:button-link[Nuxt 3 on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox" blank} +:button-link[Nuxt 3 on CodeSandbox]{href="https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox" blank} **Nuxt Bridge**: -:button-link[Nuxt Bridge on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v2-bridge-codesandbox" blank} +:button-link[Nuxt Bridge on CodeSandbox]{href="https://codesandbox.io/s/github/nuxt/starter/v2-bridge-codesandbox" blank} **Vue 3**: :button-link[Vue 3 SSR on StackBlitz]{href="https://stackblitz.com/github/nuxt-contrib/vue3-ssr-starter/tree/main?terminal=dev" blank .mr-2} -:button-link[Vue 3 SSR on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt-contrib/vue3-ssr-starter/main" blank .mr-2} +:button-link[Vue 3 SSR on CodeSandbox]{href="https://codesandbox.io/s/github/nuxt-contrib/vue3-ssr-starter/main" blank .mr-2} :button-link[Vue 3 SSR Template]{href="https://github.com/nuxt-contrib/vue3-ssr-starter/generate" blank} Once you've reproduced the issue, remove as much code from your reproduction as you can (while still recreating the bug). The time spent making the reproduction as minimal as possible will make a huge difference to whoever sets out to fix the issue. From a2581c6d237544e93955fd0765e1461863d8e13e Mon Sep 17 00:00:00 2001 From: Adham Farrag Date: Mon, 31 Jul 2023 18:23:00 +0800 Subject: [PATCH 30/57] docs: add recommendation to install nuxtr (#20808) --- docs/1.getting-started/2.installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/1.getting-started/2.installation.md b/docs/1.getting-started/2.installation.md index 4d706543c1..addc4e2401 100644 --- a/docs/1.getting-started/2.installation.md +++ b/docs/1.getting-started/2.installation.md @@ -31,7 +31,7 @@ Start with one of our starters and themes directly by opening [nuxt.new](https:/ ::details :summary[Additional notes for an optimal setup:] - **Node.js**: Make sure to use an even numbered version (18, 20, etc) - +- **Nuxtr**: Install the community-developed [Nuxtr extension](https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode) - **Volar**: Either enable [**Take Over Mode**](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode) (recommended) or add the [TypeScript Vue Plugin](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)**, you can disable generating the shim for `*.vue` files in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file: From 40fdff8b68957b1acdde78f769c277f5fd490dad Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 11:34:34 +0100 Subject: [PATCH 31/57] chore(deps): update dependency vue-bundle-renderer to v2 (main) (#22408) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- packages/nuxt/package.json | 2 +- packages/schema/package.json | 2 +- packages/vite/package.json | 2 +- packages/webpack/package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- test/basic.test.ts | 1 - 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 31732fa048..928bb7787c 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -101,7 +101,7 @@ "unplugin-vue-router": "^0.6.4", "untyped": "^1.4.0", "vue": "^3.3.4", - "vue-bundle-renderer": "^1.0.3", + "vue-bundle-renderer": "^2.0.0", "vue-devtools-stub": "^0.1.0", "vue-router": "^4.2.4" }, diff --git a/packages/schema/package.json b/packages/schema/package.json index 9622f4af63..9083c40cb2 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -42,7 +42,7 @@ "unctx": "2.3.1", "vite": "4.4.7", "vue": "3.3.4", - "vue-bundle-renderer": "1.0.3", + "vue-bundle-renderer": "2.0.0", "vue-loader": "17.2.2", "vue-router": "4.2.4", "webpack": "5.88.2", diff --git a/packages/vite/package.json b/packages/vite/package.json index cf0e21aa4c..b11fac9ee6 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -60,7 +60,7 @@ "vite": "^4.4.7", "vite-node": "^0.33.0", "vite-plugin-checker": "^0.6.1", - "vue-bundle-renderer": "^1.0.3" + "vue-bundle-renderer": "^2.0.0" }, "peerDependencies": { "vue": "^3.3.4" diff --git a/packages/webpack/package.json b/packages/webpack/package.json index 9dc704b01a..77cff01dc3 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -52,7 +52,7 @@ "ufo": "^1.2.0", "unplugin": "^1.4.0", "url-loader": "^4.1.1", - "vue-bundle-renderer": "^1.0.3", + "vue-bundle-renderer": "^2.0.0", "vue-loader": "^17.2.2", "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41c37b4a54..0735789e05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -485,8 +485,8 @@ importers: specifier: 3.3.4 version: 3.3.4 vue-bundle-renderer: - specifier: ^1.0.3 - version: 1.0.3 + specifier: ^2.0.0 + version: 2.0.0 vue-devtools-stub: specifier: ^0.1.0 version: 0.1.0 @@ -601,8 +601,8 @@ importers: specifier: 3.3.4 version: 3.3.4 vue-bundle-renderer: - specifier: 1.0.3 - version: 1.0.3 + specifier: 2.0.0 + version: 2.0.0 vue-loader: specifier: 17.2.2 version: 17.2.2(vue@3.3.4)(webpack@5.88.2) @@ -767,8 +767,8 @@ importers: specifier: ^0.6.1 version: 0.6.1(eslint@8.46.0)(typescript@5.1.6)(vite@4.4.7)(vue-tsc@1.8.8) vue-bundle-renderer: - specifier: ^1.0.3 - version: 1.0.3 + specifier: ^2.0.0 + version: 2.0.0 devDependencies: '@nuxt/schema': specifier: workspace:* @@ -891,8 +891,8 @@ importers: specifier: ^4.1.1 version: 4.1.1(file-loader@6.2.0)(webpack@5.88.2) vue-bundle-renderer: - specifier: ^1.0.3 - version: 1.0.3 + specifier: ^2.0.0 + version: 2.0.0 vue-loader: specifier: ^17.2.2 version: 17.2.2(vue@3.3.4)(webpack@5.88.2) @@ -9089,8 +9089,8 @@ packages: resolution: {integrity: sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==} dev: false - /vue-bundle-renderer@1.0.3: - resolution: {integrity: sha512-EfjX+5TTUl70bki9hPuVp+54JiZOvFIfoWBcfXsSwLzKEiDYyHNi5iX8srnqLIv3YRnvxgbntdcG1WPq0MvffQ==} + /vue-bundle-renderer@2.0.0: + resolution: {integrity: sha512-oYATTQyh8XVkUWe2kaKxhxKVuuzK2Qcehe+yr3bGiaQAhK3ry2kYE4FWOfL+KO3hVFwCdLmzDQTzYhTi9C+R2A==} dependencies: ufo: 1.2.0 diff --git a/test/basic.test.ts b/test/basic.test.ts index 879bc8c886..25365c0067 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1365,7 +1365,6 @@ describe.skipIf(isDev() || isWebpack)('inlining component styles', () => { const html: string = await $fetch('/styles') expect(html.match(/]*href="[^"]*\.css">/g)?.filter(m => m.includes('entry'))?.map(m => m.replace(/\.[^.]*\.css/, '.css'))).toMatchInlineSnapshot(` [ - "", "", ] `) From dad633b6586246e83d09730bc9899ce1c8b64bcc Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 31 Jul 2023 12:11:18 +0100 Subject: [PATCH 32/57] perf(nuxt): render css/inline css higher than resource hints (#21793) --- .../nuxt/src/core/runtime/nitro/renderer.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index da2e70764d..8341cae181 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -326,16 +326,25 @@ export default defineRenderHandler(async (event): Promise + ({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) }) + ), + style: inlinedStyles + }) + if (!NO_SCRIPTS) { - // 2. Resource Hints - // @todo add priorities based on Capo + // 3. Resource Hints + // TODO: add priorities based on Capo head.push({ link: getPreloadLinks(ssrContext, renderer.rendererContext) as Link[] }) head.push({ link: getPrefetchLinks(ssrContext, renderer.rendererContext) as Link[] }) - // 3. Payloads + // 4. Payloads head.push({ script: _PAYLOAD_EXTRACTION ? process.env.NUXT_JSON_PAYLOADS @@ -351,16 +360,7 @@ export default defineRenderHandler(async (event): Promise - ({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) }) - ), - style: inlinedStyles - }) - - // 4. Scripts + // 5. Scripts if (!routeOptions.experimentalNoScripts) { head.push({ script: Object.values(scripts).map(resource => (