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
7 new4 fixed2 internal
Release note
Minor Changes
Add
default_retentionto Workflow bindings for configuring how long instances are retainedWorkflow instances are retained for an account-wide default period after they finish. You can now set a per-Workflow default in your Wrangler configuration, applied to instances that do not specify their own retention:
{ "workflows": [ { "binding": "MY_WORKFLOW", "name": "my-workflow", "class_name": "MyWorkflow", "default_retention": { "success_retention": "3 days", "error_retention": "7 days" } } ] }Each side is optional and accepts either a duration string such as
"3 days"or a whole number of milliseconds. Durations are interpreted by the Workflows API, which also caps them at your account's retention limit.Include a chronological list of handler events in email test harness results, so programmatic local email tests can assert the order in which messages are received, forwarded, replied to, or rejected.
const result = await server.getWorker().email({ from: "sender@example.com", to: "inbox@example.com", raw: [ "From: Sender <sender@example.com>", "To: Inbox <inbox@example.com>", "Message-ID: <test@example.com>", "Subject: Test email", "", "Hello from the test harness", ].join("\r\n"), }); expect(result.events).toEqual([ { type: "received", timestamp: expect.any(String) }, { type: "forward", timestamp: expect.any(String), messageId: expect.any(String), }, { type: "reply", timestamp: expect.any(String), messageId: expect.any(String), }, ]);Add experimental
wrangler hyperdrive planetscale signaturefor provisioning Cloudflare-billed PlanetScale databaseswrangler hyperdrive planetscale signatureprints a signed authorization as JSON, proving to PlanetScale that Cloudflare will be billed for the database you are about to create:npx wrangler hyperdrive planetscale signature | \ pscale database create <name> \ --org <org> \ --engine postgresql \ --cloudflare-billing @- \ --format jsonpscale database createdefaults to Vitess, so pass--engine postgresqlfor a Postgres database, and--format jsonis recommended when the output is consumed by an agent.This requires
pscalev0.313.0 or newer. Wrangler authorizes the Cloudflare billing side only, so your PlanetScale credentials stay between you andpscale.The signature is a cryptographically signed token that authorizes creating a database billed to your Cloudflare account. Treat it as a credential and do not share it. Piping it, as above, is recommended over passing it as a command line argument.
This command is experimental and its interface may change.
Enable FUSE-capable local container development
Miniflare now automatically passes the Docker privileges needed for FUSE to local Durable Object containers when using local rootless Docker on Linux with
/dev/fuseavailable, or a local Docker engine on macOS or through WSL where Linux containers run in a VM. This applies to Wrangler, the Cloudflare Vite plugin, and direct Miniflare use.Record the selected mode in the Build Output Specification top-level
config.jsonThe mode a build was produced in is now written to
.cloudflare/output/v0/config.jsonas amodefield, alongside the account and compliance settings.Add pull request metadata to
wrangler previewdeploymentswrangler previewnow detects the pull request associated with the current CI run (GitHub Actions, GitLab CI, CircleCI, and a genericPULL_REQUEST_URL/PR_URL/CHANGE_URLfallback) and attaches it, along with the repository URL, to the preview deployment as annotations (workers/pull_request_number,workers/pull_request_url,workers/repository_url).This is best effort: if no pull request can be detected, nothing changes. When a pull request is detected, its URL is now also shown in the
wrangler previewcommand output.Add pull request title to
wrangler previewdeployment annotationswrangler previewnow also detects the title of the pull/merge request associated with the current CI run (GitHub Actions and GitLab CI, plus a genericPULL_REQUEST_TITLEfallback) and attaches it to the preview deployment as theworkers/pull_request_titleannotation, alongside the existing pull request number/URL, repository URL, and commit SHA annotations.This is best effort: if no pull request title can be detected, nothing changes.
Patch Changes
Prepare autoconfig for multiple configuration targets
Add target-specific configuration output and command detection while preserving Wrangler's existing setup and deployment behavior.
Fix
wrangler login --use-keyringincorrectly reporting thatsecret-toolis missing on LinuxLibsecret's
secret-tooldoes not support--version; it prints usage and exits 2, which Wrangler previously interpreted as unavailable. Wrangler now reports it missing only when launching the executable fails.: Explain unavailable Preview URLs after
wrangler previewdeploymentsWhen a Preview deployment has no active URLs, Wrangler now explains how to enable Preview Deployments on workers.dev or a custom domain.
Stop automatically offering to install Cloudflare skills for new users
Wrangler will no longer prompt new users to install Cloudflare skills after commands complete. It will continue to offer updates to skills that Wrangler previously installed.
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.