Skip to content

[wrangler] Migrate all remaining tsup builds to tsdown - #14578

Merged
petebacondarwin merged 8 commits into
mainfrom
penalosa/tsdown-utils-migration
Nov 18, 2026
Merged

petebacondarwin merged 8 commits into
mainfrom
penalosa/tsdown-utils-migration

Conversation

@penalosa

@penalosa penalosa commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Preserve Wrangler's CommonJS CLI, ESM configuration entry point, embedded Worker builds, package exports, source maps, and shared deploy-helper context.
  • Preserve function and class names in the migrated runtime bundles. A one-line declaration-plugin patch removes an unused name-preservation helper import from generated types.
  • Bundle Node.js shims only where needed, and provide a file URL when Miniflare and C3 rebundle ESM dependencies into CommonJS.
  • Generate shared declarations from their sources instead of maintaining copied interfaces. Keep public type dependencies installed and preserve workers-utils' unique symbol identities across packages.
  • Add built-entry-point and isolated published-type regression checks for workers-utils, Wrangler, and the Vite plugin. The declaration checks include first-party dependencies and exposed a missing Miniflare plugin-registry type import, fixed at its source.

Validation:

  • pnpm check (workspace builds, dependency validation, lint, formatting, type checks, and type tests).
  • Full Wrangler unit suite: 285 files passed, 5,943 tests passed.
  • Shared package suites for workers-utils, workers-auth, autoconfig, deploy-helpers, containers-shared, shared-ast-primitives, codemods, and kv-asset-handler.
  • C3, Vite plugin, and Vitest plugin unit/integration suites.
  • Isolated Wrangler and Vite declaration consumers with skipLibCheck: false, Node and Worker ambient types, and published dependencies; direct ESM imports and browser/Worker imports without Node built-ins.

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this changes package builds and declaration packaging without adding user-facing configuration or commands. Contributor and package build guidance is updated in this PR.

@changeset-bot

changeset-bot Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f41c43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
miniflare Patch
create-cloudflare Patch
@cloudflare/workers-utils Patch
@cloudflare/workers-auth Patch
@cloudflare/deploy-helpers Patch
@cloudflare/kv-asset-handler Patch
@cloudflare/autoconfig Patch
@cloudflare/containers-shared Patch
@cloudflare/codemods Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch
wrangler Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/cli-shared-helpers Patch

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

@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14578

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@14578

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@14578

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@14578

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@14578

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14578

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14578

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14578

miniflare

npm i https://pkg.pr.new/miniflare@14578

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@14578

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14578

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@14578

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14578

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14578

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@14578

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14578

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14578

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14578

wrangler

npm i https://pkg.pr.new/wrangler@14578

commit: 0f41c43

@ask-bonk

