Minor Changes
-
#14089
c6c61b5Thanks @alsuren! - Addmigrations_patternto D1 database bindingsThe D1 binding now accepts an optional
migrations_patternfield, allowing you to pointwrangler d1 migrations applyandwrangler d1 migrations listat migration files in nested layouts (e.g. ORM-generated folders likemigrations/0000_init/migration.sql).migrations_patternis a glob (relative to the wrangler config file) and defaults to${migrations_dir}/*.sql, which preserves today's behaviour. Files that do not match the pattern are not executed.When no migrations match the configured pattern but files matching the common
migrations/*/migration.sql(drizzle-style) layout do exist, Wrangler logs a hint suggestingmigrations_patternas an opt-in.wrangler d1 migrations createnow returns an actionable error if the generated migration filename would not match the configured pattern. -
#14153
7a6b1a4Thanks @dario-piotrowicz! - Generalizewrangler deployandwrangler versions uploadpositional argument from[script]to[path]Both
wrangler deployandwrangler versions uploadnow accept a generic[path]positional argument that can point to either a Worker entry-point file or a directory of static assets. The type is auto-detected. For example:- File:
wrangler deploy ./src/index.tsdeploys a Worker (same as before) - Directory:
wrangler deploy ./publicdeploys a static assets site (no interactive confirmation prompt)
The
--scriptnamed option is now hidden and deprecated for both commands. It continues to work for backwards compatibility but only accepts file paths. Passing a directory to--scriptnow produces a clear error message suggesting the positionalpathargument or--assetsflag instead. - File:
-
#13863
3b8b80aThanks @aslakhellesoy! -getPlatformProxy()now passes through workflow bindings that have ascript_nameWorkflows without a
script_nameare still stripped (and warned about) because the engine for an internal workflow can't run inside the empty proxy worker that backsgetPlatformProxy(). Workflows with ascript_nameare handed to miniflare unchanged; miniflare reroutes the engine'sUSER_WORKFLOWbinding through the dev-registry-proxy when the target worker is running in another Miniflare instance — the same mechanism Durable Objects already use.This means SvelteKit/Remix (and similar split-process setups) can call
platform.env.MY_WORKFLOW.create({ ... })directly from their server-side request handlers in dev, as long as the workflow class is exposed by another worker registered in the dev registry.Closes #7459.
-
#14164
b502d54Thanks @G4brym! - Rename theweb_searchbinding kind towebsearchPre-launch rename of the public binding type from
web_searchtowebsearchso the on-the-wire shape matches the product name (Web Search). The wrangler config key, the binding-type string sent to the Cloudflare API, and the miniflare option key all move fromweb_search/webSearchtowebsearch.Update your wrangler config:
- "web_search": { "binding": "WEBSEARCH" } + "websearch": { "binding": "WEBSEARCH" }
The runtime
WebSearchtype exposed onenv.WEBSEARCHis unchanged.
Patch Changes
-
#14089
c6c61b5Thanks @alsuren! - Restore the D1executeSqllogger level via try/finallywrangler d1 execute --jsonand the internalexecuteSqlhelper temporarily lower the global logger to"error"to keep human-readable output out of the JSON payload. Previously the level was restored only on the happy path, so any early return or thrown error left the singleton logger muted, silencing laterlogger.warn/logger.logoutput (notably from migration helpers that wrapexecuteSqland are commonly mocked in tests).The level swap is now wrapped in
try/finallyso it is always restored. -
#14175
a3eea27Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260601.1 1.20260603.1 -
#14121
7539a9bThanks @petebacondarwin! - Extract the OAuth 2.0 + PKCE flow into a new@cloudflare/workers-authpackage.The OAuth login / logout / refresh logic, the auth-config TOML file IO, the OAuth token exchange + local callback server, and the Cloudflare Access detection helpers that previously lived in
packages/wrangler/src/user/have moved to the new internal-only@cloudflare/workers-authpackage. Wrangler now wires the OAuth flow up via a small glue module that injects its logger, browser opener, interactivity detector, and config cache via a dependency- injection context.What stays in wrangler:
- The yargs
login/logout/whoami/auth tokencommands - Environment-based credential resolution (
CLOUDFLARE_API_TOKEN,CLOUDFLARE_API_KEY/CLOUDFLARE_EMAIL, etc.) - Cloudflare account selection (
requireAuth,getOrSelectAccountId) - The OAuth scope catalog (passed into the OAuth flow as a generic
string[]) whoami/ account fetching
No behavior change for end users. The on-disk TOML format and location remain identical, and all telemetry message labels are preserved verbatim.
@cloudflare/workers-authis published withprerelease: trueand is not intended for external use — its APIs may change without notice. - The yargs
-
#14162
0bb2d55Thanks @dario-piotrowicz! - In non-interactive mode remove the skills installation messageWhen Wrangler run in non interactive mode and it detected agents that it could install skills for, it would print a message such as:
Cloudflare agent skills are available for: <DETECTED_AGENTS>. Run wrangler in an interactive terminal to install them, or use '--install-skills' to install without prompting.This message seems to be confusing and unhelpful so it has now been removed.
-
#14165
8400fb9Thanks @NuroDev! - Limitwrangler versions listto the 10 most recent deployable versionsThe versions API ignores pagination when filtering to deployable versions, so Wrangler now caps the command output client-side. This keeps the command aligned with its help text and avoids overwhelming terminal output for Workers with many versions.
-
#14151
7949f81Thanks @dario-piotrowicz! - Skip stale bundles during dev server reload to avoid redundant restartsWhen rapidly saving a wrangler config file with remote bindings, each save would trigger a full reload cycle (remote connection setup, miniflare restart), causing many sequential "Reloading local server... / Establishing remote connection..." messages (while blocking the user). The runtime controllers now check whether a newer bundle has been queued at each expensive async boundary and bail out early if the current bundle is stale. This ensures that only the latest config change triggers a reload, making
wrangler devmuch more responsive during repeated config edits. -
#14072
d462013Thanks @himanshu-cf! - Updatewrangler secret bulkcommand description to reflect create/update/delete capabilitiesThe help text for
wrangler secret bulknow accurately describes that the command can create, update, or delete multiple secrets in a single request, with up to 100 secrets per command. The file argument description also clarifies that setting a key tonullin JSON will delete it, and that deletion is not supported with.envfiles. -
#13979
c2280cdThanks @matingathani! - Warn when a named environment silently inherits custom_domain routes from the top-level configWhen an
env.<name>block does not overrideroutes, it inherits the top-levelroutesarray. If that array contains entries withcustom_domain: true, every deploy to the named environment will silently reassign the custom domain away from the top-level Worker and towards the env Worker, causing routing drift. Wrangler now emits a warning in this situation and suggests adding"routes": []to the env block to prevent inheritance. -
#14170
ea12b58Thanks @petebacondarwin! - Tighten on-disk permissions of the OAuth credentials file to0600The user auth config file written by
wrangler login(typically~/.config/.wrangler/config/default.tomlon Linux/macOS, or<environment>.tomlfor non-production Cloudflare API environments) is now written with mode0600and re-chmod-ed on every save. This prevents other local users on shared hosts from reading the stored OAuth tokens. Existing files with looser permissions written by older Wrangler versions are tightened the next time Wrangler refreshes the token or the user logs in again. The change is a no-op on Windows, which does not honour POSIX mode bits. -
#14022
acf7817Thanks @petebacondarwin! - Show the actual OAuth error instead of hanging whenwrangler loginis rejected by the OAuth provider (for example withinvalid_scope).Previously, if the OAuth callback returned with an
errorother thanaccess_denied, Wrangler would never respond to the browser. Becauseserver.close()'s callback only fires once all open connections have ended, the login command would hang until the 120 second OAuth timeout — at which point it would print a generic timeout message rather than the actual OAuth failure. The same gap existed for the case where the OAuth provider redirected back without an authorisation code, and for failures during the auth-code-to-access-token exchange.The OAuth provider's
error_description(RFC 6749 §4.1.2.1) is now also surfaced, so the message includes the specific reason for the failure rather than just the bareerrorcode. For example, a misconfigured staging scope now surfaces as:OAuth error: invalid_scope The OAuth 2.0 Client is not allowed to request scope 'browser:write'.instead of hanging silently.
-
Updated dependencies [
a3eea27,1fdd8de,b502d54,3b8b80a]:- miniflare@4.20260603.0
{ "d1_databases": [ { "binding": "DB", "database_name": "my-db", "database_id": "...", "migrations_dir": "migrations", "migrations_pattern": "migrations/*/migration.sql" } ] }