From 9961e2d8e922279e446330ea7933272ded6cc21f Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 14 Oct 2026 22:52:27 +0800 Subject: [PATCH] Upgrade Void to 0.28.0 with managed variables patch --- README.md | 7 +-- patches/void@0.27.0.patch | 22 --------- patches/void@0.28.0.patch | 40 +++++++++++++++ pnpm-lock.yaml | 101 ++++++++++++++++++++++++++------------ pnpm-workspace.yaml | 4 +- 5 files changed, 116 insertions(+), 58 deletions(-) delete mode 100644 patches/void@0.27.0.patch create mode 100644 patches/void@0.28.0.patch diff --git a/README.md b/README.md index a763fb2..e65e4a9 100644 --- a/README.md +++ b/README.md @@ -294,10 +294,11 @@ Both CI and manual deployments include `config/production.env` through `worker.vars`. Production deployment starts only after staging passes. `void deploy` never uploads the local `.env`. -The pinned `void@0.27.0` dependency has a patch in `patches/` because its managed +The pinned `void@0.28.0` dependency has a patch in `patches/` because its managed deployment code otherwise discards `worker.vars`. The patch includes these values -in the deployment manifest. Keep it until Void includes this fix. The deployment -smoke check probes each configured package pattern against the running Worker. +in the deployment manifest. Keep it until a release includes the fix in +[Void PR #423](https://github.com/voidzero-dev/void/pull/423). The deployment smoke +check probes each configured package pattern against the running Worker. **Migration for existing projects:** remove the public keys previously uploaded to remote secret storage in both production and staging. A remote secret with diff --git a/patches/void@0.27.0.patch b/patches/void@0.27.0.patch deleted file mode 100644 index 6e78b7b..0000000 --- a/patches/void@0.27.0.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/dist/deploy-Bqe1PYBw.mjs b/dist/deploy-Bqe1PYBw.mjs -index f47d40b72817476b5d55c0f6edc5a349f927c4b5..e3100149fbc8ab2e3ccd461a4d640c2f54d98891 100644 ---- a/dist/deploy-Bqe1PYBw.mjs -+++ b/dist/deploy-Bqe1PYBw.mjs -@@ -9011,7 +9011,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void - const revalidate = collectRevalidate(voidConfig, null); - const prerender = voidConfig.routing?.isr === false ? void 0 : voidConfig.routing?.prerender; - const { schedules, queues } = toManifestSchedulesAndQueues(rawJobs, rawQueues); -- const envVars = {}; -+ const envVars = voidConfig.worker?.vars ?? {}; - await assertEnvSchemaValid(root, client, config.projectId); - const s = createSpinner(); - const onProgress = (msg) => s.message(msg); -@@ -9629,7 +9629,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui - needsSandbox: bindings.needsSandbox - }); - const workerMain = resolveDeployWorkerMain(voidConfig, join(distDir, workerDirName)); -- const envVars = {}; -+ const envVars = voidConfig.worker?.vars ?? {}; - await assertEnvSchemaValid(root, client, config.projectId); - const s = createSpinner(); - const onProgress = (msg) => s.message(msg); diff --git a/patches/void@0.28.0.patch b/patches/void@0.28.0.patch new file mode 100644 index 0000000..01fd612 --- /dev/null +++ b/patches/void@0.28.0.patch @@ -0,0 +1,40 @@ +diff --git a/dist/deploy-B06EQq4t.mjs b/dist/deploy-B06EQq4t.mjs +index 5dac678a9bf3ecf8d9dd54e7344a851ebc5924c7..7395f8d8d9cb101a09e9cabce47b0894cba784ca 100644 +--- a/dist/deploy-B06EQq4t.mjs ++++ b/dist/deploy-B06EQq4t.mjs +@@ -5258,6 +5258,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui + console.warn(`[void] ${fallbackWarning}`); + } + const manifest = assembleVoidManifest(pageScan, isFrameworkMode, { ++ vars: voidConfig.worker?.vars, + bindings: liveConfig ? { + ...bindings, + needsLive: true +diff --git a/dist/deploy-managed-static-CGswbcay.mjs b/dist/deploy-managed-static-CGswbcay.mjs +index 4dfd9b0a4f17c1e9beefd60c190a8969d149ee54..bae389e086504659a27be000dc3a683752d752b3 100644 +--- a/dist/deploy-managed-static-CGswbcay.mjs ++++ b/dist/deploy-managed-static-CGswbcay.mjs +@@ -1884,6 +1884,7 @@ function buildVoidManifest(opts) { + }); + } + if (bindings.needsLive) manifest.live = toLiveManifest(options?.live); ++ if (opts.vars && Object.keys(opts.vars).length > 0) manifest.vars = opts.vars; + if (migrations && migrations.length > 0) manifest.migrations = toMigrationsManifest(migrations, resolvedDialect); + if (schedules && schedules.length > 0) manifest.schedules = schedules; + if (queues && queues.length > 0) manifest.queues = queues; +@@ -1972,6 +1973,7 @@ function buildFrameworkManifest(opts) { + bindings: {} + }; + applyResourceBindings(manifest, opts.bindings, opts.migrations?.length ?? 0, dialect, po?.bindingNames); ++ if (opts.vars && Object.keys(opts.vars).length > 0) manifest.vars = opts.vars; + if (opts.migrations && opts.migrations.length > 0) manifest.migrations = toMigrationsManifest(opts.migrations, dialect); + if (opts.schedules && opts.schedules.length > 0) manifest.schedules = opts.schedules; + if (opts.queues && opts.queues.length > 0) manifest.queues = opts.queues; +@@ -2121,6 +2123,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void + cpuMs: voidConfig.worker?.limits?.cpu_ms + }; + const manifest = buildFrameworkManifest({ ++ vars: voidConfig.worker?.vars, + frameworkName: detected.name, + workerMain: actualWorkerMain, + bindings, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 813d472..5c08ff1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -192,8 +192,8 @@ catalogs: specifier: 5.0.3 version: 5.0.3 void: - specifier: 0.27.0 - version: 0.27.0 + specifier: 0.28.0 + version: 0.28.0 overrides: vite@*: npm:@voidzero-dev/vite-plus-core@1.1.0 @@ -201,7 +201,7 @@ overrides: '@cloudflare/workers-types@*': 5.20261009.1 patchedDependencies: - void@0.27.0: 5a805b1f98e9c6a44072e491c58812a43a523955e508a020b07f38825fd41fb5 + void@0.28.0: 55bb9622c41cfae61112c63b868f9d06924ff21244ac973d837f127805b93274 importers: @@ -240,7 +240,7 @@ importers: version: 5.0.3(@types/node@24.13.3)(@vitest/browser-preview@5.0.3)(@vitest/ui@5.0.3)(@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2)) void: specifier: 'catalog:' - version: 0.27.0(patch_hash=5a805b1f98e9c6a44072e491c58812a43a523955e508a020b07f38825fd41fb5)(@types/node@24.13.3)(@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2))(arktype@2.2.1)(kysely@0.29.5)(valibot@1.4.1(typescript@7.0.2))(vitest@5.0.3)(wrangler@4.149.0(@cloudflare/workers-types@5.20261009.1)(@types/node@24.13.3))(zod@4.6.5) + version: 0.28.0(patch_hash=55bb9622c41cfae61112c63b868f9d06924ff21244ac973d837f127805b93274)(@types/node@24.13.3)(@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2))(arktype@2.2.1)(kysely@0.29.5)(valibot@1.4.1(typescript@7.0.2))(vitest@5.0.3)(wrangler@4.149.0(@cloudflare/workers-types@5.20261009.1)(@types/node@24.13.3))(zod@4.6.5) packages: @@ -1657,20 +1657,20 @@ packages: '@vitest/utils@5.0.3': resolution: {integrity: sha512-77fDTZv8eu1CzlIfgPU2yrl5MXSUaUAOvgdZEeVm3X3WIxUubIX2SforqS6176lT32HCF6uBVMYVqfHxw7o6eg==} - '@void/deploy-cloudflare@0.27.0': - resolution: {integrity: sha512-ZZT7Huk6KhpC00tmWwjeQDk9+g/cKwMUFma7x7bAVgQQyW1YNsPEUMmuhlzP/+BWwbIfGD6xmPX+ivqaz3HHtA==} + '@void/deploy-cloudflare@0.28.0': + resolution: {integrity: sha512-mu9mBpirqaTGJKl4tiHITNQDO5VMx3T+2FB2Mn1Em2Tgw99Qj8AGeXJo5BSjKXDaTzxLhULtjXZgI1Fi8DlCig==} - '@void/deploy-core@0.27.0': - resolution: {integrity: sha512-LJEklzX7a789FqWAhSFPQpxbggo8eZS66Pxf8ApFjQaGzLSn5tdKb7NRusPSH6jEJFaqadFz0ZgpsDXY2JAgew==} + '@void/deploy-core@0.28.0': + resolution: {integrity: sha512-kxDZ7XGKz3zX4iGsovJk6hOLibrzjTMls2WRU7mOqo9xHIbgg1p9/c6W3KBsaenwh9p2cKjzLOMxb1TJRsZ9Wg==} - '@void/edge@0.27.0': - resolution: {integrity: sha512-vq/Ji8wYjly2Y+B0UWSY299XCOBFvUmnJj2vH8JpaMP0/AHjq8xrdeFg2IZ/AwJGnSC03QLj1q7WwELZJ5qw7w==} + '@void/edge@0.28.0': + resolution: {integrity: sha512-6n8EXcZ/0k9RKiXVmxMBnjHY77vPMNAVj3PJHwZHlzVVhtqftFtasS9/7SQXlPcPNhZ1r3OS/qzgWqsCzQiDkg==} - '@void/isr@0.27.0': - resolution: {integrity: sha512-qMzVYsqCmDXU4NvU/0zZvbSKivUzQ9na1QkMsaK6vnLI1Dra2l1grl6MaPuWFidP/IEkRyQpNdJw9IjAcZfl9A==} + '@void/isr@0.28.0': + resolution: {integrity: sha512-x1Txh5KJze252+ujMXGqJVp4VH28TmIS+C0v/6yu4e9DxFxQM50bwVoEs7Y/emNX7AKEE7FBr7U6/nG1ULX8Vg==} - '@void/platform@0.27.0': - resolution: {integrity: sha512-SKVGZxPc8NGSfZIyEJ5f4R6+mWuXl/Wl+4/7quPRlhw1E6yIs0q68MW6aNZPStt11PIZ7nVPnvr9rs/k203q7A==} + '@void/platform@0.28.0': + resolution: {integrity: sha512-3ktk47oWuFVwDU7znD0TkfdZs3FsLrN0vshdYkoD7Oppky9l3hG6H/9GNpGFFLtjHaPod+2jCEy3r+bFvWSZNg==} '@voidzero-dev/vite-plus-core@1.1.0': resolution: {integrity: sha512-Ai6HQP1zG0H3ZrmStEaMVKtDzW0xU3VgMzm3LFaXDQMEp8nAqvp0VGoU8HmpB9xv9vDSl+UxiSNOpuY9T714OQ==} @@ -1952,6 +1952,10 @@ packages: '@yuku-toolchain/types@0.9.5': resolution: {integrity: sha512-KiuLNNgX9uNealaWAR+G3/cMXnRk9x4TY2EkYe/KIag+UPdwiA0RRf1hr1WAxzTP8KGzCTkqUdLPvqh32sEO3w==} + ansi-escapes@7.3.0: + resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} + engines: {node: '>=18'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -2230,6 +2234,10 @@ packages: resolution: {integrity: sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ==} engines: {node: '>4.0'} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + error-stack-parser-es@1.0.5: resolution: {integrity: sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==} @@ -2287,6 +2295,10 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + has-flag@5.0.1: + resolution: {integrity: sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==} + engines: {node: '>=12'} + hono@4.13.13: resolution: {integrity: sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA==} engines: {node: '>=16.9.0'} @@ -2775,6 +2787,14 @@ packages: resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} engines: {node: '>=18'} + supports-hyperlinks@4.6.0: + resolution: {integrity: sha512-FL/q/YePS4tFFTNiBOR+zPk2ZrKheqNtmTJ/9OUZ4e1wKHJofDbGQSmSsxS0XNnabSkqexryCaXGvEKz1vf9UQ==} + engines: {node: '>=20'} + + terminal-link@5.0.0: + resolution: {integrity: sha512-qFAy10MTMwjzjU8U16YS4YoZD+NQLHzLssFMNqgravjbvIPNiqkGFR4yjhJfmY9R5OFU7+yHxc6y+uGHkKwLRA==} + engines: {node: '>=20'} + tinybench@6.1.4: resolution: {integrity: sha512-9APumHG7r4yOk4X4WlkmE71aZcv1gvin1czO3OQ1U9iJcFA5Ja/ygyb0vPOVHTthFozUYs8CLoLUlM8grb2lTQ==} engines: {node: '>=20.0.0'} @@ -2887,12 +2907,12 @@ packages: jsdom: optional: true - void@0.27.0: - resolution: {integrity: sha512-9PpOnXm+wQNTTFsaAafZZrJXXAkkG+PE0Dwzn8ARcEtjAMCAicpXM65jmFEPT+y+kebQgmCaRsSsfFga1pj2Sg==} + void@0.28.0: + resolution: {integrity: sha512-NAu+1hnAka9uRUGJkoWtPoctGpGVxsY90AB9vw3KTSKJpATwHMLQIb5BDyTRmZ8RZMAJvHHgmISCJXslVZAYjA==} engines: {node: '>=24.21.0'} hasBin: true peerDependencies: - '@void/md': 0.27.0 + '@void/md': 0.28.0 arktype: '>=2.0.0' valibot: '>=1.0.0-beta.7' vite: ^8.0.0 @@ -3881,23 +3901,23 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.1 - '@void/deploy-cloudflare@0.27.0': + '@void/deploy-cloudflare@0.28.0': dependencies: - '@void/deploy-core': 0.27.0 + '@void/deploy-core': 0.28.0 jsonc-parser: 3.3.1 - '@void/deploy-core@0.27.0': {} + '@void/deploy-core@0.28.0': {} - '@void/edge@0.27.0': + '@void/edge@0.28.0': dependencies: - '@void/deploy-core': 0.27.0 + '@void/deploy-core': 0.28.0 - '@void/isr@0.27.0': + '@void/isr@0.28.0': dependencies: '@cloudflare/workers-types': 5.20261009.1 - '@void/edge': 0.27.0 + '@void/edge': 0.28.0 - '@void/platform@0.27.0': + '@void/platform@0.28.0': dependencies: pathslash: 0.1.0 @@ -4023,6 +4043,10 @@ snapshots: '@yuku-toolchain/types@0.9.5': {} + ansi-escapes@7.3.0: + dependencies: + environment: 1.1.0 + ansi-regex@5.0.1: {} ansi-styles@5.2.0: {} @@ -4166,6 +4190,8 @@ snapshots: email-validator@2.0.4: {} + environment@1.1.0: {} + error-stack-parser-es@1.0.5: {} es-module-lexer@2.3.2: {} @@ -4280,6 +4306,8 @@ snapshots: graceful-fs@4.2.11: {} + has-flag@5.0.1: {} + hono@4.13.13: {} iconv-lite@0.7.3: @@ -4618,6 +4646,16 @@ snapshots: supports-color@10.2.2: {} + supports-hyperlinks@4.6.0: + dependencies: + has-flag: 5.0.1 + supports-color: 10.2.2 + + terminal-link@5.0.0: + dependencies: + ansi-escapes: 7.3.0 + supports-hyperlinks: 4.6.0 + tinybench@6.1.4: {} tinyexec@1.3.0: {} @@ -4759,7 +4797,7 @@ snapshots: transitivePeerDependencies: - msw - void@0.27.0(patch_hash=5a805b1f98e9c6a44072e491c58812a43a523955e508a020b07f38825fd41fb5)(@types/node@24.13.3)(@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2))(arktype@2.2.1)(kysely@0.29.5)(valibot@1.4.1(typescript@7.0.2))(vitest@5.0.3)(wrangler@4.149.0(@cloudflare/workers-types@5.20261009.1)(@types/node@24.13.3))(zod@4.6.5): + void@0.28.0(patch_hash=55bb9622c41cfae61112c63b868f9d06924ff21244ac973d837f127805b93274)(@types/node@24.13.3)(@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2))(arktype@2.2.1)(kysely@0.29.5)(valibot@1.4.1(typescript@7.0.2))(vitest@5.0.3)(wrangler@4.149.0(@cloudflare/workers-types@5.20261009.1)(@types/node@24.13.3))(zod@4.6.5): dependencies: '@cloudflare/build-output-utils': 0.9.0 '@cloudflare/codemods': 0.4.2 @@ -4769,11 +4807,11 @@ snapshots: '@cloudflare/workers-auth': 0.13.1(vitest@5.0.3) '@cloudflare/workers-types': 5.20261009.1 '@napi-rs/keyring': 2.1.0 - '@void/deploy-cloudflare': 0.27.0 - '@void/deploy-core': 0.27.0 - '@void/edge': 0.27.0 - '@void/isr': 0.27.0 - '@void/platform': 0.27.0 + '@void/deploy-cloudflare': 0.28.0 + '@void/deploy-core': 0.28.0 + '@void/edge': 0.28.0 + '@void/isr': 0.28.0 + '@void/platform': 0.28.0 better-auth: 1.7.7(drizzle-kit@0.31.11)(drizzle-orm@0.45.4(@cloudflare/workers-types@5.20261009.1)(better-sqlite3@13.0.3)(kysely@0.29.5)(mysql2@3.24.5(@types/node@24.13.3))(pg@8.23.1))(mysql2@3.24.5(@types/node@24.13.3))(pg@8.23.1)(vitest@5.0.3) better-sqlite3: 13.0.3 blake3-jit: 1.1.0 @@ -4795,6 +4833,7 @@ snapshots: pg: 8.23.1 postal-mime: 4.0.5 proper-lockfile: 4.1.2 + terminal-link: 5.0.0 vite: '@voidzero-dev/vite-plus-core@1.1.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(typescript@7.0.2)' optionalDependencies: arktype: 2.2.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1cfb11f..a73c207 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -27,7 +27,7 @@ catalog: vite-plus: 1.1.0 vitest: 5.0.3 # Keep the managed-deploy vars patch until an upstream release includes it. - void: 0.27.0 + void: 0.28.0 overrides: vite@*: 'catalog:' vitest@*: 'catalog:' @@ -40,4 +40,4 @@ peerDependencyRules: vite: '*' vitest: '*' patchedDependencies: - void@0.27.0: patches/void@0.27.0.patch + void@0.28.0: patches/void@0.28.0.patch