ask-bonk Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This test correctly imports from the two entry points and this test would catch a splitting regression. Note this test imports from @cloudflare/deploy-helpers and @cloudflare/deploy-helpers/context, which resolve to dist/*.mjs — so it exercises the actual built output, validating the singleton behavior. Good.

I've completed a thorough review. Let me summarize my findings:

Assessment:

  1. workers-utils tsdown config — Correctly externalizes runtime dependencies (undici), bundles devDependencies (workspace .ts-source packages). mainFields: ["module", "main"] for jsonc-parser is well-reasoned. Matches old tsup behavior (which externalized @cloudflare/* + vitest + undici, bundled the rest). ✓

  2. workers-auth tsdown config — @cloudflare/workers-utils is a runtime dep (externalized), test-helper devDeps kept external. Matches old behavior. Dropping keepNames is safe (error classes use explicit toString(), ESM output isn't minified). ✓

  3. deploy-helpers tsdown config — devDeps @cloudflare/config/containers-shared/workers-shared bundled, runtime deps external, zod kept external. Matches old noExternal/external split. The bundled @cloudflare/config contains an unanalyzable dynamic import with import attributes — but PR reports tests/build green. ✓

  4. import.meta.url shims (miniflare, c3) — Match wrangler's proven pathToFileURL(__filename) approach exactly, correctly injected with define: { "import.meta.url": "import_meta_url" }. ✓

  5. Test change — Correctly updated comment; test still validates code-splitting singleton via built .mjs output. ✓

  6. Version pinning — tsdown@0.16.3 consistent with the majority of repo packages. Lockfile correctly updated. ✓

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 @cloudflare/config's dynamic import into deploy-helpers via rolldown) is covered by passing tests.

LGTM

github run

@penalosa penalosa changed the title [workers-utils] Migrate workers-utils, workers-auth, and deploy-helpers to tsdown [wrangler] Migrate all remaining tsup builds to tsdown Jul 7, 2026
@penalosa
penalosa marked this pull request as ready for review July 8, 2026 11:38
@penalosa
penalosa requested a review from workers-devprod as a code owner July 8, 2026 11:38
@workers-devprod
workers-devprod requested review from a team and dario-piotrowicz and removed request for a team July 8, 2026 11:39
@workers-devprod

workers-devprod commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/import-meta-url-cjs-bundles.md: [@cloudflare/wrangler]
  • .changeset/tsdown-migration-esm-output.md: [@cloudflare/wrangler]
  • .changeset/wrangler-tsdown-build.md: [@cloudflare/wrangler]
  • packages/autoconfig/package.json: [@cloudflare/wrangler]
  • packages/autoconfig/tsconfig.json: [@cloudflare/wrangler]
  • packages/autoconfig/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/autoconfig/tsup.config.ts: [@cloudflare/wrangler]
  • packages/cli/package.json: [@cloudflare/wrangler]
  • packages/codemod/package.json: [@cloudflare/wrangler]
  • packages/codemod/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/codemod/tsup.config.ts: [@cloudflare/wrangler]
  • packages/config/package.json: [@cloudflare/wrangler]
  • packages/containers-shared/package.json: [@cloudflare/cloudchamber @cloudflare/wrangler]
  • packages/containers-shared/tsdown.config.ts: [@cloudflare/cloudchamber @cloudflare/wrangler]
  • packages/create-cloudflare/import-meta-url.js: [@cloudflare/wrangler]
  • packages/create-cloudflare/scripts/build.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/package.json: [@cloudflare/wrangler]
  • packages/deploy-helpers/tests/index.test.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tsup.config.ts: [@cloudflare/wrangler]
  • packages/kv-asset-handler/package.json: [@cloudflare/wrangler]
  • packages/kv-asset-handler/src/index.ts: [@cloudflare/wrangler]
  • packages/kv-asset-handler/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/kv-asset-handler/tsup.config.ts: [@cloudflare/wrangler]
  • packages/miniflare/import-meta-url.js: [@cloudflare/wrangler]
  • packages/miniflare/scripts/build.mjs: [@cloudflare/wrangler]
  • packages/vite-plugin-cloudflare/package.json: [@cloudflare/wrangler]
  • packages/vitest-pool-workers/package.json: [@cloudflare/wrangler]
  • packages/workers-auth/package.json: [@cloudflare/wrangler]
  • packages/workers-auth/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/workers-auth/tsup.config.ts: [@cloudflare/wrangler]
  • packages/workers-utils/package.json: [@cloudflare/wrangler]
  • packages/workers-utils/src/construct-wrangler-config.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/types.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/worker.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/workers-shared-config.compat.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/workers-shared-config.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/xdg-app-paths.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tsup.config.ts: [@cloudflare/wrangler]
  • packages/wrangler/import_meta_url.js: [@cloudflare/wrangler]
  • packages/wrangler/package.json: [@cloudflare/wrangler]
  • packages/wrangler/scripts/deps.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/test-harness.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/workflows-introspection-types.compat.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/workflows-introspection-types.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/dev/dev-vars.ts: [@cloudflare/wrangler]
  • packages/wrangler/tsconfig.json: [@cloudflare/wrangler]
  • packages/wrangler/tsdown.config.mts: [@cloudflare/wrangler]
  • packages/wrangler/tsdown.config.ts: [@cloudflare/wrangler]
  • packages/wrangler/tsup.config.ts: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]
  • pnpm-workspace.yaml: [@cloudflare/wrangler]

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@workers-devprod
workers-devprod requested a review from a team July 8, 2026 16:10
devin-ai-integration[bot]

This comment was marked as resolved.

@penalosa
penalosa marked this pull request as draft July 10, 2026 12:10
@screenfluent

Copy link
Copy Markdown

Does this migration intend to make the published declaration entrypoints
self-contained for normal consumers? I can reproduce the current external type
dependency problem with the latest exact releases:

https://github.com/screenfluent/upstream-type-repros/tree/2b0ff6d355a8631199c2d6cbe45f397f472ae222/cloudflare-tooling-declarations

npm ci
npm run reproduce

Representative diagnostics:

@cloudflare/vite-plugin/dist/index.d.mts:
Cannot find module '@cloudflare/workers-utils'

wrangler/wrangler-dist/cli.d.ts:
Cannot find module '@cloudflare/workers-utils'
Cannot find module '@cloudflare/containers-shared'
Cannot find module '@cloudflare/workers-shared'
Cannot find module '@cloudflare/remote-bindings'
Cannot find module '@cloudflare/deploy-helpers'

Versions: @cloudflare/vite-plugin@1.54.0, wrangler@4.126.0,
typescript@7.0.2, with strict: true and skipLibCheck: false.

If this PR is intended to address that publication surface, I would be happy to
adapt the reproduction into a fixture for the expected post-migration package.

@workers-devprod

Copy link
Copy Markdown
Contributor

@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.

@petebacondarwin
petebacondarwin marked this pull request as ready for review November 18, 2026 13:01
@workers-devprod

workers-devprod commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/containers-shared/package.json: [@cloudflare/cloudchamber]
  • packages/containers-shared/tsconfig.json: [@cloudflare/cloudchamber]
  • packages/containers-shared/tsdown.config.ts: [@cloudflare/cloudchamber]
  • packages/containers-shared/tsup.config.ts: [@cloudflare/cloudchamber]

devin-ai-integration[bot]

This comment was marked as resolved.

clanky-the-clanker[bot]

This comment was marked as resolved.

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/create-cloudflare/scripts/build.ts
  • packages/deploy-helpers/package.json
  • packages/deploy-helpers/tsdown.config.ts
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/import-meta-url.js
  • packages/miniflare/scripts/build.mjs
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • packages/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: 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. (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
  1. 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 root package.json:63 and packages/wrangler/package.json:210 still declare node >=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.
  2. keepNames was dropped (INFO). Every removed tsup config set keepNames: true, and none of the tsdown configs sets an equivalent. Some code reads constructor.name, so class names could change if the bundler renames a class to avoid a name collision.
  3. Stale tsconfig include (INFO). packages/wrangler/tsconfig.json still lists tsdown.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

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/create-cloudflare/scripts/build.ts
  • packages/deploy-helpers/package.json
  • packages/deploy-helpers/tsdown.config.ts
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/import-meta-url.js
  • packages/miniflare/scripts/build.mjs
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • patches/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
  1. tsdown needs a newer Node than the repository allows (WARNING).
    • pnpm-lock.yaml:15299 gives tsdown 0.22.14 engines: {node: ^22.18.0 || >=24.11.0}.
    • The root package.json:63 and packages/wrangler/package.json:210 still declare node >=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

@petebacondarwin
petebacondarwin force-pushed the penalosa/tsdown-utils-migration branch from 712626e to 22589d8 Compare November 18, 2026 14:18

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • patches/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:15299 gives tsdown 0.22.14 engines: {node: ^22.18.0 || >=24.11.0}. pnpm-workspace.yaml:154 pins that version in the catalog.
  • The root package.json:63 and packages/wrangler/package.json:209 still declare node >=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-shared is still bundled through alwaysBundle.
  • Wrangler: the dependency moves match EXTERNAL_DEPENDENCIES in scripts/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

Comment thread pnpm-workspace.yaml Resolved

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • patches/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-15299 gives tsdown 0.22.14 engines: {node: ^22.18.0 || >=24.11.0}. pnpm-workspace.yaml:155 pins that version in the catalog.
  • The root package.json:63 and packages/wrangler/package.json:209 still declare "node": ">=22.12.0".
  • No engine-strict setting 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.node to >=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

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • patches/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:15299 lists tsdown 0.22.14 with engines: {node: ^22.18.0 || >=24.11.0}, and pnpm-workspace.yaml:155 pins that version in the catalog.
  • The root package.json:63 still 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.node to >=22.18.0, or document the minimum Node version for contributors.

Change since the last review

  • packages/wrangler/tsconfig.json drops the deleted tsdown.config.mts from include and sets allowImportingTsExtensions. That flag lets tsdown.config.ts import ./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

@petebacondarwin
petebacondarwin force-pushed the penalosa/tsdown-utils-migration branch from 42c07e5 to e21d64b Compare November 18, 2026 16:08

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/workers-utils/tsconfig.json
  • patches/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>

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/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 petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners bypass

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.json
  • packages/autoconfig/tsconfig.json
  • packages/autoconfig/tsdown.config.ts
  • packages/build-output-utils/package.json
  • packages/cli/package.json
  • packages/codemods/package.json
  • packages/codemods/tsdown.config.ts
  • packages/config/package.json
  • packages/config/tsdown.config.ts
  • packages/containers-shared/package.json
  • packages/containers-shared/tsconfig.json
  • packages/containers-shared/tsdown.config.ts
  • packages/create-cloudflare/import-meta-url.js
  • packages/kv-asset-handler/package.json
  • packages/kv-asset-handler/src/index.ts
  • packages/kv-asset-handler/tsdown.config.ts
  • packages/miniflare/src/plugins/index.ts
  • packages/pages-functions/package.json
  • packages/pages-functions/tsdown.config.ts
  • packages/remote-bindings/package.json
  • packages/remote-bindings/tsdown.config.ts
  • packages/runtime-types/package.json
  • packages/shared-ast-primitives/package.json
  • packages/shared-ast-primitives/tsdown.config.ts
  • packages/vite-plugin-cloudflare/package.json
  • packages/vite-plugin-cloudflare/tsdown.config.ts
  • packages/vitest-plugin/package.json
  • packages/vitest-plugin/src/pool/config.ts
  • packages/vitest-plugin/tsdown.config.ts
  • packages/workers-auth/package.json
  • packages/workers-auth/tsdown.config.ts
  • packages/workers-utils/package.json
  • packages/workers-utils/src/construct-wrangler-config.ts
  • packages/workers-utils/src/logger.ts
  • packages/workers-utils/src/types.ts
  • packages/workers-utils/src/worker.ts
  • packages/workers-utils/src/xdg-app-paths.ts
  • packages/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.yml run after pnpm run check, which runs pnpm build through check:package-deps. The wrangler-dist and dist outputs therefore exist when the checks start.
  • Entry points: The paths in tools/test/check-built-entry-points.ts match the package manifests:
    • Wrangler: wrangler-dist/cli.js and wrangler-dist/experimental-config.mjs
    • Vite plugin: dist/index.mjs
  • Temporary directory: published-types.ts removes 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-party node_modules declarations 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 guarded console[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 workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Nov 18, 2026
@petebacondarwin
petebacondarwin merged commit 6750663 into main Nov 18, 2026
86 of 88 checks passed
@petebacondarwin
petebacondarwin deleted the penalosa/tsdown-utils-migration branch November 18, 2026 20:14
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Nov 18, 2026
brandhaug added a commit to brandhaug/b2b-saas-starter that referenced this pull request Nov 22, 2026
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants