[wrangler] Add cf-wrangler delegate entrypoint; remove @cloudflare/wrangler-bundler#14184
Merged
Conversation
🦋 Changeset detectedLatest commit: 4579602 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
Contributor
|
✅ All changesets look good |
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
7fcd717 to
1a24d09
Compare
Contributor
|
@penalosa Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
1a24d09 to
a88b1ef
Compare
penalosa
commented
Jun 9, 2026
a88b1ef to
a88656a
Compare
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
emily-shen
approved these changes
Jun 10, 2026
emily-shen
reviewed
Jun 10, 2026
…angler-bundler Adds an experimental cf-wrangler delegate binary to wrangler, backed directly by the internal startDev (the same function wrangler dev runs) for 1:1 parity, reusing the existing cli.js bundle via CF_WRANGLER_BUNDLER=1. Replaces and removes the separate @cloudflare/wrangler-bundler package. Drops the --config flag from both the cf-wrangler and cf-vite delegates so the wrangler config is found via discovery, keeping the shared spawn contract in sync.
workers-devprod
approved these changes
Jun 10, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
34a8c2e to
73f722c
Compare
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an experimental
cf-wranglerdelegate entrypoint towranglerand removes the separate@cloudflare/wrangler-bundlerpackage, which it replaces.cf-wrangler devis spawned by Cloudflare's "cf-dev" parent process for projects that can't use@cloudflare/vite-plugin(service workers, old compatibility dates, Python, Rust, etc.). It sits directly on wrangler's internalstartDev— the exact functionwrangler devruns — so bundling and runtime behaviour are identical towrangler dev, with nounstable_devtest-harness defaults to keep in sync.cf-wranglerbin callsrunCfWrangler(exported from the existingwrangler-dist/cli.jsbundle) in-process — no re-spawn, no Node version check (the parent tool owns the Node runtime) — so it reaches the internalstartDevwithout a second build artifact.devverb + four flags (--mode,--port,--host,--local); the wrangler config file is found via wrangler's standard discovery. Unknown verbs/flags exit2(the parent's feature-detection signal).--configflag from bothcf-wranglerand the siblingcf-vitedelegate (in@cloudflare/vite-plugin) so the shared spawn contract stays in sync; config is now found via discovery on both sides.@cloudflare/wrangler-bundlerpackage — it was a thinunstable_devshim thatcf-wranglersupersedes.How the old package maps to this change
The standalone
@cloudflare/wrangler-bundleris deleted; its logic moves intopackages/wrangler/src/cf-wrangler/. Git only detects some of these as renames because the dev runner was rewritten:packages/wrangler-bundler/)packages/wrangler/)src/args.tssrc/cf-wrangler/args.ts--config)src/__tests__/args.test.tssrc/__tests__/cf-wrangler/args.test.tssrc/cli.ts(runDevviaunstable_dev)src/cf-wrangler/dev.ts(runDevviastartDev)src/index.ts(re-exports)src/cf-wrangler/index.ts(runCfWranglerverb dispatch)bin/cf-wranglerbin/cf-wrangler.jscli.js'srunCfWrangler)Note: the already-published
@cloudflare/wrangler-bundler@0.1.2should benpm deprecated separately (removing it from the repo only stops future releases).Validated locally: type-check (0 errors), lint, 21 unit tests, and an end-to-end smoke test (boots via
startDev, serves 200, tears down on signal; config discovery works with no--config).cf-wranglerandcf-viteare experimental, internal delegate binaries spawned by Cloudflare tooling — not part of any package's public API and not intended for direct end-user invocation.