Repository navigation
Support the Cloudflare config 1.0 release candidate and Build Output v1 - #622
Conversation
commit: |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 225.1 ms | 4.4 ms | 219.9 ms | 238.1 ms |
| base | 223.9 ms | 3.0 ms | 220.4 ms | 229.0 ms |
Δ (PR vs base): ↑ +1.3 ms (+0.6%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
|
LGTM |
1cdf431 to
5f41b4f
Compare
There was a problem hiding this comment.
Superseded by the review of
d7edbf83.
This review, of 5f41b4f5
Findings: 4 warnings · 1 info (3 are inline comments on the diff)
Not opened by the correctness review: 10 changed files it was meant to read
packages/cli/package.jsonpackages/cli/src/commands/deploy/containers.tspackages/cli/src/commands/deploy/shared.tspackages/cli/src/commands/deploy/static-assets.tspackages/cli/src/commands/dev/known-impls.tspackages/cli/src/commands/init/template.tspackages/cli/src/commands/previews/deploy.tspackages/cli/src/commands/workers/triggers/deploy.tspackages/cli/src/lib/build-output.tspackages/cli/src/lib/project-settings.ts
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
🔧 Fix with your agent
Paste the following into your coding agent to investigate and fix these issues.
Fix the following code review issues found in pull request #622.
Before making changes, review each issue and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g., the fix would require disproportionate changes
for minimal ROI, or the finding is factually incorrect), explain why
- If you need to clarify something before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
## WARNING (4)
### [Release] Wrangler minimum is still 4.161.0. Projects built with Wrangler versions that write v0 output will be rejected by cf, and rebuilding with those versions does not help
- **File:** packages/cli/src/commands/dev/known-impls.ts:138
### [Security] blockExoticSubdeps is turned off for every transitive dependency, not only the workers-sdk preview packages
- **File:** pnpm-workspace.yaml:13
### [Code Quality] Published runtime dependencies point at commit-pinned pkg.pr.new tarballs and would ship to npm as URL dependencies
- **File:** packages/cli/package.json:72
### [Documentation] packages/cli/README.md:48 says Vite plugin 2.0.0-beta.v.13 or newer is supported, but cf now requires 2.0.0-rc.0 or newer
- **File:** packages/cli/README.md:48
## INFO (1)
### [Code Quality] The new `maxInstances ?? 20` default has no test for the unset case
- **File:** packages/cli/src/commands/deploy/containers.ts:224
📋 Code Quality: ⚠️ 1 warning · 1 info
Runtime dependencies use pkg.pr.new tarball URLs, and the new max_instances default has no test
Recommendation: 📝 Minor Comments
- [WARNING] Published runtime dependencies point at commit-pinned pkg.pr.new tarballs and would ship to npm as URL dependencies (
packages/cli/package.json:72) - [INFO] The new
maxInstances ?? 20default has no test for the unset case (packages/cli/src/commands/deploy/containers.ts:224)
View full review
- Runtime dependencies on pkg.pr.new URLs (
packages/cli/package.json:72-76):@cloudflare/build-output-utils,@cloudflare/config,@cloudflare/runtime-typesandminiflareare independencies, so they ship with the publishedcfpackage. The Forge pkg.pr.new pin, by contrast, is a devDependency. The changeset marks this as aminorrelease. If it ships before these move back to npm versions, users installingcfget URL dependencies on preview builds, and those installs fail wherever URL or exotic dependencies are blocked. This is on the description's pre-merge list, but nothing in the repository enforces it. max_instancesdefault has no test (packages/cli/src/commands/deploy/containers.ts:224): the existing container test passesmaxInstances: 20explicitly. Removing the?? DEFAULT_MAX_INSTANCESfallback would not fail any test.
🚀 Release: ⚠️ 1 warning
The Wrangler minimum still allows versions that write v0 Build Output
Recommendation: 📝 Minor Comments
- [WARNING] Wrangler minimum is still 4.161.0. Projects built with Wrangler versions that write v0 output will be rejected by cf, and rebuilding with those versions does not help (
packages/cli/src/commands/dev/known-impls.ts:138)
View full review
The changeset explains that v0 output is rejected and that projects must be rebuilt. However, packages/cli/src/commands/dev/known-impls.ts:137-138 still accepts wrangler >=4.161.0. cf build delegates to the selected implementation and then reads its Build Output. If a Wrangler version in that range still writes v0 output, rebuilding as the changeset instructs will not fix the failure. Raise the minimum to the first Wrangler release that writes v1 output, and update the README and tests to match. The description lists this as a pre-merge step.
🔒 Security: ⚠️ 1 warning
blockExoticSubdeps is disabled for the whole workspace
Recommendation: 📝 Minor Comments
- [WARNING] blockExoticSubdeps is turned off for every transitive dependency, not only the workers-sdk preview packages (
pnpm-workspace.yaml:13)
View full review
pnpm-workspace.yaml:13setsblockExoticSubdepstofalse. That allows any transitive dependency in the workspace to resolve from a git or tarball URL, not only the workers-sdk preview packages that need it. The comment marks this as temporary, and the description lists restoring it as a pre-merge step, but nothing enforces that.
📝 Documentation: ⚠️ 1 warning
The CLI README still states the old Vite plugin minimum
Recommendation: 📝 Minor Comments
- [WARNING] packages/cli/README.md:48 says Vite plugin 2.0.0-beta.v.13 or newer is supported, but cf now requires 2.0.0-rc.0 or newer (
packages/cli/README.md:48)
View full review
packages/cli/README.md:48still says delegates support "Vite plugin v2 starting at 2.0.0-beta.v.13". The enforced range inpackages/cli/src/commands/dev/known-impls.ts:121is now>=2.0.0-rc.0, so users who follow the README with a beta release get an upgrade error. Update it to2.0.0-rc.0. Update the Wrangler minimum on the same line when that version is raised.
✅ All other checks passed
📖 AGENTS.md: ✅ LGTM
No issues found.
⚡ Performance: ✅ LGTM
No performance concerns.
Reviewed commit: 5f41b4f5
|
🤖 I've done a thorough review of your PR. Migrates cf to Build Output v1 and config 1.0 RC APIs.
|
There was a problem hiding this comment.
🟡 Changes recommended
Configured Vite dev/build paths bypass the minimum plugin-version check, and the container fallback and explicit small-limit behavior lack regression coverage.
2 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
This PR adapts cf’s build and deployment workflows to the Cloudflare config 1.0 release candidate and Build Output v1.
Changes:
- Migrate Build Output to
.cloudflare/output/v1/, nest account settings, and record cf as the static-assets producer. - Default omitted Container limits to 20 and update Vite plugin requirements and scaffolding to the release candidate.
- Update dependencies, tests, fixtures, and documentation; published dependency pins and dependency-policy restoration remain pre-merge steps.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Temporarily permit transitive URL dependencies. |
| pnpm-lock.yaml | Lock workers-sdk preview builds. |
| packages/wrangler-tests/src/__tests__/versions/versions.upload.test.ts | Migrate upload fixtures to v1. |
| packages/wrangler-tests/src/__tests__/deploy/core.test.ts | Use v1 paths and nested account settings. |
| packages/wrangler-tests/package.json | Update compatibility-test dependencies. |
| packages/cli/src/lib/project-settings.ts | Adopt the renamed settings type. |
| packages/cli/src/lib/build-output.ts | Read nested settings and updated config types. |
| packages/cli/src/commands/workers/triggers/deploy.ts | Resolve accounts from nested settings. |
| packages/cli/src/commands/previews/deploy.ts | Use nested preview account settings. |
| packages/cli/src/commands/init/template.ts | Scaffold the Vite plugin release candidate. |
| packages/cli/src/commands/dev/known-impls.ts | Raise the Vite delegate minimum version. |
| packages/cli/src/commands/deploy/static-assets.ts | Write v1 output with producer metadata. |
| packages/cli/src/commands/deploy/shared.ts | Use nested deployment account settings. |
| packages/cli/src/commands/deploy/containers.ts | Adopt new types and default limits to 20. |
| packages/cli/src/__tests__/temporary-accounts.test.ts | Migrate compliance fixtures to v1. |
| packages/cli/src/__tests__/lib/deploy-input.test.ts | Migrate module and asset fixtures to v1. |
| packages/cli/src/__tests__/lib/context.test.ts | Adopt the renamed settings type. |
| packages/cli/src/__tests__/lib/build-output.test.ts | Update reader and config-conversion fixtures. |
| packages/cli/src/__tests__/commands/workers-check.test.ts | Use v1 profiling fixtures. |
| packages/cli/src/__tests__/commands/versions-upload.test.ts | Migrate version-upload fixtures to v1. |
| packages/cli/src/__tests__/commands/triggers-deploy.test.ts | Update trigger fixtures and account settings. |
| packages/cli/src/__tests__/commands/secrets-file.test.ts | Use v1 deployment fixtures. |
| packages/cli/src/__tests__/commands/previews-deploy.test.ts | Nest preview account settings. |
| packages/cli/src/__tests__/commands/previews-deploy-domains.test.ts | Update preview paths and Worker schema. |
| packages/cli/src/__tests__/commands/previews-deploy-containers.test.ts | Migrate preview Container fixtures to v1. |
| packages/cli/src/__tests__/commands/init.test.ts | Assert the release-candidate scaffold dependency. |
| packages/cli/src/__tests__/commands/dev/index.test.ts | Update version checks and installation hints. |
| packages/cli/src/__tests__/commands/deploy/subdomain.test.ts | Migrate subdomain fixtures to v1. |
| packages/cli/src/__tests__/commands/deploy/routes.test.ts | Migrate routing fixtures to v1. |
| packages/cli/src/__tests__/commands/deploy/index.test.ts | Update deployment fixtures and nested settings. |
| packages/cli/src/__tests__/commands/deploy/errors.test.ts | Update fixtures and missing-output expectations. |
| packages/cli/src/__tests__/commands/deploy/deploy-props.test.ts | Migrate upload-metadata fixtures to v1. |
| packages/cli/src/__tests__/commands/deploy/containers.test.ts | Adopt renamed Container config types. |
| packages/cli/src/__tests__/commands/deploy/assets.test.ts | Assert v1 paths, settings, and producer metadata. |
| packages/cli/src/__tests__/commands/build/index.test.ts | Update delegate versions and generated fixtures. |
| packages/cli/package.json | Consume workers-sdk preview dependencies. |
| fixtures/wrangler-bundler-project/package.json | Use the Wrangler preview build. |
| fixtures/vite-plugin-project/package.json | Update Vite and Wrangler fixture dependencies. |
| fixtures/vite-container-project/package.json | Update Container fixture dependencies. |
| docs/architecture.md | Document v1 output and release-candidate scaffolding. |
| .changeset/workers-sdk-config-rc.md | Record the user-facing migration and requirements. |
Review effort: Balanced
5f41b4f to
1c06e14
Compare
|
LGTM |
|
Review: 1 findings. 🤖 I've done a thorough review of your PR. Migrates cf to Build Output v1 and config 1.0 RC dependencies. Posted 1 inline suggestion. |
There was a problem hiding this comment.
✅ Approved — The dependency pins, blockExoticSubdeps, Wrangler and Vite minimums, README version and missing max_instances test from the last review are all fixed, and nothing new needs flagging.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The minor changeset covers Build Output v1, the new config layout, the container defaults and the new delegate minimums. Wrangler's minimum is now 4.163.0.
🔒 Security: ✅ LGTM
blockExoticSubdeps: true is restored, and the dependencies resolve from the npm registry.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
The runtime dependencies use published npm versions. The containers test now omits maxInstances and checks the default of 20. The v1 settings reads and the new early return in autoconfig.ts are both correct.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README now lists the Wrangler 4.163.0 and Vite plugin 2.0.0-rc.0 minimums.
Reviewed commit: d7edbf83

Support the Cloudflare config 1.0 release candidate and Build Output v1 using the published Workers SDK release.
cf now reads and writes Build Output under
.cloudflare/output/v1/. The rootconfig.jsonkeeps account settings undersettingsand records the producer. Output in the older v0 format is rejected, so projects must be rebuilt before deployment. Containermax_instancesdefaults to 20 when omitted, matching Wrangler.Replace the Workers SDK preview packages with published npm versions, including
@cloudflare/config@1.0.0-rc.0,@cloudflare/build-output-utils@1.0.0-rc.0, and@cloudflare/autoconfig@0.13.0. Require Wrangler 4.163.0 or newer and@cloudflare/vite-plugin2.0.0-rc.0 or newer for compatible Build Output. Scaffold the Vite plugin RC incf initand restoreblockExoticSubdeps: true.Keep the installed cf delegate fallback when autoconfig cannot resolve a native Vite command. This lets this migration land before the native Vite work in #540. The intended merge order is #622 → #540 → #634.
Validation:
pnpm check— all 7 tasks passed.pnpm --filter cf test— 2,870 passed, 10 skipped.--mode testproduced Build Output v1 with the expected environment value.cf init --no-installscaffolded@cloudflare/vite-plugin@^2.0.0-rc.0.