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
4 new2 fixed2 internal
Release note
Minor Changes
Add a top-level
addressesfield to Wrangler configuration for Email RoutingYou can now declare the inbound email addresses handled by your Worker directly in
wrangler.json:{ "name": "my-worker", "main": "src/index.ts", "compatibility_date": "2026-05-21", "addresses": ["support@example.com", "*@example.com"] }Add Durable Object storage access to
createTestHarness()You can now execute SQL against a SQLite-backed Durable Object to seed or assert the storage state.
const server = createTestHarness({ workers: [{ configPath: "./wrangler.json" }], }); await server.listen(); const worker = server.getWorker(); const storage = await worker.getDurableObjectStorage("COUNTER", { name: "user-123", }); await worker.fetch("/counter/user-123"); const rows = await storage.exec( "SELECT value FROM counters WHERE id = ?", "user-123" ); expect(rows).toEqual([{ value: 1 }]);Emit a typed
runtimeErrorevent on theunstable_startWorkerDevEnv for uncaught Worker exceptionsUncaught Worker exceptions were only source-mapped and printed, so programmatic consumers had to scrape terminal output to observe them. The DevEnv now re-emits a
RuntimeErrorEvent(likereloadComplete) carrying the exception text and source-mapped stack — fed from Miniflare's pretty-error seam via the newhandleUncaughtErroroption for exceptions the runtime catches, and from the inspector for those it does not.
Patch Changes
Support containers in
createTestHarness()Workers configured with containers can now be tested using
createTestHarness(). The harness builds configured images and makes container-backed Durable Objects available during integration tests.Type
unstable_startWorker,DevEnv.startWorker, andConfigController.set/patchagainstWranglerStartDevWorkerInput, so the wrangler-specificdev.structuredLogsHandlerfield the runtime already honors is expressible through the public API. Previously the public signatures took the baseStartDevWorkerInput, and callers passing the handler needed a cast while internal callers (the test harness) routed the wider type around the signature.Register a workers.dev subdomain before uploading a new Worker
Deploying a Worker for the first time on an account that has no workers.dev subdomain failed with an opaque API error raised by the upload request itself (code 10063, "You need a workers.dev subdomain in order to proceed"). Wrangler now checks for a workers.dev subdomain before uploading a brand-new Worker that publishes to workers.dev and prompts you to register one, so you get a clear, actionable message instead of a cryptic API failure. The check is skipped for deploys that don't target workers.dev (routes-only deploys, or
workers_dev: false) and for existing Workers, since their account already has a subdomain.
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.