wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
4.167.0 is the newest release of 4.x.
In short
8 new6 fixed2 internal
Release note
Minor Changes
Apply Email Routing
addressesduring Worker trigger deploymentWorker trigger deployment now reconciles the Worker's Email Routing rules with the top-level
addressesconfig. This runs forwrangler deploy,wrangler triggers deploy, and clients of@cloudflare/deploy-helpers. After the Worker uploads, or whenwrangler triggers deployruns after a version promotion, the deploy helper asks the Email Routing API for a plan, renders the changes grouped by zone (+added,~updated,-deleted,!conflict), prompts once for destructive changes in interactive mode, and applies accepted changes through the per-zone rule endpoints. Purely additive plans apply without a prompt, while non-interactive destructive plans fail without modifying rules.Add
exclude_packagesoption todependencies_instrumentationconfigurationThe
dependencies_instrumentationconfig object now accepts an optionalexclude_packagesfield — an array of package name patterns (with glob-style*wildcards) to exclude from the dependency metadata collected during deploy and version uploads.// wrangler.json { "dependencies_instrumentation": { "exclude_packages": ["@internal/*", "secret-tool"] } }Support Artifacts sources when creating Queue event subscriptions
wrangler queues subscription createnow accepts theartifactsandartifacts.reposource types supported by the Cloudflare API.Expand automatic resource provisioning to Queue, Dispatch Namespace, and Flagship bindings
Deployments can now omit the resource name or ID for these bindings. Wrangler will inherit the existing binding on subsequent deploys, create a deterministically named resource automatically, or offer existing resources during an interactive deploy with automatic creation disabled.
Print Local Explorer API details for headless agent-driven
wrangler devsessionsWhen
wrangler devis started in a headless AI agent environment, Wrangler now prints the Local Explorer API URL and basic resource routes so agents can inspect local Workers and bindings without relying on the interactive UI.Add a
settingsexport to the experimentalcloudflare.config.tsconfigAccount-level settings (
accountId,complianceRegion) now live in a dedicated, namedsettingsexport authored viadefineSettings, rather than on the Worker config. Acloudflare.config.tscan export at most onesettingsobject; the Worker itself is thedefaultexport.// cloudflare.config.ts import { defineSettings, defineWorker } from "wrangler/experimental-config"; import * as entrypoint from "./src/index.ts" with { type: "cf-worker" }; export const settings = defineSettings({ accountId: "<your-account-id>", }); export default defineWorker({ name: "my-worker", entrypoint, compatibilityDate: "2026-05-18", });This is only used behind the experimental new-config path (
wrangler --experimental-new-configand the@cloudflare/vite-pluginexperimental.newConfigoption).Recognise nub as a package manager
wrangler now detects nub — from its
npm_config_user_agentand an installednubbinary — and autoconfig detects nub projects by theirnub.lock, alongside npm, pnpm, yarn, and bun.Add support for redacting sensitive Workflows step output in local dev.
Steps configured with
sensitive: "output"now have their output redacted to[REDACTED]in step logs and step-output responses when running Workflows locally, matching production behavior. The real value is still passed to downstream steps, and step errors are never redacted.
Patch Changes
Drop the "Experimental:" prefix from the resource provisioning header now that automatic provisioning is generally available. The deploy output now reads
The following bindings need to be provisioned:.Fix remote binding previews for accounts without a workers.dev subdomain
Wrangler now automatically registers a workers.dev subdomain when one is required to start a remote binding preview.
Fix stray characters in the Workers Sites asset-key-too-long error
The error thrown when an asset path key exceeds the 512-character limit ended with a stray
",copy-paste artifact, so the message printed to users terminated with...#kv-limits",and the trailing documentation URL was malformed. The message now ends cleanly at the URL.Report the Worker's error for
HEADrequests instead of an internal JSON parse errorA Worker that threw on a
HEADrequest (for examplecurl -I) loggedSyntaxError: Unexpected end of JSON inputfrom miniflare's internals rather than the actual error, anddispatchFetch()rejected with that same misleading error.workerddrops response bodies forHEADrequests, so the serialised error never reached the code that revives it.The error is now also carried in a header, which survives
HEAD, so the original message and source-mapped stack are reported for every method. When no payload is available the reporting degrades to a plain error rather than surfacing a parse failure.Use the new PATCH APIs for versioned secret commands
Wrangler now updates versioned Worker secrets by patching the latest Worker version instead of downloading the latest version contents and uploading a full replacement version. This avoids reconstructing Worker configuration in Wrangler, which should reduce bugs when Workers use less common features. For example, this avoids regressions like the previous placement preservation bug fixed in #13843.
Derive
nodejsCompatModefrom the effective compatibility inputs inunstable_startWorker()The CLI computes the node-compat mode from the effective compatibility date and flags (
args.* ?? parsedConfig.*), but the programmatic path usedinput.build.nodejsCompatModeraw — leaving it unset meant a worker'snodejs_compatflag (from its config file or from input-levelcompatibilityFlags) was silently ignored, so bundling failed to resolve node builtins thatwrangler devhandles.startWorkernow derives the mode the same way when the caller does not provide one: input-levelcompatibilityDate/compatibilityFlagsfirst, then the resolved config, with no-bundle taken from the resolvedbuild.bundlesemantics. Passing an explicitnullstill disables it.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.