From e464cd6b374c1ae82d354419adf04a1d7ba5dead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 13 Oct 2024 11:22:20 +0200 Subject: [PATCH 01/11] fix: normalize path for windows --- src/features.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/features.ts b/src/features.ts index 912bb33d..ce288fff 100644 --- a/src/features.ts +++ b/src/features.ts @@ -1,4 +1,6 @@ import { execSync } from 'node:child_process' +import { pathToFileURL } from 'node:url' +import { isAbsolute } from 'pathe' import type { Nuxt } from '@nuxt/schema' import { logger, addImportsDir, addServerImportsDir, addServerScanDir, createResolver } from '@nuxt/kit' import { joinURL } from 'ufo' @@ -150,7 +152,10 @@ export async function setupBrowser(nuxt: Nuxt) { export async function setupCache(nuxt: Nuxt) { // Add Server caching (Nitro) - const driver = await resolvePath('./runtime/cache/driver') + let driver = await resolvePath('./runtime/cache/driver') + if (nuxt.options.dev && isAbsolute(driver)) { + driver = pathToFileURL(driver).href + } nuxt.options.nitro = defu(nuxt.options.nitro, { storage: { cache: { From 49f67b5b3965382755f7e74ab9fa5157d044b82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 13 Oct 2024 12:39:14 +0200 Subject: [PATCH 02/11] simplify using mlly --- package.json | 1 + pnpm-lock.yaml | 133 +++++++++++++++++++++++++++++++++--------------- src/features.ts | 13 +++-- 3 files changed, 100 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 51736773..df84a721 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "destr": "^2.0.3", "h3": "^1.13.0", "mime": "^4.0.4", + "mlly": "^1.7.2", "nitro-cloudflare-dev": "^0.1.6", "ofetch": "^1.4.0", "pathe": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98f0f69a..4c15a1ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: mime: specifier: ^4.0.4 version: 4.0.4 + mlly: + specifier: ^1.7.2 + version: 1.7.2 nitro-cloudflare-dev: specifier: ^0.1.6 version: 0.1.6 @@ -131,7 +134,7 @@ importers: version: 1.8.1(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) '@nuxt/scripts': specifier: ^0.9.4 - version: 0.9.4(@nuxt/devtools@1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(ioredis@5.4.1)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1)) + version: 0.9.4(@nuxt/devtools@1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(ioredis@5.4.1)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1)) '@nuxt/ui-pro': specifier: ^1.4.3 version: 1.4.3(focus-trap@7.6.0)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) @@ -191,7 +194,7 @@ importers: version: 2.18.6(focus-trap@7.6.0)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) '@nuxthub/core': specifier: latest - version: 0.7.26(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) + version: 0.7.27(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) '@nuxtjs/mdc': specifier: ^0.9.0 version: 0.9.0(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) @@ -213,7 +216,7 @@ importers: devDependencies: '@nuxt/devtools': specifier: latest - version: 1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) + version: 1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) packages: @@ -1724,6 +1727,11 @@ packages: peerDependencies: vite: '*' + '@nuxt/devtools-kit@1.6.0': + resolution: {integrity: sha512-kJ8mVKwTSN3tdEVNy7mxKCiQk9wsG5t3oOrRMWk6IEbTSov+5sOULqQSM/+OWxWsEDmDfA7QlS5sM3Ti9uMRqQ==} + peerDependencies: + vite: '*' + '@nuxt/devtools-ui-kit@1.5.2': resolution: {integrity: sha512-J8rYJ3Pl6yZTybR6Wbq63RbsJMy3z4e2cQ/Ohiij2iCpZHEdqI22w0LALpmfH0mj1T/0903vWe+ce4jtyGO2zw==} peerDependencies: @@ -1737,6 +1745,10 @@ packages: resolution: {integrity: sha512-wZhouI3drb7HL7KYezYb9ksK0EeSVbHDPPKdLQePVrr+7SphThqiHoWmovBB3e/D4jtO3VC07+ILZcXUnat6HQ==} hasBin: true + '@nuxt/devtools-wizard@1.6.0': + resolution: {integrity: sha512-n+mzz5NwnKZim0tq1oBi+x1nNXb21fp7QeBl7bYKyDT1eJ0XCxFkVTr/kB/ddkkLYZ+o8TykpeNPa74cN+xAyQ==} + hasBin: true + '@nuxt/devtools@1.5.1': resolution: {integrity: sha512-A5+TEKJURuwes/PD30hl6gksA+935UY7i8DIkDr+9a4AWnPgrVt/WsGRmz84Q/9eRBxlLjwD9/kwDpNYcMST6Q==} hasBin: true @@ -1749,6 +1761,12 @@ packages: peerDependencies: vite: '*' + '@nuxt/devtools@1.6.0': + resolution: {integrity: sha512-xNorMapzpM8HaW7NnAsEEO38OrmrYBzGvkkqfBU5nNh5XEymmIfCbQc7IA/GIOH9pXOV4gRutCjHCWXHYbOl3A==} + hasBin: true + peerDependencies: + vite: '*' + '@nuxt/eslint-config@0.5.7': resolution: {integrity: sha512-B+snO9NS9+v2657Z84tMbW3hLxjauIUkk2m4vnYjb9xfAFdoQwK07q6aaf7LzvagmVFmQiclT9LbJMvlRqzmsA==} peerDependencies: @@ -1847,8 +1865,8 @@ packages: '@nuxthq/studio@2.1.1': resolution: {integrity: sha512-NQMf1Howrr5D7fDRMSpYyjQSi3/RzUT91KfcLxGz3Q2iAq0y94GSlPCpYMqYId9CgcfG2OIIDm40/dFusQZIvQ==} - '@nuxthub/core@0.7.26': - resolution: {integrity: sha512-xOfI+txczteKk66cxf9Rb5AL/PttcS47FCotzXVCZflS4xgnJfZb42FurKYagozpu1MbM6V95nXhO/esg3xUbA==} + '@nuxthub/core@0.7.27': + resolution: {integrity: sha512-FEE0py4/gxtgMllOTcoiBSSARUylurK2C5xDtpNiQ3SfWl6Zv9BhdeBiwfSFWZP2gLNsLA+fhv5qL0JHt4I5AA==} '@nuxtjs/color-mode@3.5.1': resolution: {integrity: sha512-GRHF3WUwX6fXIiRVlngNq1nVDwrVuP6dWX1DRmox3QolzX0eH1oJEcFr/lAm1nkT71JVGb8mszho9w+yHJbePw==} @@ -5338,6 +5356,9 @@ packages: mlly@1.7.1: resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + mlly@1.7.2: + resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -8839,13 +8860,25 @@ snapshots: - supports-color - webpack-sources - '@nuxt/devtools-ui-kit@1.5.2(@nuxt/devtools@1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1))': + '@nuxt/devtools-kit@1.6.0(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3)': + dependencies: + '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) + '@nuxt/schema': 3.13.2(rollup@4.21.3)(webpack-sources@3.2.3) + execa: 7.2.0 + vite: 5.4.5(@types/node@22.7.4)(terser@5.34.1) + transitivePeerDependencies: + - magicast + - rollup + - supports-color + - webpack-sources + + '@nuxt/devtools-ui-kit@1.5.2(@nuxt/devtools@1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1))': dependencies: '@iconify-json/carbon': 1.2.1 '@iconify-json/logos': 1.2.3 '@iconify-json/ri': 1.2.0 '@iconify-json/tabler': 1.2.3 - '@nuxt/devtools': 1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) + '@nuxt/devtools': 1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3) '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) '@unocss/core': 0.62.4 @@ -8913,6 +8946,19 @@ snapshots: rc9: 2.1.2 semver: 7.6.3 + '@nuxt/devtools-wizard@1.6.0': + dependencies: + consola: 3.2.3 + diff: 7.0.0 + execa: 7.2.0 + global-directory: 4.0.1 + magicast: 0.3.5 + pathe: 1.1.2 + pkg-types: 1.2.0 + prompts: 2.4.2 + rc9: 2.1.2 + semver: 7.6.3 + '@nuxt/devtools@1.5.1(rollup@3.29.4)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)': dependencies: '@antfu/utils': 0.7.10 @@ -9057,11 +9103,11 @@ snapshots: - vue - webpack-sources - '@nuxt/devtools@1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)': + '@nuxt/devtools@1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) - '@nuxt/devtools-wizard': 1.5.2 + '@nuxt/devtools-kit': 1.6.0(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) + '@nuxt/devtools-wizard': 1.6.0 '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) '@vue/devtools-core': 7.4.4(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2)) '@vue/devtools-kit': 7.4.4 @@ -9250,7 +9296,7 @@ snapshots: jiti: 1.21.6 klona: 2.0.6 knitwork: 1.1.0 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -9278,7 +9324,7 @@ snapshots: jiti: 1.21.6 klona: 2.0.6 knitwork: 1.1.0 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -9300,7 +9346,7 @@ snapshots: consola: 3.2.3 defu: 6.1.4 magic-regexp: 0.8.0(webpack-sources@3.2.3) - mlly: 1.7.1 + mlly: 1.7.2 nuxi: 3.13.2 pathe: 1.1.2 pkg-types: 1.2.0 @@ -9351,10 +9397,10 @@ snapshots: - supports-color - webpack-sources - '@nuxt/scripts@0.9.4(@nuxt/devtools@1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(ioredis@5.4.1)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1))': + '@nuxt/scripts@0.9.4(@nuxt/devtools@1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(ioredis@5.4.1)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1))': dependencies: '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) - '@nuxt/devtools-ui-kit': 1.5.2(@nuxt/devtools@1.5.2(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1)) + '@nuxt/devtools-ui-kit': 1.5.2(@nuxt/devtools@1.6.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3))(@unocss/webpack@0.62.4(rollup@4.21.3)(webpack@5.94.0(esbuild@0.23.1)))(@vue/compiler-core@3.5.10)(fuse.js@7.0.0)(magicast@0.3.5)(nuxt@3.13.2(@parcel/watcher@2.4.1)(@types/node@22.7.4)(eslint@9.12.0(jiti@2.3.3))(ioredis@5.4.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.21.3)(terser@5.34.1)(typescript@5.6.2)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3))(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(vue@3.5.6(typescript@5.6.2))(webpack-sources@3.2.3)(webpack@5.94.0(esbuild@0.23.1)) '@nuxt/kit': 3.13.2(magicast@0.3.5)(rollup@4.21.3)(webpack-sources@3.2.3) '@types/google.maps': 3.58.1 '@types/stripe-v3': 3.1.33 @@ -9612,7 +9658,7 @@ snapshots: h3: 1.13.0 knitwork: 1.1.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 ohash: 1.1.4 pathe: 1.1.2 perfect-debounce: 1.0.0 @@ -9672,7 +9718,7 @@ snapshots: h3: 1.13.0 knitwork: 1.1.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 ohash: 1.1.4 pathe: 1.1.2 perfect-debounce: 1.0.0 @@ -9732,7 +9778,7 @@ snapshots: - utf-8-validate - webpack-sources - '@nuxthub/core@0.7.26(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3)': + '@nuxthub/core@0.7.27(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3)': dependencies: '@cloudflare/workers-types': 4.20241004.0 '@nuxt/devtools-kit': 1.5.2(magicast@0.3.5)(rollup@4.21.3)(vite@5.4.5(@types/node@22.7.4)(terser@5.34.1))(webpack-sources@3.2.3) @@ -11706,7 +11752,7 @@ snapshots: dotenv: 16.4.5 giget: 1.2.3 jiti: 1.21.6 - mlly: 1.7.1 + mlly: 1.7.2 ohash: 1.1.4 pathe: 1.1.2 perfect-debounce: 1.0.0 @@ -11723,7 +11769,7 @@ snapshots: dotenv: 16.4.5 giget: 1.2.3 jiti: 2.3.3 - mlly: 1.7.1 + mlly: 1.7.2 ohash: 1.1.4 pathe: 1.1.2 perfect-debounce: 1.0.0 @@ -12775,7 +12821,7 @@ snapshots: externality@1.0.2: dependencies: enhanced-resolve: 5.17.1 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 ufo: 1.5.4 @@ -13322,7 +13368,7 @@ snapshots: impound@0.1.0(rollup@3.29.4)(webpack-sources@3.2.3): dependencies: '@rollup/pluginutils': 5.1.0(rollup@3.29.4) - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 unenv: 1.10.0 unplugin: 1.14.1(webpack-sources@3.2.3) @@ -13333,7 +13379,7 @@ snapshots: impound@0.1.0(rollup@4.21.3)(webpack-sources@3.2.3): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.21.3) - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 unenv: 1.10.0 unplugin: 1.14.1(webpack-sources@3.2.3) @@ -13686,7 +13732,7 @@ snapshots: h3: 1.13.0 http-shutdown: 1.2.2 jiti: 1.21.6 - mlly: 1.7.1 + mlly: 1.7.2 node-forge: 1.3.1 pathe: 1.1.2 std-env: 3.7.0 @@ -13702,7 +13748,7 @@ snapshots: local-pkg@0.5.0: dependencies: - mlly: 1.7.1 + mlly: 1.7.2 pkg-types: 1.2.0 locate-character@3.0.0: {} @@ -13753,7 +13799,7 @@ snapshots: dependencies: estree-walker: 3.0.3 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 regexp-tree: 0.1.27 type-level-regexp: 0.1.17 ufo: 1.5.4 @@ -14202,7 +14248,7 @@ snapshots: esbuild: 0.23.1 fast-glob: 3.3.2 jiti: 1.21.6 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 postcss: 8.4.47 @@ -14218,6 +14264,13 @@ snapshots: pkg-types: 1.2.0 ufo: 1.5.4 + mlly@1.7.2: + dependencies: + acorn: 8.12.1 + pathe: 1.1.2 + pkg-types: 1.2.0 + ufo: 1.5.4 + mri@1.2.0: {} mrmime@2.0.0: {} @@ -14260,7 +14313,7 @@ snapshots: nitro-cloudflare-dev@0.1.6: dependencies: consola: 3.2.3 - mlly: 1.7.1 + mlly: 1.7.2 pkg-types: 1.2.0 nitropack@2.9.7(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241004.0)(@opentelemetry/api@1.9.0)(postgres@3.4.4)(react@18.3.1))(magicast@0.3.5)(webpack-sources@3.2.3): @@ -14306,7 +14359,7 @@ snapshots: listhen: 1.7.2 magic-string: 0.30.11 mime: 4.0.4 - mlly: 1.7.1 + mlly: 1.7.2 mri: 1.2.0 node-fetch-native: 1.6.4 ofetch: 1.4.0 @@ -14556,7 +14609,7 @@ snapshots: klona: 2.0.6 knitwork: 1.1.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 nanotar: 0.1.1 nitropack: 2.9.7(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241004.0)(@opentelemetry/api@1.9.0)(postgres@3.4.4)(react@18.3.1))(magicast@0.3.5)(webpack-sources@3.2.3) nuxi: 3.13.2 @@ -14669,7 +14722,7 @@ snapshots: klona: 2.0.6 knitwork: 1.1.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 nanotar: 0.1.1 nitropack: 2.9.7(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241004.0)(@opentelemetry/api@1.9.0)(postgres@3.4.4)(react@18.3.1))(magicast@0.3.5)(webpack-sources@3.2.3) nuxi: 3.13.2 @@ -14782,7 +14835,7 @@ snapshots: klona: 2.0.6 knitwork: 1.1.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 nanotar: 0.1.1 nitropack: 2.9.7(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241004.0)(@opentelemetry/api@1.9.0)(postgres@3.4.4)(react@18.3.1))(magicast@0.3.5)(webpack-sources@3.2.3) nuxi: 3.13.2 @@ -15095,7 +15148,7 @@ snapshots: pkg-types@1.2.0: dependencies: confbox: 0.1.8 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 playwright-core@1.48.0: {} @@ -16463,7 +16516,7 @@ snapshots: jiti: 1.21.6 magic-string: 0.30.11 mkdist: 1.5.9(typescript@5.6.2) - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 pretty-bytes: 6.1.1 @@ -16570,7 +16623,7 @@ snapshots: fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -16589,7 +16642,7 @@ snapshots: fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -16608,7 +16661,7 @@ snapshots: fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -16627,7 +16680,7 @@ snapshots: fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.0 scule: 1.3.0 @@ -16704,7 +16757,7 @@ snapshots: json5: 2.2.3 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 scule: 1.3.0 unplugin: 1.14.1(webpack-sources@3.2.3) @@ -16727,7 +16780,7 @@ snapshots: json5: 2.2.3 local-pkg: 0.5.0 magic-string: 0.30.11 - mlly: 1.7.1 + mlly: 1.7.2 pathe: 1.1.2 scule: 1.3.0 unplugin: 1.14.1(webpack-sources@3.2.3) diff --git a/src/features.ts b/src/features.ts index ce288fff..a4c46d5a 100644 --- a/src/features.ts +++ b/src/features.ts @@ -1,6 +1,5 @@ import { execSync } from 'node:child_process' -import { pathToFileURL } from 'node:url' -import { isAbsolute } from 'pathe' +import { resolvePath } from 'mlly' import type { Nuxt } from '@nuxt/schema' import { logger, addImportsDir, addServerImportsDir, addServerScanDir, createResolver } from '@nuxt/kit' import { joinURL } from 'ufo' @@ -9,7 +8,7 @@ import { $fetch } from 'ofetch' import { addDevToolsCustomTabs } from './utils/devtools' const log = logger.withTag('nuxt:hub') -const { resolve, resolvePath } = createResolver(import.meta.url) +const { resolve } = createResolver(import.meta.url) export interface HubConfig { remote: string | boolean @@ -152,10 +151,10 @@ export async function setupBrowser(nuxt: Nuxt) { export async function setupCache(nuxt: Nuxt) { // Add Server caching (Nitro) - let driver = await resolvePath('./runtime/cache/driver') - if (nuxt.options.dev && isAbsolute(driver)) { - driver = pathToFileURL(driver).href - } + const driver = await resolvePath('./runtime/cache/driver', { + url: import.meta.url, + extensions: ['.js', '.mjs'] + }) nuxt.options.nitro = defu(nuxt.options.nitro, { storage: { cache: { From 4dac367574c156acd88ef3da6ed3b5013d82d0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:20:08 +0200 Subject: [PATCH 03/11] chore: update and add windows in CI --- .github/workflows/ci.yml | 20 +++++++++++++++++--- package.json | 1 - pnpm-lock.yaml | 5 +---- src/features.ts | 10 ++++------ 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45e35e15..7f78a719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: pnpm lint test: - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -66,9 +66,23 @@ jobs: - name: Run test suite run: pnpm test - + release: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: [lint, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org/" + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Prepare environment + run: pnpm dev:prepare - name: Release Nightly - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: pnpm changelogen --bump --canary --publish --publishTag nightly env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index df84a721..51736773 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "destr": "^2.0.3", "h3": "^1.13.0", "mime": "^4.0.4", - "mlly": "^1.7.2", "nitro-cloudflare-dev": "^0.1.6", "ofetch": "^1.4.0", "pathe": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c15a1ad..c4846b0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,9 +38,6 @@ importers: mime: specifier: ^4.0.4 version: 4.0.4 - mlly: - specifier: ^1.7.2 - version: 1.7.2 nitro-cloudflare-dev: specifier: ^0.1.6 version: 0.1.6 @@ -6405,7 +6402,7 @@ packages: site-config-stack@2.2.18: resolution: {integrity: sha512-kwyuCwYZBJikuLN3IB15cGT7SHQQxAitLaDs1b6eNZbb+tBHubVUhj0pnFZnZZi4+5eNCO+3HiZxaU3qpFxP2A==} peerDependencies: - vue: 3.4.38 + vue: ^3 skin-tone@2.0.0: resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} diff --git a/src/features.ts b/src/features.ts index 95ea6e71..c4ffe4a2 100644 --- a/src/features.ts +++ b/src/features.ts @@ -1,5 +1,5 @@ import { execSync } from 'node:child_process' -import { resolvePath } from 'mlly' +import { pathToFileURL } from 'node:url' import type { Nuxt } from '@nuxt/schema' import { join } from 'pathe' import { logger, addImportsDir, addServerImportsDir, addServerScanDir, createResolver } from '@nuxt/kit' @@ -9,7 +9,7 @@ import { $fetch } from 'ofetch' import { addDevToolsCustomTabs } from './utils/devtools' const log = logger.withTag('nuxt:hub') -const { resolve } = createResolver(import.meta.url) +const { resolve, resolvePath } = createResolver(import.meta.url) export interface HubConfig { remote: string | boolean @@ -152,10 +152,8 @@ export async function setupBrowser(nuxt: Nuxt) { export async function setupCache(nuxt: Nuxt) { // Add Server caching (Nitro) - const driver = await resolvePath('./runtime/cache/driver', { - url: import.meta.url, - extensions: ['.js', '.mjs'] - }) + let driver = await resolvePath('./runtime/cache/driver') + driver = pathToFileURL(driver).href nuxt.options.nitro = defu(nuxt.options.nitro, { storage: { cache: { From e5199e9d367a3044c0fe41f2f6233b0aa220b8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:30:41 +0200 Subject: [PATCH 04/11] wtf the ci --- .github/workflows/ci.yml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f78a719..45e35e15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: pnpm lint test: - runs-on: [ubuntu-latest, windows-latest] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -66,23 +66,9 @@ jobs: - name: Run test suite run: pnpm test - release: - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [lint, test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: "https://registry.npmjs.org/" - cache: "pnpm" - - name: Install dependencies - run: pnpm install - - name: Prepare environment - run: pnpm dev:prepare + - name: Release Nightly + if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: pnpm changelogen --bump --canary --publish --publishTag nightly env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From 7831afa112c9fc71f50b809d9898b13cf365995a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:32:35 +0200 Subject: [PATCH 05/11] chore: ci again --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45e35e15..7f78a719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: pnpm lint test: - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -66,9 +66,23 @@ jobs: - name: Run test suite run: pnpm test - + release: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: [lint, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org/" + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Prepare environment + run: pnpm dev:prepare - name: Release Nightly - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: pnpm changelogen --bump --canary --publish --publishTag nightly env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From e6e6422c4efb7b2a7bda6af6f00f5ce3ecae2921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:35:14 +0200 Subject: [PATCH 06/11] wtf --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f78a719..2c894009 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: pnpm lint test: - runs-on: [ubuntu-latest, windows-latest] + runs-on: windows-latest steps: - uses: actions/checkout@v4 From 033e9043bc095a1dcd99c2b9f38502b5ef52c0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:40:06 +0200 Subject: [PATCH 07/11] try both --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c894009..7f78a719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: pnpm lint test: - runs-on: windows-latest + runs-on: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 From d49a829701fff872db8724678fd6b4214f76f21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 11:41:25 +0200 Subject: [PATCH 08/11] fi:x: use strategy --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f78a719..c308f13b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,10 @@ jobs: run: pnpm lint test: - runs-on: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 From 1f98465d0c070ffff73ef0f760f3e7124bee1ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 12:08:44 +0200 Subject: [PATCH 09/11] only ubuntu --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c308f13b..e395678b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] - + os: [ubuntu-latest] + # os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 - run: corepack enable From edf16548aa45739b3c0d21e37fb8fb5e865d8c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 12:29:35 +0200 Subject: [PATCH 10/11] up --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e395678b..57d82273 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] - # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest] + # os: [ubuntu-latest] steps: - uses: actions/checkout@v4 - run: corepack enable @@ -84,7 +84,7 @@ jobs: - name: Install dependencies run: pnpm install - name: Prepare environment - run: pnpm dev:prepare + run: pnpm --shell-emulator dev:prepare - name: Release Nightly run: pnpm changelogen --bump --canary --publish --publishTag nightly env: From 5c4631f126f7d97934ab78082b64c29b94e1aeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 14 Oct 2024 12:30:08 +0200 Subject: [PATCH 11/11] up --- .github/workflows/ci.yml | 2 +- .npmrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57d82273..0ad2d911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: - name: Install dependencies run: pnpm install - name: Prepare environment - run: pnpm --shell-emulator dev:prepare + run: pnpm dev:prepare - name: Release Nightly run: pnpm changelogen --bump --canary --publish --publishTag nightly env: diff --git a/.npmrc b/.npmrc index cf040424..e2ad808f 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ shamefully-hoist=true strict-peer-dependencies=false +shell-emulator=true