Skip to content

[vite-plugin v1 backport] Migrate retained builds and declaration checks - #17049

Merged
petebacondarwin merged 1 commit into
codex/vite-v1-backport-17003from
codex/vite-v1-backport-14578
Nov 20, 2026
Merged

petebacondarwin merged 1 commit into
codex/vite-v1-backport-17003from
codex/vite-v1-backport-14578

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Backports the independently useful retained Vite plugin and private remote-bindings build changes from #14578.

Both packages use the original tsdown 0.22.14 catalog version. The plugin bundles shared declaration dependencies through the original deps.dts.alwaysBundle list and tsc resolver; the original worker externalization becomes deps.neverBundle. The declaration plugin patch is unchanged. Private workspace:* links remain intact.

Necessary v1 adaptations: the upstream build-output consumer checker and CI step keep only the plugin target; Wrangler source, tests and checks are absent here. The published-types helper is unchanged. Existing v1 CI is used instead of main's monorepo workflow. The root Node pin stays 22.22.1, which satisfies tsdown's ^22.18.0 engine; main's Astro-driven Node floor is irrelevant to this maintenance workspace. No public sibling source is restored. The AGENTS build description is already accurate.

Earlier dependency supplier #17012 supplies the public artifacts from #16978, including the public-package part of this migration. This PR contains the remaining local build implementation and coverage, plus one plugin patch changeset; it does not reapply or revert those dependency upgrades.

Validation: pnpm check passes (build, types, lint and format; 58 tasks), pnpm test:ci passes (8 tasks, including 268 plugin tests), and the original published-type consumer check passes before and after. No preexisting v1 consumer-type failure was reproduced; the concrete change is the retained build migration and original declaration-bundling policy. Credentialed E2E/browser/OS matrix not run locally.


  • 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: build internals; the user-facing package remains the v1 plugin.

Note

This is a contribution from an AI agent: Codex.


Devin Review

@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 058fcd8

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin 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

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@penalosa (original author) @petebacondarwin (latest qualifying human approval before merge, current ant-core membership verified), please check this v1 backport of #14578 and approve if it looks good.

It applies the retained plugin/remote-bindings tsdown upgrade and declaration bundling directly. The consumer checker drops only the absent Wrangler target, and CI uses the maintenance workflow. #17012 already supplies the published public-package build changes and dependencies; those are not repeated here. Node 22.22.1 satisfies the retained tool's engine, so the unrelated Astro-driven Node bump is omitted. Full checks, package tests and published-type consumer validation pass. Native stack #17050 is rooted at vite-plugin-v1.

@workers-devprod
workers-devprod requested review from a team and NuroDev and removed request for a team November 19, 2026 14:29
@workers-devprod

workers-devprod commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler

@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/vite-plugin@17049

commit: 058fcd8

@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 found 1 potential issue.

Devin Review

Comment thread .changeset/v1-tsdown-migration.md 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.

✅ Approved — No issues found: the build migration keeps the existing externalization behaviour, registers the declaration patch correctly and adds a consumer check for the plugin's published declarations.

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: moderate. The tsdown migration changes how the published plugin's JavaScript and declarations are produced. The new consumer declaration check in CI reduces that risk.


🔒 Security: ✅ LGTM

These are build-tooling changes only. Nothing in them affects security.


📖 AGENTS.md: ✅ LGTM

The change follows the repository guidelines: private workspace:* links are kept and a plugin changeset is included.


📋 Code Quality: ✅ LGTM

The external options became deps.neverBundle and keep the same predicates. The catalog pins tsdown 0.22.14, and the declaration patch key matches its file. The consumer-check scripts rely only on root devDependencies and on dependencies the plugin already has. The CI step runs after the build.


⚡ Performance: ✅ LGTM

These are build-time tooling changes only, with no runtime performance impact.


📝 Documentation: ✅ LGTM

The changeset accurately describes the change.


Reviewed commit: 058fcd87

Comment thread .changeset/v1-tsdown-migration.md Resolved

@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

@petebacondarwin
petebacondarwin merged commit 8fb66eb into vite-plugin-v1 Nov 20, 2026
29 of 30 checks passed
@petebacondarwin
petebacondarwin deleted the codex/vite-v1-backport-14578 branch November 20, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants