Repository navigation
[wrangler] Migrate all remaining tsup builds to tsdown - #14578
Conversation
🦋 Changeset detectedLatest commit: 0f41c43 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
✅ All changesets look good |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
This test correctly imports from the two entry points and this test would catch a splitting regression. Note this test imports from I've completed a thorough review. Let me summarize my findings: Assessment:
No logic bugs, security issues, backward-compat violations, or incorrect API behavior found. The changes are well-documented, mirror existing proven patterns (wrangler), and preserve the prior bundling semantics. The one theoretically risky area (bundling LGTM |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
|
Does this migration intend to make the published declaration entrypoints npm ci
npm run reproduceRepresentative diagnostics: Versions: If this PR is intended to address that publication surface, I would be happy to |
|
@penalosa nobody has worked on this pull request for more than 30 days (the last push was on 2026-07-08 and the last comment on 2026-08-26), so I'll close it in 7 days unless someone picks it up. If that happens after it's closed, you can reopen it yourself or ask a maintainer to. |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
There was a problem hiding this comment.
Superseded by the review of
712626e7.
This review, of ec15cb14
💬 Approved with comments — One WARNING: tsdown 0.22.14 needs Node ^22.18.0 || >=24.11.0, but the engines field allows >=22.12.0. This affects only contributors' local builds; CI pins 22.22.1. The other two items are INFO notes.
Findings: 1 warning · 2 info
Not opened by the correctness review: 44 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/create-cloudflare/scripts/build.tspackages/deploy-helpers/package.jsonpackages/deploy-helpers/tsdown.config.tspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/import-meta-url.jspackages/miniflare/scripts/build.mjspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpackages/workers-utils/tsdown.config.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 #14578.
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 (1)
### [Code Quality] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15296), but the root and Wrangler engines fields declare >=22.12.0, so contributors on Node 22.12–22.17 may be unable to build.
- **File:** pnpm-workspace.yaml:152
## INFO (2)
### [Code Quality] `keepNames: true` was set in every removed tsup config, but no tsdown config sets an equivalent; class `.name` values may change if the bundler renames colliding classes.
- **File:** packages/wrangler/tsdown.config.ts:147
### [Code Quality] packages/wrangler/tsconfig.json still includes `tsdown.config.mts`, which this pull request deletes.
- **File:** packages/wrangler/tsconfig.json:10
📋 Code Quality: ⚠️ 1 warning · 2 info
All three earlier findings still apply at this commit. Only the changesets changed.
Recommendation: 📝 Minor Comments
- [WARNING] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15296), but the root and Wrangler engines fields declare >=22.12.0, so contributors on Node 22.12–22.17 may be unable to build. (
pnpm-workspace.yaml:152) - [INFO]
keepNames: truewas set in every removed tsup config, but no tsdown config sets an equivalent; class.namevalues may change if the bundler renames colliding classes. (packages/wrangler/tsdown.config.ts:147) - [INFO] packages/wrangler/tsconfig.json still includes
tsdown.config.mts, which this pull request deletes. (packages/wrangler/tsconfig.json:10)
View full review
- tsdown needs a newer Node than the repository allows (WARNING). The lockfile says tsdown 0.22.14 needs
engines: {node: ^22.18.0 || >=24.11.0}(pnpm-lock.yaml:15296). The rootpackage.json:63andpackages/wrangler/package.json:210still declarenode >=22.12.0. Contributors on Node 22.12–22.17 may get an engine warning or a failed build. CI pins 22.22.1, so CI and the published packages are not affected. keepNameswas dropped (INFO). Every removed tsup config setkeepNames: true, and none of the tsdown configs sets an equivalent. Some code readsconstructor.name, so class names could change if the bundler renames a class to avoid a name collision.- Stale tsconfig include (INFO).
packages/wrangler/tsconfig.jsonstill liststsdown.config.mts, which this pull request deletes.
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. The build moves to tsdown across several published packages, including Wrangler, and each affected package has a patch changeset. The description reports workspace checks, package test suites and isolated published-type checks.
🔒 Security: ✅ LGTM
This pull request changes build tooling and adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
⚡ Performance: ✅ LGTM
Only build tooling changes, so no runtime hot paths are affected.
📝 Documentation: ✅ LGTM
The updated changesets accurately describe the user-visible import and type fixes.
Reviewed commit: ec15cb14
There was a problem hiding this comment.
Superseded by the review of
22589d8c.
This review, of 712626e7
💬 Approved with comments — One WARNING: tsdown 0.22.14 needs Node ^22.18.0 || >=24.11.0, while the engines field allows >=22.12.0. This affects only local contributor builds, not CI or published packages.
Findings: 1 warning
Not opened by the correctness review: 44 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/create-cloudflare/scripts/build.tspackages/deploy-helpers/package.jsonpackages/deploy-helpers/tsdown.config.tspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/import-meta-url.jspackages/miniflare/scripts/build.mjspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpatches/rolldown-plugin-dts@0.27.14.patch
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 #14578.
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 (1)
### [Code Quality] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root and Wrangler engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally.
- **File:** pnpm-workspace.yaml:154
📋 Code Quality: ⚠️ 1 warning
The tsdown Node-engine mismatch is still open; the keepNames note is resolved.
Recommendation: 📝 Minor Comments
- [WARNING] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root and Wrangler engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally. (
pnpm-workspace.yaml:154)
View full review
- tsdown needs a newer Node than the repository allows (WARNING).
pnpm-lock.yaml:15299gives tsdown 0.22.14engines: {node: ^22.18.0 || >=24.11.0}.- The root
package.json:63andpackages/wrangler/package.json:210still declarenode >=22.12.0. - Contributors on Node 22.12–22.17 meet the declared engines but can still hit engine warnings or failed builds.
- CI pins 22.22.1, so CI and the published packages are not affected.
Resolved since the last review: all tsdown configs now set keepNames (Wrangler's uses keepNames: !cjsDts).
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium.
- The build moves to tsdown across several published packages, including Wrangler, which changes their JavaScript and declaration output.
- Every affected package has a patch changeset.
- The description reports workspace checks, package test suites, and isolated published-type checks.
- The Node engine concern is covered in the code quality section.
🔒 Security: ✅ LGTM
This pull request changes build tooling only and adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
⚡ Performance: ✅ LGTM
This pull request changes build tooling only and does not touch runtime hot paths.
📝 Documentation: ✅ LGTM
The changesets and the updated build guidance match the new tsdown configurations.
Reviewed commit: 712626e7
712626e to
22589d8
Compare
There was a problem hiding this comment.
Superseded by the review of
76a5e1a7.
This review, of 22589d8c
💬 Approved with comments — One WARNING remains: tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0, but the engines fields still allow >=22.12.0. This affects only local contributor builds; CI pins Node 22.22.1, so published packages are not affected.
Findings: 1 warning
Not opened by the correctness review: 39 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpatches/rolldown-plugin-dts@0.27.14.patch
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 #14578.
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 (1)
### [Code Quality] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root and Wrangler engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally.
- **File:** pnpm-workspace.yaml:154
📋 Code Quality: ⚠️ 1 warning
The Node engines mismatch with tsdown is still present; nothing new in the changes since the last review.
Recommendation: 📝 Minor Comments
- [WARNING] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root and Wrangler engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally. (
pnpm-workspace.yaml:154)
View full review
tsdown needs a newer Node.js than the repository allows (still present)
pnpm-lock.yaml:15299gives tsdown 0.22.14engines: {node: ^22.18.0 || >=24.11.0}.pnpm-workspace.yaml:154pins that version in the catalog.- The root
package.json:63andpackages/wrangler/package.json:209still declarenode >=22.12.0. - Contributors on Node 22.12–22.17 meet the declared range but can still get engine warnings or failed builds. CI pins Node 22.22.1, so published packages are not affected.
The changes since the last review are fine:
- deploy-helpers: the externals change is safe. tsdown externalizes declared dependencies, and
@cloudflare/workers-sharedis still bundled throughalwaysBundle. - Wrangler: the dependency moves match
EXTERNAL_DEPENDENCIESinscripts/deps.ts.
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium.
- The build moves to tsdown across several published packages, including Wrangler, which changes their JavaScript and declaration output.
- Every affected package has a patch changeset.
- The description reports workspace checks, package test suites, and isolated published-type checks.
- The Node engine concern is covered in the code quality section.
🔒 Security: ✅ LGTM
This pull request changes build tooling and declaration packaging only, and adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
⚡ Performance: ✅ LGTM
This pull request changes build tooling only and touches no runtime hot paths. Wrangler's embed-workers plugin caches its esbuild contexts and disposes them in closeBundle for non-watch builds.
📝 Documentation: ✅ LGTM
The changesets and the updated build guidance match the new tsdown configurations.
Reviewed commit: 22589d8c
There was a problem hiding this comment.
Superseded by the review of
ea1decb8.
This review, of 76a5e1a7
💬 Approved with comments — One WARNING remains: tsdown 0.22.14 needs Node ^22.18.0 || >=24.11.0, but the engines fields still allow >=22.12.0. This affects only local contributor builds; the pinned Node 22.22.1 meets the requirement. The suggested comment wording on the rolldown-plugin-dts patch has been applied.
Findings: 1 warning
Not opened by the correctness review: 39 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpatches/rolldown-plugin-dts@0.27.14.patch
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 #14578.
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 (1)
### [Code Quality] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root package.json:63 and packages/wrangler/package.json:209 engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally.
- **File:** pnpm-workspace.yaml:155
📋 Code Quality: ⚠️ 1 warning
One open WARNING: tsdown's Node requirement is stricter than the declared engines range.
Recommendation: 📝 Minor Comments
- [WARNING] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root package.json:63 and packages/wrangler/package.json:209 engines fields allow >=22.12.0. Contributors on Node 22.12–22.17 may be unable to build locally. (
pnpm-workspace.yaml:155)
View full review
tsdown needs a newer Node.js than the repository declares (still present)
pnpm-lock.yaml:15297-15299gives tsdown 0.22.14engines: {node: ^22.18.0 || >=24.11.0}.pnpm-workspace.yaml:155pins that version in the catalog.- The root
package.json:63andpackages/wrangler/package.json:209still declare"node": ">=22.12.0". - No
engine-strictsetting exists, so pnpm only warns. Contributors on Node 22.12–22.17 meet the declared range but may still hit engine warnings or failed builds. - The Volta pin (
package.json:67) is Node 22.22.1, which satisfies tsdown, so published packages are not affected. - Fix: raise the root
engines.nodeto>=22.18.0, or document the minimum Node version for contributors.
The only change since the last review is the reworded comment on the rolldown-plugin-dts patch in pnpm-workspace.yaml, which takes the wording @petebacondarwin suggested.
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium.
- The build moves to tsdown across several published packages, including Wrangler, which changes their JavaScript and declaration output.
- Every affected package has a patch changeset.
- The description reports workspace checks, package test suites, and isolated published-type checks.
- The Node engine concern is covered in the code quality section.
🔒 Security: ✅ LGTM
This pull request changes build tooling and declaration packaging only, and adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
⚡ Performance: ✅ LGTM
Build tooling changes only; no runtime hot paths are affected.
📝 Documentation: ✅ LGTM
The changesets and the updated build guidance match the new tsdown configurations.
Reviewed commit: 76a5e1a7
There was a problem hiding this comment.
Superseded by the review of
9760a703.
This review, of ea1decb8
💬 Approved with comments — One WARNING remains: tsdown 0.22.14 needs Node ^22.18.0 || >=24.11.0, but the root engines field still allows >=22.12.0. This affects only local contributor builds, and the pinned Node 22.22.1 meets the requirement. The only change since the last review, in packages/wrangler/tsconfig.json, raises no new issues.
Findings: 1 warning
Not opened by the correctness review: 39 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpatches/rolldown-plugin-dts@0.27.14.patch
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 #14578.
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 (1)
### [Code Quality] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root package.json:63 engines field allows >=22.12.0. Contributors on Node 22.12–22.17 may fail to build locally.
- **File:** pnpm-workspace.yaml:155
📋 Code Quality: ⚠️ 1 warning
One open WARNING: tsdown needs a newer Node.js version than the engines fields allow.
Recommendation: 📝 Minor Comments
- [WARNING] tsdown 0.22.14 requires Node ^22.18.0 || >=24.11.0 (pnpm-lock.yaml:15299), but the root package.json:63 engines field allows >=22.12.0. Contributors on Node 22.12–22.17 may fail to build locally. (
pnpm-workspace.yaml:155)
View full review
tsdown needs a newer Node.js version than the repository declares (still open)
pnpm-lock.yaml:15299lists tsdown 0.22.14 withengines: {node: ^22.18.0 || >=24.11.0}, andpnpm-workspace.yaml:155pins that version in the catalog.- The root
package.json:63still declares"node": ">=22.12.0". Contributors on Node 22.12–22.17 meet that range but can get engine warnings or failed local builds. - The Volta pin (
package.json:67) is Node 22.22.1, which meets tsdown's requirement, so CI and published packages are not affected. - Fix: raise the root
engines.nodeto>=22.18.0, or document the minimum Node version for contributors.
Change since the last review
packages/wrangler/tsconfig.jsondrops the deletedtsdown.config.mtsfromincludeand setsallowImportingTsExtensions. That flag letstsdown.config.tsimport./scripts/deps.ts. The shared base config already enables it, so setting it again is redundant but harmless.
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium.
- The build moves to tsdown across several published packages, including Wrangler, which changes their JavaScript and declaration output.
- Changesets cover the user-visible ESM import and type-resolution fixes.
- The description reports workspace checks, package test suites, and isolated published-type checks.
- Earlier tags and history were not available, so version and tag conventions were not compared.
🔒 Security: ✅ LGTM
This pull request changes build tooling and declaration packaging only. It adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
⚡ Performance: ✅ LGTM
This pull request changes build tooling only and does not touch any runtime hot path.
📝 Documentation: ✅ LGTM
The changesets and the updated build guidance match the new tsdown configurations.
Reviewed commit: ea1decb8
Replay the original migration and the follow-up resolutions from the previous merge of main. Co-authored-by: Pete Bacon Darwin <pbacondarwin@cloudflare.com>
42c07e5 to
e21d64b
Compare
There was a problem hiding this comment.
Superseded by the review of
b0205402.
This review, of e21d64b0
✅ Approved — No new issues: the dotenv named-import change in dev-vars.ts keeps the same behaviour, and the rest of the migration was reviewed before without blocking concerns.
Not opened by the correctness review: 39 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.jsonpatches/rolldown-plugin-dts@0.27.14.patch
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
Overall Risk: Medium
The migration changes the published JavaScript and declaration output of several packages. Patch changesets cover the user-facing import and type fixes. The description reports pnpm check, the package suites and isolated checks of the published types. Earlier release tags were not available here, so version and tag conventions were not compared.
🔒 Security: ✅ LGTM
This pull request changes build tooling and declaration packaging. It adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
📋 Code Quality: ✅ LGTM
The switch in packages/wrangler/src/dev/dev-vars.ts to dotenv's named parse and DotenvParseOutput exports is correct. dotenv provides both, and nothing else depends on the old default-import form. One earlier optional note is still open.
⚡ Performance: ✅ LGTM
Build-tooling changes only. No runtime hot path is affected.
📝 Documentation: ✅ LGTM
The changesets and the contributor guidance match the tsdown configuration.
Reviewed commit: e21d64b0
Co-authored-by: clanky-the-clanker[bot] <342202840+clanky-the-clanker[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Superseded by the review of
0f41c43e.
This review, of b0205402
✅ Approved — No issues found. The only change since the last approved review takes the Node version from package.json (volta 22.23.4), which keeps the deploy step on Node 22.
Not opened by the correctness review: 38 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.json
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
Overall Risk: Medium
The migration changes the published JavaScript and declaration output of several packages. Patch changesets document the import and type fixes users will see. The description reports pnpm check, the package test suites and isolated checks of the published types.
🔒 Security: ✅ LGTM
This pull request changes build tooling and declaration packaging. It adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The AGENTS.md updates match the tsdown migration.
📋 Code Quality: ✅ LGTM
Nothing in the repository still references the tsup configs or helpers that were removed. Externals line up with each package's dependencies and EXTERNAL_DEPENDENCIES. The import-meta-url injection in the Miniflare and C3 builds is consistent. The type-only exports in kv-asset-handler and the satisfies change to the Miniflare plugin registry are correct. The workflow now takes its Node version from package.json, so CI matches the declared version.
⚡ Performance: ✅ LGTM
Build-tooling changes only. No runtime hot path is affected. The build-time plugin that embeds Workers reuses its esbuild contexts and disposes of them outside watch mode.
📝 Documentation: ✅ LGTM
The changesets and the contributor guidance match the tsdown configuration.
Reviewed commit: b0205402
petebacondarwin
left a comment
There was a problem hiding this comment.
Codeowners bypass
There was a problem hiding this comment.
✅ Approved — No issues found. Since the last approved review, the only changes are the CI build-output checks and their helper scripts, and those are correct.
Not opened by the correctness review: 38 changed files it was meant to read
packages/autoconfig/package.jsonpackages/autoconfig/tsconfig.jsonpackages/autoconfig/tsdown.config.tspackages/build-output-utils/package.jsonpackages/cli/package.jsonpackages/codemods/package.jsonpackages/codemods/tsdown.config.tspackages/config/package.jsonpackages/config/tsdown.config.tspackages/containers-shared/package.jsonpackages/containers-shared/tsconfig.jsonpackages/containers-shared/tsdown.config.tspackages/create-cloudflare/import-meta-url.jspackages/kv-asset-handler/package.jsonpackages/kv-asset-handler/src/index.tspackages/kv-asset-handler/tsdown.config.tspackages/miniflare/src/plugins/index.tspackages/pages-functions/package.jsonpackages/pages-functions/tsdown.config.tspackages/remote-bindings/package.jsonpackages/remote-bindings/tsdown.config.tspackages/runtime-types/package.jsonpackages/shared-ast-primitives/package.jsonpackages/shared-ast-primitives/tsdown.config.tspackages/vite-plugin-cloudflare/package.jsonpackages/vite-plugin-cloudflare/tsdown.config.tspackages/vitest-plugin/package.jsonpackages/vitest-plugin/src/pool/config.tspackages/vitest-plugin/tsdown.config.tspackages/workers-auth/package.jsonpackages/workers-auth/tsdown.config.tspackages/workers-utils/package.jsonpackages/workers-utils/src/construct-wrangler-config.tspackages/workers-utils/src/logger.tspackages/workers-utils/src/types.tspackages/workers-utils/src/worker.tspackages/workers-utils/src/xdg-app-paths.tspackages/workers-utils/tsconfig.json
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
Overall Risk: Medium
The migration changes the published JavaScript and declaration output of several packages. Patch changesets document the import and type fixes that users will see. The description reports pnpm check, the package test suites and isolated checks of the published types, which the new CI steps now also run.
🔒 Security: ✅ LGTM
This pull request changes build tooling and how declarations are packaged. It adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The package AGENTS.md updates match the tsdown migration.
📋 Code Quality: ✅ LGTM
- CI placement: The new steps in
test-and-check.ymlrun afterpnpm run check, which runspnpm buildthroughcheck:package-deps. Thewrangler-distanddistoutputs therefore exist when the checks start. - Entry points: The paths in
tools/test/check-built-entry-points.tsmatch the package manifests:- Wrangler:
wrangler-dist/cli.jsandwrangler-dist/experimental-config.mjs - Vite plugin:
dist/index.mjs
- Wrangler:
- Temporary directory:
published-types.tsremoves its temporary directory without following the symlinks back into the workspace. It filters diagnostics by real path, so declarations from first-party packages are checked and third-partynode_modulesdeclarations are not. - Other changes: The type-only exports in kv-asset-handler, the
satisfies Record<string, Plugin>change to the Miniflare plugin registry and the guardedconsole[method]call in the Vitest plugin are all correct.
⚡ Performance: ✅ LGTM
These are build-tooling changes only. No runtime hot path is affected.
📝 Documentation: ✅ LGTM
The changesets, the contributor guidance and the new tools/README.md entries match the tsdown configuration and the new checks.
Reviewed commit: 0f41c43e
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
## pnpm-workspace.yaml (default) ## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@cloudflare/vitest-plugin` | 1.8.4 | 1.8.5 | patch | | `@cloudflare/workers-types` | 5.20261118.1 | 5.20261119.1 | minor | | `miniflare` | 5.20261117.0-beta | 5.20261118.0-beta | minor | | `wrangler` | 4.164.0 | 4.165.0 | minor | ## Release Notes <details> <summary><b>@<!---->cloudflare/vitest-plugin</b> (1.8.4 → 1.8.5)</summary> ### Patch Changes - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#16949](cloudflare/workers-sdk#16949) [`110c162`](cloudflare/workers-sdk@110c162) Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Fail remote RPC binding requests on network errors instead of hanging Remote bindings that connect over RPC treated every network failure, such as being offline, a DNS or TLS error, as a preview reload. The request then waited silently for a reload that never came. These requests now fail with the error, while GET and HEAD requests interrupted by an actual reload are still retried. - [#14578](cloudflare/workers-sdk#14578) [`6750663`](cloudflare/workers-sdk@6750663) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Fix `Dynamic require` errors when importing packages from ES modules Importing these packages in a Node.js ES module could fail with `Dynamic require of "..." is not supported` when a dependency loaded a Node.js built-in. These imports now work without requiring a CommonJS wrapper. - Updated dependencies [[`24bd3c3`](cloudflare/workers-sdk@24bd3c3), [`0a4315f`](cloudflare/workers-sdk@0a4315f), [`8f26e90`](cloudflare/workers-sdk@8f26e90), [`3595295`](cloudflare/workers-sdk@3595295), [`3595295 …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/%40cloudflare/vitest-plugin%401.8.5) </details> <details> <summary><b>miniflare</b> (5.20261117.0-beta → 5.20261118.0-beta)</summary> ### Patch Changes - [#16954](cloudflare/workers-sdk#16954) [`0a4315f`](cloudflare/workers-sdk@0a4315f) Thanks [@<!---->mkuritsu](https://github.com/mkuritsu)! - Local Browser Run sessions now use Chrome 152 Local Browser Run bindings now run Chrome 152.0.7977.64, the same version that Browser Run uses in production. Miniflare will download Chrome 152 the first time you start a local Browser Run session after you upgrade. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ------------------------- | ------------- | ------------- | | @<!---->cloudflare/workers-types | ^5.20261117.1 | ^5.20261118.1 | | workerd | 1.20261117.1 | 1.20261118.1 | - [#14578](cloudflare/workers-sdk#14578) [`6750663`](cloudflare/workers-sdk@6750663) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Fix startup failures in Miniflare and C3 when loading ESM dependencies Miniflare and `create-cloudflare` can now load dependencies that use Node.js's `createRequire()` without failing on an invalid file URL. This prevents these dependencies from causing an error before …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/miniflare%405.20261118.0-beta) </details> <details> <summary><b>wrangler</b> (4.164.0 → 4.165.0)</summary> ### Minor Changes - [#10598](cloudflare/workers-sdk#10598) [`24bd3c3`](cloudflare/workers-sdk@24bd3c3) Thanks [@<!---->Ehbraheem](https://github.com/Ehbraheem)! - Add a new `--force` flag to `d1 migrations apply` which skips the interactive confirmation and applies any pending migrations non-interactively. This is useful for CI and automation. Usage example: ``` wrangler d1 migrations apply <db> --remote --force ``` Fixes #5017 ### Patch Changes - [#16019](cloudflare/workers-sdk#16019) [`8f26e90`](cloudflare/workers-sdk@8f26e90) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Correct the dry-run setup message to say "exiting now" instead of "existing now". The previous wording contained a typo and appeared in Wrangler setup output and other consumers of shared autoconfig. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ------------------------- | ------------- | ------------- | | @<!---->cloudflare/workers-types | ^5.20261117.1 | ^5.20261118.1 | | workerd | 1.20261117.1 | 1.20261118.1 | - [#16719](https://github.com/cl …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.165.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Complete the remaining tsup-to-tsdown migration against the current workspace, including the newer Wrangler, workers-auth, workers-utils, deploy-helper, and codemod entry points. All tsdown builds use the shared 0.22.14 catalog entry; tsup and its lockfile dependencies are removed.
Validation:
pnpm check(workspace builds, dependency validation, lint, formatting, type checks, and type tests).skipLibCheck: false, Node and Worker ambient types, and published dependencies; direct ESM imports and browser/Worker imports without Node built-ins.