From 7655b40c269cb2ba5865fd09bb1a770c44731d3e Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 11 Jun 2025 10:41:55 +0200 Subject: [PATCH] chore: revert to latest nitro v2 version --- modules/cloudflare-vars.ts | 25 +--------------------- package.json | 1 - pnpm-lock.yaml | 44 ++++++++++++-------------------------- 3 files changed, 15 insertions(+), 55 deletions(-) diff --git a/modules/cloudflare-vars.ts b/modules/cloudflare-vars.ts index 51315912..ea0b5ba3 100644 --- a/modules/cloudflare-vars.ts +++ b/modules/cloudflare-vars.ts @@ -1,5 +1,4 @@ import { useRuntimeConfig, defineNuxtModule, useNuxt } from 'nuxt/kit' -import { kebabCase } from 'scule' export default defineNuxtModule({ meta: { @@ -9,29 +8,7 @@ export default defineNuxtModule({ const nuxt = useNuxt() nuxt.hook('nitro:config', config => { - const runtimeConfig = useRuntimeConfig() - const vars: Record = {} - - function walkConfig (obj: Record, prefix = '') { - for (const [key, value] of Object.entries(obj)) { - if (typeof value === 'object' && value !== null) { - walkConfig(value, `${prefix}${key}.`) - } - else if (typeof value !== 'object') { - const varKey = `NUXT_${kebabCase(`${prefix}${key}`)}`.toUpperCase().replace(/-/g, '_') - vars[varKey] = value - } - } - } - - walkConfig(runtimeConfig) - - config.cloudflare ||= {} - config.cloudflare.wrangler ||= {} - config.cloudflare.wrangler.vars = { - ...vars, - ...config.cloudflare.wrangler.vars, - } + config.runtimeConfig = useRuntimeConfig() }) }, }) diff --git a/package.json b/package.json index ac04ae5c..b57d6779 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,6 @@ "@nuxt/kit": "4.0.0-alpha.1", "@nuxt/schema": "4.0.0-alpha.1", "@nuxtjs/mdc": "0.17.0", - "nitropack": "npm:nitropack-nightly@2.11.13-20250611-074501.eb43d1c8", "vue": "3.5.16" }, "patchedDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66f9db16..d7773eb1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,6 @@ overrides: '@nuxt/kit': 4.0.0-alpha.1 '@nuxt/schema': 4.0.0-alpha.1 '@nuxtjs/mdc': 0.17.0 - nitropack: npm:nitropack-nightly@2.11.13-20250611-074501.eb43d1c8 vue: 3.5.16 patchedDependencies: @@ -6341,9 +6340,6 @@ packages: resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - h3-nightly@1.15.2-20250418-133010-0c9b276: - resolution: {integrity: sha512-s7CE2w7A7EqAdC/0WIAbNDAuvZB3afNCLXyv3Yvflcih3uKki4mRXMuw1Mq4bvykh0uJfAPZTF1GpOeca4xQ6A==} - h3@1.15.3: resolution: {integrity: sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ==} @@ -7758,8 +7754,8 @@ packages: resolution: {integrity: sha512-Nc3loyVASW59W+8fLDZT1lncpG7llffyZ2o0UQLx/Fr20i7P8oP+lE7+TEcFvXj9IUWU6LjB9P3BH+iFGyp+mg==} engines: {node: ^14.16.0 || >=16.0.0} - nitropack-nightly@2.11.13-20250611-074501.eb43d1c8: - resolution: {integrity: sha512-G9Ce/nKRpM2nvVxDUy0PBM72auu8mGL0pNEuBKyRTa4gZfdymDlpLArfPvG2e4NlUILSvQGTIkq+Hh82ntvbLQ==} + nitropack@2.11.12: + resolution: {integrity: sha512-e2AdQrEY1IVoNTdyjfEQV93xkqz4SQxAMR0xWF8mZUUHxMLm6S4nPzpscjksmT4OdUxl0N8/DCaGjKQ9ghdodA==} engines: {node: ^16.11.0 || >=17.0.0} hasBin: true peerDependencies: @@ -13574,7 +13570,7 @@ snapshots: magic-string: 0.30.17 mlly: 1.7.4 mocked-exports: 0.1.1 - nitropack: nitropack-nightly@2.11.13-20250611-074501.eb43d1c8(better-sqlite3@11.10.0) + nitropack: 2.11.12(better-sqlite3@11.10.0) pathe: 2.0.3 pkg-types: 2.1.0 postcss: 8.5.4 @@ -14579,11 +14575,11 @@ snapshots: transitivePeerDependencies: - '@sanity/types' - '@sanity/presentation-comlink@1.0.21(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1))': + '@sanity/presentation-comlink@1.0.21(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1))': dependencies: '@sanity/client': 7.4.0(debug@4.4.1) '@sanity/comlink': 3.0.5 - '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) + '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) transitivePeerDependencies: - '@sanity/types' @@ -14591,7 +14587,7 @@ snapshots: dependencies: '@sanity/client': 7.4.0(debug@4.4.1) '@sanity/comlink': 3.0.5 - '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) + '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) transitivePeerDependencies: - '@sanity/types' @@ -14600,7 +14596,7 @@ snapshots: '@sanity/client': 6.29.1(debug@4.4.1) '@sanity/uuid': 3.0.2 - '@sanity/preview-url-secret@2.1.11(@sanity/client@7.4.0(debug@4.4.1))': + '@sanity/preview-url-secret@2.1.11(@sanity/client@7.4.0)': dependencies: '@sanity/client': 7.4.0(debug@4.4.1) '@sanity/uuid': 3.0.2 @@ -14796,7 +14792,7 @@ snapshots: '@sanity/visual-editing-csm@2.0.17(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23))(typescript@5.8.3)': dependencies: '@sanity/client': 7.4.0(debug@4.4.1) - '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) + '@sanity/visual-editing-types': 1.1.0(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) valibot: 1.1.0(typescript@5.8.3) transitivePeerDependencies: - '@sanity/types' @@ -14808,7 +14804,7 @@ snapshots: optionalDependencies: '@sanity/types': 3.91.0(@types/react@18.3.23)(debug@4.4.1) - '@sanity/visual-editing-types@1.1.0(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1))': + '@sanity/visual-editing-types@1.1.0(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1))': dependencies: '@sanity/client': 7.4.0(debug@4.4.1) optionalDependencies: @@ -18590,18 +18586,6 @@ snapshots: dependencies: duplexer: 0.1.2 - h3-nightly@1.15.2-20250418-133010-0c9b276: - dependencies: - cookie-es: 1.2.2 - crossws: 0.3.5 - defu: 6.1.4 - destr: 2.0.5 - iron-webcrypto: 1.2.1 - node-mock-http: 1.0.0 - radix3: 1.1.2 - ufo: 1.6.1 - uncrypto: 0.1.3 - h3@1.15.3: dependencies: cookie-es: 1.2.2 @@ -20305,7 +20289,7 @@ snapshots: p-wait-for: 5.0.2 qs: 6.14.0 - nitropack-nightly@2.11.13-20250611-074501.eb43d1c8(better-sqlite3@11.10.0): + nitropack@2.11.12(better-sqlite3@11.10.0): dependencies: '@cloudflare/kv-asset-handler': 0.4.0 '@netlify/functions': 3.1.9(rollup@4.42.0) @@ -20337,7 +20321,7 @@ snapshots: exsolve: 1.0.5 globby: 14.1.0 gzip-size: 7.0.0 - h3: h3-nightly@1.15.2-20250418-133010-0c9b276 + h3: 1.15.3 hookable: 5.5.3 httpxy: 0.1.7 ioredis: 5.6.1 @@ -20644,7 +20628,7 @@ snapshots: mlly: 1.7.4 mocked-exports: 0.1.1 nanotar: 0.2.0 - nitropack: nitropack-nightly@2.11.13-20250611-074501.eb43d1c8(better-sqlite3@11.10.0) + nitropack: 2.11.12(better-sqlite3@11.10.0) nypm: 0.6.0 ofetch: 1.4.1 ohash: 2.0.11 @@ -22108,8 +22092,8 @@ snapshots: '@sanity/message-protocol': 0.13.3 '@sanity/migrate': 3.91.0(@types/react@18.3.23) '@sanity/mutator': 3.91.0(@types/react@18.3.23) - '@sanity/presentation-comlink': 1.0.21(@sanity/client@7.4.0(debug@4.4.1))(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) - '@sanity/preview-url-secret': 2.1.11(@sanity/client@7.4.0(debug@4.4.1)) + '@sanity/presentation-comlink': 1.0.21(@sanity/client@7.4.0)(@sanity/types@3.91.0(@types/react@18.3.23)(debug@4.4.1)) + '@sanity/preview-url-secret': 2.1.11(@sanity/client@7.4.0) '@sanity/schema': 3.91.0(@types/react@18.3.23)(debug@4.4.1) '@sanity/sdk': 0.0.0-alpha.25(@types/react@18.3.23)(debug@4.4.1)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.5.0(react@18.3.1)) '@sanity/telemetry': 0.8.1(react@18.3.1) -- 2.51.2