cloudflare/workers-sdk wrangler@4.98.0
cloudflare/workers-sdk
Captured source
source ↗wrangler@4.98.0
Repository: cloudflare/workers-sdk
Tag: wrangler@4.98.0
Published: 2026-06-05T10:47:44Z
Prerelease: no
Release notes:
Minor Changes
The D1 binding now accepts an optional migrations_pattern field, allowing you to point wrangler d1 migrations apply and wrangler d1 migrations list at migration files in nested layouts (e.g. ORM-generated folders like migrations/0000_init/migration.sql).
migrations_pattern is 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.
{
"d1_databases": [
{
"binding": "DB",
"database_name": "my-db",
"database_id": "...",
"migrations_dir": "migrations",
"migrations_pattern": "migrations/*/migration.sql"
}
]
}When no migrations match the configured pattern but files matching the common migrations/*/migration.sql (drizzle-style) layout do exist, Wrangler logs a hint suggesting migrations_pattern as an opt-in.
wrangler d1 migrations create now returns an actionable error if the generated migration filename would not match the configured pattern.
- #14153 `7a6b1a4` Thanks @dario-piotrowicz! - Generalize
wrangler deployandwrangler versions uploadpositional argument from[script]to[path]
Both wrangler deploy and wrangler versions upload now 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 --script named 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 --script now produces a clear error message suggesting the positional path argument or --assets flag instead.
- #13863 `3b8b80a` Thanks @aslakhellesoy! -
getPlatformProxy()now passes through workflow bindings that have ascript_name
Workflows without a script_name are still stripped (and warned about) because the engine for an internal workflow can't run inside the empty proxy worker that backs getPlatformProxy(). Workflows with a script_name are handed to miniflare unchanged; miniflare reroutes the engine's USER_WORKFLOW binding 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.
Pre-launch rename of the public binding type from web_search to websearch so 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 from web_search / webSearch to websearch.
Update your wrangler config:
- "web_search": { "binding": "WEBSEARCH" }
+ "websearch": { "binding": "WEBSEARCH" }The runtime WebSearch type exposed on env.WEBSEARCH is unchanged.
Patch Changes
wrangler d1 execute --json and the internal executeSql helper 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 later logger.warn/logger.log output (notably from migration helpers that wrap executeSql and are commonly mocked in tests).
The level swap is now wrapped in try/finally so it is always restored.
- #14175 `a3eea27` Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"
The following dependency versions have been updated:
| Dependency | From | To | | ---------- | ------------ | ------------ | | workerd | 1.20260601.1 | 1.20260603.1 |
- #14121 `7539a9b` Thanks @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-auth package. 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 token…
Excerpt shown — open the source for the full document.
Notability
notability 2.0/10Routine minor release of developer tooling.