wrangler
4.151.3 · 20 Oct 2026MIT OR Apache-2.018.1M / weekRepositoryHomepagenpmAtom feed
Latest releases
All 541 releases4.151.3
20 Oct 2026Allow
wrangler devto start module Workers without a default exportPreviously,
wrangler devfailed to start module Workers that exported only named entrypoints, such as RPC services, unless an unused default export was added. These Workers now start normally in local development without that workaround.Fetch the remote config diff from the configured compliance region
When a Worker was last deployed from the dashboard,
wrangler deployandwrangler versions uploaddownload its remote configuration to compare with the local one. These requests ignored thecompliance_regionfield in the Wrangler configuration file and only honoured theCLOUDFLARE_COMPLIANCE_REGIONenvironment variable. A FedRAMP High Worker configured through the config file would send them toapi.cloudflare.cominstead ofapi.fed.cloudflare.com, and the deploy would fail with authentication errors. They now use the same compliance region as the rest of the deploy.Fail with an error instead of hanging when local dev requests can't work under Bun
Bun's
fetch()ignores the undicidispatcherthat Miniflare routes requests through (oven-sh/bun#39247). Under Bun,createTestHarness()'sserver.fetch()andserver.getWorker()'sfetch(),email()andscheduled()now throw aUserError, requests to the dev server URL get a 503 naming the cause, and starting remote bindings throws aUserError. Each of these used to hang with no error.server.getWorker().getEnv()andgetExport()keep working under Bun.
Patch Changes
Allow
wrangler devto start module Workers without a default exportPreviously,
wrangler devfailed to start module Workers that exported only named entrypoints, such as RPC services, unless an unused default export was added. These Workers now start normally in local development without that workaround.Fetch the remote config diff from the configured compliance region
When a Worker was last deployed from the dashboard,
wrangler deployandwrangler versions uploaddownload its remote configuration to compare with the local one. These requests ignored thecompliance_regionfield in the Wrangler configuration file and only honoured theCLOUDFLARE_COMPLIANCE_REGIONenvironment variable. A FedRAMP High Worker configured through the config file would send them toapi.cloudflare.cominstead ofapi.fed.cloudflare.com, and the deploy would fail with authentication errors. They now use the same compliance region as the rest of the deploy.Fail with an error instead of hanging when local dev requests can't work under Bun
Bun's
fetch()ignores the undicidispatcherthat Miniflare routes requests through (oven-sh/bun#39247). Under Bun,createTestHarness()'sserver.fetch()andserver.getWorker()'sfetch(),email()andscheduled()now throw aUserError, requests to the dev server URL get a 503 naming the cause, and starting remote bindings throws aUserError. Each of these used to hang with no error.server.getWorker().getEnv()andgetExport()keep working under Bun.Stop
--strictdeploys and version uploads from aborting when the API omits optional binding fieldsPreviously,
wrangler deploy --strictandwrangler versions upload --strictcould report a destructive change for an unchanged configuration, for example an R2 bucket in the default jurisdiction, because a field the API left out was compared as removed. Missing and unset optional fields are now treated as equal, so these commands proceed when the local configuration matches the deployed Worker.
4.151.2
19 Oct 2026Only updates a dependency:miniflare 5.20261019.0-beta
4.151.1
16 Oct 2026Keep remote dev sessions alive through transient network failures
wrangler dev --remoteandgetPlatformProxy()refresh their preview token before it expires, but a single failed refresh — for example while the network was briefly down — stopped refreshing for good, leaving the session broken until restart. A failed refresh now retries every minute until it succeeds. Rebuilds also no longer push the refresh past the session's expiry.Fix
wrangler rollbackreporting success after the changed secrets confirmation is declinedPreviously, declining the "The following secrets have changed…" confirmation printed "Aborting rollback..." and then also printed a success message and the target version as the "Current Version ID", even though no deployment was made and the original version was still live. Wrangler now stops after aborting, so the output matches what is actually deployed.
Hide the
wrangler devhotkey bar when Turborepo does not forward input
Patch Changes
Keep remote dev sessions alive through transient network failures
wrangler dev --remoteandgetPlatformProxy()refresh their preview token before it expires, but a single failed refresh — for example while the network was briefly down — stopped refreshing for good, leaving the session broken until restart. A failed refresh now retries every minute until it succeeds. Rebuilds also no longer push the refresh past the session's expiry.Fix
wrangler rollbackreporting success after the changed secrets confirmation is declinedPreviously, declining the "The following secrets have changed…" confirmation printed "Aborting rollback..." and then also printed a success message and the target version as the "Current Version ID", even though no deployment was made and the original version was still live. Wrangler now stops after aborting, so the output matches what is actually deployed.
Hide the
wrangler devhotkey bar when Turborepo does not forward input
4.151.0
14 Oct 2026Include source maps by default in
wrangler build --experimental-cf-build-outputBuild Output now matches
wrangler deployandwrangler versions upload, which upload source maps by default, so Workers built for tools likecfget stack traces that point at the original source. Source maps that can't be resolved are skipped rather than failing the build. Setupload_source_maps = falseto opt out.Support local D1 queries through the experimental
d1_binding_jsrpccompatibility flagLocal D1 bindings now implement the RPC query backend used by
D1Database.query()and prepared-statement methods when the flag is enabled. Queries reuse local SQLite execution, including transactional batches, execution metadata, and session bookmarks, while bindings without the flag continue to use HTTP. Update the bundled workerd runtime to1.20261012.1and align the default compatibility date with that release.
Minor Changes
Include source maps by default in
wrangler build --experimental-cf-build-outputBuild Output now matches
wrangler deployandwrangler versions upload, which upload source maps by default, so Workers built for tools likecfget stack traces that point at the original source. Source maps that can't be resolved are skipped rather than failing the build. Setupload_source_maps = falseto opt out.
Patch Changes
Support local D1 queries through the experimental
d1_binding_jsrpccompatibility flagLocal D1 bindings now implement the RPC query backend used by
D1Database.query()and prepared-statement methods when the flag is enabled. Queries reuse local SQLite execution, including transactional batches, execution metadata, and session bookmarks, while bindings without the flag continue to use HTTP. Update the bundled workerd runtime to1.20261012.1and align the default compatibility date with that release.
4.150.0
13 Oct 2026Upload source maps by default for
wrangler deploy,wrangler versions uploadandwrangler previewWhen
upload_source_mapsisn't set in config or via--upload-source-maps, Wrangler now generates and uploads source maps so stack traces in logs andwrangler tailpoint at your original source without extra setup. In this default mode, source maps that can't be resolved (for example inlinedata:maps or missing.mapfiles from a custom build) are skipped rather than failing the upload. Settingupload_source_maps = truekeeps the existing strict behaviour, andupload_source_maps = false(or--no-upload-source-mapsfor deploy and versions upload) opts out.wrangler build --experimental-cf-build-outputis unchanged and still only includes source maps whenupload_source_maps = true.Stop
wrangler deploy,wrangler versions uploadandwrangler previewin projects that build for the Cloudflare CLI (cf)If your project builds through
cf, deploying it with Wrangler reads a different configuration, so it could update the wrong Worker or fail without explaining why. These commands now stop before uploading anything, name the.cloudflare/outputdirectory they found, and tell you to runcf deployinstead. If that directory is just left over from an earlier build, deleting it restores the Wrangler workflow.Ordinary Wrangler projects are unaffected, and
--dry-runstill works ondeployandversions upload. This is a new guard for the experimental Build Output Specification rather than a fix, and it gives three stable commands a failure mode they did not have before, so it is a minor.Clarify the Worker not found error during CI deploy validation
Wrangler now reports that the configured Worker could not be found in the account instead of incorrectly describing the failure as a name mismatch.
Minor Changes
Upload source maps by default for
wrangler deploy,wrangler versions uploadandwrangler previewWhen
upload_source_mapsisn't set in config or via--upload-source-maps, Wrangler now generates and uploads source maps so stack traces in logs andwrangler tailpoint at your original source without extra setup. In this default mode, source maps that can't be resolved (for example inlinedata:maps or missing.mapfiles from a custom build) are skipped rather than failing the upload. Settingupload_source_maps = truekeeps the existing strict behaviour, andupload_source_maps = false(or--no-upload-source-mapsfor deploy and versions upload) opts out.wrangler build --experimental-cf-build-outputis unchanged and still only includes source maps whenupload_source_maps = true.Stop
wrangler deploy,wrangler versions uploadandwrangler previewin projects that build for the Cloudflare CLI (cf)If your project builds through
cf, deploying it with Wrangler reads a different configuration, so it could update the wrong Worker or fail without explaining why. These commands now stop before uploading anything, name the.cloudflare/outputdirectory they found, and tell you to runcf deployinstead. If that directory is just left over from an earlier build, deleting it restores the Wrangler workflow.Ordinary Wrangler projects are unaffected, and
--dry-runstill works ondeployandversions upload. This is a new guard for the experimental Build Output Specification rather than a fix, and it gives three stable commands a failure mode they did not have before, so it is a minor.
Patch Changes
Clarify the Worker not found error during CI deploy validation
Wrangler now reports that the configured Worker could not be found in the account instead of incorrectly describing the failure as a name mismatch.
Ignore
.wranglerwrites in the dev assets watcherwrangler devreloaded in a loop whenassets.directorywas the project root, because the assets watcher treated wrangler's own writes under.wrangleras asset changes and dropped in-flight requests. The watcher now ignores the project's.wranglerdirectory anddev.persist, except when that path is the assets directory.Fix optional Docker lookups printing Docker CLI errors during successful builds
cf buildlooks for Container images left behind by earlier builds so it can remove them. This lookup is best effort, but when Docker could not be reached it still printed errors such asCannot connect to the Docker daemon, even when the build succeeded and no image needed Docker. Docker commands whose output Wrangler reads no longer forward the Docker CLI's error output to the terminal. If one of these commands fails in a way that stops the command, the error message still includes the Docker CLI's output.Time out the OAuth token request instead of waiting indefinitely
The request that exchanges an authorization code or refresh token for an access token had no timeout, so a stalled connection (for example behind an HTTP proxy) could leave
wrangler loginhanging silently for many minutes after the browser step had succeeded. The request now gives up after 30 seconds and reports that the Cloudflare auth server could not be reached.Preserve binding options when provisioning resources through a redirected config
Wrangler now writes provisioned resource identifiers to both the redirected and original config files without copying other binding options between them. This prevents generated relative paths such as D1
migrations_dirfrom replacing user-authored paths during Vite deployments.Honor
X-Forwarded-Protofor incoming development requests behind TLS-terminating proxiesMiniflare now uses the original client protocol when constructing URLs for network requests. This also prevents Wrangler from downgrading HTTPS URLs in response headers such as
LocationandWWW-Authenticatewhen a tunnel forwards requests over HTTP. Explicit programmatic request URLs and configured upstream origins remain authoritative.
Dependency tracking · free for 3 projects
Know when your own dependencies move
wrangler had 1 security advisory in the last 12 months. Inlinr emails you the day one touches a project of yours, with the version that fixes it.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Registry facts last checked 21 Oct 2026. Releases and advisories last read 21 Oct 2026.