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
5 new5 fixed2 internal
Release note
Minor Changes
Add
--source-namespaceand--source-repo-nametowrangler queues subscription createfor theartifacts.reposourceThe Event Subscriptions API requires
source.namespaceandsource.repo_nameforartifacts.reposubscriptions, but Wrangler had no way to pass them, so--source artifacts.repoalways failed with a validation error. Both flags are now required for this source, andwrangler queues subscription getshows the subscription's resource as<namespace>/<repo-name>.Add
assets.base_pathsupport to Workers AssetsServe an asset directory from a public URL prefix without changing its on-disk layout:
{ "assets": { "directory": "./public", "base_path": "/docs" } }Wrangler, preview, Miniflare, and generated build configuration preserve the explicitly selected value, while the Asset Worker normalizes it and strips the prefix only for asset lookup. Requests passed to a user Worker, request-facing headers, and redirects retain the public path. Relative pathname inputs are interpreted as root-relative prefixes, URL-shaped values are rejected, and omitting the option preserves existing root-path behavior.
Authored
_headersand_redirectsrules continue to match full public paths. In particular, both the source and destination of an authored200asset rewrite must include the configured public prefix; Asset Worker-generated redirects are prefixed automatically.Add a
--experimental-mode instantoption towrangler kv namespace createThis lets entitled accounts create Workers KV Instant namespaces while the feature is in private beta.
Add email-protected Quick Tunnels to
wrangler devPass one or more
--tunnel-allowed-mailflags to require email authentication when exposing a local development server through a Quick Tunnel. Each value can be an exact email address or a domain pattern.Support deleting secrets with
wrangler versions secret bulkSet a secret's value to
nullin JSON input to remove it from the new Worker version. Bulk output now distinguishes between created and deleted secrets, so retryingwrangler secret bulkwithwrangler versions secret bulkpreserves requested deletions. Deploy the new version withwrangler versions deployto apply the changes to production traffic.
Patch Changes
Improve guidance for conflicting Wrangler configuration files
When user and generated deploy configurations are found under different base paths, Wrangler now identifies the expected deploy configuration location, suggests how to resolve the conflict, and links to the relevant documentation.
Include default module rules in generated Worker types
wrangler typesnow declares the built-in Text, Data, and WebAssembly module patterns even when they are not repeated in the Wrangler configuration, keeping generated types aligned with deployment behavior.Service-worker declaration files are emitted as global scripts so that the generated wildcard module types are visible to imports.
Directory-specific rules retain their scope when TypeScript can represent it; ambiguous relative imports use a union of the possible deployed module types.
When generating combined types for named environments, each environment's effective rules are resolved independently and differing import types are represented as unions.
Fix
r2 object putandr2 bulk putstoring a different key in local modeKeys that are not URL-safe were mangled on the way into local storage.
A key with a space or a non-ASCII character was stored under its percent-encoded name, so a later
r2 object getfor that key reported that the key does not exist.Two keys that differ only after a
#collapsed into a single object, and the second upload replaced the first.A key with a
%that is not a valid escape failed outright with "Invalid URL string.", and one with a valid escape, such as%41.txt, was stored asA.txt.
Spaces, non-ASCII characters,
#and%now survive the trip into local storage. Objects already in local state are left where they are.Show a useful error when
wrangler secret bulkhits an undeployed latest versionwrangler secret putalready explained this case (API error 10215).secret bulkjust dumped the raw API response, which for 10214 talks about logpush and tail_consumers even though you were only uploading secrets.Both commands now point at
wrangler versions secret …instead.Print temporary account notices to stderr
The terms notice, the proof-of-work message, and the "Temporary account ready" claim details printed by
--temporarynow go to stderr instead of stdout. Previously they corrupted command output on stdout, such as the JSON fromwrangler kv namespace list --temporaryor the raw value fromwrangler kv key get --temporary. Commands that lower the log level for--json, such aswrangler d1 execute --json --temporary, also hid the claim URL; it is now shown unless logging is disabled withWRANGLER_LOG=none.Scripts that read the claim URL from stdout should read stderr instead.
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.