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 new8 fixed1 internal
Release note
Minor Changes
Add support for Cloudflare Access Service Token authentication via environment variables
When running
wrangler devwith remote bindings behind a Cloudflare Access-protected domain, Wrangler previously requiredcloudflared access loginwhich opens a browser for interactive authentication. This does not work in CI/CD environments.You can now set the
CLOUDFLARE_ACCESS_CLIENT_IDandCLOUDFLARE_ACCESS_CLIENT_SECRETenvironment variables to authenticate using an Access Service Token instead:export CLOUDFLARE_ACCESS_CLIENT_ID="<your-client-id>.access" export CLOUDFLARE_ACCESS_CLIENT_SECRET="<your-client-secret>" wrangler dev
Additionally, when running in a non-interactive environment (CI) without these credentials, Wrangler now throws a clear, actionable error instead of hanging on
cloudflared access login.Add
ai_search_namespacesandai_searchbinding typesTwo new binding types for AI Search:
ai_search_namespaces: Namespace binding —namespaceis required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets)ai_search: Single instance binding bound directly to a pre-existing instance in the default namespace
Both are remote-only in local dev.
Add Workers VPC service support for Hyperdrive origins
Hyperdrive configs can now connect to databases through Workers VPC services using the
--service-idoption:wrangler hyperdrive create my-config --service-id <vpc-service-uuid> --database mydb --user myuser --password mypassword
This enables Hyperdrive to connect to databases hosted in private networks that are accessible through Workers VPC TCP services.
Add interactive data catalog validation to R2 object and lifecycle commands.
When performing R2 operations that could affect data catalog state (object put, object delete, lifecycle add, lifecycle set), Wrangler now validates with the API and prompts users for confirmation if a conflict is detected. For bulk put operations, Wrangler prompts upfront before starting the batch. Users can bypass prompts with
--force(-y). In non-interactive/CI environments, the operation proceeds automatically.Add local mode support for Stream bindings
Miniflare and
wrangler devnow support using Cloudflare Stream bindings locally.Supported operations:
upload()— upload video via URLvideo(id).details(),.update(),.delete(),.generateToken()videos.list()captions.generate(),.list(),.delete()downloads.generate(),.get(),.delete()watermarks.generate(),.list(),.get(),.delete()
The following are not yet supported in local mode and will throw:
createDirectUpload()Caption upload via
FileWatermark generation via
File
Data is persisted across restarts by default. You must set
streamPersist: falsein Miniflare options to disable persistence.Add
--cert-verification-modeoption towrangler vpc service createandwrangler vpc service updateYou can now configure the TLS certificate verification mode when creating or updating a VPC connectivity service. This controls how the connection to the origin server verifies TLS certificates.
Available modes:
verify_full(default) -- verify certificate chain and hostnameverify_ca-- verify certificate chain only, skip hostname checkdisabled-- do not verify the server certificate at all
wrangler vpc service create my-service --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id <tunnel-uuid> --cert-verification-mode verify_ca
This applies to both TCP and HTTP VPC service types. When omitted, the default
verify_fullbehavior is used.Add TCP service type support for Workers VPC
You can now create TCP services in Workers VPC using the
--type tcpoption:wrangler vpc service create my-db --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id <tunnel-uuid>
This enables exposing TCP-based services like PostgreSQL, MySQL, and other database servers through Workers VPC.
Patch Changes
Angular auto-config now correctly handles projects without SSR configured
Previously, running
wrangler deploy(orwrangler setup) on a plain Angular SPA (created withng newwithout--ssr) would crash withCannot set properties of undefined (setting 'experimentalPlatform'), because the auto-config code unconditionally assumed SSR was configured.Angular projects without SSR are now treated as assets-only deployments: no
wrangler.jsoncmainentry is generated,angular.jsonis not modified, nosrc/server.tsis created, and no extra dependencies are installed.Fix
wrangler deploy --dry-runskipping asset build-artifact validation checksPreviously,
--dry-runskipped the entire asset sync step, which meant it also skipped validation that runs during asset manifest building. This included the check that errors when a_worker.jsfile or directory would be uploaded as a public static asset (which can expose private server-side code), as well as the per-file size limit check.With this fix,
--dry-runnow runsbuildAssetManifestagainst the asset directory when assets are configured, performing the same file-system validation as a real deploy without uploading anything or making any API calls.Resolve secondary worker types when environment overrides the worker name in multi-worker type generation
When running
wrangler typeswith multiple-cconfig flags and the secondary worker has named environments that override the worker name (e.g. a worker nameddo-workerwith envstagingwhose effective name becomesdo-worker-staging), service bindings and Durable Object bindings in the primary worker that referencedo-worker-stagingnow correctly resolve to the typed entry point instead of falling back to an unresolved comment type such asDurableObjectNamespace /* MyClass from do-worker-staging */.The fix extends the secondary entries map to also register environment-specific worker names, so that lookups by the env-qualified name (e.g.
do-worker-staging) resolve to the same source file as the base worker name.Patch undici to prevent fetch() throwing on 401 responses with a request body
Fetching with a request body (string, JSON, FormData, etc.) to an endpoint that returns a 401 would throw
TypeError: fetch failedwith causeexpected non-null body source. This affectedUnstable_DevWorker.fetch()and any other use of undici's fetch in wrangler.The root cause is
isTraversableNavigable()in undici returningtrueunconditionally, causing the 401 credential-retry logic to run in Node.js where it should never apply (there is no browser UI to prompt for credentials). This is tracked upstream in nodejs/undici#4910. Until an upstream fix is released, we apply a patch to undici that returnsfalsefromisTraversableNavigable().Prevent Docker container builds from spawning console windows on Windows
On Windows,
detached: trueinchild_process.spawn()gives each child process its own visible console window, causing many windows to flash open duringwrangler deploywith[[containers]]. Thedetachedoption is now only set on non-Windows platforms (where it is needed for process group cleanup), andwindowsHide: trueis added to further suppress console windows on Windows.Fix source phase imports in bundled and non-bundled Workers
Wrangler now preserves
import sourcesyntax when it runs esbuild, including module format detection and bundled deploy output. This fixes both--no-bundleand bundled deployments for Workers that import WebAssembly using source phase imports.Improve error message when modules cannot be resolved during bundling
When a module cannot be resolved during bundling, Wrangler now suggests using the
aliasconfiguration option to substitute it with an alternative implementation. This replaces esbuild's default suggestion to "mark the path as external", which is not a supported option in Wrangler.For example, if you try to import a module that doesn't exist:
import foo from "some-missing-module";
Wrangler will now suggest:
To fix this, you can add an entry to "alias" in your Wrangler configuration to substitute "some-missing-module" with an alternative implementation. See https://developers.cloudflare.com/workers/wrangler/configuration/#bundling-issues
This provides actionable guidance for resolving import errors.
Add library-push flag to containers registries credentials
This flag is not available for public use.
Validate that queue consumers in wrangler config only use the "worker" type
Previously, non-worker consumer types (e.g.
http_pull) could be specified in thequeues.consumersconfig. Now, wrangler will error if a consumertypeother than"worker"is specified in the config file.To configure non-worker consumer types, use the
wrangler queues consumerCLI commands instead (e.g.wrangler queues consumer http-pull add).
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.