1.4 MiB
wrangler
4.110.0
Minor Changes
-
#14591
0283a1fThanks @dario-piotrowicz! - Send npm package dependency metadata with worker uploadsWrangler now collects npm package dependency information from the project's
package.jsonat deploy and version upload time, and includes it in the upload metadata sent to the Cloudflare API. This enables dependency analytics and future features like vulnerability alerting.The collected data includes the package name, the version constraint from
package.json, and the exact installed version fromnode_modules. BothdependenciesanddevDependenciesare included, while workspace packages, local packages, and unresolvable packages are excluded. The list is capped at 200 entries per upload.To opt out, set
dependencies_instrumentation.enabledtofalsein your Wrangler configuration file:{ "dependencies_instrumentation": { "enabled": false } } -
#14535
1b965c5Thanks @Naapperas! - Support dynamic retry delays for Workflow steps in local devA step's
retries.delaycan now be a function that computes the delay per failed attempt, in addition to a static duration. The function receives{ ctx, error }and returns a delay (a number of milliseconds or a duration string like"30 seconds"), and its result is fed into the configuredbackoff.await step.do( "call flaky API", { retries: { limit: 5, backoff: "constant", delay: ({ ctx }) => ctx.attempt * 1000, }, }, async () => { /* ... */ } );The function is invoked once per failed attempt with a 5 second timeout. If it throws, times out, or returns an invalid value, the step fails without further retries.
Patch Changes
-
#14589
7b28392Thanks @jamesopstad! - Fix runtime type caching whenwrangler devauto-regenerates typesWhen
dev.generate_types(orwrangler dev --types) regenerated an out-of-dateworker-configuration.d.ts, the written file omitted the// Begin runtime typesmarker (and the/* eslint-disable */header) thatwrangler typeswrites. As a result, later runs could not detect the cached runtime types and always regenerated them. The auto-regenerated file now matcheswrangler typesoutput, restoring the cache. -
Updated dependencies [
1b965c5]:
4.109.0
Minor Changes
-
#14489
e3f0cd6Thanks @edmundhung! - AddlistDurableObjectIds()tocreateTestHarnessWorker handlesTests using
createTestHarnesscan now list persisted Durable Object instance IDs for a Durable Object binding. This helps integration tests discover objects created by app behavior without adding test-only endpoints. -
#14465
2fedb1fThanks @vaishnav-mk! - Add rollback support when terminating Workflow instancesWorkflowInstance.terminate({ rollback: true })now runs registered rollback handlers before marking a local Workflow instance as terminated. Wrangler also supports this viawrangler workflows instances terminate --rollback, including local mode.The rollback option is only sent for terminate operations and is rejected by the Local Explorer API for pause, resume, and restart actions.
-
#14511
17d2fc1Thanks @juleslemee! - Addwrangler turnstile widgetcommands for managing Turnstile widgetsYou can now create, list, inspect, update, and delete Turnstile widgets from the CLI:
wrangler turnstile widget create <name> --domain example.com --mode managed wrangler turnstile widget list wrangler turnstile widget get <sitekey> wrangler turnstile widget update <sitekey> --name "Renamed" wrangler turnstile widget delete <sitekey>All five subcommands accept
--jsonfor machine-readable output (getprints a formatted view by default; the rest print a short human summary).--domainaccepts comma-separated values, e.g.--domain a.com,b.com.delete --jsonrequires--skip-confirmation/-yto keep output pipeable.createprints the sitekey, the secret, and the canonicalchallenges.cloudflare.com/turnstile/v0/siteverifyendpoint for backend verification. The hint is backend-agnostic; it doesn't assume Workers. The secret is redacted fromlistandupdateoutput but remains available viagetfor retrieval later.deleteprompts for confirmation; pass--skip-confirmation/-yto bypass.The OAuth flow now requests the
challenge-widgets.writescope (the existing Bach-derived scope for Turnstile widget CRUD). Existing OAuth sessions need to runwrangler loginagain to pick it up. API token users need a token with theAccount.Turnstile:Editpermission.
Patch Changes
-
#14596
8511ddfThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260706.1 1.20260708.1 @cloudflare/workers-types ^5.20260706.1 ^5.20260708.1 -
#14604
9f74a5fThanks @vaishnav-mk! - Improve the deploy error for cron-triggered Workflows on free plansWrangler now explains that Workflow schedules require a paid Workers plan instead of showing only the generic Workflows API request failure.
-
#14616
c782e2aThanks @penalosa! - Fixwrangler deployaborting in CI for autoconfigured projectsA recent change guarded non-interactive deploys against overwriting a same-named Worker whenever there was no config file naming it. This was too broad: a plain
wrangler deployrun in CI without a config file (for example an autoconfigured project whose generated config PR has not been merged) would fail with "A Worker named ... already exists in your account", even though re-deploying to that Worker is the intended behaviour.The guard is now limited to the Pages-to-Workers delegation, where the target name is a Pages project name that must not clobber an unrelated Worker. Plain deploys once again deploy normally.
4.108.0
Minor Changes
-
#14312
54f74b8Thanks @MattieTK! - Delegate agent-driven static Pages deploys to WorkersWhen
wrangler pages deployorwrangler pages project createis run by an AI coding agent against a brand-new, purely static project, Wrangler now delegates it to Workers static assets (using autoconfig) instead of Cloudflare Pages. Accounts that already have Cloudflare Pages projects, non-agent (human) sessions, and projects using Pages features that can't be carried across to Workers (Pages Functions, a_worker.js, or a_routes.jsonfile) are unaffected and continue to use Pages. Passing--forceto either command opts out of the delegation and deploys to Pages directly. Once the Workers deploy starts it is not silently swapped back to Pages: if it fails, the error is surfaced and the--forceopt-out is suggested.
Patch Changes
-
#14567
0852346Thanks @dependabot! - Update dependencies of "miniflare", "wrangler", "create-cloudflare"The following dependency versions have been updated:
Dependency From To workerd 1.20260702.1 1.20260706.1 @cloudflare/workers-types 4.20260702.1 5.20260706.1 -
#14312
54f74b8Thanks @MattieTK! - Avoid silently overwriting an existing Worker during non-interactive deploys that cannot prove they own the nameA non-interactive deploy (an agent, CI, or the agent-delegated
wrangler pages deploy) has no way to prompt before overwriting a Worker, so it now stops if the target name is already taken and this run cannot show it owns that Worker. This applies when there is no Wrangler configuration file naming the Worker and either the name was generated automatically or the deploy is the Pages-to-Workers delegation (where the name carried across is a Pages project name, not proof of Worker ownership). The check reuses the service metadata the deploy already fetches, so it adds no extra API calls.Deploys are unaffected when a configuration file names the Worker (so repeat deployments continue to update it), and interactive deploys keep their existing confirmation flow. To update an existing Worker in one of the guarded cases, add a Wrangler configuration file naming it, or deploy under a different name.
-
Updated dependencies [
0852346]:
4.107.1
Patch Changes
-
#14514
d88555eThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260701.1 1.20260702.1 -
#14564
5fd8beeThanks @jibin7jose! - Fix an issue wherewrangler devwould not override configvarswith values from.dev.varsduring local development when thesecretsfield was defined in the configuration file. -
#14332
5d9990eThanks @Divkix! - Fix misleading error guidance when deploying a new Worker withsecrets.requiredWhen a Worker declares
secrets.requiredand has never been deployed before, the previous error message suggested runningwrangler secret put <NAME>, which doesn't work because the Worker doesn't exist yet.The one path that does work —
wrangler deploy --secrets-file <path>— was not mentioned anywhere in the error output.The pre-deploy error now explains that
wrangler secret putcannot be used for a new Worker, and directs users to the--secrets-fileflag instead. The post-deploy error for existing Workers now also mentions--secrets-filealongsidewrangler secret put. -
#14507
bf49a41Thanks @joey727! - Fix a potential crash when displaying certain CLI outputPreviously, some CLI output with no content lines could cause a crash. This is now handled correctly.
-
#14492
1ac96a1Thanks @penalosa! - Replace the CommonJSxdg-app-pathsdependency with a vendored pure-ESM implementationxdg-app-paths(and itsxdg-portable/os-pathsdependencies) are CommonJS only, which caused "Dynamic require of 'path' is not supported" errors when the surrounding code was bundled to ESM. The global config/cache directory resolution is now provided by a small, dependency-free pure-ESM module in@cloudflare/workers-utilsthat reproduces the previous path resolution exactly (verified against the real package in unit tests), so existing config and credential locations are unchanged. This also drops the transitivefseventsoptional dependency thatxdg-app-pathspulled in.Miniflare and create-cloudflare now consume the shared helpers from
@cloudflare/workers-utilsinstead of maintaining their own copies, importing node-only leaf entry points (@cloudflare/workers-utils/fs-helpers,@cloudflare/workers-utils/global-wrangler-config-path) where ESM bundling is required. -
#14572
f416dd9Thanks @petebacondarwin! - Key local rate limit counters bynamespace_idinstead of binding namewrangler devand Miniflare previously tracked each rate limit binding's counter by its binding name, so two bindings that referenced the samenamespace_idwere treated as separate limiters. Counters are now keyed bynamespace_id, matching production: bindings that share anamespace_idshare a limit, while distinct namespaces stay isolated. This also re-enables rate limit bindings in multiworkerwrangler devsessions, where they were previously stripped from secondary Workers to avoid a startup crash. -
#14570
1ca8d8fThanks @penalosa! - Upgradesignal-exitfrom v3 to v4The bundled
signal-exitdependency was CJS-only. Upgrading to v4 (which ships a dual ESM/CJS build) unblocks ESM output. Exit-cleanup behaviour is unchanged, though v4 no longer registers handlers for a few signals that are no longer supported by the OS (SIGUNUSEDon Linux;SIGABRT/SIGALRMon Windows). -
#14561
b973ed3Thanks @martijnwalraven! - Emit an error event for watch-mode rebuild failures inunstable_startWorkerInitial build failures already dispatch an error event (surfaced as
buildFailedon the DevEnv bus), but watch-mode rebuild failures were only logged from inside the esbuild plugin, so programmatic consumers had no way to observe them while dev kept serving the previous bundle. Rebuild failures now route through the same error path as initial-build failures: terminal output is unchanged andbuildFailedfires symmetrically. -
Updated dependencies [
e7e5780,d88555e,1ac96a1,f416dd9,16fbf81]:
4.107.0
Minor Changes
-
#14474
aa5d580Thanks @WillTaylorDev! - Add cache options for WorkerEntrypoint exportsYou can now set cache options on
WorkerEntrypointexports and configure cross-version cache behavior globally:// wrangler.json { "cache": { "enabled": true, "cross_version_cache": true }, "exports": { "default": { "type": "worker", "cache": { "enabled": false } }, "Admin": { "type": "worker", "cache": { "enabled": true } } } }Wrangler sends the
exportsconfig to the deploy and version upload APIs alongside the globalcache.enabledandcache.cross_version_cachesettings. The platform resolves those global settings plus cache overrides on exports and validates which entrypoint names are cacheable. -
#14382
fd92d56Thanks @petebacondarwin! - Add support for declarative Durable Object exportswrangler deploynow accepts anexportsmap inwrangler.jsonas a declarative alternative to the legacymigrationsarray.Each entry in
exportsis keyed by Durable Object class name.typecarries the export kind (currently always"durable-object"); thestatefield carries the lifecycle and defaults to"created"(live) when omitted:{ "exports": { // Provision a new Durable Object class (`MyDO`) "MyDO": { "type": "durable-object", "storage": "sqlite" }, // Delete Durable Object class (`OldGone`) "OldGone": { "type": "durable-object", "state": "deleted" }, // Rename a Durable Object class (from `OldName` to `NewName`) "OldName": { "type": "durable-object", "state": "renamed", "renamed_to": "NewName" }, "NewName": { "type": "durable-object", "storage": "sqlite" }, // Transfer a Durable Object (`Outgoing`) to a new Worker (`target-worker`) "Outgoing": { "type": "durable-object", "state": "transferred", "transferred_to": "target-worker" }, // Prepare to receive the transfer of a Durable Object (`Incoming`) from another Worker (`source-worker`) "Incoming": { "type": "durable-object", "state": "expecting-transfer", "storage": "sqlite", "transfer_from": "source-worker" } } }When a Worker declares Durable Object class bindings but no lifecycle for them (neither a
migrationsarray nor anexportsmap), wrangler warns and now suggests a declarativeexportsentry for each class (previously it suggested a legacymigrationsblock).The deployment response now surfaces the server's reconciliation result — created namespaces, applied tombstones, structured per-scenario info entries, and a
removable_entrieshint for stale tombstones that are safe to delete from the config. Blocking errors return the structured per-class detail with scenario tags, suggested remediation, and any referencing-script context.wrangler versions uploadalso forwardsexports. Declarativeexportslifecycle changes are reconciled when the version is deployed (wrangler versions deployorwrangler deploy), so aversions uploadpayload can declare new classes inexportswithout immediately provisioning them. An actor binding (durable_objects.bindings) to a class declared only inexportson the sameversions uploadis rejected with a clear error (code 100406) — the binding cannot be resolved until the namespace is provisioned. Either stage the new class viactx.exports.X(no binding required) onversions uploadand add the binding at deploy time, or usewrangler deployto provision and bind in one step (the same constraint applies to themigrationsflow).Multi-version deploys (
wrangler versions deploy A@50% B@50%) where the selected versions disagree on declarativeexportsare rejected server-side with a clear message: deploy the version that changesexportsat 100% first, then run the percentage-split deploy. This prevents traffic on one branch routing to code that references unprovisioned or just-deleted DO namespaces. Single-version (100%) deploys are unaffected.Local development (
wrangler dev,vite devandunstable_startWorker) reads Durable Object SQLite storage settings from the newexportsfield, so applications using the declarative flow get correct local-dev storage without needing to also declare amigrationsblock.@cloudflare/vitest-pool-workersalso picks up Durable Object configuration fromexports, so tests against anexports-only Worker run with the correct local SQLite storage and can reach unbound Durable Object classes viactx.exports.X.wrangler typesis also aware ofexports. Live entries (includingexpecting-transfer, the receiving side of a two-phase transfer) are added toCloudflare.GlobalProps.durableNamespaces, which typesctx.exports.Xfor unbound Durable Objects declared only viaexports. -
#14423
be3f792Thanks @akshitsinha! - Addwrangler flagshipcommands for managing Flagship apps and feature flags.The new
wrangler flagship appsandwrangler flagship flagscommand groups let you create, list, get, inspect, update, set, split, rollout, enable, disable, evaluate, and delete Flagship apps and flags from the CLI, including targeting rules, variations, percentage rollouts, evaluation context, and flag changelogs. -
#14156
e1532ebThanks @petebacondarwin! - Add opt-in OS keychain storage for OAuth credentialsBy default
wranglerstores your OAuth tokens in a plaintext file, and that is unchanged. You can now opt in to encrypting them at rest instead:wrangler login --use-keyringwrites the tokens to an AES-256-GCM-encrypted file whose key is held in your OS keyring (macOS Keychain, libsecret on Linux, or Windows Credential Manager). Existing plaintext credentials are migrated automatically on first use.Toggle it with any of:
wrangler login --use-keyring/--no-use-keyringwrangler auth keyring enable/disable(orwrangler auth keyringto print the current setting) — useful if you only use named profiles and never run the globalwrangler loginCLOUDFLARE_AUTH_USE_KEYRING=true|falseto override the saved preference for a single command
Opting out deletes the encrypted credentials rather than decrypting them back to disk, so you re-authenticate afterwards. The preference applies to every auth profile, and each named profile gets its own encrypted file and key.
Per-platform requirements: macOS uses the built-in
securitytool (nothing to install); Linux usessecret-toolfromlibsecret-tools(wrangler prints an install hint if it is missing); Windows lazily installs@napi-rs/keyring(~1.9 MB) on first opt-in, and errors with instructions in non-interactive/CI contexts.CLOUDFLARE_API_TOKENandCLOUDFLARE_API_KEY/CLOUDFLARE_EMAILcontinue to take priority over any stored OAuth credentials.
Patch Changes
-
#14502
6b0ce98Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260630.1 1.20260701.1 -
#14306
bfe48dbThanks @matingathani! - Remove deprecated--experimental-vm-modulesflag and prevent silent exit on unexpected errorswranglerwas silently exiting with code 1 on Node.js v26 with no error message shown. This release fixes two independent issues that caused this behaviour:-
A stale Node.js flag that caused unexpected behaviour on Node.js v26 has been removed.
-
If an error occurs in a situation where the normal error reporting path itself fails,
wranglernow always prints the original error to stderr so the cause is visible rather than silently disappearing.
-
-
#14481
0277bfaThanks @dario-piotrowicz! - Improve error message when deploying to a non-existent Pages project in non-interactive modePreviously, running
wrangler pages deploywith a--project-namethat doesn't exist in a non-interactive context (e.g. CI, piped input) would fail with a generic "project not found" or "This command cannot be run in a non-interactive context" error. Now it provides a specific error message explaining that the project doesn't exist and suggests how to create it. The error also suggests usingwrangler deployto deploy a Worker instead. -
#14305
98793d8Thanks @jbwcloudflare! - Improve asset upload performance with single-file uploadsAsset uploads now use a more efficient per-file upload path when the platform enables it. This is rolled out server-side and requires no configuration changes. Existing upload behavior is unchanged when the new path is not enabled.
-
Updated dependencies [
6b0ce98]:
4.106.0
Minor Changes
-
#14490
75d8cb0Thanks @petebacondarwin! - Addwrangler ai-search jobscommands for managing AI Search indexing jobsYou can now list, trigger, inspect, cancel, and read the logs of indexing jobs for an AI Search instance:
wrangler ai-search jobs list <instance> wrangler ai-search jobs create <instance> --description "manual reindex" wrangler ai-search jobs get <instance> <job-id> wrangler ai-search jobs cancel <instance> <job-id> wrangler ai-search jobs logs <instance> <job-id>All commands accept
--namespace/-n(defaults todefault). All commands exceptcancelalso accept--jsonfor clean machine-readable output. -
#14490
75d8cb0Thanks @petebacondarwin! - Add--source-jurisdictiontowrangler ai-search createfor R2-backed instancesR2 buckets can live in a specific jurisdiction (for example
euorfedramp). You can now point an AI Search instance at a bucket in one of those jurisdictions:wrangler ai-search create my-instance --type r2 --source my-bucket --source-jurisdiction euWhen run interactively, the R2 source flow also prompts for a jurisdiction and lists (and can create) buckets within it. The value is a free-form string forwarded to the API as
source_params.r2_jurisdiction(server-side validated); omit the flag for no specific jurisdiction. This AI Search command is in open beta. -
#14490
75d8cb0Thanks @petebacondarwin! - Add auth profiles for managing multiple OAuth loginsAuth profiles let you maintain separate OAuth logins and bind them to directories, so you can switch between different accounts for different projects without having to re-login.
For example:
wrangler auth create work wrangler auth activate work ~/projects/work wrangler auth create personal wrangler auth activate personal ~/projects/personalNew commands under
wrangler auth:wrangler auth create <name>— create or re-authenticate a named profile via OAuthwrangler auth delete <name>— delete a profile and all its directory bindingswrangler auth activate <name> [dir]— bind a profile to a directory (defaults to cwd). Sub-directories will inherit this profile.wrangler auth deactivate [dir]— remove a directory bindingwrangler auth list— list all profiles and their corresponding directories
There is also a new global
--profileflag, which you can use to activate a profile for just that command run. Note that if you haveCLOUDFLARE_API_TOKENset, that will still take precedence over all profiles. Any account id settings (viaCLOUDFLARE_ACCOUNT_IDor wrangler config) will also still be respected. -
#14490
75d8cb0Thanks @petebacondarwin! - Add--strictflag towrangler versions uploadand improve pre-upload safety checkswrangler versions uploadnow runs the same pre-upload checks aswrangler deploy:- When the Worker was last edited via the Cloudflare Dashboard, the local and remote configurations are diffed and you are warned only if the diff is destructive (previously, an unconditional warning was shown).
- When local configuration values conflict with remote secrets, a warning is shown before proceeding.
- When deploying workflows that belong to a different Worker, a warning is shown before proceeding.
The new
--strictflag (already available onwrangler deploy) causeswrangler versions uploadto abort in non-interactive/CI environments when any of these conflicts are detected, instead of auto-continuing. -
#14490
75d8cb0Thanks @petebacondarwin! - Add D1 migration setup tocreateTestHarness()Worker handlesTests using
createTestHarness()can now apply local D1 migrations before running requests:const worker = server.getWorker(); beforeEach(async () => { await worker.applyD1Migrations("DATABASE"); }); -
#14490
75d8cb0Thanks @petebacondarwin! - Add Workflow introspection tocreateTestHarness()Worker handles can now introspect Workflow bindings by name, allowing tests to disable sleeps, mock step results, and wait for Workflow outcomes. Tests can introspect a known Workflow instance by ID or track instances created after introspection starts.
const harness = createTestHarness({ workers: [{ configPath: "./wrangler.json" }], }); const worker = harness.getWorker(); await using workflow = await worker.introspectWorkflow("MY_WORKFLOW"); await workflow.modifyAll((modifier) => modifier.disableSleeps([{ name: "wait-for-approval" }]) ); const response = await worker.fetch("/start-workflow"); const [instance] = await workflow.get(); await instance.waitForStatus("complete"); -
#14446
e0cc2cbThanks @edmundhung! - AddbindingOverridesandgetExport()tocreateTestHarness()Test harness workers loaded from Wrangler config files can now replace a configured binding with a Worker in the same harness. This is useful for replacing platform bindings with test Workers while keeping the source Worker config production-like. You can also call
getExport()on a Worker returned byserver.getWorker(name)to access JSRPC methods on the default Worker export, including mock Workers used as override targets.const server = createTestHarness({ workers: [ { configPath: "./workers/app/wrangler.jsonc", bindingOverrides: { BROWSER: "mock-browser" }, }, { // A mock Worker implementing the Browser Rendering binding named "mock-browser". configPath: "./workers/mock-browser/wrangler.jsonc", }, ], }); const mockBrowser = await server .getWorker<WebEnv, typeof import("./workers/mock-browser")>("mock-browser") .getExport(); await mockBrowser.setScreenshot(stubPng); const response = await server.fetch("/reports/2026-05-29.png"); expect(await response.bytes()).toEqual(stubPng); -
#14490
75d8cb0Thanks @petebacondarwin! - Improvewrangler tailresilience and shutdown behaviourwrangler tailpreviously crashed with a raw stack trace when the keep-alive ping to the Worker timed out, and could exit with an ugly error on Ctrl-C.- Errors now flow through wrangler's usual error pipeline instead of escaping as uncaught exceptions.
- The keep-alive timeout message now clearly explains what happened and no longer prints a stack trace.
- When the tail connection drops unexpectedly,
wrangler tailnow automatically tries to reconnect with exponential back-off (up to 5 retries). - Ctrl-C now prints a short "Stopping tail..." message (in pretty mode), awaits the server-side tail deletion, and exits cleanly with code 0.
Patch Changes
-
#14490
75d8cb0Thanks @petebacondarwin! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260625.1 1.20260629.1 -
#14478
f10d4adThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260629.1 1.20260630.1 -
#14490
75d8cb0Thanks @petebacondarwin! - Improve the deploy warning shown when a Workflow name already belongs to another WorkerThe warning still notes that deploying reassigns the workflow to the current Worker, and now also explains why this happens (workflow names must be unique per account) and how to resolve it (rename the workflow in the Wrangler config).
-
#14490
75d8cb0Thanks @petebacondarwin! - usestreaminstead of deprecatedpipelinekey in pipelines setup config snippetThe
wrangler pipelines setupandwrangler pipelines createcommands now output the correctstreamproperty name in the configuration snippet, matching the rename frompipelinetostreamthat was applied across the rest of the codebase. -
#14490
75d8cb0Thanks @petebacondarwin! - Improve KV error messages to be clearer and more actionableError messages for KV namespace and key operations now consistently explain what went wrong, which flags or config fields to use, and what commands to run as alternatives. This covers namespace selection errors (delete, rename), binding resolution errors, config file issues, and preview namespace ambiguity.
-
#14479
d292046Thanks @dario-piotrowicz! - Improve R2 error messages to be clearer and more actionableError messages for
r2 bucket lifecycle,r2 bucket lock,r2 bucket catalog, andr2 sqlcommands now include the specific flag or argument that is missing or invalid, along with usage examples showing the correct syntax. -
#14490
75d8cb0Thanks @petebacondarwin! - Improvewrangler versions deployerror messages for non-interactive usageError messages in
wrangler versions deployare now clearer and more actionable, especially for non-interactive and agent-driven usage. Each error now explains what went wrong, what was expected, and how to fix it (e.g. suggesting the correct flag or command syntax). -
#14490
75d8cb0Thanks @petebacondarwin! - Fix the remote secrets override check during deploy targeting the wrong Worker when--nameis passedThe check that warns when a config value would override an existing remote secret was using the Worker name from the config file rather than the resolved name. If you passed
--name <other-worker>, the check ran against the config-file Worker name instead of the Worker actually being uploaded. -
#14490
75d8cb0Thanks @petebacondarwin! - Abort in-flight custom builds whenwrangler devexits or restarts a buildPreviously,
wrangler devmarked in-flight custom builds as stale but did not pass the abort signal to the spawned build command. This meant Ctrl-C could appear to hang while Wrangler waited for a custom build command to finish naturally. Custom build commands are now cancelled when the dev session tears down or a newer watched build supersedes them. -
#14490
75d8cb0Thanks @petebacondarwin! - Replace existing bindings when adding newly created resources to Wrangler configurationWhen config updates are authorized interactively or through
--update-configor--binding, Wrangler now replaces an existing resource binding with the selected name instead of adding a duplicate entry. This allows template bindings with placeholder resource IDs to be updated in both interactive and non-interactive workflows. -
#14490
75d8cb0Thanks @petebacondarwin! - Verify Docker is installed and running beforewrangler containers buildPreviously, running
wrangler containers buildwithout Docker installed or with the Docker daemon stopped would fail with an unhelpful spawn error. Now the command checks that Docker is reachable upfront and shows a clear, actionable error message with installation and troubleshooting steps. -
#14490
75d8cb0Thanks @petebacondarwin! - Addimagesas a valid--sourceforqueues subscription createThe Cloudflare Images service can emit events (e.g.
image.uploaded) to a Cloudflare Queue via the event subscriptions API, and this is supported by both the REST API and the Cloudflare Dashboard. However, the wrangler CLI was missingimagesfrom the hardcoded--sourcechoices list, causing the command to reject it with an "Invalid values" error.You can now subscribe a queue to Cloudflare Images events via the CLI:
wrangler queues subscription create <queue> --source images --events image.uploaded
4.105.0
Minor Changes
-
#14311
34e0cefThanks @sherryliu-lsy! - Add Google Artifact Registry support tocontainers registries configurewrangler containers registries configurenow recognizes*-docker.pkg.dev(Google Artifact Registry) domains.- The Google service account email is the public credential, supplied with
--gar-email. It must match theclient_emailin the service account key. - The service account JSON key is the private credential. It is provided via stdin (a file path, raw JSON, or base64) or an interactive prompt (a file path or base64) — never as a CLI flag, so it does not appear in shell history. The key is validated against
--gar-emailand stored base64-encoded. - Secret reuse inherits the existence-first flow: when the target Secrets Store secret already exists, it is reused by reference and the key is not required. In that case the email cannot be verified locally; it is validated against the key when images are pulled.
<path-to-key>.json | npx wrangler@latest containers registries configure <region>-docker.pkg.dev --gar-email=<service-account-email> --secret-name=Google_Service_Account_JSON_Key - The Google service account email is the public credential, supplied with
Patch Changes
-
#14424
5f40dd5Thanks @MattieTK! - Bumpam-i-vibingfrom 0.4.0 to 0.5.0This updates the agentic environment detection library to the latest version, which adds detection for the Pi coding agent (
earendil-works/pi). -
#14406
3b743c1Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260623.1 1.20260625.1 -
#14343
daa5389Thanks @th0m! - Use digest-pinned image references for Dockerfile container deploysDockerfile-backed container deploys now use the pushed image digest when deploying the container application. This lets snapshot-enabled container apps pass Cloudchamber validation while keeping local, non-pushed builds and registry image URI deploys unchanged.
-
#14394
8a5cf8cThanks @Partha-Shankar! - fix(d1): escapemigrationsTableNameand filenames in SQLite queriesD1 migration commands in both
wranglerand@cloudflare/vitest-pool-workersinterpolated themigrationsTableNameconfig value and migration filenames directly into SQL strings without any escaping. This meant:- A table name such as
my"tablewould produce invalid SQL inCREATE TABLE,SELECT, andINSERTstatements, and - A migration filename containing an apostrophe (e.g.
what's-new.sql) would break theINSERT INTO ... VALUES ('...')statement appended after each migration inwrangler.
Both identifiers are now properly escaped before interpolation:
migrationsTableNameis wrapped in double-quotes with internal double-quotes doubled (SQL-standard identifier quoting), and migration filenames used as string literals have their single-quotes doubled before insertion. - A table name such as
-
Updated dependencies [
3b743c1]:
4.104.0
Minor Changes
-
#14369
e312decThanks @edmundhung! - AddgetEnv()tocreateTestHarness()Worker handlesTests can now access the full
envobject for a Worker withawait server.getWorker<Env>().getEnv(), including vars, secrets, and bindings.
Patch Changes
-
#14364
a085decThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260617.1 1.20260619.1 -
#14383
9a0de8fThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260619.1 1.20260621.1 -
#14397
fab565fThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260621.1 1.20260623.1 -
#14388
3f02864Thanks @petebacondarwin! - Stop erroring whenfind_additional_modulesdiscovers a file that only matches a inactive module ruleModule rules assign module types to imported files — they are not include/exclude filters. Also, setting
fallthrough: falsein a rule will cause subsequent rules to become inactive. Previously, whenfind_additional_moduleswalked the filesystem and discovered a file whose only matching rule is inactive, Wrangler would throw an error and fail the build.This meant that adding a user rule like the one below would break the build for any
.txt,.html,.sql,.binor.wasmfile that didn't match the user-supplied globs but lived somewhere under the module root:// wrangler.json { "rules": [ { "type": "Text", "globs": ["html/includeme.html"], "fallthrough": false } ] }Discovered files that only match an inactive rule are now silently skipped (a
debug-level log records each skip for troubleshooting), so users can usefallthrough: falseto narrow the set of files attached to their Worker without having to delete or move untouched files on disk.The direct-import path is unchanged: importing a file in code that only matches an inactive rule is still a hard error, because the imported file genuinely needs a defined module type.
Fixes #14257.
-
#14358
4ef872fThanks @gabivlj! - Fix container egress interception on arm64 Docker runtimesBoth
wrangler devand the Cloudflare Vite plugin no longer force theproxy-everythingsidecar image to pull aslinux/amd64, allowing Docker to select the native image from the multi-platform manifest. SetMINIFLARE_CONTAINER_EGRESS_IMAGE_PLATFORMto force a specific platform when needed. -
#14362
2a02858Thanks @sherryliu-lsy! - Don't require the private credential when reusing an existing Secrets Store secret incontainers registries configurewrangler containers registries configurenow checks whether the target Secrets Store secret already exists before resolving the private credential. When the secret already exists it is reused by reference, so the private credential no longer needs to be supplied (via stdin in non-interactive mode, or via a prompt interactively). This applies to all external registries.The new-secret path is unchanged: the credential is still required and stored. The only visible interactive change is that the secret prompt now appears last and only when a new secret is being created.
4.103.0
Minor Changes
-
#14295
cfd6205Thanks @dario-piotrowicz! - Moveunstable_getWorkerNameFromProjectfrom wrangler to@cloudflare/workers-utilsThe
unstable_getWorkerNameFromProjectexport has been removed from thewranglerpackage. This function is now available asgetWorkerNameFromProject(without theunstable_prefix) from@cloudflare/workers-utils. If you were importing this function fromwrangler, update your import to use@cloudflare/workers-utilsinstead. -
#14295
cfd6205Thanks @dario-piotrowicz! - Remove experimental autoconfig exportsThe experimental autoconfig exports (
experimental_getDetailsForAutoConfig,experimental_runAutoConfig,experimental_AutoConfigFramework) have been removed. This logic has been moved to the@cloudflare/autoconfigpackage (without theexperimental_prefixes since the package itself is pre-v1).
Patch Changes
-
#14366
c6579d3Thanks @jamesopstad! - Resolve relativecf-workerentrypoint imports relative to the importing moduleWhen loading the experimental
cloudflare.config.ts, a relative entrypoint imported withimport ... with { type: "cf-worker" }(e.g../src/index.ts) is now anchored to the module where the import is written, rather than being passed through verbatim and later resolved against the top-level config file. This fixes incorrect resolution when the import lives in a file other than the entry config — for example a config that re-exports from a nested file.Bare specifiers (such as
@scope/pkg) and virtual modules (such asvirtual:foo) are still left unresolved so that consumers can apply their own resolution. -
#14316
444b75eThanks @matingathani! - Preventwrangler devcrash when source-mapping a truncated error chunkWhen a worker logs many errors in quick succession, the stderr chunks received by
wrangler devcan be truncated mid-stack-frame, leaving a call site with an invalid column number. The source map library throws in that case, which was crashing the wrangler process entirely. The error is now caught and the original (un-source-mapped) text is returned instead. -
#14118
b38823fThanks @aicayzer! - FixUint8Arraystep outputs in local Workflows being persisted with the full backingArrayBufferA
Uint8Arrayreturned from a Workflows step underwrangler devwas serialised together with its full underlyingArrayBuffer, causing a rawSQLITE_TOOBIGerror at view sizes well below the documented 1MiB step-output limit. For example, a 200KB view sliced from an 800KB buffer (a common pattern fromcrypto.getRandomValuesorarr.slice(...)on a larger pool) would fail. The view's bytes are now copied to a tight buffer before persistence, bringing local behaviour in line with production. Fixes #14101. -
Updated dependencies [
b38823f]:
4.102.0
Minor Changes
-
#14340
f6e49ddThanks @emily-shen! - Addcf-wrangler builddelegate supportThe experimental
cf-wranglerdelegate binary now acceptsbuildand emits the Build Output API directory through Wrangler's new-config build path. This lets parent tools invoke Wrangler's build-output implementation withcf-wrangler buildinstead of shelling out through the public Wrangler CLI. -
#14324
36777dbThanks @jamesopstad! - Add experimental--experimental-cf-build-outputflag towrangler buildWhen used alongside
--experimental-new-config,wrangler buildnow emits a self-contained Build Output API directory under.cloudflare/output/v0/instead of delegating towrangler deploy --dry-run.
Patch Changes
-
#14347
673b09eThanks @jamesopstad! - Update undici from 7.24.8 to 7.28.0 -
#14346
e930bd4Thanks @haidargit! - Bumpwsfrom 8.20.1 to 8.21.0 to address GHSA-96hv-2xvq-fx4pGHSA-96hv-2xvq-fx4p / CVE-2026-48779 (high severity) reports a remote memory-exhaustion DoS in
ws@<8.21.0: a peer sending a high volume of tiny fragments and data chunks over modest network traffic can crash awsserver or client via OOM. The fix shipped in ws@8.21.0 (commit2b2abd45, released 2026-05-22), which also introduces themaxBufferedChunksandmaxFragmentsoptions. This change bumps the workspace catalog entry so thatminiflare,wrangler, and@cloudflare/vite-pluginall pick up the patched release. -
#14314
5c3bb11Thanks @harryzcy! - Bump esbuild to 0.28.1This update includes several bug fixes from esbuild versions 0.27.3 through 0.28.1. See the esbuild changelog for details.
-
#14331
296ad65Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260616.1 1.20260617.1 -
#14275
594544dThanks @alsuren! - Resolve auto-provisioned D1 bindings via the API in remote subcommandsRemote D1 subcommands (
d1 execute --remote,d1 export --remote,d1 info,d1 insights,d1 delete,d1 migrations apply --remote,d1 migrations list --remote,d1 time-travel) previously failed with:Found a database with name or binding DB but it is missing a database_id, which is needed for operations on remote resources.
when the
[[d1_databases]]config entry only hadbindinganddatabase_name(the shapewrangler deploywrites for automatically-provisioned bindings). They now resolve the real database UUID viaGET /accounts/:accountId/d1/database/:name?fields=uuidand proceed as ifdatabase_idhad been set in config.If the config entry only has a
binding(nodatabase_name, nodatabase_id), the lookup uses the same namewrangler deploywould create via auto provisioning (<worker name>-<binding-lowercased-with-dashes>).Non-404 API failures (auth, rate-limit, server errors) now propagate verbatim instead of being masked as "database not found".
-
#14315
a79b899Thanks @matingathani! - Respectfind_additional_modules = falsewhenno_bundleis setWhen using
no_bundle = true, wrangler was always scanning for and attaching additional modules even iffind_additional_moduleswas explicitly set tofalsein the config. Additional modules are now only collected whenfind_additional_modulesis notfalse, consistent with the bundled code path. -
#14269
5dfb788Thanks @mattjohnsonpint! - Supportdev.pluginon typed services bindingsWrangler only honored
dev.pluginonunsafe.bindingsentries, so users authoring a service binding viaservices[]could not wire it to a local Miniflare plugin duringwrangler dev— they had to fall back tounsafe.bindingsand accept a "directly supported by wrangler" warning. Typed services bindings now accept the samedev: { plugin, options? }shape, route the binding through Miniflare's external-plugin pathway inwrangler dev, and strip the field at deploy time. Validation rejects malformeddevshapes. -
#14328
ca61558Thanks @edevil! - Mention temporary preview accounts inwrangler whoamioutput when unauthenticatedWhen you run
wrangler whoamiwithout being logged in, Wrangler now also tells you that you can deploy without logging in by running a command likewrangler deploy --temporaryto use a temporary preview account.
4.101.0
Minor Changes
-
#14276
32f9307Thanks @dario-piotrowicz! - Graduate autoconfig from experimental to stableThe
--experimental-autoconfigand--x-autoconfigdeploy CLI flags have been replaced with--autoconfig.Note that the
--autoconfigflag defaults totrueand that it can be used to disable Wrangler's auto-configuration logic by setting it tofalsevia--autoconfig=falseor--no-autoconfig -
#14287
41f391fThanks @edmundhung! - Add per-Worker resource accessors tocreateTestHarness()createTestHarness()now provides methods for accessing configured KV namespaces, R2 buckets, D1 databases, and Durable Object namespaces. Useserver.getWorker(name)to access resources scoped to that specific Worker:const worker = server.getWorker("api-worker"); const bucket = await worker.getR2Bucket("BUCKET"); const db = await worker.getD1Database("DB"); -
#14264
21dbc12Thanks @dario-piotrowicz! - Suggest Cloudflare skills installation after commands instead of beforeThe automatic prompt to install Cloudflare skills for detected AI coding agents no longer runs before every Wrangler command. Instead, Wrangler now suggests installing skills, when appropriate, after some commands complete successfully. Commands that output JSON suppress the suggestion to keep their output clean. The
--install-skillsflag remains available on all commands to explicitly run the skills installation flow before the command executes, without prompting.As before, Wrangler asks the skills installation question at most once. The skills install metadata file is now written before the confirmation prompt is shown, so even if the user interrupts the process (e.g. CTRL+C, closing the terminal) during the prompt, the question is recorded as unanswered and will not reappear on subsequent runs.
-
#14042
7e63948Thanks @edevil! - Add a--temporaryflag that creates and uses a temporary Cloudflare preview account when you have no credentials, instead of starting the OAuth login flow.It's registered only on the commands the short-lived account token can serve — Workers (
deploy,versions upload, and related commands), KV, D1, Hyperdrive, Queues, and certificate commands — and is for unauthenticated use only: passing it while already authenticated (OAuth,CLOUDFLARE_API_TOKEN, or a global API key) errors rather than silently ignoring the flag. Before provisioning, Wrangler handles Cloudflare's Terms of Service and Privacy Policy (interactive terminals prompt foryes; non-interactive shells print a notice and continue). Wrangler then runs with the short-lived token and prints a claim URL so the account can be claimed before it expires. The cached account is cleared on successful login or logout. -
#14299
035917fThanks @petebacondarwin! - Send thelogin usertelemetry event whenwrangler login --scopes ...succeedswrangler loginwas already reporting thelogin userevent when called without--scopes, but the scoped login path returned early before the event could be sent. Both paths now report the event, so successful scoped logins are counted alongside unscoped ones.
Patch Changes
-
#14271
27db82cThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260611.1 1.20260612.1 -
#14298
2a6a26bThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260612.1 1.20260615.1 -
#14317
9a424edThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260615.1 1.20260616.1 -
#14282
ecfdd5aThanks @edmundhung! - Fixwrangler devasset fallback with custom routeswrangler devnow applies Workers Assets fallback behavior consistently when routes are configured, including SPA fallback and404-pagehandling. -
#13763
604be26Thanks @matingathani! - Show a clear error when deploying a service-worker format Worker with Durable Object migrations or bindings instead of an opaque API error -
#14240
1fb7ba5Thanks @ttoino! - Fixwrangler email sendingcommandsThe
email sendingcommands previously failed against the Cloudflare API. They now work as expected:email sending enable <domain>enables Email Sending for a domainemail sending disable <domain>disables Email Sending for a domainemail sending settings <domain>shows the Email Sending configuration for a domainemail sending dns get <domain>shows the DNS records to set up for a domainemail sending listpreviously listed zones. It now lists the domains that have Email Sending enabled — every enabled domain across your account by default, or just those under a specific domain when you pass a domain (or--zone-id).
-
#13838
208b3bbThanks @matingathani! - Fix unhandled promise rejection when the worker entry point is deleted or moved duringwrangler devhot-reload — now logs a warning and skips the update instead of crashing -
#14241
8b2ce41Thanks @dario-piotrowicz! - Improve error messages for CLI flags, type generation, auth scopes, dev server tunnels, and compatibility flagsError messages across several areas now name the exact flags or values involved and suggest how to fix the problem:
- KV commands (
kv key put,kv key get,kv key delete): error messages now include--prefixes and clear "Missing required option" / "Conflicting options" phrasing instead of the vague "Exactly one of the arguments ... is required". wrangler types --include-env=false --include-runtime=false: the error now names both flags and explains what each does.wrangler login --scopes: invalid scopes are individually identified instead of dumping the entire array.wrangler dev --tunnel --remote: the error now explains why tunnels require local mode and suggests two concrete fixes.- Conflicting compatibility flags (
nodejs_compat_populate_process_env/nodejs_compat_do_not_populate_process_env,global_navigator/no_global_navigator): errors now name the specific conflicting flags.
- KV commands (
-
#14228
3578919Thanks @dario-piotrowicz! - Improve Hyperdrive error messages for missing required optionsError messages thrown when creating or updating a Hyperdrive config with missing individual parameters (e.g.
--origin-host,--origin-port,--database,--origin-user,--origin-password,--origin-scheme,--access-client-id/--access-client-secret) now clearly state which option is missing, provide a usage example, and suggest--connection-stringas an alternative where applicable. -
#14304
ee82c76Thanks @emily-shen! - Skip resource provisioning for asset-only deploymentsPreviously, asset-only deployments would provision resources even when there was no user Worker script. On a subsequent deploy, we would re-attempt provisioning as the previous asset-only upload would/could not be bound to the previously provisioned resource. Provisioning would then error as the resource had already been created, blocking the deploy.
-
Updated dependencies [
0e055d3,27db82c,2a6a26b,9a424ed,41f391f]:
4.100.0
Minor Changes
-
#14119
2047a32Thanks @tahmid-23! - Serve local R2 bucket objects publicly via the dev serverWhen running
wrangler devlocally, objects in each local R2 binding are now reachable under/cdn-cgi/local/r2/public/<bucket-id>/<key>on the existing dev server, simulating a public bucket. The<bucket-id>is the bucket'sbucket_namewhen set, otherwise itsbinding. Bindings configured withremote: trueare not exposed. -
#14202
e8561c2Thanks @jamesopstad! - Add experimental--x-new-configflag for authoring config in TypeScriptThis is an experimental, opt-in feature. When enabled,
wrangler dev,wrangler build,wrangler deploy,wrangler versions upload, andwrangler versions deployload the Worker's configuration from acloudflare.config.tsfile instead ofwrangler.json/wrangler.jsonc/wrangler.toml. Additionally, an optionalwrangler.config.tsfile can be provided for Wrangler-specific dev/build configuration.cloudflare.config.ts(required) — Worker runtime configuration (bindings, triggers, observability, placement, limits, compatibility, routes, etc.). Authored viadefineWorkerfromwrangler/experimental-config.wrangler.config.ts(optional) — Tooling / bundling / dev-server configuration (noBundle,minify,alias,define,rules,tsconfig,build,dev,assetsDirectory, etc.). Authored viadefineWranglerConfigfromwrangler/experimental-config.
Per-environment configuration is via
ctx.modebranching inside the function form of either file.Example
cloudflare.config.ts:import { defineWorker, bindings } from "wrangler/experimental-config"; import * as entrypoint from "./src/index.ts" with { type: "cf-worker" }; export default defineWorker((ctx) => ({ name: "my-worker", entrypoint, compatibilityDate: "2026-05-18", env: { MY_KV: bindings.kv(), MY_TEXT: bindings.text(`The mode is ${ctx.mode}`), }, }));Example
wrangler.config.ts:import { defineWranglerConfig } from "wrangler/experimental-config"; export default defineWranglerConfig({ minify: true, assetsDirectory: "./public", });Because this is experimental, the flag, the config formats, and the
wrangler/experimental-configexports may change in any release.
Patch Changes
-
#14185
98c9afeThanks @penalosa! - Use the shared env-credential resolver from@cloudflare/workers-authNo user-facing behaviour change. Credential resolution order (global API key + email →
CLOUDFLARE_API_TOKEN→ stored OAuth token) is preserved. -
#14184
e305126Thanks @penalosa! - Add an experimentalcf-wranglerdelegate entrypoint for projects that can't use@cloudflare/vite-plugin(service workers, old compatibility dates, Python, Rust, etc.).cf-wrangler devstarts the same local dev server aswrangler dev— it sits directly on wrangler's internal dev server, so the bundling and runtime behaviour are identical — but exposes a deliberately narrow CLI surface (--mode,--port,--host,--local) for a parent CLI to delegate to, and other dev server config options are read from the wrangler config file.This replaces the separate
@cloudflare/wrangler-bundlerpackage. This is an internal integration point and is not intended to be run directly by users. -
#14246
f3990b2Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260609.1 1.20260610.1 -
#14256
4597f08Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260610.1 1.20260611.1 -
#14243
25722acThanks @com6056! - Fix a memory leak that could make long-running headlesswrangler devsessions unresponsiveLong-running
wrangler devsessions with no DevTools attached (for example using the containers feature under sustained traffic) could gradually consume unbounded memory and eventually stop accepting connections. The inspector proxy now only enables network tracking while a DevTools client is connected, so the buildup no longer happens. Interactive debugging is unaffected. Fixes #14191. -
#14230
41f75c0Thanks @dario-piotrowicz! - Improve D1 error messages for missing or conflicting optionsError messages for
d1 execute,d1 export,d1 time-travel restore, andd1 insightsnow clearly state which option is missing or conflicting, explain why the combination is invalid, and suggest how to fix the issue.Additionally, duration validation errors in
d1 insightsare now thrown asUserErrorinstead of plainError, ensuring they are displayed cleanly to users rather than as unexpected crashes. -
#14213
10b5538Thanks @dario-piotrowicz! - Improve authentication error messages with specific failure reasonsWhen authentication fails (e.g. during
wrangler dev --remoteor when using remote bindings), the error message now explains exactly what went wrong -- whether no credentials were found, the token expired, or the environment is non-interactive -- and lists actionable steps to fix it, including awrangler whoamitip.Previously, auth failures could produce multiple confusing errors (e.g. "Failed to fetch auth token: 400 Bad Request" followed by "Failed to start the remote proxy session"). Now a single, clear error is shown.
-
#14233
818c105Thanks @dario-piotrowicz! - Improve R2 Sippy error messagesNow error messages in
wrangler r2 bucket sippyfollow a consistent pattern: they describe what is missing, name the exact--flagto use, and provide context (e.g. example values, links to the dashboard). Previously, many errors said only "Error: must provide --flag." with no guidance on what the flag does or how to obtain the value. -
#14259
2ae6099Thanks @emily-shen! - Move worker build step earlier in deploy/upload step, before upload specific config validation
4.99.0
Minor Changes
-
#14169
0706fbfThanks @edmundhung! - IntroducecreateTestHarness()for integration testing WorkersIt runs Workers in a local preview environment using production build output and works with both Wrangler projects and Workers built by the Cloudflare Vite plugin.
Use it from any Node.js test runner to send requests to individual Workers, trigger scheduled events, reset the server between tests, and mock outbound requests with libraries that intercept
globalThis.fetch(), such as MSW.You can also capture structured logs from your Workers with
getLogs(), or dump out a diagnostic timeline withdebug()when tests fail:import { createTestHarness } from "wrangler"; const server = createTestHarness({ workers: [ { configPath: "./dist/web_worker/wrangler.json" }, { configPath: "./dist/api_worker/wrangler.json" }, ], }); await server.listen(); await server.fetch("http://example.com"); const apiWorker = server.getWorker("api-worker"); await apiWorker.fetch("http://example.com/users/123"); await apiWorker.scheduled({ cron: "0 0 * * *" }); server.getLogs(); if (testFailed) { server.debug(); } await server.reset(); await server.close(); -
#14174
8cf8c61Thanks @oliy! - Surface pipeline status and failure reasons inwrangler pipelines listandwrangler pipelines getwrangler pipelines listnow includes aStatuscolumn, and when any pipelines are in afailedstate it prints a summary of each failing pipeline along with the reason reported by the API.wrangler pipelines getnow shows the pipelineStatusin the general details and, for failed pipelines, highlights the failure with the reason returned by the server so it is clear why a pipeline is not running. -
#14211
a61ac29Thanks @james-elicx! - Add--version-tagsupport towrangler versions deployto deploy a version by its tagYou can now roll out or roll back a version by the tag it was uploaded with (e.g. a commit SHA passed to
--tagat upload time) instead of first looking up its Version ID:wrangler versions deploy --version-tag <sha>@100%The tag is resolved to a Version ID against the worker's deployable versions, and the
<version-tag>@<percentage>shorthand works just like the existing<version-id>@<percentage>notation, including splitting traffic across multiple--version-tagvalues. If a tag matches no deployable version, or matches more than one, the command errors and asks you to deploy by Version ID directly. Note that tags can only be resolved against recent (deployable) versions — older versions that have aged out of that window must still be deployed by Version ID.
Patch Changes
-
#14163
23aecacThanks @emily-shen! - Print deploy warnings even in non-interactive contexts when strict mode is offCurrently, wrangler deploy checks whether the incoming deploy configuration has destructive conflicts with the current configuration. Previously, we only performed this check in interactive contexts, or if the
--strictflag was passed in. Now this warning is always printed, and it remains non-blocking in non-interactive contexts. -
#14173
b932e47Thanks @gpanders! - Handle API validation errors fromwrangler containers sshWrangler now lets the Containers API validate SSH instance IDs and preserves raw API error bodies such as
INVALID_INSTANCE_IDwhen reporting validation failures. -
#14192
d076bccThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260603.1 1.20260605.1 -
#14217
24497d0Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260605.1 1.20260608.1 -
#14231
4bb572fThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260608.1 1.20260609.1 -
#14195
165adb2Thanks @dario-piotrowicz! - Show actionable error message when authentication fails during remote devWhen
wrangler devwith remote bindings encountered an authentication error (expired token, revoked OAuth, or invalid API token), the user saw a generic "A request to the Cloudflare API failed" message with no indication that authentication was the problem.Now, authentication failures during remote dev display a clear error message with actionable steps.
-
#14034
776098cThanks @matingathani! - Fixwrangler types --checkreporting types as out of date in multi-worker setupsPreviously, running
wrangler types --check -c primary/wrangler.jsoncin a multi-worker project would incorrectly report types as out of date, even when they were current. This happened because the secondary worker config paths (passed via additional-cflags during generation) were not stored in the generated types file header, so--checkhad no way to resolve the secondary workers' service bindings when verifying the hash.The fix stores secondary config paths in the generated file's header comment so that
--checkcan recover them automatically. Users no longer need to re-pass every-cflag when running--check— only the primary config is required. -
#14053
7993711Thanks @fallintoplace! - Prevent delete-onlywrangler secret bulkinput from creating a new WorkerPreviously,
wrangler secret bulkcould create a draft Worker when the input only deleted secrets and the target Worker name did not exist. Delete-only bulk secret operations now leave Worker-not-found as an error instead of creating a new Worker. -
#14055
8923f97Thanks @dario-piotrowicz! - Preserve all deployment-affecting CLI flags in the interactive deploy config flowWhen running
wrangler deploywithout a config file and going through the interactive setup flow, CLI flags beyond--compatibility-flags(such as--routes/--route,--domains/--domain,--triggers,--var,--define,--alias,--jsx-factory,--jsx-fragment,--tsconfig,--minify,--upload-source-maps,--no-bundle,--logpush,--keep-vars,--legacy-env, and--dispatch-namespace) were silently dropped. These flags are now persisted to the generatedwrangler.jsoncconfig file (where a config field equivalent exists) and included in the suggested CLI command when the user declines config file generation. -
#14196
b205fb7Thanks @odiak! - Validate JSON stdin values forwrangler secret bulkJSON input piped through stdin now validates that secret values are strings or null before sending them to the API, matching the existing behavior for file input.
4.98.0
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.{ "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 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.
4.97.0
Minor Changes
-
#13996
94b29f7Thanks @vaishnav-mk! - Add restart-from-step options towrangler workflows instances restartYou can now restart a Workflow instance from a specific step using
--from-step-name, with optional--from-step-countand--from-step-typedisambiguation. These options work for both remote Workflow instances and localwrangler dev --localsessions.
Patch Changes
-
#14141
b210c5eThanks @MattieTK! - Add re-authentication hint to account fetch error messagesWhen Wrangler fails to automatically retrieve account IDs, the error messages now suggest running
wrangler loginas a troubleshooting step. This addresses confusion for users who encounter these errors after OAuth system changes or other authentication issues. -
#14078
aec1bb8Thanks @MattieTK! - Bumpam-i-vibingfrom 0.1.1 to 0.4.0This updates the agentic environment detection library to the latest version, which includes improved detection coverage for newer AI coding agents.
-
#14147
e06cbb7Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260529.1 1.20260601.1 -
#14027
9a26191Thanks @matingathani! - Gracefully handle EMFILE error when assets directory exceeds OS watcher limitPreviously, when
wrangler devwas pointed at an assets directory with more than ~4,096 subdirectories, the chokidar file watcher threw anEMFILE: too many open fileserror that was not caught, causing an infinite error loop that made the dev server unresponsive.Now the error is caught and wrangler:
- Logs a clear warning explaining the platform watcher limit was hit
- Recommends reducing the number of subdirectories by flattening or restructuring the assets directory
- Disables the assets watcher gracefully so the dev server continues working without hot-reload
-
#14041
5565823Thanks @matingathani! - Fixwrangler completeprinting the AI skills prompt into shell completion outputPreviously, running
eval "$(wrangler complete zsh)"(or any other shell) would fail with errors likezsh: command not found: --install-skillsbecause the interactive AI agent skills installation prompt was included in the completion script output.The skills prompt is now skipped when running
wrangler complete, so the generated completion script is clean and can be sourced correctly. -
#13881
890fca7Thanks @matingathani! - Show a clear error when--metadatais not valid JSON instead of silently ignoring the value -
#14149
6fc9777Thanks @mattjohnsonpint! - Fixwrangler deploy --upload-source-mapssilently skipping source maps when the entry file ends with magic comments after//# sourceMappingURL=Wrangler previously assumed the
//# sourceMappingURL=comment was the last non-empty line of a module. Tools likesentry-cli sourcemaps injectappend a//# debugId=comment after it, which silently caused source maps to be omitted from the upload form, most commonly when deploying with--no-bundle --upload-source-maps. Wrangler now scans trailing magic comments (lines starting with//#or//@) and detects the//# sourceMappingURL=comment regardless of which other magic comments follow it. -
#14105
337e912Thanks @dario-piotrowicz! - Remove trailing periods from URLs in terminal outputURLs printed to the terminal with a sentence-ending period (e.g.
https://example.com/path.) would include the period when clicked in some terminal emulators, causing 404 errors. This removes trailing periods from all URLs displayed in CLI output across wrangler, miniflare, vitest-pool-workers, and workers-utils. -
#14150
8e7b74fThanks @avenceslau! - Fix Workflowsschedulesdeploy payload to match the control plane APIWhen deploying a Workflow with a
schedulesbinding property, Wrangler sent the cron expressions as a list of strings. The Workflows API expects a list of objects of the form{ cron: string }, so the request was rejected. Wrangler now maps each configured cron expression to{ cron }(normalizing a single string or an array) when building the request. The user-facing config still accepts a string or an array of strings. -
#14084
e86489aThanks @dario-piotrowicz! - Fix JSON variable bindings inwrangler init --from-dashand remote config diffWhen fetching a remote Worker's configuration, JSON variable bindings (e.g.
{"my_value": 5}) were incorrectly serialized as{ "name": "MY_JSON", "json": {"my_value": 5} }instead of{ "MY_JSON": {"my_value": 5} }. This affected two areas:wrangler init --from-dashwould generate awrangler.jsonwith brokenvarsentries- Remote config diff checks would always report JSON bindings as changed, since the malformed remote representation could never match the local config
Both issues are now fixed and remote JSON bindings are now correctly mapped.
-
#14155
42288d4Thanks @dario-piotrowicz! - Include agent skill installation status in all telemetry eventsThe agent skill installation status is now consistently included in all telemetry events, not just a subset of them.
-
#14063
65b5f9eThanks @emily-shen! - Move fetch helpers into@cloudflare/workers-utilsShared Cloudflare API fetch helper types and plumbing now live in
@cloudflare/workers-utilsso Wrangler and other clients can use the same implementation. -
#14112
3a746acThanks @penalosa! - Pin non-bundled runtime dependencies to exact versionsDependencies that are not bundled into a package's published output are installed directly into consumers' dependency trees, so they are now pinned to exact versions instead of semver ranges. This closes a supply-chain gap where an unpinned external dependency could resolve to a compromised upstream release on a fresh install. A new
pnpm check:pinned-depslint enforces this for all published packages (and for the shared pnpm catalog) going forward. -
#14124
64ef9fdThanks @odiak! - Fixwrangler secret bulkdropping newlines from.envinput read from stdinPreviously,
.envinput piped through stdin was concatenated without line breaks, so only the first secret could be parsed correctly. Stdin input now preserves line separators before parsing.
4.96.0
Minor Changes
-
#14087
e3c862aThanks @edmundhung! - Add support for the newweb_searchbinding kind.Cloudflare Web Search is a managed, zero-setup web discovery primitive for agents and Workers. Declare the binding as a single object in
wrangler.jsonc:{ "web_search": { "binding": "WEBSEARCH" } }There is exactly one shared web corpus, so there is no namespace, instance, or other field to specify -- only the variable name. The binding exposes a single
search()method that returns URLs and catalog metadata for a query. Web Search is discovery-only -- to read a result's content the caller invokes the globalfetch()API against the result'surl.The binding is always remote in local development: Miniflare proxies to the production Web Search service via the remote-bindings transport. Adds the
websearch.runOAuth scope towrangler login.Also adds a
wrangler websearch searchcommand for running ad-hoc queries from the CLI:npx wrangler websearch search "cloudflare workers" npx wrangler websearch search "cloudflare workers" --limit 5 npx wrangler websearch search "cloudflare workers" --json--limitis optional (defaults to 10, capped at 20).--jsonprints the raw response; without it the results render as a pretty table. -
#13610
cbb39bdThanks @petebacondarwin! - Add support foragent_memorybindingsAgent Memory bindings allow Workers to connect to Cloudflare's Agent Memory service for storing and retrieving agent conversation state. This binding is remote-only, meaning it always connects to the Cloudflare API during
wrangler devrather than using a local simulation.To configure an
agent_memorybinding, add the following to yourwrangler.json:{ "agent_memory": [ { "binding": "MY_MEMORY", "namespace": "my-namespace" } ] }Wrangler will automatically provision the namespace during deployment if it does not already exist. Type generation via
wrangler typesis also supported.This change also adds the
agent-memory:writeOAuth scope to Wrangler's default login scopes, sowrangler logincan request the permissions needed to provision and manage Agent Memory namespaces. -
#13610
cbb39bdThanks @petebacondarwin! - Addwrangler agent-memory namespacecommandsThe following commands have been added for managing Agent Memory namespaces:
wrangler agent-memory namespace create <namespace> wrangler agent-memory namespace list [--json] wrangler agent-memory namespace get <namespace_name> [--json] wrangler agent-memory namespace delete <namespace_name> [--force] -
#14087
e3c862aThanks @edmundhung! - Add confirmation prompt towrangler containers images deletePreviously, running
wrangler containers images delete IMAGE:TAGwould delete the image immediately with no confirmation. The command now prompts for confirmation before deleting. Use-yor--skip-confirmationto bypass the prompt in non-interactive or scripted environments. -
#14087
e3c862aThanks @edmundhung! - Renamepipelinefield tostreamin pipeline bindings configurationThe
pipelinefield insidepipelinesbindings has been renamed tostreamto align with the updated API wire format. The oldpipelinefield is still accepted but deprecated and will emit a warning.Before:
// wrangler.json { "pipelines": [ { "binding": "MY_PIPELINE", "pipeline": "my-stream-name" } ] }After:
// wrangler.json { "pipelines": [ { "binding": "MY_PIPELINE", "stream": "my-stream-name" } ] } -
#14087
e3c862aThanks @edmundhung! - Allow pipeline, stream, and sink commands to resolve resources by name with pagination-aware lookups. -
#14087
e3c862aThanks @edmundhung! - Support deleting secrets viawrangler secret bulkYou can now delete secrets in bulk by setting their value to
nullin the JSON input file:{ "SECRET_TO_DELETE": null, "SECRET_TO_UPDATE": "new-value" } -
#14091
4c0da7bThanks @gpanders! - Add ProxyCommand support forwrangler containers sshwrangler containers sshnow automatically switches to a stdio proxy when invoked by OpenSSH'sProxyCommand, and--stdiocan force this mode. This lets users connect withssh <instance_id>when their SSH config uses Wrangler as the proxy command. -
#13892
13cbadbThanks @penalosa! - Remove the deprecatedexperimental.testModeoption fromunstable_devexperimental.testModepreviously only affected the defaultlogLevel(warnwhentestMode: true,logotherwise) and has been flagged for removal in its type-definition comment since it landed. It is now removed, andunstable_dev's default log level matcheswrangler dev's (log).Callers that explicitly passed
testMode: trueto get quieter logs should now setlogLevel: "warn"directly.
Patch Changes
-
#14016
408432aThanks @petebacondarwin! - report all failing triggers from a single deploywrangler deploydeploys several kinds of trigger in parallel (routes, custom domains, schedules, queue producers/consumers, workflows). Previously, if one of those API calls failed, the first rejection short-circuited the rest, no other deployments were reported, and (in the case of custom-domain confirmation conflicts) some failures were silently logged to stdout without the deploy actually failing.wrangler deploynow waits for every trigger deployment to settle, prints every successfully-deployed target (so you still see what landed), and then throws a single error listing every trigger that failed.Note that this also turns the previously-silent "user declined to override a conflicting Custom Domain" case into a hard failure of
wrangler deploy, which matches what was always implied by the message ("Publishing to Custom Domain ... was skipped, fix conflict and try again"). -
#14125
1103c07Thanks @dario-piotrowicz! - Bumprosie-skillsfrom0.7.6to0.8.1and bundle it into the Wrangler outputThe new version of
rosie-skillsis a pure-TypeScript rewrite that removes the previously necessary ~600kb WASM binary. The package now ships only JavaScript with one minimal dependencies (modern-tar).Additionally,
rosie-skillsis now bundled directly into Wrangler's distributable rather than kept as an external runtime dependency. This eliminates the supply chain concern raised in #14110: there is no separate package to resolve at install time, since all code is inlined into Wrangler's build output. -
#14135
5b5cbd3Thanks @Refaerds! - Update the generated type for browser bindings toBrowserRunWhen running
wrangler types, browser bindings were previously typed as the genericFetcher. They now generate the more specific and accurateBrowserRuntype. -
#14087
e3c862aThanks @edmundhung! - Bumprosie-skillspackage from 0.6.3 to 0.7.6 -
#14087
e3c862aThanks @edmundhung! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260526.1 1.20260527.1 -
#14076
97d7d81Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260527.1 1.20260528.1 -
#14100
c647cccThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260528.1 1.20260529.1 -
#14087
e3c862aThanks @edmundhung! - Disable Sentry error reporting by defaultWRANGLER_SEND_ERROR_REPORTSnow defaults tofalseinstead of prompting on every error. The current prompt produces too many false-positive reports. Users can still opt in explicitly by settingWRANGLER_SEND_ERROR_REPORTS=true. -
#14087
e3c862aThanks @edmundhung! - Fixwrangler setupfailing for Vite projects without a config filewrangler setup(andwrangler deploy --experimental-autoconfig) crashed with "Could not find Vite config file to modify" for Vite projects that don't have avite.config.jsorvite.config.ts. This affected 6 of the 16create-vitetemplates:vanilla,vanilla-ts,react-swc,react-swc-ts,lit, andlit-ts.Autoconfig now creates a minimal Vite config with the Cloudflare plugin when no config file exists, instead of failing. The file extension (
.tsor.js) is chosen based on whether the project has atsconfig.json. -
#14087
e3c862aThanks @edmundhung! - Show helpful message with URL when browser cannot be opened in headless/container environmentsPreviously, running
wrangler login(or any command that opens a browser) in headless Linux environments withoutxdg-openinstalled would crash with a confusing "A file or directory could not be found — Missing file or directory: xdg-open" error.Now wrangler catches the error and prints a clear warning with the URL so users can copy-paste it into a browser manually.
-
#14087
e3c862aThanks @edmundhung! -wrangler secrets-store secret createandsecret updatenow reject secret values larger than 64 KiB (65,536 bytes) with a clear error before calling the Cloudflare API. Previously the CLI accepted them, the secret appeared insecret list, and the failure surfaced later (and confusingly) at worker deploy time as a "secret doesn't exist" error against the binding. 64 KiB is the cap enforced by the API; the CLI now enforces it at the same boundary. -
#14059
b64b7e4Thanks @matingathani! - Fixwrangler kv bulk getprinting "Success!" to stdout, which corrupted JSON output when piped to tools likejq -
#14002
e4c8fd9Thanks @danyalahmed1995! - Show a clear error for invalid API token header charactersWrangler now detects API tokens containing characters that cannot be sent in the HTTP Authorization header before making an API request. This avoids a low-level ByteString conversion error and helps users recreate or recopy the token without printing the token value.
-
#14132
2dffeebThanks @dario-piotrowicz! - Adapt React Router autoconfig based onv8_middlewarefuture flagThe React Router autoconfig (
wrangler setup) now detects whetherv8_middleware: trueis set in the user'sreact-router.config.ts. When it is, the generatedworkers/app.tsuses a simplified fetch handler withoutAppLoadContextmodule augmentation, and the generatedapp/entry.server.tsxomits the_loadContextparameter. Whenv8_middlewareis not set, the existingAppLoadContextpattern withenv/ctxparams is preserved.This avoids breaking projects that use the
v8_middlewarefuture flag (which changes the context API fromAppLoadContexttoRouterContextProvider), while keeping the traditional pattern for projects that haven't opted in. -
#14133
59e43e4Thanks @matingathani! - Fixwrangler whoamiprinting a trailing period after the api-tokens URLThe message
To see token permissions visit https://...api-tokens.ended with a period that became part of the URL when clicked in terminals or GitHub Actions output, causing a 404. The period is removed and a comma added before "visit" so the sentence reads naturally without a trailing period on the URL. -
Updated dependencies [
e3c862a,cbb39bd,7bb5c7a,e3c862a,97d7d81,c647ccc,e3c862a,e3c862a,972d13d]:
4.95.0
Minor Changes
-
#14009
ca5b604Thanks @dario-piotrowicz! - Add telemetry for detecting whether AI coding agents have Cloudflare skills installedWrangler now includes a
currentAgentSkillsInstalledproperty in telemetry events that reports whether the current AI coding agent has Cloudflare skills present on disk. The value distinguishes between skills installed automatically by Wrangler ("automatic"), skills installed manually by the user ("manual"), no skills present (false), or no supported agent detected (null). Skill names are fetched from the GitHub Contents API with a 24-hour disk cache to avoid rate limits. -
#14014
d042705Thanks @emily-shen! - Add--x-deploy-helpersto gate an upcoming deploy path refactor.
Patch Changes
-
#14003
c1fd2fdThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260521.1 1.20260526.1 -
#13728
49c1a59Thanks @penalosa! - Rejectremote: falseon always-remote bindings (AI, AI Search, Media, Artifacts, Flagship, VPC Service, VPC Network)These binding types have no local simulator and the resource is fundamentally remote-only. Setting
remote: falsewas previously silently accepted but produced a non-functional binding.wrangler devnow fails with a clear error directing users to either remove theremotefield or set it totrue. -
#14039
fee1ce4Thanks @dario-piotrowicz! - Preserve--compatibility-flagsin the interactive deploy config flowWhen running
wrangler deploywithout a config file and going through the interactive setup flow, any--compatibility-flagspassed on the command line (e.g.--compatibility-flags=nodejs_compat) were lost in two places:- The generated
wrangler.jsoncfile did not includecompatibility_flags. - The suggested CLI command shown when declining the config file write did not include
--compatibility-flags.
Both are now fixed. Compatibility flags are persisted to the generated config and included in the suggested command.
- The generated
-
#14010
b3962ffThanks @dario-piotrowicz! - Improve error messages for Pages CLI commandsError messages across
wrangler pagessubcommands (deploy, dev, secret, project, etc.) now provide clearer descriptions and actionable guidance. For example, instead of "Must specify a project name.", you'll now see "Missing Pages project name. Use --project-name or set the name in your wrangler.jsonc configuration file." -
#14011
420e457Thanks @petebacondarwin! - Warn when a remote-bindings request is blocked by Cloudflare AccessWhen
wrangler devis used with remote bindings and a request from the local remote-bindings proxy client to the remote workers.dev proxy server is blocked by Cloudflare Access (HTTP 403 with the Cloudflare Access block page), Wrangler now:- Logs a single, visually striking warning per dev session explaining how to set
CLOUDFLARE_ACCESS_CLIENT_ID/CLOUDFLARE_ACCESS_CLIENT_SECRET(Service Token credentials) or runcloudflared access loginto authenticate. - Replaces the original Access HTML block page with a readable plain-text body containing the same guidance, so the message also reaches the user via binding error messages (e.g.
InferenceUpstreamErrorfromenv.AI.run()) and any browser response piped back via a service binding.fetch().
Previously the 403 was returned to user code with the full Access HTML, which both drowned out other logs and made it hard to tell that the failure was due to Cloudflare Access on workers.dev rather than a problem in the binding itself or the deployed proxy server. The detection runs inside the proxy client worker (which only ever talks to the remote-bindings proxy URL), so it does not trigger false positives on user-worker 403s.
- Logs a single, visually striking warning per dev session explaining how to set
-
#14044
8b1467eThanks @pombosilva! - Rename Workflow bindingscheduleproperty toschedulesThe
scheduleproperty on Workflow bindings introduced in #13467 has been renamed toschedulesto match the control plane API.Note: This remains a configuration-only change. Scheduled triggering of Workflow instances is not yet available — adding
schedulesto a Workflow binding will not result in scheduled invocations at this time.
4.94.0
Minor Changes
-
#13897
52e9082Thanks @dario-piotrowicz! - Add automatic Cloudflare skills installation for AI coding agentsWrangler now detects AI coding agents and offers to install Cloudflare skill files from the
cloudflare/skillsGitHub repository. Users are prompted once interactively; subsequent runs skip the prompt. Use--install-skillsto install without prompting. -
#13989
f598eacThanks @MattieTK! - Print a QR code alongside the tunnel URL when sharing via Cloudflare TunnelWhen a tunnel is started (via
wrangler dev --tunnelor the Vite plugin withtunnel: true), a scannable QR code is now printed to the terminal beneath the tunnel URL. This makes it easy to open the tunnel on a mobile device without manually copying the URL.The QR code uses Unicode block characters for a compact representation and is generated best-effort -- if generation fails for any reason, the tunnel URL is still displayed as before.
-
#13467
3a1fbedThanks @deloreyj! - Addscheduleproperty to Workflow bindings for cron-based triggeringNote: This is a configuration-only change. Scheduled triggering of Workflow instances is not yet available — adding
scheduleto a Workflow binding will not result in scheduled invocations at this time. This change lays the groundwork for an upcoming feature.Workflow bindings in
wrangler.jsonnow accept an optionalschedulefield that configures one or more cron expressions to automatically trigger new workflow instances on a schedule.// wrangler.json { "workflows": [ { "binding": "MY_WORKFLOW", "name": "my-workflow", "class_name": "MyWorkflow", "schedule": "0 9 * * 1" } ] }Multiple schedules can be provided as an array:
{ "workflows": [ { "binding": "MY_WORKFLOW", "name": "my-workflow", "class_name": "MyWorkflow", "schedule": ["0 9 * * 1", "0 17 * * 5"] } ] }The schedule is sent to the Workflows control plane on
wrangler deploy. Configuringscheduleon a workflow binding that references an externalscript_nameis an error — the schedule must be configured on the worker that defines the workflow.
Patch Changes
-
#13993
0733688Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260520.1 1.20260521.1 -
#14008
fc1f7b9Thanks @petebacondarwin! - Fix Access Service Token authentication for applications that only allow service tokensWhen using remote bindings against a Worker behind a Cloudflare Access application configured to only allow Service Auth tokens (no interactive user authentication), Wrangler previously ignored the
CLOUDFLARE_ACCESS_CLIENT_IDandCLOUDFLARE_ACCESS_CLIENT_SECRETenvironment variables and the request would fail with a 403.This happened because Wrangler detects Access by looking for a 302 redirect to
cloudflareaccess.com. A service-auth-only Access application has no interactive login path, so it responds with a hard 403 instead of redirecting. Wrangler concluded the domain was not behind Access and skipped attaching the service token headers entirely.The env-var check now runs before the Access detection step, so the configured service token credentials are always used when present.
-
#12277
8c569c6Thanks @penalosa! - Include column names in D1 SQL export INSERT statementsD1 SQL exports now include column names in INSERT statements (e.g.,
INSERT INTO "table" ("col1","col2") VALUES(...)). This ensures that exported SQL can be successfully imported even when the target table has columns in a different order than the original, which commonly occurs during iterative development when schemas evolve.
4.93.1
Patch Changes
-
#13978
fa1f61fThanks @sassyconsultingllc! - Bumpwsfrom 8.18.0 to 8.20.1 to address GHSA-58qx-3vcg-4xpxGHSA-58qx-3vcg-4xpx / CVE-2026-45736 reports an uninitialized-memory disclosure in
ws@<8.20.1when aTypedArrayis passed as the reason argument toWebSocket.close(). The fix shipped in ws@8.20.1 on 2026-05-12. This change bumps the workspace catalog entry so thatminiflare,wrangler, and@cloudflare/vite-pluginall pick up the patched release. -
#13977
2679e05Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260518.1 1.20260519.1 -
#13984
7e40d98Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260519.1 1.20260520.1 -
#13963
adc9221Thanks @gabivlj! - Preserve sibling container image tags during local dev cleanupWrangler now keeps other
cloudflare-devimage tags from the same dev session when multiple containers share a Dockerfile. Previously, duplicate-image cleanup could remove earlier container tags if Docker BuildKit produced the same image ID for each build. -
#13839
735852dThanks @matingathani! - fix: show actionable hint when/membershipsreturns a bad-credentials error (code 9106)Previously,
wranglerthrew a raw Cloudflare API error ("Missing X-Auth-Key, X-Auth-Email or Authorization headers") with no guidance. Now it emits aUserErrorexplaining that an environment variable such asCLOUDFLARE_API_TOKEN,CLOUDFLARE_API_KEY, orCLOUDFLARE_EMAILmay be set to an invalid value, and suggests runningwrangler logout/wrangler loginto re-authenticate. -
#13912
d803737Thanks @petebacondarwin! - Fix/cdn-cgi/*host validation incorrectly accepting subdomains of exact configured routesMiniflare's
/cdn-cgi/*host/origin validator was treating exact configured routes the same as wildcard configured routes, so a request whoseHostorOriginhostname was a subdomain of an exact route (e.g.sub.my-custom-site.comfor amy-custom-site.com/*route) was incorrectly accepted. Exact configured routes and the configuredupstreamhostname are now required to match the request hostname exactly. Subdomain matching is only applied to wildcard routes such as*.example.com/*. Localhost hostnames continue to be allowed as before.This affects
wrangler devand local development through@cloudflare/vite-plugin, both of which use Miniflare under the hood. -
#13919
c7eab7fThanks @petebacondarwin! - Fix the outboundCF-Workerheader reflecting the route pattern hostname instead of the parent zone, and falling back to<worker-name>.example.comundervite dev,vitest-pool-workers, andgetPlatformProxyTwo related issues affected the
CF-Workerheader on outbound subrequests in local development:- Under
@cloudflare/vite-plugin,@cloudflare/vitest-pool-workers, andgetPlatformProxy, the header fell back to<worker-name>.example.comeven whenrouteswere configured, becauseunstable_getMiniflareWorkerOptionsand the equivalentgetPlatformProxyworker-options path did not propagate azonevalue to Miniflare. This broke local development against services that reject unknownCF-Workerhosts (for example, Apple WeatherKit returns403 Forbidden). - Across the above paths and
wrangler dev --local, when a route used thezone_namefield (for example{ pattern: "foo.example.com/*", zone_name: "example.com" }), the header was set to the pattern's hostname (foo.example.com) rather than the zone name (example.com). Production setsCF-Workerto the zone name that owns the Worker, so this was inconsistent with deployed behaviour.
Both bugs are fixed: the new
unstable_getMiniflareWorkerOptions/getPlatformProxypath now propagates azonederived from the first configured route, and all four local-dev paths now prefer a route's explicitzone_nameover the pattern hostname when computing that zone. Whenzone_nameisn't set, the existing best-effort behaviour is preserved — forwrangler devthis meansdev.hostis still honoured as a local override and the pattern hostname is used as a final fallback. Resolving the parent zone forzone_id-only,custom_domain, or plain-string routes would require an API lookup, so locally we still approximate it with the pattern hostname.Note:
dev.hostis intentionally not consulted by theunstable_getMiniflareWorkerOptions/getPlatformProxypaths — thedevconfig block is specific towrangler dev. - Under
-
#13990
e04e180Thanks @petebacondarwin! - Improve the log message shown when an asset upload attempt fails and is retriedThe retry message now reports which attempt is being made (e.g.
Asset upload failed. Retrying... 1 of 5 attempts.), making it easier to gauge how close Wrangler is to exhausting its retry budget. The raw error object is no longer appended to this user-facing message; it is instead logged at debug level (visible viaWRANGLER_LOG=debug). -
#13954
62abf97Thanks @petebacondarwin! - Read the on-disk OAuth state lazily soCLOUDFLARE_API_TOKENfrom.envtakes priority correctlyWrangler previously read its OAuth state from the user auth config file (for example
~/.config/.wrangler/config/default.toml) eagerly at module-import time. That happens before.envfiles are loaded, so the in-memory state would always hold the OAuth tokens even when the user only wanted to authenticate viaCLOUDFLARE_API_TOKEN. If that stored OAuth token happened to be expired, Wrangler would try to refresh it (and fail), aborting the command withFailed to fetch auth token: 400 Bad RequestandNot logged in.— even though a valid API token was in scope.Wrangler now reads the auth config file on demand, after
.envhas been loaded. WhenCLOUDFLARE_API_TOKEN(orCLOUDFLARE_API_KEY+CLOUDFLARE_EMAIL) is present, the OAuth state on disk is no longer consulted, the OAuth refresh endpoint is no longer called, and the env-based token is used directly. Sibling-process refresh-token rotation is also handled naturally because every check reads the current file contents.Internally, the exported
reinitialiseAuthTokens()function is removed — there is no module-level OAuth cache left to invalidate.Fixes #13744.
-
#13951
e349fe0Thanks @sejoker! - Enforce minimum 60 second interval for R2 Data Catalog sinksR2 Data Catalog sinks now require a minimum
--roll-intervalof 60 seconds to prevent compaction issues in the R2 Data Catalog. This validation is applied when creating sinks viawrangler pipelines sinks createwith typer2-data-catalog, and during the interactivewrangler pipelines setupflow.Regular R2 sinks are not affected and can still use intervals as low as 10 seconds.
-
#13959
da0fa8cThanks @dmmulroy! - Recognize Artifacts repositories that are still being createdWrangler's Artifacts repo status type now accepts the
creatinglifecycle state alongside existing in-progress statuses. -
#13964
a5c9365Thanks @danielrs! - Use dedicated API endpoint forwrangler secret bulkwrangler secret bulknow uses a more efficient, dedicated API endpoint. This reduces the operation from 2 API calls to 1 and eliminates the risk of accidentally affecting non-secret bindings. -
Updated dependencies [
fa1f61f,2679e05,7e40d98,d803737,59cd880,e8c2031]:
4.93.0
Minor Changes
-
#13901
aac7ca0Thanks @bghira! - Addwrangler ai models schemacommand for fetching model schemasYou can now run
wrangler ai models schema <model>to fetch the input and output schema for a Workers AI model from the public model catalog schema endpoint. -
#12656
ae047eeThanks @mikenomitch! - Add--containers-rollout=noneThis allows you to skip deploying a container. This is useful if you know that your container is not going to be updated or you don't have Docker locally, but still want to make changes to your Worker.
-
#13901
aac7ca0Thanks @bghira! - Addwrangler ai models listcommand for querying the Workers AI model catalogwrangler ai models listaccepts--search,--task,--author,--source, and--hide-experimental, matching the public model catalog search endpoint.
Patch Changes
-
#13948
b25dc0dThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260515.1 1.20260518.1 -
#13882
a4f22bcThanks @matingathani! - Throw a clear error when a D1 migration is cancelled instead of silently returning -
#13950
f78d435Thanks @dario-piotrowicz! - Improve the Docker CLI error message to be more actionable.Include a link to Docker installation docs, platform-specific instructions for starting the daemon, and guidance for alternative Docker-compatible CLIs.
-
#11896
c5c9e20Thanks @staticpayload! - Surface remote proxy session errorsWhen remote bindings fail to start, include the controller reason and root cause in the error message to make failures like missing
cloudflaredclearer. -
#13932
ebf4b24Thanks @zebp! - Fix local Workflow startup when compatibility flags includeexperimentalMiniflare now deduplicates compatibility flags for the internal Workflow engine service. This prevents
wrangler devfrom failing withCompatibility flag specified multiple times: experimentalwhen the user's Worker already enables that flag. -
#13929
895baf5Thanks @Caio-Nogueira! - Prompt to provision a workers.dev subdomain before deploying WorkflowsWrangler now checks for the account-level workers.dev subdomain when deploying Workflows, even if the Worker is not being published to workers.dev. If the subdomain has not been registered yet, Wrangler prompts to create one before calling the Workflows deploy API so users avoid an opaque server-side deployment failure.
-
#13930
7bcdf45Thanks @shiminshen! - Sweep stale.wrangler/tmp/*dirs left behind by abnormal exitsA
wrangler devsession creates.wrangler/tmp/bundle-*and.wrangler/tmp/dev-*directories at startup and removes them via asignal-exithook on graceful shutdown. When the process exited abnormally (SIGKILL, OOM, host crash) those directories were left behind and accumulated across sessions, slowing down dependency-walking tools that follow the bundle-emitted absolute-path imports.wranglernow sweeps entries in.wrangler/tmp/older than 24 hours when a new temporary directory is requested, bounding the leak regardless of how prior sessions exited.
4.92.0
Minor Changes
-
#13670
506aa02Thanks @elithrar! - Addwrangler artifactscommands for managing Artifacts repos and repo tokens.This adds CLI support for the Artifacts control-plane workflows that were previously only available through the API. You can now list and inspect namespaces, create, list, inspect, and delete repos, and issue repo-scoped tokens when you need to authenticate git access.
The new commands support both human-readable output and
--jsonoutput so they fit existing Wrangler automation patterns. -
#13916
be8a98cThanks @emily-shen! - Add--keep-varsflag towrangler versions upload, matching the existing behavior inwrangler deploy. When set, environment variables configured via the dashboard are preserved rather than being deleted before the upload.
Patch Changes
-
#13926
19ed49aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260511.1 1.20260515.1 -
#11471
3ff0a50Thanks @HW13! - Improvewrangler types --env-interfacefor multi-worker projects.Custom env interfaces generated by
wrangler typesno longer expand fromCloudflare.Env, avoiding some unintended type expansion when multiple workers' generated types are used together. -
#13910
bf688f7Thanks @timoconnellaus! - FixFailed to fetch auth token: 401 Unauthorizedfrom sibling-rotated refresh tokensrefreshTokenpreviously used the refresh token from module-levellocalState, which is populated once at startup and never re-read. OAuth refresh tokens are single-use, so when a sibling wrangler process (in another repo, another shell, or a parallel script) refreshes first, it rotates the token server-side and writes the new value to the shared config file (~/Library/Preferences/.wrangler/config/default.tomlon macOS). The long-lived process — typicallywrangler dev— then sends its stale in-memory token on the next refresh and gets401 Unauthorizedfromhttps://dash.cloudflare.com/oauth2/token, falling through to interactive login and timing out unattended.refreshTokennow callsreinitialiseAuthTokens()before exchanging, picking up the latest refresh token written by any sibling process. The previously emptycatch {}also now logs the underlying error at debug level so future refresh failures are diagnosable without source-diving. -
#13843
2e72c83Thanks @nzws! - Fixwrangler versions secret put/delete/bulkto preserve the existing version's placement settingsWhen creating a new version via
wrangler versions secret, the previous code only re-emitted a bare{ mode: "smart" }placement when the API reportedplacement_mode === "smart", dropping any other placement entirely. The new version is now created with the placement settings returned by the API, so placement settings survive a secret put/delete/bulk round-trip. -
#13908
802eaf4Thanks @shiminshen! - fix: stop rewriting query strings that happen to contain the requestHostwrangler devpreviously rewrote occurrences of the outer host insiderequest.url's query string. For example, a request to?echo=https%3A%2F%2Fdevelopment.test%2FpathwithHost: development.testwould be seen by the user worker as?echo=https%3A%2F%2Fproduction.test%2Fpath, silently mutating opaque application data such asredirect_urivalues in OAuth flows.The proxy worker now sets the internal
MF-Original-URLheader after its blanket host-rewriting pass over request headers, so the URL passed to the user worker preserves the original query string. -
#13827
8f5cdb1Thanks @greyvugrin! - Fix multi-environment warning when CLOUDFLARE_ENV is setCommands that warn when multiple environments are configured but none is specified (e.g.
wrangler deploy,wrangler secret put) were not accounting for theCLOUDFLARE_ENVenvironment variable when deciding whether to show the warning. This caused a misleading warning to appear even when the target environment was correctly specified viaCLOUDFLARE_ENV. -
Updated dependencies [
19ed49a]:
4.91.0
Minor Changes
-
#13822
c8be316Thanks @edmundhung! - Add named tunnel support and tunnel shortcuts towrangler devYou can now use
wrangler dev --tunnel --tunnel-name <name>to start a dev session with an existing named Cloudflare Tunnel, or set--tunnel-nameahead of time and start it later by pressingtto start or close the tunnel. This gives you a stable public hostname for local development instead of the temporarytrycloudflare.comURL used by Quick Tunnels.
Patch Changes
-
#13848
d4794a8Thanks @MattieTK! - Condense repeated environment configuration warningsWrangler now summarises repeated missing
varsanddefineentries in environment configuration warnings. Experimentalunsafewarnings are also only emitted once when the field appears at both the top level and in the active environment. -
#13894
58b4403Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260508.1 1.20260511.1 -
#13780
4352f87Thanks @matingathani! - Normalize legacy instance type aliases (standard→standard-1,dev→lite) to prevent phantom EDIT diffs on every deploy -
#13834
a9e6741Thanks @matingathani! - fix: hotkeys now work with Caps Lock enabledWrangler's dev server hotkeys (e.g.
bto open browser andxto exit) did not respond when Caps Lock was enabled. These hotkeys now work consistently whether or not Caps Lock is on. -
#13750
da664d5Thanks @matingathani! - fix: automatically delete log files older than 30 days and add WRANGLER_WRITE_LOGS=false to disable disk loggingWrangler previously accumulated log files in
~/.wrangler/logs/indefinitely, causing some users to accumulate gigabytes of logs over time.Log files older than 30 days are now automatically cleaned up on the first log write. Disk logging can be disabled entirely by setting
WRANGLER_WRITE_LOGS=false. -
#13914
bdc398cThanks @Maximo-Guk! - preserve native shape of non-stringvarsin worker previewswrangler previewpreviously coerced every non-string entry inpreviews.vars(arrays, objects, numbers, booleans) into aplain_textbinding viaJSON.stringify, so at runtime the worker saw a literal string instead of the value declared inwrangler.jsonc.wrangler deployalready serializes non-string vars asjsonbindings so the Workers runtime parses them back into native JS values; previews now match.Before:
// wrangler.jsonc — previews.vars { "ALLOWLIST": ["a@example.com", "b@example.com"] } // runtime typeof env.ALLOWLIST === "string" // true (was '["a@example.com","b@example.com"]')After:
typeof env.ALLOWLIST === "object"; // Array.isArray(env.ALLOWLIST) === true -
#13778
1420f10Thanks @maxwellpeterson! - Propagateunsafe.bindingsand service bindingcross_account_grantto worker previewsWorker previews now propagate
unsafe.bindingsdeclared on thepreviewsconfig block to the deployment metadata, mirroring the deploy-time behavior. Without this, internal binding shapes that wrangler doesn't yet model (notably service bindings carryingcross_account_grant) were silently dropped on previews while working fine on regular deploys. The same change wires throughcross_account_granton typedservicesbindings.
4.90.1
Patch Changes
-
#13866
4e44ce6Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260507.1 1.20260508.1 -
#13837
b0cee1dThanks @matingathani! - Fix beta/open-beta status message ignoringprintBanner: false— when a command setsprintBanner: (args) => !args.json, the status banner no longer appears in JSON output -
#13887
d878e13Thanks @apeacock1991! - Fixwrangler devhanging on shutdown when remote bindings are presentstartDev() registers dev hotkeys before authenticating the user. During interactive dev sessions, the auth callback re-registers hotkeys, which updates the local unregisterHotKeys variable to a new cleanup function. However, the unregisterHotKeys value returned to callers was captured as a direct reference to the initial registration, so it would call the stale cleanup function instead of the current one.
This has been fixed by returning a wrapper function () => unregisterHotKeys?.() instead of the variable directly. The wrapper evaluates unregisterHotKeys at call time, ensuring it always invokes the latest cleanup function even after re-registration.
-
#13867
971dfe3Thanks @petebacondarwin! - Fix race inRemoteProxySession.updateBindingsso it waits for the remote worker to finish reloading with the new bindings before resolvingPreviously,
updateBindingsresolved as soon as the config update event was dispatched, long before the remote worker had been re-uploaded and the local proxy worker had unpaused. Callers that issued requests immediately afterwards could see flaky failures — typically "WebSocket connection failed" for JSRPC bindings such as service bindings or dispatch namespaces — because the local proxy worker was still in its paused state during the reload window.updateBindingsnow waits for the nextreloadCompleteevent and for the local proxy worker's runtime-message queue to drain before returning, so callers can safely issue requests afterawait session.updateBindings(...). If the reload fails, the rejection fromupdateBindingscarries the underlying error. -
#13867
971dfe3Thanks @petebacondarwin! - Fix unhandledAbortErrorfromwrangler dev's remote tail WebSocket when the bundle rebuilds or the dev session shuts downThe remote-runtime tail-logs WebSocket (
#activeTailinRemoteRuntimeController) was constructed with the sameAbortSignalthatonBundleStartaborts to cancel in-flight preview-session operations. The abort destroyed the WebSocket's underlying upgrade request withAbortError, which had noerrorlistener attached and propagated as an unhandled exception. We now attach anerrorlistener at WebSocket construction that ignores errors (logging at debug level), matching the safeguards already present on theterminatepaths in#previewTokenandteardown().
4.90.0
Minor Changes
-
#12279
248bc08Thanks @penalosa! - Add deprecation warning fordelivery_delayin queue producer bindingsThe
delivery_delaysetting in[[queues.producers]]was silently having no effect since 2024. This change adds a deprecation warning when the setting is used, informing users that queue-level settings should be configured usingwrangler queues updateinstead. The setting will be removed in a future version.
Patch Changes
-
#13853
8852b0cThanks @gpanders! - Fix Containers SSH config -
#13858
e414e56Thanks @penalosa! - Fixwrangler whoamiand account selection failing for Account API TokensThe
/membershipsfallback for Account API Tokens was checking for code 9109, but/membershipsactually returns 9106 for that case. Correct the code so the fallback to/accountstriggers as intended. -
Updated dependencies []:
4.89.1
Patch Changes
-
#13824
dd3baf3Thanks @emily-shen! - Fix container deployment being skipped for Workers for Platforms user workersPreviously, deploying a worker with
--dispatch-namespacewould early-exit before callingdeployContainers(), meaning container-app registration that links the image to the Durable Object namespace was never executed for WfP user workers. Container deployment now runs before the WfP early exit. -
Updated dependencies [
5cf6f81]:
4.89.0
Minor Changes
-
#13055
f3fed88Thanks @GregBrimble! - Introducing thecacheconfiguration option for Workers.You can now set
{ cache: { enabled: true } }in your Wrangler configuration file to enable a HTTP cache in front of your Worker'sfetchhandler. This is also supported in[previews]configuration —previews.cacheoverrides the top-levelcachesetting for preview deployments, and falls back to the top-level value when absent. More information can be found in our documentation. -
#13776
1a54ac5Thanks @petebacondarwin! -wrangler devand other Miniflare-backed commands now run the localworkerdruntime withTZ=UTCto match productionPreviously,
wrangler dev(and other commands that spin up Miniflare, such aswrangler kv,wrangler d1,wrangler r2,wrangler check) inherited the host machine's timezone, soDateandIntlAPIs inside a Worker observed the developer's local timezone during local development but UTC in production. This caused subtle, hard-to-debug differences between local and deployed behaviour.Local development now matches production. Code that previously relied on the host timezone during
wrangler devwill need to either accept UTC (the production behaviour) or explicitly construct dates/formatters with the desired timezone.
Patch Changes
-
#13829
2284f20Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260504.1 1.20260506.1 -
#13841
332f527Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260506.1 1.20260507.1 -
#13777
18e833dThanks @matingathani! - fix: throw a clear error when _routes.json contains invalid JSON instead of silently skipping it -
#13751
b6cea17Thanks @matingathani! - fix: ensurewrangler types --check --env-filedoes not falsely report stale types when.dev.varsexists -
#13775
53e846aThanks @maxwellpeterson! - Fixwrangler previewnot propagating theassetsbinding to preview deploymentsPreviously,
wrangler previewwould upload the asset manifest correctly but the resulting preview deployment had noASSETSbinding (or whatever name was configured underassets.binding). Workers reading from the binding would seeundefinedand fail at runtime.The fix emits the assets binding into the deployment's
envmap alongside other bindings, mirroringwrangler deploy. -
#13770
beff19cThanks @petebacondarwin! - Only show accounts available for the current login auth inwrangler whoamiand the interactive account pickerWrangler now lists the intersection of
/accountsand/membershipsinstead of either endpoint alone, dropping accounts the active OAuth token or API token has no membership in. Theaccountsfield ofwrangler whoami --jsonis filtered the same way. When/membershipsis inaccessible to the current auth (e.g. Account API Tokens) Wrangler falls back to/accountsso those tokens continue to work as before. -
#13832
af42fedThanks @gpanders! - Showcontainers sshinwrangler containers --helpand inwrangler containers ssh --helpThe
containers sshcommand was previously hidden, so it did not appear in the list of subcommands shown bywrangler containers --help, and its description was omitted fromwrangler containers ssh --help. The command is now listed with its description in both places.
4.88.0
Minor Changes
-
#13760
e07825aThanks @danielgek! - Addbuiltinstorage option towrangler ai-search create.wrangler ai-search createnow supports a third storage type,builtin, in addition tor2andweb-crawler. When--type builtinis selected (or chosen interactively), Wrangler creates the instance using Cloudflare-managed storage by omittingtypeandsourcefrom the API request — the API treats an absenttypeas builtin storage. Builtin instances do not accept--source,--prefix,--include-items, or--exclude-items. -
#13721
58899d8Thanks @danielgek! - Add optionalcustom_metadatastep towrangler ai-search createThe
wrangler ai-search createinteractive wizard now lets you declare custom metadata fields that the new AI Search instance should index. Each field is afield_namepaired with adata_type(text,number,boolean, ordatetime).You can provide fields up-front via the new repeatable
--custom-metadataflag usingfield_name:data_typesyntax:wrangler ai-search create my-instance \ --type r2 --source my-bucket \ --custom-metadata title:text \ --custom-metadata views:numberFor larger schemas, use
--custom-metadata-schemato point at a JSON file containing an array of{ field_name, data_type }objects:wrangler ai-search create my-instance \ --type r2 --source my-bucket \ --custom-metadata-schema schema.json[ { "field_name": "title", "data_type": "text" }, { "field_name": "views", "data_type": "number" } ] -
#13701
18b9d5bThanks @dario-piotrowicz! - Prompt for missing name and compatibility date interactively duringwrangler deployWhen deploying without a project name or
compatibility_datein your configuration or CLI arguments,wrangler deploynow interactively prompts for the missing values instead of immediately failing with an error. For compatibility date, the prompt offers to use today's date; if you decline, the existing error is shown. The compatibility date prompt is skipped when--latestis passed. In non-interactive or CI environments, behavior is unchanged.Additionally, when no config file exists,
wrangler deploynow offers to save the prompted name and compatibility date to awrangler.jsoncfile for future use. This interactive flow is available for allwrangler deployinvocations — not just asset-only deployments. -
#13810
2b8c0ccThanks @jamesopstad! - Stabilize thesecretsconfiguration propertyThe
secretsproperty in the Wrangler config file is no longer experimental and will no longer emit an experimental warning when used. Required secrets are validated during local development and deploy, and used as the source of truth for type generation.{ "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } }
Patch Changes
-
#13765
3020214Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260430.1 1.20260501.1 -
#13800
0099265Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260501.1 1.20260504.1 -
#13812
25f5ef2Thanks @emily-shen! - fix:--aliasCLI flag now works inwrangler deployThe
--aliasflag was accepted but silently ignored duringwrangler deploy— onlyconfig.aliastook effect. We now collect aliases from both config and CLI flags. -
#13772
194d75eThanks @zakcutner! - Fixwrangler typesto generateFetcherforunsafe.bindingsentries withtype: "service"Previously, all entries in
unsafe.bindings(other thanratelimit) generated a fallbackanytype.wrangler typesnow generatesFetcherfor unsafe bindings declared withtype: "service", matching the type used for regular service bindings. -
#13818
9f532f7Thanks @1000hz! - Support Flagship bindings in Worker Previewswrangler previewnow acceptsflagshipentries in thepreviewsblock and includes them in Preview deployment bindings. This lets Workers that use Flagship bindings deploy Preview versions with preview-specific Flagship app IDs. -
#12974
1127114Thanks @ask-bonk! - Fixpropsand fetcher-type service bindings being dropped inunstable_getMiniflareWorkerOptionsThe post-processing in
unstable_getMiniflareWorkerOptionswas rebuildingserviceBindingsfrom scratch, which silently droppedpropson service bindings and droppedfetcher-type bindings entirely. It was also re-derivingdurableObjectsidentically to whatbuildMiniflareBindingOptionsalready produces. Both have been removed;buildMiniflareBindingOptionsnow produces the final bindings unchanged. -
#13739
3ceadefThanks @edmundhung! - Skip confirmation prompts inwrangler versions deploywhen versions are provided as CLI argumentsPassing version IDs or version specs to
wrangler versions deploynow applies those values directly instead of opening interactive prompts to confirm the same versions and percentages. This makes the command easier to automate without requiring--yes. -
#13745
1a5cc86Thanks @edmundhung! - fix: preserve request ports inOriginandRefererheaders when usingwrangler dev --host
4.87.0
Minor Changes
-
#13726
b5ac54bThanks @penalosa! - Hard fail on Node.js < 22Wrangler no longer supports Node.js 20.x, as it reached end-of-life on 2026-04-30. The minimum supported Node.js version is now 22.0.0. See https://github.com/nodejs/release?tab=readme-ov-file#end-of-life-releases.
-
#13717
9a1f014Thanks @NuroDev! - Add an experimentalexperimental_generateTypes()programmatic API.Wrangler now exposes
experimental_generateTypes()from the package root so you can generate Worker types in code using the same logic aswrangler types. The API supports the same core type-generation options (include env/runtime toggles) and returns structured output with separateenvandruntimecontent alongside the combined formatted output.
Patch Changes
-
#13732
22e1a61Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260426.1 1.20260429.1 -
#13754
00523c8Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260429.1 1.20260430.1 -
#13711
1c4d850Thanks @dario-piotrowicz! - fix: skip auto-config and OpenNext delegation when--configis explicitly providedWhen
--configis passed towrangler deploy, the user is explicitly targeting a specific Worker configuration. Previously, wrangler would ignore--configand delegate toopennextjs-cloudflare deployif it detected an OpenNext project in the working directory, silently deploying the wrong Worker. Now, both auto-config detection and OpenNext delegation are skipped when--configis provided, matching the existing behavior for--scriptand--assets. -
#13735
6d28037Thanks @edmundhung! - Improveconfig-schema.jsonhover text in more editorsWrangler now emits
markdownDescriptioninconfig-schema.jsonalongside the existingdescriptionfield. Editors that support rich JSON Schema hovers can use that markdown directly instead of rendering escaped links and formatting. -
#13722
0827815Thanks @MattieTK! - Improve safe telemetry categorisation for user-facing Wrangler errors. -
#13116
e539008Thanks @dario-piotrowicz! - AllowgetPlatformProxyandunstable_getMiniflareWorkerOptionsto start when the assets directory does not exist yetPreviously,
getPlatformProxywould catch and swallowNonExistentAssetsDirErrorinternally when the configured assets directory was absent on disk. This has been refactored so that the directory-existence check is skipped entirely forgetPlatformProxyandunstable_getMiniflareWorkerOptions, since these APIs are typically used at dev time in frameworks where the assets directory is a build output that may not exist yet.wrangler dev,wrangler deploy,wrangler versions upload, andwrangler triggers deploycontinue to require the assets directory to exist when specified. -
Updated dependencies [
22e1a61,00523c8,b5ac54b,e653edf,e1eff94,e539008,0bf64a7,b04eedf,6457fb3,c07d0cb]:- miniflare@4.20260430.0
- @cloudflare/kv-asset-handler@0.5.0
4.86.0
Minor Changes
-
#13605
ea943ffThanks @danielgek! - Add namespace support towrangler ai-searchcommandsAll
wrangler ai-searchinstance commands (create,list,get,update,delete,stats,search) now accept a--namespace(or-n) flag to target a specific AI Search namespace. When the flag is omitted, commands default to thedefaultnamespace that Cloudflare automatically provisions for every account.wrangler ai-search listnow displays anamespacecolumn, andwrangler ai-search createoffers an interactive picker for existing namespaces (with an option to create a new one) when--namespaceis not supplied in an interactive session.A new
wrangler ai-search namespacesubcommand group is also introduced, withlist,create,get,update, anddeletesubcommands for managing namespaces directly.wrangler ai-search list --namespace blog wrangler ai-search create my-instance --namespace blog --type r2 --source my-bucket wrangler ai-search namespace create blog --description "Blog content" -
#13637
9eb9e69Thanks @edmundhung! - Add--tunnelflag towrangler devfor sharing your local dev server via Cloudflare Quick TunnelsYou can now expose your local dev server publicly by passing
--tunnel:wrangler dev --tunnelThis starts a Cloudflare Quick Tunnel that gives you a random
*.trycloudflare.comURL to share. The tunnel stops automatically when the dev session ends. Quick tunnels don't require a Cloudflare account or any configuration.A warning is shown when Server-Sent Events (SSE) responses are detected through the tunnel, since quick tunnels don't support SSE.
-
#13661
0a5db08Thanks @aspizu! -wrangler tailwill now log stack traces. These stack traces already include resolved frames if you have chosen to upload sourcemaps. -
#13617
118027dThanks @roerohan! - Force Flagship bindings to always use remote mode in local devFlagship bindings now always access the remote Flagship service during local development, matching the behavior of AI bindings. Previously, Flagship supported both local and remote modes, but the local stub only returned default values, providing no real functionality and creating a dual source of truth for flag evaluations.
The
remoteconfig field is retained for backward compatibility but only controls whether a warning is displayed. Settingremote: truesuppresses the warning that Flagship bindings always access remote resources and may incur usage charges in local dev. -
#13254
e867ac2Thanks @tgarg-cf! - Addwrangler queues consumer listsubcommands for listing queue consumersThree new commands are available for listing consumers on a queue:
wrangler queues consumer list <queue-name>— lists all consumers (both worker and HTTP pull), grouped by typewrangler queues consumer worker list <queue-name>— lists only worker consumerswrangler queues consumer http list <queue-name>— lists only HTTP pull consumers
Patch Changes
-
#13696
62e9f2aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260424.1 1.20260426.1 -
#13576
2dc6175Thanks @MattieTK! - Restore telemetry tracking for common CLI flags that were unintentionally dropped during sanitisationWhen argument sanitisation was introduced, only explicitly allow-listed args had their values included in telemetry. The allow list was very conservative, which meant common boolean flags like
--remote,--json,--dry-run,--force, and many others were no longer being captured insanitizedArgsdespite previously being tracked. Boolean flags are inherently safe (values are onlytrue/false), so these have now been added back to the global allow list. A small number of fixed-choice args (--local-protocol,--upstream-protocol,--containers-rollout) have also been added with their known value sets. -
#13649
ae8eae3Thanks @petebacondarwin! - Fix service binding and tail consumerpropsbeing dropped between workers in different local dev instancesWhen a service binding or tail consumer configured with
propstargeted a worker running in a separatewrangler devinstance (via the dev registry), thepropswere silently dropped and the remote entrypoint saw an emptyctx.props. Props are now forwarded correctly across the dev registry boundary, matching the behavior users get when all workers run in a single instance.// wrangler.json { "services": [ { "binding": "AUTH", "service": "auth-worker", // may be in a separate `wrangler dev` process "entrypoint": "SessionEntry", "props": { "tenant": "acme" } } ] }The target worker's
SessionEntryentrypoint now correctly receives{ tenant: "acme" }onctx.propsregardless of which local dev instance it runs in. -
#13662
f2e2241Thanks @petebacondarwin! - Fix three resource leaks inunstable_startWorkerteardown that could prevent Node from exiting cleanly afterworker.dispose().- The esbuild context created by
bundleWorkeris now disposed when the initial build fails. Previously a failing initial build (e.g. an unresolvable entrypoint, or a worker started with an invalid config viasetConfig) left the esbuild child process running for the lifetime of the parent Node process. runBuild's cleanup function now awaits the in-flight build before running the bundler's stop handler. Previously teardown could return beforeesbuild.BuildContext.dispose()had been called, so the esbuild watcher kept the event loop alive after dispose had resolved.BundlerController.teardown()now runs the esbuild cleanup before removing the bundler's temporary directory, and aborts the in-flight bundle build so it cannot emit stalebundleStart/bundleCompleteevents after teardown. Previously the tmpdir was removed first, which in race with an in-flight rebuild produced confusing "Could not resolve.wrangler/tmp/bundle-XXXX/middleware-loader.entry.ts" errors during dispose.
- The esbuild context created by
-
#13674
4f6ed93Thanks @petebacondarwin! - Stop emitting a misleading[wrangler:error] Docker build exited with code: <n>log when the user aborts an in-progress container image build (for example by pressing therrebuild hotkey while the previous build is still running).The abort-detection branch in the local and multi-worker runtime controllers was matching the wrong error message — it checked for
"Build exited with code: 1", but the error thrown by the docker build helper is actually"Docker build exited with code: <n>", and the exit code after a process-group SIGINT/SIGKILL is typically130/137/143, not1. As a result, every legitimate user-initiated rebuild abort produced a spurious error event and[wrangler:error]log line. The check now matches the real error message prefix and ignores any non-zero exit code from the aborted build, so a user-requested rebuild while another build is in progress is silent. -
#13667
ed2f4ecThanks @emily-shen! - fix: Preserve auth in remote proxy session data to avoid unnecessary session restartsmaybeStartOrUpdateRemoteProxySessionwas not includingauthin its return value, so on subsequent callspreExistingRemoteProxySessionData.authwas alwaysundefined. This caused the auth comparison to always detect a change, disposing and recreating the remote proxy session on every reload even when auth had not changed. -
#13695
92bb8a5Thanks @alexanderniebuhr! -wrangler types --checkno longer throws when the types file was generated with an explicit boolean flag. Previously, yargs would parse such flags as actual booleans rather than strings, causing an internal parse error. -
#13662
f2e2241Thanks @petebacondarwin! - Fix thewrangler tailcommand leaking a signal-exit listener after the tail has been cleanly closed.The tail command registered both a
tail.on("close", exit)listener and a process-levelonExit(exit)handler, but never removed the latter afterexit()had run. In long-lived CLI processes this is harmless — the handler eventually runs once on shutdown — but in unit tests that repeatedly invokewrangler tail, every invocation accumulates a handler that fires during test-runner shutdown. Those late invocations calldeleteTail()after the test's auth mocks have been torn down, producing spurious "Not logged in" unhandled rejections which fail the Linux CI runs.The handler is now removed as soon as
exit()runs, andexit()is guarded against re-entry so it is idempotent if both the WebSocketcloseevent and a real signal fire for the same session. -
#13187
fcc491aThanks @dario-piotrowicz! - Recognize Hydrogen as a known unsupported framework in autoconfigPreviously, Hydrogen projects were incorrectly identified as React Router (since Hydrogen uses React Router under the hood), leading to a confusing autoconfig experience. Hydrogen is now recognized as a distinct unsupported framework, so users see a clear message that Hydrogen is not yet supported instead of being guided through React Router configuration.
-
#13628
e6c437aThanks @emily-shen! - fix: prioritiseCLOUDFLARE_ACCOUNT_IDover a cached account id for all Pages commandsPreviously, some Pages commands (
pages deploy,pages deployment list/delete/tail,pages download config,pages secret) used a cached account id over theCLOUDFLARE_ACCOUNT_IDenvironment variable. Thepages projectcommands already correctly prioritisedCLOUDFLARE_ACCOUNT_ID. -
Updated dependencies [
21b87b2,62e9f2a,033d6ec,ae8eae3,ef24ff2,6d27479,118027d]:
4.85.0
Minor Changes
-
#13222
5680287Thanks @maxwellpeterson! - Add enabled and previews_enabled support for custom domain routesCustom domain routes can now include optional
enabledandpreviews_enabledboolean fields to control whether a custom domain serves production and/or preview traffic. When omitted, the API defaults apply (production enabled, previews disabled).
Patch Changes
-
#13622
5a2968aThanks @petebacondarwin! - Fix inheritedai_search_namespacesbinding display inwrangler deployWhen an
ai_search_namespacesbinding inherits from the existing deployment, the bindings table now correctly shows(inherited)instead of a rawSymbol(inherit_binding)string. -
#13633
3494842Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260421.1 1.20260422.1 -
#13645
7d728fbThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260422.1 1.20260423.1 -
#13657
df9319dThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260423.1 1.20260424.1 -
#13574
d5e3c57Thanks @dario-piotrowicz! - Detect Cloudflare WAF block pages and include Ray ID in API error messagesWhen the Cloudflare WAF blocks an API request, the response is an HTML page rather than JSON. Previously, this caused a confusing "Received a malformed response from the API" error with a truncated HTML snippet. Wrangler now detects WAF block pages and displays a clear error message explaining that the request was blocked by the firewall, along with the Cloudflare Ray ID (when available) for use in support tickets.
For other non-JSON responses that aren't WAF blocks, the "malformed response" error also now includes the Ray ID to help reference failing requests in support tickets.
-
#13560
7567ef7Thanks @vaishnav-mk! - Preserve NonRetryableError message and name when theworkflows_preserve_non_retryable_error_messagecompatibility flag is enabled, instead of replacing it with a generic error message. -
#11784
2831b54Thanks @JPeer264! - fix(wrangler): Bind the console methods directly instead of using a global proxy -
#13644
377715dThanks @MattieTK! - Update@clack/coreand@clack/promptsto v1.2.0Bumps the bundled
@clack/coredependency used internally by@cloudflare/clifrom0.3.xto1.2.0, and the@clack/promptsdependency increate-cloudflarefrom0.6.xto1.2.0. Clack v1 includes a number of API changes, but no user-facing prompt behaviour changes are expected. -
Updated dependencies [
3494842,7d728fb,df9319d,3ceeec3,7567ef7,0a95061,7fc50c1,377715d]:
4.84.1
Patch Changes
-
#13615
8fec8b8Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260420.1 1.20260421.1 -
#13572
a610749Thanks @dario-piotrowicz! - Fixwrangler types --checkignoring--env-interfaceand secondary--configentriesPreviously,
wrangler types --checkran its staleness check before resolving the--env-interfaceflag and before collecting secondary worker entry points from additional--configarguments. This meant it could incorrectly report types as up to date when they were actually stale due to a different env interface name or changes in secondary worker configs. The check now runs after all options are fully resolved, so it correctly detects mismatches.
4.84.0
Minor Changes
-
#13326
4a9ba90Thanks @mattzcarey! - Add Artifacts binding support to wranglerYou can now configure Artifacts bindings in your wrangler configuration:
// wrangler.jsonc { "artifacts": [{ "binding": "MY_ARTIFACTS", "namespace": "default" }] }Type generation produces the correct
Artifactstype reference from the workerd type definitions:interface Env { MY_ARTIFACTS: Artifacts; } -
#13567
d8c895aThanks @gpanders! - Rename the documented containers SSH config option tosshWrangler now accepts and documents
containers.sshin config files while continuing to acceptcontainers.wrangler_sshas an undocumented backwards-compatible alias. Wrangler still sends and readswrangler_sshwhen talking to the containers API. -
#13571
7dc0433Thanks @must108! - Add regional and jurisdictional placement constraints for Containers. Users can now setconstraints.regionsandconstraints.jurisdictionin wrangler config to control where containers run. -
#12600
50bf819Thanks @penalosa! - Useworkerd's debug port to power cross-process service bindings, Durable Objects, and tail workers via the dev registry. This enables Durable Object RPC via the dev registry, and is an overall stability improvement.
Patch Changes
-
#13160
05f4443Thanks @JoaquinGimenez1! - Log a helpful error message when AI binding requests fail with a 403 authentication errorPreviously, when the AI proxy token expired during a long session, users received an unhelpful 403 error. Now, wrangler detects error code 1031 and suggests running
wrangler loginto refresh the token. -
#13557
8ca78bbThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260415.1 1.20260416.2 -
#13579
b6e1351Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260416.2 1.20260417.1 -
#13604
d8314c6Thanks @petebacondarwin! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260417.1 1.20260420.1 -
#13515
b35617bThanks @petebacondarwin! - fix: ensure esbuild context is disposed during teardownThe esbuild bundler cleanup function could race with the initial build. If
BundlerController.teardown()ran before the initialbuild()completed, thestopWatchingclosure variable would still beundefined, so the esbuild context was never disposed. This left the esbuild child process running, keeping the Node.js event loop alive and causing processes to hang instead of exiting cleanly.The cleanup function now awaits the build promise before calling
stopWatching, ensuring the esbuild context is always properly disposed. -
#13470
4fda685Thanks @penalosa! - fix: prevent remote binding sessions from expiring during long-running dev sessionsPreview tokens for remote bindings expire after one hour. Previously, the first request after expiry would fail before a refresh was triggered. This change proactively refreshes the token at 50 minutes so no request ever sees an expired session.
The reactive recovery path is also improved:
error code: 1031responses (returned by bindings such as Workers AI when their session times out) now correctly trigger a refresh, where previously onlyInvalid Workers Preview configurationHTML responses did.Auth credentials are now resolved lazily when a remote proxy session starts rather than at bundle-complete time. This means that if your OAuth access token has been refreshed since
wrangler devstarted, the new token is used rather than the one captured at startup. -
#12456
59eec63Thanks @venkatnikhilm! - Improve validation and error messaging for R2 CORS configuration files to catch AWS S3-style formatting mistake. -
#13444
cc1413aThanks @naile! - fix: Passforcequery parameter to API inpages deployment delete -
#11918
d0a9d1cThanks @ksawaneh! - Allowwrangler r2 bucket listto run without a valid Wrangler configThis is an account-level command and does not require parsing
wrangler.toml/wrangler.jsonc. Previously, an invalid local config could prevent listing buckets, making it harder to fix the config. -
#13516
4eb1da9Thanks @jonnyparris! - Rename "Browser Rendering" to "Browser Run" in all user-facing strings, error messages, and CLI output. -
#13575
6d887dbThanks @lambrospetrou! - Add D1 export prompt message for unavailability, use--skip-confirmationto not show the prompt. -
#13473
5716d69Thanks @MattieTK! - Update am-i-vibing to v0.1.1 for improved agentic environment detection -
Updated dependencies [
4a9ba90,b35617b,8ca78bb,b6e1351,d8314c6,7f50300,4fda685,be5e6a0,e456952,50bf819,4eb1da9,8ca78bb,266c418]:
4.83.0
Minor Changes
-
#13391
60565ddThanks @mikenomitch! - Markwrangler containerscommands as stableThis changes the status of the Containers CLI from open beta to stable. Wrangler no longer shows
[open beta]labels or beta warning text forwrangler containerscommands, so the help output matches the feature's current availability. -
#13311
6cbcdebThanks @ryanking13! - JS files imported by the Python Workers runtime SDK are now handled as ESM modules.This is not a user-facing change, but Python Workers users should update their wrangler version to make sure to get Python workers SDK working properly.
Patch Changes
-
#13450
6f63eaaThanks @petebacondarwin! - Fix POST/PUT requests with non-2xx responses throwing "fetch failed"Previously, sending a POST or PUT request that received a non-2xx response (e.g. 401, 400, 403) would throw a
TypeError: fetch failederror. This was caused by an undici bug whereisTraversableNavigable()incorrectly returnedtrue, causing the 401 credential-retry block to execute in Node.js and fail on stream-backed request bodies. This has been fixed upstream in undici v7.24.8, so we've bumped our dependency and removed the previous pnpm patch workaround. -
#13447
aef9825Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260410.1 1.20260413.1 -
#13475
eaaa728Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260413.1 1.20260415.1 -
#13386
5e5bbc1Thanks @mksglu! - Make startup network requests non-blocking on slow connectionsWrangler makes network requests during startup (npm update check,
request.cfdata fetch) that previously blocked the CLI indefinitely on slow or degraded connections (airplane wifi, trains), causing 10+ second delays.- Update check: The banner now races the update check against a 100ms grace period. On a cache hit (most runs) the result resolves in <1ms via the I/O poll phase; on a cache miss the banner prints immediately without blocking. A 3s safety-net timeout caps the
update-checklibrary's auth-retry path. request.cffetch: The fetch toworkers.cloudflare.com/cf.jsonnow usesAbortSignal.timeout(3000), falling back to cached/default data on timeout.
- Update check: The banner now races the update check against a 100ms grace period. On a cache hit (most runs) the result resolves in <1ms via the I/O poll phase; on a cache miss the banner prints immediately without blocking. A 3s safety-net timeout caps the
-
#13469
07a918cThanks @1000hz! -wrangler previewno longer warns on inheritable binding types being missing frompreviewsconfig. -
#13463
90aee27Thanks @roerohan! - Remove unnecessaryflagship:readOAuth scopeThe
flagship:readscope is not needed sinceflagship:writealready implies read access. This reduces the OAuth permissions requested during login to only what is required. -
Updated dependencies [
854d66c,6f63eaa,aef9825,eaaa728,58292f6,5e5bbc1,d5ff5a4,89c7829]:
4.82.2
Patch Changes
- #13457
9b2b6baThanks @jamesopstad! - Add Flagship OAuth scopes towrangler login
4.82.1
Patch Changes
-
#13453
6b11b07Thanks @petebacondarwin! - Disable flagship OAuth scopes that are not yet valid in the Cloudflare backendThe
flagship:readandflagship:writeOAuth scopes have been temporarily commented out from the default scopes requested during login, as they are not yet recognized by the Cloudflare backend. -
#13438
dd4e888Thanks @dependabot! - fix: handle Vike config files that use a variable-referenced default exportNewer versions of
create-vike(0.0.616+) generatepages/+config.tsfiles usingconst config: Config = { ... }; export default config;instead of the previousexport default { ... } satisfies Config;. The Wrangler autoconfig AST transformation now resolvesIdentifierexports to their variable declarations, supporting both old and new Vike config file formats.
4.82.0
Minor Changes
-
#13353
5338bb6Thanks @mattzcarey! - Addartifacts:writeto Wrangler's default OAuth scopes, enablingwrangler loginto request access to Cloudflare Artifacts (registries and artifacts). -
#13139
79fd529Thanks @roerohan! - feat: add Flagship feature flag binding supportAdds end-to-end support for the Flagship feature flag binding, which allows Workers to evaluate feature flags from Cloudflare's Flagship service. Configure it in
wrangler.jsonwith aflagshiparray containingbindingandapp_identries. In local dev, the binding returns default values for all flag evaluations; use"remote": truein the binding to evaluate flags against the live Flagship service. -
#12983
28bc2beThanks @1000hz! - Added thewrangler previewcommand family for creating Preview deployments (currently in private beta). -
#13197
4fd138bThanks @shahsimpson! - Addpreviewoutput-file entries forwrangler previewdeploymentswrangler previewnow writes apreviewentry to the Wrangler output file whenWRANGLER_OUTPUT_FILE_PATHorWRANGLER_OUTPUT_FILE_DIRECTORYis configured. The entry includes the Worker name, preview metadata (preview_id,preview_name,preview_slug,preview_urls) and deployment metadata (deployment_id,deployment_urls).This makes preview command runs machine-readable in the same output stream as other Wrangler commands, which helps CI integrations consume preview URLs and IDs directly.
-
#13159
bafb96bThanks @ruifigueira! - Addwrangler browsercommands for managing Browser Rendering sessionsNew commands for Browser Rendering DevTools:
wrangler browser create [--lab] [--keepAlive <seconds>] [--open]- Create a new sessionwrangler browser close <sessionId>- Close a sessionwrangler browser list- List active sessionswrangler browser view [sessionId] [--target <selector>] [--open]- View a live browser session
The
viewcommand auto-selects when only one session exists, or prompts for selection when multiple are available.The
--openflag controls whether to open DevTools in browser (default: true in interactive mode, false in CI/scripts). Use--no-opento just print the DevTools URL.All commands support
--jsonfor programmatic output. Also addsbrowser:writeOAuth scope towrangler login. -
#13392
2589395Thanks @emily-shen! - Add telemetry to local REST APIThe local REST API (used by the local explorer) now collects anonymous usage telemetry. This respects any existing telemetry preferences, which can be disabled by running the command
wrangler telemetry disable.This only applies when the dev session is started via Wrangler, and not via the Vite plugin or standalone Miniflare.
No actual data values, keys, query contents, or resource IDs are collected.
Event schema:
{ "event": "localapi.<route>.<method>", // e.g. localapi.kv.keys.get "deviceId": "<uuid>", "timestamp": 1234567890, "properties": { "userAgent": "Mozilla/5.0 ...", // Only for localapi.local.workers.get: "workerCount": 2, "kvCount": 3, "d1Count": 1, "r2Count": 0, "doCount": 1, "workflowsCount": 0 } }Note: the Local Explorer and corresponding local REST API is still an experimental feature.
-
#13137
1313275Thanks @emily-shen! - explorer: expose the local explorer hotkeyList the local explorer's hotkey
[e]in wrangler dev output.
Patch Changes
-
#13393
c50cb5bThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260409.1 1.20260410.1 -
#13424
525a46bThanks @paulelliotco! - Keep proxy notices off stdout for JSON Wrangler commandsWrangler now writes the startup notice for
HTTP_PROXYandHTTPS_PROXYto stderr instead of stdout. This keeps commands likewrangler auth token --jsonmachine-readable when a proxy is configured.
4.81.1
Patch Changes
-
#13337
c510494Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260405.1 1.20260408.1 -
#13362
8b71ecaThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260408.1 1.20260409.1 -
#13329
7ca6f6eThanks @G4brym! - fix: Treat AI Search bindings as always-remote in local devAI Search namespace (
ai_search_namespaces) and instance (ai_search) bindings are always-remote (they have no local simulation), butpickRemoteBindings()did not include them in its always-remote type list. This caused the remote proxy session to exclude these bindings whenremote: truewas not explicitly set in the config, resulting in broken AI Search bindings duringwrangler dev.Additionally,
removeRemoteConfigFieldFromBindings()in the deploy config-diff logic was not stripping theremotefield from AI Search bindings, which could cause false config diffs during deployment.
4.81.0
Minor Changes
-
#12932
96ee5d4Thanks @thomasgauvin! - feat: addwrangler email routingandwrangler email sendingcommandsEmail Routing commands:
wrangler email routing list- list zones with email routing statuswrangler email routing settings <domain>- get email routing settings for a zonewrangler email routing enable/disable <domain>- enable or disable email routingwrangler email routing dns get/unlock <domain>- manage DNS recordswrangler email routing rules list/get/create/update/delete <domain>- manage routing rules (usecatch-allas the rule ID for the catch-all rule)wrangler email routing addresses list/get/create/delete- manage destination addresses
Email Sending commands:
wrangler email sending list- list zones with email sendingwrangler email sending settings <domain>- get email sending settings for a zonewrangler email sending enable <domain>- enable email sending for a zone or subdomainwrangler email sending disable <domain>- disable email sending for a zone or subdomainwrangler email sending dns get <domain>- get DNS records for a sending domainwrangler email sending send- send an email using the builder APIwrangler email sending send-raw- send a raw MIME email message
Also adds
email_routing:writeandemail_sending:writeOAuth scopes towrangler login.
Patch Changes
-
#13241
7d318e1Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260401.1 1.20260402.1 -
#13305
fa6d84fThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260402.1 1.20260405.1 -
#13193
78cbe37Thanks @dario-piotrowicz! - During autoconfig filter out Hono when there are 2 detected frameworksDuring the auto-configuration process Hono is now treated as an auxiliary framework (like Vite) and automatically filtered out when two frameworks are detected (before Hono was being filtered out only when the other framework was Waku).
-
#13205
6fa5dfdThanks @petebacondarwin! - fix: useformatConfigSnippetfor compatibility_date warning inwrangler devThe compatibility_date warning shown when no date is configured in
wrangler devwas hardcoded in TOML format. This now usesformatConfigSnippetto render the snippet in the correct format (TOML or JSON) based on the user's config file type. -
Updated dependencies [
a3e3b57,7d318e1,fa6d84f,7d318e1,7a60d4b]:
4.80.0
Minor Changes
-
#13151
9c4035bThanks @G4brym! - Add type generation for AI Search bindingsRunning
wrangler typesnow generatesAiSearchNamespaceandAiSearchInstancetypes forai_search_namespacesandai_searchconfig bindings respectively. Both simple and per-environment modes are supported.// wrangler.json { "ai_search_namespaces": [ { "binding": "AI_SEARCH", "namespace": "production" } ], "ai_search": [ { "binding": "BLOG_SEARCH", "instance_name": "cloudflare-blog" } ] }// Generated by `wrangler types` interface Env { AI_SEARCH: AiSearchNamespace; BLOG_SEARCH: AiSearchInstance; } -
#13011
b9b7e9dThanks @ruifigueira! - Add experimental headful browser rendering support for local developmentExperimental: This feature may be removed or changed without notice.
When developing locally with the Browser Rendering API, you can enable headful (visible) mode via the
X_BROWSER_HEADFULenvironment variable to see the browser while debugging:X_BROWSER_HEADFUL=true wrangler dev X_BROWSER_HEADFUL=true vite devNote: when using
@cloudflare/playwright, two Chrome windows may appear — the initial blank page and the one created bybrowser.newPage(). This is expected behavior due to how Playwright handles browser contexts via CDP. -
#12992
48d83caThanks @RiscadoA! - Addvpc_networksbinding support for routing Worker traffic through a Cloudflare Tunnel or network.{ "vpc_networks": [ // Route through a specific Cloudflare Tunnel { "binding": "MY_FIRST_VPC", "tunnel_id": "<tunnel-id>" }, // Route through the Cloudflare One mesh network { "binding": "MY_SECOND_VPC", "network_id": "cf1:network" } ] }
Patch Changes
-
#13155
5d29055Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260329.1 1.20260331.1 -
#13162
fb67a18Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260331.1 1.20260401.1 -
#13136
ab44870Thanks @petebacondarwin! - Display build errors for auxiliary workers in multi-worker modePreviously, when running
wrangler devwith multiple-cconfig flags (multi-worker mode), build errors from auxiliary/secondary workers were only logged at debug level, causing Wrangler to silently hang. Build errors from all workers are now displayed at error level so you can see what went wrong and fix it. -
#12992
48d83caThanks @RiscadoA! - Fix remote proxy worker not catching errors thrown by bindings duringwrangler dev -
#13238
b2f53eaThanks @guybedford! - Fix source phase imports in bundled and non-bundled WorkersWrangler 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. -
#10126
14e72ebThanks @nekoze1210! - fix: Sort D1 migration files to ensure consistent chronological orderingwrangler d1 migrations listandwrangler d1 migrations applypreviously returned migration files in an order dependent on the filesystem, which could vary across operating systems. Migration filenames are now sorted alphabetically before being returned, ensuring consistent chronological ordering. -
#13150
4dc94fdThanks @dario-piotrowicz! - Polish Cloudflare Vite plugin installation during autoconfigProjects using Vite 6.0.x were rejected by auto-configuration because the minimum supported version was set to 6.1.0 (the
@cloudflare/vite-pluginpeer dependency). The minimum version check is now 6.0.0, and when a project has Vite in the [6.0.0, 6.1.0) range, auto-configuration will automatically upgrade it to the latest 6.x before installing@cloudflare/vite-plugin. -
#13051
d5bffdeThanks @dario-piotrowicz! - Use today's date as the default compatibility datePreviously, when generating a compatibility date for new projects or when no compatibility date was configured, the date was resolved by loading the locally installed
workerdpackage viaminiflare. This approach was unreliable in some package manager environments (notablypnpm). The logic now simply uses today's date instead, which is always correct and works reliably across all environments. -
Updated dependencies [
5d29055,fb67a18,d5bffde,b9b7e9d,b2f53ea,48d83ca]:
4.79.0
Minor Changes
-
#12868
ffbc268Thanks @danielgek! - Addwrangler ai-searchcommand namespace for managing Cloudflare AI Search instancesIntroduces a CLI surface for the Cloudflare AI Search API (open beta), including:
- Instance management:
ai-search list,create,get,update,delete - Semantic search:
ai-search searchwith repeatable--filter key=valueflags - Instance stats:
ai-search stats
The
createcommand uses an interactive wizard to guide configuration. All commands require authentication viawrangler login. - Instance management:
-
#13097
cd0e971Thanks @pombosilva! - Add--localflag to Workflows commands for interacting with local devAll Workflows CLI commands now support a
--localflag that targets a runningwrangler devsession instead of the Cloudflare production API. This uses the/cdn-cgi/explorer/api/workflowsendpoints served by the local dev server.wrangler workflows list --local wrangler workflows trigger my-workflow '{"key":"value"}' --local wrangler workflows instances describe my-workflow latest --local wrangler workflows instances pause my-workflow <id> --local --port 9000By default, commands continue to hit remote (production). Pass
--localto opt in, and optionally--portto specify a custom dev server port (defaults to 8787).
Patch Changes
-
#13050
ed20a9bThanks @dario-piotrowicz! - Add minimum and maximum version checks for frameworks during auto-configurationWhen Wrangler automatically configures a project, it now validates the installed version of the detected framework before proceeding:
- If the version is below the minimum known-good version, the command exits with an error asking the user to upgrade the framework.
- If the version is above the maximum known major version, a warning is emitted to let the user know the framework version has not been officially tested with this feature, and the command continues.
-
#13111
f214760Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260317.1 1.20260329.1 -
#13079
746858aThanks @penalosa! - FixgetPlatformProxyandunstable_getMiniflareWorkerOptionscrashing whenassetsis configured without adirectorygetPlatformProxyandunstable_getMiniflareWorkerOptionsnow skip asset setup when the config has anassetsblock but nodirectory— instead of throwing "missing requireddirectoryproperty". This happens when an external tool like@cloudflare/vite-pluginhandles asset serving independently. -
#13112
9aad27fThanks @dario-piotrowicz! - Fix autoconfig failing onwakuprojects that usehonoWaku has a tight integration with Hono, causing both to be detected simultaneously and triggering a "multiple frameworks found" error. Hono is now filtered out when Waku is also detected.
-
#13113
1fc5518Thanks @dario-piotrowicz! - Skip lock file warning for static projects during autoconfigPreviously, running autoconfig on a static project (one with no framework detected) would emit a misleading warning about a missing lock file, suggesting the project might be in a workspace. Since static projects don't require a lock file, this warning is now suppressed for them.
-
#13072
b539dc7Thanks @jbwcloudflare! - Skip unnecessaryGET /versions?deployable=trueAPI call inwrangler versions deploywhen all version IDs are explicitly provided and--yesis passedWhen deploying a specific version non-interactively (e.g.
wrangler versions deploy <id> --yes), Wrangler previously always fetched the full list of deployable versions to populate the interactive selection prompt — even though the prompt is skipped entirely when--yesis used and all versions are already specified. The deployable-versions list is now only fetched when actually needed (i.e. when no version IDs are provided, or when running interactively). -
#13115
2565b1dThanks @dario-piotrowicz! - Improve error message when the assets directory path points to a file instead of a directoryPreviously, if the path provided as the assets directory (via
--assetsflag orassets.directoryconfig) pointed to an existing file rather than a directory, Wrangler would throw an unhelpfulENOTDIRsystem error when trying to read the_redirectsfile inside it. Now Wrangler detects this condition earlier and throws a clear user error. -
Updated dependencies [
9eff028,f214760,9282493,a532eea,d4c6158]:
4.78.0
Minor Changes
-
#13031
eeaa473Thanks @WalshyDev! - Add support for Cloudflare Access Service Token authentication via environment variablesWhen 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 devAdditionally, 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. -
#13027
9fcdfcaThanks @G4brym! - feat: Addai_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.
-
#12874
53ed15aThanks @xortive! - Add Workers VPC service support for Hyperdrive originsHyperdrive 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 mypasswordThis enables Hyperdrive to connect to databases hosted in private networks that are accessible through Workers VPC TCP services.
-
#12852
6b50bfaThanks @Carolx715! - 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. -
#13030
0386553Thanks @natewong1313! - Add local mode support for Stream bindingsMiniflare 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
File - Watermark generation via
File
Data is persisted across restarts by default. You must set
streamPersist: falsein Miniflare options to disable persistence. -
#12874
53ed15aThanks @xortive! - 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_caThis applies to both TCP and HTTP VPC service types. When omitted, the default
verify_fullbehavior is used. -
#12874
53ed15aThanks @xortive! - Add TCP service type support for Workers VPCYou 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
-
#13039
bc24ec8Thanks @petebacondarwin! - fix: Angular auto-config now correctly handles projects without SSR configuredPreviously, 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. -
#13036
0b4c21aThanks @pbrowne011! - Fixwrangler 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. -
#13061
535582dThanks @petebacondarwin! - fix: resolve secondary worker types when environment overrides the worker name in multi-worker type generationWhen 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. -
#13058
992f9a3Thanks @petebacondarwin! - fix: patch undici to prevent fetch() throwing on 401 responses with a request bodyFetching 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(). -
#13017
91b7f73Thanks @petebacondarwin! - fix: prevent Docker container builds from spawning console windows on WindowsOn 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. -
#12996
f6cdab2Thanks @guybedford! - Fix source phase imports in bundled and non-bundled WorkersWrangler 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. -
#12931
ce65246Thanks @dario-piotrowicz! - Improve error message when modules cannot be resolved during bundlingWhen 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-issuesThis provides actionable guidance for resolving import errors.
-
#13049
7a5be20Thanks @nikitassharma! - add library-push flag to containers registries credentialsThis flag is not available for public use.
-
#13018
9c5ebf5Thanks @tgarg-cf! - Validate that queue consumers in wrangler config only use the "worker" typePreviously, 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).
4.77.0
Minor Changes
-
#13023
593c4dbThanks @jamesopstad! - Addwrangler versions uploadsupport for the experimentalsecretsconfiguration propertyWhen the new
secretsproperty is defined,wrangler versions uploadnow validates that all secrets declared insecrets.requiredare configured on the Worker before the upload succeeds. If any required secrets are missing, the upload fails with a clear error listing which secrets need to be set.When
secretsis not defined, the existing behavior is unchanged.// wrangler.jsonc { "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } } -
#12732
c2e9163Thanks @jamesopstad! - Add deploy support for the experimentalsecretsconfiguration propertyWhen the new
secretsproperty is defined,wrangler deploynow validates that all secrets declared insecrets.requiredare configured on the Worker before the deploy succeeds. If any required secrets are missing, the deploy fails with a clear error listing which secrets need to be set.When
secretsis not defined, the existing behavior is unchanged.// wrangler.jsonc { "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } }
Patch Changes
-
#12896
451dae3Thanks @petebacondarwin! - fix: Add retry and timeout protection to remote preview API callsRemote preview sessions (
wrangler dev --remote) now automatically retry transient 5xx API errors (up to 3 attempts with linear backoff) and enforce a 30-second per-request timeout. Previously, a single hung or failed API response during session creation or worker upload could block the dev session reload indefinitely. -
#12569
379f2a2Thanks @MattieTK! - Useqwik add cloudflare-workersinstead ofqwik add cloudflare-pagesfor Workers targetsBoth the wrangler autoconfig and C3 Workers template for Qwik were running
qwik add cloudflare-pageseven when targeting Cloudflare Workers. This caused the wrong adapter directory structure to be scaffolded (adapters/cloudflare-pages/instead ofadapters/cloudflare-workers/), and required post-hoc cleanup of Pages-specific files like_routes.json.Qwik now provides a dedicated
cloudflare-workersadapter that generates the correct Workers configuration, includingwrangler.jsoncwithmainandassetsfields, apublic/.assetsignorefile, and the correctadapters/cloudflare-workers/vite.config.ts.Also adds
--skipConfirmation=trueto allqwik addinvocations so the interactive prompt is skipped in automated contexts. -
#11899
9a1cf29Thanks @hoodmane! - Remove cf-requirements support for Python workers. It hasn't worked with the runtime for a while now. -
#11800
875da60Thanks @southpolesteve! - Add upgrade hint to unexpected configuration field warnings when an update is availableWhen Wrangler encounters unexpected fields in the configuration file and a newer version of Wrangler is available, it now displays a message suggesting to update. This helps users who may be using configuration options that were added in a newer version of Wrangler.
-
Updated dependencies [
b8f3309,5aaaab2,5aaaab2,f8516dd,9c9fe30,6a6449e]:
4.76.0
Minor Changes
-
#12893
782df44Thanks @gpanders! - Rewritewrangler containers listto use the paginated Dash API endpointwrangler containers listnow fetches from the/dash/applicationsendpoint instead of/applications, displaying results in a paginated table with columns for ID, Name, State, Live Instances, and Last Modified. Container state is derived from health instance counters (active, degraded, provisioning, ready).The command supports
--per-page(default 25) for interactive pagination with Enter to load more and q/Esc to quit, and--jsonfor machine-readable output. Non-interactive environments load all results in a single request. -
#12957
62545c9Thanks @natewong1313! - Add Stream binding support to Wrangler and workers-utilsWrangler and workers-utils now recognize the
streambinding in configuration, deployment metadata, and generated worker types. This enables projects to declare Stream bindings inwrangler.jsonand have the binding represented consistently across validation, metadata mapping, and type generation. -
#12848
ce48b77Thanks @emily-shen! - Enable local explorer by defaultThis ungates the local explorer, a UI that lets you inspect the state of D1, DO and KV resources locally by visiting
/cdn-cgi/explorerduring local development.Note: this feature is still experimental, and can be disabled by setting the env var
X_LOCAL_EXPLORER=false.
Patch Changes
-
#12938
71ab981Thanks @dario-piotrowicz! - Add backward-compatible autoconfig support for Astro v5 and v4 projectsThe
astro add cloudflarecommand in older Astro versions installs the latest adapter version, which causes compatibility issues. This change adds manual configuration logic for projects using Astro versions before 6.0.0:- Astro 6.0.0+: Uses the native
astro add cloudflarecommand (unchanged behavior) - Astro 5.x: Installs
@astrojs/cloudflare@12and manually configures the adapter - Astro 4.x: Installs
@astrojs/cloudflare@11and manually configures the adapter - Astro < 4.0.0: Returns an error prompting the user to upgrade
- Astro 6.0.0+: Uses the native
-
#11892
7c3c6c6Thanks @staticpayload! - Handle registry ports when matching container image digestsWrangler now strips tags without breaking registry ports when comparing local images to remote digests. This prevents unnecessary pushes for tags like
localhost:5000/app:tag. -
Updated dependencies [
3c988e2,d028ffb,cb71403,3a1c149,ce48b77,8729f3d]:
4.75.0
Minor Changes
-
#12492
3b81fc6Thanks @thomasgauvin! - feat: addwrangler tunnelcommands for managing Cloudflare TunnelsAdds a new set of commands for managing remotely-managed Cloudflare Tunnels directly from Wrangler:
wrangler tunnel create <name>- Create a new Cloudflare Tunnelwrangler tunnel list- List all tunnels in your accountwrangler tunnel info <tunnel>- Display details about a specific tunnelwrangler tunnel delete <tunnel>- Delete a tunnel (with confirmation)wrangler tunnel run <tunnel>- Run a tunnel using cloudflaredwrangler tunnel quick-start <url>- Start a temporary tunnel (Try Cloudflare)
The
runandquick-startcommands automatically download and manage the cloudflared binary, caching it in~/.wrangler/cloudflared/. Users are prompted before downloading and warned if their PATH-installed cloudflared is outdated. You can override the binary location with theCLOUDFLARED_PATHenvironment variable.All commands are marked as experimental.
Patch Changes
-
#12927
c9b3184Thanks @penalosa! - Bump undici from 7.18.2 to 7.24.4 -
#12875
13df6c7Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260312.1 1.20260316.1 -
#12935
df0d112Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260316.1 1.20260317.1 -
#12928
81ee98eThanks @petebacondarwin! - Migrate chrome-devtools-patches deployment from Cloudflare Pages to Workers + AssetsThe DevTools frontend is now deployed as a Cloudflare Workers + Assets project instead of a Cloudflare Pages project. This uses
wrangler deployfor production deployments andwrangler versions uploadfor PR preview deployments.The inspector proxy origin allowlists in both wrangler and miniflare have been updated to accept connections from the new
workers.devdomain patterns, while retaining the legacypages.devpatterns for backward compatibility. -
#12835
c600ce0Thanks @dario-piotrowicz! - Fix execution freezing ondebuggerstatements when DevTools is not attachedPreviously,
wrangleralways sentDebugger.enableto the runtime on connection, even when DevTools wasn't open. This caused scripts to freeze ondebuggerstatements. NowDebugger.enableis only sent when DevTools is actually attached, andDebugger.disableis sent when DevTools disconnects to stop the runtime from performing debugging work. -
#12894
f509d13Thanks @gpanders! - Simplify description of --json optionRemove extraneous adjectives in the description of the
--jsonoption. -
#11888
0a7fef9Thanks @staticpayload! - Reject cross-drive module paths in Pages Functions routingOn Windows, module paths using a different drive letter could be parsed in a way that bypassed the project-root check. These paths are now parsed correctly and rejected when they resolve outside the project.
4.74.0
Minor Changes
-
#10896
351e1e1Thanks @devin-ai-integration! - feat: add--secrets-fileparameter towrangler deployandwrangler versions uploadYou can now upload secrets alongside your Worker code in a single operation using the
--secrets-fileparameter on bothwrangler deployandwrangler versions upload. The file format matches what's used bywrangler versions secret bulk, supporting both JSON and .env formats.Example usage:
wrangler deploy --secrets-file .env.production wrangler versions upload --secrets-file secrets.jsonSecrets not included in the file will be inherited from the previous version, matching the behavior of
wrangler versions secret bulk. -
#12873
2b9a186Thanks @gpanders! - Addwrangler containers instances <application_id>command to list container instancesLists all container instances for a given application, matching the Dash instances view. Displays instance ID, state, location, version, and creation time. Supports pagination for applications with many instances. Also adds paginated request support to the containers-shared API client.
Patch Changes
-
#12873
2b9a186Thanks @gpanders! - AddescapeCodeTimeoutoption toonKeyPressutility for faster Esc key detectionThe
onKeyPressutility now accepts an optionalescapeCodeTimeoutparameter that controls how long readline waits to disambiguate a standalone Esc press from multi-byte escape sequences (e.g. arrow keys). The default remains readline's built-in 500ms, but callers can pass a lower value (e.g. 25ms) for near-instant Esc handling in interactive prompts. -
#12676
65f1092Thanks @dario-piotrowicz! - Fix autoconfig package installation always failing at workspace rootsWhen running autoconfig at the root of a monorepo workspace, package installation commands now include the appropriate workspace root flags (
--workspace-rootfor pnpm,-Wfor yarn). This prevents errors like "Running this command will add the dependency to the workspace root" that previously occurred when configuring projects at the workspace root.Additionally, autoconfig now allows running at the workspace root if the root directory itself is listed as a workspace package (e.g.,
workspaces: ["packages/*", "."]). -
#12841
7b0d8f5Thanks @dario-piotrowicz! - Fix unclear error when assets upload session returns anullresponseWhen deploying assets, if the Cloudflare API returns a
nullresponse object, Wrangler now provides a clear error message asking users to retry instead of failing with a confusing error. -
Updated dependencies [
ade0aed]:
4.73.0
Minor Changes
-
#12853
ff543e3Thanks @gpanders! - Deprecate SSH passthrough flags inwrangler containers sshThe
--cipher,--log-file,--escape-char,--config-file,--pkcs11,--identity-file,--mac-spec,--option, and--tagflags are now deprecated. These flags expose OpenSSH-specific options that are tied to the current implementation. A future release will replace the underlying SSH transport, at which point these flags will be removed. They still function for now. -
#12815
e63539dThanks @NuroDev! - Support disabling persistence inunstable_startWorker()andunstable_dev()You can now disable persistence entirely by setting
persist: falsein thedevoptions:const worker = await unstable_dev("./src/worker.ts", { persist: false, });Or when using
unstable_startWorker():const worker = await unstable_startWorker({ entrypoint: "./src/worker.ts", dev: { persist: false, }, });This is useful for testing scenarios where you want to ensure a clean state on each run without any persisted data from previous runs.
Patch Changes
-
#12861
f7de0fdThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260310.1 1.20260312.1 -
#12734
8e89e85Thanks @flostellbrink! - Add back support for wrangler d1 exports with multiple tables.Example:
# All tables (default) wrangler d1 export db --output all-tables.sql # Single table (unchanged) wrangler d1 export db --output single-table.sql --table foo # Multiple tables (new) wrangler d1 export db --output multiple-tables.sql --table foo --table bar -
#12807
8d1e130Thanks @MaxwellCalkin! - fix:vectorizecommands now output valid jsonThis fixes:
wrangler vectorize createwrangler vectorize infowrangler vectorize insertwrangler vectorize upsertwrangler vectorize listwrangler vectorize list-vectorswrangler vectorize list-metadata-index
Also,
wrangler vectorize create --jsonnow also includes thecreated_at,modified_onanddescriptionfields. -
#12856
6ee18e1Thanks @dario-piotrowicz! - Fix autoconfig for Astro v6 projects to skip wrangler config generationAstro 6+ generates its own wrangler configuration on build, so autoconfig now detects the Astro version and skips creating a
wrangler.jsoncfile for projects using Astro 6 or later. This prevents conflicts between the autoconfig-generated config and Astro's built-in config generation. -
#12700
4bb61b9Thanks @RiscadoA! - Add client-side validation for VPC service host flagsThe
--hostname,--ipv4, and--ipv6flags onwrangler vpc service createandwrangler vpc service updatenow validate input before sending requests to the API. Previously, invalid values were accepted by the CLI and only rejected by the API with opaque error messages. Now users get clear, actionable error messages for common mistakes like passing a URL instead of a hostname, using an IP address in the--hostnameflag, or providing malformed IP addresses.
4.72.0
Minor Changes
-
#12746
211d75dThanks @NuroDev! - Add support for inheritable bindings in type generationWhen using
wrangler typeswith multiple environments, bindings from inheritable config properties (likeassets) are now correctly inherited from the top-level config in all named environments. Previously, if you definedassets.bindingat the top level with named environments, the binding would be marked as optional in the generatedEnvtype because the type generation didn't account for inheritance.Example:
{ "assets": { "binding": "ASSETS", "directory": "./public" }, "env": { "staging": {}, "production": {} } }Before this change,
ASSETSwould be typed asASSETS?: Fetcher(optional). Now,ASSETSis correctly typed asASSETS: Fetcher(required). This fix currently applies to theassetsbinding, with an extensible mechanism to support additional inheritable bindings in the future. -
#12826
de65c58Thanks @gabivlj! - Enable container egress interception in local dev without theexperimentalcompatibility flagContainer local development now always prepares the egress interceptor sidecar image needed for
interceptOutboundHttp(). This makes container-to-Worker interception available by default in Wrangler, Miniflare, and the Cloudflare Vite plugin.
Patch Changes
-
#12790
5451a7fThanks @petebacondarwin! - Bump node-forge to ^1.3.2 to address security vulnerabilitiesnode-forge had ASN.1 unbounded recursion, OID integer truncation, and ASN.1 validator desynchronization vulnerabilities. This is a bundled dependency used for local HTTPS certificate handling.
-
#12795
82cc2a8Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260301.1 1.20260306.1 -
#12811
3c67c2aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260306.1 1.20260307.1 -
#12827
d645594Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260307.1 1.20260310.1 -
#12808
6ed249bThanks @MaxwellCalkin! - Fixwrangler d1 execute --jsonreturning"null"(string) instead ofnull(JSON null) for SQL NULL valuesWhen using
wrangler d1 execute --jsonwith local execution, SQL NULL values were incorrectly serialized as the string"null"instead of JSONnull. This produced invalid JSON output that violated RFC 4627. The fix removes the explicit null-to-string conversion so NULL values are preserved as proper JSON null in the output. -
#12824
9f93b54Thanks @jamesopstad! - Strip query strings from module names before writing to diskWhen bundling modules with query string suffixes (e.g.
.wasm?module), the?character was included in the output filename. Since?is not a valid filename character on Windows, this caused an ENOENT error duringwrangler dev. This was particularly visible when using Prisma Client with the D1 adapter, which imports.wasm?modulefiles.The fix strips query strings from module names before writing them to disk, while preserving correct module resolution.
-
#12771
b8c33f5Thanks @penalosa! - Make remote devexchange_urloptionalThe edge-preview API's
exchange_urlis now treated as optional. When unavailable or when the exchange fails, the initial token from the API response is used directly. Theprewarmstep andinspector_websockethave been removed from the remote dev flow in favour oftail_urlfor live logs. -
Updated dependencies [
5451a7f,82cc2a8,3c67c2a,d645594,de65c58,cb14820,a7c87d1,e4d9510]:
4.71.0
Minor Changes
-
#11656
ec2459eThanks @prydt! - feat(hyperdrive): add MySQL SSL mode and Custom CA supportHyperdrive now supports MySQL-specific SSL modes (
REQUIRED,VERIFY_CA,VERIFY_IDENTITY) alongside the existing PostgreSQL modes. The--sslmodeflag now validates the provided value based on the database scheme (PostgreSQL or MySQL) and enforces appropriate CA certificate requirements for each.Usage:
# MySQL with CA verification wrangler hyperdrive create my-config --connection-string="mysql://user:pass@host:3306/db" --sslmode=VERIFY_CA --ca-certificate-id=<cert-id> # PostgreSQL (unchanged) wrangler hyperdrive create my-config --connection-string="postgres://user:pass@host:5432/db" --sslmode=verify-full --ca-certificate-id=<cert-id>
Patch Changes
- Updated dependencies [
5cc8fcf]:
4.70.0
Minor Changes
-
#11332
6a8aa5fThanks @nikitassharma! - Users are now able to configure DockerHub credentials and have containers reference images stored there.DockerHub can be configured as follows:
echo $PAT_TOKEN | npx wrangler@latest containers registries configure docker.io --dockerhub-username=user --secret-name=DockerHub_PAT_TokenContainers can then specify an image from DockerHub in their
wrangler.jsoncas follows:"containers": { "image": "docker.io/namespace/image:tag", ... } -
#12649
35b2c56Thanks @gabivlj! - Add experimental support for containers to workers communication with interceptOutboundHttpThis feature is experimental and requires adding the "experimental" compatibility flag to your Wrangler configuration.
-
#12701
23a365aThanks @jamesopstad! - Add local dev validation for the experimentalsecretsconfiguration propertyWhen the new
secretsproperty is defined,wrangler devandvite devnow validate secrets declared insecrets.required. When required secrets are missing from.dev.varsor.env/process.env, a warning is logged listing the missing secret names.When
secretsis defined, only the keys listed insecrets.requiredare loaded. Additional keys in.dev.varsor.envare excluded. If you are not using.dev.vars, keys listed insecrets.requiredare loaded fromprocess.envas well as.env. TheCLOUDFLARE_INCLUDE_PROCESS_ENVenvironment variable is therefore not needed when using this feature.When
secretsis not defined, the existing behavior is unchanged.// wrangler.jsonc { "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } } -
#12695
0769056Thanks @jamesopstad! - Add type generation for the experimentalsecretsconfiguration propertyWhen the new
secretsproperty is defined,wrangler typesnow generates typed bindings from the names listed insecrets.required.When
secretsis defined at any config level, type generation uses it exclusively and no longer infers secret names from.dev.varsor.envfiles. This enables running type generation in environments where these files are not present.Per-environment secrets are supported. Each named environment produces its own interface, and the aggregated
Envmarks secrets that only appear in some environments as optional.When
secretsis not defined, the existing behavior is unchanged.// wrangler.jsonc { "secrets": { "required": ["API_KEY", "DB_PASSWORD"] } } -
#12693
150ef7bThanks @martinezjandrew! - Addwrangler containers registries credentialscommand for generating temporary push/pull credentialsThis command generates short-lived credentials for authenticating with the Cloudflare managed registry (
registry.cloudflare.com). Useful for CI/CD pipelines or local Docker authentication.# Generate push credentials (for uploading images) wrangler containers registries credentials registry.cloudflare.com --push # Generate pull credentials (for downloading images) wrangler containers registries credentials registry.cloudflare.com --pull # Generate credentials with both permissions wrangler containers registries credentials registry.cloudflare.com --push --pull # Custom expiration (default 15) wrangler containers registries credentials registry.cloudflare.com --push --expiration-minutes=30 -
#12622
bf9cb3dThanks @LuisDuarte1! - Add configurable step limits for WorkflowsYou can now set a maximum number of steps for a Workflow instance via the
limits.stepsconfiguration in your Wrangler config. When a Workflow instance exceeds this limit, it will fail with an error indicating the limit was reached.// wrangler.jsonc { "workflows": [ { "binding": "MY_WORKFLOW", "name": "my-workflow", "class_name": "MyWorkflow", "limits": { "steps": 5000 } } ] }The
stepsvalue must be an integer between 1 and 25,000. If not specified, the default limit of 10,000 steps is used. Step limits are also enforced in local development viawrangler dev.
Patch Changes
-
#12733
d672e2eThanks @dario-piotrowicz! - Fix SolidStart autoconfig for projects using version 2.0.0-alpha or laterSolidStart v2.0.0-alpha introduced a breaking change where configuration moved from
app.config.(js|ts)tovite.config.(js|ts). Wrangler's autoconfig now detects the installed SolidStart version and based on it updates the appropriate configuration file -
#12698
209b396Thanks @penalosa! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260305.0 1.20260226.1 @cloudflare/workers-types 4.20260305.0 4.20260226.1 -
#12691
596b8a0Thanks @penalosa! - Remove temporary AI Search RPC workaround (no user-facing changes) -
#12694
00e729eThanks @garvit-gupta! - Fixwrangler pipelines setupfailing for Data Catalog sinks on new buckets by using the correct R2 Catalog API error code (40401). -
Updated dependencies [
35b2c56,5f7aaf2,209b396,596b8a0,bf9cb3d]:
4.69.0
Minor Changes
-
#12625
c0e9e08Thanks @WillTaylorDev! - Addcacheconfiguration option for enabling worker cache (experimental)You can now enable cache before worker execution using the new
cacheconfiguration:{ "cache": { "enabled": true } }This setting is environment-inheritable and opt-in. When enabled, cache behavior is applied before your worker runs.
Note: This feature is experimental. The runtime API is not yet generally available.
Patch Changes
-
#12661
99037e3Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260302.0 1.20260303.0 -
#12680
295297aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260303.0 1.20260305.0 -
#12671
f765244Thanks @MattieTK! - fix: Only redact account names in CI environments, not all non-interactive contextsThe multi-account selection error in
getAccountIdnow only redacts account names when running in a CI environment (detected viaci-info). Non-interactive terminals such as coding agents and piped commands can now see account names, which they need to identify which account to configure. CI logs remain protected.
4.68.1
Patch Changes
-
#12648
3d6e421Thanks @petebacondarwin! - Fix Angular scaffolding to allow localhost SSR in development modeRecent versions of Angular's
AngularAppEngineblock serving SSR onlocalhostby default. This causedwrangler dev/wrangler pages devto fail withURL with hostname "localhost" is not allowed.The fix passes
allowedHosts: ["localhost"]to theAngularAppEngineconstructor inserver.ts, which is safe to do even in production since Cloudflare will already restrict which host is allowed. -
#12657
294297eThanks @dario-piotrowicz! - Update Waku autoconfig logicAs of
1.0.0-alpha.4, Waku projects can be built on top of the Cloudflare Vite plugin, and the changes here allow Wrangler autoconfig to support this. Running autoconfig on older versions of Waku will result in an error. -
Updated dependencies []:
4.68.0
Minor Changes
-
#12614
8d882faThanks @dario-piotrowicz! - Enable autoconfig forwrangler deployby default (while allowing users to still disable it via--x-autoconfig=falseif necessary) -
#12614
8d882faThanks @dario-piotrowicz! - Mark thewrangler setupcommand as stable
4.67.1
Patch Changes
-
#12595
e93dc01Thanks @dario-piotrowicz! - Add a warning in the autoconfig logic letting users know that support for projects inside workspaces is limited -
#12582
c2ed7c2Thanks @penalosa! - Internal refactor to use capnweb's nativeReadableStreamsupport to power remote Media and Dispatch Namespace bindings. -
#12618
d920811Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260219.0 1.20260227.0 -
#12637
896734dThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260227.0 1.20260302.0 -
#12601
ebdbe52Thanks @43081j! - Switch toempathicfor file-system upwards traversal to reduce dependency bloat. -
#12602
58a4020Thanks @anonrig! - Optimize filesystem operations by using Node.js's throwIfNoEntry: false optionThis reduces the number of system calls made when checking for file existence by avoiding the overhead of throwing and catching errors for missing paths. This is an internal performance optimization with no user-visible behavioral changes.
-
#12591
6f6cd94Thanks @martinezjandrew! - Implemented logic withinwrangler containers registries configureto check if a specified secret name is already in-use and offer to reuse that secret. Also added--skip-confirmationflag to the command to skip all interactive prompts.
4.67.0
Minor Changes
-
#12401
8723684Thanks @jonesphillip! - Add validation retry loops to pipelines setup commandThe
wrangler pipelines setupcommand now prompts users to retry when validation errors occur, instead of failing the entire setup process. This includes:- Validation retry prompts for pipeline names, bucket names, and field names
- A "simple" mode for sink configuration that uses sensible defaults
- Automatic bucket creation when buckets don't exist
- Automatic Data Catalog enablement when not already active
This improves the setup experience by allowing users to correct mistakes without restarting the entire configuration flow.
-
#12395
aa82c2bThanks @cmackenzie1! - Generate typed pipeline bindings from stream schemasWhen running
wrangler types, pipeline bindings now generate TypeScript types based on the stream's schema definition. This gives you full autocomplete and type checking when sending data to your pipelines.// wrangler.json { "pipelines": [{ "binding": "ANALYTICS", "pipeline": "analytics-stream-id" }] }If your stream has a schema with fields like
user_id(string) andevent_count(int32), the generated types will be:declare namespace Cloudflare { type AnalyticsStreamRecord = { user_id: string; event_count: number }; interface Env { ANALYTICS: Pipeline<Cloudflare.AnalyticsStreamRecord>; } }For unstructured streams or when not authenticated, bindings fall back to the generic
Pipeline<PipelineRecord>type.
Patch Changes
-
#12592
aaa7200Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260217.0 1.20260218.0 -
#12606
2f19a40Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260218.0 1.20260219.0 -
#12604
e2a6600Thanks @petebacondarwin! - fix: pass--envflag to auxiliary workers in multi-worker modeWhen running
wrangler devwith multiple config files (e.g.-c ./apps/api/wrangler.jsonc -c ./apps/queues/wrangler.jsonc -e=dev), the--envflag was not being passed to auxiliary (non-primary) workers. This meant that environment-specific configuration (such as queue bindings) was not applied to auxiliary workers, causing features like queue consumers to not be triggered in local development. -
#12597
0b17117Thanks @sdnts! - The maximum allowed delivery and retry delays for Queues is now 24 hours -
#12598
ca58062Thanks @mattzcarey! - Stop redactingwrangler whoamioutput in non-interactive modewrangler whoamiis explicitly invoked to retrieve account info, so email and account names should always be visible. Redacting them in non-interactive/CI environments makes it difficult for coding agents and automated tools to identify which account to use. Other error messages that may appear unexpectedly in CI logs (e.g. multi-account selection errors) remain redacted. -
Updated dependencies [
f239077,aaa7200,2f19a40,5f9f0b4,452cdc8,527e4f5,0b17117]:
4.66.0
Minor Changes
-
#12466
caf9b11Thanks @petebacondarwin! - AddWRANGLER_CACHE_DIRenvironment variable and smart cache directory detectionWrangler now intelligently detects where to store cache files:
- Use
WRANGLER_CACHE_DIRenv var if set - Use existing cache directory if found (
node_modules/.cache/wrangleror.wrangler/cache) - Create cache in
node_modules/.cache/wranglerifnode_modulesexists - Otherwise use
.wrangler/cache
This improves compatibility with Yarn PnP, pnpm, and other package managers that don't use traditional
node_modulesdirectories, without requiring any configuration. - Use
-
#12572
936187dThanks @dario-piotrowicz! - Ensure thenodejs_compatflag is always applied in autoconfigPreviously, the autoconfig feature relied on individual framework configurations to specify Node.js compatibility flags, some could set
nodejs_compatwhile othersnodejs_als.Now instead
nodejs_compatis always included as a compatibility flag, this is generally beneficial and the user can always remove the flag afterwards if they want to. -
#12560
c4c86f8Thanks @taylorlee! - Support--tagand--messageflags onwrangler deployThey have the same behavior that they do as during
wrangler versions upload, as both are set on the version.The message is also reused for the deployment as well, with the same behavior as used during
wrangler versions deploy.
Patch Changes
-
#12543
5a868a0Thanks @G4brym! - Fix AI Search binding failing in local devUsing AI Search bindings with
wrangler devwould fail with "RPC stub points at a non-serializable type". AI Search bindings now work correctly in local development. -
#12552
c58e81bThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260212.0 1.20260213.0 -
#12568
33a9a8fThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260213.0 1.20260214.0 -
#12576
8077c14Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260214.0 1.20260217.0 -
#12466
caf9b11Thanks @petebacondarwin! - fix: exclude.wranglerdirectory from Pages uploadsThe
.wranglerdirectory contains local cache and state files that should never be deployed. This aligns Pages upload behavior with Workers Assets, which already excludes.wranglervia.assetsignore. -
#12556
7d2355eThanks @ascorbic! - Fix port availability check probing the wrong host when host changesmemoizeGetPortcorrectly invalidated its cached port when called with a different host, but then still probed the original host for port availability. This could return a port that was free on the original host but already in use on the requested one, leading to bind failures at startup. -
#12562
7ea69afThanks @MattieTK! - Support function-based Vite configs in autoconfig setupwrangler setupandwrangler deploy --x-autoconfigcan now automatically add the Cloudflare Vite plugin to projects that use function-baseddefineConfig()patterns. Previously, autoconfig would fail with "Cannot modify Vite config: expected an object literal but found ArrowFunctionExpression" for configs like:export default defineConfig(({ isSsrBuild }) => ({ plugins: [reactRouter(), tsconfigPaths()], }));This pattern is used by several official framework templates, including React Router's
node-postgresandnode-custom-servertemplates. The followingdefineConfig()patterns are now supported:defineConfig({ ... })(object literal, already worked)defineConfig(() => ({ ... }))(arrow function with expression body)defineConfig(({ isSsrBuild }) => ({ ... }))(arrow function with destructured params)defineConfig(() => { return { ... }; })(arrow function with block body)defineConfig(function() { return { ... }; })(function expression)
-
#12548
5cc7158Thanks @dario-piotrowicz! - Fix.assetsignoreformatting when autoconfig creates a new filePreviously, when
wrangler setuporwrangler deploy --x-autoconfigcreated a new.assetsignorefile via autoconfig, it would add unnecessary leading empty lines before the wrangler-specific entries. Empty separator lines should only be added when appending to an existing.assetsignorefile. This fix ensures newly created.assetsignorefiles start cleanly without leading blank lines. -
#12556
7d2355eThanks @ascorbic! - Improve error message when port binding is blocked by a sandbox or security policyWhen running
wrangler devinside a restricted environment (such as an AI coding agent sandbox or locked-down container), the port availability check would fail with a rawEPERMerror. This now provides a clear message explaining that a sandbox or security policy is blocking network access, rather than the generic permission error that previously pointed at the file system. -
#12545
c9d0f9dThanks @dario-piotrowicz! - Improve framework detection when multiple frameworks are foundWhen autoconfig detects multiple frameworks in a project, Wrangler now applies smarter logic to select the most appropriate one. Selecting the wrong one is acceptable locally where the user can change the detected framework, in CI an error is instead thrown.
-
#12548
5cc7158Thanks @dario-piotrowicz! - Add trailing newline to generatedpackage.jsonandwrangler.jsoncfiles -
#12548
5cc7158Thanks @dario-piotrowicz! - Fix.gitignoreformatting when autoconfig creates a new filePreviously, when
wrangler setuporwrangler deploycreated a new.gitignorefile via autoconfig, it would add unnecessary leading empty lines before the wrangler-specific entries. Empty separator lines should only be added when appending to an existing.gitignorefile. This fix ensures newly created.gitignorefiles start cleanly without leading blank lines. -
#12545
c9d0f9dThanks @dario-piotrowicz! - Throw actionable error when autoconfig is run in the root of a workspaceWhen running Wrangler commands that trigger auto-configuration (like
wrangler devorwrangler deploy) in the root directory of a monorepo workspace, a helpful error is now shown directing users to run the command in a specific project's directory instead. -
Updated dependencies [
5a868a0,c58e81b,33a9a8f,8077c14,caf9b11,9a565d5,7f18183,39491f9,43c462a]:
4.65.0
Minor Changes
-
#12473
b900c5aThanks @petebacondarwin! - Add CF_PAGES environment variables towrangler pages devwrangler pages devnow automatically injects Pages-specific environment variables (CF_PAGES,CF_PAGES_BRANCH,CF_PAGES_COMMIT_SHA,CF_PAGES_URL) for improved dev/prod parity. This enables frameworks like SvelteKit to auto-detect the Pages environment during local development.CF_PAGESis set to"1"to indicate the Pages environmentCF_PAGES_BRANCHdefaults to the current git branch (or"local"if not in a git repo)CF_PAGES_COMMIT_SHAdefaults to the current git commit SHA (or a placeholder if not in a git repo)CF_PAGES_URLis set to a simulated commit preview URL (e.g.,https://<sha>.<project-name>.pages.dev)
These variables are displayed with their actual values in the bindings table during startup, making it easy to verify what branch and commit SHA were detected.
These variables can be overridden by user-defined vars in the Wrangler configuration,
.env,.dev.vars, or via CLI flags. -
#12464
10a1c4aThanks @petebacondarwin! - Allow deleting KV namespaces by nameYou can now delete a KV namespace by providing its name as a positional argument:
wrangler kv namespace delete my-namespaceThis aligns the delete command with the create command, which also accepts a namespace name. The existing
--namespace-idand--bindingflags continue to work as before. -
#12382
d7b492cThanks @dario-piotrowicz! - Add Pages detection to autoconfig flowsWhen running the autoconfig logic (via
wrangler setup,wrangler deploy --x-autoconfig, or the programmatic autoconfig API), Wrangler now detects when a project appears to be a Pages project and handles it appropriately:- For
wrangler deploy, it warns the user but still allows them to proceed - For
wrangler setupand the programmatic autoconfig API, it throws a fatal error
- For
-
#12461
8809411Thanks @penalosa! - Supporttype: inheritbindings when using startWorker()This is an internal binding type that should not be used by external users of the API
-
#12515
1a9edddThanks @ascorbic! - Add--jsonflag towrangler whoamifor machine-readable outputwrangler whoami --jsonnow outputs structured JSON containing authentication status, auth type, email, accounts, and token permissions. When the user is not authenticated, the command exits with a non-zero status code and outputs{"loggedIn":false}, making it easy to check auth status in shell scripts without parsing text output.# Parse the JSON output wrangler whoami --json | jq '.accounts' # Check if authenticated in a script. Returns 0 if authenticated, non-zero if not. if wrangler whoami --json > /dev/null 2>&1; then echo "Authenticated" else echo "Not authenticated" fi
Patch Changes
-
#12437
ad817ddThanks @MattieTK! - fix: use project's package manager in wranger autoconfigwrangler setupnow correctly detects and uses the project's package manager based on lockfiles (pnpm-lock.yaml,yarn.lock,bun.lockb,package-lock.json) and thepackageManagerfield inpackage.json. Previously, it would fall back to the package manager used to execute the command when run directly from the terminal, causing failures in pnpm and yarn workspace projects if the wrong manager was used in this step due to theworkspace:protocol not being supported by npm.This change leverages the package manager detection already performed by
@netlify/build-infoduring framework detection, ensuring consistent behaviour across the autoconfig process. -
#12541
f7fa326Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260210.0 1.20260212.0 -
#12498
734792aThanks @dario-piotrowicz! - Fix: make sure that remote proxy sessions's logs can be silenced when the wrangler log level is set to "none" -
#12135
cc5ac22Thanks @edmundhung! - Fix spurious config diffs when bindings from local and remote config are shown in different orderWhen comparing local and remote Worker configurations, binding arrays like
kv_namespaceswould incorrectly show additions and removals if the elements were in a different order. The diff now correctly recognizes these as equivalent by reordering remote arrays to match the local config's order before comparison. -
#12476
62a8d48Thanks @MattieTK! - fix: use unscoped binary name for OpenNext autoconfig command overridesThe build, deploy, and version command overrides in the Next.js (OpenNext) autoconfig handler used the scoped package name
@opennextjs/cloudflare, which pnpm interprets as a workspace filter rather than a binary name. This causedwrangler deploy --x-autoconfigto fail for pnpm-based Next.js projects withERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL. Changed to use the unscoped binary nameopennextjs-cloudflare, which resolves correctly across all package managers. -
#12516
84252b7Thanks @edmundhung! - Stop proxying localhost requests when proxy environment variables are setWhen
HTTP_PROXYorHTTPS_PROXYis configured, all fetch requests including ones tolocalhostwere routed through the proxy. This causedwrangler devand the Vite plugin to fail with "TypeError: fetch failed" because the proxy can't reach local addresses.This switches from
ProxyAgentto undici'sEnvHttpProxyAgent, which supports theNO_PROXYenvironment variable. WhenNO_PROXYis not set, it defaults tolocalhost,127.0.0.1,::1so local requests are never proxied.The
NO_PROXYconfig only applies to the request destination, not the proxy server address. So a proxy running on localhost (e.g. HTTP_PROXY=http://127.0.0.1:11451) still works for outbound API calls. -
#12506
e5efa5dThanks @sesteves! - Fixwrangler r2 sql querydisplaying[object Object]for nested valuesSQL functions that return complex types such as arrays of objects (e.g.
approx_top_k) were rendered as[object Object]in the table output becauseString()was called directly on non-primitive values. These values are now serialized withJSON.stringifyso they display as readable JSON strings. -
#11725
be9745fThanks @dario-piotrowicz! - Fix incorrect logic during autoconfiguration (when runningwrangler setuporwrangler deploy --x-autoconfig) that caused parts of the project'spackage.jsonfile, removed during the process, to incorrectly be added back -
#12458
122791dThanks @jkoe-cf! - Remove default values for delivery delay and message retention and update messaging on limitsFixes the issue of the default maximum message retention (365400 seconds) being longer than the maximum allowed retention period for free tier users (86400 seconds).
Previous:
- Wrangler set a default value of 365400 seconds max message retention if the setting was not explicitly provided in the Wrangler configuration.
- The maximum retention period was documented as 1209600 seconds for all queues users because it was required to be on paid tier.
- Wrangler also set a default value of 0 seconds for delivery delay if the setting was not explicitly provided in the Wrangler configuration.
Updated:
- Wrangler no longer sets a default value for max message retention so that the default can be applied at the API.
- The maximum retention period is now documented as 86400 seconds for free tier queues and 1209600 seconds for paid tier queues
- Wrangler also no longer sets a default value for delivery delay so that the default can be applied at the API.
-
#12513
41e18aaThanks @pombosilva! - Add confirmation prompt when deploying workflows with names that belong to different workers.When deploying a workflow with a name that already exists and is currently associated with a different worker script, Wrangler will now display a warning and prompt for confirmation before proceeding. This helps prevent accidentally overriding workflows.
In non-interactive environments this check is skipped by default. Use the
--strictflag to enable the check in non-interactive environments, which will cause the deployment to fail if workflow conflicts are detected.
4.64.0
Minor Changes
-
#12433
2acb277Thanks @martinezjandrew! - Updated registries delete subcommand to handle new API response that now returns a secrets store secret reference after deletion. Wrangler will now prompt the user if they want to delete the associated secret. If so, added new logic to retrieve a secret by its name. The subcommand will then delete the secret. -
#12307
e02b5f5Thanks @dario-piotrowicz! - Improve autoconfig telemetry with granular event trackingAdds detailed telemetry events to track the autoconfig workflow, including process start/end, detection, and configuration phases. Each event includes a unique session ID (
appId), CI detection, framework information, and success/error status to help diagnose issues and understand usage patterns. -
#12474
8ba1d11Thanks @petebacondarwin! - Addwrangler pages deployment deletecommand to delete Pages deployments via CLIYou can now delete a Pages deployment directly from the command line:
wrangler pages deployment delete <deployment-id> --project-name <name>Use the
--force(or-f) flag to skip the confirmation prompt, which is useful for CI/CD automation. -
#12307
e02b5f5Thanks @dario-piotrowicz! - Include all common telemetry properties in ad-hoc telemetry eventsPreviously, only command-based telemetry events (e.g., "wrangler command started/completed") included the full set of common properties. Ad-hoc events sent via
sendAdhocEventwere missing important context like OS information, CI detection, and session tracking.Now, all telemetry events include the complete set of common properties:
amplitude_session_idandamplitude_event_idfor session trackingwranglerVersion(and major/minor/patch variants)osPlatform,osVersion,nodeVersionpackageManagerconfigFileTypeisCI,isPagesCI,isWorkersCIisInteractiveisFirstUsagehasAssetsagent
-
#12479
fd902aaThanks @dario-piotrowicz! - Add framework selection prompt during autoconfigWhen running autoconfig in interactive mode, users are now prompted to confirm or change the detected framework. This allows correcting misdetected frameworks or selecting a framework when none was detected, defaulting to "Static" in that case.
-
#12465
961705cThanks @petebacondarwin! - Add--jsonflag towrangler pages project listcommandYou can now use the
--jsonflag to output the project list as clean JSON instead of a formatted table. This enables easier programmatic processing and scripting workflows.> wrangler pages project list --json [ { "Project Name": "my-pages-project", "Project Domains": "my-pages-project-57h.pages.dev", "Git Provider": "No", "Last Modified": "23 hours ago" }, ... ] -
#12470
21ac7abThanks @petebacondarwin! - AddWRANGLER_COMMANDenvironment variable to custom build commandsWhen using a custom build command in
wrangler.toml, you can now detect whetherwrangler devorwrangler deploytriggered the build by reading theWRANGLER_COMMANDenvironment variable.This variable will be set to
"dev","deploy","versions upload", or"types"depending on which command invoked the build. This allows you to customize your build process based on the deployment context.Example usage in a build script:
if [ "$WRANGLER_COMMAND" = "dev" ]; then echo "Building for development..." else echo "Building for production..." fi
Patch Changes
-
#12468
5d56487Thanks @petebacondarwin! - Add debug logs for git branch detection inwrangler pages deploycommandWhen running
wrangler pages deploy, the command automatically detects git information (branch, commit hash, commit message, dirty state) from the local repository. Previously, when this detection failed, there was no way to troubleshoot the issue.Now, running with
WRANGLER_LOG=debugwill output detailed information about:- Whether a git repository is detected
- Each git command being executed and its result
- The detected values (branch, commit hash, commit message, dirty status)
- Any errors that occur during detection
Example usage:
WRANGLER_LOG=debug wrangler pages deploy ./dist --project-name=my-project -
#12447
c8dda16Thanks @dario-piotrowicz! - fix: Throw a descriptive error when autoconfig cannot detect an output directoryWhen running
wrangler setuporwrangler deploy --x-autoconfigon a project where the output directory cannot be detected, you will now see a clear error message explaining what's missing (e.g., "Could not detect a directory containing the static (html, css and js) files for the project") instead of a generic configuration error. This makes it easier to understand and resolve the issue. -
#12440
555b32aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260205.0 1.20260206.0 -
#12485
d636d6aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260206.0 1.20260207.0 -
#12502
bf8df0cThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260207.0 1.20260210.0 -
#12280
988dea9Thanks @penalosa! - Fixwrangler initfailing with Yarn ClassicWhen using Yarn Classic (v1.x), running
wrangler initorwrangler init --from-dashwould fail because Yarn Classic doesn't properly handle version specifiers with special characters like^inyarn createcommands. Yarn would install the package correctly but then fail to find the binary because it would look for a path like.yarn/bin/create-cloudflare@^2.5.0instead of.yarn/bin/create-cloudflare.This fix removes the version specifier from the default C3 command entirely. Since C3 has had auto-update behavior for over two years, specifying a version is no longer necessary and removing it resolves the Yarn Classic compatibility issue.
-
#12486
1f1c3ceThanks @vicb! - Bump esbuild to 0.27.3This update includes several bug fixes from esbuild versions 0.27.1 through 0.27.3. See the esbuild changelog for details.
-
#12472
62635a0Thanks @petebacondarwin! - Improve D1 database limit error message to match Cloudflare dashboardWhen attempting to create a D1 database after reaching your account's limit, the CLI now shows a more helpful error message with actionable guidance instead of the raw API error.
The new message includes:
- A clear explanation that the account limit has been reached
- A link to D1 documentation
- Commands to list and delete databases
-
#12411
355c6daThanks @jbwcloudflare! - Fixwrangler pages deployto respect increased file count limits -
#12449
bfd17cdThanks @penalosa! - fix: Display unsafe metadata separately from bindingsUnsafe metadata are not bindings and should not be displayed in the bindings table. They are now printed as a separate JSON block.
Before:
Your Worker has access to the following bindings: Binding Resource env.extra_data ("interesting value") Unsafe Metadata env.more_data ("dubious value") Unsafe MetadataAfter:
The following unsafe metadata will be attached to your Worker: { "extra_data": "interesting value", "more_data": "dubious value" } -
#12463
3388c84Thanks @petebacondarwin! - Add User-Agent header to remote dev inspector WebSocket connectionsWhen running
wrangler dev --remote, the inspector WebSocket connection now includes aUser-Agentheader (wrangler/<version>). This resolves issues where WAF rules blocking empty User-Agent headers prevented remote dev mode from working with custom domains. -
#12421
937425cThanks @ryanking13! - Fix Python Workers deployment failing on Windows due to path separator handlingPreviously, deploying Python Workers on Windows would fail because the backslash path separator (
\) was not properly handled, causing the entire full path to be treated as a single filename. The deployment process now correctly normalizes paths to use forward slashes on all platforms. -
Updated dependencies [
2d90127,555b32a,d636d6a,bf8df0c,312b5eb,ce9dc01]:
4.63.0
Minor Changes
-
#12386
447daa3Thanks @NuroDev! - Added new "open local explorer" hotkey for experimental/WIP local resource explorerWhen running
wrangler devwith the experimental local explorer feature enabled, you can now press theehotkey to open the local resource explorer UI in your browser.
Patch Changes
-
#11350
ee9b81fThanks @dario-piotrowicz! - fix: improve error message when the entrypoint is incorrectError messages for incorrect entrypoint configuration have been improved to provide clearer and more actionable feedback. The updated messages help users understand what went wrong and how to fix their configuration.
-
#12402
63f1adbThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260131.0 1.20260203.0 -
#12418
ba13de9Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260203.0 1.20260205.0 -
#12216
fe3af35Thanks @ichernetsky-cf! - Deprecate 'wrangler cloudchamber apply' in favor of 'wrangler deploy' -
#12368
bd4bb98Thanks @KianNH! - Preserve Containers configuration when usingversionscommandsPreviously, commands like
wrangler versions uploadwould inadvertently disable Containers on associated Durable Object namespaces because thecontainersproperty was being omitted from the API request body. -
#12396
dab4bc9Thanks @petebacondarwin! - fix: redact email addresses and account names in non-interactive modeTo prevent sensitive information from being exposed in public CI logs, email addresses and account names are now redacted when running in non-interactive mode (e.g., CI environments). Account IDs remain visible to aid debugging.
-
#12378
18c0784Thanks @X6TXY! - Truncate Pages commit messages at UTF-8 boundaries to avoid invalid UTF-8
4.62.0
Minor Changes
-
#12064
964a39dThanks @G4brym! - Add AI Search OAuth scopes to loginAdds
ai-search:writeandai-search:runOAuth scopes to the default login scopes, enabling wrangler to authenticate with AI Search APIs. -
#11867
253a85dThanks @rahulsuresh-git! - Addwrangler r2 bucket local-uploadscommand to manage local uploads for R2 bucketsWhen enabled, object data is written to the nearest region first, then asynchronously replicated to the bucket's primary region.
Docs: https://developers.cloudflare.com/r2/buckets/local-uploads
# Get local uploads status wrangler r2 bucket local-uploads get my-bucket # Enable local uploads (will prompt for confirmation) wrangler r2 bucket local-uploads enable my-bucket # Enable without confirmation prompt wrangler r2 bucket local-uploads enable my-bucket --force # Disable local uploads wrangler r2 bucket local-uploads disable my-bucket -
#11803
1bd1488Thanks @dario-piotrowicz! - Add a newsubrequestslimit to thelimitsfield of the Wrangler configuration fileBefore only the
cpu_mslimit was supported in thelimitsfield of the Wrangler configuration file, now asubrequestslimit can be specified as well which enables the user to limit the number of fetch requests that a Worker's invocation can make.Example:
{ "$schema": "./node_modules/wrangler/config-schema.json", "limits": { "cpu_ms": 1000, "subrequests": 150 // newly added field } } -
#12185
f7aa8c7Thanks @penalosa! - Addtimestampfield to the version metadata binding in local development. The version metadata binding now includesid,tag, andtimestampfields, making it easier to test version-aware logic locally.
Patch Changes
-
#12190
ce736b9Thanks @dario-piotrowicz! - Update autoconfig logic to handle Next.js projects by using the new@opennextjs/cloudflare migratecommand -
#12065
47944d1Thanks @langningchen! - Improve error message whend1 export --outputpoints to a directory -
#12292
4c4d5a5Thanks @dario-piotrowicz! - AddversionCommandto theautoconfig_summaryfield in the autoconfig output entryAdd the version upload command to the output being printed by
wrangler deploytoWRANGLER_OUTPUT_FILE_DIRECTORY/WRANGLER_OUTPUT_FILE_PATH. This complements the existingbuildCommandanddeployCommandfields and allows CI systems to know how to upload new versions of Workers.For example, for a standard npm project this would be:
- Version command:
npx wrangler versions upload
While for a Next.js project it would be:
- Version command:
npx @opennextjs/cloudflare upload
- Version command:
-
#12050
b05b919Thanks @NuroDev! - Fixed Wrangler's error handling for both invalid commands with and without the--helpflag, ensuring consistent and clear error messages.Additionally, it also ensures that if you provide an invalid argument to a valid command, Wrangler will now correctly display that specific commands help menu.
-
#12289
0aaf080Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260128.0 1.20260129.0 -
#12295
b981db5Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260129.0 1.20260130.0 -
#12355
a113c0dThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260130.0 1.20260131.0 -
#11971
fdd7a9fThanks @dario-piotrowicz! - Add framework id, build command, and deploy command to theautoconfig_summaryfield in the deploy output entryAdd the framework id alongside the commands to build and deploy the project to the output being printed by
wrangler deploytoWRANGLER_OUTPUT_FILE_DIRECTORYorWRANGLER_OUTPUT_FILE_PATH.For example for an npm Astro project these would be:
- Framework id:
astro - Build command:
npm run build - Deploy command:
npx wrangler deploy
While for a Next.js project they would instead be:
- Framework id:
next - Build command:
npx @opennextjs/cloudflare build - Deploy command:
npx @opennextjs/cloudflare deploy
- Framework id:
-
#12211
a5fca2cThanks @elithrar! - Remove the 'pubsub' sub-command and related functionalityThe Pub/Sub product was never made publicly available and has been discontinued. This removes the
wrangler pubsubcommand and all associated functionality. -
Updated dependencies [
0c9625a,0aaf080,b981db5,a113c0d,f7aa8c7]:- miniflare@4.20260131.0
- @cloudflare/kv-asset-handler@0.4.2
4.61.1
Patch Changes
-
#12189
eb8a415Thanks @NuroDev! - Fixed Durable Object missing migrations warning message.If a Workers project includes some
durable_objectsin it but nomigrationswe show a warning to the user to addmigrationsto their config. However, this warning recommendednew_classesfor their migrations, but we instead now recommend all users usenew_sqlite_classesinstead. -
#11804
3b06b18Thanks @emily-shen! - fix: allowd1 execute,d1 export, andd1 migrationsto work locally withoutdatabase_idin config. -
#12183
17961bbThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260124.0 1.20260127.0 -
#12196
52fdfe7Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260127.0 1.20260128.0 -
#12199
6d8d9cdThanks @petebacondarwin! - Preventwrangler logoutfrom failing when the Wrangler configuration file is invalidPreviously, if your
wrangler.tomlorwrangler.jsonfile contained syntax errors or invalid values, thewrangler logoutcommand would fail. Now, configuration parsing errors are caught and logged at debug level, allowing you to log out regardless of the state of your configuration file. -
#12153
cb72c11Thanks @petebacondarwin! - Sanitize commands and arguments in telemetry to prevent accidentally capturing sensitive information.Changes:
- Renamed telemetry fields from
command/argstosanitizedCommand/sanitizedArgsto distinguish from historical fields that may have contained sensitive data in older versions - Command names now come from command definitions rather than user input, preventing accidental capture of sensitive data pasted as positional arguments
- Sentry breadcrumbs now use the safe command name from definitions
- Argument values are only included if explicitly allowed via
COMMAND_ARG_ALLOW_LIST - Argument keys (names) are always included since they come from command definitions, not user input
- Renamed telemetry fields from
4.61.0
Minor Changes
-
#12008
e414f05Thanks @penalosa! - Add support for customising the inspector IP addressAdds a new
--inspector-ipCLI flag anddev.inspector_ipconfiguration option to allow customising the IP address that the inspector server listens on. Previously, the inspector was hardcoded to listen only on127.0.0.1.Example usage:
# CLI flag wrangler dev --inspector-ip 0.0.0.0// wrangler.json { "dev": { "inspector_ip": "0.0.0.0" } } -
#12034
05714f8Thanks @emily-shen! - Add a no-op local explorer worker, which is gated by the experimental flagX_LOCAL_EXPLORER.
Patch Changes
-
#12134
a0a9ef6Thanks @NuroDev! - Fixed Fish shell tab completions.The
wranglertab completions are powered by@bomb.sh/tabwhich has been upgraded to version0.0.12which includes a fix for the Fish shell which was previously not working at all. -
#12006
ad4666cThanks @penalosa! - Remove--use-remoteoption fromwrangler hyperdrive createcommandHyperdrive does not support remote bindings during local development - it requires a
localConnectionStringto connect to a local database. This change removes the confusing "remote resource" prompt that was shown when creating a Hyperdrive config.Fixes #11674
-
#11853
014e7aaThanks @43081j! - Use built-in stripVTControlCharacters utility rather than thestrip-ansipackage. -
#12040
77e82d2Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260120.0 1.20260122.0 -
#12061
f08ef21Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260122.0 1.20260123.0 -
#12088
0641e6cThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260123.0 1.20260124.0 -
#12044
eacedbaThanks @edmundhung! - Fixwrangler secret listto error when the Worker is not foundPreviously, running
wrangler secret listagainst a non-existent Worker would silently return an empty array, making it difficult to diagnose issues like being logged into the wrong account. It now returns an error with suggestions for common causes. -
#12150
e8b2ef5Thanks @dario-piotrowicz! - Emit autoconfig summary as a separate output entryMove the autoconfig summary from the
deployoutput entry to a dedicatedautoconfigoutput entry type. This entry is now emitted by bothwrangler deployandwrangler setupcommands when autoconfig runs, making it easier to track autoconfig results independently of deployments. -
Updated dependencies [
014e7aa,e414f05,77e82d2,f08ef21,0641e6c,05714f8,bbd8a5e]:
4.60.0
Minor Changes
-
#11113
bba0968Thanks @AmirSa12! - Addwrangler completecommand for shell completion scripts (bash, zsh, powershell)Usage:
# Bash wrangler complete bash >> ~/.bashrc # Zsh wrangler complete zsh >> ~/.zshrc # Fish wrangler complete fish >> ~/.config/fish/completions/wrangler.fish # PowerShell wrangler complete powershell > $PROFILE- Uses
@bomb.sh/tablibrary for cross-shell compatibility - Completions are dynamically generated from
experimental_getWranglerCommands()API
- Uses
-
#11893
f9e8a45Thanks @NuroDev! -wrangler typesnow generates per-environment TypeScript interfaces when named environments exist in your configuration.When your configuration has named environments (an
envobject),wrangler typesnow generates both:- Per-environment interfaces (e.g.,
StagingEnv,ProductionEnv) containing only the bindings explicitly declared in each environment, plus inherited secrets - An aggregated
Envinterface with all bindings from all environments (top-level + named environments), where:- Bindings present in all environments are required
- Bindings not present in all environments are optional
- Secrets are always required (since they're inherited everywhere)
- Conflicting binding types across environments produce union types (e.g.,
KVNamespace | R2Bucket)
However, if your config does not contain any environments, or you manually specify an environment via
--env,wrangler typeswill continue to generate a single interface as before.Example:
Given the following
wrangler.jsonc:{ "name": "my-worker", "kv_namespaces": [ { "binding": "SHARED_KV", "id": "abc123" } ], "env": { "staging": { "kv_namespaces": [ { "binding": "SHARED_KV", "id": "staging-kv" }, { "binding": "STAGING_CACHE", "id": "staging-cache" } ] } } }Running
wrangler typeswill generate:declare namespace Cloudflare { interface StagingEnv { SHARED_KV: KVNamespace; STAGING_CACHE: KVNamespace; } interface Env { SHARED_KV: KVNamespace; // Required: in all environments STAGING_CACHE?: KVNamespace; // Optional: only in staging } } interface Env extends Cloudflare.Env {} - Per-environment interfaces (e.g.,
Patch Changes
-
#12030
614bbd7Thanks @jbwcloudflare! - Fixwrangler pages project validateto respect file count limits fromCF_PAGES_UPLOAD_JWT -
#11993
788bf78Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260116.0 1.20260120.0 -
#12039
1375577Thanks @dimitropoulos! - Fixed the flag casing for the time period flag for thed1 insightscommand. -
#12026
c3407adThanks @dario-piotrowicz! - Fixwrangler setupnot automatically selectingworkersas the target for new SvelteKit appsThe Sveltekit
adapter:cloudflareadapter now accepts two different targetsworkersorpages. Since the wrangler auto configuration only targets workers, wrangler should instruct the adapter to use theworkersvariant. (The auto configuration process would in any case not work if the user were to targetpages.) -
Updated dependencies [
788bf78,ae108f0]:- miniflare@4.20260120.0
- @cloudflare/unenv-preset@2.11.0
- @cloudflare/kv-asset-handler@0.4.2
4.59.3
Patch Changes
-
#9396
75386b1Thanks @gnekich! - Fixwrangler loginwith customcallback-host/callback-portThe Cloudflare OAuth API always requires the
redirect_urito belocalhost:8976. However, sometimes the Wrangler OAuth server needed to listen on a different host/port, for example when running from inside a container. We were previously incorrectly setting theredirect_urito the configured callback host/port, but it needs to be up to the user to maplocalhost:8976to the Wrangler OAuth server in the container.Example:
You might run Wrangler inside a docker container like this:
docker run -p 8989:8976 <image>, which forwards port 8976 on your host to 8989 inside the container.Then inside the container, run
wrangler login --callback-host=0.0.0.0 --callback-port=8989The OAuth link still has a
redirect_uriset tolocalhost:8976. For examplehttps://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&...However the redirect to
localhost:8976is then forwarded to the Wrangler OAuth server inside your container, allowing the login to complete. -
#11925
8e4a0e5Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260114.0 1.20260115.0 -
#11942
133bf95Thanks @penalosa! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260115.0 1.20260116.0 -
#11922
93d8d78Thanks @dario-piotrowicz! - Improve telemetry errors being sent to Sentry bywrangler initwhen it delegates to C3 by ensuring that they contain the output of the C3 execution. -
#11940
69ff962Thanks @penalosa! - Show helpful messages for file not found errors (ENOENT)When users encounter file not found errors, Wrangler now displays a helpful message with the missing file path and common causes, instead of reporting to Sentry.
-
#11904
22727c2Thanks @danielrs! - Fix false positive infinite loop detection for exact path redirectsFixed an issue where the redirect validation incorrectly flagged exact path redirects like
/ /index.html 200as infinite loops. This was particularly problematic whenhtml_handlingis set to "none", where such redirects are valid.The fix makes the validation more specific to only block wildcard patterns (like
/* /index.html) that would actually cause infinite loops, while allowing exact path matches that are valid in certain configurations.Fixes: https://github.com/cloudflare/workers-sdk/issues/11824
-
#11946
fa39a73Thanks @MattieTK! - FixconfigFileNamereturning wrong filename for.jsoncconfig filesPreviously, users with a
wrangler.jsoncconfig file would see error messages and hints referring towrangler.jsoninstead ofwrangler.jsonc. This was because theconfigFormatfunction collapsed both.jsonand.jsoncfiles into a single"jsonc"value, losing the distinction between them.Now
configFormatreturns"json"for.jsonfiles and"jsonc"for.jsoncfiles, allowingconfigFileNameto return the correct filename for each format. -
#11968
4ac7c82Thanks @MattieTK! - fix: include version components in command event metricsAdds
wranglerMajorVersion,wranglerMinorVersion, andwranglerPatchVersionto command events (wrangler command started,wrangler command completed,wrangler command errored). These properties were previously only included in adhoc events. -
#11940
69ff962Thanks @penalosa! - Improve error message when creating duplicate KV namespaceWhen attempting to create a KV namespace with a title that already exists, Wrangler now provides a clear, user-friendly error message instead of the generic API error. The new message explains that the namespace already exists and suggests running
wrangler kv namespace listto see existing namespaces with their IDs, or choosing a different namespace name. -
#11962
029531aThanks @dario-piotrowicz! - Cache chosen account in memory to avoid repeated promptsWhen users have multiple accounts and no
node_modulesdirectory exists for file caching, Wrangler (run vianpxand equivalent commands) would prompt for account selection multiple times during a single command. Now the selected account is also stored in process memory, preventing duplicate prompts and potential issues from inconsistent account choices. -
#11964
d58fbd1Thanks @dario-piotrowicz! - Makenamethe positional argument forwrangler deleteinstead ofscriptThe
scriptargument was meaningless for the delete command since it deletes by worker name, not by entry point path. Thenameargument is now accepted as a positional argument, allowing users to runwrangler delete my-workerinstead ofwrangler delete --name my-worker. Thescriptargument is now hidden but still accepted for backwards compatibility. -
#11967
202c59eThanks @emily-shen! - chore: update undiciThe following dependency versions have been updated:
Dependency From To undici 7.14.0 7.18.2 -
#11940
69ff962Thanks @penalosa! - Improve error handling for Vite config transformationsReplace assertions with proper error handling when transforming Vite configs. When Wrangler encounters a Vite config that uses a function or lacks a plugins array, it now provides clear, actionable error messages instead of crashing with assertion failures. The check function gracefully skips incompatible configs with debug logging.
-
Updated dependencies [
8e4a0e5,133bf95,202c59e,133bf95,25e2c60]:
4.59.2
Patch Changes
-
#11908
e78186dThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260111.0 1.20260114.0 -
#11880
fe4faa3Thanks @penalosa! - Show helpful messages for errors outside of Wrangler's control. This prevents unnecessary Sentry reports.Errors now handled with user-friendly messages:
- Connection timeouts to Cloudflare's API (
UND_ERR_CONNECT_TIMEOUT) - typically due to slow networks or connectivity issues - File system permission errors (
EPERM,EACCES) - caused by insufficient permissions, locked files, or antivirus software - DNS resolution failures (
ENOTFOUND) - caused by network connectivity issues or DNS configuration problems
- Connection timeouts to Cloudflare's API (
-
#11882
695b043Thanks @GregBrimble! - Improve the error message forwrangler secret putwhen using Worker versions or gradual deployments.wrangler versions secret putshould be used instead, or ensure to deploy the latest version before usingwrangler secret put.wrangler secret putalone will add the new secret to the latest version (possibly undeployed) and immediately deploy that which is usually not intended. -
Updated dependencies [
e78186d,fec8f5b,d39777f,4714ca1,c17e971]:- miniflare@4.20260114.0
- @cloudflare/unenv-preset@2.10.0
- @cloudflare/kv-asset-handler@0.4.2
4.59.1
Patch Changes
-
#11889
99b1f32Thanks @emily-shen! - Use argument array when executing git commands withwrangler pages deployPass user provided values from
--commit-hashsafely to underlying git command.
4.59.0
Minor Changes
-
#11852
ad65efaThanks @NuroDev! - Add--checkflag towrangler typescommandThe new
--checkflag allows you to verify that your generated types file is up-to-date without regenerating it. This is useful for CI/CD pipelines, pre-commit hooks, or any scenario where you want to ensure types have been committed after configuration changes.When types are up-to-date, the command exits with code 0:
$ wrangler types --check ✨ Types at worker-configuration.d.ts are up to date.When types are out-of-date, the command exits with code 1:
$ wrangler types --check ✘ [ERROR] Types at worker-configuration.d.ts are out of date. Run `wrangler types` to regenerate.You can also use it with a custom output path:
$ wrangler types ./custom-types.d.ts --check -
#11529
43d5363Thanks @matthewdavidrodgers! - Add ability to enable higher asset count limits for Pages deploymentsWrangler can now read asset count limits from JWT claims during Pages deployments, allowing users to be enabled for higher limits (up to 100,000 assets) on a per-account basis. The default limit remains at 20,000 assets.
-
#11755
0f8d69dThanks @nikitassharma! - Users can now specifyconstraints.tiersfor their container applications.tieris deprecated in favor oftiers. If left unset, we will default totiers: [1, 2]. Note thatconstraintsis an experimental feature.
Patch Changes
-
#11820
b0e54b2Thanks @MattieTK! - Add AI agent detection to analytics eventsWrangler now detects when commands are executed by AI coding agents (such as Claude Code, Cursor, GitHub Copilot, etc.) using the
am-i-vibinglibrary. This information is included as anagentproperty in all analytics events, helping Cloudflare understand how developers interact with Wrangler through AI assistants.The
agentproperty will contain the agent ID (e.g.,"claude-code","cursor-agent") when detected, ornullwhen running outside an agentic environment. -
#11494
ed60c4fThanks @jalmonter! - Fix scheduled trigger warning showingundefinedportWhen running
wrangler devwith a worker that has cron triggers, the warning message displayed an invalid URL likecurl "http://localhost:undefined/cdn-cgi/handler/scheduled"because the port wasn't yet determined when the warning was logged.Moved the warning to after the proxy server is fully ready, where the actual public URL and port are known.
-
#11831
faa5753Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260107.1 1.20260108.0 -
#11844
e574ef3Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260108.0 1.20260109.0 -
#11872
b6148edThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260109.0 1.20260111.0 -
#11843
ab3859cThanks @dario-piotrowicz! - Update the Wrangler autoconfig logic to work with the latest version of WakuThe latest version of Waku (
0.12.5-1.0.0-alpha.1-0) requires asrc/waku.server.tsxfile instead of asrc/server-entry.tsxone, so the Wrangler autoconfig logic (the logic being run as part ofwrangler setupandwrangler deploy --x-autoconfigthat configures a project to be deployable on Cloudflare) has been updated accordingly.Also the way the worker needs to handle static assets has been updated as recommended from the Waku team.
-
#11848
0eb973dThanks @petebacondarwin! - Fix incorrect warning about multiple environments when using redirected configPreviously, when using a redirected config (via
configPathin another config file) that originated from a config with multiple environments, wrangler would incorrectly warn about missing environment specification. This fix ensures the warning is only shown when the actual config being used has multiple environments defined, not when the original config did. -
Updated dependencies [
ed60c4f,5c59217,faa5753,e574ef3,b6148ed,beb96af,5c59217,fc96e5f]:- miniflare@4.20260111.0
- @cloudflare/unenv-preset@2.9.0
4.58.0
Minor Changes
-
#11728
7d63fa5Thanks @NuroDev! - Add command categories towranglerhelp menuThe help output now groups commands by product category (Account, Compute & AI, Storage & Databases, Networking & Security) to match the Cloudflare dashboard organization:
$ wrangler --help COMMANDS wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser ACCOUNT wrangler auth 🔓 Manage authentication wrangler login 🔑 Login to Cloudflare ... COMPUTE & AI wrangler ai 🤖 Manage AI models wrangler containers 📦 Manage Containers [open beta] ...This improves discoverability by organizing the 20+ wrangler commands into logical groups.
Patch Changes
-
#11822
97e67b9Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To workerd 1.20260103.0 1.20260107.1 -
Updated dependencies [
97e67b9]:
4.57.0
Minor Changes
-
#11682
b993d95Thanks @ascorbic! - Addwrangler auth tokencommand to retrieve your current authentication credentials.You can now retrieve your authentication token for use with other tools and scripts:
wrangler auth tokenThe command returns whichever authentication method is currently configured:
- OAuth token from
wrangler login(automatically refreshed if expired) - API token from
CLOUDFLARE_API_TOKENenvironment variable
Use
--jsonto get structured output including the token type, which also supports API key/email authentication:wrangler auth token --jsonThis is similar to
gh auth tokenin the GitHub CLI. - OAuth token from
-
#11702
f612b46Thanks @gpanders! - Add support for trusted_user_ca_keys in WranglerYou can now configure SSH trusted user CA keys for containers. Add the following to your wrangler.toml:
[[containers.trusted_user_ca_keys]] public_key = "ssh-ed25519 AAAAC3..."This allows you to specify CA public keys that can be used to verify SSH user certificates.
-
#11437
9e360f6Thanks @ichernetsky-cf! - Drop deprecated containersobservability.loggingfield -
#11616
fc95831Thanks @NuroDev! - Add type generation support towrangler devYou can now have your worker configuration types be automatically generated when the local Wrangler development server starts.
To use it you can either:
- Add the
--typesflag when runningwrangler dev. - Update your Wrangler configuration file to add the new
dev.generate_typesboolean property.
{ "$schema": "node_modules/wrangler/config-schema.json", "name": "example", "main": "src/index.ts", "compatibility_date": "2025-12-12", "dev": { "generate_types": true } } - Add the
-
#11524
b0dbf1aThanks @penalosa! - Add hidden CLI flags towrangler setupfor suppressing outputTwo new hidden flags have been added to
wrangler setup:--no-completion-message: Suppresses the deployment details message after setup completes--no-install-wrangler: Skips Wrangler installation during project setup
-
#11777
69979a3Thanks @MattieTK! - Add analytics properties to secret commands for better usage insightsSecret commands (
wrangler secret put,wrangler secret bulk, and their Pages/versions equivalents) now include additional analytics properties to help understand how secrets are being managed:secretOperation: Whether this is a "single" or "bulk" secret operationsecretSource: How the secret was provided ("interactive", "stdin", or "file")secretFormat: For bulk operations, the format used ("json" or "dotenv")hasEnvironment: Whether an environment was specified
These properties help improve the developer experience by understanding common usage patterns. No sensitive information (secret names, values, or counts) is tracked.
-
#11738
c54f8daThanks @jamesopstad! - Add defaultTextmodule rule for.sqlfiles.This enables importing
.sqlfiles directly in Wrangler and the Cloudflare Vite plugin without extra configuration. -
#11692
df1f9c9Thanks @dario-piotrowicz! - Support Waku in autoconfig -
#11549
d059f69Thanks @dario-piotrowicz! - Support Vike in autoconfig
Patch Changes
-
#11683
02fbd22Thanks @ascorbic! - Display a warning when authentication errors occur and theaccount_idin your Wrangler configuration does not match any of your authenticated accounts. This helps identify configuration issues where you may have the wrong account ID set in yourwrangler.tomlorwrangler.jsoncfile. -
#11704
77078efThanks @dario-piotrowicz! - Fix autoconfig handling of Next.js apps with CJS config files and incompatible Next.js versionsPreviously,
wrangler setupandwrangler deploy --x-autoconfigwould fail when working with Next.js applications that use CommonJS config files (next.config.cjs) or have versions of Next.js that don't match the required peer dependencies. The autoconfig process now uses dynamic imports and forced installation to handle these scenarios gracefully. -
#11796
2510723Thanks @dario-piotrowicz! -wrangler deploydelegates toopennextjs-cloudflare deployonly when the--x-autoconfigflag is usedThe
wrangler deploycommand has been updated to delegate to theopennextjs-cloudflare deploycommand when run in an open-next project. Once this behavior had been introduced it caused a few issues. So it's been decided to enable it for the time being only when the--x-autoconfigflag is set (since this behavior, although generally valid, is only strictly necessary for thewrangler deploy's autoconfig flow). -
#11764
9f6dd71Thanks @terakoya76! - Fix R2 Data Catalog snapshot-expiration API field namesThe
wrangler r2 bucket catalog snapshot-expiration enablecommand was sending incorrect field names to the Cloudflare API, resulting in a 422 Unprocessable Entity error. This fix updates the API request body to use the correct field names:olderThanDays->max_snapshot_age(as duration string, e.g., "30d")retainLast->min_snapshots_to_keep
The CLI options (
--older-than-daysand--retain-last) remain unchanged. -
#11651
d123ad0Thanks @dario-piotrowicz! - Surface a more helpful error message for TOML Date, Date-Time, and Time values invarsTOML parses unquoted date/time values like
DATE = 2024-01-01as objects. Previously this would cause an unhelpful error message further down the stack. Now wrangler surfaces a more helpful error message earlier, telling you to quote the value as a string, e.g.DATE = "2024-01-01". -
#11711
5121b23Thanks @southpolesteve! - Show an error when D1 migration commands are run without a configuration filePreviously, running
wrangler d1 migrations apply,wrangler d1 migrations list, orwrangler d1 migrations createin a directory without a Wrangler configuration file would silently exit with no feedback. Now these commands display a clear error message:"No configuration file found. Create a wrangler.jsonc file to define your D1 database."
-
#11710
82e7e90Thanks @dario-piotrowicz! - Fix arguments passed towrangler deploynot being forwarded toopennextjs-cloudflare deploywrangler deployrun in an open-next project delegates toopennextjs-cloudflare deploy, as part of this all the arguments passed towrangler deployneed be forwarded toopennextjs-cloudflare deploy, before the arguments would be lost, now they will be successfully forwarded (for examplewrangler deploy --keep-varswill callopennextjs-cloudflare deploy --keep-vars) -
#10750
4688f59Thanks @jacoblearned! - Notify user on local dev server reload.When running
wrangler dev, the local server suppresses Miniflare's reload messages to prevent duplicate log entries from the proxy and user workers. This update adds a reload complete message so users know their changes were applied, instead of only seeing "Reloading local server...". -
#11673
b827893Thanks @MattieTK! - Breaks out version numbers into sortable number types for analytics logging -
Updated dependencies [
65d1850,1615fce,b2769bf,554a4df,8eede3f,6a05b1c,62fd118,a7e9f80,eac5cf7]:- miniflare@4.20260103.0
- @cloudflare/unenv-preset@2.8.0
4.56.0
Minor Changes
-
#11196
171cfd9Thanks @emily-shen! - For containers being created in a FedRAMP high environment, registry credentials are encrypted by the container platform. Update wrangler to correctly send a request to configure a registry for FedRAMP containers. -
#11646
472cf72Thanks @vovacf201! - feat: add R2 Data Catalog snapshot expiration commandsAdds new commands to manage automatic snapshot expiration for R2 Data Catalog tables:
wrangler r2 bucket catalog snapshot-expiration enable- Enable automatic snapshot expirationwrangler r2 bucket catalog snapshot-expiration disable- Disable automatic snapshot expiration
Snapshot expiration helps manage storage costs by automatically removing old table snapshots while keeping a minimum number of recent snapshots for recovery purposes.
Example usage:
# Enable snapshot expiration for entire catalog (keep 10 snapshots, expire after 5 days) wrangler r2 bucket catalog snapshot-expiration enable my-bucket --token $R2_CATALOG_TOKEN --max-age 7200 --min-count 10 # Enable for specific table wrangler r2 bucket catalog snapshot-expiration enable my-bucket my-namespace my-table --token $R2_CATALOG_TOKEN --max-age 2880 --min-count 5 # Disable snapshot expiration wrangler r2 bucket catalog snapshot-expiration disable my-bucket
Patch Changes
-
#11649
428ae9eThanks @ascorbic! - fix: respect TypeScript path aliases when resolving non-JS modules with module rulesWhen importing non-JavaScript files (like
.graphql,.txt, etc.) using TypeScript path aliases defined intsconfig.json, Wrangler's module-collection plugin now correctly resolves these imports. Previously, path aliases were only respected for JavaScript/TypeScript files, causing imports likeimport schema from '~lib/schema.graphql'to fail when using module rules. -
#11647
c0e249eThanks @dario-piotrowicz! - The auto-configuration logic present inwrangler setupandwrangler deploy --x-autoconfigcannot reliably handle Hono projects, so in these cases make sure to properly error saying that automatically configuring such projects is not supported. -
#11694
3853200Thanks @dario-piotrowicz! - fix: improve the open-next detection thatwrangler deployperforms to eliminate false positives for non open-next projects
4.55.0
Minor Changes
-
#11301
6c590a0Thanks @dario-piotrowicz! - Makewrangler deployrunopennextjs-cloudflare deploywhen executed in an open-next project -
#11045
12a63efThanks @edmundhung! - Add an internalunstable_printBindingsAPI for vite plugin integration -
#11590
7d8d4a6Thanks @pombosilva! - Add Workflows send-event to wrangler commands. -
#11301
6c590a0Thanks @dario-piotrowicz! - Support Next.js (via OpenNext) projects in autoconfig
Patch Changes
-
#11615
ed42010Thanks @elithrar! - Add helpful warning when SSL certificate errors occur due to corporate proxies or VPNs intercepting HTTPS traffic. When errors like "self-signed certificate in certificate chain" are detected, wrangler now displays guidance about installing missing system roots from your corporate proxy vendor. -
#11641
6b28de1Thanks @petebacondarwin! - update command status text and formatting -
#11578
4201472Thanks @gpanders! - Fixup UX papercuts in containers SSH -
#11550
95d81e1Thanks @hiendv! - Fix "TypeError: Body is unusable: Body has already been read" when failing to exchange oauth code because of doubleresponse.text().
4.54.0
Minor Changes
-
#11512
c15e99eThanks @emily-shen! - Enable usingctx.exportswith containersYou can now use containers with Durable Objects that are accessed via
ctx.exports.Now your config file can look something like this:
{ "name": "container-app", "main": "src/index.ts", "compatibility_date": "2025-12-01", "compatibility_flags": ["enable_ctx_exports"], // compat flag needed for now. "containers": [ { "image": "./Dockerfile", "class_name": "MyDOClassname", "name": "my-container" }, ], "migrations": [ { "tag": "v1", "new_sqlite_classes": ["MyDOClassname"], }, ], // no need to declare your durable object binding here }Note that when using
ctx.exports, where you previously accessed a Durable Object via something likeenv.DO, you should now access withctx.exports.MyDOClassname.Refer to the docs for more information on using
ctx.exports. -
#11508
b17797cThanks @dario-piotrowicz! - Wrangler will no longer try to add additional configuration to projects using@cloudflare/vite-pluginwhen deploying or runningwrangler setup -
#11508
b17797cThanks @dario-piotrowicz! - When a Vite project is detected, install@cloudflare/vite-plugin -
#11576
bb47e20Thanks @dario-piotrowicz! - Support Analog projects in autoconfig -
#10582
991760dThanks @flakey5! - Addcontainers sshcommand
Patch Changes
-
#11467
235d325Thanks @edmundhung! - fix: prevent reporting SQLite error fromwrangler d1 executeto Sentry -
#11414
41103f5Thanks @petebacondarwin! - add extra logging to user log-in flow for diagnosing failed login requests -
#11559
ea6fbecThanks @nikitassharma! - Remove image validation for containers on wrangler deploy.Internal customers are able to use additional image registries and will run into failures with this validation. Image registry validation will now be handled by the API.
4.53.0
Minor Changes
-
#11500
af54c63Thanks @dario-piotrowicz! - Add newautoconfig_summaryfield to the deploy output entryThis change augments
wrangler deployoutput being printed toWRANGLER_OUTPUT_FILE_DIRECTORYorWRANGLER_OUTPUT_FILE_PATHto also include a newautoconfig_summaryfield containing the possible summary details for the autoconfig process (the field isundefinedif autoconfig didn't run).Note: the field is experimental and could change while autoconfig is not GA
-
#11477
9988cc9Thanks @ascorbic! - Support Nuxt in autoconfig -
#11472
ce295bfThanks @dario-piotrowicz! - Support Qwik projects in autoconfig -
#10937
9514c9aThanks @ReppCodes! - Add support for "targeted" placement mode with region, host, and hostname fieldsThis change adds a new mode to
placementconfiguration. You can specify one of the following fields to target specific external resources for Worker placement:region: Specify a region identifier (e.g., "aws:us-east-1") to target a region from another cloud service providerhost: Specify a host with (required) port (e.g., "example.com:8123") to target a TCP servicehostname: Specify a hostname (e.g., "example.com") to target an HTTP resource
These fields are mutually exclusive - only one can be specified at a time.
Example configuration:
[placement] host = "example.com:8123" -
#11498
ac861f8Thanks @penalosa! - Add React Router support in autoconfig -
#11506
79d30d4Thanks @vicb! - Set the target JS version to ES2024
Patch Changes
-
#11393
45480b1Thanks @alsuren! - improved --help text for wrangler d1 subcommands -
#11523
94c67e8Thanks @jamesopstad! - fix: types from @cloudflare/workers-utils not being exported correctly from Wrangler -
#11483
f550b62Thanks @edmundhung! - stop runningnpm installwith--legacy-peer-depsflag when setting up a project -
Updated dependencies [
819e287,56e78c8,0aa959a]:- @cloudflare/unenv-preset@2.7.13
- miniflare@4.20251202.1
4.52.1
Patch Changes
-
#11504
7e80340Thanks @dario-piotrowicz! - Fixwrangler deployfailing for new workers containing environment variables or bindings -
Updated dependencies [
59534ba]:
4.52.0
Minor Changes
-
#11416
abe49d8Thanks @dario-piotrowicz! - Remove thewrangler deploy's--x-remote-diff-checkexperimental flagThe remote diffing feature has been enabled by default for a while and its functionality is stable, as a result the experimental flag (only available for option-out of the feature right now) has been removed.
-
#11408
f29e699Thanks @ascorbic! - Export unstable helpers useful for generating wrangler config -
#11389
2342d2fThanks @dario-piotrowicz! - Improve thewrangler deployflow to also check for potential overrides of secrets.Now when you run
wrangler deployWrangler will check the remote secrets for your workers for conflicts with the names of the bindings you're about to deploy. If there are conflicts, Wrangler will warn you and ask you for your permission before proceeding. -
#11375
9a1de61Thanks @penalosa! - Support TanStack Start in autoconfig -
#11360
6b38532Thanks @emily-shen! - Containers: Allow users to directly authenticate external image registries in local devPreviously, we always queried the API for stored registry credentials and used those to pull images. This means that if you are using an external registry (ECR, dockerhub) then you have to configure registry credentials remotely before running local dev.
Now you can directly authenticate with your external registry provider (using
docker loginetc.), and Wrangler or Vite will be able to pull the image specified in thecontainers.imagefield in your config file.The Cloudflare-managed registry (registry.cloudflare.com) currently still does not work with the Vite plugin.
-
#11009
e4ddbc2Thanks @dario-piotrowicz! - Allow users to provide anaccount_idas part of theWorkerConfigObjectthey pass tomaybeStartOrUpdateRemoteProxySession -
#11478
2aec2b4Thanks @dario-piotrowicz! - Support SolidStart in autoconfig -
#11330
5a873bbThanks @dario-piotrowicz! - Support Angular projects in autoconfig -
#11449
e7b690bThanks @penalosa! - Delegate generation of HTTPS certificates to Miniflare -
#11448
2b4813bThanks @edmundhung! - Bumpsesbuildversion to 0.27.0 -
#11335
c47ad11Thanks @dario-piotrowicz! - Support internal-only undocumentedcross_account_grantservice binding property -
#11346
a977701Thanks @penalosa! - We're soon going to make backend changes that mean thatwrangler dev --remotesessions will no longer have an associated inspector connection. In advance of these backend changes, we've enabled a newwrangler tail-based logging strategy forwrangler dev --remote. For now, you can revert to the previous logging strategy withwrangler dev --remote --no-x-tail-logs, but in future it will not be possible to revert.The impact of this will be that logs that were previously available via devtools will now be provided directly to the Wrangler console and it will no longer be possible to interact with the remote Worker via the devtools console.
Patch Changes
-
#11397
b154de2Thanks @vicb! - Use more workerd native modulesNode modules
punycode,trace_events,cluster,wasi, anddomainswill be used when enabled via a compatibility flag or by default when the compatibility date is greater or equal to 2025-12-04. -
#11452
76f0540Thanks @penalosa! - Remove uses ofeval()from the Wrangler bundle -
#11284
695fa25Thanks @dom96! - Removes duplicate module warnings when vendoring Python packages -
#11249
504e258Thanks @dario-piotrowicz! - fix: Generalize autoconfig wordingGeneralize the autoconfig wording so that when it doesn't specifically mention "deployment" (since it can be run via
wrangler setupor the autoconfig programmatic API) -
#11455
d25f7e2Thanks @dario-piotrowicz! - Fix autoconfig using absolute paths for static projectsRunning the experimental autoconfig logic through
wrangler setupandwrangler deploy --x-autoconfigon a static project results in absolute paths being used. This is incorrect, especially when such paths are being included in the generated wrangler.jsonc. The changes here fix the autoconfig logic to use paths relative to the project's root instead.For example given a project located in
/Users/usr/projects/sites/my-static-site, before:// wrangler.jsonc at /Users/usr/projects/sites/my-static-site { "$schema": "node_modules/wrangler/config-schema.json", "name": "static", "compatibility_date": "2025-11-27", "observability": { "enabled": true }, "assets": { "directory": "/Users/usr/projects/sites/my-static-site/public" } }and after:
// wrangler.jsonc at /Users/usr/projects/sites/my-static-site { "$schema": "node_modules/wrangler/config-schema.json", "name": "static", "compatibility_date": "2025-11-27", "observability": { "enabled": true }, "assets": { "directory": "public" } } -
#11484
1cfae2dThanks @edmundhung! - Explicitly close FileHandle inwrangler d1 executeto support Node 25 -
#11383
1d685cbThanks @dario-piotrowicz! - Fix: ensure that when a remote proxy session creation fails a hard error is surfaced to the user (both inwrangler devand in the programmatic API).When using remote bindings, either with
wrangler devor viastartRemoteProxySession/maybeStartOrUpdateRemoteProxySessionthe remote proxy session necessary to connect to the remote resources can fail to be created, this might happen if for example you try to set a binding with some invalid values such as:MY_R2: { type: "r2_bucket", bucket_name: "non-existent", // No bucket called "non-existent" exists remote: true, },Before this could go undetected and cause unwanted behaviors such as requests handling hanging indefinitely, now wrangler will instead crash (or throw a hard error ion the programmatic API), clearly indicating that something went wrong during the remote session's creation.
-
#11366
edf896dThanks @ascorbic! - Use correctly-formatted names when displaying detected framework details -
#11461
9eaa9e2Thanks @dario-piotrowicz! - Update the structure of theconfiguremethod of autoconfig frameworksUpdate the signature of the
configurefunction of autoconfig frameworks (AutoconfigDetails#Framework), before they would return aRawConfigobject to use to update the project's wrangler config file, now they return an object that includes theRawConfigand that can potentially also hold additional data relevant to the configuration. -
Updated dependencies [
2b4813b,b154de2,5ee3780,6e63b57,71ab562,5e937c1]:- miniflare@4.20251128.0
- @cloudflare/unenv-preset@2.7.12
4.51.0
Minor Changes
-
#11345
d524e55Thanks @penalosa! - Enable experimental support for autoconfig-powered Astro projects -
#11228
43903a3Thanks @petebacondarwin! - SupportCLOUDFLARE_ENVenvironment variable for selecting the active environmentThis change enables users to select the environment for commands such as
CLOUDFLARE_ENV=prod wrangler versions upload. The--envcommand line argument takes precedence.The
CLOUDFLARE_ENVenvironment variable is mostly used with the@cloudflare/vite-pluginto select the environment for building the Worker to be deployed. This build also generates a "redirected deploy config" that is flattened to only contain the active environment. To avoid accidentally deploying a version that is built for one environment to a different environment, there is an additional check to ensure that if the user specifies an environment in Wrangler it matches the original selected environment from the build.
Patch Changes
-
Updated dependencies [
4d61fae,69f4dc3,1133c4d,4d61fae]:- @cloudflare/kv-asset-handler@0.4.1
- miniflare@4.20251125.0
4.50.0
Minor Changes
-
#11219
524a6e5Thanks @Ltadrian! - Implement Hyperdrive binding TLS miniflare proxy. This will allow for wrangler dev hyperdrive bindings to connect to external databases that require TLS. -
#11233
c922a81Thanks @emily-shen! - Addcontainers.unsafeto allow internal users to use additional container features
Patch Changes
-
#11353
0cf696dThanks @vicb! - Use the nativenode:domainmodule when availableIt is enabled when the
enable_nodejs_domain_modulecompatibility flag is set. -
#11328
bb44120Thanks @ascorbic! - Fixes a bug that causedwrangler deployto hang when deploying SvelteKit sites with experimental autoconfig -
#11025
4a158e9Thanks @devin-ai-integration! - Use the nativenode:wasimodule when availableIt is enabled when the
enable_nodejs_wasi_modulecompatibility flag is set. -
Updated dependencies [
0cf696d,524a6e5,4a158e9]:- @cloudflare/unenv-preset@2.7.11
- miniflare@4.20251118.1
4.49.1
Patch Changes
-
#11344
c758809Thanks @dario-piotrowicz! - Fix: mark ther2 bulkcommand as hidden and experimental -
#11339
dfba912Thanks @dario-piotrowicz! - Fixwrangler deployerroring when it pulls down remote configs of workers containing an assets binding -
Updated dependencies [
e5ec8cf]:
4.49.0
Minor Changes
-
#10703
c5c4ee5Thanks @danlapid! - Add support for streaming tail consumers in local dev. This is an experimental new feature that allows you to register atailStream()handler (compared to the existingtail()handler), which will receive streamed tail events from your Worker (compared to thetail()handler, which only receives batched events after your Worker has finished processing). -
#11251
7035804Thanks @penalosa! - When theWRANGLER_HIDE_BANNERenvironment variable is provided, Wrangler will no longer display a version banner. This applies to all commands.For instance, previously running
wrangler docswould give the following output:> wrangler docs ⛅️ wrangler 4.47.0 ─────────────────── Opening a link in your default browser: https://developers.cloudflare.com/workers/wrangler/commands/With
WRANGLER_HIDE_BANNER, this is now:> WRANGLER_HIDE_BANNER=true wrangler docs Opening a link in your default browser: https://developers.cloudflare.com/workers/wrangler/commands/ -
#11285
d014fa7Thanks @vicb! - Implement thewrangler r2 bulk put bucket-name --filename list.jsoncommand.The command uploads multiple objects to an R2 bucket.
The list of object is provided as a JSON encoded file via
--filename. It is a list of key and file (respectively the name and the content for the object).[ { "key": "/path/to/obj", "file": "/path/to/file_1"}, { "key": "/path/to/other/obj", "file": "/path/to/file_2"}, // ... ]Uploads are executed concurrently and the level of concurrency can be set via
--concurrency.The command supports the same options as
wrangler r2 object put, minus--file, and--pipeand plus--concurrency -
#11268
15b8460Thanks @penalosa! - Support SvelteKit projects in autoconfig -
#11258
2011b6aThanks @dario-piotrowicz! - Add--dry-runflag towrangler setupand also adryRunoption torunAutoConfig
Patch Changes
-
#11261
a352c7fThanks @petebacondarwin! - Avoid using object lookup for OAuth Error classes -
#11286
8e99766Thanks @dario-piotrowicz! - fix: make sure thatexperimental_patchConfigdoesn't throw if it encounters anullvalue -
#11278
92afbbaThanks @ascorbic! - Fixes a bug that caused.dev.varsto be ignored in OpenNext -
#11244
65b4afeThanks @petebacondarwin! - Internal refactoring to improve error traceability in wrangler dev -
#11238
da8442fThanks @jamesopstad! - Addunstable_getDurableObjectClassNameToUseSQLiteMapexport. This is an internal function for use in the Vite plugin. -
#11266
09cb720Thanks @penalosa! - Use the smol-toml library for parsing TOML instead of @iarna/toml -
#11236
793e2b4Thanks @ascorbic! - Refresh expired preview tokens when running in remote dev mode -
#11286
8e99766Thanks @dario-piotrowicz! - fix:wrangler deployfailing to patch localwrangler.jsoncfiles if the remotetail_consumersvalue isnull -
#11275
9cbf126Thanks @dario-piotrowicz! - Ensure thatwrangler deployrun with a positional argument or with--assetsdoes not trigger the autoconfig process (even with--experimental-autoconfig) -
#11242
dd1e560Thanks @dario-piotrowicz! - Fix: make sure that remote proxy sessions's debug logs are enabled when the wrangler log level is set to "debug"
4.48.0
Minor Changes
-
#11212
3908162Thanks @dario-piotrowicz! - Add autoconfig changes summary forwrangler deploy --x-autoconfigwith the option for users to cancel the operation -
#11229
14d79f2Thanks @dario-piotrowicz! - Enablesexperimental-deploy-remote-diff-checkflag by default (the flag is still present for now so that users can turn it off if needed) and improves the remote config diffing logic (to include less noise in the diff presented to the user) -
#11245
dfc6513Thanks @vicb! - Change how Wrangler selects default ports for dev sessions.If no port is specified, Wrangler now probes the default port and the 10 consecutive ports after it before falling back to a random port. This will help getting a stable port number across dev sessions. Both the http server and inspector ports are affected.
Patch Changes
4.47.0
Minor Changes
-
#11201
5286309Thanks @avenceslau! - Add wrangler workflows instances restart command -
#11214
5cf8a39Thanks @penalosa! - Add the experimentalwrangler setupcommand to run autoconfig outside of the deploy flow. -
#11187
8abc789Thanks @dario-piotrowicz! - Add possibility for users to edit their project settings during autoconfigWhen running
wrangler deploy --experimental-autoconfig, after the automatic project settings detection Wrangler will now present users the opportunity to customize the auto-detected project's settings
Patch Changes
-
#11143
2d16610Thanks @FlorentCollin! - Improve the formatting of the D1 execute command to always show the duration in milliseconds with two decimal places. -
#11178
63defa2Thanks @ascorbic! - Log a more helpful error when attempting to "r2 object put" a non-existent file -
#11199
70d3d4aThanks @penalosa! - Add telemetry to autoconfig -
#11186
38396edThanks @hoodmane! - Removed warning when deploying a Python worker -
#11024
cdcecfcThanks @devin-ai-integration! - Use the nativenode:trace_eventsmodule when availableIt is enabled when the
enable_nodejs_trace_events_modulecompatibility flag is set. -
#11195
e85f965Thanks @ascorbic! - Ignores.dev.varsif--env-filehas been explicitly passedPreviously,
.dev.varswould always be read first, and then any file passed with--env-filewould override variables in.dev.vars. This meant there was no way to ignore.dev.varsif you wanted to use a different env file. Now, if--env-fileis passed,.dev.varswill be ignored entirely. -
#11181
88aa707Thanks @petebacondarwin! - add more logging around Wrangler authentication to help diagnose issues -
Updated dependencies [
dd7d584,4259256,cdcecfc]:- miniflare@4.20251109.0
- @cloudflare/unenv-preset@2.7.10
4.46.0
Minor Changes
-
#11183
240ebebThanks @dario-piotrowicz! - exposeexperimental_getDetailsForAutoConfigandexperimental_runAutoConfigAPIs that provide respectively the autoconfig detection and execution functionalities -
#11180
53b0fceThanks @penalosa! - Detect non-framework static sites -
#11162
c3ed531Thanks @dario-piotrowicz! - add aremoteBindingsoption togetPlatformProxyto allow the disabling of remote bindings -
#11164
305d7bfThanks @penalosa! - Implement experimental autoconfig flow for static sites -
#10605
b55a3c7Thanks @emily-shen! - Add command to configure credentials for non-Cloudflare container registriesNote this is a closed/experimental command that will not work without the appropriate account-level capabilities.
-
#11078
5d7c4c2Thanks @simonha9! - Add jurisdiction support to d1 db creation via command-line argument
Patch Changes
-
#11160
05440a1Thanks @dario-piotrowicz! - Allows auto-update of the local Wrangler configuration file to match remote configuration when runningwrangler deploy --env <TARGET_ENV>When running
wrangler deploy, with--x-remote-diff-checkand after cancelling the deployment due to destructive changes present in the local config file, Wrangler offers to update the Wrangler configuration file to match the remote configuration. This wasn't however enabled when a target environment was specified (via the--env|-eflag). Now this will also apply when an environment is targeted. -
#11162
c3ed531Thanks @dario-piotrowicz! - Update the description of the--localflag for thewrangler devcommand to clarify that it disables remote bindings, also un-deprecate and un-hide it -
#11162
c3ed531Thanks @dario-piotrowicz! - Fix bindings withremote: truebeing logged asremotewhen run viawrangler dev --local -
Updated dependencies [
1ae020d]:
4.45.4
Patch Changes
-
#11133
8ffbd17Thanks @petebacondarwin! - Reduce the amount of arguments being passed in metrics capture.Now the argument values that are captured come from an allow list, and can be marked as ALLOW (capture the real value) or REDACT (capture as "").
-
#11033
77ed7e2Thanks @dario-piotrowicz! - Offer to update the local Wrangler configuration file to match remote configuration when runningwrangler deployWhen running
wrangler deploy, with--x-remote-diff-check, Wrangler will display the difference between local and remote configuration. If there would be a destructive change to the remote configuration, the user is given the option to cancel the deployment. In the case where the user does cancel deployment, Wrangler will now also offer to update the local Wrangler configuration file to match the remote configuration. -
#11139
bb00f9dThanks @devin-ai-integration! - Updated cron trigger documentation links and improved error message to include instructions for testing cron triggers locally -
#11135
ed666a1Thanks @penalosa! - Implement tail-based logging forwrangler devremote mode, behind the--x-tail-tagsflag. This will become the default in the future. -
#11149
22f25fdThanks @penalosa! - Add no-op autoconfig logic behind an experimental flag -
Updated dependencies [
90a2566,14f60e8]:- @cloudflare/unenv-preset@2.7.9
- miniflare@4.20251011.2
4.45.3
Patch Changes
-
#11117
6822aafThanks @emily-shen! - fix: show local/remote status before D1 command confirmationsD1 commands (
execute,export,migrations apply,migrations list,delete,time-travel) now display whether they're running against local or remote databases before showing confirmation prompts. This prevents confusion about which database will be affected by the operation. -
#11077
bce8142Thanks @petebacondarwin! - Ensure that process.env is case-insensitive on WindowsThe object that holds the environment variables in
process.envdoes not care about the case of its keys in Windows. For example,process.env.SystemRootandprocess.env.SYSTEMROOTwill refer to the same value.Previously, when merging fields from
.envfiles we were replacing this native object with a vanilla JavaScript object, that is case-insensitive, and so sometimes environment variables appeared to be missing when in reality they just had different casing.
4.45.2
Patch Changes
-
#11097
55657ebThanks @penalosa! - Extract internal APIs into a new@cloudflare/workers-utilspackage -
#11118
d47f166Thanks @zebp! - Fix validation of thepersistfield of observabilitylogsandtracesconfiguration
4.45.1
Patch Changes
-
#10959
d0208feThanks @devin-ai-integration! - Fixed conflict between--envand--expiresflags inwrangler r2 object put.--enow aliases--envonly, and NOT--expires. -
#10915
dbe51c1Thanks @devin-ai-integration! - Fixed self-bindings (service bindings to the same worker) showing as [not connected] in wrangler dev. Self-bindings now correctly show as [connected] since a worker is always available to itself. -
#10913
d4f2dafThanks @devin-ai-integration! - Fixed duplicate warning messages appearing during wrangler dev when configuration changes or state transitions occur
4.45.0
Minor Changes
-
#11030
1a8088aThanks @penalosa! - Enable automatic resource provisioning by default in Wrangler. This is still an experimental feature, but we're turning on the flag by default to make it easier for people to test it and try it out. You can disable the feature using the--no-x-provisionflag. It currently works for R2, D1, and KV bindings.To use this feature, add a binding to your config file without a resource ID:
{ "kv_namespaces": [{ "binding": "MY_KV" }], "d1_databases": [{ "binding": "MY_DB" }], "r2_buckets": [{ "binding": "MY_R2" }] }wrangler devwill automatically create these resources for you locally, and when you next runwrangler deployWrangler will call the Cloudflare API to create the requested resources and link them to your Worker. They'll stay linked across deploys, and you don't need to add the resource IDs to the config file for future deploys to work. This is especially good for shared templates, which now no longer need to include account-specific resource ID when adding a binding.
Patch Changes
-
#11037
4bd4c29Thanks @danielrs! - Better Wrangler subdomain defaults warning.Improves the warnings that we show users when either
worker_devorpreview_urlsare missing. -
#10927
31e1330Thanks @dom96! - Implementspython_modules.excludeswrangler config field[python_modules] excludes = ["**/*.pyc", "**/__pycache__"] -
#10741
2f57345Thanks @penalosa! - Remove obsolete--x-remote-bindingsflag -
Updated dependencies [
ca6c010]:
4.44.0
Minor Changes
-
#10939
d4b4c90Thanks @danielrs! - Configpreview_urlsdefaults toworkers_devvalue.Originally, we were defaulting config.preview_urls to
true, but we were accidentally enabling Preview URLs for users that only had config.workers_dev=false.Then, we set the default value of config.preview_urls to
false, but we were accidentally disabling Preview URLs for users that only had config.workers_dev=true.Rather than defaulting config.preview_urls to
trueorfalse, we default to the resolved value of config.workers_dev. Should result in a clearer user experience. -
#11027
1a2bbf8Thanks @jamesopstad! - Statically replace the value ofprocess.env.NODE_ENVwithdevelopmentfor development builds andproductionfor production builds if it is not set. Else, use the given value. This ensures that libraries, such as React, that branch code based onprocess.env.NODE_ENVcan be properly tree shaken. -
#9705
0ee1a68Thanks @hiendv! - Add params type to Workflow type generation. E.g.interface Env { MY_WORKFLOW: Workflow< Parameters<import("./src/index").MyWorkflow["run"]>[0]["payload"] >; } -
#10867
dd5f769Thanks @austin-mc! - Add media binding support
Patch Changes
-
#11018
5124818Thanks @dario-piotrowicz! - Improve potential errors thrown bystartRemoteProxySessionby including more information -
#11019
6643bd4Thanks @dario-piotrowicz! - Fixobservability.logs.persistbeing flagged as an unexpected field during the wrangler config file validation -
#10768
8211bc9Thanks @dario-piotrowicz! - Update logs handling to use the newhandleStructuredLogsminiflare option -
#10997
3bb034fThanks @nikitassharma! - When either WRANGLER_OUTPUT_FILE_PATH or WRANGLER_OUTPUT_FILE_DIRECTORY are set in the environment, then command failures will append a line to the output file encoding the error code and message, if present. -
#10986
43503c7Thanks @emily-shen! - fix: cleanup any running containers again on wrangler dev exit -
#11000
a6de9dbThanks @jonboulle! - always load container image into local store during buildBuildKit supports different build drivers. When using the more modern
docker-containerdriver (which is now the default on some systems, e.g. a standard Docker installation on Fedora Linux), it will not automatically load the built image into the local image store. Since wrangler expects the image to be there (e.g. when callinggetImageRepoTags), it will thus fail, e.g.:⎔ Preparing container image(s)... [+] Building 0.3s (8/8) FINISHED docker-container:default [...] WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load ✘ [ERROR] failed inspecting image locally: Error response from daemon: failed to find image cloudflare-dev/sandbox:f86e40e4: docker.io/cloudflare-dev/sandbox:f86e40e4: No such imageExplicitly setting the
--loadflag (equivalent to-o type=docker) during the build fixes this and should make the build a bit more portable without requiring users to change their default build driver configuration. -
#10994
d39c8b5Thanks @pombosilva! - Make Workflows instances list command cursor based -
#10892
7d0417bThanks @dario-piotrowicz! - improve the diffing representation forwrangler deploy(run under--x-remote-diff-check) -
Updated dependencies [
36d7054,dd5f769,ee7d710,8211bc9]:- miniflare@4.20251011.0
- @cloudflare/unenv-preset@2.7.8
4.43.0
Minor Changes
- #10911
940b44dThanks @devin-ai-integration! - feat:wrangler init --from-dashnow generateswrangler.jsoncconfig files instead ofwrangler.tomlfiles
Patch Changes
-
#10938
e52d0ecThanks @penalosa! - Acquire Cloudflare Access tokens for additional requests made during awrangler dev --remotesession -
#10923
2429533Thanks @emily-shen! - fix: updatedocker manifest inspectto use full image registry uri when checking if the image exists remotely -
#10521
88b5b7fThanks @penalosa! - Improves the Wrangler auto-provisioning feature (gated behind the experimental flag--x-provision) by:- Writing back changes to the user's config file (not necessary, but can make it resilient to binding name changes)
- Fixing
--dry-run, which previously threw an error when your config file had auto provisioned resources - Improve R2 bindings display to include the
bucket_namefrom the config file on upload - Fixing bindings view for specific versions to not display TOML
4.42.2
Patch Changes
-
#10881
ce832d5Thanks @garvit-gupta! - Add table-level compaction commands for R2 Data Catalog:wrangler r2 bucket catalog compaction enable <bucket> [namespace] [table]wrangler r2 bucket catalog compaction disable <bucket> [namespace] [table]
This allows you to enable and disable automatic file compaction for a specific R2 data catalog table.
-
#10888
d0ab919Thanks @lrapoport-cf! - Clarify thatwrangler check startupgenerates a local CPU profile
4.42.1
Patch Changes
-
#10865
26adce7Thanks @WillTaylorDev! - Respect keep_vars for wrangler versions upload. -
#10833
196ccbfThanks @cmackenzie1! - Validate Pipeline entity names in Wrangler config before sending to the API. -
#10856
1334102Thanks @anonrig! - Removes unnecessary calls to "node:os" -
Updated dependencies [
51f9dc1,f29b0b0,1334102]:- miniflare@4.20251004.0
- @cloudflare/unenv-preset@2.7.7
4.42.0
Minor Changes
- #10735
103fbf0Thanks @petebacondarwin! - Allow WRANGLER_SEND_ERROR_REPORTS env var to override whether to report Wrangler crashes to Sentry
Patch Changes
-
#10757
59d5911Thanks @dario-piotrowicz! - fixconsole.debuglogs not being logged at theinfolevel (as users expect) -
Updated dependencies [
2594130]:- @cloudflare/unenv-preset@2.7.6
4.41.0
Minor Changes
-
#10507
21a0befThanks @dario-piotrowicz! - Add strict mode for thewrangler deploycommandAdd a new flag:
--strictthat makes thewrangler deploycommand be more strict and not deploy workers when the deployment could be potentially problematic. This "strict mode" currently only affects non-interactive sessions where conflicts with the remote settings for the worker (for example when the worker has been re-deployed via the dashboard) will cause the deployment to fail instead of automatically overriding the remote settings. -
#10710
7f2386eThanks @penalosa! - Add prompt to resource creation flow allowing for newly created resources to be remote.
Patch Changes
-
#10822
4c06766Thanks @edmundhung! - fix: skip banner when using--jsonflag inwrangler pages deploymentcommands -
#10838
d3aee31Thanks @edmundhung! - fix: skip banner when using--jsonflag inwrangler queues subscriptioncommands -
#10829
59e8ef0Thanks @edmundhung! - fix: skip banner when using--jsonflag inwrangler pipelinescommands -
#10764
79a6b7dThanks @emily-shen! - containers: defaultmax_instancesto 20 instead of 1. -
#10844
7a4d0daThanks @mikenomitch! - Adds new Container instance types, and renamedevtoliteandstandardtostandard-1. The new instance_types are now:Instance Type vCPU Memory Disk lite (previously dev) 1/16 256 MiB 2 GB basic 1/4 1 GiB 4 GB standard-1 (previously standard) 1/2 4 GiB 8 GB standard-2 1 6 GiB 12 GB standard-3 2 8 GiB 16 GB standard-4 4 12 GiB 20 GB -
#10634
62656bdThanks @emily-shen! - fix: error if the container image uri has an account id that doesn't match the current account -
#10761
886e577Thanks @petebacondarwin! - switch zone route warning to an info message -
#10734
8d7f32eThanks @penalosa! - Improve formatting of logged errors in some cases -
#10832
f9d37dbThanks @petebacondarwin! - retry subdomain requests to be more resilient to flakes -
#10770
835d6f7Thanks @danielrs! - Enabling or disablingworkers_devis often an indication that the user is also trying to enable or disablepreview_urls. Warn the user when these enter mixed state. -
#10764
79a6b7dThanks @emily-shen! - fix: respect the log level set by wrangler when logging using @cloudflare/cli
4.40.3
Patch Changes
-
#10602
ff82d80Thanks @tukiminya! - fix: update Secrets Store command status from alpha to open-beta -
#10623
7a6381cThanks @IRCody! - Handle more cases for correctly resolving the full uri for an image when using containers push. -
#10779
325d22eThanks @hoodmane! - Add fallthrough: true for python_modules data rule -
#10112
8d07576Thanks @devin-ai-integration! - fix: allow Workflow bindings when calling getPlatformProxy()Workflow bindings are not supported in practice when using
getPlatformProxy(). But their existence in a Wrangler config file should not prevent other bindings from working. Previously, callinggetPlatformProxy()would crash if there were any Workflow bindings defined. Now, instead, you get a warning telling you that these bindings are not available. -
#10769
0a554f9Thanks @penalosa! - Mark more errors asUserErrorto disable Sentry reporting -
#10679
6244a9eThanks @KianNH! - Fix rendering for nested objects incontainers listandcontainers info [ID] -
#10785
d09cab3Thanks @pombosilva! - Workflows names and instance IDs are now properly validated with production limits. -
Updated dependencies [
6ff41a6,0c208e1,2432022,d0801b1,0a554f9]:- miniflare@4.20250927.0
- @cloudflare/unenv-preset@2.7.5
4.40.2
Patch Changes
4.40.1
Patch Changes
4.40.0
Minor Changes
- #10743
a7ac751Thanks @jonesphillip! - Changes--fileSizeMBto--file-sizeforwrangler r2 bucket catalogcompaction command. Small fixes for pipelines commands.
Patch Changes
-
#10706
81fd733Thanks @1000hz! - Fixed an issue that caused some Workers to have an incorrect service tag applied when using a redirected configuration file (as used by the Cloudflare Vite plugin). This resulted in these Workers not being correctly grouped with their sibling environments in the Cloudflare dashboard. -
Updated dependencies [
06e9a48]:
4.39.0
Minor Changes
-
#10647
555a6daThanks @efalcao! - VPC service binding support -
#10612
97a72ccThanks @jonesphillip! - Added new pipelines commands (pipelines, streams, sinks, setup), moved old pipelines commands behind --legacy -
#10652
acd48edThanks @edmundhung! - Rename Hyperdrive local connection string environment variable fromWRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>toCLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>. The old variable name is still supported but will now show a deprecation warning. -
#10721
55a10a3Thanks @penalosa! - Stabilise Worker Loader bindings
Patch Changes
-
#10724
b4a4311Thanks @penalosa! - Use Cap'n Web inworkers-sdk -
#10701
dc1d0d6Thanks @penalosa! - Fix hotkeys double render -
Updated dependencies [
555a6da,262393a,3ec1f65,a434352,328e687,b4a4311]:
4.38.0
Minor Changes
-
#10654
a4e2439Thanks @laplab! - Switch to WRANGLER_R2_SQL_AUTH_TOKEN env variable for R2 SQL secret. Update the response format for R2 SQL -
#10676
f76da43Thanks @penalosa! - Supportctx.exportsin wrangler types -
#10651
6caf938Thanks @edevil! - Added new attribute "allowed_sender_addresses" to send email binding.
Patch Changes
-
#10674
1cc258eThanks @penalosa! - Fix remote/local display for KV/D1/R2 & Browser bindings -
#10678
b30263eThanks @penalosa! - Remove dummy auth from SDK setup -
#10678
b30263eThanks @penalosa! - AddWRANGLER_TRACE_IDenvironment variable to support internal testing -
#10561
769ffb1Thanks @danielrs! - Do not show subdomain status mismatch warnings on first deploy. -
Updated dependencies [
b59e3e1,e9b0c66,6caf938,88132bc]:- miniflare@4.20250917.0
- @cloudflare/unenv-preset@2.7.4
4.37.1
Patch Changes
-
#10658
3029b9aThanks @1000hz! - Fixed an issue with service tags not being applied properly to Workers when the Wrangler configuration file did not include a top-levelnameproperty. -
#10657
31ec996Thanks @penalosa! - Disable remote bindings with the--localflag -
Updated dependencies [
783afeb]:
4.37.0
Minor Changes
-
#10546
d53a0bcThanks @1000hz! - On deploy or version upload, Workers with multiple environments are tagged with metadata that groups them together in the Cloudflare Dashboard. -
#10596
735785eThanks @penalosa! - Add Miniflare & Wrangler support for unbound Durable Objects -
#10622
15c34e2Thanks @nagraham! - Modify R2 Data Catalog compaction commands to enable/disable for Catalog (remove table/namespace args), and require Cloudflare API token on enable.
Patch Changes
- Updated dependencies [
735785e]:
4.36.0
Minor Changes
-
#10604
135e066Thanks @penalosa! - Enable Remote Bindings without the need for the--x-remote-bindingsflag -
#10558
30f558eThanks @laplab! - Add commands to send queries and manage R2 SQL product. -
#10574
d8860acThanks @efalcao! - Add support for VPC services CRUD viawrangler vpc service -
#10119
336a75dThanks @dxh9845! - Add support for dynamically loading 'external' Miniflare plugins for unsafe Worker bindings (developed outside of the workers-sdk repo)
Patch Changes
-
#10212
0837a8dThanks @jamesopstad! - AddpreserveOriginalMainoption tounstable_readConfig. This will pass the originalmainvalue through, without converting it to an absolute path. -
#10541
da24079Thanks @qjex! - stableratelimitbindingRate Limiting in Workers is now generally available,
ratelimitcan be removed from unsafe bindings. -
#10479
ffa2600Thanks @nagraham! - feat: Add wrangler commands for the R2 Data Catalog compaction feature -
#9955
51553efThanks @penalosa! - Integrate the Cloudflare SDK into Wrangler (internal refactor)
4.35.0
Minor Changes
-
#10491
5cb806fThanks @zebp! - Add traces, OTEL destinations, and configurable persistence to observability settingsAdds a new
tracesfield to theobservabilitysettings in your Worker configuration that configures the behavior of automatic tracing. Bothtracesandlogssupport providing a list of OpenTelemetry compliantdestinationswhere your logs/traces will be exported to as well as an implicitly-enabledpersistoption that controls whether or not logs/traces are persisted to the Cloudflare observability platform and viewable in the Cloudflare dashboard.
Patch Changes
-
#10571
4e49d3eThanks @dario-piotrowicz! - add missing type forsend_email'sexperimental_remotefield -
#10534
dceb550Thanks @dario-piotrowicz! - updateunstable_convertConfigBindingsToStartWorkerBindingsto prioritize preview config valuesEnsure that if some bindings include preview values (e.g.
preview_database_idfor D1 bindings) those get used instead of the standard ones (since these are the ones that start worker should be using) -
Updated dependencies [
dac302c,3b78839]:- miniflare@4.20250906.0
- @cloudflare/unenv-preset@2.7.3
4.34.0
Minor Changes
-
#10478
cc47b51Thanks @danielrs! - Beta feature preview_urls is now disabled by default.This change makes preview_urls disabled by default when it's not provided, making the feature opt-in instead of opt-out.
Patch Changes
-
#10489
6e8dd80Thanks @WalshyDev! - Allow Wrangler to upload 100,000 assets inline with the newly increased Workers Paid limit. -
#10517
7211609Thanks @edmundhung! - fix:wrangler vectorize list-vectors --jsonnow output valid json without an extra log line -
#10527
818ce22Thanks @vicb! - Bumpunenvto 2.0.0-rc.20The latest release include a fix for
node:ttydefault export. See the changelog for full details. -
#10519
5d69df4Thanks @dario-piotrowicz! - Slightly improvewrangler init --from-dasherror message -
#10519
5d69df4Thanks @dario-piotrowicz! - Internally refactor diffing andwrangler init --from-dashlogic -
#10533
c22acc6Thanks @emily-shen! - If unset, containers.max_instances should default to 1 instead of 0. -
#10503
c0fad5fThanks @ichernetsky-cf! - Support setting container affinities -
#10515
c6a39f5Thanks @emily-shen! - fix: script should be accepted as a positional arg in theversions uploadcommand -
Updated dependencies [
4cb3370,818ce22,cb22f5f,a565291]:- miniflare@4.20250902.0
- @cloudflare/unenv-preset@2.7.2
4.33.2
Patch Changes
-
#10401
3c15bbbThanks @dario-piotrowicz! - improve diff lines ordering in remote deploy config diffing logic -
#10520
dc81221Thanks @emily-shen! - fix: wrangler deploy dry run should not require you to be logged inFixes a bug where if you had a container where the image was an image registry link, dry run would require you to be logged in. Also fixes a bug where container deployments were not respecting
account_idset in Wrangler config. -
#10393
4492eb0Thanks @dario-piotrowicz! - Use resolved local config for remote deploy config diffing logic -
Updated dependencies [
31ecfeb,f656d1a,22c8ae6,bd21fc5,38bdb78,4851955]:- @cloudflare/unenv-preset@2.7.1
- miniflare@4.20250829.0
4.33.1
Patch Changes
-
#10427
85be2b6Thanks @dario-piotrowicz! - Simplify ENOENT debug logs for.envfiles -
Updated dependencies [
76d9aa2,452ad0b,7c339ae]:- @cloudflare/unenv-preset@2.7.0
- miniflare@4.20250823.1
4.33.0
Minor Changes
- #10414
e81c2cfThanks @penalosa! - Support automatically updating the user's config file with newly created resources
Patch Changes
-
#10424
c4fd176Thanks @penalosa! - Remove the--experimental-json-config/-jflag, which is no longer required. -
#10432
19e2aabThanks @anonrig! - Remove "node:tls" polyfill -
#10424
c4fd176Thanks @penalosa! - Expose global flags fromexperimental_getWranglerCommands() -
Updated dependencies [
19e2aab]:- @cloudflare/unenv-preset@2.6.3
- miniflare@4.20250823.0
4.32.0
Minor Changes
-
#10354
da40571Thanks @edmundhung! - Enable cross-process communication forwrangler devwith multiple config filesWorkers running in separate
wrangler devsessions can now communicate with each other regardless of whether you are running with single or multiple config files.Check out the Developing with multiple Workers guide to learn more about the different approaches and when to use each one.
-
#10012
4728c68Thanks @penalosa! - Support unsafe dynamic worker loading bindings
Patch Changes
-
#10245
d304055Thanks @edmundhung! - Migrate wrangler dev to use Miniflare dev registry implementationUpdated
wrangler devto use a shared dev registry implementation that now powers both the Cloudflare Vite plugin and Wrangler. This internal refactoring has no user-facing changes but consolidates registry logic for better consistency across tools. -
#10407
f534c0dThanks @emily-shen! - defaultcontainers.rollout_active_grace_periodto 0 -
#10425
0a96e69Thanks @dario-piotrowicz! - Fix debugging logs not including headers for CF API requests and responsesFix the fact that
wrangler, when run with theWRANGLER_LOG=DEBUGandWRANGLER_LOG_SANITIZE=falseenvironment variables, displays{}instead of the actual headers for requests and responses for CF API fetches -
#10337
f9f7519Thanks @emily-shen! - containers:rollout_step_percentagenow also accepts an array of numbers. Previously it accepted a single number, and each rollout step would target the same percentage of instances. Now users can customise percentages for each step.rollout_step_percentagealso now defaults to[10,100](previously25), which should make rollouts progress slightly faster.You can also use
wrangler deploy --containers-rollout=immediateto override rollout settings in Wrangler configuration and update all instances in one step. Note this doesn't overriderollout_active_grace_periodif configured. -
Updated dependencies [
4728c68]:
4.31.0
Minor Changes
-
#10314
9b09751Thanks @dario-piotrowicz! - Show possible local vs. dashboard diff information on deploysWhen re-deploying a Worker using
wrangler deploy, if the configuration has been modified in the Cloudflare dashboard, the local configuration will overwrite the remote one. This can lead to unexpected results for users. To address this, currentlywrangler deploywarns users about potential configuration overrides (without presenting them) and prompts them to confirm whether they want to proceed.The changes here improve the above flow in the following way:
- If the local changes only add new configurations (without modifying or removing existing ones), the deployment proceeds automatically without warnings or prompts, as these changes are non-destructive and safe.
- If the local changes modify or remove existing configurations,
wrangler deploynow displays a git-like diff showing the differences between the dashboard and local configurations. This allows users to review and understand the impact of their changes before confirming the deployment.
-
#10334
cadf19aThanks @jonesphillip! - Added queues subscription command to Wrangler including create, update, delete, get, list
Patch Changes
-
#10374
20520faThanks @edmundhung! - Simplify debug package resolution with nodejs_compatA patched version of
debugwas previously introduced that resolved the package to a custom implementation. However, this caused issues due to CJS/ESM interop problems. We now resolve thedebugpackage to use the Node.js implementation instead. -
#10249
875197aThanks @penalosa! - Support JSRPC for remote bindings. This unlocks:- JSRPC over Service Bindings
- JSRPC over Dispatch Namespace Bindings
- Pipelines
-
Updated dependencies [
565c3a3,ddadb93,20520fa,875197a]:- miniflare@4.20250816.0
- @cloudflare/unenv-preset@2.6.2
4.30.0
Minor Changes
- #10341
76a6701Thanks @garvit-gupta! - feat: Add Wrangler command for Vectorize list-vectors operation
Patch Changes
-
#10217
979984bThanks @veggiedefender! - Increase the maxBuffer size for capnp uploads -
#10356
80e964cThanks @WillTaylorDev! - fix: Update regex for valid branch name to remove 61 char length requirement, allowing for longer branch names to be specified for preview aliases. -
#10289
a5a1426Thanks @emily-shen! - Cleanup container images created during local dev if no changes have been made.We now untag old images that were created by Wrangler/Vite if we find that the image content and configuration is unchanged, so that we don't keep accumulating image tags.
-
#10315
0c04da9Thanks @emily-shen! - Addrollout_active_grace_periodoption to containers configuration.This allows users to configure how long an active container should keep running for during a rollout, before the upgrade is applied.
-
#10321
b524a6fThanks @emily-shen! - print prettier errors during container deployment -
#10253
eb32a3aThanks @emily-shen! - fix redeploying container apps when previous deploy failed or container (but not image) was deleted.Previously this failed with
No changes detected but no previous image foundas we assumed there would be a previous deployment when an image exists in the registry. -
#9990
4288a61Thanks @penalosa! - Fix startup profiling when sourcemaps are enabled
4.29.1
Patch Changes
- Updated dependencies [
5020694]:
4.29.0
Minor Changes
-
#10283
80960b9Thanks @WillTaylorDev! - Support long branch names in generation of branch aliases in WCI. -
#10312
bd8223dThanks @devin-ai-integration! - Added--domainflag towrangler deploycommand for deploying to custom domains. Use--domain example.comto deploy directly to a custom domain without manually configuring routes. -
#8318
8cf47f9Thanks @gnekich! - Introduce json output flag for wrangler pages deployment list
Patch Changes
-
#10232
e7cae16Thanks @emily-shen! - fix: validatewrangler containers delete IDto ensure a valid ID has been provided. Previously if you provided the container name (or any non-ID shaped string) you would get an auth error instead of a 404. -
#10139
3b6ab8aThanks @dom96! - Removes mention of cf-requirements when Python Workers are enabled -
#10259
c58a05cThanks @dario-piotrowicz! - Ensure thatmaybeStartOrUpdateRemoteProxySessionconsiders the potential account_id from the user's wrangler configCurrently if the user has an
account_idin their wrangler config file, such id won't be taken into consideration for the remote proxy session, the changes here make sure that it is (note that theauthoption ofmaybeStartOrUpdateRemoteProxySession, if provided, takes precedence over this id value).The changes here also fix the same issue for
wrangler devandgetPlatformProxy(since they usemaybeStartOrUpdateRemoteProxySessionunder the hook). -
#10288
42aafa3Thanks @tgarg-cf! - Do not attempt to update queue producer settings when deploying a Worker with a queue bindingPreviously, each deployed Worker would update a subset of the queue producer's settings for each queue binding, which could result in broken queue producers or at least conflicts where different Workers tried to set different producer settings on a shared queue.
-
#10242
70bd966Thanks @devin-ai-integration! - Add experimental API to expose Wrangler command tree structure for documentation generation -
#10258
d391076Thanks @nikitassharma! - Add the option to allow all tiers when creating a container -
#10248
422ae22Thanks @emily-shen! - fix: re-push container images on deploy even if the only change was to the Dockerfile -
#10179
5d5ecd5Thanks @pombosilva! - Prevent defining multiple workflows with the same "name" property in the same wrangler file -
#10232
e7cae16Thanks @emily-shen! - include containers API calls in output of WRANGLER_LOG=debug -
#10243
d481901Thanks @devin-ai-integration! - Remove async_hooks polyfill - now uses native workerd implementationThe async_hooks module is now provided natively by workerd, making the polyfill unnecessary. This improves performance and ensures better compatibility with Node.js async_hooks APIs.
-
#10060
9aad334Thanks @edmundhung! - refactor: switchgetPlatformProxy()to use Miniflare's dev registry implementationUpdated
getPlatformProxy()to use Miniflare's dev registry instead of Wrangler's implementation. Previously, you had to start a wrangler or vite dev session before accessing the proxy bindings to connect to those workers. Now the order doesn't matter. -
#10219
28494f4Thanks @dario-piotrowicz! - fixNonRetryableErrorthrown with an empty error message not stopping workflow retries locally -
Updated dependencies [
1479fd0,05c5b28,e3d9703,d481901]:- miniflare@4.20250803.1
- @cloudflare/unenv-preset@2.6.1
4.28.1
Patch Changes
-
#10130
773cca3Thanks @dario-piotrowicz! - updatemaybeStartOrUpdateRemoteProxySessionconfig argument (to allow callers to specify an environment)Before this change
maybeStartOrUpdateRemoteProxySessioncould be called with either the path to a wrangler config file or the configuration of a worker. The former override however did not allow the caller to specify an environment, so themaybeStartOrUpdateRemoteProxySessionAPI has been updated so that in the wrangler config case an object (with the path and a potential environment) needs to be passed instead.For example, before callers could invoke the function in the following way
await maybeStartOrUpdateRemoteProxySession(configPath);note that there is no way to tell the function what environment to use when parsing the wrangle configuration.
Now callers will instead call the function in the following way:
await maybeStartOrUpdateRemoteProxySession({ path: configPath, environment: targetEnvironment, });note that now a target environment can be specified.
-
#10130
773cca3Thanks @dario-piotrowicz! - fixgetPlatformProxynot taking into account the potentially specified environment for remote bindings -
#10122
2e8eb24Thanks @dario-piotrowicz! - fixstartWorkernot respectingauthoptions for remote bindingsfix
startWorkercurrently not taking into account theauthfield that can be provided as part of thedevoptions when used in conjunction with remote bindingsexample:
Given the following
import { unstable_startWorker } from "wrangler"; const worker = await unstable_startWorker({ entrypoint: "./worker.js", bindings: { AI: { type: "ai", experimental_remote: true, }, }, dev: { experimentalRemoteBindings: true, auth: { accountId: "<ACCOUNT_ID>", apiToken: { apiToken: "<API_TOKEN>", }, }, }, }); await worker.ready;wranglerwill now use the provided<ACCOUNT_ID>and<API_TOKEN>to integrate with the remote AI binding instead of requiring the user to authenticate. -
#10209
93c4c26Thanks @devin-ai-integration! - fix: strip ANSI escape codes from log files to improve readability and parsing -
#9774
48853a6Thanks @nikitassharma! - Validate container configuration against account limits in wrangler to give early feedback to the user -
#10122
2e8eb24Thanks @dario-piotrowicz! - fix incorrect TypeScript type for AI binding in thestartWorkerAPI
4.28.0
Minor Changes
- #9530
e82aa19Thanks @Akshit222! - Add --json flag to r2 bucket info command for machine-readable output.
Patch Changes
-
#10004
b4d1373Thanks @dario-piotrowicz! - fixwrangler devlogs being logged on the incorrect level in some casescurrently the way
wrangler devprints logs is faulty, for example the following codeconsole.error("this is an error"); console.warn("this is a warning"); console.debug("this is a debug");inside a worker would cause the following logs:
✘ [ERROR] this is an error ✘ [ERROR] this is a warning this is a debug(note that the warning is printed as an error and the debug log is printed even if by default it should not)
the changes here make sure that the logs are instead logged to their correct level, so for the code about the following will be logged instead:
✘ [ERROR] this is an error ▲ [WARNING] this is a warning(running
wrangler devwith the--log-level=debugflag will also cause the debug log to be included as well) -
#10099
360004dThanks @emily-shen! - fix: move local dev container cleanup to process exit hook. This should ensure containers are cleaned up even when Wrangler is shut down programatically. -
#10186
dae1377Thanks @matthewdavidrodgers! - Deleting when Pages project binds to worker requires confirmation -
#10169
1655becThanks @devin-ai-integration! - fix: report startup errors before workerd profiling -
#10136
354a001Thanks @nikitassharma! - Updatewrangler containers images listto make fewer API calls to improve command runtime -
#10157
5c3b83fThanks @devin-ai-integration! - Enforce 64-character limit for Workflow binding names locally to match production validation -
#10154
502a8e0Thanks @devin-ai-integration! - Fix UTF BOM handling in config files - remove UTF-8 BOM and error on other BOMs -
#10176
07c8611Thanks @devin-ai-integration! - Add macOS version validation to prevent EPIPE errors on unsupported macOS versions (below 13.5). Miniflare and C3 fail hard while Wrangler shows warnings but continues execution. -
Updated dependencies [
6b9cd5b,631f26d,d6ecd05,b4d1373,8ba7736,07c8611,7e204a9,3f83ac1]:- @cloudflare/unenv-preset@2.6.0
- miniflare@4.20250803.0
4.27.0
Minor Changes
-
#9914
a24c9d8Thanks @petebacondarwin! - Add support for loading local dev vars from .env filesIf there are no
.dev.varsor.dev.vars.<environment>files, when running Wrangler or the Vite plugin in local development mode, they will now try to load additional local dev vars from.env,.env.local,.env.<environment>and.env.<environment>.localfiles.These loaded vars are only for local development and have no effect in production to the vars in a deployed Worker. Wrangler and Vite will continue to load
.envfiles in order to configure themselves as a tool.Further details:
- In
vite buildthe local vars will be computed and stored in a.dev.varsfile next to the compiled Worker code, so thatvite previewcan use them. - The
wrangler typescommand will similarly read the.envfiles (if no.dev.varsfiles) in order to generate theEnvinterface. - If the
CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENVenvironment variable is"false"then local dev variables will not be loaded from.envfiles. - If the
CLOUDFLARE_INCLUDE_PROCESS_ENVenvironment variable is"true"then all the environment variables found onprocess.envwill be included as local dev vars. - Wrangler (but not Vite plugin) also now supports the
--env-file=<path/to/dotenv/file>global CLI option. This affects both loading.envto configure Wrangler the tool as well as loading local dev vars.
- In
Patch Changes
-
#10051
0f7820eThanks @nikitassharma! - Add support for custom instance limits for containers. For example, instead of having to use the preconfigured dev/standard/basic instance types, you can now set:instance_type: { vcpu: 1, memory_mib: 1024, disk_mb: 4000 }This feature is currently only available to customers on an enterprise plan.
-
#10149
e9bb8d3Thanks @vicb! - fixrequire("debug")in nodejs_compat mode -
Updated dependencies [
9b61f44]:
4.26.1
Patch Changes
-
#10061
f8a80a8Thanks @emily-shen! - feat(containers): try to automatically get the socket path that the container engine is listening on.Currently, if your container engine isn't set up to listen on
unix:///var/run/docker.sock(or isn't symlinked to that), then you have to manually set this via thedev.containerEnginefield in your Wrangler config, or via the env varsWRANGLER_DOCKER_HOST. This change means that we will try and get the socket of the current context automatically. This should reduce the occurrence of opaqueinternal errors thrown by the runtime when the daemon is not listening onunix:///var/run/docker.sock.In addition to
WRANGLER_DOCKER_HOST,DOCKER_HOSTcan now also be used to set the container engine socket address. -
#10048
dbdbb8cThanks @vicb! - pass the compatibility date and flags to the unenv preset -
#9897
755a249Thanks @edmundhung! - fix: wrangler types should infer the types of the default worker entrypoint -
Updated dependencies [
82a5b2e,f8f7352,2df1d06,dbdbb8c,5991a9c,687655f]:- miniflare@4.20250726.0
- @cloudflare/unenv-preset@2.5.0
4.26.0
Minor Changes
-
#10016
c5b291dThanks @emily-shen! - Interactively handlewrangler deploys that are probably assets-only, where there is no config file and flags are incorrect or missing.For example:
npx wrangler deploy ./publicwill now ask if you meant to deploy a folder of assets only, ask for a name, set the compat date and then ask whether to write your choices out towrangler.jsonfor subsequent deployments.npx wrangler deploy --assets=./publicwill now ask for a name, set the compat date and then ask whether to write your choices out towrangler.jsonfor subsequent deployments.In non-interactive contexts, Wrangler will error as it currently does.
-
#9971
19794bfThanks @edmundhung! - Improved script source display on the pretty error screen
Patch Changes
-
#9800
3d4f946Thanks @helloimalastair! - remove banner from r2 getobject in pipe mode -
#9910
7245101Thanks @dario-piotrowicz! - make sure that the ready-on message is printed after the appropriate runtime controller is readyfix the fact that when starting a local (or remote) dev session the log saying
Ready on http://localhost:xxxxcould be displayed before the runtime is actually ready to handle requests (this is quite noticeable when locally running dev sessions with containers, where the ready message currently gets displayed before the container images building/pulling process) -
#10031
823cba8Thanks @vicb! - wrangler and vite-plugin now depend upon the latest version of unenv-preset -
#10032
154acf7Thanks @dario-piotrowicz! - add support for containers in wrangler multiworker devcurrently when running
wrangler devwith different workers (meaning that the-c|--configflag is used multiple times) containers are not being included, meaning that trying to interact with them at runtime would not work and cause errors instead. The changes here address the above making wrangler correctly detect and wire up the containers. -
#9988
7fb0bfdThanks @penalosa! - Correctly labelmtlsremote bindings warning -
Updated dependencies [
823cba8,19794bf,059a39e]:- @cloudflare/unenv-preset@2.4.1
- miniflare@4.20250712.2
4.25.1
Patch Changes
-
#10000
c02b067Thanks @emily-shen! - Include more (sanitised) user errors in telemetry.We manually vet and sanitised error messages before including them in our telemetry collection - this PR just includes a couple more.
-
#9996
b0217f9Thanks @nikitassharma! - Disallow users from pushing images with unsupported platforms to the container image registry -
#10009
e87198aThanks @gpanders! - Fix containers diff output when using JSONC config files -
#9976
ad02ad3Thanks @dario-piotrowicz! - add warning for when users runwrangler dev --remotewith (enabled) containers -
#9819
0c4008cThanks @CarmenPopoviciu! - feat(vite-plugin): Add containers support invite devAdds support for Cloudflare Containers in
vite dev. Please note that at the time of this PR a container image can only specify the path to aDockerfile. Support for registry links will be added in a later version, as will containers support invite preview. -
Updated dependencies [
189fe23,7e5585d]:- @cloudflare/unenv-preset@2.4.0
- miniflare@4.20250712.1
4.25.0
Minor Changes
- #9835
9f0c175Thanks @thomasgauvin! - Added rename namespace command to Workers KV
Patch Changes
- #9934
6cc24c0Thanks @emily-shen! - Add more thorough validation to containers configuration
4.24.4
Patch Changes
-
#9905
4ba9f25Thanks @dom96! - Support for Python packages in python_modules dir -
#9886
17b1e5aThanks @dom96! - Python packages are now read from cf-requirements.txt instead of requirements.txt by default -
#9899
d6a1b9bThanks @simonabadoiu! - Print local mode when running a browser binding in local mode -
#9951
e2672c5Thanks @penalosa! - Recommend remote bindings whenwrangler dev --remoteis used -
#9875
a5d7b35Thanks @gpanders! - Show expected format in error message for "containers images delete" -
#9954
bf4c9abThanks @penalosa! - Support Images binding ingetPlatformProxy() -
#9974
f73da0dThanks @penalosa! - Pass worker name & compliance region through correctly when starting a remote bindings session -
Updated dependencies [
ac08e68,3bb69fa,274a826,77d1cb2,5b0fc9e,bf4c9ab,14ce577]:
4.24.3
Patch Changes
-
#9923
c01c4eeThanks @gpanders! - Fix image name resolution when modifying a container application -
#9833
3743896Thanks @dario-piotrowicz! - fix: ensure that container builds don't disrupt dev hotkey handlingcurrently container builds run during local development (via
wrangler devorstartWorker) prevent the standard hotkeys not to be recognized (most noticeablyctrl+c, preventing developers from existing the process), the changes here ensure that hotkeys are instead correctly handled as expected -
Updated dependencies []:
4.24.2
Patch Changes
- #9917
80cc834Thanks @edmundhung! - fix: assets only versions upload should include tag and message
4.24.1
Patch Changes
-
#9765
05adc61Thanks @hasip-timurtas! - Build container images without the user's account ID. This allows containers to be built and verified in dry run mode (where we do not necessarily have the user's account info).When we push the image to the managed registry, we first re-tag the image to include the user's account ID so that the image has the full resolved image name.
4.24.0
Minor Changes
-
#9796
ba69586Thanks @simonabadoiu! - Browser Rendering local mode -
#9825
49c85c5Thanks @ReppCodes! - Add support for origin_connection_limit to WranglerConfigure connection limits to Hyperdrive via command line options:
--origin-connection-limit: The (soft) maximum number of connections that Hyperdrive may establish to the origin database.
-
#9064
a1181bfThanks @sdnts! - Added anevent-subscriptionssubcommand
Patch Changes
-
#9729
1b3a2b7Thanks @404Wolf! - Set docker build context to the Dockerfile directory whenimage_build_contextis not explicitly provided -
#9845
dbfa4efThanks @jonboulle! - remove extraneous double spaces from Wrangler help output -
#9811
fc29c31Thanks @gpanders! - Fix unauthorized errors on "containers images delete". -
#9813
45497abThanks @gpanders! - Support container image names without account ID -
#9821
a447d67Thanks @WillTaylorDev! - Preview Aliases: Force alias generation to meet stricter naming requirements.For cases where CI is requesting Wrangler to generate the alias based on the branch name, we want a stricter check around the generated alias name in order to avoid version upload failures. If a valid alias name was not able to be generated, we warn and do not provide an alias (avoiding a version upload failure).
-
#9840
7c55f9eThanks @dario-piotrowicz! - fix: make sure that the experimentalremoteBindingsflag is properly handled ingetPlatformProxyThere are two issues related to how the experimental
remoteBindingsflag is handled ingetPlatformProxythat are being fixed by this change:- the
experimental_remoteconfiguration flag set on service bindings is incorrectly always taken into account, even ifremoteBindingsis set tofalse - the
experimental_remoteconfiguration flag of all the other bindings is never taken into account (effectively preventing the bindings to be used in remote mode) since theremoteBindingsflag is not being properly propagated
- the
-
#9801
0bb619aThanks @IRCody! - Containers: Fix issue where setting an image URI instead of dockerfile would incorrectly not update the image -
#9872
a727db3Thanks @emily-shen! - fix: resolve Dockerfile path relative to the Wrangler config pathThis fixes a bug where Wrangler would not be able to find a Dockerfile if a Wrangler config path had been specified with the
--configflag. -
#9815
1358034Thanks @gpanders! - Remove --json flag from containers and cloudchamber commands (except for "images list") -
#9734
1a58bc3Thanks @penalosa! - Make Wrangler warn more loudly if you're missing auth scopes -
#9748
7e3aa1bThanks @alsuren! - Internal-only WRANGLER_D1_EXTRA_LOCATION_CHOICES environment variable for enabling D1's testing location hints
4.23.0
Minor Changes
-
#9535
56dc5c4Thanks @penalosa! - In 2023 we announced breakpoint debugging support for Workers, which meant that you could easily debug your Worker code in Wrangler's built-in devtools (accessible via the[d]hotkey) as well as multiple other devtools clients, including VSCode. For most developers, breakpoint debugging via VSCode is the most natural flow, but until now it's required manually configuring alaunch.jsonfile, runningwrangler dev, and connecting via VSCode's built-in debugger.Now, using VSCode's built-in JavaScript Debug Terminals, there are just two steps: open a JS debug terminal and run
wrangler dev(orvite dev). VSCode will automatically connect to your running Worker (even if you're running multiple Workers at once!) and start a debugging session. -
#9810
8acaf43Thanks @WillTaylorDev! - WC-3626 Pull branch name from WORKERS_CI_BRANCH if exists.
Patch Changes
-
#9775
4309bb3Thanks @vicb! - Cap the number of errors and warnings for bulk KV put to avoid consuming too much memory -
#9799
d11288aThanks @penalosa! - Better messaging for account owned tokens inwrangler whoami -
Updated dependencies [
56dc5c4]:
4.22.0
Minor Changes
-
#7871
f2a8d4aThanks @dario-piotrowicz! - add support for assets bindings togetPlatformProxythis change makes sure that that
getPlatformProxy, when the input configuration file contains an assets field, correctly returns the appropriate asset binding proxyexample:
// wrangler.jsonc { "name": "my-worker", "assets": { "directory": "./public/", "binding": "ASSETS" } }import { getPlatformProxy } from "wrangler"; const { env, dispose } = await getPlatformProxy(); const text = await (await env.ASSETS.fetch("http://0.0.0.0/file.txt")).text(); console.log(text); // logs the content of file.txt await dispose();
Patch Changes
-
#9717
d2f2f72Thanks @nikitassharma! - Containers should default to a "dev" instance type when no instance type is specified in the wrangler config -
#9620
1b967eaThanks @gpanders! - Simplify containers images list output format -
#9684
94a340eThanks @WillTaylorDev! - Select only successfully deployed deployments when tailing.
4.21.2
Patch Changes
-
#9731
75b75f3Thanks @gabivlj! - containers: Check for container scopes before running a container command to give a better error -
#9641
fdbc9f6Thanks @IRCody! - Update container builds to use a more robust method for detecting if the currently built image already exists. -
#9736
55c83a7Thanks @gabivlj! - containers: Do not check scopes if not defined -
#9667
406fba5Thanks @IRCody! - Fail earlier in the deploy process when deploying a container worker if docker is not detected.
4.21.1
Patch Changes
-
#9626
9c938c2Thanks @penalosa! - Supportwrangler version uploadfor Python Workers -
#9718
fb83341Thanks @mhart! - fix error message when docker daemon is not running -
#9689
b137a6fThanks @emily-shen! - fix: correctly pass container engine config to miniflare -
#9722
29e911aThanks @emily-shen! - Update containers config schema.Deprecates
containers.configurationin favour of top level fields. Makes top levelimagerequired. Deprecatesinstancesanddurable_objects. Makesnameoptional. -
#9666
f3c5791Thanks @IRCody! - Add a reasonable default name for containers that have no defined name. -
Updated dependencies [
b137a6f]:
4.21.0
Minor Changes
-
#9692
273952fThanks @dom96! - Condenses Python vendored modules in output table -
#9654
2a5988cThanks @dom96! - Python Workers now automatically bundle .so files from vendored packages
Patch Changes
-
#9695
0e64c35Thanks @emily-shen! - Move hotkey registration later in dev start upThis should have no functional change, but allows us to conditionally render hotkeys based on config.
-
#9098
ef20754Thanks @jseba! - Migrate Workers Containers commands to Containers API EndpointsThe Workers Containers API was built on top of Cloudchamber, but has now been moved to its own API with a reduced scoping and new token.
-
#9712
2a4c467Thanks @emily-shen! - Makewrangler containercommands printopen-betastatus
4.20.5
Patch Changes
-
#9688
086e29dThanks @dario-piotrowicz! - add remote bindings support togetPlatformProxyExample:
// wrangler.jsonc { "name": "get-platform-proxy-test", "services": [ { "binding": "MY_WORKER", "service": "my-worker", "experimental_remote": true } ] }// index.mjs import { getPlatformProxy } from "wrangler"; const { env } = await getPlatformProxy({ experimental: { remoteBindings: true, }, }); // env.MY_WORKER.fetch() fetches from the remote my-worker service -
#9558
d5edf52Thanks @ichernetsky-cf! -wrangler containers applyusesobservabilityconfiguration. -
#9678
24b2c66Thanks @dario-piotrowicz! - remove warnings during config validations onexperimental_remotefieldswrangler commands, run without the
--x-remote-bindingsflag, parsing config files containingexperimental_remotefields currently show warnings stating that the field is not recognized. This is usually more cumbersome than helpful so here we're loosening up this validation and making wrangler always recognize the field even when no--x-remote-bindingsflag is provided -
#9633
3f478afThanks @nikitassharma! - Add support for setting an instance type for containers in wrangler. This allows users to configure memory, disk, and vCPU by setting instance type when interacting with containers. -
#9596
5162c51Thanks @CarmenPopoviciu! - add ability to pull images for containers local dev
4.20.4
Patch Changes
-
#9673
ffa742fThanks @dario-piotrowicz! - fix: ensure that wrangler deploy and version upload don't override the remote-bindings flag -
#9653
8a60fe7Thanks @penalosa! - RenameWRANGLER_CONTAINERS_DOCKER_PATHtoWRANGLER_DOCKER_BIN -
#9664
c489a44Thanks @IRCody! - Remove cloudchamber/container apply confirmation dialog when run non-interactively. -
#9653
8a60fe7Thanks @penalosa! - Add a warning banner towrangler cloudchamberandwrangler containerscommands -
#9605
17d23d8Thanks @emily-shen! - Add rebuild hotkey for containers local dev, and clean up containers at the end of a dev session. -
Updated dependencies [
17d23d8]:
4.20.3
Patch Changes
-
#9621
08be3edThanks @gabivlj! - wrangler containers: 'default' scheduling policy should be the default -
#9586
d1d34feThanks @penalosa! - Remove the Mixed Mode naming in favour of "remote bindings"/"remote proxy" -
Updated dependencies [
d1d34fe]:
4.20.2
Patch Changes
-
#9565
b1c9139Thanks @IRCody! - Ensure that a container applications image configuration is not updated if there were not changes to the image. -
#9628
92f12f4Thanks @gpanders! - Remove "Cloudchamber" from user facing error messages -
#9576
2671e77Thanks @vicb! - Add core local dev functionality for containers. Adds a new WRANGLER_DOCKER_HOST env var to customise what socket to connect to.
4.20.1
Patch Changes
-
#9536
3b61c41Thanks @dario-piotrowicz! - exposeUnstable_Bindingtype -
#9564
1d3293fThanks @skepticfx! - Switch container registry toregistry.cloudflare.comfromregistry.cloudchamber.cfdata.org. Also adds the env varCLOUDFLARE_CONTAINER_REGISTRYto override this -
#9520
04f9164Thanks @vicb! - fix the default value for keep_names (true) -
#9506
36113c2Thanks @penalosa! - Strip theCF-Connecting-IPheader from outgoing fetches -
#9592
49f5ac7Thanks @petebacondarwin! - Point to the right location for docs on telemetry -
#9593
cf33417Thanks @vicb! - drop unusedWRANGLER_UNENV_RESOLVE_PATHSenv var -
#9566
521eeb9Thanks @vicb! - Bump@cloudflare/unenv-presetto 2.3.3 -
#9344
02e2c1eThanks @dario-piotrowicz! - add warning about env not specified to potentially risky wrangler commandsadd a warning suggesting users to specify their target environment (via
-eor--env) when their wrangler config file contains some environments and they are calling one of the following commands:- wrangler deploy
- wrangler versions upload
- wrangler versions deploy
- wrangler versions secret bulk
- wrangler versions secret put
- wrangler versions secret delete
- wrangler secret bulk
- wrangler secret put
- wrangler secret delete
- wrangler triggers deploy
this is a measure we're putting in place to try to prevent developers from accidentally applying changes to an incorrect (potentially even production) environment
-
#9344
02e2c1eThanks @dario-piotrowicz! - allow passing an empty string to the-e|--envflag to target the top-level environment -
#9536
3b61c41Thanks @dario-piotrowicz! - performance improvement: restart a mixed mode session only if the worker's remote bindings have changed -
#9550
c117904Thanks @dario-piotrowicz! - allowstartWorkerto acceptfalseas aninspectoroption (to disable the inspector server) -
#9473
fae8c02Thanks @dario-piotrowicz! - expose newexperimental_maybeStartOrUpdateMixedModeSessionutility
4.20.0
Minor Changes
-
#9509
0b2ba45Thanks @emily-shen! - feat: add static routing options via 'run_worker_first' to WranglerImplements the proposal noted here https://github.com/cloudflare/workers-sdk/discussions/9143.
This is now usable in
wrangler devand in production - just specify the routes that should hit the worker first withrun_worker_firstin your Wrangler config. You can also omit certain paths with!negative rules.
Patch Changes
-
#9507
1914b87Thanks @dario-piotrowicz! - slightly improve wrangler dev bindings loggingsimprove the bindings loggings by:
- removing the unnecessary (and potentially incorrect)
[connected]suffix for remote bindings - making sure that the modes presented in the bindings logs are correctly aligned
- removing the unnecessary (and potentially incorrect)
-
#9475
931f467Thanks @edmundhung! - add hello world binding that serves as as an explanatory example. -
#9443
95eb47dThanks @dario-piotrowicz! - add workerName option to startMixedModeSession API -
#9541
80b8bd9Thanks @dario-piotrowicz! - make workers created withstartWorkerawait thereadypromise ondispose -
#9443
95eb47dThanks @dario-piotrowicz! - add mixed-mode support for mtls bindings -
#9515
9e4cd16Thanks @dario-piotrowicz! - make sure that remote binding errors are surfaced when using mixed (hybrid) mode -
#9516
92305afThanks @IRCody! - Reorder deploy output when deploying a container worker so the worker url is printed last and the worker triggers aren't deployed until the container has been built and deployed successfully. -
Updated dependencies [
931f467,95eb47d,0b2ba45]:- miniflare@4.20250604.1
- @cloudflare/unenv-preset@2.3.3
4.19.2
Patch Changes
-
#9461
66edd2fThanks @skepticfx! - Enforce disk limits on container builds -
#9481
d1a1787Thanks @WillTaylorDev! - Force autogenerated aliases to be fully lowercased. -
#9480
1f84092Thanks @dario-piotrowicz! - addexperimentalMixedModedev option tounstable_startWorkeradd an new
experimentalMixedModedev option tounstable_startWorkerthat allows developers to programmatically start a new mixed mode session using startWorker.Example usage:
// index.mjs import { unstable_startWorker } from "wrangler"; await unstable_startWorker({ dev: { experimentalMixedMode: true, }, });// wrangler.jsonc { "$schema": "node_modules/wrangler/config-schema.json", "name": "programmatic-start-worker-example", "main": "src/index.ts", "compatibility_date": "2025-06-01", "services": [ { "binding": "REMOTE_WORKER", "service": "remote-worker", "remote": true } ] } -
Updated dependencies [
4ab5a40,485cd08,e3b3ef5,3261957]:- miniflare@4.20250604.0
- @cloudflare/unenv-preset@2.3.3
4.19.1
Patch Changes
- #9456
db2cdc6Thanks @WillTaylorDev! - Fix bug causing preview alias to always be generated.
4.19.0
Minor Changes
- #9401
03b8c1cThanks @WillTaylorDev! - Provide ability for Wrangler to upload preview aliases during version upload.
Patch Changes
-
#9390
80e75f4Thanks @penalosa! - Support additional Mixed Mode resources in Wrangler:- AI
- Browser
- Images
- Vectorize
- Dispatch Namespaces
-
#9395
b3be057Thanks @Maximo-Guk! - Add WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST for Workers CI -
#9410
87f3843Thanks @dario-piotrowicz! - enable consumers ofunstable_readConfigto silenceremotewarnings -
Updated dependencies [
8c7ce77,80e75f4,80e75f4,fac2f9d,92719a5]:
4.18.0
Minor Changes
- #9393
34b6174Thanks @jamesopstad! - Hard fail on Node.js < 20. Wrangler no longer supports Node.js 18.x as it reached end-of-life on 2025-04-30. See https://github.com/nodejs/release?tab=readme-ov-file#end-of-life-releases.
Patch Changes
-
#9308
d3a6eb3Thanks @dario-piotrowicz! - expose new utilities and types to aid consumers of the programmatic mixed-mode APISpecifically the exports have been added:
Experimental_MixedModeSession: type representing a mixed-mode sessionExperimental_ConfigBindingsOptions: type representing config-bindingsexperimental_pickRemoteBindings: utility for picking only the remote bindings from a record of start-worker bindings.unstable_convertConfigBindingsToStartWorkerBindings: utility for converting config-bindings into start-worker bindings (that can be passed tostartMixedModeSession)
-
#9347
b8f058cThanks @penalosa! - Improve binding display on narrower terminals
4.17.0
Minor Changes
-
#9321
6c03bdeThanks @petebacondarwin! - Add support for FedRAMP High compliance regionNow it is possible to target Wrangler at the FedRAMP High compliance region. There are two ways to signal to Wrangler to run in this mode:
- set
"compliance_region": "fedramp_high"in a Wrangler configuration - set
CLOUDFLARE_COMPLIANCE_REGION=fedramp_highenvironment variable when running Wrangler
If both are provided and the values do not match then Wrangler will exit with an error.
When in this mode OAuth authentication is not supported. It is necessary to authenticate using a Cloudflare API Token acquired from the Cloudflare FedRAMP High dashboard.
Most bindings and commands are supported in this mode.
- Unsupported commands may result in API requests that are not supported - possibly 422 Unprocessable Entity responses.
- Unsupported bindings may work in local dev, as there is no local validation, but will fail at Worker deployment time.
Resolves DEVX-1921.
- set
-
#9330
34c71ceThanks @edmundhung! - Updated internal configuration to use Miniflare’s newdefaultPersistRootinstead of per-pluginpersistflags -
#8973
cc7fae4Thanks @Caio-Nogueira! - Show latest instance by default onworkflows instances describecommand
Patch Changes
-
#9335
6479fc5Thanks @penalosa! - Redesignwrangler devto more clearly present information and have a bit of a glow up ✨ -
#9329
410d985Thanks @penalosa! - Hide logs in thestartMixedModeSession()API -
#9325
c2678d1Thanks @edmundhung! - refactor: fallbacks to local image binding from miniflare when local mode is enabled -
Updated dependencies [
34c71ce,f7c82a4,7ddd865,6479fc5,e5ae13a]:
4.16.1
Patch Changes
4.16.0
Minor Changes
-
#9288
3b8f7f1Thanks @petebacondarwin! - allow --name and --env args on wrangler deployPreviously it was not possible to provide a Worker name as a command line argument at the same time as setting the Wrangler environment. Now specifying
--nameis supported and will override any names set in the Wrangler config:wrangler.json
{ "name": "config-worker" "env": { "staging": { "name": "config-worker-env" } } }Command Previous (Worker name) Proposed (Worker name) Comment wrangler deploy --name=args-worker "args-worker" "args-worker" CLI arg used wrangler deploy --name=args-worker --env=staging Error "args-worker" CLI arg used wrangler deploy --name=args-worker --env=prod Error "args-worker" CLI arg used wrangler deploy "config-worker" "config-worker" Top-level config used wrangler deploy --env=staging "config-worker-env" "config-worker-env" Named env config used wrangler deploy --env=prod "config-worker-prod" "config-worker-prod" CLI arg and top-level config combined -
#9265
16de0d5Thanks @edmundhung! - docs: add documentation links to individual config properties in the JSON schema of the Wrangler config file
Patch Changes
-
#9234
2fe6219Thanks @emily-shen! - fix: add no-oppropstoctxingetPlatformProxyto fix type mismatch -
#9269
66d975eThanks @dario-piotrowicz! - Wire up mixed-mode remote bindings for multi-workerwrangler devUnder the
--x-mixed-modeflag, make sure that bindings configurations withremote: trueactually generate bindings to remote resources during a multi-workerwrangler devsession, currently the bindings included in this are: services, kv_namespaces, r2_buckets, d1_databases, queues and workflows.Also include the ai binding since the bindings is already remote by default anyways.
-
#9151
5ab035dThanks @gabivlj! - wrangler containers can be configured with the kind of application rollout onapply -
#9231
02d40edThanks @dario-piotrowicz! - Wire up mixed-mode remote bindings for (single-worker)wrangler devUnder the
--x-mixed-modeflag, make sure that bindings configurations withremote: trueactually generate bindings to remote resources during a single-workerwrangler devsession, currently the bindings included in this are: services, kv_namespaces, r2_buckets, d1_databases, queues and workflows.Also include the ai binding since the bindings is already remote by default anyways.
-
#9277
db5ea8fThanks @penalosa! - Support Mixed Mode for more binding types -
#9266
f2a16f1Thanks @petebacondarwin! - fix: setting triggers.crons:[] in Wrangler config should delete deployed cron schedules -
#9245
b87b472Thanks @penalosa! - Support Mixed Mode Dispatch Namespaces
4.15.2
Patch Changes
-
#9257
33daa09Thanks @penalosa! - Relax R2 bucket validation forpages devcommands -
#9256
3b384e2Thanks @penalosa! - Move the Analytics Engine simulator implementation from JSRPC to a Wrapped binding. This fixes a regression introduced in https://github.com/cloudflare/workers-sdk/pull/8935 that preventing Analytics Engine bindings working in local dev for Workers with a compatibility date prior to JSRPC being enabled. -
Updated dependencies [
3b384e2]:- miniflare@4.20250508.2
- @cloudflare/unenv-preset@2.3.2
4.15.1
Patch Changes
-
#9246
d033a7dThanks @edmundhung! - fix: stripCF-Connecting-IPheader withinfetchIn v4.15.0, Miniflare began stripping the
CF-Connecting-IPheader via a global outbound service, which led to a TCP connection regression due to a bug in Workerd. This PR patches thefetchAPI to strip the header during localwrangler devsessions as a temporary workaround until the underlying issue is resolved. -
Updated dependencies [
f61a08e,ea71df3,d033a7d]:- @cloudflare/unenv-preset@2.3.2
- miniflare@4.20250508.1
4.15.0
Minor Changes
-
#8794
02f0699Thanks @eastlondoner! - This adds support for more accurate types for service bindings when runningwrangler types. Previously, runningwrangler typeswith a config including a service binding would generate anEnvtype like this:interface Env { SERVICE_BINDING: Fetcher; }This type was "correct", but didn't capture the possibility of using JSRPC to communicate with the service binding. Now, running
wrangler types -c wrangler.json -c ../service/wrangler.json(the first config representing the current Worker, and any additional configs representing service bound Workers) will generate anEnvtype like this:interface Env { SERVICE_BINDING: Service<import("../service/src/index").Entrypoint>; } -
#8716
63a6504Thanks @ItsWendell! - add --metafile flag to generate esbuild metadata file during build -
#9122
f17ee08Thanks @avenceslau! - Unhide wrangler workflows delete command
Patch Changes
-
#9168
6b42c28Thanks @dario-piotrowicz! - remove experimentalMixedModeConnectionStringtyperemove the experimental
MixedModeConnectionStringtype which is now exposed by Miniflare instead -
#7914
37af035Thanks @andyjessop! - fix(miniflare): strip CF-Connecting-IP header from all outbound requests -
#9161
53ba97dThanks @lambrospetrou! - Fix d1 info command showing read_replication: [object Object] -
#9183
f6f1a18Thanks @dario-piotrowicz! - addremoteoption to initial bindingsadd the
remoteoption (initial implementation gated behind--x-mixed-mode) for the following bindings:service,kv,r2,d1,queueandworkflow -
#9149
415520eThanks @penalosa! - Implement mixed mode proxy server & client -
Updated dependencies [
37af035,ceeb375,349cffc,362cb0b,2cc8197,6b42c28]:
4.14.4
Patch Changes
-
#9124
d0d62e6Thanks @dario-piotrowicz! - make thatunstable_startWorkercan correctly throw configuration errorsmake sure that
unstable_startWorkercan throw configuration related errors when:- the utility is called
- the worker's
setConfigis called with thethrowErrorsargument set totrue
additionally when an error is thrown when
unstable_startWorkeris called make sure that the worker is properly disposed (since, given the fact that it is not returned by the utility the utility's caller wouldn't have any way to dispose it themselves)
4.14.3
Patch Changes
-
#9158
826c5e8Thanks @petebacondarwin! - fix CallSite.toString() not to throw -
#9159
c6b3f10Thanks @petebacondarwin! - bump esbuild version to fix regression in 0.25.0 -
#8985
078c568Thanks @gabivlj! -wrangler deployis able to deploy new container versions -
#9162
8c3cdc3Thanks @petebacondarwin! - Do not report "d1 execute" command file missing error to Sentry
4.14.2
Patch Changes
-
#9118
1cd30a5Thanks @dario-piotrowicz! - fix: remove outdated js-doc comment forunstable_startDevWorker'sentrypoint -
#9120
11aa362Thanks @dario-piotrowicz! - Addexperimental_startMixedModeSessionno-op utilityThis experimental utility has no effect. More details will be shared as we roll out its functionality.
-
#7423
2be85d7Thanks @penalosa! - Make sure custom build logging output is more clearly signposted, and make sure it doesn't interfere with the interactive dev session output. -
#9112
3fe85d4Thanks @penalosa! - Warn if the Node.js version is below Node.js 20
4.14.1
Patch Changes
-
#9085
cdc88d8Thanks @petebacondarwin! - Do not include .wrangler and Wrangler config files in additional modulesPreviously, if you added modules rules such as
**/*.jsor**/*.json, specifiedno_bundle: true, and the entry-point to the Worker was in the project root directory, Wrangler could include files that were not intended, such as.wrangler/tmp/xxx.jsor the Wrangler config file itself. Now these files are automatically skipped when trying to find additional modules by searching the file tree. -
#9095
508a1a3Thanks @petebacondarwin! - wrangler login put custom callback host and port into the auth URL -
#9113
82e220eThanks @dario-piotrowicz! - Addx-mixed-modeflagThis experimental flag currently has no effect. More details will be shared as we roll out its functionality.
-
Updated dependencies [
357d42a]:
4.14.0
Minor Changes
-
#8981
3b60131Thanks @Caio-Nogueira! - Adds support for waitForEvent step type -
#9083
137d2daThanks @penalosa! - Support Tail Workers in local dev
Patch Changes
-
#8975
9bf55aaThanks @Caio-Nogueira! - Adds missingwaitingstatus on thewrangler workflow instances listcommand -
#9048
0b4d22aThanks @garvit-gupta! - fix: Validate input file for Vectorize inserts
4.13.2
Patch Changes
- Updated dependencies [
2c50115]:
4.13.1
Patch Changes
-
#8983
f5ebb33Thanks @Caio-Nogueira! - Remove open-beta disclaimer from workflows commands -
#8990
6291fa1Thanks @emily-shen! - fix: When generating Env types, set type of version metadata binding toWorkerVersionMetadata. This means it now correctly includes thetimestampfield. -
#8966
234afaeThanks @penalosa! - Internal refactor to use thecreateCommandutility
4.13.0
Minor Changes
-
#8640
5ce70bdThanks @kentonv! - Add support for definingpropson a Service binding.In your configuration file, you can define a service binding with props:
{ "services": [ { "binding": "MY_SERVICE", "service": "some-worker", "props": { "foo": 123, "bar": "value" } } ] }These can then be accessed by the callee:
import { WorkerEntrypoint } from "cloudflare:workers"; export default class extends WorkerEntrypoint { fetch() { return new Response(JSON.stringify(this.ctx.props)); } } -
#8771
0cfcfe0Thanks @dario-piotrowicz! - feat: addconfig.keep_namesoptionAdds a new option to Wrangler to allow developers to opt out of esbuild's
keep_namesoption (https://esbuild.github.io/api/#keep-names). By default, Wrangler sets this totrueThis is something developers should not usually need to care about, but sometimes
keep_namescan create issues, and in such cases they will be now able to opt-out.Example
wrangler.jsonc:{ "name": "my-worker", "main": "src/worker.ts", "keep_names": false }
Patch Changes
4.12.1
Patch Changes
-
#8935
41f095bThanks @penalosa! - Internal refactor to move local analytics engine support from Wrangler to Miniflare
4.12.0
Minor Changes
- #8316
69864b4Thanks @gnekich! - introduce callback-host and callback-port param for wrangler login command
Patch Changes
-
#8889
eab7ad9Thanks @penalosa! - When Wrangler encounters an error, if the Bun runtime is detected it will now warn users that Wrangler does not officially support Bun. -
#8673
5de2b9aThanks @IRCody! - Add containers {info, list, delete} subcommands. -
Updated dependencies [
62c40d7]:
4.11.1
Patch Changes
-
#8950
bab1724Thanks @edmundhung! - fix: include telemetry-related environment variables in release builds -
#8903
085a565Thanks @emily-shen! - disable eslint in generated types file -
Updated dependencies [
511be3d]:
4.11.0
Minor Changes
-
#8890
c912b99Thanks @edmundhung! - update esbuild version to 0.25 -
#8711
4cc036dThanks @CarmenPopoviciu! - Add the Pages deployment id to the JSON output forwrangler pages deployment list -
#8244
84ecfe9Thanks @CarmenPopoviciu! - feat: Add debug logs to capture assets upload status, specifically:- which asset files were read from the file system
- which files were successfully uploaded
Patch Changes
-
#8885
f2802f9Thanks @CarmenPopoviciu! - Disambiguate the "No files to upload. Proceeding with deployment..." message -
#8924
d2b44a2Thanks @dario-piotrowicz! - fix redirected config env validation breaking wrangler pages commandsa validation check has recently been introduced to make wrangler error on deploy commands when an environment is specified and a redirected configuration is in use (the reason being that redirected configurations should not include any environment), this check is problematic with pages commands where the "production" environment is anyways set by default, to address this the validation check is being relaxed here on pages commands
-
Updated dependencies [
f5413c5]:
4.10.0
Minor Changes
- #8807
dcce2ecThanks @LuisDuarte1! - Promote workflows commands to stable
Patch Changes
4.9.1
Patch Changes
- Updated dependencies [
d454ad9]:
4.9.0
Minor Changes
Patch Changes
-
#8809
09464a6Thanks @dario-piotrowicz! - improve error message when redirected config contains environmentsthis change improves that validation error message that users see when a redirected config file contains environments, by:
- cleaning the message formatting and displaying the offending environments in a list
- prompting the user to report the issue to the author of the tool which has generated the config
-
#8829
62df08aThanks @cmackenzie1! - Add option--cors-origin noneto remove CORS settings on a pipeline
4.8.0
Minor Changes
- #8394
93267cfThanks @edmundhung! - Support Secrets Store Secret bindings
Patch Changes
-
#8780
4e69fb6Thanks @cmackenzie1! - - Renamewrangler pipelines showtowrangler pipelines get- Replace
--enable-worker-bindingand--enable-httpwith--source workerand--source http(or--source http workerfor both) - Remove
--file-templateand--partition-templateflags fromwrangler pipelines create|update - Add pretty output for
wrangler pipelines get <pipeline>. Existing output is available using--format=json. - Clarify the minimums, maximums, and defaults (if unset) for
wrangler pipelines createcommands.
- Replace
-
#8596
75b454cThanks @dario-piotrowicz! - add validation to redirected configs in regards to environmentsadd the following validation behaviors to wrangler deploy commands, that relate to redirected configs (i.e. config files specified by
.wrangler/deploy/config.jsonfiles):- redirected configs are supposed to be already flattened configurations without any environment (i.e. a build tool should generate redirected configs already targeting specific environments), so if wrangler encounters a redirected config with some environments defined it should error
- given the point above, specifying an environment (
--env=my-env) when using redirected configs is incorrect, so these environments should be ignored and a warning should be presented to the user
-
#8795
d4c1171Thanks @GregBrimble! - feat: Unhidewrangler pages functions buildcommand.This is already documented for Pages Plugins and by officially documenting it, we can ease the transition to Workers Assets for users of Pages Functions.
4.7.2
Patch Changes
-
#8763
2650fd3Thanks @garrettgu10! - R2 data catalog URIs now separate account ID and warehouse name with a slash rather than an underscore -
#8341
196f51dThanks @kotkoroid! - Improve error message when request to obtain membership info failsWrangler now informs user that specific permission might be not granted when fails to obtain membership info. The same information is provided when Wrangler is unable to fetch user's email.
4.7.1
Patch Changes
-
#8746
7427004Thanks @emily-shen! - Log whether a command is operating on a remote or local resource -
#8757
199caa4Thanks @emily-shen! - fix: return actual error onwrangler secret bulk -
#8750
80ef13cThanks @emily-shen! - fix: include documentation_url in API Errors if provided -
#8759
55b336fThanks @garvit-gupta! - fix: Minor refactor for the r2 data catalog commands -
#8753
245cfbdThanks @cmackenzie1! - - Hide--transform-workerflag onwrangler pipelines <create|update>during private beta.- Add
--shard-countoption forwrangler pipelines <create|update>for more control over Pipeline throughput or file size
- Add
-
Updated dependencies [
007f322]:
4.7.0
Minor Changes
Patch Changes
-
#8720
8df60b5Thanks @lukevalenta! - Fix logic to derive resource name from binding by replacing all underscores with dashes -
#8697
ec1f813Thanks @emily-shen! - fix: stop getPlatformProxy crashing when internal DOs are presentInternal DOs still do not work with getPlatformProxy, but warn instead of crashing.
-
#8737
624882eThanks @garvit-gupta! - fix: General improvements for the R2 catalog commands
4.6.0
Minor Changes
- #8548
24c2c8fThanks @garvit-gupta! - feat: Add wrangler commands for R2 Data Catalog
Patch Changes
4.5.1
Patch Changes
-
#8666
f29f018Thanks @penalosa! - RemoveNodeJSCompatModule. This was never fully supported, and never worked for deploying Workers from Wrangler.
4.5.0
Minor Changes
Patch Changes
-
#8435
8e3688fThanks @emily-shen! - fix: include assets binding when printing summary of bindings -
#8675
f043b74Thanks @vicb! - Bump@cloudflare/unenv-presetto 2.3.1Use the workerd native implementation of
createSecureContextandcheckServerIdentityfromnode:tls. The functions have been implemented incloudflare/workerd#3754.
4.4.1
Patch Changes
-
#8655
7682675Thanks @emily-shen! - fix bug where assets in directories starting with . would crash the dev server -
#8604
d8c0495Thanks @dario-piotrowicz! - Amendpages deverror message when an environment is requested -
#8536
e4b76e8Thanks @gabivlj! - wrangler cloudchamber create explicitly sets IPv6 predefined -
Updated dependencies [
7682675,9c844f7,29cb306]:- miniflare@4.20250321.0
- @cloudflare/unenv-preset@2.3.1
4.4.0
Minor Changes
-
#8575
4a5f270Thanks @LuisDuarte1! - Add workflows delete API endpoint -
#8578
5f151fcThanks @LuisDuarte1! - Add terminate-all command to workflows -
#8382
0d1240bThanks @jvaughan-cloudflare! - Add Secrets Store command support to Wrangler CLI -
#8569
1c94eeeThanks @vicb! - Bump@cloudflare/unenv-presetto 2.3.0Enable the recently implemented native APIs from
node:crypto
Patch Changes
-
#8556
b7d6b7dThanks @GregBrimble! - Add support forassets_navigation_prefer_asset_servingin Vite (devandpreview) -
#8597
5d78760Thanks @CarmenPopoviciu! - feat: Graduate experimental RPC support for Workers with assets in local dev
4.3.0
Minor Changes
-
#8258
9adbd50Thanks @knickish! - Enable the creation of MySQL Hypedrive configs via the Wrangler CLI. -
#8353
c4fa349Thanks @jbwcloudflare! - Add new command to purge a QueueThis new command can be used to delete all existing messages in a Queue
-
#8461
86ab0caThanks @GregBrimble! - Add a 'allowTrailingCommas: true' option to improve IDE experience of 'wrangler.jsonc?' -
#8550
5ae12a9Thanks @vicb! - Bump@cloudflare/unenv-presetto 2.2.0Use the workerd native implementation for
node:tls
Patch Changes
-
#8501
383dc0aThanks @GregBrimble! - Add support forassets_navigation_prefers_asset_servingcompatibility flag inwrangler dev -
#8562
8278db5Thanks @IRCody! - Add initial containers subcommand to wrangler. -
#8376
a25f060Thanks @CarmenPopoviciu! - feat: Make local dev RPC behaviour on par with production for Workers with assets -
#8534
62d5471Thanks @petebacondarwin! - improve the error messaging when the user provides neither an entry point nor an asset directory -
#8528
2a43cdcThanks @cmackenzie1! - Support wrangler types for Pipelines -
#8579
29015e5Thanks @cmackenzie1! - Allowwrangler pipelines update <pipelineName> --transform-worker noneto remove transformations from a Pipeline. -
Updated dependencies [
9adbd50,dae7bd4,a25f060,a7bd79b]:- miniflare@4.20250319.0
- @cloudflare/unenv-preset@2.3.0
4.2.0
Minor Changes
- #8477
fd9dff8Thanks @gabivlj! - wrangler deploy includes container configuration when uploading the script
Patch Changes
-
#8220
14680b9Thanks @IRCody! - Fix a bug in cloudchamber build where it would still attempt to push an image if the build failed. -
#8186
05973bbThanks @IRCody! - Add cloudchamber images {list,delete} commands to list and delete images stored in cloudchamber managed registry. -
Updated dependencies [
ff26dc2,4ad78ea]:- miniflare@4.20250317.1
- @cloudflare/unenv-preset@2.2.0
4.1.0
Minor Changes
-
#8337
1b2aa91Thanks @Ltadrian! - Add mTLS configuration fields to Hyperdrive commandhyperdrive create test123 ... --ca-certificate-uuid=CA_CERT_UUID --mtls-certificate-uuid=MTLS_CERT_UUID
Patch Changes
-
#8401
b8fd1b1Thanks @petebacondarwin! - Supportno_bundleconfig in Pages for bothdevanddeploy.This was already supported via a command line arg (
--no-bundle). -
#8472
4978e5bThanks @edmundhung! - fix: throw explicit error for unknown mimetype duringwrangler check startup -
#8478
931b53dThanks @penalosa! - Addwrangler typessupport for importable env andprocess.env -
#8503
edf169dThanks @GregBrimble! - Fix Workers Assets metafiles (_headersand_redirects) resolution when running Wrangler from a different directory
4.0.0
Major Changes
-
#7334
869ec7bThanks @penalosa! - Use--localby default forwrangler kv keyandwrangler r2 objectcommands -
#7334
869ec7bThanks @dario-piotrowicz! - chore: remove deprecatedgetBindingsProxyremove the deprecated
getBindingsProxyutility which has been replaced withgetPlatformProxy -
#7334
869ec7bThanks @penalosa! - Remove the deprecated--formatargument onwrangler deployandwrangler dev.Remove deprecated config fields:
typewebpack_configminiflarebuild.uploadzone_idusage_modelexperimental_serviceskv-namespaces
-
#7334
869ec7bThanks @rozenmd! - Removewrangler d1 backupsThis change removes
wrangler d1 backups, a set of alpha-only commands that would allow folks to interact with backups of their D1 alpha DBs.For production D1 DBs, you can restore previous versions of your database with
wrangler d1 time-traveland export it at any time withwrangler d1 export.Closes #7470
-
#7334
869ec7bThanks @rozenmd! - Remove--batch-sizeas an option forwrangler d1 executeandwrangler d1 migrations applyThis change removes the deprecated
--batch-sizeflag, as it is no longer necessary to decrease the number of queries wrangler sends to D1.Closes #7470
-
#7334
869ec7bThanks @rozenmd! - Remove alpha support fromwrangler d1 migrations applyThis change removes code that would take a backup of D1 alpha databases before proceeding with applying a migration.
We can remove this code as alpha DBs have not accepted queries in months.
Closes #7470
-
#7334
869ec7bThanks @penalosa! - Remove the deprecatedwrangler generatecommand. Instead, use the C3 CLI to create new projects: https://developers.cloudflare.com/pages/get-started/c3/ -
#7334
869ec7bThanks @penalosa! - Remove the deprecatedwrangler init --no-delegate-c3command.wrangler initis still available, but will always delegate to C3. -
#7334
869ec7bThanks @penalosa! - Remove support for legacy assets.This removes support for legacy assets using the
--legacy-assetsflag orlegacy_assetsconfig field. Instead, you should use Workers Assets -
#7334
869ec7bThanks @penalosa! - Remove the deprecatedwrangler publishcommand. Instead, usewrangler deploy, which takes exactly the same arguments.Additionally, remove the following deprecated commands, which are no longer supported.
wrangler configwrangler previewwrangler routewrangler subdomain
Remove the following deprecated command aliases:
wrangler secret:*, replaced bywrangler secret *wrangler kv:*, replaced bywrangler kv *
-
#7334
869ec7bThanks @penalosa! - Remove the deprecatedwrangler versioncommand. Instead, usewrangler --versionto check the current version of Wrangler. -
#7334
869ec7bThanks @penalosa! - The--node-compatflag andnode_compatconfig properties are no longer supported as of Wrangler v4. Instead, use thenodejs_compatcompatibility flag. This includes the functionality from legacynode_compatpolyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information.If you need to replicate the behaviour of the legacy
node_compatfeature, refer to https://developers.cloudflare.com/workers/wrangler/migration/update-v3-to-v4/ for a detailed guide. -
#7334
869ec7bThanks @threepointone! - chore: update esbuildThis patch updates esbuild from 0.17.19 to 0.24.2. That's a big bump! Lots has gone into esbuild since May '23. All the details are available at https://github.com/evanw/esbuild/blob/main/CHANGELOG.md / https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md.
-
We now support all modern JavasScript/TypeScript features suported by esbuild (as of December 2024). New additions include standard decorators, auto-accessors, and the
usingsyntax. -
0.18 introduced wider support for configuration specified via
tsconfig.jsonhttps://github.com/evanw/esbuild/issues/3019. After observing the (lack of) any actual broken code over the last year for this release, we feel comfortable releasing this without considering it a breaking change. -
0.19.3 introduced support for import attributes
import stuff from './stuff.json' with { type: 'json' }While we don't currently expose the esbuild configuration for developers to add their own plugins to customise how modules with import attributes are bundled, we may introduce new "types" ourselves in the future.
-
0.19.0 introduced support for wildcard imports. Specifics here (https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md#0190). tl;dr -
-
These 2 patterns will bundle all files that match the glob pattern into a single file.
const json1 = await import("./data/" + kind + ".json");const json2 = await import(`./data/${kind}.json`); -
This pattern will NOT bundle any matching patterns:
const path = "./data/" + kind + ".js"; const json2 = await import(path);You can use
find_additional_modulesto bundle any additional modules that are not referenced in the code but are required by the project.
Now, this MAY be a breaking change for some. Specifically, if you were previously using the pattern (that will now include all files matching the glob pattern in the bundle), BUT
find_additional_moduleswas NOT configured to include some files, those files would now be included in the bundle. For example, consider this code:// src/index.js export default { async fetch() { const url = new URL(request.url); const name = url.pathname; const value = (await import("." + name)).default; return new Response(value); }, };Imagine if in that folder, you had these 3 files:
// src/one.js export default "one";// src/two.js export default "two";// src/hidden/secret.js export default "do not share this secret";And your
wrangler.tomlwas:name = "my-worker" main = "src/index.jsBefore this update:
- A request to anything but
http://localhost:8787/would error. For example, a request tohttp://localhost:8787/one.jswould error with No such module "one.js". - Let's configure
wrangler.tomlto include all.jsfiles in thesrcfolder:
name = "my-worker" main = "src/index.js find_additional_modules = true rules = [ { type = "ESModule", globs = ["*.js"]} ]Now, a request to
http://localhost:8787/one.jswould return the contents ofsrc/one.js, but a request tohttp://localhost:8787/hidden/secret.jswould error with No such module "hidden/secret.js". To include this file, you could expand therulesarray to be:rules = [ { type = "ESModule", globs = ["**/*.js"]} ]Then, a request to
http://localhost:8787/hidden/secret.jswill return the contents ofsrc/hidden/secret.js.After this update:
- Let's put the wrangler.toml back to its original configuration:
name = "my-worker" main = "src/index.js-
Now, a request to
http://localhost:8787/one.jswill return the contents ofsrc/one.js, but a request tohttp://localhost:8787/hidden/secret.jswill ALSO return the contents ofsrc/hidden/secret.js. THIS MAY NOT BE WHAT YOU WANT. You can "fix" this in 2 ways:- Remove the inline wildcard import:
// src/index.js export default { async fetch() { const name = new URL(request.url).pathname; const moduleName = "./" + name; const value = (await import(moduleName)).default; return new Response(value); }, };Now, no extra modules are included in the bundle, and a request to
http://localhost:8787/hidden/secret.jswill throw an error. You can use thefind_additional_modulesfeature to include it again. 2. Don't use the wildcard import pattern:// src/index.js import one from "./one.js"; import two from "./two.js"; export default { async fetch() { const name = new URL(request.url).pathname; switch (name) { case "/one.js": return new Response(one); case "/two.js": return new Response(two); default: return new Response("Not found", { status: 404 }); } }, };Further, there may be some files that aren't modules (js/ts/wasm/text/binary/etc) that are in the folder being included (For example, a
photo.jpgfile). This pattern will now attempt to include them in the bundle, and throw an error. It will look like this:[ERROR] No loader is configured for ".png" files: src/photo.jpgTo fix this, simply move the offending file to a different folder.
In general, we DO NOT recommend using the wildcard import pattern. If done wrong, it can leak files into your bundle that you don't want, or make your worker slightly slower to start. If you must use it (either with a wildcard import pattern or with
find_additional_modules) you must be diligent to check that your worker is working as expected and that you are not leaking files into your bundle that you don't want. You can configure eslint to disallow dynamic imports like this:// eslint.config.js export default [ { rules: { "no-restricted-syntax": [ "error", { selector: "ImportExpression[argument.type!='Literal']", message: "Dynamic imports with non-literal arguments are not allowed.", }, ], }, }, ];
-
-
-
#7334
869ec7bThanks @pmiguel! - Remove worker name prefix from KV namespace createWhen running
wrangler kv namespace create <name>, previously the name of the namespace was automatically prefixed with the worker title, orworker-when running outside the context of a worker. After this change, KV namespaces will no longer get prefixed, and the name used is the name supplied, verbatim. -
#7334
869ec7bThanks @penalosa! - Packages in Workers SDK now support the versions of Node that Node itself supports (Current, Active, Maintenance). Currently, that includes Node v18, v20, and v22.
Minor Changes
-
#7334
869ec7bThanks @emily-shen! - Include runtime types in the output ofwrangler typesby defaultwrangler typeswill now produce one file that contains bothEnvtypes and runtime types based on your compatibility date and flags. This is located atworker-configuration.d.tsby default.This behaviour was previously gated behind
--experimental-include-runtime. That flag is no longer necessary and has been removed. It has been replaced by--include-runtimeand--include-env, both of which are set totrueby default. If you were previously using--x-include-runtime, you can drop that flag and remove the separateruntime.d.tsfile.If you were previously using
@cloudflare/workers-typeswe recommend you run uninstall (e.g.npm uninstall @cloudflare/workers-types) and runwrangler typesinstead. Note that@cloudflare/workers-typeswill continue to be published. -
#7334
869ec7bThanks @penalosa! - feat: prompt users to rerunwrangler typesduringwrangler devIf a generated types file is found at the default output location of
wrangler types(worker-configuration.d.ts), remind users to rerunwrangler typesif it looks like they're out of date.
Patch Changes
- Updated dependencies [
869ec7b,869ec7b]:- miniflare@4.20250310.0
- @cloudflare/kv-asset-handler@0.4.0
3.114.1
Patch Changes
-
#8383
8d6d722Thanks @matthewdavidrodgers! - Make kv bulk put --local respect base64:trueThe bulk put api has an optional "base64" boolean property for each key. Before storing the key, the value should be decoded from base64.
For real (remote) kv, this is handled by the rest api. For local kv, it seems the base64 field was ignored, meaning encoded base64 content was stored locally rather than the raw values.
To fix, we need to decode each value before putting to the local miniflare namespace when base64 is true.
-
#8273
e3efd68Thanks @penalosa! - Support AI, Vectorize, and Images bindings when using@cloudflare/vite-plugin -
#8427
a352798Thanks @vicb! - update unenv-preset dependency to fix bug with Performance globalFixes #8407 Fixes #8409 Fixes #8411
-
#8390
53e6323Thanks @GregBrimble! - Parse and apply metafiles (_headersand_redirects) inwrangler devfor Workers Assets -
#8392
4d9d9e6Thanks @jahands! - fix: retry zone and route lookup API callsIn rare cases, looking up Zone or Route API calls may fail due to transient errors. This change improves the reliability of
wrangler deploywhen these errors occur.Also fixes a rare issue where concurrent API requests may fail without correctly throwing an error which may cause a deployment to incorrectly appear successful.
3.114.0
Minor Changes
- #8367
7b6b0c2Thanks @jonesphillip! - Deprecated--idparameter in favor of--namefor both thewrangler r2 bucket lifecycleandwrangler r2 bucket lockcommands
3.113.0
Minor Changes
Patch Changes
-
#8338
2d40989Thanks @GregBrimble! - feat: Upload _headers and _redirects if present with Workers Assets as part ofwrangler deployandwrangler versions upload. -
#8288
cf14e17Thanks @CarmenPopoviciu! - feat: Add assets Proxy Worker skeleton in miniflareThis commit implements a very basic Proxy Worker skeleton, and wires it in the "pipeline" miniflare creates for assets. This Worker will be incrementally worked on, but for now, the current implementation will forward all incoming requests to the Router Worker, thus leaving the current assets behaviour in local dev, the same.
This is an experimental feature available under the
--x-assets-rpcflag:wrangler dev --x-assets-rpc. -
#8216
af9a57aThanks @ns476! - Support Images binding inwrangler types -
#8304
fbba583Thanks @jahands! - chore: add concurrency and caching for Zone IDs and Workers routes lookupsWorkers with many routes can result in duplicate Zone lookups during deployments, making deployments unnecessarily slow. This compounded by the lack of concurrency when making these API requests.
This change deduplicates these requests and adds concurrency to help speed up deployments.
3.112.0
Minor Changes
-
#8256
f59d95bThanks @jbwcloudflare! - Add two new Queues commands: pause-delivery and resume-deliveryThese new commands allow users to pause and resume the delivery of messages to Queue Consumers
Patch Changes
-
#8274
fce642dThanks @emily-shen! - fix bindings to entrypoints on the same worker in workers with assets -
#8201
2cad136Thanks @ichernetsky-cf! - fix: interactively list Cloudchamber deployments using labels -
#8289
a4909cbThanks @penalosa! - Add the experimental--x-assets-rpcflag to gate feature work to support JSRPC with Workers + Assets projects.
3.111.0
Minor Changes
Patch Changes
-
#8248
1cb2d34Thanks @GregBrimble! - feat: Omits Content-Type header for files of an unknown extension in Workers Assets -
#7977
36ef9c6Thanks @jkoe-cf! - fixing the format of the R2 lifecycle rule date input to be parsed as string instead of number
3.110.0
Minor Changes
- #8253
6dd1e23Thanks @CarmenPopoviciu! - Add--cwdglobal argument to thewranglerCLI to allow changing the current working directory before running any command.
Patch Changes
-
#8191
968c3d9Thanks @vicb! - Optimize global injection in node compat mode -
#8247
a9a4c33Thanks @GregBrimble! - feat: Omits Content-Type header for files of an unknown extension in Workers Assets
3.109.3
Patch Changes
- #8175
eb46f98Thanks @edmundhung! - fix:unstable_splitSqlQueryshould ignore comments when splitting sql into statements
3.109.2
Patch Changes
-
#7687
cc853cfThanks @emily-shen! - fix: bug where Pages deployments that create new projects were failing with a new repo -
#8131
efd7f97Thanks @lambrospetrou! - D1 export will now show an error when the presigned URL is invalid -
Updated dependencies [
5e06177]:
3.109.1
Patch Changes
- #8021
28b1dc7Thanks @0xD34DC0DE! - fix: prevent __cf_cjs name collision in the hybrid Nodejs compat plugin
3.109.0
Minor Changes
-
#8120
3fb801fThanks @sdnts! - Add a newupdatesubcommand for Queues to allow updating Queue settings -
#8120
3fb801fThanks @sdnts! - Allow overriding message retention duration when creating Queues -
#8026
542c6eaThanks @penalosa! - Add--outfiletowrangler deployfor generating a worker bundle.This is an advanced feature that most users won't need to use. When set, Wrangler will output your built Worker bundle in a Cloudflare specific format that captures all information needed to deploy a Worker using the Worker Upload API
-
#8026
542c6eaThanks @penalosa! - Add awrangler check startupcommand to generate a CPU profile of your Worker's startup phase.This can be imported into Chrome DevTools or opened directly in VSCode to view a flamegraph of your Worker's startup phase. Additionally, when a Worker deployment fails with a startup time error Wrangler will automatically generate a CPU profile for easy investigation.
Advanced usage:
--args: to customise the waywrangler check startupbuilds your Worker for analysis, provide the exact arguments you use when deploying your Worker withwrangler deploy. For instance, if you deploy your Worker withwrangler deploy --no-bundle, you should usewrangler check startup --args="--no-bundle"to profile the startup phase.--worker-bundle: if you don't use Wrangler to deploy your Worker, you can use this argument to provide a Worker bundle to analyse. This should be a file path to a serialised multipart upload, with the exact same format as the API expects: https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/
Patch Changes
-
#8112
fff677eThanks @penalosa! - When reporting errors to Sentry, Wrangler will now include the console output as additional metadata -
#8120
3fb801fThanks @sdnts! - Check bounds when overriding delivery delay when creating Queues -
#7950
4db1fb5Thanks @cmackenzie1! - Add local binding support for Worker Pipelines -
#8119
1bc60d7Thanks @penalosa! - Output correct config format fromwrangler d1 create. Previously, this command would always output TOML, regardless of the config file format -
#8130
1aa2a91Thanks @emily-shen! - Include default values for wrangler types --path and --x-include-runtime in telemetryUser provided strings are still left redacted as always.
-
#8061
35710e5Thanks @emily-shen! - fix: respectWRANGLER_LOGinwrangler devPreviously,
--log-level=debugwas the only way to see debug logs inwrangler dev, which was unlike all other commands. -
Updated dependencies [
4db1fb5]:
3.108.1
Patch Changes
-
#8103
a025ad2Thanks @emily-shen! - fix: fix bug wherewrangler secret list --format=jsonwas printing the wrangler banner. -
Updated dependencies []:
3.108.0
Minor Changes
-
#7990
b1966dfThanks @cmsparks! - Add WRANGLER_CI_OVERRIDE_NAME for Workers CI -
#8028
b2dca9aThanks @emily-shen! - feat: Also log when no bindings are found.We currently print a worker's bindings during dev, versions upload and deploy. This just also prints something when there's no bindings found, in case you were expecting bindings.
-
#8037
71fd250Thanks @WillTaylorDev! - Provides unsafe.metadata configurations when using wrangler versions secret put.
Patch Changes
-
#8058
1f80d69Thanks @WillTaylorDev! - Bugfix: Modified versions secret put to inherit all known bindings, which circumvents a limitation in the API which does not return all fields for all bindings. -
#7986
88514c8Thanks @andyjessop! - docs: clarifies that local resources are "simulated locally" or "connected to remote resource", and adds console messages to help explain local dev -
#8008
9d08af8Thanks @ns476! - Add support for Images bindings (in private beta for now), with optional local support for platforms where Sharp is available. -
#7769
6abe69cThanks @cmackenzie1! - Adds the following new option forwrangler pipelines createandwrangler pipelines updatecommands:--cors-origins CORS origin allowlist for HTTP endpoint (use * for any origin) [array] -
#7290
0c0374cThanks @emily-shen! - fix: add support for workers with assets when running multiple workers in onewrangler devinstancehttps://github.com/cloudflare/workers-sdk/pull/7251 added support for running multiple Workers in one
wrangler dev/miniflare session. e.g.wrangler dev -c wrangler.toml -c ../worker2/wrangler.toml, which among other things, allowed cross-service RPC to Durable Objects.However this did not work in the same way as production when there was a Worker with assets - this PR should fix that.
-
#7769
6abe69cThanks @cmackenzie1! - Rename wrangler pipelines <create|update> flagsThe following parameters have been renamed:
Previous Name New Name access-key-id r2-access-key-id secret-access-key r2-secret-access-key transform transform-worker r2 r2-bucket prefix r2-prefix binding enable-worker-binding http enable-http authentication require-http-auth filename file-template filepath partition-template -
#8012
c412a31Thanks @mtlemilio! - Use fetchPagedListResult when listing Hyperdrive configs from the APIThis fixes an issue where only 20 configs were being listed.
-
#8077
60310cdThanks @emily-shen! - feat: add telemetry to experimental auto-provisioning
3.107.3
Patch Changes
-
#7378
59c7c8eThanks @IRCody! - Add build and push helper sub-commands under the cloudchamber command. -
Updated dependencies []:
3.107.2
Patch Changes
-
#7988
444a630Thanks @edmundhung! - Fix #7985.This reverts the changes on #7945 that caused compatibility issues with Node 16 due to the introduction of
sharp.
3.107.1
Patch Changes
-
#7981
e2b3306Thanks @WalshyDev! - Fixes a regression introduced in Wrangler 3.107.0 in which[assets]was not being inherited from the top-level environment. -
Updated dependencies [
ab49886]:
3.107.0
Minor Changes
- #7897
34f9797Thanks @WillTaylorDev! - chore: providesrun_worker_firstfor Worker-script-first configuration. Deprecatesexperimental_serve_directly.
Patch Changes
-
#7945
d758215Thanks @ns476! - Add Images binding (in private beta for the time being) -
#7947
f57bc4eThanks @dario-piotrowicz! - fix: avoidgetPlatformProxylogging twice that it is using vars defined in.dev.varsfileswhen
getPlatformProxyis called and it retrieves values from.dev.varsfiles, it logs twice a message like:Using vars defined in .dev.vars, the changes here make sure that in such cases this log only appears once -
#7889
38db4edThanks @emily-shen! - feat: add experimental resource auto-provisioning to versions upload -
#7864
de6fa18Thanks @dario-piotrowicz! - Update theunstable_getMiniflareWorkerOptionstypes to always include anenvparameter.The
unstable_getMiniflareWorkerOptionstypes, when accepting a config object as the first argument, didn't accept a secondenvargument. The changes here make sure they do, since theenvis still relevant for picking up variables from.dev.varsfiles. -
#7964
bc4d6c8Thanks @LuisDuarte1! - Fix scripts binding to a workflow in a different script overriding workflow config -
Updated dependencies [
cf4f47a]:
3.106.0
Minor Changes
-
#7856
2b6f149Thanks @emily-shen! - feat: add sanitised error messages to Wrangler telemetryError messages that have been audited for potential inclusion of personal information, and explicitly opted-in, are now included in Wrangler's telemetry collection. Collected error messages will not include any filepaths, user input or any other potentially private content.
-
#7900
bd9228eThanks @vicb! - chore(wrangler): update unenv dependency versionunenv@2.0.0-rc.1allows using the workerd implementation for the Node modulesnet,timers, andtimers/promises. Seeunjs/unenv#396.
Patch Changes
-
#7904
50b13f6Thanks @WalshyDev! - fix: validation for R2 bucket names, the regex was wrongly rejecting buckets starting with a number and the message wasn't as clear as it could be on what was going wrong. -
#7895
134d61dThanks @jahands! - Fix regression in retryOnAPIFailure preventing any requests from being retriedAlso fixes a regression in pipelines that prevented 401 errors from being retried when waiting for an API token to become active.
-
#7879
5c02e46Thanks @andyjessop! - Fix to not require local connection string when using Hyperdrive and wrangler dev --remote -
#7860
13ab591Thanks @vicb! - refactor(wrangler): make JSON parsing independent of NodeSwitch
jsonc-parserto parse json:JSON.parse()exception messages are not stable across Node versions- While
jsonc-parseris used, JSONC specific syntax is disabled
-
Updated dependencies []:
3.105.1
Patch Changes
-
#7884
fd5a455Thanks @emily-shen! - feat: make experiemntal auto-provisioning non-interactive by default. -
#7811
7d138d9Thanks @joshthoward! - Fix RPC method invocations showing up as unknown events -
Updated dependencies [
40f89a9]:
3.105.0
Minor Changes
-
#7466
e5ebdb1Thanks @Ltadrian! - feat: implement thewrangler cert uploadcommandThis command allows users to upload a mTLS certificate/private key or certificate-authority certificate chain.
For uploading mTLS certificate, run:
wrangler cert upload mtls-certificate --cert cert.pem --key key.pem --name MY_CERT
For uploading CA certificate chain, run:
wrangler cert upload certificate-authority --ca-cert server-ca.pem --name SERVER_CA
Patch Changes
-
#7867
bdc7958Thanks @penalosa! - Revert https://github.com/cloudflare/workers-sdk/pull/7816. This feature added support for the ASSETS bindings to thegetPlatformProxy()API, but caused a regression when runningnpm run previewin newly generated Workers Assets projects. -
#7868
78a9a2dThanks @penalosa! - Revert "Hyperdrive dev remote fix". This PR includes e2e tests that were not run before merging, and are currently failing. -
Updated dependencies []:
3.104.0
Minor Changes
-
#7715
26fa9e8Thanks @penalosa! - Support service bindings from Pages projects to Workers in a singleworkerdinstance. To try it out, pass multiple-cflags to Wrangler: i.e.wrangler pages dev -c wrangler.toml -c ../other-worker/wrangler.toml. The first-cflag must point to your Pages config file, and the rest should point to Workers that are bound to your Pages project. -
#7816
f6cc029Thanks @dario-piotrowicz! - add support for assets bindings togetPlatformProxythis change makes sure that that
getPlatformProxy, when the input configuration file contains an assets field, correctly returns the appropriate asset binding proxyexample:
// wrangler.json { "name": "my-worker", "assets": { "directory": "./public/", "binding": "ASSETS" }, "vars": { "MY_VAR": "my-var" } }import { getPlatformProxy } from "wrangler"; const { env, dispose } = await getPlatformProxy(); if (env.ASSETS) { const text = await ( await env.ASSETS.fetch("http://0.0.0.0/file.txt") ).text(); console.log(text); // logs the content of file.txt } await dispose();
Patch Changes
-
#7785
cccfe51Thanks @joshthoward! - Fix Durable Objects transfer migration validation -
#7821
fcaa02cThanks @vicb! - fix(wrangler): fix wrangler config schema defaults -
#7832
97d2a1bThanks @petebacondarwin! - Relax the messaging when Wrangler uses redirected configurationPreviously the messaging was rendered as a warning, which implied that the user had done something wrong. Now it is just a regular info message.
-
#7806
d7adb50Thanks @vicb! - chore: update unenv to 2.0.0-rc.0Pull a couple changes in node:timers
- unjs/unenv#384 fix function bindings in node:timer
- unjs/unenv#385 implement active and _unrefActive in node:timer
The unenv update also includes #unjs/unenv/381 which implements
stdout,stderrandstdinofnode:processwithnode:tty -
#7828
9077a67Thanks @edmundhung! - improve multi account error message in non-interactive mode -
Updated dependencies []:
3.103.2
Patch Changes
3.103.1
Patch Changes
- #7798
a1ff045Thanks @CarmenPopoviciu! - Reverts #7720 as it introduced breakage in some of the C3 templates (eg. Nuxt)
3.103.0
Minor Changes
-
#5086
8faf2c0Thanks @dario-piotrowicz! - add--strict-varsoption towrangler typesadd a new
--strict-varsoption towrangler typesthat developers can (by setting the flag tofalse) use to disable the default strict/literal types generation for their variablesopting out of strict variables can be useful when developers change often their
varsvalues, even more so when multiple environments are involvedExample
With a toml containing:
[vars] MY_VARIABLE = "production_value" MY_NUMBERS = [1, 2, 3] [env.staging.vars] MY_VARIABLE = "staging_value" MY_NUMBERS = [7, 8, 9]the
wrangler typescommand would generate the following interface:interface Env { MY_VARIABLE: "production_value" | "staging_value"; MY_NUMBERS: [1,2,3] | [7,8,9]; }while
wrangler types --strict-vars=falsewould instead generate:interface Env { MY_VARIABLE: string; MY_NUMBERS: number[]; }(allowing the developer to easily change their toml variables without the risk of breaking typescript types)
Patch Changes
-
#7720
902e3afThanks @vicb! - chore(wrangler): use the unenv preset from@cloudflare/unenv-preset -
#7760
19228e5Thanks @vicb! - chore: update unenv dependency version -
#7735
e8aaa39Thanks @penalosa! - Unwrap the error cause when available to send to Sentry -
#5086
8faf2c0Thanks @dario-piotrowicz! - fix: widen multi-envvarstypes inwrangler typesCurrently, the type generated for
varsis a string literal consisting of the value of the variable in the top level environment. If multiple environments are specified this wrongly restricts the type, since the variable could contain any of the values from each of the environments.For example, given a
wrangler.tomlcontaining the following:[vars] MY_VAR = "dev value" [env.production.vars] MY_VAR = "prod value"running
wrangler typeswould generate:interface Env { MY_VAR: "dev value"; }making typescript incorrectly assume that
MY_VARis always going to be"dev value"after these changes, the generated interface would instead be:
interface Env { MY_VAR: "dev value" | "prod value"; } -
#7733
dceb196Thanks @emily-shen! - feat: pull resource names for provisioning from config if providedUses
database_nameandbucket_namefor provisioning if specified. For R2, this only happens if there is not a bucket with that name already. Also respects R2jurisdictionif provided. -
Updated dependencies []:
3.102.0
Minor Changes
- #7592
f613276Thanks @garrettgu10! - New filter validation logic supporting set and range queries in Vectorize CLI
Patch Changes
-
#7750
df0e5beThanks @andyjessop! - bug: Removes the (local) tag on Vectorize bindings in the console output ofwrangler dev, and adds-in the same tag for Durable Objects (which are emulated locally inwrangler dev). -
#7706
c63f1b0Thanks @penalosa! - Remove the server-based dev registry in favour of the more stable file-based dev registry. There should be no user-facing impact. -
Updated dependencies [
8e9aa40]:
3.101.0
Minor Changes
-
#7534
7c8ae1cThanks @cmackenzie1! - feat: Use OAuth flow to generate R2 tokens for Pipelines -
#7674
45d1d1eThanks @Ankcorn! - Add support for env files to wrangler secret bulk i.e..dev.varsRun
wrangler secret bulk .dev.varsto add the env file//.dev.vars KEY=VALUE KEY_2=VALUEThis will upload the secrets KEY and KEY_2 to your worker
-
#7442
e4716ccThanks @petebacondarwin! - feat: add support for redirecting Wrangler to a generated config when running deploy-related commandsThis new feature is designed for build tools and frameworks to provide a deploy-specific configuration, which Wrangler can use instead of user configuration when running deploy-related commands. It is not expected that developers of Workers will need to use this feature directly.
Affected commands
The commands that use this feature are:
wrangler deploywrangler devwrangler versions uploadwrangler versions deploywrangler pages deploywrangler pages buildwrangler pages build-env
Config redirect file
When running these commands, Wrangler will look up the directory tree from the current working directory for a file at the path
.wrangler/deploy/config.json. This file must contain only a single JSON object of the form:{ "configPath": "../../path/to/wrangler.json" }When this file exists Wrangler will follow the
configPath(relative to the.wrangler/deploy/config.jsonfile) to find an alternative Wrangler configuration file to load and use as part of this command.When this happens Wrangler will display a warning to the user to indicate that the configuration has been redirected to a different file than the user's configuration file.
Custom build tool example
A common approach that a build tool might choose to implement.
-
The user writes code that uses Cloudflare Workers resources, configured via a user
wrangler.tomlfile.name = "my-worker" main = "src/index.ts" [[kv_namespaces]] binding = "<BINDING_NAME1>" id = "<NAMESPACE_ID1>"Note that this configuration points
mainat user code entry-point. -
The user runs a custom build, which might read the
wrangler.tomlto find the entry-point:> my-tool build -
This tool generates a
distdirectory that contains both compiled code and a new deployment configuration file, but also a.wrangler/deploy/config.jsonfile that redirects Wrangler to this new deployment configuration file:- dist - index.js - wrangler.json - .wrangler - deploy - config.jsonThe
dist/wrangler.jsonwill contain:{ "name": "my-worker", "main": "./index.js", "kv_namespaces": [ { "binding": "<BINDING_NAME1>", "id": "<NAMESPACE_ID1>" } ] }And the
.wrangler/deploy/config.jsonwill contain:{ "configPath": "../../dist/wrangler.json" }
-
#7685
9d2740aThanks @vicb! - allow overriding the unenv preset.By default wrangler uses the bundled unenv preset.
Setting
WRANGLER_UNENV_RESOLVE_PATHSallow to use another version of the preset. Those paths are used when resolving the unenv module identifiers to absolute paths. This can be used to test a development version. -
#7694
f3c2f69Thanks @joshthoward! - Default wrangler d1 export to --local rather than failing
Patch Changes
-
#7456
ff4e77eThanks @andyjessop! - chore: removes --experimental-versions flag, as versions is now GA. -
#7712
6439347Thanks @penalosa! - Remove CF-Connecting-IP for requests to the edge preview -
#7703
e771fe9Thanks @petebacondarwin! - include the top level Worker name in the parsed config structure -
#7576
773bda8Thanks @cmackenzie1! - Remove defaults forbatch-max-*pipeline parameters and define value ranges
3.100.0
Minor Changes
-
#7604
6c2f173Thanks @CarmenPopoviciu! - feat: Capture Workers with static assets in the telemetry dataWe want to measure accurately what this number of Workers + Assets projects running in remote mode is, as this number will be a very helpful data point down the road, when more decisions around remote mode will have to be taken.
These changes add this kind of insight to our telemetry data, by capturing whether the command running is in the context of a Workers + Assets project.
N.B. With these changes in place we will be capturing the Workers + Assets context for all commands, not just wrangler dev --remote.
Patch Changes
-
#7581
cac7fa6Thanks @vicb! - chore(wrangler): update unenv dependency versionunenv now uses the workerd implementation on node:dns See the unjs/unenv#376
-
#7625
d8fb032Thanks @vicb! - feat(wrangler): use unenv builtin dependency resolutionMoving away from
require.resolve()to handle unenv aliased packages. Using the unenv builtin resolution will allow us to drop the .cjs file from the preset and to override the base path so that we can test the dev version of the preset. -
#7533
755a27cThanks @danielgek! - Add warning about the browser rendering not available on local -
#7614
8abb43fThanks @vicb! - chore(wrangler): update unenv dependency versionThe updated unenv contains a fix for the module resolution, see https://github.com/unjs/unenv/pull/378. That bug prevented us from using unenv module resolution, see https://github.com/cloudflare/workers-sdk/pull/7583.
-
Updated dependencies [
b4e0af1]:
3.99.0
Minor Changes
-
#7425
8757579Thanks @CarmenPopoviciu! - feat: Make DX improvements inwrangler dev --remoteWorkers + Assets projects have, in certain situations, a relatively degraded
wrangler dev --remotedeveloper experience, as opposed to Workers proper projects. This is due to the fact that, for Workers + Assets, we need to make extra API calls to:- check for asset files changes
- upload the changed assets, if any
This commit improves the
wrangler dev --remoteDX for Workers + Assets, for use cases when the User Worker/assets change while the API calls for previous changes are still in flight. For such use cases, we have put an exit early strategy in place, that drops the event handler execution of the previous changes, in favour of the handler triggered by the new changes. -
#7537
086a6b8Thanks @WillTaylorDev! - Provide validation around assets.experimental_serve_directly -
#7568
2bbcb93Thanks @WillTaylorDev! - Warn users when using smart placement with Workers + Assets andserve_directlyis set tofalse
Patch Changes
-
#7521
48e7e10Thanks @emily-shen! - feat: add experimental_patchConfig()experimental_patchConfig()can add to a user's config file. It preserves comments if its awrangler.jsonc. However, it is not suitable forwrangler.tomlwith comments as we cannot preserve comments on write.
3.98.0
Minor Changes
-
#7476
5124b5dThanks @WalshyDev! - feat: allow routing to Workers with Assets on any HTTP route, not just the root. For example,example.com/blog/*can now be used to serve assets. These assets will be served as though the assets directly were mounted to the root. For example, if you haveassets = { directory = "./public/" }, a route like"example.com/blog/*"and a file./public/blog/logo.png, this will be available atexample.com/blog/logo.png. Assets outside of directories which match the configured HTTP routes can still be accessed with the Assets binding or with a Service binding to this Worker. -
#7380
72935f9Thanks @CarmenPopoviciu! - Add Workers + Assets support inwrangler dev --remote
Patch Changes
-
#7573
fb819f9Thanks @emily-shen! - feat: add experimental_readRawConfig()Adds a Wrangler API to find and read a config file
-
#7549
42b9429Thanks @penalosa! - Expand metrics collection to:- Detect Pages & Workers CI
- Filter out default args (e.g.
--x-versions,--x-dev-env, and--latest) by only including args that were inargv
-
#7583
8def8c9Thanks @penalosa! - Revert support for custom unenv resolve path to address an issue with Wrangler failing to deploy Pages projects withnodejs_compat_v2in some cases
3.97.0
Minor Changes
-
#7522
6403e41Thanks @vicb! - feat(wrangler): allow overriding the unenv preset.By default wrangler uses the bundled unenv preset.
Setting
WRANGLER_UNENV_RESOLVE_PATHSallow to use another version of the preset. Those paths are used when resolving the unenv module identifiers to absolute paths. This can be used to test a development version. -
#7479
2780849Thanks @penalosa! - Accept a JSON file of the format{ name: string }[]inwrangler kv bulk delete, as well as the currentstring[]format.
Patch Changes
-
#7541
ca9410aThanks @vicb! - chore(wrangler): update unenv dependency version -
#7345
15aa936Thanks @edmundhung! - fix(wrangler): keypress event name is optional
3.96.0
Minor Changes
-
#7510
004af53Thanks @oliy! - Add file prefix option to wrangler pipelines commands -
#7383
8af3365Thanks @jonesphillip! - Added wrangler r2 domain get command
Patch Changes
-
#7542
f13c897Thanks @CarmenPopoviciu! - Always print deployment and placement ID in Cloudchamber commandsCurrently, Cloudchamber commands only print the full deployment ID when the deployment has an IPv4 address. This commit ensures the deployment ID and the placement ID are always printed to stdout. It also moves the printing of the IPv4 address (if one exists) to the same place as the IPv6 address so that they are printed together.
-
#6754
0356d0aThanks @bluwy! - refactor: move@cloudflare/workers-sharedas dev dependency -
#7478
2e90efcThanks @petebacondarwin! - fix: ensure that non-inherited fields are not removed when using an inferred named environmentIt is an error for the the user to provide an environment name that doesn't match any of the named environments in the Wrangler configuration. But if there are no named environments defined at all in the Wrangler configuration, we special case the top-level environment as though it was a named environment. Previously, when this happens, we would remove all the nonInheritable fields from the configuration (essentially all the bindings) leaving an incorrect configuration. Now we correctly generate a flattened named environment that has the nonInheritable fields, plus correctly applies any transformFn on inheritable fields.
-
#7524
11f95f7Thanks @gpanders! - Include response body in Cloudchamber API errors -
#7427
3bc0f28Thanks @edmundhung! - Thex-provisionexperimental flag now identifies draft and inherit bindings by looking up the current binding settings.Draft bindings can then be provisioned (connected to new or existing KV, D1, or R2 resources) during
wrangler deploy. -
Updated dependencies []:
3.95.0
Minor Changes
- #7382
e0b98fdThanks @jonesphillip! - Added r2 bucket cors command to Wrangler including list, set, delete
3.94.0
Minor Changes
- #7229
669d7adThanks @gabivlj! - Introduce a new cloudchamber commandwrangler cloudchamber apply, which will be used by customers to deploy container-apps
Patch Changes
-
#7002
d2447c6Thanks @GregBrimble! - fix: More helpful error messages when validating compatibility date -
#7493
4c140bcThanks @emily-shen! - fix: remove non-json output in json mode commandsFixes regressions in 3.93.0 where unwanted text (wrangler banner, telemetry notice) was printing in commands that should only output valid json.
-
Updated dependencies [
5449fe5]:
3.93.0
Minor Changes
-
#7291
f5b9cd5Thanks @edmundhung! - Add anonymous telemetry to Wrangler commandsFor new users, Cloudflare will collect anonymous usage telemetry to guide and improve Wrangler's development. If you have already opted out of Wrangler's existing telemetry, this setting will still be respected.
See our data policy for more details on what we collect and how to opt out if you wish.
-
#7448
20a0f17Thanks @GregBrimble! - feat: Allow Workers for Platforms scripts (scripts deployed with--dispatch-namespace) to bring alongassets -
#7445
f4ae6eeThanks @WillTaylorDev! - Support forassets.experimental_serve_directlywithwrangler dev
Patch Changes
-
#7256
415e5b5Thanks @jamesopstad! - Export unstable_readConfig function and Unstable_Config, Unstable_RawConfig, Unstable_RawEnvironment and Unstable_MiniflareWorkerOptions types from Wrangler. Overload unstable_getMiniflareWorkerOptions function to accept a config that has already been loaded. -
#7431
8f25ebeThanks @vicb! - chore(wrangler): update unenv dependency versionPull in:
- refactor(cloudflare): reimplement module:createRequire for latest workerd (unjs/unenv#351)
- refactor: use node:events instead of relative path (unjs/unenv#354)
- refactor(http, cloudflare): use unenv/ imports inside node:http (unjs/unenv#363)
- refactor(node:process): set process.domain to undefined (unjs/unenv#367)
-
#7426
b40d0abThanks @petebacondarwin! - fix: allow the asset directory to be omitted in Wrangler config for commands that don't need it -
#7454
f2045beThanks @petebacondarwin! - refactor: Ensure that unstable type exports are all prefixed withUnstable_rather than justUnstable -
#7461
9ede45bThanks @petebacondarwin! - fix: relax validation of unsafe configuration to allow an empty objectThe types, the default and the code in general support an empty object for this config setting.
So it makes sense to avoid erroring when validating the config.
-
#7446
9435af0Thanks @petebacondarwin! - fix: make sure Wrangler doesn't create a.wranglertmp dir in thefunctions/folder of a Pages projectThis regression was introduced in https://github.com/cloudflare/workers-sdk/pull/7415 and this change fixes it by reverting that change.
-
#7385
14a7bc6Thanks @edmundhung! - Thex-provisionexperimental flag now support inherit bindings in deploys -
#7463
073293fThanks @penalosa! - Clarify messaging aroundwrangler versionscommands to reflect that they're stable (and have been since GA during birthday week) -
#7436
5e69799Thanks @Ankcorn! - Relax type on observability.enabled to remove linting error for nested configurations -
#7450
8c873edThanks @petebacondarwin! - fix: ensure that version secrets commands do not write wrangler config warnings
3.92.0
Minor Changes
-
#7251
80a83bbThanks @penalosa! - Improve Wrangler's multiworker support to allow running multiple workers at once with one command. To try it out, pass multiple-cflags to Wrangler: i.e.wrangler dev -c wrangler.toml -c ../other-worker/wrangler.toml. The first config will be treated as the primary worker and will be exposed over HTTP as usual (localhost:8787) while the rest will be treated as secondary and will only be accessible via a service binding from the primary worker. Notably, these workers all run in the same runtime instance, which should improve reliability of multiworker dev and fix some bugs (RPC to cross worker Durable Objects, for instance). -
#7130
11338d0Thanks @nickbabcock! - Update import resolution for files and package exportsIn an npm workspace environment, wrangler will now be able to successfully resolve package exports.
Previously, wrangler would only be able to resolve modules in a relative
node_modulesdirectory and not the workspace rootnode_modulesdirectory. -
#7355
5928e8cThanks @emily-shen! - feat: addexperimental_serve_directlyoption to Workers with AssetsUsers can now specify whether their assets are served directly against HTTP requests or whether these requests always go to the Worker, which can then respond with asset retrieved by its assets binding.
Patch Changes
-
#7326
24c752eThanks @OilyLime! - Print wrangler.toml snippet when creating new Hyperdrive Config -
#7272
a3f56d1Thanks @penalosa! - Make debug log for.envnot found less scary -
#7377
6ecc74eThanks @edmundhung! - Thex-provisionexperimental flag now skips validation of KV, R2, and D1 IDs in the configuration file. -
#7348
4cd8b46Thanks @edmundhung! - Addedx-provisionglobal optionThis experimental flag currently has no effect. More details will be shared as we roll out its functionality.
-
#7381
22a4055Thanks @penalosa! - Turn on--x-registryfor Pages by default -
#7360
98d2725Thanks @emily-shen! - fix: allow runningwrangler typeswhen expected entrypoint doesn't exist -
Updated dependencies [
ac87395,6b21919,b3d2e7d]:- miniflare@3.20241106.2
- @cloudflare/workers-shared@0.9.1
3.91.0
Minor Changes
-
#7230
6fe9533Thanks @penalosa! - Turn onwrangler.json(c)support by defaultWrangler now supports both JSON (
wrangler.json) and TOML (wrangler.toml) for it's configuration file. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax isJSONrather thanTOML. e.g.name = "worker-ts" main = "src/index.ts" compatibility_date = "2023-05-04"would be interpreted the same as the equivalent JSON
{ "name": "worker-ts", "main": "src/index.ts", "compatibility_date": "2023-05-04" } -
#7330
219109aThanks @jonesphillip! - Added Oceania (oc) location hint as acceptable choice when creating an R2 bucket. -
#7227
02a0e1eThanks @taylorlee! - Addpreview_urlstoggle towrangler.tomlThe current Preview URLs (beta) feature routes to version preview urls based on the status of the
workers_devconfig value. Beta users have requested the ability to enable deployment urls and preview urls separately onworkers.dev, and the newpreviews_enabledfield of the enable-subdomain API will allow that. This change separates theworkers_devandpreview_urlsbehavior duringwrangler triggers deployandwrangler versions upload.preview_urlsdefaults to true, and does not implicitly depend on routes the wayworkers_devdoes. -
#7308
1b1d01aThanks @gpanders! - Add a default image for cloudchamber create and modify commands -
#7232
7da76deThanks @toddmantell! - feat: implement queues info commandThis command allows users to get information on individual queues.
To run this command use the queues info command with the name of a queue in the user's account.
wrangler queues info my-queue-name
Patch Changes
-
#7319
5a2c93dThanks @vicb! - chore(wrangler): update unenv dependency versionPulls in the implementation of module.findSourceMap
-
Updated dependencies [
0d314ed,476e5df]:- @cloudflare/workers-shared@0.9.0
- miniflare@3.20241106.1
3.90.0
Minor Changes
Patch Changes
- Updated dependencies [
6ba5903]:- @cloudflare/workers-shared@0.8.0
- miniflare@3.20241106.1
3.89.0
Minor Changes
-
#7252
97acf07Thanks @Maximo-Guk! - feat: Add production_branch and deployment_trigger to pages deploy detailed artifact for wrangler-action pages parity -
#7263
1b80decThanks @danielrs! - Fix wrangler pages deployment (list|tail) environment filtering.
Patch Changes
-
#7314
a30c805Thanks @Ankcorn! - Fix observability.logs.enabled validation -
#7285
fa21312Thanks @penalosa! - RenamedirectorytoprojectRootand ensure it's relative to thewrangler.toml. This fixes a regression which meant that.wranglertemporary folders were inadvertently generated relative toprocess.cwd()rather than the location of thewrangler.tomlfile. It also renamesdirectorytoprojectRoot, which affects the `unstable_startWorker() interface. -
Updated dependencies [
563439b]:
3.88.0
Minor Changes
-
#7173
b6cbfbdThanks @Ankcorn! - Adds [observability.logs] settings to wrangler. This setting lets developers control the settings for logs as an independent dataset enabling more dataset types in the future. The most specific setting will win if any of the datasets are not enabled.It also adds the following setting to the logs config
invocation_logs- set to false to disable invocation logs. Defaults to true.
[observability.logs] enabled = true invocation_logs = false -
#7207
edec415Thanks @jonesphillip! - Added r2 bucket lifecycle command to Wrangler including list, add, remove, set
Patch Changes
-
#7243
941d411Thanks @penalosa! - Include Version Preview URL in Wrangler's output file -
#7038
e2e6912Thanks @petebacondarwin! - fix: only show fetch warning if on old compatibility_dateNow that we have the
allow_custom_portscompatibility flag, we only need to show the fetch warnings when that flag is not enabled. -
#7216
09e6e90Thanks @vicb! - chore(wrangler): update unenv dependency version -
#7081
b4a0e74Thanks @penalosa! - Default the file based registry (--x-registry) to on. This should improve stability of multi-worker development -
Updated dependencies []:
3.87.0
Minor Changes
-
#7201
beed72eThanks @GregBrimble! - feat: Tail Consumers are now supported for Workers with assets.You can now configure
tail_consumersin conjunction withassetsin yourwrangler.tomlfile. Read more about Static Assets and Tail Consumers in the documentation. -
#7212
837f2f5Thanks @jonesphillip! - Added r2 bucket info command to Wrangler. Improved formatting of r2 bucket list output
Patch Changes
-
#7210
c12c0feThanks @taylorlee! - Avoid an unnecessary GET request duringwrangler deploy. -
#7197
4814455Thanks @michelheusschen! - fix console output forwrangler d1 migrations create -
#6795
94f07eeThanks @benmccann! - chore: upgrade chokidar to v4 -
#7133
c46e02dThanks @gpanders! - Do not emit escape sequences when stdout is not a TTY
3.86.1
Patch Changes
- #7069
b499b74Thanks @penalosa! - Internal refactor to remove the non--x-dev-envflow fromwrangler dev
3.86.0
Minor Changes
- #7154
ef7c0b3Thanks @jonesphillip! - Added the ability to enable, disable, and get r2.dev public access URLs for R2 buckets.
Patch Changes
-
#7169
9098a3bThanks @penalosa! - Ensureworkerdprocesses are cleaned up after address-in-use errors -
#7172
3dce388Thanks @penalosa! - Clarify dev registry messaging around locally connected services. The connection status of local service bindings & durable object bindings is now indicated byconnectedornot connectednext to their entry in the bindings summary. For more details, refer to https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/#local-development -
#7193
ad51d1dThanks @sdnts! - Output suggested wrangler.toml changes after creating an R2 bucket -
#7191
1d5bc6dThanks @sdnts! - Output suggested wrangler.toml changes after creating a Queue -
Updated dependencies [
1db7846,08c6580]:- miniflare@3.20241106.0
- @cloudflare/workers-shared@0.7.1
3.85.0
Minor Changes
-
#7105
a5f1779Thanks @jonesphillip! - Added the ability to list, add, remove, and update R2 bucket custom domains. -
#7132
89f6274Thanks @gabivlj! - Event messages are capitalized, images of wrong architectures properly show the error incloudchamber createWhen a new "health" enum is introduced,wrangler cloudchamber listwon't crash anymore. Update Cloudchamber schemas. -
#7121
2278616Thanks @bruxodasilva! - Added pause and resume commands to manage Workflows and hidded unimplemented delete command
Patch Changes
-
#7134
3ee1353Thanks @cmackenzie1! - Change Pipelines to use name instead of ID -
#7020
e1d2fd6Thanks @KianNH! - chore: move printWranglerBanner for secret delete into handler -
#7150
6380d86Thanks @emily-shen! - refactor: improve login/logout/whoami setup with the new internal registration utils -
#6756
49ef163Thanks @WalshyDev! - chore: disable wrangler.toml warnings when doingwrangler login&wrangler logout -
#7164
1bd4885Thanks @penalosa! - Fix--test-scheduledwith custom builds &--x-dev-env
3.84.1
Patch Changes
-
#7141
d938bb3Thanks @emily-shen! - fix: throw a better error if there is an "ASSETS" user binding in a Pages projects -
#7124
f8ebdd1Thanks @skepticfx! - fix: Modify Cloudchamber deployment labels in interactive mode
3.84.0
Minor Changes
-
#6999
0111edbThanks @garvit-gupta! - docs: Vectorize GA Announcement Banner -
#6916
a33a133Thanks @garrettgu10! - Local development now supports Vectorize bindings -
#7004
15ef013Thanks @garvit-gupta! - feat: Enable Vectorize query by id via Wrangler -
#7092
038fdd9Thanks @jonesphillip! - Added location hint option for the Wrangler R2 bucket create command -
#7024
bd66d51Thanks @xortive! - feature: allow using a connection string when updating hyperdrive configsboth
hyperdrive createandhyperdrive updatenow support updating configs with connection strings.
Patch Changes
-
#7091
68a2a84Thanks @taylorlee! - fix: synchronize observability settings duringwrangler versions deployWhen running
wrangler versions deploy, Wrangler will now updateobservabilitysettings in addition tologpushandtail_consumers. Unlikewrangler deploy, it will not disable observability whenobservabilityis undefined inwrangler.toml. -
#7080
924ec18Thanks @vicb! - chore(wrangler): update unenv dependency version -
#7097
8ca4b32Thanks @emily-shen! - fix: remove deprecation warnings forwrangler initWe will not be removing
wrangler init(it just delegates to create-cloudflare now). These warnings were causing confusion for users as itwrangler initis still recommended in many places. -
#7073
656a444Thanks @penalosa! - Internal refactor to removees-module-lexerand supportwrangler typesfor Workers with Durable Objects & JSX -
#7024
bd66d51Thanks @xortive! - fix: make individual parameters work forwrangler hyperdrive createwhen not using HoAwrangler hyperdrive createindividual parameters were not setting the database name correctly when calling the api. -
#7024
bd66d51Thanks @xortive! - refactor: use same param parsing code forwrangler hyperdrive createandwrangler hyperdrive updateensures that going forward, both commands support the same features and have the same names for config flags
3.83.0
Minor Changes
- #7000
1de309bThanks @jkoe-cf! - feature: allowing users to specify a description when creating an event notification rule
Patch Changes
-
#7011
cef32c8Thanks @GregBrimble! - fix: Correctly apply Durable Object migrations for namespaced scripts -
#7067
4aa35c5Thanks @LuisDuarte1! - Change trigger command to comply with the current workflows endpoint.This also adds an id option to allow users to optionally customize the new instance id.
-
#7082
3f1d79cThanks @LuisDuarte1! - Change to new terminate instance workflow endpoint -
#7036
e7ea600Thanks @penalosa! - Reduce KV bulk upload bucket size to 1000 (from the previous 5000) -
#7068
a2afcf1Thanks @RamIdeas! - log warning of Workflows open-beta status when running deploying a Worker that contains a Workflow binding -
#7065
b219296Thanks @penalosa! - Internal refactor to remove React/ink from all non-wrangler devflows -
#7064
a90980cThanks @penalosa! - Fixwrangler dev --remote --show-interactive-dev-session=falseby only enabling hotkeys after account selection if hotkeys were previously enabled -
#7045
5ef6231Thanks @RamIdeas! - Add preliminary support for Workflows in wrangler dev -
#7075
80e5bc6Thanks @LuisDuarte1! - Fix params serialization when send the trigger workflow APIPreviously, wrangler did not parse the params sending it as a string to workflow's services.
-
Updated dependencies [
760e43f,8dc2b7d,5ef6231]:- miniflare@3.20241022.0
- @cloudflare/workers-shared@0.7.0
3.82.0
Minor Changes
- #6945
6b97353Thanks @bthwaites! - Add jurisdiction option to R2 event notification wrangler actions
Patch Changes
-
#5737
9bf51d6Thanks @penalosa! - Validate duplicate bindings across all binding types -
#7010
1f6ff8bThanks @vicb! - chore: update unenv dependency version -
#7012
244aa57Thanks @RamIdeas! - Add support for Workflow bindings (in deployments, not yet in local dev)To bind to a workflow, add a
workflowssection in your wrangler.toml:[[workflows]] binding = "WORKFLOW" name = "my-workflow" class_name = "MyDemoWorkflow"and export an entrypoint (e.g.
MyDemoWorkflow) in your script:import { WorkflowEntrypoint } from "cloudflare:workers"; export class MyDemoWorkflow extends WorkflowEntrypoint<Env, Params> {...} -
#7039
e44f496Thanks @penalosa! - Only show dev registry connection status in local dev -
#7037
e1b93dcThanks @emily-shen! - fix: ask for confirmation before creating a new Worker when uploading secretsPreviously,
wrangler secret put KEY --name non-existent-workerwould automatically create a new Worker with the namenon-existent-worker. This fix asks for confirmation before doing so (if running in an interactive context). Behaviour in non-interactive/CI contexts should be unchanged. -
#7015
48152d6Thanks @RamIdeas! - addwrangler workflows ...commands -
#7041
045787bThanks @CarmenPopoviciu! - Showwrangler pages dev --proxywarningOn Node.js 17+, wrangler will default to fetching only the IPv6 address. With these changes we warn users that the process listening on the port specified via
--proxyshould be configured for IPv6. -
#7018
127615aThanks @emily-shen! - fix: log successful runs ofd1 executein local -
#6970
a8ca700Thanks @oliy! - Add HTTP authentication options for Workers Pipelines -
#7005
6131ef5Thanks @edmundhung! - fix: prevent users from passing multiple arguments to non array options -
#7046
f9d5fdbThanks @oliy! - Minor change to 3rd party API shape for Workers Pipelines -
#6972
c794935Thanks @penalosa! - Add(local)indicator to bindings using local data -
Updated dependencies [
809193e]:
3.81.0
Minor Changes
- #6990
586c253Thanks @courtney-sims! - feat: Adds new detailed pages deployment output type
Patch Changes
-
#6963
a5ac45dThanks @RamIdeas! - fix: makewrangler dev --remoterespect wrangler.toml'saccount_idproperty.This was a regression in the
--x-dev-envflow recently turned on by default. -
#6996
b8ab809Thanks @emily-shen! - fix: improve error messaging when accidentally using Workers commands in Pages projectIf we detect a Workers command used with a Pages project (i.e. wrangler.toml contains
pages_output_build_dir), error with Pages version of command rather than "missing entry-point" etc.
3.80.5
Patch Changes
3.80.4
Patch Changes
-
#6937
51aedd4Thanks @lrapoport-cf! - fix: show help when kv commands are run without parameters -
Updated dependencies [
c863183,fd43068]:- miniflare@3.20241004.0
- @cloudflare/workers-shared@0.6.0
3.80.3
Patch Changes
-
#6927
2af75edThanks @emily-shen! - fix: respectCLOUDFLARE_ACCOUNT_IDwithwrangler pages projectcommandsFixes #4947
-
#6894
eaf71b8Thanks @petebacondarwin! - fix: improve the rendering of build errors when bundling -
#6920
2e64968Thanks @vicb! - chore: update unenv dependency versionPulls in feat(node/net): implement Server mock.
-
#6932
4c6aad0Thanks @vicb! - fix: allowrequireing unenv aliased packagesBefore this PR
requireing packages aliased in unenv would fail. That's becauserequirewould load the mjs file.This PR adds wraps the mjs file in a virtual ES module to allow
requireing it.
3.80.2
Patch Changes
- #6923
1320f20Thanks @andyjessop! - chore: adds eslint-disable for ESLint error on empty typescript interface in workers-configuration.d.ts
3.80.1
Patch Changes
-
#6908
d696850Thanks @penalosa! - fix: debounce restarting worker on assets dir file changes when--x-dev-envis enabled. -
#6902
dc92af2Thanks @threepointone! - fix: enable esbuild's keepNames: true to set .name on functions/classes -
#6909
82180a7Thanks @penalosa! - fix: Various fixes for logging in--x-dev-env, primarily to ensure the hotkeys don't wipe useful output and are cleaned up correctly -
#6903
54924a4Thanks @petebacondarwin! - fix: ensure thataliasconfig gets passed through to the bundler when using new--x-dev-envFixes #6898
-
#6911
30b7328Thanks @emily-shen! - fix: infer experimentalJsonConfig from file extensionFixes #5768 - issue with vitest and Pages projects with wrangler.toml
-
Updated dependencies [
5c50949]:
3.80.0
Minor Changes
-
#6408
3fa846eThanks @RamIdeas! - feat: update the--experimental-dev-env(shorthand:--x-dev-env) flag to on-by-defaultIf you experience any issues, you can disable the flag with
--x-dev-env=false. Please also let us know by opening an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose.
Patch Changes
-
#6854
04a8fedThanks @penalosa! - chore: Include serialisedFormDatain debug logs -
#6879
b27d8cbThanks @petebacondarwin! - fix: the docs command should not crash if given search termsFixes a regression accidentally introduced by #3735.
-
#6873
b123f43Thanks @zwily! - fix: reduce logging noise during wrangler dev with static assetsUpdates to static assets are accessible by passing in --log-level="debug" but otherwise hidden.
-
#6881
7ca37bcThanks @RamIdeas! - fix: custom builds outputting files in assets watched directory no longer cause the custom build to run again in an infinite loop -
#6872
b2d094eThanks @petebacondarwin! - fix: render a helpful build error if a Service Worker mode Worker has importsA common mistake is to forget to export from the entry-point of a Worker, which causes Wrangler to infer that we are in "Service Worker" mode.
In this mode, imports to external modules are not allowed. Currently this only fails at runtime, because our esbuild step converts these imports to an internal
__require()call that throws an error. The error message is misleading and does not help the user identify the cause of the problem. This is particularly tricky where the external imports are added by a library or our own node.js polyfills.Fixes #6648
-
#6792
27e8385Thanks @penalosa! - fix: Handle more module declaration cases -
#6838
7dbd0c8Thanks @GregBrimble! - fix: Improve static asset upload messaging
3.79.0
Minor Changes
- #6801
6009bb4Thanks @RamIdeas! - feat: implement retries withinwrangler deployandwrangler versions uploadto workaround spotty network connections and service flakes
Patch Changes
-
#6870
dc9039aThanks @penalosa! - fix: Includeworkerdin the external dependecies of Wrangler to fix local builds. -
#6866
c75b0d9Thanks @zwily! - fix: debounce restarting worker on assets dir file changes
3.78.12
Patch Changes
- #6840
5bfb75dThanks @a-robinson! - chore: update warning inwrangler dev --remotewhen using Queues to not mention beta status
3.78.11
Patch Changes
- #6819
7ede181Thanks @CarmenPopoviciu! - fix: Validate[routes]on configuration file changes
3.78.10
Patch Changes
-
#6824
1c58a74Thanks @petebacondarwin! - fix: tidy up error messaging for unexpected use of Node.js APIsFixes #6822
3.78.9
Patch Changes
-
#6753
4e33f2cThanks @bluwy! - refactor: prevent bundling entirepackage.jsonin built code -
#6812
f700d37Thanks @CarmenPopoviciu! - fix: Validate additional config properties for[observability] -
#6751
638a550Thanks @bluwy! - refactor: simplify date calculation and remove date-fns dependency -
#6809
28cb0d7Thanks @smellercf! - fix: Remove Beta tag from r2 event notification wrangler command descriptions -
#6802
17eb8a9Thanks @CarmenPopoviciu! - chore: renameexperimental_assetstoassets -
#6781
0792fa0Thanks @mikenomitch! - chore: tweaks warning when using node_compat
3.78.8
Patch Changes
-
#6791
74d719fThanks @penalosa! - fix: Add missing binding toinit --from-dash -
#6728
1ca313fThanks @emily-shen! - fix: remove filepath encoding on asset upload and handle sometimes-encoded charactersSome characters like [ ] @ are encoded by encodeURIComponent() but are often requested at an unencoded URL path. This change will make assets with filenames with these characters accessible at both the encoded and unencoded paths, but to use the encoded path as the canonical one, and to redirect requests to the canonical path if necessary.
-
#6798
7d7f19aThanks @emily-shen! - fix: error if an asset binding is provided without a Worker script -
Updated dependencies [
1ca313f]:- @cloudflare/workers-shared@0.5.4
- miniflare@3.20240909.5
3.78.7
Patch Changes
-
#6775
ecd82e8Thanks @CarmenPopoviciu! - fix: Support switching between static and dynamic WorkersThis commit fixes the current behaviour of watch mode for Workers with assets, and adds support for switching between static and dynamic Workers within a single
wrangler devsession. -
#6762
2840b9fThanks @petebacondarwin! - fix: error if a user inadvertently uploads a Pages_workers.jsfile or directory as an asset -
#6778
61dd93aThanks @CarmenPopoviciu! - fix: Error if Workers + Assets are run in remote modeWorkers + Assets are currently supported only in local mode. We should throw an error if users attempt to use Workers with assets in remote mode.
-
#6782
7655505Thanks @vicb! - chore: update unenv dependency version -
#6777
9649dbcThanks @penalosa! - chore: Update CI messaging -
#6779
3e75612Thanks @emily-shen! - fix: include asset binding inwrangler types
3.78.6
Patch Changes
-
#6743
b45e326Thanks @petebacondarwin! - fix: ability to build tricky Node.js compat scenario WorkersAdds support for non-default build conditions and platform via the WRANGLER_BUILD_CONDITIONS and WRANGLER_BUILD_PLATFORM flags.
-
#6776
02de103Thanks @zebp! - fix: disable observability on deploy if not explicitly defined in configWhen deploying a Worker that has observability enabled in the deployed version but not specified in the
wrangler.tomlWrangler will now set observability to disabled for the new version to match thewrangler.tomlas the source of truth. -
Updated dependencies [
2ddbb65]:
3.78.5
Patch Changes
-
#6744
e3136f9Thanks @petebacondarwin! - chore: update unenv dependency version -
#6749
9a06f88Thanks @CarmenPopoviciu! - fix: Throw error when attempting to configure Workers with assets and tail consumersTail Workers are currently not supported for Workers with assets. This commit ensures we throw a corresponding error if users are attempting to configure
tail_consumersvia their configuration file, for a Worker with assets. This validation is applied for allwrangler dev,wrangler deploy,wrangler versions upload. -
#6746
0deb42bThanks @GregBrimble! - fix: Fix assets upload message to correctly report number of uploaded assets -
#6745
6dbbb88Thanks @jonesphillip! - fix: r2 bucket notification get <bucket_name> has been marked deprecated in favor of r2 bucket notification list <bucket_name> to reflect behavior. -
Updated dependencies [
2407c41]:
3.78.4
Patch Changes
-
#6706
1c42466Thanks @jkoe-cf! - fix: making explicit to only send a body if there are rule ids specified in the config delete -
#6714
62082aaThanks @OilyLime! - fix: rough edges when creating and updating Hyperdrive over Access configs -
#6705
ea60a52Thanks @emily-shen! - fix: include compatibility date in static-asset only uploads (experimental feature)
3.78.3
Patch Changes
-
#6686
2c8506fThanks @DaniFoldi! - fix: Bump path-to-regexp dependency version -
#6329
c135de4Thanks @penalosa! - chore: Cache generated runtime types -
Updated dependencies [
5b5dd95]:
3.78.2
Patch Changes
- Updated dependencies [
7a8bb17]:- @cloudflare/workers-shared@0.5.3
- miniflare@3.20240909.1
3.78.1
Patch Changes
- Updated dependencies [
31bfd37,5d8547e]:- @cloudflare/workers-shared@0.5.2
- miniflare@3.20240909.1
3.78.0
Minor Changes
-
#6643
f30c61fThanks @WalshyDev! - feat: add "Deployment alias URL" towrangler pages deployif an alias is available for this deployment. -
#6415
b27b741Thanks @irvinebroque! - chore: Redirectwrangler generate [template name]andwrangler inittonpm create cloudflare -
#6647
d68e8c9Thanks @joshthoward! - feat: Configure SQLite backed Durable Objects in local dev -
#6696
0a9e90aThanks @penalosa! - feat: SupportWRANGLER_CI_MATCH_TAGenvironment variable.When set, this will ensure that
wrangler deployandwrangler versions uploadonly deploy to Workers which match the provided tag. -
#6702
aa603abThanks @hhoughgg! - feat: Hidewrangler pipelinesuntil release
Patch Changes
-
#6699
2507304Thanks @joshthoward! - fix: Bugs when warning users using SQLite in Durable Objects in remote dev -
#6693
0737e0fThanks @GregBrimble! - fix: Persist Workers Assets when doingwrangler versions secrets put/bulk -
Updated dependencies [
d68e8c9,fed1fda]:- miniflare@3.20240909.1
- @cloudflare/workers-shared@0.5.1
3.77.0
Minor Changes
-
#6674
831f892Thanks @andyjessop! - feat: Added new pipelines bindings. This creates a new binding that allows sending events to the specified pipeline.Example:
pipelines binding = "MY_PIPELINE" pipeline = "my-pipeline"
-
#6668
88c40beThanks @zebp! - feature: add observability setting to wrangler.tomlAdds the
observabilitysetting which provides your Worker with automatic persistent logs that can be searched, filtered, and queried directly from the Workers dashboard. -
#6679
2174127Thanks @jkoe-cf! - feat: adding option to specify a rule within the config to delete (if no rules are specified, all rules get deleted) -
#6666
4107f57Thanks @threepointone! - feat: support analytics engine in local/remote devThis adds "support" for analytics engine datasets for
wrangler dev. Specifically, it simply mocks the AE bindings so that they exist while developing (and don't throw when accessed).This does NOT add support in Pages, though we very well could do so in a similar way in a followup.
-
#6640
8527675Thanks @petebacondarwin! - feat: experimental workers assets can be ignored by adding a .assetsignore fileThis file can be added to the root of the assets directory that is to be uploaded alongside the Worker when using
experimental_assets.The file follows the
.gitignoresyntax, and any matching paths will not be included in the upload. -
#6652
648cfddThanks @bthwaites! - feat: Update R2 Get Event Notification response, display, and actions -
#6625
8dcd456Thanks @maxwellpeterson! - feature: Add support for placement hintsAdds the
hintfield to smart placement configuration. When set, placement hints will be used to decide where smart-placement-enabled Workers are run. -
#6631
59a0072Thanks @emily-shen! - feat: Add config options 'html_handling' and 'not_found_handling' to experimental_asset field in wrangler.toml
Patch Changes
-
#6621
6523db2Thanks @emily-shen! - fix: Validateroutesinwrangler devandwrangler deployfor Workers with assetsWe want wrangler to error if users are trying to deploy a Worker with assets, and routes with a path component.
All Workers with assets must have either:
- custom domain routes
- pattern routes which have no path component (except for the wildcard splat) "some.domain.com/*"
-
#6687
7bbed63Thanks @GregBrimble! - fix: Fix asset upload count messaging -
#6628
33cc0ecThanks @GregBrimble! - chore: Improves messaging when uploading assets -
#6671
48eeff4Thanks @jkoe-cf! - fix: Update R2 Create Event Notification response -
#6618
67711c2Thanks @GregBrimble! - fix: Switch to multipart/form-data upload format for Workers AssetsThis has proven to be much more reliable.
-
Updated dependencies [
3f5b934,59a0072]:- miniflare@3.20240909.0
- @cloudflare/workers-shared@0.5.0
3.76.0
Minor Changes
-
#6126
18c105bThanks @IRCody! - feature: Add 'cloudchamber curl' commandAdds a cloudchamber curl command which allows easy access to arbitrary cloudchamber API endpoints.
-
#6649
46a91e7Thanks @andyjessop! - feature: Integrate the Cloudflare Pipelines product into wrangler.Cloudflare Pipelines is a product that handles the ingest of event streams into R2. This feature integrates various forms of managing pipelines.
Usage:
wrangler pipelines create <pipeline>: Create a new pipelinewrangler pipelines list: List current pipelineswrangler pipelines show <pipeline>: Show a pipeline configurationwrangler pipelines update <pipeline>: Update a pipelinewrangler pipelines delete <pipeline>: Delete a pipelineExamples: wrangler pipelines create my-pipeline --r2 MY_BUCKET --access-key-id "my-key" --secret-access-key "my-secret" wrangler pipelines show my-pipeline wrangler pipelines delete my-pipline
Patch Changes
-
#6612
6471090Thanks @dario-piotrowicz! - fix: Add hyperdrive binding support ingetPlatformProxyexample:
# wrangler.toml [[hyperdrive]] binding = "MY_HYPERDRIVE" id = "000000000000000000000000000000000" localConnectionString = "postgres://user:pass@127.0.0.1:1234/db"// index.mjs import postgres from "postgres"; import { getPlatformProxy } from "wrangler"; const { env, dispose } = await getPlatformProxy(); try { const sql = postgres( // Note: connectionString points to `postgres://user:pass@127.0.0.1:1234/db` not to the actual hyperdrive // connection string, for more details see the explanation below env.MY_HYPERDRIVE.connectionString ); const results = await sql`SELECT * FROM pg_tables`; await sql.end(); } catch (e) { console.error(e); } await dispose();Note: the returned binding values are no-op/passthrough that can be used inside node.js, meaning that besides direct connections via the
connectmethods, all the other values point to the same db connection specified in the user configuration -
#6620
ecdfabeThanks @petebacondarwin! - fix: don't warn aboutnode:async_hooksifnodejs_alsis setFixes #6011
3.75.0
Minor Changes
-
#6603
a197460Thanks @taylorlee! - feature: log version preview url when previews existThe version upload API returns a field indicating whether a preview exists for that version. If a preview exists and workers.dev is enabled, wrangler will now log the full URL on version upload.
This does not impact wrangler deploy, which only prints the workers.dev route of the latest deployment.
-
#6550
8d1d464Thanks @Pedr0Rocha! - feature: add RateLimit type generation to the ratelimit unsafe binding.
Patch Changes
-
#6615
21a09e0Thanks @RamIdeas! - chore: avoid potential double-install of create-cloudflareWhen
wrangler initdelegates to C3, it did so vianpm create cloudflare@2.5.0. C3's v2.5.0 was the first to include auto-update support to avoidnpx's potentially stale cache. But this also guaranteed a double install for users who do not have 2.5.0 cached. Now, wrangler delegates vianpm create cloudflare@^2.5.0which should use the latest version cached on the user's system or install and use the latest v2.x.x. -
#6603
a197460Thanks @taylorlee! - chore: fix version upload log orderPreviously deploy prints: upload timings deploy timings current version id
while version upload prints: worker version id upload timings
This change makes version upload more similar to deploy by printing version id after upload, which also makes more sense, as version ID can only be known after upload has finished.
3.74.0
Minor Changes
- #6574
dff8d44Thanks @CarmenPopoviciu! - feat: add support for experimental assets inwrangler devwatch mode
Patch Changes
-
#6605
c4f0d9eThanks @WalshyDev! - fix: ensure we update non-versioned Worker settings for the new deploy path inwrangler deploy -
Updated dependencies [
e8975a9]:
3.73.0
Minor Changes
-
#6571
a7e1bfeThanks @penalosa! - feat: Add deployment http targets to wrangler deploy logs, and add url to pages deploy logs -
#6497
3bd833cThanks @WalshyDev! - chore: movewrangler versions ...,wrangler deployments ...,wrangler rollbackandwrangler triggers ...out of experimental and open beta. These are now available to use without the --x-versions flag, you can continue to pass this however without issue to keep compatibility with all the usage today.A few of the commands had an output that wasn't guarded by
--x-versionsthose have been updated to use the newer output, we have tried to keep compatibility where possible (for example:wrangler rollbackwill continue to output "Worker Version ID:" so users can continue to grab the ID). If you wish to use the old versions of the commands you can pass the--no-x-versionsflag. Note, these will be removed in the future so please work on migrating. -
#6586
72ea742Thanks @penalosa! - feat: Inject a 404 response for browser requestedfavicon.icofiles when loading the/__scheduledpage for scheduled-only Workers -
#6497
3bd833cThanks @WalshyDev! - feat: updatewrangler deployto use the new versions and deployments API. This should have zero user-facing impact but sets up the most used command to deploy Workers to use the new recommended APIs and move away from the old ones. We will still call the old upload path where required (e.g. Durable Object migration or Service Worker format).
Patch Changes
-
#6563
da48a70Thanks @threepointone! - chore: remove the warning about local mode flag being removed in the future -
#6595
0a76d7eThanks @vicb! - feat: update unenv to the latest available version -
#5738
c2460c4Thanks @penalosa! - fix: Prevent spaces in names when validating -
#6586
72ea742Thanks @penalosa! - chore: Improve Miniflare CRON warning wording -
#6593
f097cb7Thanks @vicb! - fix: removeexperimental:prefix requirement for nodejs_compat_v2 -
#6572
0d83428Thanks @penalosa! - fix: Show a clearer user error when trying to use a python worker without thepython_workerscompatibility flag specified -
#6589
f4c8ceaThanks @vicb! - feat: update unenv to the latest available version -
Updated dependencies [
45ad2e0]:- @cloudflare/workers-shared@0.4.1
3.72.3
Patch Changes
-
#6548
439e63aThanks @garvit-gupta! - fix: Fix Vectorize getVectors, deleteVectors payload in Wrangler Client; VS-271 -
#6554
46aee5dThanks @andyjessop! - fix: nodejs_compat flags no longer error when running wrangler types --x-include-runtime -
#6548
439e63aThanks @garvit-gupta! - fix: Add content-type header to Vectorize POST operations; #6516/VS-269 -
#6566
669ec1cThanks @penalosa! - fix: Ensure esbuild warnings are logged when running wrangler deploy -
Updated dependencies [
6c057d1]:- @cloudflare/workers-shared@0.4.0
3.72.2
Patch Changes
-
#6511
e75c581Thanks @petebacondarwin! - fix: allow Pages projects to use `experimental:nodejs_compat_v2" flagFixes #6288
-
Updated dependencies [
b0e2f0b,f5bde66]:- miniflare@3.20240821.0
- @cloudflare/workers-shared@0.3.0
3.72.1
Patch Changes
-
#6530
d0ecc6aThanks @WalshyDev! - fix: fixedwrangler versions uploadprinting bindings twice -
#6502
a9b4f25Thanks @garvit-gupta! - fix: Fix Vectorize List MetadataIndex Http Method -
#6508
56a3de2Thanks @petebacondarwin! - fix: move the Windows C++ redistributable warning so it is only shown if there is an actual access violationReplaces #6471, which was too verbose.
Fixes #6170
3.72.0
Minor Changes
-
#6479
3c24d84Thanks @petebacondarwin! - feat: allow HTTPS custom certificate paths to be provided by a environment variablesAs well as providing paths to custom HTTPS certificate files, it is now possible to use WRANGLER_HTTPS_KEY_PATH and WRANGLER_HTTPS_CERT_PATH environment variables.
Specifying the file paths at the command line overrides specifying in environment variables.
Fixes #5997
Patch Changes
-
#6471
0d85f24Thanks @petebacondarwin! - fix: add a helpful message on Windows when Miniflare fails to start -
#6489
34bf393Thanks @GregBrimble! - fix: Upload assets as JSON Lines (application/jsonl) rather than NDJSON (application/x-ndjson) -
#6482
e24939cThanks @RamIdeas! - fix: reimplement module aliasing so user-defined aliases take precedence over other plugins (eg unenv node.js polyfills) -
Updated dependencies [
00f340f]:- miniflare@3.20240806.1
- @cloudflare/workers-shared@0.2.0
3.71.0
Minor Changes
-
#6464
da9106cThanks @AnantharamanSI! - feat: rename--countto--limitinwrangler d1 insightsThis PR renames
wrangler d1 insight's--countflag to--limitto improve clarity and conform to naming conventions.To avoid a breaking change, we have kept
--countas an alias to--limit. -
#6451
515de6aThanks @danielrs! - feat:whoamishows membership information when available -
#6463
dbc6782Thanks @AnantharamanSI! - feat: add queryEfficiency towrangler d1 insightsoutput -
#6252
a2a144cThanks @garvit-gupta! - feat: Enable Wrangler to operate on Vectorize V2 indexes
Patch Changes
- #6424
3402ab9Thanks @RamIdeas! - fix: using a debugger sometimes disconnected with "Message is too large" error
3.70.0
Minor Changes
- #6383
05082adThanks @petebacondarwin! - feat: support outputting ND-JSON files via an environment variable
Patch Changes
-
#6440
09b5092Thanks @petebacondarwin! - fix: tweak the properties of the new Wrangler output file entries for better consistency -
Updated dependencies [
d55eeca]:
3.69.1
Patch Changes
- #6432
cba2e25Thanks @petebacondarwin! - fix: prevent crash when running wrangler dev due to missing dependency
3.69.0
Minor Changes
-
#6392
c3e19b7Thanks @taylorlee! - feat: log Worker startup time in theversion uploadcommand -
#6370
8a3c6c0Thanks @CarmenPopoviciu! - feat: Create very basic Asset Server Worker and plumb it intowrangler devThese changes do the ground work needed in order to add Assets support for Workers in
wrangler dev. They implement the following:- it creates a new package called
workers-sharedthat hosts theAsset Server Worker, and theRouter Workerin the future - it scaffolds the
Asset Server Workerin some very basic form, with basic configuration. Further behaviour implementation will follow in a subsequent PR - it does the ground work of plumbing ASW into Miniflare
- it creates a new package called
Patch Changes
-
#6392
c3e19b7Thanks @taylorlee! - fix: remove bundle size warning from Worker deploy commandsBundle size was a proxy for startup time. Now that we have startup time reported, focus on bundle size is less relevant.
3.68.0
Minor Changes
-
#6318
dc576c8Thanks @danlapid! - feat: Add a log for worker startup time in wrangler deploy -
#6097
64f34e8Thanks @RamIdeas! - feat: implements the--experimental-dev-env(shorthand:--x-dev-env) flag forwrangler pages dev
Patch Changes
-
#6379
31aa15cThanks @RamIdeas! - fix: clearer error message when trying to use Workers Sites or Legacy Assets withwrangler versions upload -
#6367
7588800Thanks @RamIdeas! - fix: implicitly cleanup (callstop()) inunstable_devif the returned Promise rejected and thestop()function was not returned -
#6330
cfbdedeThanks @RamIdeas! - fix: when the worker's request.url is overridden using thehostorlocalUpstream, ensureportis overridden/cleared tooWhen using
--localUpstream=example.com, the request.url would incorrectly be "example.com:8787" but is now "example.com".This only applies to
wrangler dev --x-dev-envandunstable_dev({ experimental: { devEnv: true } }). -
#6365
13549c3Thanks @WalshyDev! - fix: WASM modules meant thatwrangler versions secret ...could not properly update the version. This has now been fixed.
3.67.1
Patch Changes
-
#6312
67c611aThanks @emily-shen! - feat: add CLI flag and config key for experimental Workers + AssetsThis change adds a new experimental CLI flag (
--experimental-assets) and configuration key (experimental_assets) for the new Workers + Assets work.The new flag and configuration key are for the time being "inactive", in the sense that no behaviour is attached to them yet. This will follow up in future work.
-
Updated dependencies [
b3c3cb8]:
3.67.0
Minor Changes
-
#4545
e5afae0Thanks @G4brym! - Remove experimental/beta constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/. This is not deemed a major version bump for Wrangler since these commands were never generally available. -
#6322
373248eThanks @IRCody! - Add cloudchamber scope to existing scopes instead of replacing them.When using any cloudchamber command the cloudchamber scope will now be added to the existing scopes instead of replacing them.
-
#6276
a432a13Thanks @CarmenPopoviciu! - feat: Add support forwrangler.jsoncThis commit adds support for
wrangler.jsoncconfig file for Workers. This feature is available behind the--experimental-json-configflag (just likewrangler.json).To use the new configuration file, add a
wrangler.jsoncfile to your Worker project and runwrangler dev --experimental-json-configorwrangler deploy --experimental-json-config.Please note that this work does NOT add
wrangler.jsonorwrangler.jsoncsupport for Pages projects! -
#6168
1ee41ffThanks @IRCody! - feature: Add list and remove subcommands to cloudchamber registries command.
Patch Changes
-
#6331
e6ada07Thanks @threepointone! - fix: only warn about miniflare feature support (ai, vectorize, cron) onceWe have some warnings in local mode dev when trying to use ai bindings / vectorize / cron, but they are printed every time the worker is started. This PR changes the warning to only be printed once per worker start.
3.66.0
Minor Changes
-
#6295
ebc85c3Thanks @andyjessop! - feat: introduce an experimental flag forwrangler typesto dynamically generate runtime types according to the user's project configuration. -
#6272
084d39eThanks @emily-shen! - fix: addlegacy-assetsconfig and flag as alias of currentassetsbehavior- The existing behavior of the
assetsconfig key/flag will change on August 15th. legacy-assetswill preserve current functionality.
- The existing behavior of the
Patch Changes
-
#6203
5462eadThanks @geelen! - fix: Updating to match new D1 import/export API format -
#6315
3fd94e7Thanks @penalosa! - chore: Add RayID towrangler loginerror message displayed when a user hits a bot challenge page
3.65.1
Patch Changes
-
#6267
957d668Thanks @WalshyDev! - chore: add total module size to the logged table, this makes it much easier to see the total size of all modules combined. -
#6244
e7c06d7Thanks @gabivlj! - fix: wrangler cloudchamber json errors are properly formatted -
Updated dependencies [
779c713]:
3.65.0
Minor Changes
-
#6194
25afcb2Thanks @zebp! - chore: Add duration and sourcemap size to upload metrics eventWrangler will now send the duration and the total size of any sourcemaps uploaded with your Worker to Cloudflare if you have metrics enabled.
-
#6259
eb201a3Thanks @ottomated! - chore: Add types to DurableObjectNamespace type generation. For example:interface Env { OBJECT: DurableObjectNamespace<import("./src/index").MyDurableObject>; } -
#6245
e4abed3Thanks @OilyLime! - feature: Add support for Hyperdrive over Access configs
Patch Changes
-
#6255
d497e1eThanks @rozenmd! - fix: teach wrangler init --from-dash about d1 bindingsThis PR teaches
wrangler init --from-dashabout D1 bindings, so they aren't incorrectly added to the wrangler.toml as unsafe bindings. -
#6258
4f524f2Thanks @dom96! - feature: Add warning about deploying Python with requirements.txtThis expands on the warning shown for all Python Workers to include a message about deploying Python Workers with a requirements.txt not being supported.
-
#6249
8bbd824Thanks @petebacondarwin! - chore: Update config-schema.json for the wrangler.toml -
#5955
db11a0fThanks @harugon! - fix: correctly escape newlines inconstructTypefunction for multiline stringsThis fix ensures that multiline strings are correctly handled by the
constructTypefunction. Newlines are now properly escaped to prevent invalid JavaScript code generation when using thewrangler typescommand. This improves robustness and prevents errors related to multiline string handling in environment variables and other configuration settings. -
#6263
fa1016cThanks @petebacondarwin! - fix: use cli script-name arg when deploying a worker with queue consumers -
Updated dependencies [
0d32448]:
3.64.0
Minor Changes
-
#4925
7d4a4d0Thanks @dom96! - feature: whoami, logout and login commands mention the CLOUDFLARE_API_TOKEN env var nowIt is easy to get confused when trying to logout while the CLOUDFLARE_API_TOKEN env var is set. The logout command normally prints out a message which states that the user is not logged in. This change rectifes this to explicitly call out that the CLOUDFLARE_API_TOKEN is set and requests that the user unsets it to logout.
Patch Changes
-
#5032
75f7928Thanks @dbenCF! - Adding client side error handling for R2 when the user tries to create a bucket with an invalid name. The purpose of this addition is to provide the user with more context when encountering this error. -
#4398
4b1e5bcThanks @mattpocock! - fix: update tsconfig for Workers generated by wrangler init
3.63.2
Patch Changes
-
#6199
88313e5Thanks @dario-piotrowicz! - fix: make suregetPlatformProxy'sctxmethods throw illegal invocation errors like workerdin workerd detaching the
waitUntilandpassThroughOnExceptionmethods from theExecutionContextobject results in them throwingillegal invocationerrors, such as for example:export default { async fetch(_request, _env, { waitUntil }) { waitUntil(() => {}); // <-- throws an illegal invocation error return new Response("Hello World!"); }, };make sure that the same behavior is applied to the
ctxobject returned bygetPlatformProxy -
#5569
75ba960Thanks @penalosa! - fix: Simplifywrangler pages download config:- Don't include inheritable keys in the production override if they're equal to production
- Only create a preview environment if needed, otherwise put the preview config at the top level
3.63.1
Patch Changes
-
#6192
b879ce4Thanks @petebacondarwin! - fix: do not report D1 user errors to Sentry -
#6150
d993409Thanks @CarmenPopoviciu! - fix: Fixpages devwatch mode [_worker.js]The watch mode in
pages devfor Advanced Mode projects is currently partially broken, as it only watches for changes in the "_worker.js" file, but not for changes in any of its imported dependencies. This means that given the following "_worker.js" fileimport { graham } from "./graham-the-dog"; export default { fetch(request, env) { return new Response(graham) } }pages devwill reload for any changes in the_worker.jsfile itself, but not for any changes ingraham-the-dog.js, which is its dependency.Similarly,
pages devwill not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all the aforementioned issues.
3.63.0
Minor Changes
-
#6167
e048958Thanks @threepointone! - feature: alias modules in the workerSometimes, users want to replace modules with other modules. This commonly happens inside a third party dependency itself. As an example, a user might have imported
node-fetch, which will probably never work in workerd. You can use the alias config to replace any of these imports with a module of your choice.Let's say you make a
fetch-nolyfill.jsexport default fetch; // all this does is export the standard fetch function`You can then configure
wrangler.tomllike so:# ... [alias] "node-fetch": "./fetch-nolyfill"So any calls to
import fetch from 'node-fetch';will simply use our nolyfilled version.You can also pass aliases in the cli (for both
devanddeploy). Like:npx wrangler dev --alias node-fetch:./fetch-nolyfill -
#6073
7ed675eThanks @geelen! - Added D1 export support for local databases
Patch Changes
-
#6149
35689eaThanks @RamIdeas! - refactor: React-free hotkeys implementation, behind the--x-dev-envflag -
#6022
7951815Thanks @CarmenPopoviciu! - fix: Fixpages devwatch mode [Functions]The watch mode in
pages devfor Pages Functions projects is currently partially broken, as it only watches for file system changes in the "/functions" directory, but not for changes in any of the Functions' dependencies. This means that given a Pages Functionmath-is-fun.ts, defined as follows:import { ADD } from "../math/add"; export async function onRequest() { return new Response(`${ADD} is fun!`); }pages devwill reload for any changes inmath-is-fun.tsitself, but not for any changes inmath/add.ts, which is its dependency.Similarly,
pages devwill not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all these things, plus adds some extra polish to the
pages devwatch mode experience. -
#6164
4cdad9bThanks @threepointone! - fix: use account id for listing zonesFixes https://github.com/cloudflare/workers-sdk/issues/4944
Trying to fetch
/zonesfails when it spans more than 500 zones. The fix to use an account id when doing so. This patch passes the account id to the zones call, threading it through all the functions that require it. -
#6180
b994604Thanks @Skye-31! - Fix: pass env to getBindings to support reading.dev.vars.{environment}https://github.com/cloudflare/workers-sdk/pull/5612 added support for selecting the environment of config used, but it missed passing it to the code that reads
.dev.vars.{environment}Closes #5641
-
#6124
d03b102Thanks @RamIdeas! - feat:urlandinspectorUrlproperties have been exposed on the worker object returned bynew unstable_DevEnv().startWorker(options) -
#6147
02dda3dThanks @penalosa! - refactor: React free dev registry -
#6127
1568c25Thanks @DaniFoldi! - fix: Bump ws dependency -
#6140
4072114Thanks @petebacondarwin! - fix: add extra error logging to auth response errors -
#6160
9466531Thanks @sm-bean! - fix: removes unnecessary wrangler tail warning against resetting durable object -
#6142
9272ef5Thanks @dario-piotrowicz! - fix: improve thegetPlatformProxyconfigPathoption ts-doc comment to clarify its behavior
3.62.0
Minor Changes
-
#5950
0075621Thanks @WalshyDev! - feat: addwrangler versions secret put,wrangler versions secret bulkandwrangler versions secret listwrangler versions secret putallows for you to add/update a secret even if the latest version is not fully deployed. A new version with this secret will be created, the existing secrets and config are copied from the latest version.wrangler versions secret bulkallows you to bulk add/update multiple secrets at once, this behaves the same assecret putand will only make one new version.wrangler versions secret listlists the secrets available to the currently deployed versions.wrangler versions secret list --latest-versionorwrangler secret listwill list for the latest version.Additionally, we will now prompt for extra confirmation if attempting to rollback to a version with different secrets than the currently deployed.
Patch Changes
-
#6118
1621992Thanks @WalshyDev! - fix: rollback in the case of a secret change, the prompt meant to show was not showing due to the spinner in an interactive env. It will now properly show.chore: improve the view of
wrangler versions viewand change up copy a little forversions secretcommands. -
#6105
26855f3Thanks @helloimalastair! - feat: Add help messages to all invalidr2commands -
#3735
9c7df38Thanks @lrapoport-cf! - chore: Cleanupwrangler --helpoutputThis commit cleans up and standardizes the look and feel of all
wranglercommands as displayed bywrangler --helpandwrangler <cmd> --help. -
#6080
e2972cfThanks @threepointone! - chore: run eslint (with react config) on workers-playground/wranglerThis enables eslint (with our react config) for the workers-playground project. Additionally, this enables the react-jsx condition in relevant tsconfig/eslint config, letting us write jsx without having React in scope.
-
#6001
d39d595Thanks @penalosa! - chore: changes to howwrangler devlaunches your worker, behind the experimental--x-dev-envflag -
#5214
05c5607Thanks @penalosa! - feat: Experimental file based service discovery when running multiple Wrangler instances locally. To try it out, make sure all your local Wrangler instances are running with the--x-registryflag. -
Updated dependencies [
7d02856,d4e1e9f]:- miniflare@3.20240620.0
- @cloudflare/kv-asset-handler@0.3.4
3.61.0
Minor Changes
-
#5995
374bc44Thanks @petebacondarwin! - feat: allow Durable Object migrations to be overridable in environmentsBy making the
migrationskey inheritable, users can provide different migrations for each wrangler.toml environment.Resolves #729
Patch Changes
-
#6039
dc597a3Thanks @petebacondarwin! - fix: hybrid nodejs compat now supports requiring the default export of a CJS moduleFixes #6028
-
#6051
15aff8fThanks @threepointone! - fix: Don't check expiry dates on custom certsFixes https://github.com/cloudflare/workers-sdk/issues/5964
For
wrangler dev, we don't have to check whether certificates have expired when they're provided by the user. -
#6052
b4c0233Thanks @threepointone! - chore: Add.wranglerand.DS_Storeto.gitignoregenerated bywrangler initThis commit adds a small QOL improvement to
init(to be deprecated in the future), for those who still use this wrangler command. -
#6050
a0c3327Thanks @threepointone! - chore: Normalize more depsThis is the last of the patches that normalize dependencies across the codebase. In this batch:
ws,vitest,zod,rimraf,@types/rimraf,ava,source-map,glob,cookie,@types/cookie,@microsoft/api-extractor,@types/mime,@types/yargs,devtools-protocol,@vitest/ui,execa,strip-ansiThis patch also sorts dependencies in every
package.json -
#6029
f5ad1d3Thanks @threepointone! - chore: Normalize some dependencies in workers-sdkThis is the first of a few expected patches that normalize dependency versions, This normalizes
undici,concurrently,@types/node,react,react-dom,@types/react,@types/react-dom,eslint,typescript. There are no functional code changes (but there are a couple of typecheck fixes). -
#6046
c643a81Thanks @threepointone! - chore: Normalize more dependencies.Follow up to https://github.com/cloudflare/workers-sdk/pull/6029, this normalizes some more dependencies :
get-port,chalk,yargs,toucan-js,@typescript-eslint/parser,@typescript-eslint/eslint-plugin,esbuild-register,hono,glob-to-regexp,@cloudflare/workers-types -
#6058
31cd51fThanks @threepointone! - chore: Quieter buildsThis patch cleans up warnings we were seeing when doing a full build. Specifically:
- fixtures/remix-pages-app had a bunch of warnings about impending features that it should be upgraded to, so I did that. (tbh this one needs a full upgrade of packages, but we'll get to that later when we're upgrading across the codebase)
- updated
@microsoft/api-extractorso it didn't complain that it didn't match thetypescriptversion (that we'd recently upgraded) - it also silenced a bunch of warnings when exporting types from
wrangler. We'll need to fix those, but we'll do that when we work on unstable_dev etc. - workers-playground was complaining about the size of the bundle being generated, so I increased the limit on it
-
#6043
db66101Thanks @threepointone! - fix: avoid esbuild warning when running dev/bundleI've been experimenting with esbuild 0.21.4 with wrangler. It's mostly been fine. But I get this warning every time
▲ [WARNING] Import "__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__" will always be undefined because there is no matching export in "src/index.ts" [import-is-undefined] .wrangler/tmp/bundle-Z3YXTd/middleware-insertion-facade.js:8:23: 8 │ .....(OTHER_EXPORTS.__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__ ?? []), ╵This is because esbuild@0.18.5 enabled a warning by default whenever an undefined import is accessed on an imports object. However we abuse imports to inject stuff in
middleware.test.ts. A simple fix is to only inject that code in tests. -
#6062
267761bThanks @WalshyDev! - fix: typo inwrangler d1 executesaying "Databas" instead of "Database" -
#6064
84e6aebThanks @helloimalastair! - fix: Wrangler is now able to upload files to local R2 buckets above the 300 MiB limit -
Updated dependencies [
a0c3327,f5ad1d3,31cd51f]:- miniflare@3.20240610.1
- @cloudflare/kv-asset-handler@0.3.3
3.60.3
Patch Changes
-
#6025
122ef06Thanks @IgorMinar! - fix: avoid path collisions between performance and Performance Node.js polyfillsIt turns out that ESBuild paths are case insensitive, which can result in path collisions between polyfills for
globalThis.performanceandglobalThis.Performance, etc.This change ensures that we encode all global names to lowercase and decode them appropriately.
-
#6009
169a9faThanks @RamIdeas! - fix: reduce the number of parallel file reads on Windows to avoid EMFILE type errorsFixes #1586
-
53acdbcThanks @petebacondarwin! - fix: warn if user tries normal deploy when in the middle of a gradual version rollout -
Updated dependencies [
c4146fc]:
3.60.2
Patch Changes
-
#5307
e6a3d24Thanks @achanda! - fix: add more timePeriods towrangler d1 insightsThis PR updates
wrangler d1 insightsto accept arbitrary timePeriod values up to 31 days.
3.60.1
Patch Changes
- #6002
f1f1834Thanks @GregBrimble! - Revert a change in 3.60.0 which incorrectly batched assets for Pages uploads (https://github.com/cloudflare/workers-sdk/pull/5632).
3.60.0 [DEPRECATED]
Minor Changes
-
#5878
1e68fe5Thanks @IgorMinar! - feat: add experimental support for hybrid Node.js compatibilityThis feature is experimental and not yet available for general consumption.
Use a combination of workerd Node.js builtins (behind the
experimental:nodejs_compat_v2flag) and Unenv polyfills (configured to only add those missing from the runtime) to provide a new more effective Node.js compatibility approach. -
#5988
e144f63Thanks @RamIdeas! - feature: rename thewrangler secret:bulkcommand towrangler secret bulkThe old command is now deprecated (but still functional) and will be removed in a future release. The new command is now more consistent with the rest of the wrangler CLI commands.
-
#5989
35b1a2fThanks @RamIdeas! - feature: renamewrangler kv:...commands towrangler kv ...The old commands are now deprecated (but still functional) and will be removed in a future release. The new commands are now more consistent with the rest of the wrangler CLI commands.
-
#5861
1cc52f1Thanks @zebp! - feat: allow for Pages projects to upload sourcemapsPages projects can now upload sourcemaps for server bundles to enable remapped stacktraces in realtime logs when deployed with
upload_source_mapset totrueinwrangler.toml.
Patch Changes
-
#5939
21573f4Thanks @penalosa! - refactor: Adds the experimental flag--x-dev-envwhich opts in to using an experimental code path forwrangler devandwrangler dev --remote. There should be no observable behaviour changes when this flag is enabled. -
#5934
bac79fbThanks @dbenCF! - fix: Update create KV namespace binding details message for easier implementation -
#5927
6f83641Thanks @CarmenPopoviciu! - fix: Cleanpages devterminal ouputThis work includes a series of improvements to the
pages devterminal output, in an attempt to make this output more structured, organised, cleaner, easier to follow, and therefore more helpful for our users <3 -
#5960
e648825Thanks @petebacondarwin! - fix: avoid injecting esbuild watch stubs into production Worker codeWhen we added the ability to include additional modules in the deployed bundle of a Worker, we inadvertently also included some boiler plate code that is only needed at development time.
This fix ensures that this code is only injected if we are running esbuild in watch mode (e.g.
wrangler dev) and not when building for deployment.It is interesting to note that this boilerplate only gets included in the production code if there is an import of CommonJS code in the Worker, which esbuild needs to convert to an ESM import.
Fixes #4269
-
Updated dependencies [
ab95473]:
3.59.0
Minor Changes
-
#5963
bf803d7Thanks @Skye-31! - Feature: Add support for hiding the"unsafe" fields are experimentalwarning using an environment variableBy setting
WRANGLER_DISABLE_EXPERIMENTAL_WARNINGto any truthy value, these warnings will be hidden.
Patch Changes
- Updated dependencies [
bdbb7f8]:
3.58.0
Minor Changes
- #5933
93b98cbThanks @WalshyDev! - feature: allow for writing authentication details per API environment. This allows someone targetting staging to have their staging auth details saved separately from production, this saves them logging in and out when switching environments.
Patch Changes
-
#5938
9e4d8bcThanks @threepointone! - fix: let "assets" in wrangler.toml be a stringThe experimental "assets" field can be either a string or an object. However the type definition marks it only as an object. This is a problem because we use this to generate the json schema, which gets picked up by vscode's even better toml extension, and shows it to be an error when used with a string (even though it works fine). The fix is to simply change the type definition to add a string variant.
-
#5758
8e5e589Thanks @Jackenmen! - fix: use correct type for AI binding instead of unknown -
Updated dependencies [
e0e7725]:
3.57.2
Patch Changes
-
#5905
53f22a0Thanks @penalosa! - fix: Remove WARP certificate injection. Instead, you should ensure that any custom certificates that are needed are included inNODE_EXTRA_CA_CERTS. -
#5930
57daae0Thanks @WalshyDev! - chore: improve error message when updating secret for a non-deployed latest version. -
#5703
a905f31Thanks @penalosa! - fix: Don't useExportedHandler["middleware"]for injecting middleware
3.57.1
Patch Changes
-
#5859
f2ceb3aThanks @w-kuhn! - fix: queue consumer max_batch_timeout should accept a 0 value -
#5862
441a05fThanks @CarmenPopoviciu! - fix:wrangler pages deployshould fail if deployment was unsuccessfulIf a Pages project fails to deploy,
wrangler pages deploywill log an error message, but exit successfully. It should instead throw aFatalError. -
#5812
d5e00e4Thanks @thomasgauvin! - fix: remove Hyperdrive warning for local development.Hyperdrive bindings are now supported when developing locally with Hyperdrive. We should update our logs to reflect this.
-
#5626
a12b031Thanks @RamIdeas! - chore: ignore workerd output (error: CODE_MOVED) not intended for end-user devs
3.57.0
Minor Changes
-
#5696
7e97ba8Thanks @geelen! - feature: Improvedd1 execute --file --remoteperformance & added support for much larger SQL files within a single transaction. -
#5819
63f7acbThanks @CarmenPopoviciu! - fix: Show feedback on Pages project deployment failureToday, if uploading a Pages Function, or deploying a Pages project fails for whatever reason, there’s no feedback shown to the user. Worse yet, the shown message is misleading, saying the deployment was successful, when in fact it was not:
✨ Deployment complete!This commit ensures that we provide users with:
- the correct feedback with respect to their Pages deployment
- the appropriate messaging depending on the status of their project's deployment status
- the appropriate logs in case of a deployment failure
-
#5814
2869e03Thanks @CarmenPopoviciu! - fix: Display correct global flags inwrangler pages --helpRunning
wrangler pages --helpwill list, amongst others, the following global flags:-j, --experimental-json-config -c, --config -e, --env -h, --help -v, --versionThis is not accurate, since flags such as
--config,--experimental-json-config, orenvare not supported by Pages.This commit ensures we display the correct global flags that apply to Pages.
-
#5818
df2daf2Thanks @WalshyDev! - chore: Deprecate usage of the deployment object on the unsafe metadata binding in favor of the new version_metadata binding.If you're currently using the old binding, please move over to the new version_metadata binding by adding:
[version_metadata] binding = "CF_VERSION_METADATA"and updating your usage accordingly. You can find the docs for the new binding here: https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata
Patch Changes
-
#5838
609debdThanks @petebacondarwin! - fix: update undici to the latest version to avoid a potential vulnerability -
#5832
86a6e09Thanks @petebacondarwin! - fix: do not allow non-string values in bulk secret uploadsPrior to Wrangler 3.4.0 we displayed an error if the user tried to upload a JSON file that contained non-string secrets, since these are not supported by the Cloudflare backend.
This change reintroduces that check to give the user a helpful error message rather than a cryptic
workers.api.error.invalid_script_configerror code.
3.56.0
Minor Changes
- #5712
151bc3dThanks @penalosa! - feat: Supportmtls_certificatesandbrowserbindings when usingwrangler.tomlwith a Pages project
Patch Changes
-
#5813
9627cefThanks @GregBrimble! - fix: Upload Pages project assets with more grace- Reduces the maximum bucket size from 50 MiB to 40 MiB.
- Reduces the maximum asset count from 5000 to 2000.
- Allows for more retries (with increased sleep between attempts) when encountering an API gateway failure.
3.55.0
Minor Changes
-
#5570
66bdad0Thanks @sesteves! - feature: support delayed delivery in the miniflare's queue simulator.This change updates the miniflare's queue broker to support delayed delivery of messages, both when sending the message from a producer and when retrying the message from a consumer.
Patch Changes
-
#5740
97741dbThanks @WalshyDev! - chore: log "Version ID" inwrangler deploy,wrangler deployments list,wrangler deployments viewandwrangler rollbackto support migration from the deprecated "Deployment ID". Users should update any parsing to use "Version ID" before "Deployment ID" is removed. -
#5754
f673c66Thanks @RamIdeas! - fix: when using custom builds, thewrangler devproxy server was sometimes left in a paused stateThis could be observed as the browser loading indefinitely, after saving a source file (unchanged) when using custom builds. This is now fixed by ensuring the proxy server is unpaused after a short timeout period.
3.54.0
Minor Changes
3.53.1
Patch Changes
-
#5091
6365c90Thanks @Cherry! - fix: better handle dashes and other invalid JS identifier characters inwrangler typesgeneration for vars, bindings, etc.Previously, with the following in your
wrangler.toml, an invalid types file would be generated:[vars] some-var = "foobar"Now, the generated types file will be valid:
interface Env { "some-var": "foobar"; } -
#5748
27966a4Thanks @penalosa! - fix: Load sourcemaps relative to the entry directory, not cwd. -
#5746
1dd9f7eThanks @petebacondarwin! - fix: suggest trying to update Wrangler if there is a newer one available after an unexpected error -
#5226
f63e7a5Thanks @DaniFoldi! - fix: remove second Wrangler banner fromwrangler dispatch-namespace rename
3.53.0
Minor Changes
-
#5604
327a456Thanks @dario-piotrowicz! - feat: add support for environments ingetPlatformProxyallow
getPlatformProxyto target environments by allowing users to specify anenvironmentoptionExample usage:
const { env } = await getPlatformProxy({ environment: "production", });
Patch Changes
3.52.0
Minor Changes
-
#5666
81d9615Thanks @CarmenPopoviciu! - fix: Fix Pages config validation around Durable ObjectsToday Pages cannot deploy Durable Objects itself. For this reason it is mandatory that when declaring Durable Objects bindings in the config file, the
script_nameis specified. We are currently not failing validation ifscript_nameis not specified but we should. These changes fix that.
Patch Changes
-
#5610
24840f6Thanks @SuperchupuDev! - Markts-json-schema-generatoras a dev dependency -
#5669
a7e36d5Thanks @dario-piotrowicz! - fix: fix broken Durable Object local proxying (when nocfproperty is present)A regression was introduced in wrangler 3.46.0 (https://github.com/cloudflare/workers-sdk/pull/5215) which made it so that missing
Request#cfproperties are serialized as"undefined", this in turn throws a syntax parse error when such values are parsed viaJSON.parsebreaking the communication with Durable Object local proxies. Fix such issue by serializing missingRequest#cfproperties as"{}"instead. -
#5616
c6312b5Thanks @webbertakken! - fix: broken link to durable object migrations docs -
#5482
1b7739eThanks @DaniFoldi! - docs: show new Discord url everywhere for consistency. The old URL still works, but https://discord.cloudflare.com is preferred. -
Updated dependencies [
3a0d735,1b7739e]:- miniflare@3.20240419.0
- @cloudflare/kv-asset-handler@0.3.2
3.51.2
Patch Changes
- #5652
ccb9d3dThanks @petebacondarwin! - chore: re-release due to broken build
3.51.1
Patch Changes
-
#5640
bd2031bThanks @petebacondarwin! - fix: display user-friendly message when Pages function route param names are invalid.Param names can only contain alphanumeric and underscore characters. Previously the user would see a confusing error message similar to:
TypeError: Unexpected MODIFIER at 8, expected ENDNow the user is given an error similar to:
Invalid Pages function route parameter - "[hyphen-not-allowed]". Parameter names must only contain alphanumeric and underscore characters.Fixes #5540
-
#5619
6fe0af4Thanks @gmemstr! - fix: correctly handle non-text based files for kv putThe current version of the kv:key put command with the --path argument will treat file contents as a string because it is not one of Blob or File when passed to the form helper library. We should turn it into a Blob so it's not mangling inputs.
3.51.0
Minor Changes
-
#5477
9a46e03Thanks @pmiguel! - feature: Changed Queues client to use the new QueueId and ConsumerId-based endpoints. -
#5172
fbe1c9cThanks @GregBrimble! - feat: Allow marking external modules (with--external) to avoid bundling them when building Pages FunctionsIt's useful for Pages Plugins which want to declare a peer dependency.
Patch Changes
3.50.0
Minor Changes
-
#5587
d95450fThanks @CarmenPopoviciu! - fix:pages functions build-envshould throw error if invalid Pages config file is found -
#5572
65aa21cThanks @CarmenPopoviciu! - fix: fixpages function build-envto exit with code rather than throw fatal errorCurrently pages functions build-env throws a fatal error if a config file does not exit, or if it is invalid. This causes issues for the CI system. We should instead exit with a specific code, if any of those situations arises.
-
#5291
ce00a44Thanks @pmiguel! - feature: Added bespoke OAuth scope for Queues management.
Patch Changes
- Updated dependencies [
08b4908]:
3.49.0
Minor Changes
-
#5549
113ac41Thanks @penalosa! - feat: Supportwrangler pages secret put|delete|list|bulk -
#5550
4f47f74Thanks @penalosa! - feat: Generate a JSON schema for the Wrangler package & use it in templates -
#5561
59591cdThanks @ocsfrank! - feat: update R2 CreateBucket action to include the storage class in the request body
Patch Changes
-
#5374
7999dd2Thanks @maxwellpeterson! - fix: Improvements to--init-from-dashAdds user-specified CPU limit to
wrangler.tomlif one exists. Excludesusage_modelfromwrangler.tomlin all cases, since this field is deprecated and no longer used. -
#5553
dcd65ddThanks @rozenmd! - fix: refactor d1's time-travel compatibility check -
#5380
57d5658Thanks @GregBrimble! - fix: Respect--no-bundlewhen deploying a_worker.js/directory in Pages projects -
#5536
a7aa28aThanks @Cherry! - fix: resolve a regression wherewrangler pages devwould bind to port 8787 by default instead of 8788 since wrangler@3.38.0 -
Updated dependencies [
9575a51]:
3.48.0
Minor Changes
-
#5429
c5561b7Thanks @ocsfrank! - R2 will introduce storage classes soon. Wrangler allows you to interact with storage classes once it is enabled on your account.Wrangler supports an
-sflag that allows the user to specify a storage class when creating a bucket, changing the default storage class of a bucket, and uploading an object.wrangler r2 bucket create ia-bucket -s InfrequentAccess wrangler r2 bucket update storage-class my-bucket -s InfrequentAccess wrangler r2 object put bucket/ia-object -s InfrequentAccess --file foo
Patch Changes
-
#5531
887150aThanks @penalosa! - fix: Writewrangler pages functions build-envto file rather than stdout -
#5526
bafbd67Thanks @rozenmd! - fix: teachwrangler d1 createabout Australia
3.47.1
Patch Changes
- Updated dependencies [
9f15ce1]:
3.47.0
Minor Changes
- #5506
7734f80Thanks @penalosa! - feat: Add interactive prompt towrangler pages download configif an existingwrangler.tomlfile exists
3.46.0
Minor Changes
-
#5282
b7ddde1Thanks @maxwellpeterson! - feature: Add source map support for WorkersAdds the
source_mapsboolean config option. When enabled, source maps included in the build output are uploaded alongside the built code modules. Uploaded source maps can then be used to remap stack traces emitted by the Workers runtime. -
#5215
cd03d1dThanks @GregBrimble! - feature: support named entrypoints in service bindingsThis change allows service bindings to bind to a named export of another Worker. As an example, consider the following Worker named
bound:import { WorkerEntrypoint } from "cloudflare:workers"; export class EntrypointA extends WorkerEntrypoint { fetch(request) { return new Response("Hello from entrypoint A!"); } } export const entrypointB: ExportedHandler = { fetch(request, env, ctx) { return new Response("Hello from entrypoint B!"); }, }; export default <ExportedHandler>{ fetch(request, env, ctx) { return new Response("Hello from the default entrypoint!"); }, };Up until now, you could only bind to the
defaultentrypoint. With this change, you can bind toEntrypointAorentrypointBtoo using the newentrypointoption:[[services]] binding = "SERVICE" service = "bound" entrypoint = "EntrypointA"To bind to named entrypoints with
wrangler pages dev, use the#character:$ wrangler pages dev --service=SERVICE=bound#EntrypointA
Patch Changes
-
#5215
cd03d1dThanks @GregBrimble! - fix: ensure requesturlandcfproperties preserved across service bindingsPreviously, Wrangler could rewrite
urlandcfproperties when sending requests via service bindings or Durable Object stubs. To match production behaviour, this change ensures these properties are preserved.
3.45.0
Minor Changes
-
#5377
5d68744Thanks @CarmenPopoviciu! - feat: Addwrangler.tomlsupport inwrangler pages deployAs we are adding
wrangler.tomlsupport for Pages, we want to ensure thatwrangler pages deployworks with a configuration file. -
#5471
489b9c5Thanks @zebp! - feature: Add version-id filter for Worker tailing to filter logs by scriptVersion in a gradual deploymentThis allows users to only get logs in a gradual deployment if you are troubleshooting issues specific to one deployment. Example:
npx wrangler tail --version-id 72d3f357-4e52-47c5-8805-90be978c403f
Patch Changes
-
#5462
68faf67Thanks @OilyLime! - revert: Removes support for private networking Hyperdrive configs, pending more work to support the feature. Non-breaking change since the feature wasn't yet supported. -
#5494
a232ccfThanks @penalosa! - fix: Swallow parsing errors when a pages config file is required. -
#5484
e7f8dc3Thanks @ichernetsky-cf! - feature: support Cloudchamber deployment labels -
#5434
bf9dca8Thanks @OilyLime! - bugfix: Fix passing Hyperdrive caching options to backend -
#5403
5d6d521Thanks @oliy! - fix: wrangler dev --local support for ratelimits -
Updated dependencies [
940ad89]:
3.44.0
Minor Changes
-
#5461
f69e562Thanks @mattdeboard! - feature: Add command for fetching R2 Event Notification configurations for a given bucketThis allows users to see the entire event notification configuration -- i.e. every rule for every configured queue -- for a single bucket with a single request.
This change also improves messaging of console output when creating a new bucket notification.
Patch Changes
-
#5480
0cce21fThanks @penalosa! - fix: Ensure url & node:url export URL (aliased to globalThis.URL) in node_compat mode -
#5472
02a1091Thanks @penalosa! - fix: Expose more info fromwrangler pages functions build-env
3.43.0
Minor Changes
Patch Changes
3.42.0
Minor Changes
-
#5371
77152f3Thanks @G4brym! - feature: remove requirement for@cloudflare/aipackage to use Workers AIPreviously, to get the correct Workers AI API, you needed to wrap your
env.AIbinding withnew Ai()from@cloudflare/ai. This change moves the contents of@cloudflare/aiinto the Workers runtime itself, meaningenv.AIis now an instance ofAi, without the need for wrapping.
Patch Changes
- Updated dependencies [
d994066]:
3.41.0
Minor Changes
3.40.0
Minor Changes
-
#5426
9343714Thanks @RamIdeas! - feature: added a newwrangler triggers deploycommandThis command currently requires the
--experimental-versionsflag.This command extracts the trigger deployment logic from
wrangler deployand allows users to update their currently deployed Worker's triggers without doing another deployment. This is primarily useful for users ofwrangler versions uploadandwrangler versions deploywho can then runwrangler triggers deployto apply trigger changes to their currently deployed Worker Versions.The command can also be used even if not using the
wrangler versions ...commands. And, in fact, users are already using it implicitly when runningwrangler deploy. -
#4932
dc0c1dcThanks @xortive! - feature: Add support for private networking in Hyperdrive configs -
#5369
7115568Thanks @mattdeboard! - fix: Use queue name, not ID, forr2 bucket event-notificationsubcommandsSince the original command was not yet operational, this update does not constitute a breaking change.
Instead of providing the queue ID as the parameter to
--queue, users must provide the queue name. Under the hood, we will query the Queues API for the queue ID given the queue name. -
#5413
976adecThanks @pmiguel! - feature: Added Queue delivery controls support in wrangler.toml -
#5412
3e5a932Thanks @RamIdeas! - feature: adds the--jsonoption towrangler deployments list --experimental-versions,wrangler deployments status --experimental-versions,wrangler versions list --experimental-versionsandwrangler versions view --experimental-versionswhich will format the output as clean JSON. The--experimental-versionsflag is still required for these commands. -
#5258
fbdca7dThanks @OilyLime! - feature: URL decode components of the Hyperdrive config connection string -
#5416
47b325aThanks @mattdeboard! - fix: minor improvements to R2 notification subcommandr2 bucket event-notification <subcommand>becomesr2 bucket notification <subcommand>- Parameters to
--event-typeuse-instead of_(e.g.object_create->object-create)
Since the original command was not yet operational, this update does not constitute a breaking change.
Patch Changes
-
#5419
daac6a2Thanks @RamIdeas! - chore: add helpful logging to --experimental-versions commands -
#5400
c90dd6bThanks @RamIdeas! - chore: log of impending change of "Deployment ID" to "Version ID" inwrangler deploy,wrangler deployments list,wrangler deployments viewandwrangler rollback. This is a warning of a future change for anyone depending on the output text format, for example by grepping the output in automated flows. -
#5422
b341614Thanks @geelen! - fix: remove d1BetaWarning and all usagesThis PR removes the warning that D1 is in beta for all D1 commands.
-
Updated dependencies [
fbdca7d]:
3.39.0
Minor Changes
-
#5373
5bd8db8Thanks @RamIdeas! - feature: Implement versioned rollbacks viawrangler rollback [version-id] --experimental-versions.Please note, the
experimental-versionsflag is required to use the new behaviour. The originalwrangler rollbackcommand is unchanged if run without this flag.
Patch Changes
-
#5366
e11e169Thanks @RamIdeas! - fix: save non-versioned script-settings (logpush, tail_consumers) onwrangler versions deploy. This command still requires--experimental-versions. -
#5405
7c701bfThanks @RamIdeas! - chore: addwrangler deployments view [deployment-id] --experimental-versionscommandThis command will display an error message which points the user to run either
wrangler deployments status --experimental-versionsorwrangler versions view <version-id> --experimental-versionsinstead.
3.38.0
Minor Changes
-
#5310
528c011Thanks @penalosa! - feat: Watch the entire module root for changes in--no-bundlemode, rather than just the entrypoint file. -
#5327
7d160c7Thanks @penalosa! - feat: Addwrangler pages download config -
#5284
f5e2367Thanks @CarmenPopoviciu! - feat: Addwrangler.tomlsupport inwrangler pages devAs we are adding
wrangler.tomlsupport for Pages, we want to ensure thatwrangler pages devworks with a configuration file. -
#5353
3be826fThanks @penalosa! - feat: Updateswrangler pages functions buildto support using configuration fromwrangler.tomlin the generated output. -
#5102
ba52208Thanks @pmiguel! - feature: add support for queue delivery controls onwrangler queues create
Patch Changes
-
#5327
7d160c7Thanks @penalosa! - fix: Use specific error code to signal a wrangler.toml file not being found in build-env -
#5310
528c011Thanks @penalosa! - fix: Reload Python workers when therequirements.txtfile changes
3.37.0
Minor Changes
-
#5294
bdc121dThanks @mattdeboard! - feature: Addevent-notificationcommands in support of event notifications for Cloudflare R2.Included are commands for creating and deleting event notification configurations for individual buckets.
-
#5231
e88ad44Thanks @w-kuhn! - feature: Add support for configuring HTTP Pull consumers for QueuesHTTP Pull consumers can be used to pull messages from queues via https request.
Patch Changes
-
#5317
9fd7ebaThanks @GregBrimble! - chore: Deprecate-- <command>,--proxyand--script-pathoptions fromwrangler pages dev.Build your application to a directory and run the
wrangler pages dev <directory>instead. This results in a more faithful emulation of production behavior. -
Updated dependencies [
248a318]:
3.36.0
Minor Changes
-
#5234
e739b7fThanks @CarmenPopoviciu! - feat: Implement environment inheritance for Pages configurationFor Pages, Wrangler will not require both of the supported named environments ("preview" | "production") to be explicitly defined in the config file. If either
[env.production]or[env.preview]is left unspecified, Wrangler will use the top-level environment when targeting that named Pages environment.
Patch Changes
-
#5306
c60fed0Thanks @taylorlee! - fix: Remove triggered_by annotation from experimentalversions deploycommand which is now set by the API and cannot be set by the client. -
#5321
ac93411Thanks @RamIdeas! - fix: rename--experimental-gradual-rolloutsto--experimental-versionsflagThe
--experimental-gradual-rolloutsflag has been made an alias and will still work.And additional shorthand alias
--x-versionshas also been added and will work too. -
#5324
bfc4282Thanks @penalosa! - fix: Ignore OPTIONS requests in Wrangler's oauth serverIn Chrome v123, the auth requests from the browser back to wrangler now first include a CORS OPTIONS preflight request before the expected GET request. Wrangler was able to successfully complete the login with the first (OPTIONS) request, and therefore upon the second (GET) request, errored because the token exchange had already occured and could not be repeated.
Wrangler now stops processing the OPTIONS request before completing the token exchange and only proceeds on the expected GET request.
If you see a
ErrorInvalidGrantin a previous wrangler version when runningwrangler login, please try upgrading to this version or later. -
#5099
93150aaThanks @KaiSpencer! - feat: expose--show-interactive-dev-sessionflagThis flag controls the interactive mode of the dev session, a feature that already exists internally but was not exposed to the user. This is useful for CI/CD environments where the interactive mode is not desired, or running in tools like
turboandnx.
3.35.0
Minor Changes
-
#5166
133a190Thanks @CarmenPopoviciu! - feat: Implement config file validation for Pages projectsWrangler proper has a mechanism in place through which it validates a wrangler.toml file for Workers projects. As part of adding wrangler toml support for Pages, we need to put a similar mechanism in place, to validate a configuration file against Pages specific requirements.
-
#5279
0a86050Thanks @penalosa! - feat: Support the hidden commandwrangler pages functions build-env -
#5093
a676f55Thanks @benycodes! - feature: add --dispatch-namespace to wrangler deploy to support uploading Workers directly to a Workers for Platforms dispatch namespace.
Patch Changes
-
#5275
e1f2576Thanks @petebacondarwin! - fix: ensure tail exits when the WebSocket disconnectsPreviously when the tail WebSocket disconnected, e.g. because of an Internet failure, the
wrangler tailcommand would just hang and neither exit nor any longer receive tail messages.Now the process exits with an exit code of 1, and outputs an error message.
The error message is formatted appropriately, if the tail format is set to
json.Fixes #3927
-
#5069
8f79981Thanks @RamIdeas! - chore: deprecatewrangler versioncommandwrangler versionis an undocumented alias forwrangler --version. It is being deprecated in favour of the more conventional flag syntax to avoid confusion with a new (upcoming)wrangler versionscommand. -
Updated dependencies [
1720f0a]:
3.34.2
Patch Changes
- #5238
a0768bcThanks @RamIdeas! - fix:versions uploadannotations (--messageand/or--tag) are now applied correctly to the uploaded Worker Version
3.34.1
Patch Changes
- Updated dependencies [
2e50d51]:
3.34.0
Minor Changes
-
#5224
03484c2Thanks @RamIdeas! - feature: Implementwrangler deployments listandwrangler deployments statusbehind--experimental-gradual-rolloutsflag. -
#5115
29e8151Thanks @RamIdeas! - feature: Implementwrangler versions deploycommand.For now, invocations should use the
--experimental-gradual-rolloutsflag.Without args, a user will be guided through prompts. If args are specified, they are used as the default values for the prompts. If the
--yesflag is specified, the defaults are automatically accepted for a non-interactive flow. -
#5208
4730b6cThanks @RamIdeas! - feature: Implementwrangler versions listandwrangler versions viewcommands behind the--experimental-gradual-rolloutsflag. -
#5064
bd935cfThanks @OilyLime! - feature: Improve create and update logic for hyperdrive to include caching settings
3.33.0
Minor Changes
-
#4930
2680462Thanks @rozenmd! - refactor: defaultwrangler d1 executeandwrangler d1 migrationscommands to local mode first, to matchwrangler devThis PR defaults
wrangler d1 executeandwrangler d1 migrationscommands to use the local development environment provided by wrangler to match the default behaviour inwrangler dev.BREAKING CHANGE (for a beta feature):
wrangler d1 executeandwrangler d1 migrationscommands now default--localtotrue. When runningwrangler d1 executeagainst a remote D1 database, you will need to provide the--remoteflag.
Patch Changes
-
#5184
046930eThanks @nora-soderlund! - fix: change d1 migrations create to use the highest migration number rather than the first non-existing migration number to allow for gaps in the migration files.
3.32.0
Minor Changes
-
#5148
11951f3Thanks @dom96! - chore: bumpworkerdto1.20240304.0 -
#5148
11951f3Thanks @dom96! - fix: use python_workers compat flag for Python
Patch Changes
-
#5089
5b85dc9Thanks @DaniFoldi! - fix: include all currently existing bindings inwrangler typesAdd support for Email Send, Vectorize, Hyperdrive, mTLS, Browser Rendering and Workers AI bindings in
wrangler typesFor example, from the following
wrangler.tomlsetup:[browser] binding = "BROWSER" [ai] binding = "AI" [[send_email]] name = "SEND_EMAIL" [[vectorize]] binding = "VECTORIZE" index_name = "VECTORIZE_NAME" [[hyperdrive]] binding = "HYPERDRIVE" id = "HYPERDRIVE_ID" [[mtls_certificates]] binding = "MTLS" certificate_id = "MTLS_CERTIFICATE_ID"Previously, nothing would have been included in the generated Environment. Now, the following will be generated:
interface Env { SEND_EMAIL: SendEmail; VECTORIZE: VectorizeIndex; HYPERDRIVE: Hyperdrive; MTLS: Fetcher; BROWSER: Fetcher; AI: Fetcher; }
3.31.0
Minor Changes
-
#5119
b0bd413Thanks @garrettgu10! - feature: Python support for remote dev -
#5118
30694a3Thanks @garrettgu10! - fix: Including version identifiers in Python requirements.txt will now throw an error
Patch Changes
-
#5132
82a3f94Thanks @mrbbot! - fix: switch default logging level ofunstable_dev()towarnWhen running
unstable_dev()in its default "test mode", the logging level was set tonone. This meant any Worker startup errors or helpful warnings wouldn't be shown. This change switches the default towarn. To restore the previous behaviour, includelogLevel: "none"in your options object:const worker = await unstable_dev("path/to/script.js", { logLevel: "none", }); -
#5128
d27e2a7Thanks @taylorlee! - fix: Add legacy_env support to experimental versions upload command. -
#5087
a5231deThanks @dario-piotrowicz! - fix: makewrangler typesalways generate ad.tsfile for module workersCurrently if a config file doesn't define any binding nor module, running
wrangler typesagainst such file would not produce ad.tsfile.Producing a
d.tsfile can however still be beneficial as it would define a correct env interface (even if empty) that can be expanded/referenced by user code (this can be particularly convenient for scaffolding tools that may want to always generate an env interface).Example: Before
wrangler types --env-interface MyEnvrun with an emptywrangler.tomlfile would not generate any file, after these change it would instead generate a file with the following content:interface MyEnv { } -
#5138
3dd9089Thanks @G4brym! - fix: ensure Workers-AI local mode fetcher returns headers to client worker
3.30.1
Patch Changes
-
#5106
2ed7f32Thanks @RamIdeas! - fix: automatically drain incoming request bodiesPreviously, requests sent to
wrangler devwith unconsumed bodies could result inNetwork connection losterrors. This change attempts to work around the issue by ensuring incoming request bodies are drained if they're not used. This is a temporary fix whilst we try to address the underlying issue. Whilst we don't think this change will introduce any other issues, it can be disabled by setting theWRANGLER_DISABLE_REQUEST_BODY_DRAINING=trueenvironment variable. Note this fix is only applied if you've enabled Wrangler's bundling—--no-bundlemode continues to have the previous behaviour. -
#5107
65d0399Thanks @penalosa! - fix: Ensures that switching to remote mode during a dev session (from local mode) will correctly use the right zone. Previously, zone detection happened before the dev session was mounted, and so dev sessions started with local mode would have no zone inferred, and would have failed to start, with an ugly error. -
#5107
65d0399Thanks @penalosa! - fix: Ensure that preview sessions created without a zone don't switch the host on which to start the preview from the one returned by the API. -
#4833
54f6bfcThanks @admah! - fix: remove extra arguments from wrangler init deprecation message and update recommended c3 versionc3 can now infer the pre-existing type from the presence of the
--existing-scriptflag so we can remove the extratypeargument. C3 2.5.0 introduces an auto-update feature that will make sure users get the latest minor version of c3 and prevent problems where older 2.x.x versions get cached by previous runs ofwrangler init.
3.30.0
Minor Changes
-
#4742
c2f3f1eThanks @benycodes! - feat: allow preserving file names when defining rules for non-js modulesThe developer is now able to specify the `preserve_file_names property in wrangler.toml which specifies whether Wrangler will preserve the file names additional modules that are added to the deployment bundle of a Worker.
If not set to true, files will be named using the pattern ${fileHash}-${basename}. For example,
34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico.Resolves #4741
Patch Changes
- Updated dependencies [
0c0949d]:
3.29.0
Minor Changes
-
#5042
5693d076Thanks @dario-piotrowicz! - feat: add new--env-interfacetowrangler typesAllow users to specify the name of the interface that they want
wrangler typesto generate for theenvparameter, via the new CLI flag--env-interfaceExample:
wrangler types --env-interface CloudflareEnvgenerates
interface CloudflareEnv {}instead of
interface Env {}
-
#5042
5693d076Thanks @dario-piotrowicz! - feat: add newpathpositional argument towrangler typesAllow users to specify the path to the typings (.d.ts) file they want
wrangler typesto generateExample:
wrangler types ./my-env.d.tsgenerates a
my-env.d.tsfile in the current directory instead of creating aworker-configuration.d.tsfile
Patch Changes
-
#5042
5693d076Thanks @dario-piotrowicz! - feat: include command run in thewrangler typescommentIn the comment added to the
.d.tsfile generated bywrangler typesinclude the command run to generated the file
- #4303
1c460287Thanks @richardscarrott! - fix: allow Pages Functions to import built-in node:* modules, even when not bundling with wrangler
- #4957
50f93bd2Thanks @garrettgu10! - fix: don't strip.pyextensions from Python modules
-
#5042
5693d076Thanks @dario-piotrowicz! - fix: makewrangler typeshonor top level config argumentThe
wrangler typescommand currently ignores the-c|--configargument (although it is still getting shown in the command's help message). Make sure that the command honors the flag. Also, if no config file is detected present a warning to the user
-
#5042
5693d076Thanks @dario-piotrowicz! - fix: make thewrangler typescommand pick up local secret keys from.dev.varsMake sure that the
wrangler typescommand correctly picks up secret keys defined in.dev.varsand includes them in the generated file (marking them as genericstringtypes of course) -
Updated dependencies [
b03db864]:
3.28.4
Patch Changes
-
#5050
88be4b84Thanks @nora-soderlund! - fix: allow kv:namespace create to accept a namespace name that contains characters not allowed in a binding nameThis command tries to use the namespace name as the binding. Previously, we would unnecessarily error if this namespace name did not fit the binding name constraints. Now we accept such names and then remove invalid characters when generating the binding name.
3.28.3
Patch Changes
-
#5026
04584722Thanks @dario-piotrowicz! - fix: make suregetPlatformProxyproduces a production-likecachesobjectmake sure that the
cachesobject returned togetPlatformProxybehaves in the same manner as the one present in production (where calling unsupported methods throws a helpful error message)note: make sure that the unsupported methods are however not included in the
CacheStoragetype definition
-
#5030
55ea0721Thanks @mrbbot! - fix: don't suggest reporting user errors to GitHubWrangler has two different types of errors: internal errors caused by something going wrong, and user errors caused by an invalid configuration. Previously, we would encourage users to submit bug reports for user errors, even though there's nothing we can do to fix them. This change ensures we only suggest this for internal errors.
-
#4900
3389f2e9Thanks @OilyLime! - feature: allow hyperdrive users to set local connection string as environment variableWrangler dev now supports the HYPERDRIVE_LOCAL_CONNECTION_STRING environmental variable for connecting to a local database instance when testing Hyperdrive in local development. This environmental variable takes precedence over the localConnectionString set in wrangler.toml.
-
#5033
b1ace91bThanks @mrbbot! - fix: wait for actual port before opening browser with--port=0Previously, running
wrangler dev --remote --port=0and then immediately pressingbwould openlocalhost:0in your default browser. This change queues up opening the browser until Wrangler knows the port the dev server was started on.
-
#5026
04584722Thanks @dario-piotrowicz! - fix: relax thegetPlatformProxy's' cache request/response typesprior to these changes the caches obtained from
getPlatformProxywould useunknowns as their types, this proved too restrictive and incompatible with the equivalent@cloudflare/workers-typestypes, we decided to useanys instead to allow for more flexibility whilst also making the type compatible with workers-types -
Updated dependencies [
7723ac17,027f9719,027f9719,027f9719,027f9719,027f9719,027f9719]: -
#4475 86d94ff Thanks @paulrostorp! - feat: support custom HTTPS certificate paths in Wrangler dev commands.
Adds flags --https-key-path and --https-cert-path to
wrangler devandwrangler pages devcommands.Fixes #2118
3.28.2
Patch Changes
-
#4950
05360e43Thanks @petebacondarwin! - fix: ensure we do not rewrite external Origin headers in wrangler devIn https://github.com/cloudflare/workers-sdk/pull/4812 we tried to fix the Origin headers to match the Host header but were overzealous and rewrote Origin headers for external origins (outside of the proxy server's origin).
This is now fixed, and moreover we rewrite any headers that refer to the proxy server on the request with the configured host and vice versa on the response.
This should ensure that CORS is not broken in browsers when a different host is being simulated based on routes in the Wrangler configuration.
- #4997
bfeefe27Thanks @dario-piotrowicz! - chore: add missingdefineNavigatorUserAgentdependency to useEsbuild hook
-
#5002
315a651bThanks @dario-piotrowicz! - chore: renamegetBindingsProxytogetPlatformProxyinitially
getBindingsProxywas supposed to only provide proxies for bindings, the utility has however grown, including nowcf,ctxandcaches, to clarify the increased scope the utility is getting renamed togetPlatformProxyand itsbindingsfield is getting renamedenvnote:
getBindingProxywith its signature is still kept available, making this a non breaking change -
Updated dependencies [
05360e43]:
3.28.1
Patch Changes
-
#4962
d6585178Thanks @mrbbot! - fix: ensurewrangler devcan reload without crashing when importingnode:*modulesThe previous Wrangler release introduced a regression that caused reloads to fail when importing
node:*modules. This change fixes that, and ensures these modules can always be resolved.
- #4951
ffafe8adThanks @nora-soderlund! - fix: D1 batch splitting to handle CASE as compound statement starts
3.28.0
Minor Changes
-
#4499
cf9c029bThanks @penalosa! - feat: Support runtime-agnostic polyfillsPreviously, Wrangler treated any imports of
node:*modules as build-time errors (unless one of the two Node.js compatibility modes was enabled). This is sometimes overly aggressive, since those imports are often not hit at runtime (for instance, it was impossible to write a library that worked across Node.JS and Workers, using Node packages only when running in Node). Here's an example of a function that would cause Wrangler to fail to build:export function randomBytes(length: number) { if (navigator.userAgent !== "Cloudflare-Workers") { return new Uint8Array(require("node:crypto").randomBytes(length)); } else { return crypto.getRandomValues(new Uint8Array(length)); } }This function should work in both Workers and Node, since it gates Node-specific functionality behind a user agent check, and falls back to the built-in Workers crypto API. Instead, Wrangler detected the
node:cryptoimport and failed with the following error:✘ [ERROR] Could not resolve "node:crypto" src/randomBytes.ts:5:36: 5 │ ... return new Uint8Array(require('node:crypto').randomBytes(length)); ╵ ~~~~~~~~~~~~~ The package "node:crypto" wasn't found on the file system but is built into node. Add "node_compat = true" to your wrangler.toml file to enable Node.js compatibility.This change turns that Wrangler build failure into a warning, which users can choose to ignore if they know the import of
node:*APIs is safe (because it will never trigger at runtime, for instance):▲ [WARNING] The package "node:crypto" wasn't found on the file system but is built into node. Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from: - src/randomBytes.tsHowever, in a lot of cases, it's possible to know at build time whether the import is safe. This change also injects
navigator.userAgentintoesbuild's bundle settings as a predefined constant, which means thatesbuildcan tree-shake away imports ofnode:*APIs that are guaranteed not to be hit at runtime, supressing the warning entirely.
-
#4926
a14bd1d9Thanks @dario-piotrowicz! - feature: add acffield to thegetBindingsProxyresultAdd a new
cffield to thegetBindingsProxyresult that people can use to mock the productioncf(IncomingRequestCfProperties) object.Example:
const { cf } = await getBindingsProxy(); console.log(`country = ${cf.country}; colo = ${cf.colo}`);
Patch Changes
-
#4931
321c7ed7Thanks @dario-piotrowicz! - fix: make the entrypoint optional for thetypescommandCurrently running
wrangler typesagainst awrangler.tomlfile without a defined entrypoint (mainvalue) causes the command to error with the following message:✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. `wrangler types path/to/script`) or the `main` config field.However developers could want to generate types without the entrypoint being defined (for example when using
getBindingsProxy), so these changes make the entrypoint optional for thetypescommand, assuming modules syntax if none is specified.
-
#4867
d637bd59Thanks @RamIdeas! - fix: inflight requests to UserWorker which failed across reloads are now retriedPreviously, when running
wrangler dev, requests inflight during a UserWorker reload (due to config or source file changes) would fail.Now, if those inflight requests are GET or HEAD requests, they will be reproxied against the new UserWorker. This adds to the guarantee that requests made during local development reach the latest worker.
-
#4938
75bd08aeThanks @rozenmd! - fix: print wrangler banner at the start of every d1 commandThis PR adds a wrangler banner to the start of every D1 command (except when invoked in JSON-mode)
For example:
⛅️ wrangler 3.27.0 ------------------- ...
-
#4953
d96bc7ddThanks @mrbbot! - fix: allowportoption to be specified withunstable_dev()Previously, specifying a non-zero
portwhen usingunstable_dev()would try to start two servers on thatport. This change ensures we only start the user-facing server on the specifiedport, allowunstable_dev()to startup correctly.
3.27.0
Minor Changes
-
#4877
3e7cd6e4Thanks @magnusdahlstrand! - fix: Do not show unnecessary errors during watch rebuildsWhen Pages is used in conjunction with a full stack framework, the framework build will temporarily remove files that are being watched by Pages, such as
_worker.jsand_routes.json. Previously we would display errors for these changes, which adds confusing and excessive messages to the Pages dev output. Now builds are skipped if a watched_worker.jsor_routes.jsonis removed.
-
#4901
2469e9faThanks @penalosa! - feature: implemented Python support in WranglerPython Workers are now supported by
wrangler deployandwrangler dev.
-
#4922
4c7031a6Thanks @dario-piotrowicz! - feature: add actxfield to thegetBindingsProxyresultAdd a new
ctxfiled to thegetBindingsProxyresult that people can use to mock the productionExecutionContextobject.Example:
const { ctx } = await getBindingsProxy(); ctx.waitUntil(myPromise);
Patch Changes
- #4914
e61dba50Thanks @nora-soderlund! - fix: ensure d1 validation errors render user friendly messages
-
#4907
583e4451Thanks @mrbbot! - fix: mark R2 object and bucket not found errors as unreportablePreviously, running
wrangler r2 objects {get,put}with an object or bucket that didn't exist would ask if you wanted to report that error to Cloudflare. There's nothing we can do to fix this, so this change prevents the prompt in this case.
-
#4872
5ef56067Thanks @rozenmd! - fix: intercept and stringify errors thrown by d1 execute in --json modePrior to this PR, if a query threw an error when run in
wrangler d1 execute ... --json, wrangler would swallow the error.This PR returns the error as JSON. For example, the invalid query
SELECT asdf;now returns the following in JSON mode:{ "error": { "text": "A request to the Cloudflare API (/accounts/xxxx/d1/database/xxxxxxx/query) failed.", "notes": [ { "text": "no such column: asdf at offset 7 [code: 7500]" } ], "kind": "error", "name": "APIError", "code": 7500 } }
-
#4888
3679bc18Thanks @petebacondarwin! - fix: ensure that the Pages dev proxy server does not change the Host headerPreviously, when configuring
wrangler pages devto use a proxy to a 3rd party dev server, the proxy would replace the Host header, resulting in problems at the dev server if it was checking for cross-site scripting attacks.Now the proxy server passes through the Host header unaltered making it invisible to the 3rd party dev server.
Fixes #4799
-
#4909
34b6ea1eThanks @rozenmd! - feat: add an experimentalinsightscommand towrangler d1This PR adds a
wrangler d1 insights <DB_NAME>command, to let D1 users figure out which of their queries to D1 need to be optimised.This command defaults to fetching the top 5 queries that took the longest to run in total over the last 24 hours.
You can also fetch the top 5 queries that consumed the most rows read over the last week, for example:
npx wrangler d1 insights northwind --sortBy reads --timePeriod 7dOr the top 5 queries that consumed the most rows written over the last month, for example:
npx wrangler d1 insights northwind --sortBy writes --timePeriod 31dOr the top 5 most frequently run queries in the last 24 hours, for example:
npx wrangler d1 insights northwind --sortBy count
-
#4830
48f90859Thanks @Lekensteyn! - fix: listen on loopback for wrangler dev port check and loginAvoid listening on the wildcard address by default to reduce the attacker's surface and avoid firewall prompts on macOS.
Relates to #4430.
-
#4907
583e4451Thanks @mrbbot! - fix: ensurewrangler dev --log-levelflag applied to all logsPreviously,
wrangler devmay have ignored the--log-levelflag for some startup logs. This change ensures the--log-levelflag is applied immediately. -
Updated dependencies [
148feff6]:
3.26.0
Minor Changes
-
#4847
6968e11fThanks @dario-piotrowicz! - feature: expose new (no-op)cachesfield ingetBindingsProxyresultAdd a new
cachesfield to thegetBindingsProxyresult, such field implements a no operation (no-op) implementation of the runtimecachesNote: Miniflare exposes a proper
cachesmock, we will want to use that one in the future but issues regarding it must be ironed out first, so for the time being a no-op will have to do
Patch Changes
-
#4860
b92e5ac0Thanks @Sibirius! - fix: allow empty strings in secret:bulk uploadPreviously, the
secret:bulkcommand would fail if any of the secrets in the secret.json file were empty strings and they already existed remotely.
-
#4869
fd084bc0Thanks @jculvey! - feature: Expose AI bindings togetBindingsProxy.The
getBindingsProxyutility function will now contain entries for any AI bindings specified inwrangler.toml.
-
#4880
65da40a1Thanks @petebacondarwin! - fix: do not attempt login during dry-runThe "standard pricing" warning was attempting to make an API call that was causing a login attempt even when on a dry-run. Now this warning is disabled during dry-runs.
Fixes #4723
-
#4819
6a4cb8c6Thanks @magnusdahlstrand! - fix: Use appropriate logging levels when parsing headers and redirects inwrangler pages dev.
3.25.0
Minor Changes
-
#4815
030360d6Thanks @jonesphillip! - feature: adds support for configuring Sippy with Google Cloud Storage (GCS) provider.Sippy (https://developers.cloudflare.com/r2/data-migration/sippy/) now supports Google Cloud Storage. This change updates the
wrangler r2 sippycommands to take a provider (AWS or GCS) and appropriate configuration arguments. If you don't specify--providerargument then the command will enter an interactive flow for the user to set the configuration. Note that this is a breaking change from the previous behaviour where you could configure AWS as the provider without explictly specifying the--providerargument. (This breaking change is allowed in a minor release because the Sippy feature andwrangler r2 sippycommands are marked as beta.)
Patch Changes
-
#4841
10396125Thanks @rozenmd! - fix: replace D1's dashed time-travel endpoints with underscored onesD1 will maintain its
d1/database/${databaseId}/time-travel/*endpoints until GA, at which point older versions of wrangler will start throwing errors to users, asking them to upgrade their wrangler version to continue using Time Travel via CLI.
-
#4656
77b0bce3Thanks @petebacondarwin! - fix: ensure upstream_protocol is passed to the WorkerIn
wrangler devit is possible to set theupstream_protocol, which is the protocol under which the User Worker believes it has been requested, as recorded in therequest.urlthat can be used for forwarding on requests to the origin.Previously, it was not being passed to
wrangler devin local mode. Instead it was always set tohttp.Note that setting
upstream_protocoltohttpis not supported inwrangler devremote mode, which is the case since Wrangler v2.0.This setting now defaults to
httpsin remote mode (since that is the only option), and to the same aslocal_protocolin local mode.Fixes #4539
-
#4810
6eb2b9d1Thanks @gabivlj! - fix: Cloudchamber command shows json error message on load account if --json specifiedIf the user specifies a json option, we should see a more detailed error on why
loadAccountfailed.
-
#4820
b01c1548Thanks @mrbbot! - fix: show up-to-date sources in DevTools when saving source filesPreviously, DevTools would never refresh source contents after opening a file, even if it was updated on-disk. This could cause issues with step-through debugging as breakpoints set in source files would map to incorrect locations in bundled Worker code. This change ensures DevTools' source cache is cleared on each reload, preventing outdated sources from being displayed.
-
Updated dependencies [
8166eefc]:
3.24.0
Minor Changes
-
#4523
9f96f28bThanks @dario-piotrowicz! - Add newgetBindingsProxyutility to the wrangler packageThe new utility is part of wrangler's JS API (it is not part of the wrangler CLI) and its use is to provide proxy objects to bindings, such objects can be used in Node.js code as if they were actual bindings
The utility reads the
wrangler.tomlfile present in the current working directory in order to discern what bindings should be available (awrangler.jsonfile can be used too, as well as config files with custom paths).Example
Assuming that in the current working directory there is a
wrangler.tomlfile with the following content:[[kv_namespaces]] binding = "MY_KV" id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"The utility could be used in a nodejs script in the following way:
import { getBindingsProxy } from "wrangler"; const { bindings, dispose } = await getBindingsProxy(); try { const myKv = bindings.MY_KV; const kvValue = await myKv.get("my-kv-key"); console.log(`KV Value = ${kvValue}`); } finally { await dispose(); }
Patch Changes
-
#3427
b79e93a3Thanks @ZakKemble! - fix: Use Windows SYSTEMROOT env var for finding netstatCurrently, the drive letter of os.homedir() (the user's home directory) is used to build the path to netstat.exe. However, user directories are not always on the same drive as the Windows installation, in which case the path to netstat will be incorrect. Now we use the %SYSTEMROOT% environment variable which correctly points to the installation path of Windows.
-
#4768
c3e410c2Thanks @petebacondarwin! - ci: bump undici versions to 5.28.2 -
Updated dependencies [
c3e410c2]:
3.23.0
Minor Changes
Patch Changes
-
#4674
54ea6a53Thanks @matthewdavidrodgers! - Fix usage of patch API in bulk secrets updateOnly specifying the name and type of a binding instructs the patch API to copy the existing binding over - but we were including the contents of the binding as well. Normally that's OK, but there are some subtle differences between what you specify to create a binding vs what it looks like once it's created, specifically for Durable Objects. So instead, we just use the simpler inheritance.
-
#4772
4a9f03cfThanks @mrbbot! - fix: ensure dev server doesn't change request URLsPreviously, Wrangler's dev server could change incoming request URLs unexpectedly (e.g. rewriting
http://localhost:8787//testtohttp://localhost:8787/test). This change ensures URLs are passed through without modification.Fixes #4743.
3.22.5
Patch Changes
-
#4707
96a27f3dThanks @mrbbot! - fix: only offer to report unknown errorsPreviously, Wrangler would offer to report any error to Cloudflare. This included errors caused by misconfigurations or invalid commands. This change ensures those types of errors aren't reported.
- #4676
078cf84dThanks @dario-piotrowicz! - make sure the script path is correctly resolved inpages devwhen no directory is specified
-
#4722
5af6df13Thanks @mrbbot! - fix: don't require auth forwrangler r2 object --localoperationsPreviously, Wrangler would ask you to login when reading or writing from local R2 buckets. This change ensures no login prompt is displayed, as authentication isn't required for these operations.
-
#4719
c37d94b5Thanks @mrbbot! - fix: ensureminiflareandwranglercan source map in the same processPreviously, if in a
wrangler devsession you calledconsole.log()and threw an unhandled error you'd see an error like[ERR_ASSERTION]: The expression evaluated to a falsy value. This change ensures you can do both of these things in the same session.
-
#4683
24147166Thanks @mrbbot! - fix: ensure logs containingatnot truncated toat [object Object]Previously, logs containing
atwere always treated as stack trace call sites requiring source mapping. This change updates the call site detection to avoid false positives.
-
#4748
3603a60dThanks @Cherry! - fix: resolve imports in a more node-like fashion for packages that do not declare exportsPreviously, trying to import a file that wasn't explicitly exported from a module would result in an error, but now, better attempts are made to resolve the import using node's module resolution algorithm. It's now possible to do things like this:
import JPEG_DEC_WASM from "@jsquash/jpeg/codec/dec/mozjpeg_dec.wasm";This works even if the
mozjpeg_dec.wasmfile isn't explicitly exported from the@jsquash/jpegmodule.Fixes #4726
-
#4687
0a488f66Thanks @mrbbot! - fix: remove confusing--localmessaging fromwrangler pages devRunning
wrangler pages devwould previously log a warning saying--local is no longer requiredeven though--localwas never set. This change removes this warning.
3.22.4
Patch Changes
-
#4699
4b4c1416Thanks @mrbbot! - fix: prevent repeated reloads with circular service bindingswrangler@3.19.0introduced a bug where starting multiplewrangler devsessions with service bindings to each other resulted in a reload loop. This change ensures Wrangler only reloads when dependentwrangler devsessions start/stop.
3.22.3
Patch Changes
-
#4693
93e88c43Thanks @mrbbot! - fix: ensurewrangler devexits with code0on clean exitPreviously,
wrangler devwould exit with a non-zero exit code when pressing CTRL+C or x. This change ensureswranglerexits with code0in these cases.
-
#4630
037de5ecThanks @petebacondarwin! - fix: ensure User Worker gets the correct Host header in wrangler dev local modeSome full-stack frameworks, such as Next.js, check that the Host header for a server side action request matches the host where the application is expected to run.
In
wrangler devwe have a Proxy Worker in between the browser and the actual User Worker. This Proxy Worker is forwarding on the request from the browser, but then the actual User Worker is running on a different host:port combination than that which the browser thinks it should be on. This was causing the framework to think the request is malicious and blocking it.Now we update the request's Host header to that passed from the Proxy Worker in a custom
MF-Original-Urlheader, but only do this if the request also contains a shared secret between the Proxy Worker and User Worker, which is passed via theMF-Proxy-Shared-Secretheader. This last feature is to prevent a malicious website from faking the Host header in a request directly to the User Worker.Fixes https://github.com/cloudflare/next-on-pages/issues/588
- #4695
0f8a03c0Thanks @mrbbot! - fix: ensure API failures without additional messages logged correctly
-
#4693
93e88c43Thanks @mrbbot! - fix: ensurewrangler pages devexits cleanlyPreviously, pressing CTRL+C or x when running
wrangler pages devwouldn't actually exitwrangler. You'd need to press CTRL+C a second time to exit the process. This change ensureswranglerexits the first time.
-
#4696
624084c4Thanks @mrbbot! - fix: include additional modules inlargest dependencieswarningIf your Worker fails to deploy because it's too large, Wrangler will display of list of your Worker's largest dependencies. Previously, this just included JavaScript dependencies. This change ensures additional module dependencies (e.g. WebAssembly, text blobs, etc.) are included when computing this list.
-
Updated dependencies [
037de5ec]:
3.22.2
Patch Changes
-
#4600
4233e514Thanks @mrbbot! - fix: apply source mapping to deployment validation errorsPreviously if a Worker failed validation during
wrangler deploy, the displayed error would reference locations in built JavaScript files. This made it more difficult to debug validation errors. This change ensures these errors are now source mapped, referencing locations in source files instead.
-
#4440
15717333Thanks @mrbbot! - fix: automatically create required directories forwrangler r2 object getPreviously, if you tried to use
wrangler r2 object getwith an object name containing a/or used the--fileflag with a path containing a/, and the specified directory didn't exist, Wrangler would throw anENOENTerror. This change ensures Wrangler automatically creates required parent directories if they don't exist.
-
#4592
20da658eThanks @mrbbot! - fix: throw helpful error if email validation requiredPreviously, Wrangler would display the raw API error message and code if email validation was required during
wrangler deploy. This change ensures a helpful error message is displayed instead, prompting users to check their emails or visit the dashboard for a verification link.
- #4597
e1d50407Thanks @mrbbot! - fix: suggest checking permissions on authentication error with API token set
-
#4588
4e5ed0b2Thanks @mrbbot! - fix: require worker name for rollbackPreviously, Wrangler would fail with a cryptic error if you tried to run
wrangler rollbackoutside of a directory containing a Wrangler configuration file with anamedefined. This change validates that a worker name is defined, and allows you to set it from the command line using the--nameflag. -
Updated dependencies [
c410ea14]:
3.22.1
Patch Changes
-
#4635
5bc2699dThanks @mrbbot! - fix: prevent zombieworkerdprocessesPreviously, running
wrangler devwould leave behind "zombie"workerdprocesses. These processes prevented the same port being bound ifwrangler devwas restarted and sometimes consumed lots of CPU time. This change ensures allworkerdprocesses are killed whenwrangler devis shutdown.To clean-up existing zombie processes, run
pkill -KILL workerdon macOS/Linux ortaskkill /f /im workerd.exeon Windows.
3.22.0
Minor Changes
- #4632
a6a4e8a4Thanks @G4brym! - Deprecate constellation commands and add a warning when using the constellation binding
- #4621
98dee932Thanks @rozenmd! - feat: add rows written/read in the last 24 hours towrangler d1 infooutput
3.21.0
Minor Changes
-
#4423
a94ef570Thanks @mrbbot! - feat: apply source mapping to logged stringsPreviously, Wrangler would only apply source mapping to uncaught exceptions. This meant if you caught an exception and logged its stack trace, the call sites would reference built JavaScript files as opposed to source files. This change looks for stack traces in logged messages, and tries to source map them.
Note source mapping is only applied when outputting logs.
Error#stackdoes not return a source mapped stack trace. This means the actual runtime value ofnew Error().stackand the output fromconsole.log(new Error().stack)may be different.
Patch Changes
- #4511
66394681Thanks @huw! - Add 'took recursive isolate lock' warning to workerd output exceptions
3.20.0
Minor Changes
-
#4571
3314dbdeThanks @penalosa! - feat: When Wrangler crashes, send an error report to Sentry to aid in debugging.When Wrangler's top-level exception handler catches an error thrown from Wrangler's application, it will offer to report the error to Sentry. This requires opt-in from the user every time.
Patch Changes
- #4577
4c85fe99Thanks @dario-piotrowicz! - During the R2 validation, showMAX_UPLOAD_SIZEerrors using MiB (consistently with the Cloudflare docs)
-
#4577
4c85fe99Thanks @dario-piotrowicz! - During the Pages validation, showMAX_UPLOAD_SIZEerrors using MiB (consistently with the Cloudflare docs) -
Updated dependencies [
eb08e2dc]:
3.19.0
Minor Changes
-
#4547
86c81ff0Thanks @mrbbot! - fix: listen on IPv4 loopback only by default on WindowsDue to a known issue,
workerdwill only listen on the IPv4 loopback address127.0.0.1when it's asked to listen onlocalhost. On Node.js > 17,localhostwill resolve to the IPv6 loopback address, meaning requests toworkerdwould fail. This change switches to using the IPv4 loopback address throughout Wrangler on Windows, while workerd#1408 gets fixed.
-
#4535
29df8e17Thanks @mrbbot! - Reintroduces some internal refactorings of wrangler dev servers (includingwrangler dev,wrangler dev --remote, andunstable_dev()).These changes were released in 3.13.0 and reverted in 3.13.1 -- we believe the changes are now more stable and ready for release again.
There are no changes required for developers to opt-in. Improvements include:
- fewer 'address in use' errors upon reloads
- upon config/source file changes, requests are buffered to guarantee the response is from the new version of the Worker
Patch Changes
- #4521
6c5bc704Thanks @zebp! - fix: init from dash specifying explicit usage model in wrangler.toml for standard users
-
#4550
63708a94Thanks @mrbbot! - fix: validateHostandOrginheaders where appropriateHostandOriginheaders are now checked when connecting to the inspector and Miniflare's magic proxy. If these don't match what's expected, the request will fail.
3.18.0
Minor Changes
-
#4532
311ffbd5Thanks @mrbbot! - fix: changewrangler (pages) devto listen onlocalhostby defaultPreviously, Wrangler listened on all interfaces (
*) by default. This change switcheswrangler (pages) devto just listen on local interfaces. Whilst this is technically a breaking change, we've decided the security benefits outweigh the potential disruption caused. If you need to access your dev server from another device on your network, you can usewrangler (pages) dev --ip *to restore the previous behaviour.
Patch Changes
- Updated dependencies [
1b348782]:
3.17.1
Patch Changes
-
#4474
382ef8f5Thanks @mrbbot! - fix: open browser to correct url pressingbin--remotemodeThis change ensures Wrangler doesn't try to open
http://*when*is used as the dev server's hostname. Instead, Wrangler will now openhttp://127.0.0.1.
-
#4488
3bd57238Thanks @RamIdeas! - Changes the default directory for log files to workaround frameworks that are watching the entire.wranglerdirectory in the project root for changesAlso includes a fix for commands with
--jsonwhere the log file location message would cause stdout to not be valid JSON. That message now goes to stderr.
3.17.0
Minor Changes
-
#4341
d9908743Thanks @RamIdeas! - Wrangler now writes all logs to a .log file in the.wranglerdirectory. Set a directory or specific .log filepath to write logs to withWRANGLER_LOG_PATH=../Desktop/my-logs/orWRANGLER_LOG_PATH=../Desktop/my-logs/my-log-file.log. When specifying a directory or using the default location, a filename with a timestamp is used.Wrangler now filters workerd stdout/stderr and marks unactionable messages as debug logs. These debug logs are still observable in the debug log file but will no longer show in the terminal by default without the user setting the env var
WRANGLER_LOG=debug.
Patch Changes
- #4469
d5e1966bThanks @mrbbot! - fix: report correct line and column numbers when source mapping errors withwrangler dev --remote
- #4456
805d5241Thanks @dario-piotrowicz! - add warnings about ai and verctorize bindings not being supported locally
-
#4478
7b54350bThanks @penalosa! - Don't log sensitive data to the Wrangler debug log file by default. This includes API request headers and responses.
3.16.0
Minor Changes
- #4347
102e15f9Thanks @Skye-31! - Feat(unstable_dev): Provide an option for unstable_dev to perform the check that prompts users to update wrangler, defaulting to false. This will prevent unstable_dev from sending a request to NPM on startup to determine whether it needs to be updated.
-
#4179
dd270d00Thanks @matthewdavidrodgers! - Simplify secret:bulk api via script settingsFiring PUTs to the secret api in parallel has never been a great solution - each request independently needs to lock the script, so running in parallel is at best just as bad as running serially.
Luckily, we have the script settings PATCH api now, which can update the settings for a script (including secret bindings) at once, which means we don't need any parallelization. However this api doesn't work with a partial list of bindings, so we have to fetch the current bindings and merge in with the new secrets before PATCHing. We can however just omit the value of the binding (i.e. only provide the name and type) which instructs the config service to inherit the existing value, which simplifies this as well. Note that we don't use the bindings in your current wrangler.toml, as you could be in a draft state, and it makes sense as a user that a bulk secrets update won't update anything else. Instead, we use script settings api again to fetch the current state of your bindings.
This simplified implementation means the operation can only fail or succeed, rather than succeeding in updating some secrets but failing for others. In order to not introduce breaking changes for logging output, the language around "${x} secrets were updated" or "${x} secrets failed" is kept, even if it doesn't make much sense anymore.
Patch Changes
-
#4402
baa76e77Thanks @rozenmd! - This PR adds a fetch handler that usespage, assumingresult_infoprovided by the endpoint containspage,per_page, andtotalThis is needed as the existing
fetchListResulthandler for fetching potentially paginated results doesn't work for endpoints that don't implementcursor.Fixes #4349
-
#4337
6c8f41f8Thanks @Skye-31! - Improve the error message when a script isn't exported a Durable Object classPreviously, wrangler would error with a message like
Uncaught TypeError: Class extends value undefined is not a constructor or null. This improves that messaging to be more understandable to users.
- #4307
7fbe1937Thanks @jspspike! - Change local dev server default ip to*instead of0.0.0.0. This will cause the dev server to listen on both ipv4 and ipv6 interfaces
- #4222
f867e01cThanks @tmthecoder! - Support for hyperdrive bindings in local wrangler dev
- #4219
0453b447Thanks @maxwellpeterson! - Allows uploads with both cron triggers and smart placement enabled
-
#4437
05b1bbd2Thanks @jspspike! - Change dev registry and inspector server to listen on 127.0.0.1 instead of all interfaces -
Updated dependencies [
4f8b3420,16cc2e92,3637d97a,29a59d4e,7fbe1937,76787861,8a25b7fb]:
3.15.0
Minor Changes
-
#4209
24d1c5cfThanks @mrbbot! - fix: suppress compatibility date fallback warnings if nowranglerupdate is availableIf a compatibility date greater than the installed version of
workerdwas configured, a warning would be logged. This warning was only actionable if a new version ofwranglerwas available. The intent here was to warn if a user set a new compatibility date, but forgot to updatewranglermeaning changes enabled by the new date wouldn't take effect. This change hides the warning if no update is available.It also changes the default compatibility date for
wrangler devsessions without a configured compatibility date to the installed version ofworkerd. This previously defaulted to the current date, which may have been unsupported by the installed runtime.
-
#4135
53218261Thanks @Cherry! - feat: resolve npm exports for file importsPreviously, when using wasm (or other static files) from an npm package, you would have to import the file like so:
import wasm from "../../node_modules/svg2png-wasm/svg2png_wasm_bg.wasm";This update now allows you to import the file like so, assuming it's exposed and available in the package's
exportsfield:import wasm from "svg2png-wasm/svg2png_wasm_bg.wasm";This will look at the package's
exportsfield inpackage.jsonand resolve the file usingresolve.exports.
-
#4232
69b43030Thanks @romeupalos! - fix: usezone_nameto determine a zone when the pattern is a custom hostnameIn Cloudflare for SaaS, custom hostnames of third party domain owners can be used in Cloudflare. Workers are allowed to intercept these requests based on the routes configuration. Before this change, the same logic used by
wrangler devwas used inwrangler deploy, which caused wrangler to fail with:✘ [ERROR] Could not find zone for [partner-saas-domain.com]
- #4198
b404ab70Thanks @penalosa! - When uploading additional modules with your worker, Wrangler will now report the (uncompressed) size of each individual module, as well as the aggregate size of your Worker
Patch Changes
- #4215
950bc401Thanks @RamIdeas! - fix various logging of shell commands to correctly quote args when needed
-
#4274
be0c6283Thanks @jspspike! - chore: bumpminiflareto3.20231025.0This change enables Node-like
console.log()ing in local mode. Objects with lots of properties, and instances of internal classes likeRequest,Headers,ReadableStream, etc will now be logged with much more detail.
-
#4127
3d55f965Thanks @mrbbot! - fix: store temporary files in.wranglerAs Wrangler builds your code, it writes intermediate files to a temporary directory that gets cleaned up on exit. Previously, Wrangler used the OS's default temporary directory. On Windows, this is usually on the
C:drive. If your source code was on a different drive, our bundling tool would generate invalid source maps, breaking breakpoint debugging. This change ensures intermediate files are always written to the same drive as sources. It also ensures unused build outputs are cleaned up when runningwrangler pages dev.This change also means you no longer need to set
cwdandresolveSourceMapLocationsin.vscode/launch.jsonwhen creating anattachconfiguration for breakpoint debugging. Your.vscode/launch.jsonshould now look something like...{ "configurations": [ { "name": "Wrangler", "type": "node", "request": "attach", "port": 9229, // These can be omitted, but doing so causes silent errors in the runtime "attachExistingChildren": false, "autoAttachChildProcesses": false } ] }
- #4189
05798038Thanks @gabivlj! - Move helper cli files of C3 into @cloudflare/cli and make Wrangler and C3 depend on it
-
#4235
46cd2df5Thanks @mrbbot! - fix: ensureconsole.log()s during startup are displayedPreviously,
console.log()calls before the Workers runtime was ready to receive requests wouldn't be shown. This meant any logs in the global scope likely weren't visible. This change ensures startup logs are shown. In particular, this should fix Remix's HMR, which relies on startup logs to know when the Worker is ready.
3.14.0
Minor Changes
-
#4204
38fdbe9bThanks @matthewdavidrodgers! - Support user limits for CPU timeUser limits provided via script metadata on upload
Example configuration:
[limits] cpu_ms = 20000
-
#2162
a1f212e6Thanks @WalshyDev! - add support for service bindings inwrangler pages devby providing the new--service|-sflag which accepts an array ofBINDING_NAME=SCRIPT_NAMEwhereBINDING_NAMEis the name of the binding andSCRIPT_NAMEis the name of the worker (as defined in itswrangler.toml), such workers need to be running locally with withwrangler dev.For example if a user has a worker named
worker-a, in order to locally bind to that they'll need to open two different terminals, in each navigate to the respective worker/pages application and then run respectivelywrangler devandwrangler pages ./publicDir --service MY_SERVICE=worker-athis will add theMY_SERVICEbinding to pages' workerenvobject.Note: additionally after the
SCRIPT_NAMEthe name of an environment can be specified, prefixed by an@(as in:MY_SERVICE=SCRIPT_NAME@PRODUCTION), this behavior is however experimental and not fully properly defined.
3.13.2
Patch Changes
- #4206
8e927170Thanks @1000hz! - chore: bumpminiflareto3.20231016.0
- #4144
54800f6fThanks @a-robinson! - Log a warning when using a Hyperdrive binding in local wrangler dev
3.13.1
Patch Changes
- #4171
88f15f61Thanks @penalosa! - patch: This release fixes some regressions related to runningwrangler devthat were caused by internal refactoring of the dev server architecture (#3960). The change has been reverted, and will be added back in a future release.
3.13.0
Minor Changes
-
#3960
c36b78b4Thanks @RamIdeas! - Refactoring the internals of wrangler dev servers (includingwrangler dev,wrangler dev --remoteandunstable_dev()).There are no changes required for developers to opt-in. Improvements include:
- fewer 'address in use' errors upon reloads
- upon config/source file changes, requests are buffered to guarantee the response is from the new version of the Worker
Patch Changes
- #3590
f4ad634aThanks @penalosa! - fix: When a middleware is configured which doesn't support your Worker's script format, fail early with a helpful error message
3.12.0
Minor Changes
-
#4071
f880a009Thanks @matthewdavidrodgers! - Support TailEvent messages in Tail sessionsWhen tailing a tail worker, messages previously had a null event property. Following https://github.com/cloudflare/workerd/pull/1248, these events have a valid event, specifying which scripts produced events that caused your tail worker to run.
As part of rolling this out, we're filtering out tail events in the internal tail infrastructure, so we control when these new messages are forward to tail sessions, and can merge this freely.
One idiosyncracy to note, however, is that tail workers always report an "OK" status, even if they run out of memory or throw. That is being tracked and worked on separately.
-
#2397
93833f04Thanks @a-robinson! - feature: Support Queue consumer events in tailSo that it's less confusing when tailing a worker that consumes events from a Queue.
Patch Changes
-
#2687
3077016fThanks @jrf0110! - Fixes large Pages projects failing to complete direct upload due to expiring JWTsFor projects which are slow to upload - either because of client bandwidth or large numbers of files and sizes - It's possible for the JWT to expire multiple times. Since our network request concurrency is set to 3, it's possible that each time the JWT expires we get 3 failed attempts. This can quickly exhaust our upload attempt count and cause the entire process to bail.
This change makes it such that jwt refreshes do not count as a failed upload attempt.
- #4069
f4d28918Thanks @a-robinson! - Default new Hyperdrive configs for PostgreSQL databases to port 5432 if the port is not specified
3.11.0
Minor Changes
-
#3726
7d20bdbdThanks @petebacondarwin! - feat: support partial bundling with configurable external modulesSetting
find_additional_modulestotruein your configuration file will now instruct Wrangler to look for files in yourbase_dirthat match your configuredrules, and deploy them as unbundled, external modules with your Worker.base_dirdefaults to the directory containing yourmainentrypoint.Wrangler can operate in two modes: the default bundling mode and
--no-bundlemode. In bundling mode, dynamic imports (e.g.await import("./large-dep.mjs")) would be bundled into your entrypoint, making lazy loading less effective. Additionally, variable dynamic imports (e.g.await import(`./lang/${language}.mjs`)) would always fail at runtime, as Wrangler would have no way of knowing which modules to upload. The--no-bundlemode sought to address these issues by disabling Wrangler's bundling entirely, and just deploying code as is. Unfortunately, this also disabled Wrangler's code transformations (e.g. TypeScript compilation,--assets,--test-scheduled, etc).With this change, we now additionally support partial bundling. Files are bundled into a single Worker entry-point file unless
find_additional_modulesistrue, and the file matches one of the configuredrules. See https://developers.cloudflare.com/workers/wrangler/bundling/ for more details and examples.
- #4093
c71d8a0fThanks @mrbbot! - chore: bumpminiflareto3.20231002.0
Patch Changes
-
#3726
7d20bdbdThanks @petebacondarwin! - fix: ensure that additional modules appear in the out-dirWhen using
find_additional_modules(orno_bundle) we find files that will be uploaded to be deployed alongside the Worker.Previously, if an
outDirwas specified, only the Worker code was output to this directory. Now all additional modules are also output there too.
-
#4067
31270711Thanks @mrbbot! - fix: generate valid source maps withwrangler pages devon macOSOn macOS,
wrangler pages devpreviously generated source maps with an incorrect number of../s in relative paths. This change ensures paths are always correct, improving support for breakpoint debugging.
- #4084
9a7559b6Thanks @RamIdeas! - fix: respect the options.local value in unstable_dev (it was being ignored)
- #4107
807ab931Thanks @mrbbot! - chore: bumpminiflareto3.20231002.1
-
#3726
7d20bdbdThanks @petebacondarwin! - fix: allow__STATIC_CONTENT_MANIFESTmodule to be imported anywhere__STATIC_CONTENT_MANIFESTcan now be imported in subdirectories when--no-bundleorfind_additional_modulesare enabled.
- #3695
1d0b7ad5Thanks @JacksonKearl! - Fixedpages devcrashing and leaving port open when building a worker script fails
-
#4066
c8b4a07fThanks @RamIdeas! - fix: we no longer infer pathnames from route patterns as the hostDuring local development, inside your worker, the host of
request.urlis inferred from theroutesin your config.Previously, route patterns like "*/some/path/name" would infer the host as "some". We now handle this case and determine we cannot infer a host from such patterns.
3.10.1
Patch Changes
- #4041
6b1c327dThanks @elithrar! - Fixed a bug in Vectorize that send preset configurations with the wrong key. This was patched on the server-side to work around this for users in the meantime.
-
#4054
f8c52b93Thanks @mrbbot! - fix: allowwrangler pages devsessions to be reloadedPreviously,
wrangler pages devattempted to send messages on a closed IPC channel when sources changed, resulting in anERR_IPC_CHANNEL_CLOSEDerror. This change ensures the channel stays open until the user exitswrangler pages dev.
3.10.0
Minor Changes
- #4013
3cd72862Thanks @elithrar! - Adds wrangler support for Vectorize, Cloudflare's new vector database, withwrangler vectorize. Visit the developer documentation (https://developers.cloudflare.com/vectorize/) to learn more and create your first vector database withwrangler vectorize create my-first-index.
Patch Changes
- #4034
bde9d64aThanks @ndisidore! - Adds Vectorize support uploading batches of newline delimited json (ndjson) vectors from a source file. Load a dataset withvectorize insert my-index --file vectors.ndjson
-
#4028
d5389731Thanks @JacobMGEvans! - fix: Bulk Secret Draft WorkerFixes the issue of a upload of a Secret when a Worker doesn't exist yet, the draft worker is created and the secret is uploaded to it.
Fixes https://github.com/cloudflare/wrangler-action/issues/162
3.9.1
Patch Changes
-
#3992
35564741Thanks @edevil! - Add AI binding that will be used to interact with the AI project.Example
wrangler.tomlname = "ai-worker" main = "src/index.ts" [ai] binding = "AI"Example script:
import Ai from "@cloudflare/ai" export default { async fetch(request: Request, env: Env): Promise<Response> { const ai = new Ai(env.AI); const story = await ai.run({ model: 'llama-2', input: { prompt: 'Tell me a story about the future of the Cloudflare dev platform' } }); return new Response(JSON.stringify(story)); }, }; export interface Env { AI: any; }
- #4006
bc8c147aThanks @rozenmd! - fix: remove warning around using D1's binding, and clean up the epilogue when running D1 commands
3.9.0
Minor Changes
-
#3951
e0850ad1Thanks @mrbbot! - feat: add support for breakpoint debugging towrangler dev's--remoteand--no-bundlemodesPreviously, breakpoint debugging using Wrangler's DevTools was only supported in local mode, when using Wrangler's built-in bundler. This change extends that to remote development, and
--no-bundle.When using
--remoteand--no-bundletogether, uncaught errors will now be source-mapped when logged too.
-
#3951
e0850ad1Thanks @mrbbot! - feat: add support for Visual Studio Code's built-in breakpoint debuggerWrangler now supports breakpoint debugging with Visual Studio Code's debugger. Create a
.vscode/launch.jsonfile with the following contents...{ "configurations": [ { "name": "Wrangler", "type": "node", "request": "attach", "port": 9229, "cwd": "/", "resolveSourceMapLocations": null, "attachExistingChildren": false, "autoAttachChildProcesses": false } ] }...then run
wrangler dev, and launch the configuration.
Patch Changes
- #3954
bc88f0ecThanks @dario-piotrowicz! - updatewrangler pages devD1 and DO descriptions
-
#3928
95b24b1eThanks @JacobMGEvans! - Colorize Deployed Bundle Size Most bundlers, and other tooling that give you size outputs will colorize their the text to indicate if the value is within certain ranges. The current range values are: red 100% - 90% yellow 89% - 70% green <70%resolves #1312
3.8.0
Minor Changes
-
#3775
3af30879Thanks @bthwaites! - R2 Jurisdictional Restrictions guarantee objects in a bucket are stored within a specific jurisdiction. Wrangler now allows you to interact with buckets in a defined jurisdiction.Wrangler R2 operations now support a
-Jflag that allows the user to specify a jurisdiction. When passing the-Jflag, you will only be able to interact with R2 resources within that jurisdiction.# List all of the buckets in the EU jurisdiction wrangler r2 bucket list -J eu # Downloads the object 'myfile.txt' from the bucket 'mybucket' in EU jurisdiction wrangler r2 object get mybucket/myfile.txt -J euTo access R2 buckets that belong to a jurisdiction from Workers, you will need to specify the jurisdiction as well as the bucket name as part of your bindings in your
wrangler.toml:[[r2_buckets]] bindings = [ { binding = "MY_BUCKET", bucket_name = "<YOUR_BUCKET_NAME>", jurisdiction = "<JURISDICTION>" } ]
Patch Changes
- #3901
a986f19fThanks @DaniFoldi! - Only require preview_id and preview_bucket_name in remote dev mode
3.7.0
Minor Changes
- #3772
a3b3765dThanks @jspspike! - Bump esbuild version to 0.17.19. Breaking changes to esbuild are documented here
- #3895
40f56562Thanks @mrbbot! - chore: bumpminiflareto3.20230904.0
-
#3774
ae2d5cb5Thanks @mrbbot! - feat: support breakpoint debugging in local modewrangler devnow supports breakpoint debugging in local mode! Pressdto open DevTools and set breakpoints.
3.6.0
Minor Changes
Patch Changes
- #3762
18dc7b54Thanks @GregBrimble! - feat: Add internalwrangler pages project validate [directory]command which validates an asset directory
-
#3758
0adccc71Thanks @jahands! - fix: Retry deployment errors in wrangler pages publishThis will improve reliability when deploying to Cloudflare Pages
3.5.1
Patch Changes
- #3752
8f5ed7feThanks @DaniFoldi! - Changed the binding type of WfP Dispatch Namespaces toDispatchNamespace
3.5.0
Minor Changes
- #3703
e600f029Thanks @jspspike! - Added --local option for r2 commands to interact with local persisted r2 objects
- #3704
8e231afdThanks @JacobMGEvans! - secret:bulk exit 1 on failure Previouslysecret"bulkwould only log an error on failure of any of the upload requests. Now when 'secret:bulk' has an upload request fail it throws an Error which sends anprocess.exit(1)at the root.catch()signal. This will enable error handling in programmatic uses ofsecret:bulk.
- #3684
ff8603b6Thanks @jspspike! - Added --local option for kv commands to interact with local persisted kv entries
- #3595
c302bec6Thanks @geelen! - Removing the D1 shim from the build process, in preparation for the Open Beta. D1 can now be used with --no-bundle enabled.
- #3707
6de3c5ecThanks @dario-piotrowicz! - Added handling of .mjs files to be picked up by inside the Pages _worker.js directory (currently only .js files are)
Patch Changes
3.4.0
Minor Changes
-
#3649
e2234bbcThanks @JacobMGEvans! - Feature: 'stdin' support for 'secret:bulk' Added functionality that allows for files and strings to be piped in, or other means of standard input. This will allow for a broader variety of use cases and improved DX. This implementation is also fully backward compatible with the previous input method of file path to JSON.# Example of piping in a file > cat ./my-file.json | wrangler secret:bulk # Example of piping in a string > echo '{"key":"value"}' | wrangler secret:bulk # Example of redirecting input from a file > wrangler secret:bulk < ./my-file.json
- #3675
f753f3afThanks @1000hz! - chore: upgrademiniflareto3.20230724.0
Patch Changes
-
#3610
bfbe49d0Thanks @Skye-31! - Wrangler Capnp CompilationThis PR replaces logfwdr's
schemaproperty with a newunsafe.capnpobject. This object accepts either acompiled_schemaproperty, or abase_pathand array ofsource_schemasto get Wrangler to compile the capnp schema for you.
-
#3579
d4450b0aThanks @rozenmd! - fix: remove --experimental-backend fromwrangler d1 migrations applyThis PR removes the need to pass a
--experimental-backendflag when running migrations against an experimental D1 db.Closes #3596
- #3623
99baf58bThanks @RamIdeas! - when runningwrangler init -y ..., the-yflag is now passed to npx when delegating to C3
-
#3668
99032c1eThanks @rozenmd! - chore: make D1's experimental backend the defaultThis PR makes D1's experimental backend turned on by default.
-
#3579
d4450b0aThanks @rozenmd! - feat: implement time travel for experimental d1 dbsThis PR adds two commands under
wrangler d1 time-travel:Use Time Travel to restore, fork or copy a database at a specific point-in-time. Commands: wrangler d1 time-travel info <database> Retrieve information about a database at a specific point-in-time using Time Travel. Options: --timestamp accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for [string] --json return output as clean JSON [boolean] [default: false] wrangler d1 time-travel restore <database> Restore a database back to a specific point-in-time. Options: --bookmark Bookmark to use for time travel [string] --timestamp accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for [string] --json return output as clean JSON [boolean] [default: false]Closes #3577
-
#3384
ccc19d57Thanks @Peter-Sparksuite! - feature: add wrangler deploy option: --old-asset-ttl [seconds]wrangler deployimmediately deletes assets that are no longer current, which has a side-effect for existing progressive web app users of seeing 404 errors as the app tries to access assets that no longer exist.This new feature:
- does not change the default behavior of immediately deleting no-longer needed assets.
- allows users to opt-in to expiring newly obsoleted assets after the provided number of seconds hence, so that current users will have a time buffer before seeing 404 errors.
- is similar in concept to what was introduced in Wrangler 1.x with https://github.com/cloudflare/wrangler-legacy/pull/2221.
- is careful to avoid extension of existing expiration targets on already expiring old assets, which may have contributed to unexpectedly large KV storage accumulations (perhaps why, in Wrangler 1.x, the reversion https://github.com/cloudflare/wrangler-legacy/pull/2228 happened).
- no breaking changes for users relying on the default behavior, but some output changes exist when the new option is used, to indicate the change in behavior.
- #3678
17780b27Thanks @1000hz! - Refined the type ofCfVarsfromRecord<string, unknown>toRecord<string, string | Json>
3.3.0
Minor Changes
- #3628
e72a5794Thanks @mrbbot! - chore: upgrademiniflareto3.20230717.0
Patch Changes
-
#3587
30f114afThanks @mrbbot! - fix: keep configuration watcher aliveEnsure
wrangler devwatches thewrangler.tomlfile and reloads the server whenever configuration (e.g. KV namespaces, compatibility dates, etc) changes.
- #3588
64631d8bThanks @penalosa! - fix: Preserve email handlers when applying middleware to user workers.
3.2.0
Minor Changes
-
#3426
5a74cb55Thanks @matthewdavidrodgers! - Prefer non-force deletes unless a Worker is a dependency of another.If a Worker is used as a service binding, a durable object namespace, an outbounds for a dynamic dispatch namespace, or a tail consumer, then deleting that Worker will break those existing ones that depend upon it. Deleting with ?force=true allows you to delete anyway, which is currently the default in Wrangler.
Force deletes are not often necessary, however, and using it as the default has unfortunate consequences in the API. To avoid them, we check if any of those conditions exist, and present the information to the user. If they explicitly acknowledge they're ok with breaking their other Workers, fine, we let them do it. Otherwise, we'll always use the much safer non-force deletes. We also add a "--force" flag to the delete command to skip the checks and confirmation and proceed with ?force=true
Patch Changes
-
#3585
e33bb44aThanks @mrbbot! - fix: register middleware once for module workersEnsure middleware is only registered on the first request when using module workers. This should prevent stack overflows and slowdowns when making large number of requests to
wrangler devwith infrequent reloads.
- #3547
e16d0272Thanks @jspspike! - Fixed issue with wrangler dev not finding imported files. Previously when wrangler dev would automatically reload on any file changes, it would fail to find any imported files.
3.1.2
Patch Changes
- #3541
09f317d4Thanks @GregBrimble! - chore: Bump miniflare@3.0.2
- #3497
c5f3bf45Thanks @evanderkoogh! - Refactor dev-only checkedFetch check from a method substitution to a JavaScript Proxy to be able to support Proxied global fetch function.
- #3403
8d1521e9Thanks @Cherry! - fix: wrangler generate will now work cross-device. This is very common on Windows install that use C:/ for the OS and another drive for user files.
3.1.1
Patch Changes
- #3498
fddffdf0Thanks @GregBrimble! - fix: Preventwrangler pages devfrom serving asset files outside of the build output directory
-
#3414
6b1870adThanks @rozenmd! - fix: in D1, lift error.cause into the error messagePrior to this PR, folks had to console.log the
error.causeproperty to understand why their D1 operations were failing. With this PR,error.causewill continue to work, but we'll also lift the cause into the error message.
- #3483
a9349a89Thanks @petebacondarwin! - fix: ensure that the script name is passed through to C3 fromwrangler init
- #3359
5eef992fThanks @RamIdeas! -wrangler init ... -ynow delegates to C3 without prompts (respects the-yflag)
- #3434
4beac418Thanks @rozenmd! - fix: add the number of read queries and write queries in the last 24 hours to thed1 infocommand
-
#3454
a2194043Thanks @mrbbot! - chore: upgrademiniflareto3.0.1This version ensures root CA certificates are trusted on Windows. It also loads extra certificates from the
NODE_EXTRA_CA_CERTSenvironment variable, allowingwrangler devto be used with Cloudflare WARP enabled.
- #3485
e8df68eeThanks @GregBrimble! - feat: Allow setting a D1 database ID when usingwrangler pages devby providing an optional=<ID>suffix to the argument like--d1 BINDING_NAME=database-id
3.1.0
Minor Changes
- #3293
4a88db32Thanks @petebacondarwin! - feat: addwrangler pages project deletecommand
Patch Changes
-
#3399
d8a9995bThanks @Skye-31! - Fix: wrangler pages dev --script-path argument when using a proxy command instead of directory modeFixes a regression in wrangler@3.x, where
wrangler pages dev --script-path=<my script path> -- <proxy command>would start throwing esbuild errors.
- #3311
116d3fd9Thanks @Maximo-Guk! - Fix: Avoid unnecessary rebuilding pages functions in wrangler pages dev
- #3314
d5a230f1Thanks @elithrar! - Fixedwrangler d1 migrationsto use--experimental-backendand not--experimentalBackendso that it is consistent withwrangler d1 create.
- #3373
55703e52Thanks @rozenmd! - fix: wrangler rollback shouldn't print its warning in the global menu
-
#3124
2956c31dThanks @verokarhu! - fix: failed d1 migrations not treated as errorsThis PR teaches wrangler to return a non-success exit code when a set of migrations fails.
It also cleans up
wrangler d1 migrations applyoutput significantly, to only log information relevant to migrations.
- #3390
b5b46b4aThanks @shahsimpson! - Prevents uploads with both cron triggers and smart placement enabled
- #3358
27b5aec5Thanks @rozenmd! - This PR implements a trimmer that removes BEGIN TRANSACTION/COMMIT from SQL files sent to the API (since the D1 API already wraps SQL in a transaction for users).
-
#3324
ed9fbf79Thanks @rozenmd! - addd1 infocommand for people to check DB sizeThis PR adds a
d1 info <NAME>command for getting information about a D1 database, including the current database size and state.Usage:
> npx wrangler d1 info northwind ┌───────────────────┬──────────────────────────────────────┐ │ │ d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06 │ ├───────────────────┼──────────────────────────────────────┤ │ name │ northwind │ ├───────────────────┼──────────────────────────────────────┤ │ version │ beta │ ├───────────────────┼──────────────────────────────────────┤ │ num_tables │ 13 │ ├───────────────────┼──────────────────────────────────────┤ │ file_size │ 33.1 MB │ ├───────────────────┼──────────────────────────────────────┤ │ running_in_region │ WEUR │ └───────────────────┴──────────────────────────────────────┘> npx wrangler d1 info northwind --json { "uuid": "d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06", "name": "northwind", "version": "beta", "num_tables": 13, "file_size": 33067008, "running_in_region": "WEUR" }
- #3317
3dae2585Thanks @jculvey! - Add the--compatibility-flagsand--compatibility-dateoptions to thepages project createcommand
3.0.1
Patch Changes
3.0.0
Major Changes
-
#3197
3b3fadfaThanks @mrbbot! - feature: renamewrangler publishtowrangler deployThis ensures consistency with other messaging, documentation and our dashboard, which all refer to deployments. This also avoids confusion with the similar but very different
npm publishcommand.wrangler publishwill remain a deprecated alias for now, but will be removed in the next major version of Wrangler.
-
#3197
bac9b5deThanks @mrbbot! - feature: enable local development with Miniflare 3 andworkerdby defaultwrangler devnow runs fully-locally by default, using the open-source Cloudflare Workers runtimeworkerd. To restore the previous behaviour of running on a remote machine with access to production data, use the new--remoteflag. The--localand--experimental-localflags have been deprecated, as this behaviour is now the default, and will be removed in the next major version.
-
#3197
02a672edThanks @mrbbot! - feature: enable persistent storage in local mode by defaultWrangler will now persist local KV, R2, D1, Cache and Durable Object data in the
.wranglerfolder, by default, between reloads. This persistence directory can be customised with the--persist-toflag. The--persistflag has been removed, as this is now the default behaviour.
-
#3197
dc755fdcThanks @mrbbot! - feature: remove delegation to locally installed versionsPreviously, if Wrangler was installed globally and locally within a project, running the global Wrangler would instead invoke the local version. This behaviour was contrary to most other JavaScript CLI tools and has now been removed. We recommend you use
npx wranglerinstead, which will invoke the local version if installed, or install globally if not.
-
#3197
24e1607aThanks @mrbbot! - chore: remove unused files from published packageSpecifically, the
srcandminiflare-config-stubsdirectories have been removed.
Minor Changes
- #3200
f1b8a1ccThanks @matthewdavidrodgers! - Support outbounds for dispatch_namespace bindings
- #3197
e1e5d782Thanks @mrbbot! - feature: add warning when trying to usewrangler devinside a WebContainer
- #3230
41fc45c2Thanks @matthewdavidrodgers! - Support tail_consumers in script upload
-
#3157
4d7781f7Thanks @edevil! - [wrangler] feat: Support for Constellation bindingsAdded support for a new type of safe bindings called "Constellation" that allows interacting with uploaded models in the context of these projects.
[[constellation]] binding = 'AI' project_id = '9d478427-dea6-4988-9b16-f6f8888d974c'
-
#3135
cc2adc2eThanks @edevil! - [wrangler] feat: Support for Browser WorkersThese bindings allow one to use puppeteer to control a browser in a worker script.
Patch Changes
- #3175
561b962fThanks @GregBrimble! - fix:_worker.js/directory support for dynamically imported chunks inwrangler pages dev
-
#3186
3050ce7fThanks @petebacondarwin! - fix: ensure pages _routes.json emulation in dev command handles .s and *sFixes #3184
-
#3048
6ccc4fa6Thanks @oustn! - Fix: fix local registry server closedCloses #1920. Sometimes start the local dev server will kill the devRegistry server so that the devRegistry server can't be used. We can listen the devRegistry server close event and reset server to
null. When registerWorker is called, we can check if the server isnulland start a new server.
-
#3001
f9722873Thanks @rozenmd! - fix: make it possible to create a D1 database backed by the experimental backend, and maked1 execute's batch size configurableWith this PR, users will be able to run
wrangler d1 create <NAME> --experimental-backendto create new D1 dbs that use an experimental backend. You can also runwrangler d1 migrations apply <NAME> experimental-backendto run migrations against an experimental database.On top of that, both
wrangler d1 migrations apply <NAME>andwrangler d1 execute <NAME>now have a configurablebatch-sizeflag, as the experimental backend can handle more than 10000 statements at a time.
-
#3153
1b67a405Thanks @edevil! - [wrangler] fix: constellation command helpChanged
nametoprojectNamein some Constellation commands that interacted with projects. Also added the possibility to specify a model description when uploading it.
- #3168
88ff9d7dThanks @rozenmd! - feat: (alpha) - make it possible to give D1 a hint on where it should create the database
- #3175
561b962fThanks @GregBrimble! - fix:_worker.js/directory support for D1 bindings
2.20.0
Minor Changes
- #2966
e351afcfThanks @GregBrimble! - feat: Add support for the undocumented_worker.js/directory in Pages
-
#3095
133c0423Thanks @zebp! - feat: add support for placement in wrangler configAllows a
placementobject in the wrangler config with a mode ofofforsmartto configure Smart placement. Enabling Smart Placement can be done in yourwrangler.tomllike:[placement] mode = "smart"
-
#3140
5fd080c8Thanks @penalosa! - feat: Support sourcemaps in DevToolsIntercept requests from DevTools in Wrangler to inject sourcemaps and enable folders in the Sources Panel of DevTools. When errors are thrown in your Worker, DevTools should now show your source file in the Sources panel, rather than Wrangler's bundled output.
Patch Changes
-
#2912
5079f476Thanks @petebacondarwin! - fix: do not render "value of stdout.lastframe() is undefined" if the output is an empty stringFixes #2907
- #3133
d0788008Thanks @dario-piotrowicz! - fix pages building not taking into account the nodejs_compat flag (and improve the related error message)
2.19.0
Minor Changes
2.18.0
Minor Changes
- #3098
8818f551Thanks @mrbbot! - fix: improve Workers Sites asset upload reliability- Wrangler no longer buffers all assets into memory before uploading. This should prevent out-of-memory errors when publishing sites with many large files.
- Wrangler now limits the number of in-flight asset upload requests to 5, fixing the
Too many bulk operations already in progresserror. - Wrangler now correctly logs upload progress. Previously, the reported percentage was per upload request group, not across all assets.
- Wrangler no longer logs all assets to the console by default. Instead, it will just log the first 100. The rest can be shown by setting the
WRANGLER_LOG=debugenvironment variable. A splash of colour has also been added.
2.17.0
Minor Changes
-
#3004
6d5000a7Thanks @rozenmd! - feat: teachwrangler docsto use algolia search indexThis PR lets you search Cloudflare's entire docs via
wrangler docs [search term here].By default, if the search fails to find what you're looking for, you'll get an error like this:
✘ [ERROR] Could not find docs for: <search term goes here>. Please try again with another search term.If you provide the
--yesor-yflag, wrangler will open the docs to https://developers.cloudflare.com/workers/wrangler/commands/, even if the search fails.
2.16.0
Minor Changes
-
#3058
1bd50f56Thanks @mrbbot! - chore: upgrademiniflare@3to3.0.0-next.13Notably, this adds native support for Windows to
wrangler dev --experimental-local, logging for incoming requests, and support for a bunch of newer R2 features.
Patch Changes
-
#3058
1bd50f56Thanks @mrbbot! - fix: disable persistence without--persistin--experimental-localThis ensures
--experimental-localdoesn't persist data on the file-system, unless the--persistflag is set. Data is still always persisted between reloads.
-
#3055
5f48c405Thanks @rozenmd! - fix: Teach D1 commands to read auth configuration from wrangler.tomlThis PR fixes a bug in how D1 handles a user's accounts. We've updated the D1 commands to read from config (typically via wrangler.toml) before trying to run commands. This means if an
account_idis defined in config, we'll use that instead of erroring out when there are multiple accounts to pick from.Fixes #3046
-
#3058
1bd50f56Thanks @mrbbot! - fix: disable route validation when using--experimental-localThis ensures
wrangler dev --experimental-localdoesn't require a login or an internet connection if arouteis configured.
2.15.1
Patch Changes
- #2783
4c55baf9Thanks @GregBrimble! - feat: Add**/*.wasm?moduleas default module rule (alias of**/*.wasm)
- #2989
86e942bbThanks @GregBrimble! - fix: Durable Object proxying websockets over local dev registry
2.15.0
Minor Changes
-
#2769
0a779904Thanks @penalosa! - feature: Support modules with--no-bundleWhen the
--no-bundleflag is set, Wrangler now has support for uploading additional modules alongside the entrypoint. This will allow modules to be imported at runtime on Cloudflare's Edge. This respects Wrangler's module rules configuration, which means that only imports of non-JS modules will trigger an upload by default. For instance, the following code will now work with--no-bundle(assuming theexample.wasmfile exists at the correct path):// index.js import wasm from './example.wasm' export default { async fetch() { await WebAssembly.instantiate(wasm, ...) ... } }For JS modules, it's necessary to specify an additional module rule (or rules) in your
wrangler.tomlto configure your modules as ES modules or Common JS modules. For instance, to upload additional JavaScript files as ES modules, add the following module rule to yourwrangler.toml, which tells Wrangler that all**/*.jsfiles are ES modules.rules = [ { type = "ESModule", globs = ["**/*.js"]}, ]If you have Common JS modules, you'd configure Wrangler with a CommonJS rule (the following rule tells Wrangler that all
.cjsfiles are Common JS modules):rules = [ { type = "CommonJS", globs = ["**/*.cjs"]}, ]In most projects, adding a single rule will be sufficient. However, for advanced usecases where you're mixing ES modules and Common JS modules, you'll need to use multiple rule definitions. For instance, the following set of rules will match all
.mjsfiles as ES modules, all.cjsfiles as Common JS modules, and thenested/say-hello.jsfile as Common JS.rules = [ { type = "CommonJS", globs = ["nested/say-hello.js", "**/*.cjs"]}, { type = "ESModule", globs = ["**/*.mjs"]} ]If multiple rules overlap, Wrangler will log a warning about the duplicate rules, and will discard additional rules that matches a module. For example, the following rule configuration classifies
dep.jsas both a Common JS module and an ES module:rules = [ { type = "CommonJS", globs = ["dep.js"]}, { type = "ESModule", globs = ["dep.js"]} ]Wrangler will treat
dep.jsas a Common JS module, since that was the first rule that matched, and will log the following warning:▲ [WARNING] Ignoring duplicate module: dep.js (esm)This also adds a new configuration option to
wrangler.toml:base_dir. Defaulting to the directory of your Worker's main entrypoint, this tells Wrangler where your additional modules are located, and determines the module paths against which your module rule globs are matched.For instance, given the following directory structure:
- wrangler.toml - src/ - index.html - vendor/ - dependency.js - js/ - index.jsIf your
wrangler.tomlhadmain = "src/js/index.js", you would need to setbase_dir = "src"in order to be able to importsrc/vendor/dependency.jsandsrc/index.htmlfromsrc/js/index.js.
Patch Changes
-
#2957
084b2c58Thanks @esimons! - fix: Respect querystring params when calling.fetchon a worker instantiated withunstable_devPreviously, querystring params would be stripped, causing issues for test cases that depended on them. For example, given the following worker script:
export default { fetch(req) { const url = new URL(req.url); const name = url.searchParams.get("name"); return new Response("Hello, " + name); }, };would fail the following test case:
const worker = await unstable_dev("script.js"); const res = await worker.fetch("http://worker?name=Walshy"); const text = await res.text(); expect(text).toBe("Hello, Walshy");
-
#2840
e311bbbfThanks @mrbbot! - fix: makeWRANGLER_LOGcase-insensitive, warn on unexpected values, and fallback tologif invalidPreviously, levels set via the
WRANGLER_LOGenvironment-variable were case-sensitive. If an unexpected level was set, Wrangler would fallback tonone, hiding all logs. The fallback has now been switched tolog, and lenient case-insensitive matching is used when setting the level.
- #2044
eebad0d9Thanks @kuba-orlik! - fix: allow programmatic dev workers to be stopped and started in a single session
- #2735
3f7a75ccThanks @JacobMGEvans! - Fix: Generate Remote URL Previous URL was pointing to the old cloudflare/templates repo, updated the URL to point to templates in the workers-sdk monorepo.
2.14.0
Minor Changes
-
#2914
9af1a640Thanks @edevil! - feat: add support for send email bindingsSupport send email bindings in order to send emails from a worker. There are three types of bindings:
- Unrestricted: can send email to any verified destination address.
- Restricted: can only send email to the supplied destination address (which does not need to be specified when sending the email but also needs to be a verified destination address).
- Allowlist: can only send email to the supplied list of verified destination addresses.
Patch Changes
-
#2931
5f6c4c0cThanks @Skye-31! - Fix: Pages Dev incorrectly allowing people to turn off local modeLocal mode is not currently supported in Pages Dev, and errors when people attempt to use it. Previously, wrangler hid the "toggle local mode" button when using Pages dev, but this got broken somewhere along the line.
2.13.0
Minor Changes
-
#2905
6fd06241Thanks @edevil! - feat: support external imports fromcloudflare:...prefixed modulesGoing forward Workers will be providing built-in modules (similar to
node:...) that can be imported using thecloudflare:...prefix. This change adds support to the Wrangler bundler to mark these imports as external.
- #2607
163dccf4Thanks @jspspike@gmail.com! - feature: addwrangler deployment viewandwrangler rollbacksubcommands
wrangler deployments view [deployment-id] will get the details of a deployment, including bindings and usage model information.
This information can be used to help debug bad deployments.
wrangler rollback [deployment-id] will rollback to a specific deployment in the runtime. This will be useful in situations like recovering from a bad
deployment quickly while resolving issues. If a deployment id is not specified wrangler will rollback to the previous deployment. This rollback only changes the code in the runtime and doesn't affect any code or configurations
in a developer's local setup.
wrangler deployments list will list the 10 most recent deployments. This command originally existed as wrangler deployments
example of view <deployment-id> output:
Deployment ID: 07d7143d-0284-427e-ba22-2d5e6e91b479
Created on: 2023-03-02T21:05:15.622446Z
Author: jspspike@gmail.com
Source: Upload from Wrangler 🤠
------------------------------------------------------------
Author ID: e5a3ca86e08fb0940d3a05691310bb42
Usage Model: bundled
Handlers: fetch
Compatibility Date: 2022-10-03
--------------------------bindings--------------------------
[[r2_buckets]]
binding = "MY_BUCKET"
bucket_name = "testr2"
[[kv_namespaces]]
id = "79300c6d17eb4180a07270f450efe53f"
binding = "yeee"
-
#2859
ace46939Thanks @jbwcloudflare! - feature: add support for Queue Consumer concurrencyConsumer concurrency allows a consumer Worker processing messages from a queue to automatically scale out horizontally in order to keep up with the rate that messages are being written to a queue. The new
max_concurrencysetting can be used to limit the maximum number of concurrent consumer Worker invocations.
Patch Changes
-
#2838
9fa6b167Thanks @mrbbot! - fix: display cause when local D1 migrations fail to applyPreviously, if
wrangler d1 migrations apply --localfailed, you'd see something like:❌ Migration 0000_migration.sql failed with following Errors ┌──────────┐ │ Error │ ├──────────┤ │ D1_ERROR │ └──────────┘We'll now show the SQLite error that caused the failure:
❌ Migration 0000_migration.sql failed with following Errors ┌───────────────────────────────────────────────┐ │ Error │ ├───────────────────────────────────────────────┤ │ Error: SqliteError: unknown database "public" │ └───────────────────────────────────────────────┘
2.12.3
Patch Changes
- #2884
e33bea9bThanks @WalshyDev! - Changed console.debug for logger.debug in Pages uploading. This will ensure the debug logs are only sent when debug logging is enabled withWRANGLER_LOG=debug.
-
#2878
6ebb23d5Thanks @rozenmd! - feat: Add D1 binding support to Email WorkersThis PR makes it possible to query D1 from an Email Worker, assuming a binding has been setup.
As D1 is in alpha and not considered "production-ready", this changeset is a patch, rather than a minor bump to wrangler.
2.12.2
Patch Changes
- #2873
5bcc333dThanks @GregBrimble! - fix: Prevent compile loop when using_worker.jsandwrangler pages dev
2.12.1
Patch Changes
-
#2839
ad4b123bThanks @mrbbot! - fix: removevitestfromwrangler init's generatedtsconfig.jsontypesarrayPreviously,
wrangler initgenerated atsconfig.jsonwith"types": ["@cloudflare/workers-types", "vitest"], even if Vitest tests weren't generated. Unlike Jest, Vitest doesn't provide global APIs by default, so there's no need for ambient types.
- #2806
8d462c0cThanks @GregBrimble! - chore: Remove the--experimental-worker-bundleoption from Pages Functions
- #2845
e3c036d7Thanks @Cyb3r-Jak3! - feature: include .wrangler directory in gitignore template used withwrangler init
-
#2806
8d462c0cThanks @GregBrimble! - feat: Add--outdiras an option when runningwrangler pages functions build.This deprecates
--outfilewhen building a Pages Plugin with--plugin.When building functions normally,
--outdirmay be used to produce a human-inspectable format of the_worker.bundlethat is produced.
-
#2806
8d462c0cThanks @GregBrimble! - Enable bundling in Pages Functions by default.We now enable bundling by default for a
functions/folder and for an_worker.jsin Pages Functions. This allows you to use external modules such as Wasm. You can disable this behavior in Direct Upload projects by using the--no-bundleargument inwrangler pages publishandwrangler pages dev.
-
#2836
42fb97e5Thanks @GregBrimble! - fix: preserve the entrypoint filename when runningwrangler publish --outdir <dir>.Previously, this entrypoint filename would sometimes be overwritten with some internal filenames. It should now be based off of the entrypoint you provide for your Worker.
-
#2828
891ddf19Thanks @GregBrimble! - fix: Bringpages devlogging in line withdevproper'swrangler pages devnow defaults to logging at theloglevel (rather than the previouswarnlevel), and thepagesprefix is removed.
-
#2855
226e63faThanks @GregBrimble! - fix:--experimental-localwithwrangler pages devWe previously had a bug which logged an error (
local worker: TypeError: generateASSETSBinding2 is not a function). This has now been fixed.
- #2831
2b641765Thanks @Skye-31! - Fix: Show correct link for how to create an API token in a non-interactive environment
2.12.0
Minor Changes
-
#2810
62784131Thanks @mrbbot! - chore: upgrade@miniflare/treto3.0.0-next.12, incorporating changes from3.0.0-next.11Notably, this brings the following improvements to
wrangler dev --experimental-local:- Adds support for Durable Objects and D1
- Fixes an issue blocking clean exits and script reloads
- Bumps to
better-sqlite3@8, allowing installation on Node 19
- #2665
4756d6a1Thanks @alankemp! - Add new [unsafe.metadata] section to wrangler.toml allowing arbitary data to be added to the metadata section of the upload
Patch Changes
-
#2539
3725086cThanks @GregBrimble! - feat: Add support for thenodejs_compatCompatibility Flag when bundling a Worker with WranglerThis new Compatibility Flag is incompatible with the legacy
--node-compatCLI argument andnode_compatconfiguration option. If you want to use the new runtime Node.js compatibility features, please remove the--node-compatargument from your CLI command or your config file.
2.11.1
Patch Changes
- #2795
ec3e181eThanks @penalosa! - fix: Adds aduplex: "half"property to R2 fetch requests with stream bodies in order to be compatible with undici v5.20
- #2789
4ca8c0b0Thanks @GregBrimble! - fix: Support overriding the next URL in subsequent executions withnext("/new-path")from within a Pages Plugin
2.11.0
Minor Changes
- #2651
a9adfbe7Thanks @penalosa! - Previously, wrangler dev would not work if the root of your zone wasn't behind Cloudflare. This behaviour has changed so that now only the route which your Worker is exposed on has to be behind Cloudflare.
-
#2708
b3346cfbThanks @Skye-31! - Feat: Pages now supports Proxying (200 status) redirects in it's _redirects fileThis will look something like the following, where a request to /users/123 will appear as that in the browser, but will internally go to /users/[id].html.
/users/:id /users/[id] 200
Patch Changes
-
#2766
7912e63aThanks @mrbbot! - fix: correctly detectservice-workerformat when usingtypeof moduleWrangler automatically detects whether your code is a
modulesorservice-workerformat Worker based on the presence of adefaultexport. This check currently works by building your entrypoint withesbuildand looking at the output metafile.Previously, we were passing
format: "esm"toesbuildwhen performing this check, which enables format conversion. This may introduceexport defaultinto the built code, even if it wasn't there to start with, resulting in incorrect format detections.This change removes
format: "esm"which disables format conversion when bundling is disabled. See https://esbuild.github.io/api/#format for more details.
-
#2780
80f1187aThanks @GregBrimble! - fix: Ensure we don't mangle internal constructor names in the wrangler bundle when building with esbuildUndici changed how they referenced
FormData, which meant that when used in our bundle process, we were failing to uploadmultipart/form-databodies. This affectedwrangler pages publishandwrangler publish.
-
#2720
de0cb57aThanks @JacobMGEvans! - Fix: Upgraded to ES2022 for improved compatibility Upgraded worker code target version from ES2020 to ES2022 for better compatibility and unblocking of a workaround related to issue #2029. The worker runtime now uses the same V8 version as recent Chrome and is 99% ES2016+ compliant. The only thing we don't support on the Workers runtime, the remaining 1%, is the ES2022 RegEx feature as seen in the compat table for the latest Chrome version.Compatibility table: https://kangax.github.io/compat-table/es2016plus/
- #2771
4ede044eThanks @mrbbot! - chore: upgrademiniflareto2.12.1and@miniflare/treto3.0.0-next.10
2.10.0
Minor Changes
-
#2567
02ea098eThanks @matthewdavidrodgers! - Add mtls-certificate commands and binding supportFunctionality implemented first as an api, which is used in the cli standard api commands
Note that this adds a new OAuth scope, so OAuth users will need to log out and log back in to use the new 'mtls-certificate' commands However, publishing with mtls-certifcate bindings (bindings of type 'mtls_certificate') will work without the scope.
- #2717
c5943c9fThanks @mrbbot! - Upgrademiniflareto2.12.0, including support for R2 multipart upload bindings, thenodejs_compatcompatibility flag, D1 fixes and more!
-
#2579
bf558bdcThanks @JacobMGEvans! - Added additional fields to the output ofwrangler deploymentscommand. The additional fields are from the new value in the responseannotationswhich includesworkers/triggered_byandrollback_fromExample:
Deployment ID: Galaxy-Class Created on: 2021-01-04T00:00:00.000000Z Trigger: Upload from Wrangler 🤠 Rollback from: MOCK-DEPLOYMENT-ID-2222
Patch Changes
-
#2624
882bf592Thanks @CarmenPopoviciu! - Add wasm support inwrangler pages publishCurrently it is not possible to import
wasmmodules in either Pages Functions or Pages Advanced Mode projects.This commit caries out work to address the aforementioned issue by enabling
wasmmodule imports inwrangler pages publish. As a result, Pages users can now import theirwasmmodules withing their Functions or_worker.jsfiles, andwrangler pages publishwill correctly bundle everything and serve these "external" modules.
- #2683
68a2a19eThanks @mrbbot! - Fix internal middleware system to allow D1 databases and--test-scheduledto be used together
- #2609
58ac8a78Thanks @dario-piotrowicz! - fix: make sure that the pages publish --no-bundle flag is correctly recognized
- #2696
4bc78470Thanks @rozenmd! - fix: don't throw an error when omitting preview_database_id, warn instead
- #2685
2b1177adThanks @CarmenPopoviciu! - You can now import Wasm modules in Pages Functions and Pages Functions Advanced Mode (_worker.js). This change specifically enableswasmmodule imports inwrangler pages functions build. As a result, Pages users can now import theirwasmmodules within their Functions or_worker.jsfiles, andwrangler pages functions buildwill correctly bundle everything and output the expected result file.
2.9.1
Patch Changes
- #2657
8d21b2eaThanks @rozenmd! - fix: remove the need to login when runningd1 migrations list --local
- #2592
dd66618bThanks @rozenmd! - fix: bump esbuild to 0.16.3 (fixes a bug in esbuild's 0.15.13 release that would cause it to hang, is the latest release before a major breaking change that requires us to refactor)
2.9.0
Minor Changes
-
#2629
151733e5Thanks @mrbbot! - Prefer theworkerdexportscondition when bundling.This can be used to build isomorphic libraries that have different implementations depending on the JavaScript runtime they're running in. When bundling, Wrangler will try to load the
workerdkey. This is the standard key for the Cloudflare Workers runtime. Learn more about the conditionalexportsfield here.
Patch Changes
- #2409
89d78c0aThanks @penalosa! - Wrangler now supports an--experimental-json-configflag which will read your configuration from awrangler.jsonfile, rather thanwrangler.toml. The format of this file is exactly the same as thewrangler.tomlconfiguration file, except that the syntax isJSONC(JSON with comments) rather thanTOML. This is experimental, and is not recommended for production use.
- #2623
04d8a312Thanks @dario-piotrowicz! - fix d1 directory not being created when running thewrangler d1 executecommand with the--yes/-yflag
- #2608
70daffebThanks @dario-piotrowicz! - fix: Add support for D1 databases when bundling an_worker.jsonwrangler pages publish
-
#2597
416babf0Thanks @petebacondarwin! - fix: do not crash in wrangler dev when passing a request object to fetchThis reverts and fixes the changes in https://github.com/cloudflare/workers-sdk/pull/1769 which does not support creating requests from requests whose bodies have already been consumed.
Fixes #2562
-
#2622
9778b33eThanks @rozenmd! - fix: implementd1 list --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test % npx wrangler d1 list -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 🚧 To give feedback, visit https://discord.gg/cloudflaredev -------------------- ┌──────────────────────────────┬─────────────────┐ │ uuid │ name │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test2 │ ├──────────────────────────────┼─────────────────┤ │ xxxxxx-xxxx-xxxx-xxxx-xxxxxx │ test3 │ └──────────────────────────────┴─────────────────┘After:
rozenmd@cflaptop test % npx wrangler d1 list --json [ { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test2" }, { "uuid": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx", "name": "test3" }, ]
- #2631
6b3fe5efThanks @thibmeu! - Fixwrangler publish --dry-runto not require authentication when using Queues
-
#2627
6f0f2ba6Thanks @rozenmd! - fix: implementd1 execute --jsonwith clean output for piping into other commandsBefore:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" ▲ [WARNING] Processing wrangler.toml configuration: - D1 Bindings are currently in alpha to allow the API to evolve before general availability. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message For example: `export NO_D1_WARNING=true && wrangler <YOUR COMMAND HERE>` -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic 🚧 Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 🚧 To give feedback, visit https://discord.gg/cloudflaredev -------------------- 🌀 Mapping SQL input into an array of statements 🌀 Parsing 1 statements 🌀 Executing on test (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx): 🚣 Executed 1 command in 11.846710999961942ms ┌────────────┬─────────────────────┬───────────────────┐ │ CustomerID │ CompanyName │ ContactName │ ├────────────┼─────────────────────┼───────────────────┤ │ 1 │ Alfreds Futterkiste │ Maria Anders │ ├────────────┼─────────────────────┼───────────────────┤ │ 4 │ Around the Horn │ Thomas Hardy │ ├────────────┼─────────────────────┼───────────────────┤ │ 11 │ Bs Beverages │ Victoria Ashworth │ ├────────────┼─────────────────────┼───────────────────┤ │ 13 │ Bs Beverages │ Random Name │ └────────────┴─────────────────────┴───────────────────┘
After:
rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" --json
[
{
"results": [
{
"CustomerID": 1,
"CompanyName": "Alfreds Futterkiste",
"ContactName": "Maria Anders"
},
{
"CustomerID": 4,
"CompanyName": "Around the Horn",
"ContactName": "Thomas Hardy"
},
{
"CustomerID": 11,
"CompanyName": "Bs Beverages",
"ContactName": "Victoria Ashworth"
},
{
"CustomerID": 13,
"CompanyName": "Bs Beverages",
"ContactName": "Random Name"
}
],
"success": true,
"meta": {
"duration": 1.662519000004977,
"last_row_id": null,
"changes": null,
"served_by": "primary-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.db3",
"internal_stats": null
}
}
]
2.8.1
Patch Changes
-
#2501
a0e5a491Thanks @geelen! - fix: make it possible to query d1 databases from durable objectsThis PR makes it possible to access D1 from Durable Objects.
To be able to query D1 from your Durable Object, you'll need to install the latest version of wrangler, and redeploy your Worker.
For a D1 binding like:
[[d1_databases]] binding = "DB" # i.e. available in your Worker on env.DB database_name = "my-database-name" database_id = "UUID-GOES-HERE" preview_database_id = "UUID-GOES-HERE"You'll be able to access your D1 database via
env.DBin your Durable Object.
- #2280
ef110923Thanks @penalosa! - Supportqueueandtraceevents in module middleware. This means thatqueueandtraceevents should work properly with the--test-scheduledflag
-
#2554
fbeaf609Thanks @CarmenPopoviciu! - feat: Add support for wasm module imports inwrangler pages devCurrently it is not possible to import
wasmmodules in either Pages Functions or Pages Advanced Mode projects.This commit caries out work to address the aforementioned issue by enabling
wasmmodule imports inwrangler pages dev. As a result, Pages users can now import theirwasmmodules withing their Functions or_worker.jsfiles, andwrangler pages devwill correctly bundle everything and serve these "external" modules.import hello from "./hello.wasm" export async function onRequest() { const module = await WebAssembly.instantiate(hello); return new Response(module.exports.hello); }
-
#2563
5ba39569Thanks @CarmenPopoviciu! - fix: Copy module imports related files to outdirWhen we bundle a Worker
esbuildtakes care of writing the results to the output directory. However, if the Worker contains anyexternalimports, such as text/wasm/binary module imports, that cannot be inlined into the same bundle file,bundleWorkerwill not copy these files to the output directory. This doesn't affectwrangler publishper se, because of how the Worker upload FormData is created. It does however create some inconsistencies when runningwrangler publish --outdirorwrangler publish --outdir --dry-run, in that,outdirwill not contain those external import files.This commit addresses this issue by making sure the aforementioned files do get copied over to
outdirtogether withesbuild's resulting bundle files.
2.8.0
Minor Changes
-
#2404
3f824347Thanks @petebacondarwin! - feat: support bundling the raw Pages_worker.jsbefore deployingPreviously, if you provided a
_worker.jsfile, then Pages would simply check the file for disallowed imports and then deploy the file as-is.Not bundling the
_worker.jsfile means that it cannot containing imports to other JS files, but also prevents Wrangler from adding shims such as the one for the D1 alpha release.This change adds the ability to tell Wrangler to pass the
_worker.jsthrough the normal Wrangler bundling process before deploying by setting the--bundlecommand line argument towrangler pages devandwrangler pages publish.This is in keeping with the same flag for
wrangler publish.Currently bundling is opt-in, flag defaults to
falseif not provided.
Patch Changes
- #2542
b44e1a75Thanks @GregBrimble! - chore: Rename--bundleto--no-bundlein Pages commands to make similar to Workers
-
#2551
bfffe595Thanks @rozenmd! - fix: wrangler init --from-dash incorrectly expects index.ts while writing index.jsThis PR fixes a bug where Wrangler would write a
wrangler.tomlexpecting an index.ts file, while writing an index.js file.
-
#2529
2270507cThanks @CarmenPopoviciu! - Remove "experimental _routes.json" warnings_routes.jsonis no longer considered an experimental feature, so let's remove all warnings we have in place for that.
-
#2548
4db768faThanks @rozenmd! - fix: path should be optional for wrangler d1 backup downloadThis PR fixes a bug that forces folks to provide a
--outputflag towrangler d1 backup download.
-
#2528
18208091Thanks @caass! - Add some guidance when folks encounter a 10021 error.Error code 10021 can occur when your worker doesn't pass startup validation. This error message will make it a little easier to reason about what happened and what to do next.
Closes #2519
- #1769
6a67efe9Thanks @dario-piotrowicz! - allowfetch()calls locally to accept URL Objects
2.7.1
Patch Changes
-
#2523
a5e9958cThanks @jahands! - fix: unstable_dev() experimental options incorrectly applying defaultsA subtle difference when removing object-spreading of experimental unstable_dev() options caused
wrangler pages devinteractivity to stop working. This switches back to object-spreading the passed in options on top of the defaults, fixing the issue.
2.7.0
Minor Changes
-
#2465
e1c2f5b9Thanks @JacobMGEvans! - After this PR,wrangler init --yeswill generate a test for your new Worker project, using Vitest with TypeScript. When usingwrangler init, and choosing to create a Typescript project, you will now be asked if Wrangler should write tests for you, using Vitest.This resolves issue #2436.
- #2333
71691421Thanks @markjmiller! - Remove the experimental binding warning from Dispatch Namespace since it is GA.
Patch Changes
- #2460
c2b2dfb8Thanks @rozenmd! - fix: resolve unstable_dev flakiness in tests by awaiting the dev registry
-
#2439
616f8739Thanks @petebacondarwin! - fix(wrangler): do not login or read wrangler.toml when applying D1 migrations in local mode.When applying D1 migrations to a deployed database, it is important that we are logged in and that we have the database ID from the wrangler.toml. This is not needed for
--localmode where we are just writing to a local SQLite file.
-
#1869
917b07b0Thanks @petebacondarwin! - feat: enable Wrangler to target the staging API by setting WRANGLER_API_ENVIRONMENT=stagingIf you are developing Wrangler, or an internal Cloudflare feature, and during testing, need Wrangler to target the staging API rather than production, it is now possible by setting the
WRANGLER_API_ENVIRONMENTenvironment variable tostaging.This will update all the necessary OAuth and API URLs, update the OAuth client ID, and also (if necessary) acquire an Access token for to get through the firewall to the staging URLs.
- #2377
32686e42Thanks @mrbbot! - FixReferenceErrorwhen usingwrangler dev --experimental-localin Node 16
-
#2485
4c0e2309Thanks @GregBrimble! - fix: Pages Plugin routing when mounted at the root of a projectPreviously, there was a bug which meant that Plugins mounted at the root of a Pages project were not correctly matching incoming requests. This change fixes that bug so Plugins mounted at the root should now correctly work.
-
#2479
7b479b91Thanks @rozenmd! - fix: bump d1jsThis PR bumps d1js, adding the following functionality to the d1 alpha shim:
- validates supported types
- converts ArrayBuffer to array
- converts typedArray to array
- #2392
7785591cThanks @rozenmd! - fix: improvewrangler init --from-dashhelp text and error handling
-
#2391
19525a4bThanks @mrbbot! - Always log when delegating to localwranglerinstall.When a global
wranglercommand is executed in a package directory withwranglerinstalled locally, the command is redirected to the localwranglerinstall. We now always log a message when this happens, so you know what's going on.
- #2468
97282459Thanks @rozenmd! - BREAKING CHANGE: move experimental options under the experimental object for unstable_dev
-
#2495
e93063e9Thanks @petebacondarwin! - fix(d1): ensure that migrations support compound statementsThis fix updates the SQL statement splitting so that it does not split in the middle of compound statements. Previously we were using a third party splitting library, but this needed fixing and was actually unnecessary for our purposes. So a new splitter has been implemented and the library dependency removed. Also the error handling in
d1 migrations applyhas been improved to handle a wider range of error types.Fixes #2463
- #2400
08a0b22eThanks @mrbbot! - Cleanly exitwrangler dev --experimental-localwhen pressingx/q/CTRL-C
-
#2374
ecba1edeThanks @rozenmd! - fix: make --from-dash error output clearerThis PR makes it clearer what --from-dash wants from you.
closes #2373 closes #2375
- #2377
32686e42Thanks @mrbbot! - RespectFORCE_COLOR=0environment variable to disable colored output when usingwrangler dev --local
-
#2455
d9c1d273Thanks @rozenmd! - BREAKING CHANGE: refactor unstable_dev to use an experimental object, instead of a second options objectBefore, if you wanted to disable the experimental warning, you would run:
worker = await unstable_dev( "src/index.js", {}, { disableExperimentalWarning: true } );After this change, you'll need to do this instead:
worker = await unstable_dev("src/index.js", { experimental: { disableExperimentalWarning: true }, });
2.6.2
Patch Changes
-
#2341
5afa13ecThanks @rozenmd! - fix: d1 - don't backup prod db when applying migrations locallyCloses #2336
2.6.1
Patch Changes
-
#2339
f6821189Thanks @GregBrimble! - fix:wrangler dev --localnow correctly lazy-imports@miniflare/trePreviously, we introduced a bug where we were incorrectly requiring
@miniflare/tre, even when not using theworkerd/--experimental-localmode.
2.6.0
Minor Changes
-
#2268
3be1c2cfThanks @GregBrimble! - feat: Add support for--experimental-localtowrangler pages devwhich will use theworkerdruntime.Add
@miniflare/treenvironment polyfill to@cloudflare/pages-shared.
-
#2163
d73a34beThanks @jimhawkridge! - feat: Add support for Analytics Engine bindings.For example:
analytics_engine_datasets = [ { binding = "ANALYTICS", dataset = "my_dataset" } ]
Patch Changes
-
#2177
e98613f8Thanks @caass! - Trigger login flow if a user runswrangler devwhile logged outPreviously, we would just error if a user logged out and then ran
wrangler dev. Now, we kick them to the OAuth flow and suggest runningwrangler dev --localif the login fails.Closes #2147
-
#2298
bb5e4f91Thanks @rozenmd! - fix: d1 not using the preview database when usingwrangler devAfter this fix, wrangler will correctly connect to the preview database, rather than the prod database when using
wrangler dev
-
#2176
d48ee112Thanks @caass! - Use the user's preferred default branch name if set in .gitconfig.Previously, we would initialize new workers with
mainas the name of the default branch. Now, we see if the user has a custom setting in .gitconfig forinit.defaultBranch, and use that if it exists.Closes #2112
- #2275
bbfb6a96Thanks @mrbbot! - Fix script reloads, and allow clean exits, when using--experimental-localon Linux
2.5.0
Minor Changes
- #2212
b24c2b2dThanks @dalbitresb12! - feat: Allow pages dev to proxy websocket requests
Patch Changes
- #2296
7da8f0e6Thanks @Skye-31! - Fix: check response status ofd1 backup downloadcommand before writing contents to file
-
#2260
c2940160Thanks @rozenmd! - fix: make it possible to use a local db for d1 migrationsAs of this change, wrangler's d1 migrations commands now accept
localandpersist-toas flags, so migrations can run against the local d1 db.
- #1883
60d31c01Thanks @GregBrimble! - fix: Fix--port=0option to report the actually used port.
2.4.4
Patch Changes
- #2265
42d88e3fThanks @WalshyDev! - Fix D1 bindings inwrangler pages dev
2.4.3
Patch Changes
- #2249
e41c7e41Thanks @mrbbot! - Enable pretty source-mapped error pages when using--experimental-local
- #2208
5bd04296Thanks @OilyLime! - Add link to Queues tab in dashboard when unauthorized to use Queues
-
#2248
effc2215Thanks @rozenmd! - chore: remove d1 local hardcodingPrior to this change wrangler would only ever use local mode when testing d1.
After this change d1 tests can access both local and remote Workers.
- #2254
9e296a4dThanks @penalosa! - Add an option to customise whetherwrangler loginopens a browser automatically. Usewrangler login --no-browserto prevent a browser being open—the link will be printed to the console so it can be manually opened.
2.4.2
Patch Changes
2.4.1
Patch Changes
-
#2209
d0f237d9Thanks @JacobMGEvans! - This change makes the metrics directory XDG compliantresolves #2075
2.4.0
Minor Changes
-
#2193
0047ad30Thanks @JacobMGEvans! - Local Mode Console Support Added support for detailedconsole.logcapability when using--experimental-localresolves #2122
Patch Changes
- #2192
add4278aThanks @mrbbot! - Add a--experimental-local-remote-kvflag to enable reading/writing from/to real KV namespaces. Note this flag requires--experimental-localto be enabled.
-
#2204
c725ce01Thanks @jahands! - fix: Upload filepath-routing configuration in wrangler pages publishPublishing Pages projects containing a functions directory incorrectly did not upload the filepath-routing config so that the user can view it in Dash. This fixes that, making the generated routes viewable under
Routing configurationin theFunctionstab of a deployment.
2.3.2
Patch Changes
2.3.1
Patch Changes
2.3.0
Minor Changes
Patch Changes
- #2178
d165b741Thanks @JacobMGEvans! - [feat] Queues generated type: Added the ability to generate manual types for Queues from Wrangler configuration.
2.2.3
Patch Changes
- #2138
2be9d642Thanks @mrbbot! - Reduce script reload times when usingwrangler dev --experimental-local
2.2.2
Patch Changes
- #2161
dff756f3Thanks @jbw1991! - Check for the correct API error code when attempting to detect missing Queues.
- #2165
a26f74baThanks @JacobMGEvans! - Fix Var string type: The type was not being coerced to a string, so TypeScript considered it a unresolved type.
2.2.1
Patch Changes
- #2067
758419edThanks @Skye-31! - fix: Accurately determine when using imports in _worker.js for Advanced Mode Pages Functions
- #2159
c5a7557fThanks @rozenmd! - fix: silence the 10023 error that throws when deployments isn't fully rolled out
2.2.0
Minor Changes
- #2107
511943e9Thanks @celso! - fix: D1 execute and backup commands improvements- Better and faster handling when importing big SQL files using execute --file
- Increased visibility during imports, sends output with each batch API call
- Backups are now downloaded to the directory where wrangler was initiated from
-
#2130
68f4fa6fThanks @matthewdavidrodgers! - feature: Add warnings around bundle sizes for large scriptsPrints a warning for scripts > 1MB compressed, encouraging smaller script sizes. This warning can be silenced by setting the NO_SCRIPT_SIZE_WARNING env variable
If a publish fails with either a script size error or a validator error on script startup (CPU or memory), we print out the largest 5 dependencies in your bundle. This is accomplished by using the esbuild generated metafile.
- #2064
49b6a484Thanks @jbw1991! - Adds support for Cloudflare Queues. Adds new CLI commands to configure Queues. Queue producers and consumers can be defined in wrangler.toml.
- #1982
5640fe88Thanks @penalosa! - Enable support forwrangler devon Workers behind Cloudflare Access, utilisingcloudflared. If you don't havecloudflaredinstalled, Wrangler will prompt you to install it. If you do, then the first time you start developing usingwrangler devyour default browser will open with a Cloudflare Access prompt.
Patch Changes
-
#2127
0e561e83Thanks @JacobMGEvans! - Fix: Missing Worker name using--from-dashAdded the--from-dashname as a fallback when no name is provided in thewrangler initcommand. Additionally added a checks to thestd.outto ensure that the name is provided.resolves #1853
- #2073
1987a79dThanks @mrbbot! - If--env <env>is specified, we'll now check.env.<env>/.dev.vars.<env>first. If they don't exist, we'll fallback to.env/.dev.vars.
- #2072
06aa6121Thanks @mrbbot! - Fixed importing installed npm packages with the same name as Node built-in modules ifnode_compatis disabled.
-
#2124
02ca556cThanks @JacobMGEvans! - Computing the name from binding response Now thevarswill be computed, example:[var.binding.name]: var.binding.textthis will resolve the issue that was occurring with generating a TOML with incorrect fields for the
varskey/value pair.resolves #2048
2.1.15
Patch Changes
-
#2103
f1fd62a1Thanks @GregBrimble! - fix: Don't uploadfunctions/directory as part ofwrangler pages publishIf the root directory of a project was the same as the build output directory, we were previously uploading the
functions/directory as static assets. This PR now ensures that thefunctions/files are only used to create Pages Functions and are no longer uploaded as static assets.Additionally, we also now do upload
_worker.js,_headers,_redirectsand_routes.jsonif they aren't immediate children of the build output directory. Previously, we'd ignore all files with this name regardless of location. For example, if you have apublic/blog/how-to-use-pages/_headersfile (wherepublicis your build output directory), we will now upload the_headersfile as a static asset.
-
#2111
ab52f771Thanks @GregBrimble! - feat: Add apassThroughOnException()handler in Pages FunctionsThis
passThroughOnException()handler is not as good as the built-in for Workers. We're just adding it now as a stop-gap until we can do the behind-the-scenes plumbing required to make the built-in function work properly.We wrap your Pages Functions code in a
try/catchand on failure, if you callpassThroughOnException()we defer to the static assets of your project.For example:
export const onRequest = ({ passThroughOnException }) => { passThroughOnException(); x; // Would ordinarily throw an error, but instead, static assets are served. };
2.1.14
Patch Changes
-
#2074
b08ab1e5Thanks @JacobMGEvans! - The type command aggregates bindings and custom module rules from config, then generates a DTS file for both service workers'declare global { ... }or module workers'interface Env { ... }Custom module rules generate
declare modules based on the module type (Text,DataorCompiledWasm). Module Example Outputs:CompiledWasm
declare module "**/*.wasm" { const value: WebAssembly.Module; export default value; }Data
declare module "**/*.webp" { const value: ArrayBuffer; export default value; }Text
declare module "**/*.text" { const value: string; export default value; }resolves #2034 resolves #2033
-
#2065
14c44588Thanks @CarmenPopoviciu! - fix(pages):wrangler pages devmatches routing rules in_routes.jsontoo looselyCurrently, the logic by which we transform routing rules in
_routes.jsonto regular expressions, so we can performpathnamematching & routing when we runwrangler pages dev, is too permissive, and leads to serving incorrect assets for certain url paths.For example, a routing rule such as
/foowill incorrectly match pathname/bar/foo. Similarly, pathname/foowill be incorrectly matched by the/routing rule. This commit fixes our routing rule to pathname matching logic and bringswrangler pages devon par with routing in deployed Pages projects.
-
#2098
2a81caeeThanks @threepointone! - feat: delete site/assets namespace when a worker is deletedThis patch deletes any site/asset kv namespaces associated with a worker when
wrangler deleteis used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used withwrangler dev.
-
#2091
9491d86fThanks @JacobMGEvans! - Wrangler deployments command Added support for the deployments command, which allows you to list the last ten deployments for a given script.The information will include:
- Version ID
- Version number
- Author email
- Latest deploy
- Created on
resolves #2089
- #2068
2c1fd9d2Thanks @mrbbot! - Fixed issue where information and warning messages from Miniflare were being discarded when usingwrangler dev --local. Logs from Miniflare will now be coloured too, if the terminal supports this.
2.1.13
Patch Changes
-
#2026
7d987ee2Thanks @GregBrimble! - fix: Default to today's compatibility date inwrangler pages devLike
wrangler devproper,wrangler pages devnow defaults to using today's compatibility date. It can be overriden with--compatibility-date=YYYY-MM-DD.https://developers.cloudflare.com/workers/platform/compatibility-dates/
- #2035
76a66fc2Thanks @penalosa! - Warn when opening a tail on workers for which a restart could be disruptive (i.e. Workers which use Durable Objects in conjunction with WebSockets)
-
#2045
c2d3286fThanks @threepointone! - feat: implement a basicwrangler deleteThis PR adds a simple (but useful!) implementation for
wrangler delete. Of note, it'll delete a given service, including all it's bindings. It uses the same api as the dashboard.
2.1.12
Patch Changes
-
#2023
d6660ce3Thanks @caass! - Display a more helpful error when trying to publish to a route in use by another worker.Previously, when trying to publish a worker to a route that was in use by another worker, there would be a really unhelpful message about a failed API call. Now, there's a much nicer message that tells you what worker is running on that route, and gives you a link to the workers overview page so you can unassign it if you want.
⛅️ wrangler 2.1.11 -------------------- Total Upload: 0.20 KiB / gzip: 0.17 KiB ✘ [ERROR] Can't publish a worker to routes that are assigned to another worker. "test-custom-routes-redeploy" is already assigned to route test-custom-worker.swag.lgbt Unassign other workers from the routes you want to publish to, and then try again. Visit https://dash.cloudflare.com/<account_id>/workers/overview to unassign a worker from a route.Closes #1849
-
#2013
c63ca0a5Thanks @rozenmd! - fix: make d1 help print if a command is incompletePrior to this change, d1's commands would return silently if wrangler wasn't supplied enough arguments to run the command.
This change resolves this issue, and ensures help is always printed if the command couldn't run.
-
#2016
932fecc0Thanks @caass! - Offer to create a workers.dev subdomain if a user needs onePreviously, when a user wanted to publish a worker to https://workers.dev by setting
workers_dev = truein theirwrangler.toml, but their account didn't have a subdomain registered, we would error out.Now, we offer to create one for them. It's not implemented for
wrangler dev, which also expects you to have registered a workers.dev subdomain, but we now error correctly and tell them what the problem is.
- #2003
3ed06b40Thanks @GregBrimble! - chore: Bump miniflare@2.10.0
-
#2024
4ad48e4dThanks @rozenmd! - fix: make it possible for values in vars and defines to have colons (:)Prior to this change, passing --define someKey:https://some-value.com would result in an incomplete value being passed to the Worker.
This change correctly handles colons for var and define in
wrangler devandwrangler publish.
-
#2032
f33805d2Thanks @caass! - Catch unsupported terminal errors and provide a nicer error message.Wrangler depends on terminals supporting raw mode. Previously, attempting to run wrangler from a terminal that didn't support raw mode would result in an Ink error, which was both an exposure of an internal implementation detail to the user and also not actionable:
ERROR Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupportedNow, we provide a much nicer error, which provides an easy next step for th user:
ERROR: This terminal doesn't support raw mode. Wrangler uses raw mode to read user input and write output to the terminal, and won't function correctly without it. Try running your previous command in a terminal that supports raw mode, such as Command Prompt or Powershell.Closes #1992
- #1946
7716c3b9Thanks @penalosa! - Support subdomains with wrangler dev for routes defined withzone_name(instead of just for routes defined withzone_id)
2.1.11
Patch Changes
-
#1957
b579c2b5Thanks @caass! - Remove dependency on create-cloudflare.Previously,
wrangler generatewas a thin wrapper aroundcreate-cloudflare. Now, we've moved over the logic from that package directly intowrangler.
- #1944
ea54623cThanks @CarmenPopoviciu! -wrangler pages publishshould prioritize_worker.jsover/functionsif both exist
-
#1950
daf73fbeThanks @CarmenPopoviciu! -wrangler pages devshould prioritize_worker.jsWhen using a
_worker.jsfile, the entire/functionsdirectory should be ignored – this includes its routing and middleware characteristics. Currentlywrangler pages devdoes the reverse, by prioritizing/functionsover_worker.js. These changes fix the current behaviour.
- #1928
c1722170Thanks @GregBrimble! - fix: Allow unsetting of automatically generatedLinkheaders using_headersand the! Linkoperator
-
#1928
c1722170Thanks @GregBrimble! - fix: Only generateLinkheaders from simple<link>elements.Specifically, only those with the
rel,hrefand possiblyasattributes. Any element with additional attributes will not be used to generate headers.
- #1974
a96f2585Thanks @GregBrimble! - chore: Bump @cloudflare/pages-shared@0.0.7 and use TS directly
-
#1965
9709d3a3Thanks @JacobMGEvans! - chore: remove hidden on --from-dash The --from-dash can now be used with the dashboard features to support moving Worker developmment to a local machine.resolves #1783
-
#1978
6006ae50Thanks @JacobMGEvans! - chore: Undici 5.11.0 multipart/form-data support The 5.11.0 version of Undici now supports multipart/form-data previously needed a ponyfill we can now handle the multipart/form-data without any custom code.resolves #1977
2.1.10
Patch Changes
-
#1955
b6dd07a1Thanks @cameron-robey! - chore: error if d1 bindings used withno-bundleWhile in beta, you cannot use D1 bindings without bundling your worker as these are added in through a facade which gets bypassed when using the
no-bundleoption.
- #1964
1f50578eThanks @JacobMGEvans! - chore: Emoji space in help description Added a space between the Emoji and description for the secret:bulk command.
-
#1967
02261f27Thanks @rozenmd! - feat: implement remote mode for unstable_devWith this change,
unstable_devcan now perform end-to-end (e2e) tests against your workers as you dev.Note that to use this feature in CI, you'll need to configure
CLOUDFLARE_API_TOKENas an environment variable in your CI, and potentially addCLOUDFLARE_ACCOUNT_IDas an environment variable in your CI, oraccount_idin yourwrangler.toml.Usage:
await unstable_dev("src/index.ts", { local: false, });
2.1.9
Patch Changes
-
#1937
905fce4fThanks @JacobMGEvans! - fix: fails to publish due to empty migrations After this change,wrangler init --from-dashwill not attempt to add durable object migrations towrangler.tomlfor Workers that don't have durable objects.fixes #1854
-
#1943
58a430f2Thanks @cameron-robey! - chore: addenvandctxparams tofetchin javascript example templateJust like in the typescript templates, and the javascript template for scheduled workers, we include
envandctxas parameters to thefetchexport. This makes it clearer where environment variables live.
-
#1939
5854cb69Thanks @rozenmd! - fix: respect variable binding type when printingAfter this change, when printing the bindings it has access to, wrangler will correctly only add quotes around string variables, and serialize objects via JSON.stringify (rather than printing
"[object Object]").
-
#1930
56798155Thanks @rozenmd! - fix: use node http instead of faye-websocket in proxy serverWe change how websockets are handled in the proxy server, fixing multiple issues of websocket behaviour, particularly to do with headers.
In particular this fixes:
- the protocol passed between the client and the worker was being stripped out by wrangler
- wrangler was discarding additional headesr from websocket upgrade response
- websocket close code and reason was not being propagated by wrangler
2.1.8
Patch Changes
- #1894
ed646cf9Thanks @mrbbot! - Add experimental support for using the open-source Workers runtimeworkerdinwrangler dev. Usewrangler dev --experimental-localto try it out! 🚀 Note this feature is still under active development.
2.1.7
Patch Changes
- #1881
6ff5a030Thanks @Skye-31! - Chore: correctly log all listening ports on remote mode (closes #1652)
-
#1913
9f7cc5a0Thanks @threepointone! - feat: expose port and address on (Unstable)DevWorkerwhen using
unstable_dev(), I think we want to expose the port/address that the server has started on. The usecase is when trying to connect to the server without calling.fetch()(example: when making a websocket connection).
-
#1911
16c28502Thanks @rozenmd! - fix: put config cache log behind logger.debugPrior to this change, wrangler would print
Retrieving cached values for...after almost every single command.After this change, you'll only see this message if you add
WRANGLER_LOG=debugbefore your command.Closes #1808
2.1.6
Patch Changes
-
#1895
1b53bf9dThanks @rozenmd! - fix: rename keep_bindings to keep_vars, and make it opt-in, to keep wrangler.toml compatible with being used for Infrastructure as CodeBy default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
If you change your settings (particularly your vars) in the dashboard, wrangler will override them. If you want to disable this behavior, set this field to true.
Between wrangler 2.0.28 and 2.1.5, by default wrangler would not delete your vars by default, breaking expected wrangler.toml behaviour.
- #1889
98f756c7Thanks @penalosa! - fix: Correctly place the.wrangler/statelocal state directory in the same directory aswrangler.tomlby default
-
#1886
8b647175Thanks @JacobMGEvans! - fix: potential missing compatibility_date in wrangler.toml when runningwrangler init --from-dashFixed a bug where compatibility_date wasn't being added to wrangler.toml when initializing a worker viawrangler init --from-dashfixes #1855
2.1.5
Patch Changes
- #1819
d8a18070Thanks @CarmenPopoviciu! - Adds support for custom _routes.json when runningwrangler pages dev
-
#1815
d8fe95d2Thanks @cameron-robey! - feat: testing scheduled events withwrangler devremote modeUsing the new middleware (https://github.com/cloudflare/workers-sdk/pull/1735), we implement a way of testing scheduled workers from a fetch using
wrangler devin remote mode, by passing a new command line flag--test-scheduled. This exposes a route/__scheduledwhich will trigger the scheduled event.$ npx wrangler dev index.js --test-scheduled $ curl http://localhost:8787/__scheduled
-
#1801
07fc90d6Thanks @rozenmd! - feat: multi-worker testingThis change introduces the ability to test multi-worker setups via the wrangler API's unstable_dev function.
Usage:
import { unstable_dev } from "wrangler"; describe("multi-worker testing", () => { let childWorker; let parentWorker; beforeAll(async () => { childWorker = await unstable_dev( "src/child-worker.js", { config: "src/child-wrangler.toml" }, { disableExperimentalWarning: true } ); parentWorker = await unstable_dev( "src/parent-worker.js", { config: "src/parent-wrangler.toml" }, { disableExperimentalWarning: true } ); }); afterAll(async () => { await childWorker.stop(); await parentWorker.stop(); }); it("childWorker should return Hello World itself", async () => { const resp = await childWorker.fetch(); if (resp) { const text = await resp.text(); expect(text).toMatchInlineSnapshot(`"Hello World!"`); } }); it("parentWorker should return Hello World by invoking the child worker", async () => { const resp = await parentWorker.fetch(); if (resp) { const parsedResp = await resp.text(); expect(parsedResp).toEqual("Parent worker sees: Hello World!"); } }); });
-
#1865
adfc52d6Thanks @JacobMGEvans! - polish: loglevel flag Added a '--log-level' flag that allows the user to specify between 'debug', 'info', 'log', 'warning', 'error', 'none' Currently 'none' will turn off all outputs in Miniflare (local mode), however, Wrangler will still output Errors.resolves #185
- #1861
3d51d553Thanks @GregBrimble! - fix: Add 'charset' to 'Content-Type' on 'wrangler pages dev' responses
- #1867
5a6ccc58Thanks @cameron-robey! - fix: handle logging of empty map/set/weak-map/weak-set
2.1.4
Patch Changes
-
#1839
2660872aThanks @cameron-robey! - feat: make it possible to specify a path forunstable_dev()'s fetch methodconst worker = await unstable_dev( "script.js" ); const res = await worker.fetch(req);where
reqcan be anything fromRequestInfo:string | URL | Request.
-
#1851
afca1b6cThanks @cameron-robey! - feat: summary output for secret:bulkWhen wrangler
secret:bulk <json>is run, a summary is outputted at the end with the number of secrets successfully / unsuccessfully created.
- #1846
f450e387Thanks @rozenmd! - fix: when runningwrangler init, add atestscript to package.json when the user asks us to write their first test
- #1779
974f3311Thanks @WalshyDev! - Add debug outputs to the exchange request
2.1.3
Patch Changes
-
#1836
3583f313Thanks @rozenmd! - fix: wrangler publish for CI after a manual deploymentPrior to this change, if you edited your Worker via the Cloudflare Dashboard, then used CI to deploy your script,
wrangler publishwould fail.This change logs a warning that your manual changes are going to be overriden, but doesn't require user input to proceed.
Closes #1832
-
#1644
dc1c9595Thanks @geelen! - Deprecated --experimental-enable-local-persistence.Added --persist and --persist-to in its place. Changed the default persistence directory to .wrangler/state, relative to wrangler.toml.
To migrate to the new flag, run
mkdir -p .wrangler && mv wrangler-local-state .wrangler/statethen use--persist. Alternatively, you can use--persist-to=./wrangler-local-stateto keep using the files in the old location.
2.1.2
Patch Changes
- #1833
b1622395Thanks @GregBrimble! - fix: _headers and _redirects parsing in 'wrangler pages dev'
2.1.1
Patch Changes
-
#1827
32a58feeThanks @JacobMGEvans! - fix: Publish error when deploying new WorkersThis fix adds a try/catch when checking when the Worker was last deployed.
The check was failing when a Worker had never been deployed, causing deployments of new Workers to fail.
fixes #1824
-
#1799
a89786baThanks @JacobMGEvans! - feat: Bulk Secret Upload Created a flag that allows for passing in a JSON file with key/value's of secrets.resolve #1610
2.1.0
Minor Changes
- #1713
82451e9dThanks @jspspike! - Tail now uses updated endpoint. Allows tailing workers that are above the normal "invocations per second" limit when using the--ip selffilter.
Patch Changes
-
#1782
cc43e3c4Thanks @jahands! - fix: Update Pages test to assert version in package.jsonThis test was asserting a hardcoded wrangler version which broke after release.
-
#1786
1af49b68Thanks @rozenmd! - fix: refactor unstable_dev to avoid race conditions with portsPrior to this change, wrangler would check to see if a port was available, do a bit more work, then try use that port when starting miniflare. With this change, we're using port 0 to tell Node to assign us a random free port.
To make this change work, we had to do some plumbing so miniflare can tell us the host and port it's using, so we can call fetch against it.
-
#1788
152a1e81Thanks @GregBrimble! - chore: Refactor 'wrangler pages dev' to use the same code as we do in productionThis will make our dev implementation an even closer simulation of production, and will make maintenance easier going forward.
-
#1789
b21ee41aThanks @JacobMGEvans! - fix: getMonth compatibility date Set correct month forcompatibility_datewhen initializing a new Workerresolves #1766
- #1694
3fb730a3Thanks @yjl9903! - feat: starting pages dev server doesn't require command when proxy port provided
-
#1729
ebb5b88fThanks @JacobMGEvans! - feat: autogenerated config from dashMakes
wrangler init's--from-dashoption pull in data from Cloudflare's dashboard to generate a wrangler.toml file populated with configuration from an existing Worker. This is a first step towards makingwrangler initmore useful for folks who are already using Cloudflare's products on the Dashboard.related discussion #1623 resolves #1638
-
#1781
603d0b35Thanks @JacobMGEvans! - feat: Publish Origin Messaging feat: warn about potential conflicts duringpublishandinit --from-dash.- If publishing to a worker that has been modified in the dashboard, warn that the dashboard changes will be overwritten.
- When initializing from the dashboard, warn that future changes via the dashboard will not automatically appear in the local Worker config.
resolves #1737
-
#1735
de29a445Thanks @cameron-robey! - feat: new internal middlewareA new way of registering middleware that gets bundled and executed on the edge.
- the same middleware functions can be used for both modules workers and service workers
- only requires running esbuild a fixed number of times, rather than for each middleware added
2.0.29
Patch Changes
- #1731
16f051d3Thanks @CarmenPopoviciu! - Add custom _routes.json support for Pages Functions projects
-
#1762
23f89216Thanks @petebacondarwin! - Use getBasePath() when trying to specify paths to files relative to the base of the Wrangler package directory rather than trying to compute the path from Node.js constants like **dirname and **filename. This is because the act of bundling the source code can move the file that contains these constants around potentially breaking the relative path to the desired files.Fixes #1755
-
#1763
75f3ae82Thanks @CarmenPopoviciu! - Adddescriptionfield to _routes.jsonWhen generating routes for Functions projects, let's add a description so we know what wrangler version generated this config
-
#1538
2c9caf74Thanks @rozenmd! - chore: refactor wrangler.dev API to not need React/InkPrior to this change,
wrangler.unstable_dev()would only support running one instance of wrangler at a time, as Ink only lets you render one instance of React. This resulted in test failures in CI.This change creates pure JS/TS versions of these React hooks:
- useEsbuild
- useLocalWorker
- useCustomBuild
- useTmpDir
As a side-effect of removing React, tests should run faster in CI.
Closes #1432 Closes #1419
- #1775
8163b8cfThanks @CarmenPopoviciu! - Add unit tests forwrangler pages publish
2.0.28
Patch Changes
-
#1725
eb75413eThanks @threepointone! - rename:worker_namespaces/dispatch_namespacesThe Worker-for-Platforms team would like to rename this field to more closely match what it's called internally. This fix does a search+replace on this term. This feature already had an experimental warning, and no one's using it at the moment, so we're not going to add a warning/backward compat for existing customers.
-
#1736
800f8553Thanks @threepointone! - fix: do not delete previously defined plain_text/json bindings on publishCurrently, when we publish a worker, we delete an pre-existing bindings if they're not otherwise defined in
wrangler.toml, and overwrite existing ones. But folks may be deploying with wrangler, and changing environment variables on the fly (like marketing messages, etc). It's annoying when deploying via wrangler blows away those values.This patch fixes one of those issues. It will not delete any older bindings that are not in wrangler.toml. It still does overwrite existing vars, but at least this gives a way for developers to have some vars that are not blown away on every publish.
-
#1726
0b83504cThanks @GregBrimble! - fix: Multiworker and static asset dev bug preventing both from being usedThere was previously a collision on the generated filenames which resulted in the generated scripts looping and crashing in Miniflare with error code 7. By renaming one of the generated files, this is avoided.
-
#1718
02f1fe9bThanks @threepointone! - fix: useconfig.dev.ipwhen providedBecause we'd used a default for 0.0.0.0 for the
--ipflag,wrangler devwas overriding the value specified inwrangler.tomlunderdev.ip. This fix removes the default value (since it's being set when normalising config anyway).
-
#1727
3f9e8f63Thanks @rozenmd! - fix: refresh token when we detect that the preview session has expired (error code 10049)When running
wrangler dev, from time to time the preview session token would expire, and the dev server would need to be manually restarted. This fixes this, by refreshing the token when it expires.Closes #1446
-
#1730
27ad80eeThanks @threepointone! - feat:--var name:valueand--define name:valueThis enables passing values for
[vars]and[define]via the cli. We have a number of usecases where the values to be injected during dev/publish aren't available statically (eg: a version string, some identifier for 3p libraries, etc) and reading those values only fromwrangler.tomlisn't good ergonomically. So we can now read those values when passed through the CLI.Example: add a var during dev:
wrangler dev --var xyz:123will inject the varxyzwith string"123"(note, only strings allowed for
--var)substitute a global value:
wrangler dev --define XYZ:123will replace every global identifierXYZwith the value123.The same flags also work with
wrangler publish.Also, you can use actual environment vars in these commands. e.g.:
wrangler dev --var xyz:$XYZwill setxyzto whateverXYZhas been set to in the terminal environment.
-
#1700
d7c23e49Thanks @penalosa! - Closes #1505 by extendingwrangler tailto allow for passing worker routes as well as worker script names.For example, if you have a worker
example-workerassigned to the routeexample.com/*, you can retrieve it's logs by running eitherwrangler tail example.com/*orwrangler tail example-worker—previously onlywrangler tail example-workerwas supported.
-
#1691
5b2c3ee2Thanks @cameron-robey! - chore: bump undici and increase minimum node version to 16.13- We bump undici to version to 5.9.1 to patch some security vulnerabilities in previous versions
- This requires bumping the minimum node version to >= 16.8 so we update the minimum to the LTS 16.13
Fixes https://github.com/cloudflare/workers-sdk/issues/1679 Fixes https://github.com/cloudflare/workers-sdk/issues/1684
2.0.27
Patch Changes
- #1686
a0a3ffdeThanks @Skye-31! - fix: pages dev correctly escapes regex characters in function paths (fixes #1685)
-
#1628
61e3f00bThanks @Skye-31! - fix: pages dev process exit when proxied process exitsCurrently, if the process pages dev is proxying exists or crashes, pages dev does not clean it up, and attempts to continue proxying requests to it, resulting in it throwing 502 errors. This fixes that behaviour to make wrangler exit with the code the child_process exits with.
-
#1710
9943e647Thanks @rozenmd! - fix: pass create-cloudflare the correct pathwrangler generate was passing create-cloudflare an absolute path, rather than a folder name, resulting in "doubled-up" paths
- #1712
c18c60eeThanks @petebacondarwin! - feat: add debug logging to CF API requests and remote dev worker requests
-
#1663
a9f9094cThanks @GregBrimble! - feat: Adds--compatibility-dateand--compatibility-flagstowrangler pages devSoon to follow in production.
- #1653
46b73b52Thanks @WalshyDev! - Fixed R2 create bucket API endpoint. Thewrangler r2 bucket createcommand should work again
2.0.26
Patch Changes
-
#1655
fed80faaThanks @jahands! - fix: Pages Functions custom _routes.json not being usedAlso cleaned up when we were reading generated _routes.json
-
#1626
f650a0b2Thanks @JacobMGEvans! - fix: Added pathname to the constructed URL service bindings + wrangler dev ignores pathname when making a request.resolves #1598
- #1648
af669a19Thanks @CarmenPopoviciu! - Implement new wrangler pages functions optimize-routes command
- #1622
02bdfde0Thanks @Skye-31! - fix: Handle static files with multiple extensions, e.g. /a.b should resolve /a.b.html, if /a.b as a file does not exist
-
#1666
662dfdf9Thanks @jahands! - fix: Consolidate routes that are over the limit to prevent failed deploymentsRather than failing a deployment because a route is too long (>100 characters), it will now be shortened to the next available level. Eg.
/foo/aaaaaaa...->/foo/*
- #1670
1b232aafThanks @Skye-31! - fix: dev.tsx opens 127.0.0.1 instead of 0.0.0.0 (doesn't work on windows)
-
#1656
37852672Thanks @jahands! - fix: Warn when Pages Functions have no routesBuilding/publishing pages functions with no valid handlers would result in a Functions script containing no routes, often because the user is using the functions directory for something unrelated. This will no longer add an empty Functions script to the deployment, needlessly consuming Functions quota.
- #1665
c40fca42Thanks @GregBrimble! - fix: Fix SW and Durable Object request URLs made over the service registry
-
#1645
ac397480Thanks @JacobMGEvans! - feat: download & initialize a wrangler project from dashboard workerAdded
wrangler init --from-dash <worker-name>, which allows initializing a wrangler project from a pre-existing worker in the dashboard.Resolves #1624 Discussion: #1623
Notes:
multiplart/form-dataparsing is not currently supported in Undici, so a temporary workaround to slice off top and bottom boundaries is in place.
-
#1639
d86382a5Thanks @matthewdavidrodgers! - fix: support 'exceededMemory' error status in tailWhile the exception for 'Worker exceeded memory limits' gets logged correctly when tailing, the actual status wasn't being counted as an error, and was falling through a switch case to 'unknown'
This ensures filtering and logging reflects that status correctly
2.0.25
Patch Changes
-
#1615
9163da17Thanks @huw! - fix: Resolve source maps correctly in local dev modeResolves https://github.com/cloudflare/workers-sdk/issues/1614
-
#1609
fa8cb73fThanks @jahands! - patch: Consolidate redundant routes when generating _routes.generated.jsonExample:
["/foo/:name", "/foo/bar"] => ["/foo/*"]
-
#1595
d4fbd0beThanks @caass! - Add support for Alarm Events inwrangler tailwrangler tail --format prettynow supports receiving events from Durable Object Alarms, and will display the time the alarm was triggered.Additionally, any future unknown events will simply print "Unknown Event" instead of crashing the
wranglerprocess.Closes #1519
-
#1642
a3e654f8Thanks @jrf0110! - feat: Add output-routes-path to functions buildThis controls the output path of the _routes.json file. Also moves _routes.json generation to tmp directory during functions build + publish
- #1606
24327289Thanks @Skye-31! - chore: make prettier also fix changesets, as it causes checks to fail if they're not formatted
-
#1611
3df0fe04Thanks @GregBrimble! - feat: Durable Object multi-worker bindings in local dev.Building on the recent work for multi-worker Service bindings in local dev, this now adds support for direct Durable Object namespace bindings.
A parent (calling) Worker will look for child Workers (where the Durable Object has been defined) by matching the
script_nameconfiguration option with the child's Service name. For example, if you have a Worker A which defines a Durable Object,MyDurableObject, and Worker B which references A's Durable Object:name = "A" [durable_objects] bindings = [ { name = "MY_DO", class_name = "MyDurableObject" } ]name = "B" [durable_objects] bindings = [ { name = "REFERENCED_DO", class_name = "MyDurableObject", script_name = "A" } ]MY_DOwill work as normal in Worker A.REFERENCED_DOin Worker B will point at A's Durable Object.Note: this only works in local mode (
wrangler dev --local) at present.
- #1621
2aa3fe88Thanks @Skye-31! - fix(#1487) [pages]: Command failed: git rev-parse --abrev-ref HEAD
-
#1602
ebd1d631Thanks @huw! - fix: PassusageModelto Miniflare in local devThis allows Miniflare to dynamically update the external subrequest limit for Unbound workers.
- #1629
06915ff7Thanks @Skye-31! - fix: disallow imports in _worker.js (https://github.com/cloudflare/workers-sdk/issues/1214)
-
#1518
85ab8a93Thanks @jahands! - feature: Reduce Pages Functions executions for Asset-only requests in_routes.jsonManually create a
_routes.jsonfile in your build output directory to specify routes. This is a set of inclusion/exclusion rules to indicate when to run a Pages project's Functions. Note: This is an experemental feature and is subject to change.
- #1643
4b04a377Thanks @GregBrimble! - feat: Add--inspector-portargument towrangler pages dev
-
#1641
5f5466abThanks @GregBrimble! - feat: Add support for using external Durable Objects fromwrangler pages dev.An external Durable Object can be referenced using
npx wrangler pages dev ./public --do MyDO=MyDurableObject@apiwhere the Durable Object is made available onenv.MyDO, and is described in a Workers service (name = "api") with the class nameMyDurableObject.You must have the
apiWorkers service running in as anotherwrangler devprocess elsewhere already in order to reference that object.
-
#1605
9e632cddThanks @kimyvgy! - refactor: add --ip argument forwrangler pages dev& defaults IP to0.0.0.0Add new argument
--ipfor the commandwrangler pages dev, defaults to0.0.0.0. The commandwrangler devis also defaulting to0.0.0.0instead oflocalhost.
- #1604
9732fafaThanks @WalshyDev! - Added R2 support for wrangler pages dev. You can add an R2 binding with--r2 <BINDING>.
-
#1608
9f02758fThanks @jrf0110! - feat: Generate _routes.generated.json for Functions routingWhen using Pages Functions, a _routes.generated.json file is created to inform Pages how to route requests to a project's Functions Worker.
-
#1603
7ae059b3Thanks @JacobMGEvans! - feat: R2 Object Deletequote Improving the R2 objects management, added the functionality to delete objects in a bucket.resolves #1584
2.0.24
Patch Changes
- #1577
359d0ba3Thanks @threepointone! - chore: update esbuild to 0.14.51
-
#1438
0a9fe918Thanks @caass! - Initial implementation ofwrangler generatewrangler generateandwrangler generate <name>delegate towrangler init.wrangler generate <name> <template>delegates tocreate-cloudflare
Naming behavior is replicated from Wrangler v1, and will auto-increment the worker name based on pre-existing directories.
-
#1534
d3ae16cfThanks @cameron-robey! - feat: publish full url onwrangler publishfor workers.dev workersWhen the url is printed out on
wrangler publish, the full url is printed out so that it can be accessed from the terminal easily by doing cmd+click. Implemented only for workers.dev workers.Resolves https://github.com/cloudflare/workers-sdk/issues/1530
- #1576
f696ebb5Thanks @petebacondarwin! - feat: add platform/os to usage metrics events
- #1576
f696ebb5Thanks @petebacondarwin! - fix: rename pages metrics events to align better with the dashboard
-
#1550
aca9c3e7Thanks @cameron-robey! - feat: describe current permissions inwrangler whoamiOften users experience issues due to tokens not having the correct permissions associated with them (often due to new scopes being created for new products). With this, we print out a list of permissions associated with OAuth tokens with the
wrangler whoamicommand to help them debug for OAuth tokens. We cannot access the permissions on an API key, so we direct the user to the location in the dashboard to achieve this. We also cache the scopes of OAuth tokens alongside the access and refresh tokens in the .wrangler/config file to achieve this.Currently unable to implement https://github.com/cloudflare/workers-sdk/issues/1371 - instead directs the user to the dashboard. Resolves https://github.com/cloudflare/workers-sdk/issues/1540
-
#1575
5b1f68eeThanks @JacobMGEvans! - feat: legacy "kv-namespace" not supported In previous Wrangler 1, there was a legacy configuration that was considered a "bug" and removed.Before it was removed, tutorials, templates, blogs, etc... had utlized that configuration property to handle this in Wrangler 2 we will throw a blocking error that tell the user to utilize "kv_namespaces"
resolves #1421
-
#1404
17f5b576Thanks @threepointone! - feat: add cache control options toconfig.assetsThis adds cache control options to
config.assets. This is already supported by the backing library (@cloudflare/kv-asset-handler) so we simply pass on the options at its callsite.Additionally, this adds a configuration field to serve an app in "single page app" mode, where a root index.html is served for all html/404 requests (also powered by the same library).
-
#1578
cf552192Thanks @cameron-robey! - feat: source-map function namesFollowing on from https://github.com/cloudflare/workers-sdk/pull/1535, using new functionality from esbuild v0.14.50 of generation of
namesfield in generated sourcemaps, we output the original function name in the stack trace.
-
#1503
ebc1aa57Thanks @threepointone! - feat: zero config multiworker development (local mode)Preamble: Typically, a Worker has been the unit of a javascript project on our platform. Any logic that you need, you fit into one worker, ~ 1MB of javascript and bindings. If you wanted to deploy a larger application, you could define different workers on different routes. This is fine for microservice style architectures, but not all projects can be cleaved along the route boundaries; you lose out on sharing code and resources, and can still cross the size limit with heavy dependencies.
Service bindings provide a novel mechanism for composing multiple workers into a unified architecture. You could deploy shared code into a worker, and make requests to it from another worker. This lets you architect your code along functional boundaries, while also providing some relief to the 1MB size limit.
I propose a model for developing multiple bound workers in a single project.
Consider Worker A, at
workers/a.js, with awrangler.tomllike so:name = 'A' [[services]] binding = 'Bee' service = 'B'and content like so:
export default { fetch(req, env) { return env.Bee.fetch(req); }, };Consider Worker B, at
workers/b.js, with awrangler.tomllike so:name = 'B'and content like so:
export default { fetch(req, env) { return new Response("Hello World"); }, };So, a worker A, bound to B, that simply passes on the request to B.
Local mode:
Currently, when I run
wrangler dev --localon A (or switch from remote to local mode during a dev session), and make requests to A, they'll fail because the bindings don't exist in local mode.What I'd like, is to be able to run
wrangler dev --localon B as well, and have my dev instance of A make requests to the dev instance of B. When I'm happy with my changes, I'd simply deploy both workers (again, ideally as a batched publish).Proposal: A local dev registry for workers.
- Running
wrangler devon a machine should start up a local service registry (if there isn't one loaded already) as a server on a well known port. - Further, it should then "register" itself with the registry with metadata about itself; whether it's running in remote/local mode, the port and ip its dev server is listening on, and any additional configuration (eg: in remote mode, a couple of extra headers have to be added to every request made to the dev session, so we'd add that data into the registry as well.)
- Every worker that has service bindings configured, should intercept requests to said binding, and instead make a request to the locally running instance of the service. It could rewrite these requests as it pleases.
(In future PRs, we'll introduce a system for doing the same with remote mode dev, as well as mixed mode. )
Related to https://github.com/cloudflare/workers-sdk/issues/1182 Fixes https://github.com/cloudflare/workers-sdk/issues/1040
- Running
-
#1551
1b54b54fThanks @threepointone! - internal: middleware for modifying worker behaviourThis adds an internal mechanism for applying multiple "middleware"/facades on to workers. This lets us add functionality during dev and/or publish, where we can modify requests or env, or other ideas. (See https://github.com/cloudflare/workers-sdk/issues/1466 for actual usecases)
As part of this, I implemented a simple facade that formats errors in dev. To enable it you need to set an environment variable
FORMAT_WRANGLER_ERRORS=true. This isn't a new feature we're shipping with wrangler, it's simply to demonstrate how to write middleware. We'll probably remove it in the future.
- #1486
c4e6f156Thanks @JacobMGEvans! - feat: commands added for uploading and downloading objects from r2.
-
#1539
95d0f863Thanks @threepointone! - fix: export durable objects correctly when using--assetsThe facade for static assets doesn't export any exports from the entry point, meaning Durable Objects will fail. This fix adds all exports to the facade's exports.
- #1564
69713c5cThanks @JacobMGEvans! - chore: updated wrangler readme providing additional context on configuration, deep link toinitand fixing old link to beta docs.
-
#1581
3da184f1Thanks @threepointone! - fix: apply multiworker dev facade only when requiredThis fix makes sure the multiworker dev facade is applied to the input worker only where there are other wrangler dev instances running that are bound to the input worker. We also make sure we don't apply it when we already have a binding (like in remote mode).
-
#1576
f696ebb5Thanks @petebacondarwin! - feat: add metricsEnabled header to CF API calls when developing or deploying a workerThis allows us to estimate from API requests what proportion of Wrangler instances have enabled usage tracking, without breaking the agreement not to send data for those who have not opted in.
-
#1525
a692ace3Thanks @threepointone! - feat:config.first_party_worker+ dev facadeThis introduces configuration for marking a worker as a "first party" worker, to be used inside cloudflare to develop workers. It also adds a facade that's applied for first party workers in dev.
-
#1545
b3424e43Thanks @Martin-Eriksson! - fix: Throw error if bothdirectoryandcommandis specified forpages devThe previous behavior was to silently ignore the
commandargument.
-
#1574
c61006caThanks @jahands! - fix: Retry check-missing call to make wrangler pages publish more reliableBefore uploading files in wrangler pages publish, we make a network call to check what files need to be uploaded. This call could sometimes fail, causing the publish to fail. This change will retry that network call.
-
#1565
2b5a2e9aThanks @threepointone! - fix: export durable object bindings when using service bindings in devA similar fix to https://github.com/cloudflare/workers-sdk/pull/1539, this exports correctly when using service bindings in dev.
-
#1510
4dadc414Thanks @matthewdavidrodgers! - refactor: touch up publishing to custom domainsCouple things cleaned up here:
Originally the usage of the /domains api (for publishing to custom domains) was a bit clumsy: we would attempt to optimistically publish, but the api would eagerly fail with specific error codes on why it occurred. This made for some weird control flow for retries with override flags, as well as fragile extraction of error messages.
Now we use the new /domains/changeset api to generate a changeset of actions required to get to a new state of custom domains, which informs us up front of which domains would need to be updated and overridden, and we can pass flags as needed. I do make an extra hop back to the api to lookup what the custom domains requiring updates are already attached to, but given how helpful I imagine that to be, I'm for it.
I also updated the api used for publishing the domains, from /domains to /domains/records. The latter was added to allow us to add flexibility for things like the /domains/changeset resource, and thus the former is being deprecated
- #1576
f696ebb5Thanks @petebacondarwin! - feat: send whether a Worker is using TypeScript or not in usage events
-
#1535
eee7333bThanks @cameron-robey! - feat: source maps support inwrangler devremote modePreviously stack traces from runtime errors in
wrangler devremote mode, would give unhelpful stack traces from the bundled build that was sent to the server. Here, we use source maps generated as part of bundling to provide better stack traces for errors, referencing the unbundled files.Resolves https://github.com/cloudflare/workers-sdk/issues/1509
2.0.23
Patch Changes
-
#1500
0826f833Thanks @cameron-robey! - fix: warn when using--no-bundlewith--minifyor--node-compat
-
#1523
e1e2ee5cThanks @threepointone! - fix: don't log version spam in testsCurrently in tests, we see a bunch of logspam from yargs about "version" being a reserved word, this patch removes that spam.
-
#1498
fe3fbd95Thanks @cameron-robey! - feat: change version command to give update information When running version command, we want to display update information if current version is not up to date. Achieved by replacing default output with the wrangler banner. Previous behaviour (just outputting current version) reamins when !isTTY. Version command changed from inbuilt .version() from yargs, to a regular command to allow for asynchronous behaviour.Implements https://github.com/cloudflare/workers-sdk/issues/1492
-
#1431
a2e3a6b7Thanks @Skye-31! - chore: Refactorwrangler pages devto use Wrangler-proper's own dev server.This:
- fixes some bugs (e.g. not proxying WebSockets correctly),
- presents a much nicer UI (with the slick keybinding controls),
- adds features that
pages devwas missing (e.g.--local-protocol), - and reduces the maintenance burden of
wrangler pages devgoing forward.
-
#1528
60bdc31aThanks @threepointone! - fix: prevent local mode restartIn dev, we inject a patch for
fetch()to detect bad usages. This patch is copied into the destination directory before it's used. esbuild appears to have a bug where it thinks a dependency has changed so it restarts once in local mode. The fix here is to copy the file to inject into a separate temporary dir.
-
#1502
be4ffde5Thanks @threepointone! - polish: recommend using an account id when user details aren't available.When using an api token, sometimes the call to get a user's membership details fails with a 9109 error. In this scenario, a workaround to skip the membership check is to provide an account_id in wrangler.toml or via CLOUDFLARE_ACCOUNT_ID. This bit of polish adds this helpful tip into the error message.
- #1499
7098b1eeThanks @cameron-robey! - fix: no feedback onwrangler kv:namespace delete
-
#1479
862f14e5Thanks @threepointone! - fix: readprocess.env.NODE_ENVcorrectly when building workerWe replace
process.env.NODE_ENVin workers with the value of the environment variable. However, we have a bug where when we make an actual build of wrangler (which has NODE_ENV set as "production"), we were also replacing the expression where we'd replace it in a worker. The result was that all workers would haveprocess.env.NODE_ENVset to production, no matter what the user had set. The fix here is to use a "dynamic" value for the expression so that our build system doesn't replace it.
- #1471
0953af8eThanks @JacobMGEvans! - ci: implement CodeCov Integration CodeCov is used for analyzing code and tests to improve stability and maintainability. It does this by utilizing static code analysis and testing output to provide insights into things that need improving, security concerns, missing test coverage of critical code, and more, which can be missed even after exhaustive human review.
-
#1516
e178d6fbThanks @threepointone! - polish: don't log an error message if wrangler dev startup is interrupted.When we quit wrangler dev, any inflight requests are cancelled. Any error handlers for those requests are ignored if the request was cancelled purposely. The check for this was missing for the prewarm request for a dev session, and this patch adds it so it dorsn't get logged to the terminal.
-
#1496
8eb91142Thanks @threepointone! - fix: addfetch()dev helper correctly for pnp style package managersIn https://github.com/cloudflare/workers-sdk/pull/992, we added a dev-only helper that would warn when using
fetch()in a manner that wouldn't work as expected (because of a bug we currently have in the runtime). We did this by injecting a file that would override usages offetch(). When using pnp style package managers like yarn, this file can't be resolved correctly. So to fix that, we extract it into the temporary destination directory that we use to build the worker (much like a similar fix we did in https://github.com/cloudflare/workers-sdk/pull/1154)Reported at https://github.com/cloudflare/workers-sdk/issues/1320#issuecomment-1188804668
-
#1529
1a0ac8d0Thanks @GregBrimble! - feat: Adds the--experimental-enable-local-persistenceoption towrangler pages devPreviously, this was implicitly enabled and stored things in a
.mfdirectory. Now we move to be in line with whatwrangler devdoes, defaults disabled, and stores in awrangler-local-statedirectory.
-
#1514
9271680dThanks @threepointone! - feat: addconfig.inspector_portThis adds a configuration option for the inspector port used by the debugger in
wrangler dev. This also includes a bug fix where we weren't passing on this configuration to local mode.
2.0.22
Patch Changes
-
#1482
9eb28ecThanks @petebacondarwin! - fix: do not ask the user for metrics permission if running in a CI
-
#1482
9eb28ecThanks @petebacondarwin! - feat: support controlling metrics gathering viaWRANGLER_SEND_METRICSenvironment variableSetting the
WRANGLER_SEND_METRICSenvironment variable will override any other metrics controls, such as thesend_metricsproperty in wrangler.toml and cached user preference.
2.0.21
Patch Changes
-
#1474
f602df7Thanks @threepointone! - fix: enable debugger in local modeDuring a refactor, we missed enabling the inspector by default in local mode. We also broke the logic that detects the inspector url exposed by the local server. This patch passes the argument correctly, fixes the detection logic. Further, it also lets you disable the inspector altogether with
--inspect false, if required (for both remote and local mode).
-
#1470
01f49f1Thanks @petebacondarwin! - fix: ensure that metrics user interactions do not break other UIThe new metrics usage capture may interact with the user if they have not yet set their metrics permission. Sending metrics was being done concurrently with other commands, so there was a chance that the metrics UI broke the other command's UI. Now we ensure that metrics UI will happen synchronously.
2.0.20
Patch Changes
-
#1464
0059d84Thanks @petebacondarwin! - ci: ensure that the SPARROW_SOURCE_KEY is included in release buildsPreviously, we were including the key in the "build" step of the release job. But this is only there to check that the build doesn't fail. The build is re-run inside the publish step, which is part of the "changeset" step. Now, we include the key in the "changeset" step to ensure it is there in the build that is published.
2.0.19
Patch Changes
-
#1410
52fb634Thanks @petebacondarwin! - feat: add opt-in usage metrics gatheringThis change adds support in Wrangler for sending usage metrics to Cloudflare. This is an opt-in only feature. We will ask the user for permission only once per device. The user must grant permission, on a per device basis, before we send usage metrics to Cloudflare. The permission can also be overridden on a per project basis by setting
send_metrics = falsein thewrangler.toml. If Wrangler is running in non-interactive mode (such as in a CI job) and the user has not already given permission we will assume that we cannot send usage metrics.The aim of this feature is to help us learn what and how features of Wrangler (and also the Cloudflare dashboard) are being used in order to improve the developer experience.
-
#1463
a7ae733Thanks @threepointone! - fix: ensure that a helpful error message is shown when on unsupported versions of node.jsOur entrypoint for wrangler (
bin/wrangler.js) needs to run in older versions of node and log a message to the user that they need to upgrade their version of node. Sometimes we use syntax in this entrypoint that doesn't run in older versions of node. crashing the script and failing to log the message. This fix adds a test in CI to make sure we don't regress on that behaviour (as well as fixing the current newer syntax usage)
-
#1459
4e425c6Thanks @sidharthachatterjee! - fix:wrangler pages publishnow more reliably retries an upload in case of a failureWhen
wrangler pages publishis run, we make calls to an upload endpoint which could be rate limited and therefore fail. We currently retry those calls after a linear backoff. This change makes that backoff exponential which should reduce the likelihood of subsequent calls being rate limited.
2.0.18
Patch Changes
- #1451
62649097Thanks @WalshyDev! - Fixed an issue where Pages upload would OOM. This was caused by us loading all the file content into memory instead of only when required.
-
#1375
e9e98721Thanks @JacobMGEvans! - polish: Compliance with the XDG Base Directory Specification Wrangler was creating a config file in the home directory of the operating system~/.wrangler. The XDG path spec is a standard for storing files, these changes include XDG pathing compliance for.wrangler/*location and backwards compatibility with previous~/.wranglerlocations.resolves #1053
- #1449
ee6c421bThanks @alankemp! - Output additional information about uploaded scripts at WRANGLER_LOG=log level
2.0.17
Patch Changes
-
#1389
eab9542Thanks @caass! - Remove delegation message when global wrangler delegates to a local installationA message used for debugging purposes was accidentally left in, and confused some folks. Now it'll only appear when
WRANGLER_LOGis set todebug.
-
#1447
16f9436Thanks @threepointone! - feat: r2 support inwrangler dev --localThis adds support for r2 bindings in
wrangler dev --local, powered by miniflare@2.6.0 via https://github.com/cloudflare/miniflare/pull/289.
-
#1406
0f35556Thanks @rozenmd! - fix: use fork to let wrangler know miniflare is readyThis PR replaces our use of
spawnin favour offorkto spawn miniflare in wrangler's dev function. This lets miniflare let wrangler know when we're ready to send requests.Closes #1408
-
#999
238b546Thanks @caass! - Include devtools in wrangler monorepoPreviously, wrangler relied on @threepointone's built-devtools. Now, these devtools are included in the wrangler repository.
-
#1424
8cf0008Thanks @caass! - fix: Checkconfig.assetswhen deciding whether to include a default entry point.An entry point isn't mandatory when using
--assets, and we can use a default worker when doing so. This fix enables that same behaviour whenconfig.assetsis configured.
-
#1448
0d462c0Thanks @threepointone! - polish: setcheckjs: falseandjsx: "react"in newly created projectsWhen we create a new project, it's annoying having to set jsx: "react" when that's the overwhelmingly default choice, our compiler is setup to do it automatically, and the tsc error message isn't helpful. So we set
jsx: "react"in the generated tsconfig.Setting
checkJs: trueis also annoying because it's not a common choice. So we setcheckJs: falsein the generated tsconfig.
-
#1450
172310dThanks @threepointone! - polish: tweak static assets facade to log only real errorsThis prevents the abundance of NotFoundErrors being unnecessaryily logged.
-
#1415
f3a8452Thanks @caass! - Emit type declarations for wranglerThis is a first go-round of emitting type declarations alongside the bundled JS output, which should make it easier to use wrangler as a library.
-
#1433
1c1214fThanks @threepointone! - polish: adds an actionable message when a worker name isn't provided to tail/secretJust a better error message when a Worker name isn't available for
wrangler secretorwrangler tail.Closes https://github.com/cloudflare/workers-sdk/issues/1380
-
#1427
3fa5041Thanks @caass! - Checknpm_config_user_agentto guess a user's package managerThe environment variable
npm_config_user_agentcan be used to guess the package manager that was used to execute wrangler. It's imperfect (just like regular user agent sniffing!) but the package managers we support all set this property:
2.0.16
Patch Changes
-
#992
ee6b413Thanks @petebacondarwin! - fix: add warning tofetch()calls that will change the requested portIn Workers published to the Edge (rather than previews) there is a bug where a custom port on a downstream fetch request is ignored, defaulting to the standard port. For example,
https://my.example.com:668will actually send the request tohttps://my.example.com:443.This does not happen when using
wrangler dev(both in remote and local mode), but to ensure that developers are aware of it this change displays a runtime warning in the console when the bug is hit.Closes #1320
-
#1378
2579257Thanks @rozenmd! - chore: fully deprecate thepreviewcommandBefore, we would warn folks that
previewwas deprecated in favour ofdev, but then randevon their behalf. To avoid maintaining effectively two versions of thedevcommand, we're now just telling folks to rundev.
-
#1213
1bab3f6Thanks @threepointone! - fix: passroutestodevsessionWe can pass routes when creating a
devsession. The effect of this is when you visit a path that doesn't match the given routes, then it instead does a fetch from the deployed worker on that path (if any). We were previously passing*/*, i.e, matching all routes in dev; this fix now passes configured routes instead.
-
#1374
215c4f0Thanks @threepointone! - feat: commands to manage worker namespacesThis adds commands to create, delete, list, and get info for "worker namespaces" (name to be bikeshed-ed). This is based on work by @aaronlisman in https://github.com/cloudflare/workers-sdk/pull/1310.
-
#1403
9c6c3fbThanks @threepointone! - feat:config.no_bundleas a configuration option to prevent bundlingAs a configuration parallel to
--no-bundle(introduced in https://github.com/cloudflare/workers-sdk/pull/1300 as--no-build, renamed in https://github.com/cloudflare/workers-sdk/pull/1399 to--no-bundle), this introduces a configuration fieldno_bundleto prevent bundling of the worker before it's published. It's inheritable, which means it can be defined inside environments as well.
-
#1355
61c31a9Thanks @williamhorning! - fix: Fallback to non-interactive mode on errorIf the terminal isn't a TTY, fallback to non-interactive mode instead of throwing an error. This makes it so users of Bash on Windows can pipe to wrangler without an error being thrown.
resolves #1303
-
#1337
1d778aeThanks @JacobMGEvans! - polish: bundle reporter was not printing during publish errorsThe reporter is now called before the publish API call, printing every time.
resolves #1328
-
#1393
b36ef43Thanks @threepointone! - chore: enable node's experimental fetch flagWe'd previously had some funny behaviour with undici clashing with node's own fetch supporting classes, and had turned off node's fetch implementation. Recent updates to undici appear to have fixed the issue, so let's turn it back on.
-
#1335
49cf17eThanks @JacobMGEvans! - feat: resolve--assetscli arg relative to current working directoryBefore we were resolving the Asset directory relative to the location of
wrangler.tomlat all times. Now the--assetscli arg is resolved relative to current working directory.resolves #1333
-
#1350
dee034bThanks @rozenmd! - feat: export an (unstable) function that folks can use in their own scripts to invoke wrangler's dev CLICloses #1350
-
#1401
6732d95Thanks @threepointone! - fix: log pubsub beta usage warnings consistentlyThis fix makes sure the pubsub beta warnings are logged consistently, once per help menu, through the hierarchy of its command tree.
-
#1386
4112001Thanks @rozenmd! - feat: implement fetch for wrangler's unstable_dev API, and write our first integration test.Prior to this PR, users of
unstable_devhad to provide their own fetcher, and guess the address and port that the wrangler dev server was using.With this implementation, it's now possible to test wrangler, using just wrangler (and a test framework):
describe("worker", async () => { const worker = await wrangler.unstable_dev("src/index.ts"); const resp = await worker.fetch(); expect(resp).not.toBe(undefined); if (resp) { const text = await resp.text(); expect(text).toMatchInlineSnapshot(`"Hello World!"`); } worker.stop(); }Closes #1383 Closes #1384 Closes #1385
-
#1399
1ab71a7Thanks @threepointone! - fix: rename--no-buildto--no-bundleThis fix renames the
--no-buildcli arg to--no-bundle.no-buildwasn't a great name because it would imply that we don't run custom builds specified under[build]which isn't true. So we rename closer to what wrangler actually does, which is bundling the input. This also makes it clearer that it's a single file upload.
- #1278
8201733Thanks @Maximo-Guk! - Throw error if user attempts to use config with pages
-
#1398
ecfbb0cThanks @threepointone! - Added support for pubsub namespace (via @elithrar in https://github.com/cloudflare/workers-sdk/pull/1314)This adds support for managing pubsub namespaces and brokers (https://developers.cloudflare.com/pub-sub/)
-
#1348
eb948b0Thanks @threepointone! - polish: add an experimental warning if--assetsis usedWe already have a warning when
config.assetsis used, this adds it for the cli argument as well.
-
#1326
12f2703Thanks @timabb031! - fix: show console.error/console.warn logs when usingdev --local.Prior to this change, logging with console.error/console.warn in a Worker wouldn't output anything to the console when running in local mode. This was happening because stderr data event handler was being removed after the
Debugger listening...string was found.This change updates the stderr data event handler to forward on all events to
process.stderr.Closes #1324
-
#1309
e5a6acaThanks @petebacondarwin! - style: convert all source code indentation to tabsFixes #1298
-
#1395
88f2702Thanks @threepointone! - feat: cache account id selectionThis adds caching for account id fetch/selection for all wrangler commands.
Currently, if we have an api/oauth token, but haven't provided an account id, we fetch account information from cloudflare. If a user has just one account id, we automatically choose that. If there are more than one, then we show a dropdown and ask the user to pick one. This is convenient, and lets the user not have to specify their account id when starting a project.
However, if does make startup slow, since it has to do that fetch every time. It's also annoying for folks with multiple account ids because they have to pick their account id every time.
So we now cache the account details into
node_modules/.cache/wrangler(much like pages already does with account id and project name).This patch also refactors
config-cache.ts; it only caches if there's anode_modulesfolder, and it looks for the closest node_modules folder (and not directly in cwd). I also added tests for when anode_modulesfolder isn't available. It also trims the message that we log to terminal.
-
#1391
ea7ee45Thanks @threepointone! - fix: create a single session during remote devPreviously, we would be creating a fresh session for every script change during remote dev. While this worked, it makes iterating slower, and unnecessarily discards state. This fix makes it so we create only a single session for remote dev, and reuses that session on every script change. This also means we can use a single script id for every worker in a session (when a name isn't already given). Further, we also make the prewarming call of the preview space be non-blocking.
-
#1365
b9f7200Thanks @threepointone! - fix: normaliseaccount_id = ''toaccount_id: undefinedIn older templates, (i.e made for Wrangler v1.x),
account_id =''is considered as a valid input, but then ignored. With Wrangler 2, when running wrangler dev, we log an error, but it fixes itself after we get an account id. Much like https://github.com/cloudflare/wrangler2/issues/1329, the fix here is to normalise that value when we see it, and replace it withundefinedwhile logging a warning.This fix also tweaks the messaging for a blank route value to suggest some user action.
- #1360
cd66b67Thanks @SirCremefresh! - Updated eslint to version 0.14.47
- #1363
b2c2c2bThanks @petebacondarwin! - fix: display email from process env in whoami and display better error when lacking permissions
-
#1300
dcffc93Thanks @threepointone! - feat:publish --no-buildThis adds a
--no-buildflag towrangler publish. We've had a bunch of people asking to be able to upload a worker directly, without any modifications. While there are tradeoffs to this approach (any linked modules etc won't work), we understand that people who need this functionality are aware of it (and the usecases that have presented themselves all seem to match this).
-
#1392
ff2e7cbThanks @threepointone! - fix: keep site upload batches under 98 mbThe maximum request size for a batch upload is 100 MB. We were previously calculating the upload key value to be under 100 MiB. Further, with a few bytes here and there, the size of the request can exceed 100 MiB. So this fix calculate using MB instead of MiB, but also brings down our own limit to 98 MB so there's some wiggle room for uploads.
-
#1377
a6f1ceeThanks @threepointone! - feat: bind a worker with[worker_namespaces]This feature les you bind a worker to a dynamic dispatch namespaces, which may have other workers bound inside it. (See https://blog.cloudflare.com/workers-for-platforms/). Inside your
wrangler.toml, you would add[[worker_namespaces]] binding = 'dispatcher' # available as env.dispatcher in your worker namespace = 'namespace-name' # the name of the namespace being boundBased on work by @aaronlisman in https://github.com/cloudflare/workers-sdk/pull/1310
-
#1297
40036e2Thanks @threepointone! - feat: implementconfig.defineThis implements
config.define. This lets the user define a map of keys to strings that will be substituted in the worker's source. This is particularly useful when combined with environments. A common usecase is for values that are sent along with metrics events; environment name, public keys, version numbers, etc. It's also sometimes a workaround for the usability of module env vars, which otherwise have to be threaded through request function stacks.
8d68226Thanks @threepointone! - feat: add support for pubsub commands (via @elithrar and @netcli in https://github.com/cloudflare/workers-sdk/pull/1314)
-
#1351
c770167Thanks @geelen! - feat: add support for CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL to authoriseThis adds support for using the CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL env vars for authorising a user. This also adds support for CF_API_KEY + CF_EMAIL from Wrangler v1, with a deprecation warning.
-
#1352
4e03036Thanks @JacobMGEvans! - bugfix: Allow route setting to be""Previously Wrangler v1 behavior had allowed forroute = "". To keep parity it will be possible to setroute = ""in the config file and represent not setting a route, while providing a warning.resolves #1329
4ad084eThanks @sbquinlan! - feature By @sbquinlan: Set "upstream" miniflare option when running dev in local mode
- #1274
5cc0772Thanks @Maximo-Guk! - Added .dev.vars support for pages
2.0.15
Patch Changes
-
#1272
f7d362eThanks @JacobMGEvans! - feat: print bundle size duringpublishanddevThis logs the complete bundle size of the Worker (as well as when compressed) during
publishanddev.Via https://github.com/cloudflare/workers-sdk/issues/405#issuecomment-1156762297)
-
#1287
2072e27Thanks @f5io! - fix: kv:key put/get binary fileAs raised in https://github.com/cloudflare/workers-sdk/issues/1254, it was discovered that binary uploads were being mangled by wrangler 2, whereas they worked in wrangler 1. This is because they were read into a string by providing an explicit encoding of
utf-8. This fix reads provided files into a nodeBufferthat is then passed directly to the request.Subsequently https://github.com/cloudflare/workers-sdk/issues/1273 was raised in relation to a similar issue with gets from wrangler 2. This was happening due to the downloaded file being converted to
utf-8encoding as it was pushed throughconsole.log. By leveragingprocess.stdout.writewe can push the fetchedArrayBufferto std out directly without inferring any specific encoding value.
- #1325
bcd066dThanks @sidharthachatterjee! - fix: Ensure Response is mutable in Pages functions
-
#1265
e322475Thanks @petebacondarwin! - fix: support all git versions forwrangler initIf
gitdoes not support the--initial-branchargument then just fallback to the default initial branch name.We tried to be more clever about this but there are two many weird corner cases with different git versions on different architectures. Now we do our best, with recent versions of git, to ensure that the branch is called
mainbut otherwise just make sure we don't crash.Fixes #1228
-
#1311
374655dThanks @JacobMGEvans! - feat: add--textflag to decodekv:key getresponse values as utf8 stringsPreviously, all kv values were being rendered directly as bytes to the stdout, which makes sense if the value is a binary blob that you are going to pipe into a file, but doesn't make sense if the value is a simple string.
resolves #1306
-
#1327
4880d54Thanks @JacobMGEvans! - feat: resolve--sitecli arg relative to current working directoryBefore we were resolving the Site directory relative to the location of
wrangler.tomlat all times. Now the--sitecli arg is resolved relative to current working directory.resolves #1243
-
#1270
7ed5e1aThanks @caass! - Delegate to a local install ofwranglerif one exists.Users will frequently install
wranglerglobally to run commands likewrangler init, but we also recommend pinning a specific version ofwranglerin a project'spackage.json. Now, when a user invokes a global install ofwrangler, we'll check to see if they also have a local installation. If they do, we'll delegate to that version.
-
#1289
0d6098cThanks @threepointone! - feat: entry point is not mandatory if--assetsis passedSince we use a facade worker with
--assets, an entry point is not strictly necessary. This makes a common usecase of "deploy a bunch of static assets" extremely easy to start, as a one linernpx wrangler dev --assets path/to/folder(and same withpublish).
-
#1293
ee57d77Thanks @petebacondarwin! - fix: do not crash inwrangler devif user has multiple accountsWhen a user has multiple accounts we show a prompt to allow the user to select which they should use. This was broken in
wrangler devas we were trying to start a new ink.js app (to show the prompt) from inside a running ink.js app (the UI forwrangler dev).This fix refactors the
ChooseAccountcomponent so that it can be used directly within another component.Fixes #1258
- #1299
0fd0c30Thanks @threepointone! - polish: include a copy-pastable message when trying to publish without a compatibility date
-
#1269
fea87cfThanks @petebacondarwin! - fix: do not consider ancestor files when initializing a project with a specified nameWhen initializing a new project (via
wrangler init) we attempt to reuse files in the current directory, or in an ancestor directory. In particular we look up the directory tree for package.json and tsconfig.json and use those instead of creating new ones.Now we only do this if you do not specify a name for the new Worker. If you do specify a name, we now only consider files in the directory where the Worker will be initialized.
Fixes #859
-
#1321
8e2b92fThanks @GregBrimble! - fix: Correctly resolve directories for 'wrangler pages publish'Previously, attempting to publish a nested directory or the current directory would result in parsing mangled paths which broke deployments. This has now been fixed.
-
#1293
ee57d77Thanks @petebacondarwin! - fix: do not hang waiting for account choice when in non-interactive modeThe previous tests for non-interactive only checked the stdin.isTTY, but you can have scenarios where the stdin is interactive but the stdout is not. For example when writing the output of a
kv:key getcommand to a file.We now check that both stdin and stdout are interactive before trying to interact with the user.
-
#1294
f6836b0Thanks @threepointone! - fix: serve--assetsin dev + local modeA quick bugfix to make sure --assets/config.assets gets served correctly in
dev --local.
-
#1237
e1b8ac4Thanks @threepointone! - feat:--assets/config.assetsto serve a folder of static assetsThis adds support for defining
assetsinwrangler.toml. You can configure it with a string path, or a{bucket, include, exclude}object (much like[site]). This also renames the--experimental-publicarg as--assets.
2.0.14
Patch Changes
-
a4ba42aThanks @threepointone! - Revert "Take 2 at moving .npmrc to the root of the repository (#1281)" -
#1267
c667398Thanks @rozenmd! - fix: let folks know the URL we're opening during loginCloses #1259
- #1260
d8ee04fThanks @threepointone! - fix: pass env and ctx to request handler when using--experimental-public
1b068c9Thanks @threepointone! - Revert "fix: kv:key put upload binary files fix (#1255)"
2.0.12
Patch Changes
-
#1229
e273e09Thanks @timabb031! - fix: parsing of node inspector urlThis fixes the parsing of the url returned by Node Inspector via stderr which could be received partially in multiple chunks or in a single chunk.
Closes #1226
-
#1255
2d806dcThanks @f5io! - fix: kv:key put binary file uploadAs raised in https://github.com/cloudflare/workers-sdk/issues/1254, it was discovered that binary uploads were being mangled by Wrangler v2, whereas they worked in Wrangler v1. This is because they were read into a string by providing an explicit encoding of
utf-8. This fix reads provided files into a nodeBufferthat is then passed directly to the request.
-
#1248
db8a0bbThanks @threepointone! - fix: instruct api to exclude script content on worker uploadWhen we upload a script bundle, we get the actual content of the script back in the response. Sometimes that script can be large (depending on whether the upload was large), and currently it may even be a badly escaped string. We can pass a queryparam
excludeScriptthat, as it implies, exclude the script content in the response. This fix does that.
-
#1253
eee5c78Thanks @threepointone! - fix: resolve asset handler for--experimental-pathIn https://github.com/cloudflare/workers-sdk/pull/1241, we removed the vendored version of
@cloudflare/kv-asset-handler, as well as the build configuration that would point to the vendored version when compiling a worker using--experimental-public. However, wrangler can be used where it's not installed in thepackage.jsonfor the worker, or even when there's no package.json at all (like when wrangler is installed globally, or used withnpx). In this situation, if the user doesn't have@cloudflare/kv-asset-handlerinstalled, then building the worker will fail. We don't want to make the user install this themselves, so instead we point to a barrel import for the library in the facade for the worker.
-
#1234
3e94bc6Thanks @threepointone! - feat: support--experimental-publicin local mode--experimental-publicis an abstraction over Workers Sites, and we can leverage miniflare's inbuilt support for Sites to serve assets in local mode.
-
#1236
891d128Thanks @threepointone! - fix: generate site assets manifest relative tosite.bucketWe had a bug where we were generating asset manifest keys incorrectly if we ran wrangler from a different path to
wrangler.toml. This fixes the generation of said keys, and adds a test for it.Fixes #1235
-
#1216
4eb70f9Thanks @JacobMGEvans! - feat: reload server on configuration changes, the values passed into the server during restart will bebindingsresolves #439
-
#1231
5206c24Thanks @threepointone! - feat:build.watch_dircan be an array of pathsIn projects where:
- all the source code isn't in one folder (like a monorepo, or even where the worker has non-standard imports across folders),
- we use a custom build, so it's hard to statically determine folders to watch for changes
...we'd like to be able to specify multiple paths for custom builds, (the config
build.watch_dirconfig). This patch enables such behaviour. It now accepts a single path as before, or optionally an array of strings/paths.
-
#1241
471cfefThanks @threepointone! - use@cloudflare/kv-asset-handlerfor--experimental-publicWe'd previously vendored in
@cloudflare/kv-asset-handlerandmimefor--experimental-public. We've since updated@cloudflare/kv-asset-handlerto support module workers correctly, and don't need the vendored versions anymore. This patch uses the lib as a dependency, and deletes thevendorfolder.
2.0.11
Patch Changes
-
#1239
df55709Thanks @threepointone! - polish: don't include folder name in Sites kv asset keysAs reported in https://github.com/cloudflare/workers-sdk/issues/1189, we're including the name of the folder in the keys of the KV store that stores the assets. This doesn't match v1 behaviour. It makes sense not to include these since, we should be able to move around the folder and not have to reupload the entire folder again.
-
#1210
785d418Thanks @GregBrimble! - feat: Upload the delta forwrangler pages publishWe now keep track of the files that make up each deployment and intelligently only upload the files that we haven't seen. This means that similar subsequent deployments should only need to upload a minority of files and this will hopefully make uploads even faster.
-
#1195
66a85caThanks @threepointone! - fix: batch sites uploads in groups under 100mbThere's an upper limit on the size of an upload to the bulk kv put api (as specified in https://api.cloudflare.com/#workers-kv-namespace-write-multiple-key-value-pairs). This patch batches sites uploads staying under the 100mb limit.
-
#1218
f8a21edThanks @threepointone! - fix: warn on unexpected fields onconfig.triggersThis adds a warning when we find unexpected fields on the
triggersconfig (and any future fields that use theisObjectWith()validation helper)
2.0.9
Patch Changes
-
#1192
bafa5acThanks @threepointone! - fix: use worker name as a script ID when generating a preview sessionWhen generating a preview session on the edge with
wrangler dev, for a zoned worker we were using a random id as the script ID. This would make the backend not associate the dev session with any resources that were otherwise assigned to the script (specifically for secrets, but other stuff as well) The fix is simply to use the worker name (when available) as the script ID.Fixes https://github.com/cloudflare/workers-sdk/issues/1003 Fixes https://github.com/cloudflare/workers-sdk/issues/1172
-
#1212
101342eThanks @petebacondarwin! - fix: do not crash when not logged in and switching to remote dev modePreviously, if you are not logged in when running
wrangler devit will only try to log you in if you start in "remote" mode. In "local" mode there is no need to be logged in, so it doesn't bother to try to login, and then will crash if you switch to "remote" mode interactively.The problem was that we were only attempting to login once before creating the
<Remote>component. Now this logic has been moved into auseEffect()inside<Remote>so that it will be run whether starting in "remote" or transitioning to "remote" from "local".The fact that the check is no longer done before creating the components is proven by removing the
mockAccountId()andmockApiToken()calls from thedev.test.tsfiles.Fixes #18
-
#1188
b44cc26Thanks @petebacondarwin! - fix: fallback on old zone-based API when account-based route API failsWhile we wait for changes to the CF API to support API tokens that do not have "All Zone" permissions, this change provides a workaround for most scenarios.
If the bulk-route request fails with an authorization error, then we fallback to the Wrangler v1 approach, which sends individual route updates via a zone-based endpoint.
Fixes #651
- #1199
e64812eThanks @sidharthachatterjee! - fix: Refresh JWT in wrangler pages publish when it expires
-
#1209
2d42882Thanks @petebacondarwin! - fix: ensure wrangler init works with older versions of gitRather than using the recently added
--initial-branchoption, we now just renamed the initial branch usinggit branch -m main.
2.0.8
Patch Changes
-
#1184
4a10176Thanks @timabb031! - polish: add cron trigger to wrangler.toml when new Scheduled Worker is createdWhen
wrangler initis used to create a new Scheduled Worker a cron trigger (1 * * * *) will be added to wrangler.toml, but only if wrangler.toml is being created during init. If wrangler.toml exists prior to runningwrangler initthen wrangler.toml will remain unchanged even if the user selects the "Scheduled Handler" option. This is as per existing tests in init.test.ts that ensure wrangler.toml is never overwritten after agreeing to prompts. That can change if it needs to.
-
#1163
52c0bf0Thanks @threepointone! - fix: only log available bindings once indevBecause we were calling
printBindingsduring the render phase of<Dev/>, we were logging the bindings multiple times (render can be called multiple times, and the interaction of Ink's stdout output intermingled with console is a bit weird). We could have put it into an effect, but I think a better solution here is to simply log it before we even start rendering<Dev/>(so we could see the bindings even if Dev fails to load, for example).This also adds a fix that masks any overriden values so that we don't accidentally log potential secrets into the terminal.
-
#1153
40f20b2Thanks @petebacondarwin! - fix:minifyandnode_compatshould be inheritedFixes #1150
- #1157
ea8f8d7Thanks @sidharthachatterjee! - fix: Ignore .git when publishing a Pages project
-
#1171
de4e3c2Thanks @petebacondarwin! - fix: link to the issue chooser in GitHubPreviously, when an error occurs, wrangler says:
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new.
Now, it links through to the issue template chooser which is more helpful.
Fixes #1169
-
#1154
5d6de58Thanks @threepointone! - fix: extract Cloudflare_CA.pem to temp dir before using itWith package managers like yarn, the cloudflare cert won't be available on the filesystem as expected (since the module is inside a .zip file). This fix instead extracts the file out of the module, copies it to a temporary directory, and directs node to use that as the cert instead, preventing warnings like https://github.com/cloudflare/workers-sdk/issues/1136.
-
#1166
08e3a49Thanks @threepointone! - fix: warn on unexpected fields on migrationsThis adds a warning for unexpected fields on
[migrations]config, reported in https://github.com/cloudflare/workers-sdk/issues/1165. It also adds a test for incorrectrenamed_classesin a migration.
- #1006
ee0c380Thanks @danbulant! - feat: add pnpm support
6187f36Thanks @petebacondarwin! - fix: backslash on manifest keys in windows
- #1158
e452a35Thanks @sidharthachatterjee! - fix: Skip cfFetch if there are no functions during pages dev
-
#1122
c2d2f44Thanks @petebacondarwin! - fix: display chained errors from the CF APIFor example if you have an invalid CF_API_TOKEN and try running
wrangler whoamiyou now get the additional6111error information:✘ [ERROR] A request to the Cloudflare API (/user) failed. Invalid request headers [code: 6003] - Invalid format for Authorization header [code: 6111]
- #1161
cec0657Thanks @petebacondarwin! - refactor: add User-Agent to all CF API requests
-
#1152
b817136Thanks @threepointone! - polish: Give a copy-paste config when[migrations]are missingThis gives a slightly better message when migrations are missing for declared durable objcts. Specifically, it gives a copy-pastable section to add to wrangler.toml, and doesn't show the warning at all for invalid class names anymore.
Partially makes https://github.com/cloudflare/workers-sdk/issues/1076 better.
-
#1141
a8c509aThanks @rozenmd! - fix: rename "publish" package.json script to "deploy"Renaming the default "publish" package.json script to "deploy" to avoid confusion with npm's publish command.
Closes #1121
-
#1175
e978986Thanks @timabb031! - feature: allow user to select a handler template withwrangler initThis allows the user to choose which template they'd like to use when they are prompted to create a new worker. The options are currently "None"/"Fetch Handler"/"Scheduled Handler". Support for new handler types such as
emailcan be added easily in future.
- #1122
c2d2f44Thanks @petebacondarwin! - fix: improve error message when CF API responds with an error
2.0.7
Patch Changes
- #1110
515a52fThanks @rozenmd! - fix: print instructions even if installPackages fails to fetch npm packages
-
#1051
7e2e97bThanks @rozenmd! - feat: add support for using wrangler behind a proxyConfigures the undici library (the library wrangler uses for
fetch) to send all requests via a proxy selected from the first non-empty environment variable from "https_proxy", "HTTPS_PROXY", "http_proxy" and "HTTP_PROXY".
-
#1089
de59ee7Thanks @rozenmd! - fix: batch package manager installs so folks only have to wait onceWhen running
wrangler init, we install packages as folks confirm their options. This disrupts the "flow", particularly on slower internet connections.To avoid this disruption, we now only install packages once we're done asking questions.
Closes #1036
-
#1073
6bb2564Thanks @caass! - Add a better message when a user doesn't have a Chromium-based browser.Certain functionality we use in wrangler depends on a Chromium-based browser. Previously, we would throw a somewhat arcane error that was hard (or impossible) to understand without knowing what we needed. While ideally all of our functionality would work across all major browsers, as a stopgap measure we can at least inform the user what the actual issue is.
Additionally, add support for Brave as a Chromium-based browser.
-
#1079
fb0dec4Thanks @caass! - Print the bindings a worker has access to duringdevandpublishIt can be helpful for a user to know exactly what resources a worker will have access to and where they can access them, so we now log the bindings available to a worker during
wrangler devandwrangler publish.
-
#1097
c73a3c4Thanks @petebacondarwin! - fix: ensure all line endings are normalized before parsing as TOMLOnly the last line-ending was being normalized not all of them.
-
#1111
1eaefebThanks @JacobMGEvans! - Git defaultmainbranchpolish: Default branch when choosing to initialize a git repository will now be
main. This is inline with current common industry ethical practices. See:
-
#1058
1a59efeThanks @threepointone! - refactor: detect missing[migrations]during config validationThis does a small refactor -
- During publish, we were checking whether
[migrations]were defined in the presence of[durable_objects], and warning if not. This moves it into the config validation step, which means it'll check for all commands (but notablydev) - It moves the code to determine current migration tag/migrations to upload into a helper. We'll be reusing this soon when we upload migrations to
dev.
- During publish, we were checking whether
-
#1090
85fbfe8Thanks @petebacondarwin! - refactor: remove use ofanyThis "quick-win" refactors some of the code to avoid the use of
anywhere possible. Usinganycan cause type-checking to be disabled across the code in unexpectedly wide-impact ways.There is one other use of
anynot touched here because it is fixed by #1088 separately.
-
#1088
d63d790Thanks @petebacondarwin! - fix: ensure that the proxy server shuts down to preventwrangler devfrom hangingWhen running
wrangler devwe create a proxy to the actual remote Worker. After creating a connection to this proxy by a browser request the proxy did not shutdown. Now we use aHttpTerminatorhelper library to force the proxy to close open connections and shutdown correctly.Fixes #958
-
#1099
175737fThanks @petebacondarwin! - fix: delegatewrangler buildtowrangler publishSince
wrangler publish --dry-run --outdir=distis basically the same result as what Wrangler v1 did withwrangler buildlet's run that for the user if they try to runwrangler build.
- #1081
8070763Thanks @rozenmd! - fix: friendlier error for when a subdomain hasn't been configured in dev mode
- #1123
15e5c12Thanks @timabb031! - chore: updated new worker ts template with env/ctx parameters and added Env interface
-
#1080
4a09c1bThanks @caass! - Improve messaging when bulk deleting or uploading KV PairsCloses #555
-
#1000
5a8e8d5Thanks @JacobMGEvans! -pages dev <dir>&wrangler pages functions buildwill have a--node-compatflag powered by @esbuild-plugins/node-globals-polyfill (which in itself is powered by rollup-plugin-node-polyfills). The only difference inpageswill be it does not check thewrangler.tomlso thenode_compat = truewill not enable it forwrangler pagesfunctionality.resolves #890
-
#1028
b7a9ce6Thanks @GregBrimble! - feat: Use new bulk upload API for 'wrangler pages publish'This raises the file limit back up to 20k for a deployment.
2.0.6
Patch Changes
-
#1018
cd2c42fThanks @threepointone! - fix: strip leading*/*.from routes when deducing a host fordevWhen given routes, we use the host name from the route to deduce a zone id to pass along with the host to set with dev
session. Route patterns can include leading*/*., which we don't account for when deducing said zone id, resulting in subtle errors for the session. This fix strips those leading characters as appropriate.
-
#1044
7a191a2Thanks @JacobMGEvans! - fix: trim trailing whitespace from the secrets before uploadingresolves #993
-
#1052
233eef2Thanks @petebacondarwin! - fix: display the correct help information when a subcommand is invalidPreviously, when an invalid subcommand was used, such as
wrangler r2 foo, the help that was displayed showed the top-level commands prefixed by the command in used. E.g.wrangler r2 init [name] 📥 Create a wrangler.toml configuration file wrangler r2 dev [script] 👂 Start a local server for developing your worker wrangler r2 publish [script] 🆙 Publish your Worker to Cloudflare. ...Now the correct command help is displayed:
$ wrangler r2 foo ✘ [ERROR] Unknown argument: foo
wrangler r2
📦 Interact with an R2 store
Commands: wrangler r2 bucket Manage R2 buckets
Flags: -c, --config Path to .toml configuration file [string] -h, --help Show help [boolean] -v, --version Show version number [boolean]
Fixes #871
* [#906](https://github.com/cloudflare/workers-sdk/pull/906) [`3279f10`](https://github.com/cloudflare/workers-sdk/commit/3279f103fb3b1c27addb4c69c30ad970ab0d5f77) Thanks [@threepointone](https://github.com/threepointone)! - feat: implement support for service bindings
This adds experimental support for service bindings, aka worker-to-worker bindings. It's lets you "call" a worker from another worker, without incurring any network cost, and (ideally) with much less latency. To use it, define a `[services]` field in `wrangler.toml`, which is a map of bindings to worker names (and environment). Let's say you already have a worker named "my-worker" deployed. In another worker's configuration, you can create a service binding to it like so:
```toml
[[services]]
binding = "MYWORKER"
service = "my-worker"
environment = "production" # optional, defaults to the worker's `default_environment` for now
And in your worker, you can call it like so:
export default {
fetch(req, env, ctx) {
return env.MYWORKER.fetch(new Request("http://domain/some-path"));
},
};
Fixes https://github.com/cloudflare/workers-sdk/issues/1026
-
#1045
8eeef9aThanks @jrf0110! - fix: Incorrect extension extraction from file paths.Our extension extraction logic was taking into account folder names, which can include periods. The logic would incorrectly identify a file path of .well-known/foo as having the extension of well-known/foo when in reality it should be an empty string.
-
#1039
95852c3Thanks @threepointone! - fix: don't fetch migrations when in--dry-runmode
-
#1033
ffce3e3Thanks @petebacondarwin! - fix:wrangler initshould not crash if Git is not available on WindowsWe check for the presence of Git by trying to run
git --version. On non-Windows we get an Error withcodeset to "ENOENT". One Windows we get a different error:{ "shortMessage":"Command failed with exit code 1: git --version", "command":"git --version", "escapedCommand":"git --version", "exitCode":1, "stdout":"", "stderr":"'git' is not recognized as an internal or external command,\r\noperable program or batch file.", "failed":true, "timedOut":false, "isCanceled":false, "killed":false }Since we don't really care what the error is, now we just assume that Git is not available if an error is thrown.
Fixes #1022
-
#982
6791703Thanks @matthewdavidrodgers! - feature: add support for publishing to Custom DomainsWith the release of Custom Domains for workers, users can publish directly to a custom domain on a route, rather than creating a dummy DNS record first and manually pointing the worker over - this adds the same support to wrangler.
Users declare routes as normal, but to indicate that a route should be treated as a custom domain, a user simply uses the object format in the toml file, but with a new key: custom_domain (i.e.
routes = [{ pattern = "api.example.com", custom_domain = true }])When wrangler sees a route like this, it peels them off from the rest of the routes and publishes them separately, using the /domains api. This api is very defensive, erroring eagerly if there are conflicts in existing Custom Domains or managed DNS records. In the case of conflicts, wrangler prompts for confirmation, and then retries with parameters to indicate overriding is allowed.
-
#1019
5816ebaThanks @threepointone! - feat: bind a durable object by environmentFor durable objects, instead of just
{ name, class_name, script_name}, this lets you bind by environment as well, like so{ name, class_name, script_name, environment }.
-
#1057
608dcd9Thanks @petebacondarwin! - fix: pages "command" can consist of multiple wordsOn Windows, the following command
wrangler pages dev -- foo barwould error saying thatbarwas not a known argument. This is becausefooandbarare passed to Yargs as separate arguments.A workaround is to put the command in quotes:
wrangler pages dev -- "foo bar". But this fix makes thecommandargument variadic, which also solves the problem.Fixes #965
- #1027
3545e41Thanks @rozenmd! - feat: trying to use node builtins should recommend you enable node_compat in wrangler.toml
-
#1024
110f340Thanks @threepointone! - polish: validate payload forkv:bulk puton client sideThis adds client side validation for the paylod for
kv:bulk put, importantly ensuring we're uploading only string key/value pairs (as well as validation for the other fields).
2.0.5
Patch Changes
556e6ddThanks @threepointone! - chore: bump to do a release
2.0.4
Patch Changes
-
#987
bb94038Thanks @threepointone! - fix: encode key when callingkv:ket get, don't encode when deleting a namespaceThis cleans up some logic from https://github.com/cloudflare/workers-sdk/pull/964.
- we shouldn't be encoding the id when deleting a namespace, since that'll already be an alphanumeric id
- we should be encoding the key when we call kv:key get, or we get a similar issue as in https://github.com/cloudflare/workers-sdk/issues/961
- adds
KVto all the KV-related function names - moves the api calls to
kv:namespace deleteandkv:key deleteinsidekv.tshelpers.
-
#980
202f37dThanks @threepointone! - fix: throw appropriate error when we detect an unsupported version of nodeWhen we start up the CLI, we check what the minimum version of supported node is, and throw an error if it isn't at least 16.7. However, the script that runs this, imports
node:child_processandnode:path, which was only introduced in 16.7. It was backported to older versions of node, but only in last updates to majors. So for example, if someone used 14.15.4, the script would throw because it wouldn't be able to findnode:child_process(but it would work on v14.19.2).The fix here is to not use the prefixed versions of these built-ins in the bootstrap script. Fixes https://github.com/cloudflare/workers-sdk/issues/979
2.0.3
Patch Changes
-
#956
1caa5f7Thanks @threepointone! - fix: don't crash duringinitifgitis not installedWhen a command isn't available on a system, calling
execa()on it throws an error, and not just a non zero exitCode. This patch fixes the flow so we don't crash the whole process when that happens on testing the presence ofgitwhen callingwrangler init.
-
#970
35e780bThanks @GregBrimble! - fix: Fixes Pages Plugins and static asset routing.There was previously a bug where a relative pathname would be missing the leading slash which would result in routing errors.
-
#957
e0a0509Thanks @JacobMGEvans! - refactor: Moving--legacy-envout of global The--legacy-envflag was in global scope, which only certain commands utilize the flag for functionality, and doesnt do anything for the other commands.resolves #933
-
#948
82165c5Thanks @petebacondarwin! - fix: improve error message if custom build output is not foundThe message you get if Wrangler cannot find the output from the custom build is now more helpful. It will even look around to see if there is a suitable file nearby and make suggestions about what should be put in the
mainconfiguration.Closes #946
-
#952
ae3895eThanks @d3lm! - feat: use host specific callback urlTo allow OAuth to work on environments such as WebContainer we have to generate a host-specific callback URL. This PR uses
@webcontainer/envto generate such URL only for running in WebContainer. Otherwise the callback URL stays unmodified.
-
#951
09196ecThanks @petebacondarwin! - fix: look for an alternate port in the dev command if the configured one is in usePreviously, we were only calling
getPort()if the configured port was undefined. But since we were setting the default for this during validation, it was never undefined.Fixes #949
-
#963
5b03eb8Thanks @threepointone! - fix: work with Cloudflare WARPUsing wrangler with Cloudflare WARP (https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/) requires using the Cloudflare certificate. This patch simply uses the certificate as NODE_EXTRA_CA_CERTS when we start wrangler.
Test plan:
- Turn on Cloudflare WARP/ Gateway with WARP
wrangler dev- Turn on Cloudflare WARP/ Gateway with DoH
wrangler dev- Turn off Cloudflare WARP
wrangler dev
Fixes https://github.com/cloudflare/workers-sdk/issues/953, https://github.com/cloudflare/workers-sdk/issues/850
-
#964
0dfd95fThanks @JacobMGEvans! - fix: KV not setting correctly The KV has URL inputs, which in the case of/would get collapsed and lost. T:o handle special charactersencodeURIComponentis implemented.resolves #961
2.0.2
Patch Changes
- #947
38b7242Thanks @GregBrimble! - Updated defaults and help of wrangler pages publish
-
#941
d84b568Thanks @threepointone! - fix: bundle worker as iife if detected as a service workerWe detect whether a worker is a "modules" format worker by the presence of a
defaultexport. This is a pretty good heuristic overall, but sometimes folks can make mistakes. One situation that's popped up a few times, is people writing exports, but still writing it in "service worker" format. We detect this fine, and log a warning about the exports, but send it up with the exports included. Unfortunately, our runtime throws when we mark a worker as a service worker, but still has exports. This patch fixes it so that the exports are not included in a service-worker worker.Note that if you're missing an event listener, it'll still error with "No event handlers were registered. This script does nothing." but that's a better error than the SyntaxError even when the listener was there.
2.0.1
Patch Changes
-
#932
e95e5a0Thanks @threepointone! - fix: log proper response status codes indevDuring
devwe log the method/url/statuscode for every req+res. This fix logs the correct details for every request.
- #930
bc28beaThanks @GregBrimble! - fix: Default to creating a new project when no existing ones are available for 'wrangler pages publish'
- #934
692ddc4Thanks @GregBrimble! - fix: Suppress beta warning when operating in Pages' CI environment
-
#936
a0e0b26Thanks @petebacondarwin! - fix: support Windows line-endings in TOML filesThe TOML parser that Wrangler uses crashes if there is a Windows line-ending in a comment. See https://github.com/iarna/iarna-toml/issues/33.
According to the TOML spec, we should be able to normalize line-endings as we see fit. See https://toml.io/en/v1.0.0#:~:text=normalize%20newline%20to%20whatever%20makes%20sense.
This change normalizes line-endings of TOML strings before parsing to avoid hitting this bug.
2.0.0
Major Changes
-
#928
7672f99Thanks @threepointone! - ⛅️ Wrangler 2.0.0Wrangler 2.0 is a full rewrite. Every feature has been improved, while retaining as much backward compatibility as we could. We hope you love it. It'll only get better.
0.0.34
Patch Changes
-
#926
7b38a7cThanks @threepointone! - polish: show paths of created files withwrangler initThis patch modifies the terminal when running
wrangler init, to show the proper paths of files created during it (likepackage.json,tsconfig.json, etc etc). It also fixes a bug where we weren't detecting the existence ofsrc/index.jsfor a named worker before asking to create it.
0.0.33
Patch Changes
-
#924
3bdba63Thanks @threepointone! - fix: withwrangler init, test for existence ofpackage.json/tsconfig.json/.gitin the right locationsWhen running
wrangler.init, we look for the existence ofpackage.json, /tsconfig.json/.gitwhen deciding whether we should create them ourselves or not. Becausenamecan be a relative path, we had a bug where we don't starting look from the right directory. We also had a bug where we weren't even testing for the existence of the.gitdirectory correctly. This patch fixes that initial starting location, tests for.gitas a directory, and correctly decides when to create those files.
0.0.32
Patch Changes
-
#922
e2f9bb2Thanks @threepointone! - feat: offer to create a git repo when callingwrangler initWorker projects created by
wrangler initshould also be managed by source control (popularly, git). This patch adds a choice inwrangler initto make the created project into a git repository.Additionally, this fixes a bug in our tests where mocked
confirm()andprompt()calls were leaking between tests.
0.0.31
Patch Changes
-
#916
4ef5fbbThanks @petebacondarwin! - fix: display and error and help forwrangler init --siteThe
--siteoption is no longer supported. This change adds information about how to create a new Sites project by cloning a repository. It also adds links to the Worker Sites and Cloudflare Pages docs.
-
#908
f8dd31eThanks @threepointone! - fix: fix isolate prewarm logic forwrangler devWhen calling
wrangler dev, we make a request to a special URL that "prewarms" the isolate running our Worker so that we can attach devtools etc to it before actually making a request. We'd implemented it wrongly, and because we'd silenced its errors, we weren't catching it. This patch fixes the logic (based on Wrangler v1.x's implementation) and enables logging errors when the prewarm request fails.As a result, profiling starts working again as expected. Fixes https://github.com/cloudflare/workers-sdk/issues/907
-
#919
13078e1Thanks @threepointone! - fix: don't crash when tail event is nullSometime the "event" on a tail can be null. This patch makes sure we don't crash when that happens. Fixes https://github.com/cloudflare/workers-sdk/issues/918
-
#913
dfeed74Thanks @threepointone! - polish: add a deprecation warning to--inspectondevWe have a blogposts and docs that says you need to pass
--inspectto use devtools and/or profile your Worker. In wrangler v2, we don't need to pass the flag anymore. Using it right now will throw an error, so this patch makes it a simple warning instead.
- #916
4ef5fbbThanks @petebacondarwin! - fix: add some space after the CLI help message when there is an error
-
#920
57cf221Thanks @threepointone! - chore: don't minify bundlesWhen errors in wrangler happen, it's hard to tell where the error is coming from in a minified bundle. This patch removes the minification. We still set
process.env.NODE_ENV = 'production'in the bundle so we don't run dev-only paths in things like React.This adds about 2 mb to the bundle, but imo it's worth it.
- #916
4ef5fbbThanks @petebacondarwin! - fix: update thegeneratecommand to provide better deprecation messaging
- #914
9903526Thanks @sidharthachatterjee! - fix: Ensure getting git branch doesn't fail on Windows
- #917
94d3d6dThanks @GregBrimble! - fix: Hit correct endpoint for 'wrangler pages publish'
-
#910
fe0344dThanks @taylorlee! - fix: support preview buckets for r2 bindingsAllows wrangler2 to perform preview & dev sessions with a different bucket than the published worker's binding.
This matches kv's preview_id behavior, and brings the Wrangler v2 implementation in sync with Wrangler v1.
0.0.30
Patch Changes
-
#902
daed3c3Thanks @petebacondarwin! - fix: show error if a string option is used without a valueFixes #883
-
#901
b246066Thanks @threepointone! - chore: minify bundle, don't ship sourcemapsWe haven't found much use for sourcemaps in production, and we should probably minify the bundle anyway. This will also remove an dev only warnings react used to log.
-
#904
641cdadThanks @GregBrimble! - feat: Adds 'assets:' loader for Pages Functions.This lets users and Plugin authors include a folder of static assets in Pages Functions.
export { onRequest } from "assets:../folder/of/static/assets";More information in our docs.
- #905
c57ff0eThanks @JacobMGEvans! - chore: removed Sentry and related reporting code. Automated reporting of Wrangler errors will be reimplemented after further planning.
0.0.29
Patch Changes
-
#897
d0801b7Thanks @threepointone! - polish: tweak the message when.dev.varsis usedThis tweaks the mssage when a
.dev.varsfile is used so that it doesn't imply that the user has to copy the values from it into theirwrangler.toml.
-
#880
aad1418Thanks @GregBrimble! - fix: Stop unnecessarily amalgamating duplicate headers in Pages FunctionsPreviously,
set-cookiemultiple headers would be combined because of unexpected behavior in the spec.
- #892
b08676aThanks @GregBrimble! - fix: Adds the leading slash to Pages deployment manifests that the API expects, and fixes manifest generation on Windows machines.
-
#852
6283ad5Thanks @JacobMGEvans! - feat: non-TTY check for required variables Added a check in non-TTY environments foraccount_id,CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_TOKEN. Ifaccount_idexists inwrangler.tomlthenCLOUDFLARE_ACCOUNT_IDis not needed in non-TTY scope. TheCLOUDFLARE_API_TOKENis necessary in non-TTY scope and will always error if missing.resolves #827
-
#893
5bf17caThanks @petebacondarwin! - fix: remove bold font from additional lines of warnings and errorsPreviously, when a warning or error was logged, the entire message was formatted in bold font. This change makes only the first line of the message bold, and the rest is formatted with a normal font.
-
#894
57c1354Thanks @threepointone! - polish: s/DO NOT USE THIS/ IgnoredFollowup to https://github.com/cloudflare/workers-sdk/pull/888, this replaces some more scary capitals with a more chill word.
- #893
5bf17caThanks @petebacondarwin! - fix: add bold to theDeprecatedwarning title
-
#882
1ad7570Thanks @petebacondarwin! - feat: add support for reading build time env variables from a.envfileThis change will automatically load up a
.envfile, if found, and apply its values to the current environment. An example would be to provide a specific CLOUDFLARE_ACCOUNT_ID value.Related to cloudflare#190
-
#887
2bb4d30Thanks @threepointone! - polish: accept Enter as a valid key in confirm dialogsInstead of logging "Unrecognised input" when hitting return/enter in a confirm dialog, we should accept it as a confirmation. This patch also makes the default choice "y" bold in the dialog.
-
#891
bae5ba4Thanks @GregBrimble! - feat: Adds interactive prompts for the 'wrangler pages publish' and related commands.Additionally, those commands now read from
node_modules/.cache/wrangler/pages.jsonto persist users' account IDs and project names.
-
#888
b77aa38Thanks @threepointone! - polish: s/DEPRECATION/DeprecationThis removes the scary uppercase from DEPRECATION warnings. It also moves the service environment usage warning into
diagnosticsinstead of logging it directly.
-
#879
f694313Thanks @petebacondarwin! - feat: readvarsoverrides from a local file forwrangler devThe
varsbindings can be specified in thewrangler.tomlconfiguration file. But "secret"varsare usually only provided at the server - either by creating them in the Dashboard UI, or using thewrangler secretcommand.It is useful during development, to provide these types of variable locally. When running
wrangler devwe will look for a file called.dev.vars, situated next to thewrangler.tomlfile (or in the current working directory if there is nowrangler.toml). Any values in this file, formatted like adotenvfile, will add to or overridevarsbindings provided in thewrangler.toml.Related to #190
0.0.28
Patch Changes
-
#843
da12cc5Thanks @threepointone! - fix:site.entry-pointis no longer a hard deprecationTo make migration of v1 projects easier, Sites projects should still work, including the
entry-pointfield (which currently errors out). This enablessite.entry-pointas a valid entry point, with a deprecation warning.
-
#848
0a79d75Thanks @petebacondarwin! - polish: improve consistency of warnings and errorsRelated to #377
-
#877
97f945fThanks @caass! - Treat the "name" parameter inwrangler initas a path.This means that running
wrangler init .will create a worker in the current directory, and the worker's name will be the name of the current directory.You can also run
wrangler init path/to/my-workerand a worker will be created at[CWD]/path/to/my-workerwith the namemy-worker,
-
#851
277b254Thanks @threepointone! - polish: do not log the error object when refreshing a token failsWe handle the error anyway (by doing a fresh login) which has its own logging and messaging. In the future we should add a DEBUG mode that logs all requests/errors/warnings, but that's for later.
-
#869
f1423bfThanks @threepointone! - feat: experimental--node-compat/config.node_compatThis adds an experimental node.js compatibility mode. It can be enabled by adding
node_compat = trueinwrangler.toml, or by passing--node-compatas a command line arg fordev/publishcommands. This is currently powered by@esbuild-plugins/node-globals-polyfill(which in itself is powered byrollup-plugin-node-polyfills).We'd previously added this, and then removed it because the quality of the polyfills isn't great. We're reintroducing it regardless so we can start getting feedback on its usage, and it sets up a foundation for replacing it with our own, hopefully better maintained polyfills.
Of particular note, this means that what we promised in https://blog.cloudflare.com/announcing-stripe-support-in-workers/ now actually works.
This patch also addresses some dependency issues, specifically leftover entries in package-lock.json.
- #790
331c659Thanks @sidharthachatterjee! - feature: Adds 'wrangler pages publish' (alias 'wrangler pages deployment create') command.
-
#866
8b227fcThanks @caass! - Add a runtime check forwrangler devlocal mode to avoid erroring in environments with noAsyncLocalStorageclassCertain runtime APIs are only available to workers during the "request context", which is any code that returns after receiving a request and before returning a response.
Miniflare emulates this behavior by using an
AsyncLocalStorageand checking at runtime to see if you're using those APIs during the request context.In certain environments
AsyncLocalStorageis unavailable, such as in a webcontainer. This function figures out if we're able to run those "request context" checks and returns a set of options that indicate to miniflare whether to run the checks or not.
-
#829
f08aac5Thanks @JacobMGEvans! - feat: Add validation to thenamefield in configuration. The validation will warn users that the field can only be "type string, alphanumeric, underscores, and lowercase with dashes only" using the same RegEx as the backendresolves #795 #775
-
#868
6ecb1c1Thanks @threepointone! - feat: implement service environments + durable objectsNow that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects.
0.0.27
Patch Changes
-
#838
9c025c4Thanks @threepointone! - fix: remove timeout on custom builds, and make sure logs are visibleThis removes the timeout we have for custom builds. We shouldn't be applying this timeout anyway, since it doesn't block wrangler, just the user themselves. Further, in https://github.com/cloudflare/workers-sdk/pull/759, we changed the custom build's process stdout/stderr config to "pipe" to pass tests, however that meant we wouldn't see logs in the terminal anymore. This patch removes the timeout, and brings back proper logging for custom builds.
- #349
9d04a68Thanks @GregBrimble! - chore: rename--script-pathto--outfileforwrangler pages functions buildcommand.
-
#836
28e3b17Thanks @threepointone! - fix: toggleworkers.devsubdomains only when requiredThis fix -
- passes the correct query param to check whether a workers.dev subdomain has already been published/enabled
- thus enabling it only when it's not been enabled
- it also disables it only when it's explicitly knows it's already been enabled
The effect of this is that publishes are much faster.
-
#794
ee3475fThanks @JacobMGEvans! - fix: Error messaging from failed login would dump aJSON.parseerror in some situations. Added a fallback if.jsonfails to parse it will attempt.text()then throw result. If both attempts to parse fail it will throw anUnknownErrorwith a message showing where it originated.resolves #539
-
#840
32f6108Thanks @threepointone! - fix: make wrangler work on node v18There's some interference between our data fetching library
undiciand node 18's newfetchand co. (powered byundiciinternally) which replaces the filename ofFiles attached toFormDatas with a genericblob(likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this.Regardless, disabling the new
fetchfunctionality makesundiciuse its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix.Unblocks https://github.com/cloudflare/workers-sdk/issues/834
-
#824
62af4b6Thanks @threepointone! - feat:publish --dry-runIt can be useful to do a dry run of publishing. Developers want peace of mind that a project will compile before actually publishing to live servers. Combined with
--outdir, this is also useful for testing the output ofpublish. Further, it gives developers a chance to upload our generated sourcemap to a service like sentry etc, so that errors from the worker can be mapped against actual source code, but before the service actually goes live.
- #798
feecc18Thanks @GregBrimble! - fix: Allowsnext()to take just a pathname with Pages Functions.
-
#839
f2d6de6Thanks @threepointone! - fix: persist dev experimental storage state in feature specific dirsWith
--experimental-enable-local-persistenceindev, we were clobbering a single folder with data from kv/do/cache. This patch gives individual folders for them. It also enables persistence even when this is not true, but that stays only for the length of a session, and cleans itself up when the dev session ends.
-
#820
60c409aThanks @petebacondarwin! - fix: display a warning if the user has aminiflaresection in theirwrangler.toml.Closes #799
- #796
3e0db3bThanks @GregBrimble! - fix: Makes Response Headers object mutable after a call tonext()in Pages Functions
-
#814
51fea7cThanks @threepointone! - fix: disallow setting account_id in named service environmentsMuch like https://github.com/cloudflare/workers-sdk/pull/641, we don't want to allow setting account_id with named service environments. This is so that we use the same account_id for multiple environments, and have them group together in the dashboard.
-
#823
4a00910Thanks @threepointone! - fix: don't log an error whenwrangler devis cancelled earlyWe currently log an
AbortErrorwith a stack if we exitwrangler dev's startup process before it's done. This fix skips logging that error (since it's not an exception).Test plan:
cd packages/wrangler npm run build cd ../../examples/workers-chat-demo npx wrangler dev # hit [x] as soon as the hotkey shortcut bar shows
-
#815
025c722Thanks @threepointone! - fix: ensure that bundle is generated to es2020 targetThe default tsconfig generated by tsc uses
target: "es5", which we don't support. This fix ensures that we output es2020 modules, even if tsconfig asks otherwise.
- #349
9d04a68Thanks @GregBrimble! - feature: Adds a--pluginoption towrangler pages functions buildwhich compiles a Pages Plugin. More information about Pages Plugins can be found here. This wrangler build is required for both the development of, and inclusion of, plugins.
- #822
4302172Thanks @GregBrimble! - chore: Add help messages forwrangler pages projectandwrangler pages deployment
-
#837
206b9a5Thanks @threepointone! - polish: replace 🦺 with ⚠️I got some feedback that the construction worker jacket (?) icon for deprecations is confusing, especially because it's an uncommon icon and not very big in the terminal. This patch replaces it with a more familiar warning symbol.
-
#824
62af4b6Thanks @threepointone! - feat:publish --outdir <path>It can be useful to introspect built assets. A leading usecase is to upload the sourcemap that we generate to services like sentry etc, so that errors from the worker can be mapped against actual source code. We introduce a
--outdircli arg to specify a path to generate built assets at, which doesn't get cleaned up after publishing. We are not adding this towrangler.tomljust yet, but could in the future if it looks appropriate there.
-
#811
8c2c7b7Thanks @JacobMGEvans! - feat: Addedminifyas a configuration option and a cli arg, which will minify code fordevandpublishresolves #785
0.0.26
Patch Changes
-
#782
34552d9Thanks @GregBrimble! - feature: Add 'pages create project [name]' command.This command will create a Pages project with a given name, and optionally set its
--production-branch=[production].
- #772
a852e32Thanks @JacobMGEvans! - fix: We want to prevent any user created code from sending Events to Sentry, which can be captured byuncaughtExceptionMonitorlistener. Miniflare code can run user code on the same process as Wrangler, so we want to returnnullif@miniflareis present in the Event frames.
-
#778
85b0c31Thanks @threepointone! - feat: optionally send zone_id with a routeThis enables optionally passing a route as
{pattern: string, zone_id: string}. There are scenarios where we need to explicitly pass a zone_id to the api, so this enables that.Some nuance: The errors from the api aren't super useful when invalid values are passed, but that's something to further work on.
This also fixes some types in our cli parsing.
-
#797
67fc4fcThanks @threepointone! - feat: optionally sendzone_namewith routesA followup to https://github.com/cloudflare/workers-sdk/pull/778, this lets you send an optional
zone_namewith routes. This is particularly useful when using ssl for saas (https://developers.cloudflare.com/ssl/ssl-for-saas/).
-
#813
5c59f97Thanks @threepointone! - add a warning if service environments are being used.Service environments are not ready for widespread usage, and their behaviour is going to change. This adds a warning if anyone uses them.
-
#789
5852bbaThanks @threepointone! - polish: don't log all errors when logging inThis removes a couple of logs we had for literally every error in our oauth flow. We throw the error and handle it separately anyway, so this is a safe cleanup.
-
#806
b24aeb5Thanks @threepointone! - fix: check for updates on the right channelThis makes the update checker run on the channel that the version being used runs on.
-
#807
7e560e1Thanks @threepointone! - fix: readisLegacyEnvcorrectlyThis fixes the signature for
isLegacyEnv()since it doesn't use args, and we fix reading legacy_env correctly when creating a draft worker when creating a secret.
-
#779
664803eThanks @threepointone! - chore: update packagesThis updates some dependencies. Some highlights -
- updates to
@iarna/tomlmeans we can have mixed types for inline arrays, which is great for #774 / https://github.com/cloudflare/workers-sdk/pull/778 - I also moved timeago.js to
devDependenciessince it already gets compiled into the bundle - updates to
esbuildbrings along a number of smaller fixes for modern js
- updates to
-
#810
0ce47a5Thanks @caass! - Makewrangler tailTTY-aware, and stop printing non-JSON in JSON modeCloses #493
2 quick fixes:
- Check
process.stdout.isTTYat runtime to determine whether to default to "pretty" or "json" output for tailing. - Only print messages like "Connected to {worker}" if in "pretty" mode (errors still throw strings)
- Check
0.0.25
Patch Changes
-
#752
6d43e94Thanks @petebacondarwin! - fix: add a warning ifdevis defaulting to the latest compatibility-date
-
#767
836ad59Thanks @threepointone! - fix: use cwd for--experiment-enable-local-persistenceThis sets up
--experiment-enable-local-persistenceto explicitly useprocess.cwd() + wrangler-local-stateas a path to store values. Without it, local mode uses the temp dir that we use to bundle the worker, which gets wiped out on ending wrangler dev. In the future, based on usage, we may want to make the path configurable as well.
-
#723
7942936Thanks @threepointone! - fix: spread tail messages when loggingLogged messages (via console, etc) would previously be logged as an array of values. This spreads it when logging to match what is expected.
-
#756
8e38442Thanks @threepointone! - fix: resolve raw file bindings correctly inwrangler devlocal modeFor
wasm_modules/text_blobs/data_blobsin local mode, we need to rewrite the paths as absolute so that they're resolved correctly by miniflare. This also expands some coverage for local modewrangler dev.Fixes https://github.com/cloudflare/workers-sdk/issues/740 Fixes https://github.com/cloudflare/workers-sdk/issues/416
- #699
ea8e701Thanks @JacobMGEvans! - polish: added logout and login to helpstring message.
-
#728
0873049Thanks @threepointone! - fix: only send durable object migrations when requiredWe had a bug where even if you'd published a script with migrations, we would still send a blank set of migrations on the next round. The api doesn't accept this, so the fix is to not do so. I also expanded test coverage for migrations.
-
#763
f72c943Thanks @JacobMGEvans! - feat: Added the update check that will check the package once a day against the beta release,distTagcan be changed later, then prints the latestbeta version to the user.resolves #762
-
#695
48fa89bThanks @caass! - fix: stop wrangler spamming console after loginIf a user hasn't logged in and then they run a command that needs a login they'll get bounced to the login flow. The login flow (if completed) would write their shiny new OAuth2 credentials to disk, but wouldn't reload the in-memory state. This led to issues like #693, where even though the user was logged in on-disk, wrangler wouldn't be aware of it.
We now update the in-memory login state each time new credentials are written to disk.
-
#734
a1dadacThanks @threepointone! - fix: exit dev if build fails on first runBecause of https://github.com/evanw/esbuild/issues/1037, we can't recover dev if esbuild fails on first run. The workaround is to end the process if it does so, until we have a better fix.
Reported in https://github.com/cloudflare/workers-sdk/issues/731
-
#757
13e57cdThanks @sidharthachatterjee! - feature: Add wrangler pages project listAdds a new command to list your projects in Cloudflare Pages.
-
#745
6bc3e85Thanks @petebacondarwin! - feat: add hotkey to clear the console inwrangler devCloses #388
-
#747
db6b830Thanks @petebacondarwin! - refactor: removeprocess.exit()from the pages codeThis enables simpler testing, as we do not have to spawn new child processes to avoid the
process.exit()from killing the jest process.As part of the refactor, some of the
Errorclasses have been moved to a sharederrors.tsfile.
-
#726
c4e5dc3Thanks @threepointone! - fix: assume a worker is a module worker only if it has adefaultexportThis tweaks the logic that guesses worker formats to check whether a
defaultexport is defined on an entry point before assuming it's a module worker.
-
#735
c38ae3dThanks @threepointone! -text_blobs/Text module support for service worker format in local modeThis adds support for
text_blobs/Text module support in local mode. Now that https://github.com/cloudflare/miniflare/pull/228 has landed in miniflare (thanks @caass!), we can use that in wrangler as well.
-
#743
ac5c48bThanks @threepointone! - feat: implement[data_blobs]This implements
[data_blobs]support for service-worker workers, as well as enabling Data module support for service-worker workers.data_blobis a supported binding type, but we never implemented support for it in v1. This implements support, and utilises it for supporting Data modules in service worker format. Implementation wise, it's incredibly similar to how we implementedtext_blobs, with relevant changes.Partial fix for https://github.com/cloudflare/workers-sdk/issues/740 pending local mode support.
-
#753
cf432acThanks @petebacondarwin! - fix: distinguish the command hotkeys in wrangler devCloses #354
-
#746
3e25dcbThanks @petebacondarwin! - fix: remove superfluous debugger log messages from local devCloses #387
-
#758
9bd95ceThanks @sidharthachatterjee! - feature: Add wrangler pages deployment listRenders a list of deployments in a Cloudflare Pages project
- #733
91873e4Thanks @JacobMGEvans! - polish: improved visualization of the deprecation messages between serious and warnings with emojis. This also improves the delineation between messages.
-
#738
c04791cThanks @petebacondarwin! - fix: add support for cron triggers indev --localmodeCurrently, I don't know if there is support for doing this in "remote" dev mode.
Resolves #737
-
#732
c63ea3dThanks @JacobMGEvans! - fix: abort async operations in theRemotecomponent to avoid unwanted side-effects When theRemotecomponent is unmounted, we now signal outstandingfetch()requests, andwaitForPortToBeAvailable()tasks to cancel them. This prevents unexpected requests from appearing after the component has been unmounted, and also allows the process to exit cleanly without a delay.fixes #375
0.0.24
Patch Changes
-
#719
6503aceThanks @petebacondarwin! - fix: ensure the correct worker name is published in legacy environmentsWhen a developer uses
--envto specify an environment name, the Worker name should be computed from the top-level Worker name and the environment name.When the given environment name does not match those in the wrangler.toml, we error. But if no environments have been specified in the wrangler.toml, at all, then we only log a warning and continue.
In this second case, we were reusing the top-level environment, which did not have the correct legacy environment fields set, such as the name. Now we ensure that such an environment is created as needed.
See https://github.com/cloudflare/workers-sdk/pull/680#issuecomment-1080407556
-
#708
763dcb6Thanks @threepointone! - fix: unexpected commands and arguments should throwThis enables strict mode in our command line parser (yargs), so that unexpected commands and options uniformly throw errors.
-
#713
18d09c7Thanks @threepointone! - fix: don't fetch zone id forwrangler dev --localWe shouldn't try to resolve a domain/route to a zone id when starting in local mode (since there may not even be network).
-
#692
52ea60fThanks @threepointone! - fix: do not deploy to workers.dev when routes are defined in an environmentWhen
workers_devis not configured, we had a bug where it would default to true inside an environment even when there were routes defined, thus publishing both to aworkers.devsubdomain as well as the defined routes. The fix is to defaultworkers_devtoundefined, and check when publishing whether or not to publish toworkers.dev/defined routes.
-
#687
8f7ac7bThanks @petebacondarwin! - fix: add warning aboutwrangler devwith remote Durable ObjectsDurable Objects that are being bound by
script_namewill not be isolated from the live data during development withwrangler dev. This change simply warns the developer about this, so that they can back out before accidentally changing live data.Fixes #319
- #661
6967086Thanks @JacobMGEvans! - polish: add "Beta" messaging around the CLI command for Pages. Explicitly specifying the command is Beta, not to be confused with Pages itself which is production ready.
-
#709
7e8ec9aThanks @threepointone! - fix: trigger login flow if refreshtoken isn't validIf the auth refresh token isn't valid, then we should trigger the login flow. Reported in https://github.com/cloudflare/workers-sdk/issues/316
-
#702
241000fThanks @threepointone! - fix: setup jsx loaders when guessing worker format- We consider jsx to be regular js, and have setup our esbuild process to process js/mjs/cjs files as jsx.
- We use a separate esbuild run on an entry point file when trying to guess the worker format, but hadn't setup the loaders there.
- So if just the entrypoint file has any jsx in it, then we error because it can't parse the code.
The fix is to add the same loaders to the esbuild run that guesses the worker format.
Reported in https://github.com/cloudflare/workers-sdk/issues/701
-
#711
3dac1daThanks @threepointone! - fix: defaultwrangler tailto pretty print
-
#712
fb53fdaThanks @threepointone! - feat: Non-interactive modeContinuing the work from https://github.com/cloudflare/workers-sdk/pull/325, this detects when wrangler is running inside an environment where "raw" mode is not available on stdin, and disables the features for hot keys and the shortcut bar. This also adds stubs for testing local mode functionality in
local-mode-tests, and deletes the previous hackydev2.test.tsx.
-
#716
6987cf3Thanks @threepointone! - feat: path to a customtsconfigThis adds a config field and a command line arg
tsconfigfor passing a path to a custom typescript configuration file. We don't do any typechecking, but we do pass it along to our build process so things likecompilerOptions.pathsget resolved correctly.
-
#665
62a89c6Thanks @caass! - fix: validate that bindings have unique namesWe don't want to have, for example, a KV namespace named "DATA" and a Durable Object also named "DATA". Then it would be ambiguous what exactly would live at
env.DATA(or in the case of service workers, theDATAglobal) which could lead to unexpected behavior -- and errors.Similarly, we don't want to have multiple resources of the same type bound to the same name. If you've been working with some KV namespace called "DATA", and you add a second namespace but don't change the binding to something else (maybe you're copying-and-pasting and just changed out the
id), you could be reading entirely the wrong stuff out of your KV store.So now we check for those sorts of situations and throw an error if we find that we've encountered one.
-
#698
e3e3243Thanks @threepointone! - feat: injectprocess.env.NODE_ENVinto scriptsAn extremely common pattern in the js ecosystem is to add additional behaviour gated by the value of
process.env.NODE_ENV. For example, React leverages it heavily to add dev-time checks and warnings/errors, and to load dev/production versions of code. By doing this substitution ourselves, we can get a significant runtime boost in libraries/code that leverage this.This does NOT tackle the additional features of either minification, or proper node compatibility, or injecting wrangler's own environment name, which we will tackle in future PRs.
-
#680
8e2cbafThanks @JacobMGEvans! - refactor: support backwards compatibility with environment names and related CLI flags- When in Legacy environment mode we should not compute name field if specified in an environment.
- Throw an Error when
--envand--nameare used together in Legacy Environment, except for Secrets & Tail which are using a special casegetLegacyScriptNamefor parity with Wrangler v1 - Started the refactor for args being utilized at the Config level, currently checking for Legacy Environment only.
-
#684
82ec7c2Thanks @GregBrimble! - fix: Fix--bindingoption forwrangler pages dev.We'd broken this with #581. This reverts that PR, and fixes it slightly differently. Also added an integration test to ensure we don't regress in the future.
-
#678
82e4143Thanks @threepointone! - fix: cleanup afterpages devtestsWe weren't killing the process started by wrangler whenever its parent was killed. This fix is to listen on SIGINT/SIGTERM and kill that process. I also did some minor configuration cleanups.
Fixes https://github.com/cloudflare/workers-sdk/issues/397 Fixes https://github.com/cloudflare/workers-sdk/issues/618
0.0.23
Patch Changes
-
#675
e88a54eThanks @threepointone! - fix: resolve non-js modules correctly in local modeIn https://github.com/cloudflare/workers-sdk/pull/633, we missed passing a cwd to the process that runs the miniflare cli. This broke how miniflare resolves modules, and led back to the dreaded "path should be a
path.relative()d string" error. The fix is to simply pass the cwd to thespawncall.Test plan:
cd packages/wrangler npm run build cd ../workers-chat-demo npx wrangler dev --local
-
#668
3dcdb0dThanks @petebacondarwin! - fix: tighten up the named environment configurationNow, when we normalize and validate the raw config, we pass in the currently active environment name, and the config that is returned contains all the environment fields correctly normalized (including inheritance) at the top level of the config object. This avoids other commands from having to check both the current named environment and the top-level config for such fields.
Also, now, handle the case where the active environment name passed in via the
--envcommand line argument does not match any of the named environments in the configuration:- This is an error if there are named environments configured;
- or only a warning if there are no named environments configured.
-
#633
003f3c4Thanks @JacobMGEvans! - refactor: create a custom CLI wrapper around Miniflare APIThis allows us to tightly control the options that are passed to Miniflare. The current CLI is setup to be more compatible with how Wrangler v1 works, which is not optimal for Wrangler v2.
-
#633
84c857eThanks @JacobMGEvans! - fix: ensure asset keys are relative to the project rootPreviously, asset file paths were computed relative to the current working directory, even if we had used
-cto run Wrangler on a project in a different directory to the current one.Now, assets file paths are computed relative to the "project root", which is either the directory containing the wrangler.toml or the current working directory if there is no config specified.
-
#673
456e1daThanks @petebacondarwin! - fix: allow thebuildfield to be inherited/overridden in a named environment"Now the
buildfield can be specified within a named environment, overriding whatever may appear at the top level.Resolves https://github.com/cloudflare/workers-sdk/issues/588
-
#650
d3d1ff8Thanks @petebacondarwin! - feat: makemainan inheritable environment fieldSee #588
- #650
f0eed7fThanks @petebacondarwin! - fix: make validation error messages more consistent
- #662
612952bThanks @JacobMGEvans! - bugfix: use alias-efor--envto prevent scripts using Wrangler 1 from breaking when switching to Wrangler v2.
-
#671
ef0aaadThanks @GregBrimble! - fix: don't exit on initial Pages Functions compilation failurePreviously, we'd exit the
wrangler pages devprocess if we couldn't immediately compile a Worker from thefunctionsdirectory. We now log the error, but don't exit the process. This means that proxy processes can be cleaned up cleanly on SIGINT and SIGTERM, and it matches the behavior of if a compilation error is introduced once already running (we don't exit then either).
-
#667
e29a241Thanks @threepointone! - fix: delete unused[site]assetsWe discovered critical issues with the way we expire unused assets with
[site](see https://github.com/cloudflare/workers-sdk/issues/666, https://github.com/cloudflare/wrangler-legacy/issues/2224), that we're going back to the legacy manner of handling unused assets, i.e- deleting unused assets.
-
#640
2a2d50cThanks @caass! - Error if the user is trying to implement DO's in a service workerDurable Objects can only be implemented in Module Workers, so we should throw if we detect that the user is trying to implement a Durable Object but their worker is in Service Worker format.
0.0.22
Patch Changes
-
#656
aeb0fe0Thanks @threepointone! - fix: resolve npm modules correctlyWhen implementing legacy module specifiers, we didn't throughly test the interaction when there weren't any other files next to the entry worker, and importing npm modules. It would create a Regex that matched every import, and fail because a file of that name wasn't present in the source directory. This fix constructs a better regex, applies it only when there are more files next to the worker, and increases test coverage for that scenario.
0.0.21
Patch Changes
-
#647
f3f3907Thanks @petebacondarwin! - feat: add support for--ipandconfig.dev.ipin the dev commandNote that this change modifies the default listening address to
localhost, which is different to127.0.0.1, which is what Wrangler v1 does. For most developers this will make no observable difference, since the default host mapping in most OSes fromlocalhostto127.0.0.1.Resolves #584
0.0.20
Patch Changes
- #627
ff53f4eThanks @petebacondarwin! - fix: do not warn about miniflare in the configuration
-
#649
e0b9366Thanks @threepointone! - fix: useexpiration_ttlto expire assets with[site]This switches how we expire static assets with
[site]uploads to useexpiration_ttlinstead ofexpiration. This is because we can't trust the time that a deploy target may provide (like in https://github.com/cloudflare/wrangler-legacy/issues/2224).
-
#599
7d4ea43Thanks @caass! - Force-open a chromium-based browser for devtoolsWe rely on Chromium-based devtools for debugging workers, so when opening up the devtools URL, we should force a chromium-based browser to launch. For now, this means checking (in order) for Chrome and Edge, and then failing if neither of those are available.
-
#567
05b81c5Thanks @threepointone! - fix: consolidategetEntry()logicThis consolidates some logic into
getEntry(), namely includingguessWorkerFormat()and custom builds. This simplifies the code for bothdevandpublish.- Previously, the implementation of custom builds inside
devassumed it could be a long running process; however it's not (else consider thatpublishwould never work). - By running custom builds inside
getEntry(), we can be certain that the entry point exists as we validate it and before we enterdev/publish, simplifying their internals - We don't have to do periodic checks inside
wrangler devbecause it's now a one shot build (and always should have been) - This expands test coverage a little for both
devandpublish. - The 'format' of a worker is intrinsic to its contents, so it makes sense to establish its value inside
getEntry() - This also means less async logic inside
<Dev/>, which is always a good thing
- Previously, the implementation of custom builds inside
- #628
b640ab5Thanks @caass! - Validate that ifrouteexists in wrangler.toml,routesdoes not (and vice versa)
-
#591
42c2c0fThanks @petebacondarwin! - fix: add warning about setting upstream-protocol tohttpWe have not implemented setting upstream-protocol to
httpand currently do not intend to.This change just adds a warning if a developer tries to do so and provides a link to an issue where they can add their use-case.
-
#596
187264dThanks @threepointone! - feat: support Wrangler v1.x module specifiers with a deprecation warningThis implements Wrangler v1.x style module specifiers, but also logs a deprecation warning for every usage.
Consider a project like so:
project ├── index.js └── some-dependency.jswhere the content of
index.jsis:import SomeDependency from "some-dependency.js"; addEventListener("fetch", (event) => {});wrangler1.x would resolveimport SomeDependency from "some-dependency.js";to the filesome-dependency.js. This will work inwranglerv2, but it will log a deprecation warning. Instead, you should rewrite the import to specify that it's a relative path, like so:- import SomeDependency from "some-dependency.js"; + import SomeDependency from "./some-dependency.js";In a near future version, this will become a breaking deprecation and throw an error.
(This also updates
workers-chat-demoto use the older style specifier, since that's how it currently is at https://github.com/cloudflare/workers-chat-demo)Known issue: This might not work as expected with
.js/.cjs/.mjsfiles as expected, but that's something to be fixed overall with the module system.
- #579
2f0e59bThanks @JacobMGEvans! - feat: Incomplete subcommands render a help message for that specific subcommand.
-
#559
16fb5e6Thanks @petebacondarwin! - feat: support adding secrets in non-interactive modeNow the user can pipe in the secret value to the
wrangler secret putcommand. For example:cat my-secret.txt | wrangler secret put secret-key --name worker-nameThis requires that the user is logged in, and has only one account, or that the
account_idhas been set inwrangler.toml.Fixes #170
-
#597
94c2698Thanks @caass! - Deprecatewrangler route,wrangler route list, andwrangler route deleteUsers should instead modify their wrangler.toml or use the
--routesflag when publishing to manage routes.
- #564
ffd5c0dThanks @GregBrimble! - Request Pages OAuth scopes when logging in
-
#638
06f9278Thanks @threepointone! - polish: add a small banner for commandsThis adds a small banner for most commands. Specifically, we avoid any commands that maybe used as a parse input (like json into jq). The banner itself simply says "⛅️ wrangler" with an orange underline.
-
#561
6e9a219Thanks @threepointone! - fix: resolve modules correctly inwrangler dev --localThis is an alternate fix to https://github.com/cloudflare/miniflare/pull/205, and fixes the error where miniflare would get confused resolving relative modules on macs because of
/var//private/varbeing symlinks. Instead, werealpathSyncthe bundle path before passing it on to miniflare, and that appears to fix the problem.Test plan:
cd packages/wrangler npm run build cd ../workers-chat-demo npx wrangler dev --local
-
#592
56886cfThanks @caass! - Stop reporting breadcrumbs to sentrySentry's SDK automatically tracks "breadcrumbs", which are pieces of information that get tracked leading up to an exception. This can be useful for debugging errors because it gives better insight into what happens before an error occurs, so you can more easily understand and recreate exactly what happened before an error occurred.
Unfortunately, Sentry automatically includes all
consolestatements. And since we use the console a lot (e.g. logging every request received inwrangler dev), this is mostly useless. Additionally, since developers frequently use the console to debug their workers we end up with a bunch of data that is not only irrelevant to the reported error, but also contains data that could be potentially sensitive.For now, we're turning off breadcrumbs entirely. Later, we might wish to add our own breadcrumbs manually (e.g. add a "wrangler dev" breadcrumb when a user runs
wrangler dev), at which point we can selectively enable breadcrumbs to catch only the ones we've put in there ourselves.
-
#645
61aea30Thanks @petebacondarwin! - fix: improve authentication logging and warnings- If a user has previously logged in via Wrangler v1 with an API token, we now display a helpful warning.
- When logging in and out, we no longer display the path to the internal user auh config file.
- When logging in, we now display an initial message to indicate the authentication flow is starting.
Fixes #526
-
#608
a7fa544Thanks @sidharthachatterjee! - fix: Ensure generateConfigFromFileTree generates config correctly for multiple splatsFunctions with multiple parameters, like /near/[latitude]/[longitude].ts wouldn't work. This fixes that.
-
#580
8013e0aThanks @petebacondarwin! - feat: add support for--local-protocol=httpstowrangler devThis change adds full support for the setting the protocol that the localhost proxy server listens to. Previously, it was only possible to use
HTTP. But now you can set it toHTTPSas well.To support
HTTPS, Wrangler needs an SSL certificate. Wrangler now generates a self-signed certificate, as needed, and caches it in the~/.wrangler/local-certdirectory. These certificates expire after 30 days and are regenerated by Wrangler as needed.Note that if you use HTTPS then your browser will complain about the self-signed and you must tell it to accept the certificate before it will let you access the page.
-
#639
5161e1eThanks @petebacondarwin! - refactor: initialize the user auth state synchronouslyWe can now initialize the user state synchronously, which means that we can remove the checks for whether it has been done or not in each of the user auth functions.
- #580
aaac8ddThanks @petebacondarwin! - fix: validate that local_protocol and upstream_protocol can only take "http" or "https"
-
#568
b6f2266Thanks @caass! - Show an actionable error message when publishing to a workers.dev subdomain that hasn't been created yet.When publishing a worker to workers.dev, you need to first have registered your workers.dev subdomain (e.g. my-subdomain.workers.dev). We now check to ensure that the user has created their subdomain before uploading a worker to workers.dev, and if they haven't, we provide a link to where they can go through the workers onboarding flow and create one.
-
#641
21ee93eThanks @petebacondarwin! - fix: error if a non-legacy service environment tries to define a worker nameGiven that service environments all live off the same worker, it doesn't make sense for them to have different names.
This change adds validation to tell the developer to remove such
namefields in service environment config.Fixes #623
-
#646
c75cfb8Thanks @threepointone! - fix: defaultwatch_dirtosrcof project directoryVia Wrangler v1, when using custom builds in
wrangler dev,watch_dirshould default tosrcof the "project directory" (i.e - wherever thewrangler.tomlis defined if it exists, else in the cwd.
-
#621
e452a04Thanks @petebacondarwin! - fix: stop checking for open port once it has timed out inwaitForPortToBeAvailable()Previously, if
waitForPortToBeAvailable()timed out, thecheckPort()function would continue to be called. Now we clean up fully once the promise is resolved or rejected.
- #600
1bbd834Thanks @skirsten! - fix: use environment specific and inherited config values inpublish
-
#577
7faf0ebThanks @threepointone! - fix:config.site.entry-pointas a breaking deprecationThis makes configuring
site.entry-pointin config as a breaking deprecation, and throws an error. We do this because existing apps withsite.entry-pointwon't work in v2.
-
#578
c56847cThanks @threepointone! - fix: gracefully fail if we can't create~/.wrangler/reporting.tomlIn some scenarios (CI/CD, docker, etc), we won't have write access to
~/.wrangler. We already don't write a configuration file there if one passes aCF_API_TOKEN/CLOUDFLARE_API_TOKENenv var. This also adds a guard when writing the error reporting configuration file.
-
#621
e452a04Thanks @petebacondarwin! - fix: check for the correct inspector port in local devPreviously, the
useLocalWorker()hook was being passed the wrong port for theinspectorPortprop.Once this was fixed, it became apparent that we were waiting for the port to become free in the wrong place, since this port is already being listened to in
useInspector()by the time we were starting the check.Now, the check to see if the inspector port is free is done in
useInspector(), which also means thatRemotebenefits from this check too.
-
#587
49869a3Thanks @threepointone! - feat: expire unused assets in[site]uploadsThis expires any previously uploaded assets when using a Sites /
[site]configuration. Because we currently do a full iteration of a namespace's keys when publishing, for rapidly changing sites this means that uploads get slower and slower. We can't just delete unused assets because it leads to occasional 404s on older publishes while we're publishing. So we expire previous assets while uploading new ones. The implementation/constraints of the kv api means that uploads may become slower, but should hopefully be faster overall. These optimisations also only matter for rapidly changing sites, so common usecases still have the same perf characteristics.
- #580
9ef36a9Thanks @petebacondarwin! - fix: improve validation error message for fields that must be one of a selection of choices
0.0.19
Patch Changes
-
#557
835c3aeThanks @threepointone! - fix: wrangler dev on unnamed workers in remote modeWith unnamed workers, we use the filename as the name of the worker, which isn't a valid name for workers because of the
.(This break was introduced in https://github.com/cloudflare/workers-sdk/pull/545). The preview service accepts unnamed workers and generates a hash anyway, so the fix is to simply not send it, and use the host that the service provides.
0.0.18
Patch Changes
-
#523
8c99449Thanks @threepointone! - feat: secrets + environmentsThis implements environment support for
wrangler secret(both legacy and services). We now consistently generate the right script name across commands with thegetScriptName()helper.Based on the work by @mitchelvanbever in https://github.com/cloudflare/workers-sdk/pull/95.
-
#554
18ac439Thanks @petebacondarwin! - fix: limit bulk put API requests to batches of 5,000The
kv:bulk putcommand now batches up put requests in groups of 5,000, displaying progress for each request.
-
#437
2805205Thanks @jacobbednarz! - feat: useCLOUDFLARE_...environment variables deprecatingCF_...Now one should use
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_API_BASE_URLrather thanCF_API_TOKEN,CF_ACCOUNT_IDandCF_API_BASE_URL, which have been deprecated.If you use the deprecated variables they will still work but you will see a warning message.
Within the Cloudflare tooling ecosystem, we have a mix of
CF_andCLOUDFLARE_for prefixing environment variables. Until recently, many of the tools were fine withCF_however, there started to be conflicts with external tools (such as Cloudfoundary CLI), which also usesCF_as a prefix, and would potentially be reading and writing the same value the Cloudflare tooling.The Go SDK1, Terraform2 and cf-terraforming3 have made the jump to the
CLOUDFLARE_prefix for environment variable prefix.In future, all SDKs will use this prefix for consistency and to allow all the tooling to reuse the same environment variables in the scenario where they are present.
-
#530
fdb4afdThanks @threepointone! - feat: implementrulesconfig fieldThis implements the top level
rulesconfiguration field. It lets you specify transport rules for non-js modules. For example, you can specify*.mdfiles to be included as a text file with -[[rules]] {type = "Text", globs = ["**/*.md"]}We also include a default ruleset -
{ type: "Text", globs: ["**/*.txt", "**/*.html"] }, { type: "Data", globs: ["**/*.bin"] }, { type: "CompiledWasm", globs: ["**/*.wasm"] },More info at https://developers.cloudflare.com/workers/cli-wrangler/configuration/#build.
Known issues -
- non-wasm module types do not work in
--localmode Datatype does not work in service worker format, in either mode
- non-wasm module types do not work in
-
#517
201a6bbThanks @threepointone! - fix: publish environment specific routesThis adds some tests for publishing routes, and fixes a couple of bugs with the flow.
- fixes publishing environment specific routes, closes https://github.com/cloudflare/workers-sdk/issues/513
- default
workers_devtofalseif there are any routes specified - catches a hanging promise when we were toggling off a
workers.devsubdomain (which should have been caught by theno-floating-promiseslint rule, so that's concerning) - this also fixes publishing environment specific crons, but I'll write tests for that when I'm doing that feature in depth
-
#528
26f5ad2Thanks @threepointone! - feat: top levelmainconfig fieldThis implements a top level
mainfield forwrangler.tomlto define an entry point for the worker , and adds a deprecation warning forbuild.upload.main. The deprecation warning is detailed enough to give the exact line to copy-paste into your config file. Example -The `build.upload` field is deprecated. Delete the `build.upload` field, and add this to your configuration file: main = "src/chat.mjs"This also makes
./dista default forbuild.upload.dir, to match Wrangler v1's behaviour.
- #521
5947bfeThanks @threepointone! - chore: update esbuild from 0.14.18 to 0.14.23
- #480
10cb789Thanks @caass! - Refactored tail functionality in preparation for adding pretty printing.- Moved the
debugtoggle from a build-time constant to a (hidden) CLI flag - Implemented pretty-printing logs, togglable via
--format prettyCLI option - Added stronger typing for tail event messages
- Moved the
-
#525
9d5c14dThanks @threepointone! - feat: tail+envsThis implements service environment support for
wrangler tail. Fairly simple, we just generate the right URLs. wrangler tail already works for legacy envs, so there's nothing to do there.
-
#553
bc85682Thanks @threepointone! - feat: disable tunnel inwrangler devDisables sharing local development server on the internet. We will bring this back after it's more polished/ready.
-
#522
a283836Thanks @threepointone! - fix: websocketsThis fixes websockets in
wrangler dev. It looks like we broke it in https://github.com/cloudflare/workers-sdk/pull/503. I've reverted the specific changes made toproxy.ts.Test plan -
cd packages/wrangler npm run build cd ../workers-chat-demo npx wrangler dev
-
#481
8874548Thanks @threepointone! - fix: replace the word "deploy" with "publish" everywhere.We should be consistent with the word that describes how we get a worker to the edge. The command is
publish, so let's use that everywhere.
-
#537
b978db4Thanks @threepointone! - feat:--localmode only applies inwrangler devWe'd originally planned for
--localmode to be a thing across all wrangler commands. In hindsight, that didn't make much sense, since every command other thanwrangler devassumes some interaction with cloudflare and their API. The only command other than dev where this "worked" waskv, but even that didn't make sense because wrangler dev wouldn't even read from it. We also have--experimental-enable-local-persistencethere anyway.So this moves the
--localflag to only apply forwrangler devand removes any trace from other commands.
-
#518
72f035eThanks @threepointone! - feat: implement[text_blobs]This implements support for
[text_blobs]as defined by https://github.com/cloudflare/wrangler-legacy/pull/1677.Text blobs can be defined in service-worker format with configuration in
wrangler.tomlas -[text_blobs] MYTEXT = "./path/to/my-text.file"The content of the file will then be available as the global
MYTEXTinside your code. Note that this ONLY makes sense in service-worker format workers (for now).Workers Sites now uses
[text_blobs]internally. Previously, we were inlining the asset manifest into the worker itself, but we now attach the asset manifest to the uploaded worker. I also added an additional example of Workers Sites with a modules format worker.
-
#532
046b17dThanks @threepointone! - feat: dev+envsThis implements service environments +
wrangler dev. Fairly simple, it just needed the right url when creating the edge preview token.I tested this by publishing a service under one env, adding secrets under it in the dashboard, and then trying to dev under another env, and verifying that the secrets didn't leak.
-
#552
3cee150Thanks @petebacondarwin! - feat: add confirmation and success messages tokv:bulk deletecommandAdded the following:
- When the deletion completes, we get
Success!logged to the console. - Before deleting, the user is now asked to confirm is that is desired.
- A new flag
--force/-fto avoid the confirmation check.
- When the deletion completes, we get
-
#533
1b3a5f7Thanks @threepointone! - feat: default to legacy environmentsWhile implementing support for service environments, we unearthed a small number of usage issues. While we work those out, we should default to using regular "legacy" environments.
-
#519
93576a8Thanks @caass! - fix: Improve port selection forwrangler devfor both worker ports and inspector ports.Previously when running
wrangler devon multiple workers at the same time, you couldn't attach DevTools to both workers, since they were both listening on port 9229. With this PR, that behavior is improved -- you can now pass an--inspector-portflag to specify a port for DevTools to connect to on a per-worker basis, or if the option is omitted, wrangler will assign a random unused port for you.This "if no option is given, assign a random unused port" behavior has also been added to
wrangler dev --port, so runningwrangler devon two workers at once should now "just work". Hopefully.
-
#545
9e89dd7Thanks @threepointone! - feat: zoned worker support forwrangler devThis implements support for zoned workers in
wrangler dev. Of note, since we're deprecatingzone_id, we instead use the domain provided via--host/config.dev.host/--routes/--route/config.routes/config.routeand infer the zone id from it.
- #494
6e6c30fThanks @caass! - - Add tests covering pretty-printing of logs inwrangler tail- Modify
RequestEventtypes- Change
Datetypes tonumberto make parsing easier - Change
exceptionandlogmessageproperties tounknown
- Change
- Add datetime to pretty-printed request events
- Modify
-
#496
5a640f0Thanks @jahands! - chore: Remove acorn/acorn-walk dependency used in Pages Functions filepath-routing.This shouldn't cause any functional changes, Pages Functions filepath-routing now uses esbuild to find exports.
-
#419
04f4332Thanks @Electroid! - refactor: use esbuild's message formatting for cleaner error messagesThis is the first step in making a standard format for error messages. For now, this uses esbuild's error formatting, which is nice and colored, but we could decide to customize our own later. Moreover, we should use the
parseJSON,parseTOML, andreadFileutilities so there are pretty errors for any configuration.
-
#501
824d8c0Thanks @petebacondarwin! - refactor: delegate deprecatedpreviewcommand todevif possibleThe
previewcommand is deprecated and not supported in this version of Wrangler. Instead, one should use thedevcommand for mostpreviewuse-cases.This change attempts to delegate any use of
previewtodevfailing if the command line contains positional arguments that are not compatible withdev.Resolves #9
-
#541
371e6c5Thanks @threepointone! - chore: refactor some common code intorequireAuth()There was a common chunk of code across most commands that ensures a user is logged in, and retrieves an account ID. I'd resisted making this into an abstraction for a while. Now that the codebase is stable, and https://github.com/cloudflare/workers-sdk/pull/537 removes some surrounding code there, I made an abstraction for this common code as
requireAuth(). This gets a mention in the changelog simply because it touches a bunch of code, although it's mostly mechanical deletion/replacement.
- #551
afd4b0eThanks @petebacondarwin! - fix: do not log thenullreturned fromkv:bulk putandkv:bulk delete
-
#503
e5c7ed8Thanks @petebacondarwin! - refact: consolidate onwswebsocket libraryRemoves the
faye-websocketlibrary and useswsacross the code base.
-
#502
b30349aThanks @petebacondarwin! - fix(pages): ensure remaining args passed topages devcommand are capturedIt is common to pass additional commands to
pages devto generate the input source. For example:npx wrangler pages dev -- npm run devPreviously the args after
--were being dropped. This change ensures that these are captured and used correctly.Fixes #482
-
#512
b093df7Thanks @threepointone! - feat: a bettertsconfig.jsonThis makes a better
tsconfig.jsonwhen usingwrangler init. Of note, it takes the defaulttsconfig.jsongenerated bytsc --init, and adds our modifications.
-
#510
9534c7fThanks @threepointone! - feat:--legacy-envcli arg /legacy_envconfigThis is the first of a few changes to codify how we do environments in wrangler2, both older legacy style environments, and newer service environments. Here, we add a cli arg and a config field for specifying whether to enable/disable legacy style environments, and pass it on to dev/publish commands. We also fix how we were generating kv namespaces for Workers Sites, among other smaller fixes.
-
#549
3d2ce01Thanks @petebacondarwin! - fix: kv:bulk should JSON encode its contentsThe body passed to
kv:bulk deleteandkv:bulk putmust be JSON encoded. This change fixes that and adds some tests to prove it.Fixes #547
-
#554
6e5319bThanks @petebacondarwin! - fix: limit bulk delete API requests to batches of 5,000The
kv:bulk deletecommand now batches up delete requests in groups of 5,000, displaying progress for each request.
-
#538
4b6c973Thanks @threepointone! - feat: withwrangler init, create a new directory for named workersCurrently, when creating a new project, we usually first have to create a directory before running
wrangler init, since it defaults to creating thewrangler.toml,package.json, etc in the current working directory. This fix introduces an enhancement, where using thewrangler init [name]form creates a directory named[name]and initialises the project files inside it. This matches the usage pattern a little better, and still preserves the older behaviour when we're creating a worker inside existing projects.
-
#548
e3cab74Thanks @petebacondarwin! - refactor: clean up unnecessary async functionsThe
readFile()andreadConfig()helpers do not need to be async. Doing so just adds complexity to their call sites.
-
#529
9d7e946Thanks @petebacondarwin! - feat: add more comprehensive config validation checkingThe configuration for a Worker is complicated since we can define different "environments", and each environment can have its own configuration. There is a default ("top-level") environment and then named environments that provide environment specific configuration.
This is further complicated by the fact that there are three kinds of environment configuration:
- non-overridable: these values are defined once in the top-level configuration, apply to all environments and cannot be overridden by an environment.
- inheritable: these values can be defined at the top-level but can also be overridden by environment specific values. Named environments do not need to provide their own values, in which case they inherit the value from the top-level.
- non-inheritable: these values must be explicitly defined in each environment if they are defined at the top-level. Named environments do not inherit such configuration and must provide their own values.
All configuration values in
wrangler.tomlare optional and will receive a default value if not defined.This change adds more strict interfaces for top-level
ConfigandEnvironmenttypes, as well as validation and normalization of the optional fields that are read fromwrangler.toml.
-
#486
ff8c9f6Thanks @threepointone! - fix: remove warning if worker with a durable object doesn't have a nameWe were warning if you were trying to develop a durable object with an unnamed worker. Further, the internal api would actually throw if you tried to develop with a named worker if it wasn't already published. The latter is being fixed internally and should live soon, and this fix removes the warning completely.
0.0.17
Patch Changes
-
#414
f30426fThanks @petebacondarwin! - fix: supportbuild.upload.dirwhen usingbuild.upload.mainAlthough,
build.upload.diris deprecated, we should still support using it when the entry-point is being defined by thebuild.upload.mainand the format ismodules.Fixes #413
-
#447
2c5c934Thanks @threepointone! - fix: Config should be resolved relative to the entrypointDuring
devandpublish, we should resolvewrangler.tomlstarting from the entrypoint, and then working up from there. Currently, we start from the directory from which we callwrangler, this changes that behaviour to start from the entrypoint instead.(To implement this, I made one big change: Inside commands, we now have to explicitly read configuration from a path, instead of expecting it to 'arrive' coerced into a configuration object.)
- #472
804523aThanks @JacobMGEvans! - bugfix: Replace.destroy()onfaye-websocketswith.close()added: Interface to give faye same types as compliantwswith additional.pipe()implementation;.on("message" => fn)
- #462
a173c80Thanks @caass! - Add filtering to wrangler tail, so you can nowwrangler tail <name> --status ok, for example. Supported options:--status cancelled --status error--> you can filter onok,error, andcancelledto only tail logs that have that status--header X-CUSTOM-HEADER:somevalue--> you can filter on headers, including ones that have specific values ("somevalue") or just that contain any header (e.g.--header X-CUSTOM-HEADERwith no colon)--method POST --method PUT--> filter on the HTTP method used to trigger the worker--search catch-this--> only shows messages that contain the phrase"catch-this". Does not (yet!) support regular expressions--ip self --ip 192.0.2.232--> only show logs from requests that originate from the given IP addresses."self"will be replaced with the IP address of the computer that sent the tail request.
- #471
21cde50Thanks @caass! - Add tests for wrangler tail:- ensure the correct API calls are made
- ensure that filters are sent
- ensure that the correct filters are sent
- ensure that JSON gets spat out into the terminal
-
#398
40d9553Thanks @threepointone! - feat: guess-worker-formatThis formalises the logic we use to "guess"/infer what a worker's format is - either "modules" or "service worker". Previously we were using the output of the esbuild process metafile to infer this, we now explicitly do so in a separate step (esbuild's so fast that it doesn't have any apparent performance hit, but we also do a simpler form of the build to get this information).
This also adds
--formatas a command line arg forpublish.
-
#438
64d62beThanks @Electroid! - feat: Add support for "json" bindingsDid you know? We have support for "json" bindings! Here are a few examples:
[vars] text = "plain ol' string" count = 1 complex = { enabled = true, id = 123 }
- #422
ef13735Thanks @threepointone! - chore: renameopen-in-brower.tstoopen-in-browser.ts
-
#411
a52f0e0Thanks @ObsidianMinor! - feat: unsafe-bindingsAdds support for "unsafe bindings", that is, bindings that aren't supported by wrangler, but are desired when uploading a Worker to Cloudflare. This allows you to use beta features before official support is added to wrangler, while also letting you migrate to proper support for the feature when desired. Note: these bindings may not work everywhere, and may break at any time.
-
#415
d826f5aThanks @threepointone! - fix: don't crash when browser windows don't openWe open browser windows for a few things; during
wrangler dev, and logging in. There are environments where this doesn't work as expected (like codespaces, stackblitz, etc). This fix simply logs an error instead of breaking the flow. This is the same fix as https://github.com/cloudflare/workers-sdk/pull/263, now applied to the rest of wrangler.
-
91d8994Thanks @Mexican-Man! - fix: do not merge routes with different methods when computing pages routesFixes #92
- #474
bfedc58Thanks @JacobMGEvans! - bugfix: createreporting.tomlfile in "wrangler/config" and move error reporting user decisions to newreporting.toml
-
#445
d5935e7Thanks @threepointone! - chore: removeexperimental_servicesfrom configurationNow that we have
[[unsafe.bindings]](as of https://github.com/cloudflare/workers-sdk/pull/411), we should use that for experimental features. This removes support for[experimental_services], and adds a helpful message for how to rewrite their configuration.This error is temporary, until the internal teams that were using this rewrite their configs. We'll remove it before GA.
What the error looks like -
Error: The "experimental_services" field is no longer supported. Instead, use [[unsafe.bindings]] to enable experimental features. Add this to your wrangler.toml: [[unsafe.bindings]] name = "SomeService" type = "service" service = "some-service" environment = "staging" [[unsafe.bindings]] name = "SomeOtherService" type = "service" service = "some-other-service" environment = "qa"
-
#456
b5f42c5Thanks @threepointone! - chore: enablestrictintsconfig.jsonIn the march towards full strictness, this enables
strictintsconfig.jsonand fixes the errors it pops up. A changeset is included because there are some subtle code changes, and we should leave a trail for them.
- #448
b72a111Thanks @JacobMGEvans! - feat: add--yeswith alias--yflag as automatic answer to all prompts and runwrangler initnon-interactively. generated during setup:- package.json
- TypeScript, which includes tsconfig.json &
@cloudflare/workers-types - Template "hello world" Worker at src/index.ts
- #403
f9fef8fThanks @JacobMGEvans! - feat: add scripts to package.json & autogenerate name value when initializing a project To get wrangler init projects up and running with good ergonomics for deploying and development, added default scripts "start" & "deploy" with assumed TS or JS files in generated ./src/index. The name property is now derived from user input oninit <name>or parent directory if no input is provided.
-
#452
1cf6701Thanks @petebacondarwin! - feat: add support for publishing workers with r2 bucket bindingsThis change adds the ability to define bindings in your
wrangler.tomlfile for R2 buckets. These buckets will then be available in the environment passed to the worker at runtime.Closes #365
-
#458
a8f97e5Thanks @petebacondarwin! - fix: do not publish to workers.dev if workers_dev is falsePreviously we always published to the workers.dev subdomain, ignoring the
workers_devsetting in thewrangler.tomlconfiguration.Now we respect this configuration setting, and also disable an current workers.dev subdomain worker when we publish and
workers_devisfalse.Fixes #410
-
#457
b249e6fThanks @threepointone! - fix: don't report intentional errorsWe shouldn't be reporting intentional errors, only exceptions. This removes reporting for all caught errors for now, until we filter all known errors, and then bring back reporting for unknown errors. We also remove a stray
console.warn().
- #402
5a9bb1dThanks @JacobMGEvans! - feat: Added Wrangler TOML fields Additional field to get projects ready to publish as soon as possible. It will check if the Worker is named, if not then it defaults to using the parent directory name.
-
#227
97e15f5Thanks @JacobMGEvans! - feature: Sentry Integration Top level exception logging which will allow to Pre-empt issues, fix bugs faster, Identify uncommon error scenarios, and better quality error information. Context includes of Error in addition to stacktrace Environment: OS/arch node/npm versions wrangler version RewriteFrames relative pathing of stacktrace and will prevent user file system information from being sent.Sourcemaps:
- The sourcemap custom scripts for path matching in Artifact, Sentry Event and Build output is moved to be handled in GH Actions Sentry upload moved after changeset version bump script and npm script to get current version into GH env variable
- Add org and project to secrets for increased obfuscation of Cloudflare internal ecosystem
Prompt for Opt-In:
- When Error is thrown user will be prompted with yes (only sends this time), Always, and No (default). Always and No will be added to default.toml with a datetime property for future update checks.
- If the property already exists it will skip the prompt.
Sentry Tests: The tests currently check that the decision flow works as currently set up then checks if Sentry is able to send events or is disabled.
-
#427
bce731aThanks @petebacondarwin! - refactor: share worker bundling between bothpublishanddevcommandsThis changes moves the code that does the esbuild bundling into a shared file and updates the
publishanddevto use it, rather than duplicating the behaviour.See #396 Resolves #401
-
#458
c0cfd60Thanks @petebacondarwin! - fix: pass correct query param when uploading a scriptIn f9c1423f0c5b6008f05b9657c9b84eb6f173563a the query param was incorrectly changed from
available_on_subdomaintoavailable_on_subdomains.
-
#432
78acd24Thanks @threepointone! - feat: import.wasmmodules in service worker format workersThis allows importing
.wasmmodules in service worker format workers. We do this by hijacking imports to.wasmmodules, and instead registering them under[wasm_modules](building on the work from https://github.com/cloudflare/workers-sdk/pull/409).
-
#409
f8bb523Thanks @threepointone! - feat: support[wasm_modules]for service-worker format workersThis lands support for
[wasm_modules]as defined by https://github.com/cloudflare/wrangler-legacy/pull/1677.wasm modules can be defined in service-worker format with configuration in wrangler.toml as -
[wasm_modules] MYWASM = "./path/to/my-wasm.wasm"The module will then be available as the global
MYWASMinside your code. Note that this ONLY makes sense in service-worker format workers (for now).(In the future, we MAY enable wasm module imports in service-worker format (i.e.
import MYWASM from './path/to/my-wasm.wasm') and global imports inside modules format workers.)
-
#423
dd9058dThanks @petebacondarwin! - feat: add support for managing R2 bucketsThis change introduces three new commands, which manage buckets under the current account:
r2 buckets list: list information about all the buckets.r2 buckets create: create a new bucket - will error if the bucket already exists.r2 buckets delete: delete a bucket.
This brings Wrangler 2 inline with the same features in Wrangler v1.
-
#455
80aa106Thanks @threepointone! - fix: error when entry doesn't existThis adds an error when we use an entry point that doesn't exist, either for
wrangler devorwrangler publish, and either via cli arg orbuild.upload.maininwrangler.toml. By using a common abstraction fordevandpublish, This also adds support for usingbuild.config.main/build.config.dirforwrangler dev.
0.0.16
Patch Changes
- #364
3575892Thanks @threepointone! - enhance: small tweaks towrangler init- A slightly better
package.json - A slightly better
tsconfig.json - installing
typescriptas a dev dependency
- A slightly better
-
#380
aacd1c2Thanks @GregBrimble! - fix: ensure pages routes are defined correctlyIn e151223 we introduced a bug where the RouteKey was now an array rather than a simple URL string. When it got stringified into the routing object these were invalid. E.g.
[':page*', undefined]got stringified to":page*,"rather than":page*".Fixes #379
- #329
27a1f3bThanks @petebacondarwin! - ci: run PR jobs on both Ubuntu, MacOS and Windows- update .gitattributes to be consistent on Windows
- update Prettier command to ignore unknown files Windows seems to be more brittle here.
- tighten up eslint config Windows seems to be more brittle here as well.
- use the matrix.os value in the cache key
Previously we were using
running.osbut this appeared not to be working.
-
#347
ede5b22Thanks @threepointone! - fix: hidewrangler pages functionsin the main help menuThis hides
wrangler pages functionsin the main help menu, since it's only intended for internal usage right now. It still "works", so nothing changes in that regard. We'll bring this back when we have a broader story in wrangler for functions.
-
#360
f590943Thanks @threepointone! - fix:kv:key getThe api for fetching a kv value, unlike every other cloudflare api, returns just the raw value as a string (as opposed to the
FetchResult-style json). However, our fetch utility tries to convert every api response to json before parsing it further. This leads to bugs like https://github.com/cloudflare/workers-sdk/issues/359. The fix is to special case forkv:key get.
-
#373
6e7baf2Thanks @petebacondarwin! - fix: use the appropriate package manager when initializing a wrangler projectPreviously, when we initialized a project using
wrangler init, we always used npm as the package manager.Now we check to see whether npm and yarn are actually installed, and also whether there is already a lock file in place before choosing which package manager to use.
Fixes #353
-
#363
0add2a6Thanks @threepointone! - fix: support uppercase hotkeys inwrangler devJust a quick fix to accept uppercase hotkeys during
dev.
-
#331
e151223Thanks @petebacondarwin! - fix: generate valid URL route paths for pages on WindowsPreviously route paths were manipulated by file-system path utilities. On Windows this resulted in URLs that had backslashes, which are invalid for such URLs.
Fixes #51 Closes #235 Closes #330 Closes #327
-
#338
e0d2f35Thanks @threepointone! - feat: environments for Worker SitesThis adds environments support for Workers Sites. Very simply, it uses a separate kv namespace that's indexed by the environment name. This PR also changes the name of the kv namespace generated to match Wrangler v1's implementation.
-
#329
e1d2198Thanks @petebacondarwin! - test: support testing in CI on Windows-
Don't rely on bash variables to configure tests The use of bash variables in the
npm testscript is not supported in Windows Powershell, causing CI on Windows to fail. These bash variables are used to override the API token and the Account ID.This change moves the control of mocking these two concepts into the test code, by adding
mockAccountId()andmockApiToken()helpers.- The result is slightly more boilerplate in tests that need to avoid hitting the auth APIs.
- But there are other tests that had to revert these environment variables. So the boilerplate is reduced there.
-
Sanitize command line for snapshot tests This change applies
normalizeSlashes()andtrimTimings()to command line outputs and error messages to avoid inconsistencies in snapshots. The benefit here is that authors do not need to keep adding them to all their snapshot tests. -
Move all the helper functions into their own directory to keep the test directory cleaner.
-
- #380
aacd1c2Thanks @GregBrimble! - refactor: clean up pages routing
-
#343
cfd8ba5Thanks @threepointone! - chore: update esbuildUpdate esbuild to 0.14.14. Also had to change
import esbuild from "esbuild";toimport * as esbuild from "esbuild";indev.tsx.
-
#371
85ceb84Thanks @nrgnrg! - fix: pages advanced mode usagePreviously in pages projects using advanced mode (a single
_worker.jsor--script-pathfile rather than a./functionsfolder), callingpages devwould quit without an error and not launch miniflare.This change fixes that and enables
pages devto be used with pages projects in advanced mode.
-
#383
969c887Thanks @threepointone! - fix: remove redundant process.cwd() calls inwrangler initFollowup from https://github.com/cloudflare/workers-sdk/pull/372#discussion_r798854509, just removing some unnecessary calls to
process.cwd()/path.join(), since they're already relative to where they're called from.
-
#329
ac168f4Thanks @petebacondarwin! - refactor: use helpers to manage npm commandsThis change speeds up tests and avoids us checking that npm did what it is supposed to do.
-
#348
b8e3b01Thanks @threepointone! - chore: replacenode-fetchwithundiciThere are several reasons to replace
node-fetchwithundici:undici'sfetch()implementation is set to become node's standardfetch()implementation, which means we can just remove the dependency in the future (or optionally load it depending on which version of node is being used)node-fetchpollutes the global type space with a number of standard types- we already bundle
undiciviaminiflare/pages, so this means our bundle size could ostensibly become smaller.
This replaces
node-fetchwithundici.- All instances of
import fetch from "node-fetch"are replaced withimport {fetch} from "undici" undicialso comes with spec compliant forms ofFormDataandFile, so we could also removeformdata-nodeinform_data.ts- All the global types that were injected by
node-fetchare now imported fromundici(as well as some mistaken ones fromnode:url) - NOTE: this also turns on
skipLibCheckintsconfig.json. Some dependencies oddly depend on browser globals likeRequest,Response(like@miniflare/core,jest-fetch-mock, etc), which now fail becausenode-fetchisn't injecting those globals anymore. So we enableskipLibCheckto bypass them. (I'd thoughtskipLibCheckcompletely ignores 'third party' types, but that's not true - it still uses the module graph to scan types. So we're still typesafe. We should enablestrictsometime to avoidanys, but that's for later.) - The bundle size isn't smaller because we're bundling 2 different versions of
undici, but we'll fix that by separately upping the version ofundicithat miniflare bundles.
-
#357
41cfbc3Thanks @threepointone! - chore: add eslint-plugin-import- This adds
eslint-plugin-importto enforce ordering of imports, and configuration for the same inpackage.json. - I also run
npm run check:lint -- --fixto apply the configured order in our whole codebase. - This also needs a setting in
.vscode/settings.jsonto prevent spurious warnings inside vscode. You'll probably have to restart your IDE for this to take effect. (re: https://github.com/import-js/eslint-plugin-import/issues/2377#issuecomment-1024800026)
(I'd also like to enforce using
node:prefixes for node builtin modules, but that can happen later. For now I manually added the prefixes wherever they were missing. It's not functionally any different, but imo it helps the visual grouping.) - This adds
-
#372
05dbb0dThanks @threepointone! - feat:wrangler initoffers to create a starter workerWe got feedback that
wrangler initfelt incomplete, because the immediate next thing folks need is a starter source file. So this adds another step towrangler initwhere we offer to create that file for you.
-
#384
8452485Thanks @petebacondarwin! - refactor: use xxhash-wasm for better compatibility with WindowsThe previous xxhash package we were using required a build step, which relied upon tooling that was not always available on Window.
This version is a portable WASM package.
-
#334
536c7e5Thanks @threepointone! - feat: wasm support for local mode inwrangler devThis adds support for
*.wasmmodules into local mode forwrangler dev.In 'edge' mode, we create a javascript bundle, but wasm modules are uploaded to the preview server directly when making the worker definition form upload. However, in 'local' mode, we need to have the actual modules available to the bundle. So we copy the files over to the bundle path. We also pass appropriate
--modules-ruledirective tominiflare.I also added a sample wasm app to use for testing, created from a default
workers-rsproject.
-
#329
b8a3e78Thanks @petebacondarwin! - ci: usenpm ciand do not cache workspace packages in node_modulesPreviously we were caching all the
node_modulesfiles in the CI jobs and then runningnpm install. While this resulted in slightly improved install times on Ubuntu, it breaks on Windows because the npm workspace setup adds symlinks into node_modules, which the Github cache action cannot cope with.This change removes the
node_modulescaches (saving some time by not needing to restore them) and replacesnpm installwithnpm ci.The
npm cicommand is actually designed to be used in CI jobs as it only installs the exact versions specified in thepackage-lock.jsonfile, guaranteeing that for any commit we always have exactly the same CI job run, deterministically.It turns out that, on Ubuntu, using
npm cimakes very little difference to the installation time (~30 secs), especially if there is nonode_modulesthere in the first place.Unfortunately, MacOS is slower (~1 min), and Windows even worse (~2 mins)! But it is worth this longer CI run to be sure we have things working on all OSes.
0.0.15
Patch Changes
-
#333
6320a32Thanks @threepointone! - fix: pass worker name to syncAssets indevThis fix passes the correct worker name to
syncAssetsduringwrangler dev. This function uses the name to create the backing kv store for a Workers Sites definition, so it's important we get the name right.I also fixed the lint warning introduced in https://github.com/cloudflare/workers-sdk/pull/321, to pass
props.enableLocalPersistenceas a dependency in theuseEffectcall that starts the "local" mode dev server.
-
#335
a417cb0Thanks @threepointone! - fix: prevent infinite loop when fetching a list of resultsWhen fetching a list of results from cloudflare APIs (e.g. when fetching a list of keys in a kv namespace), the api returns a
cursorthat a consumer should use to get the next 'page' of results. It appears this cursor can also be a blank string (while we'd only account for it to beundefined). By only accounting for it to beundefined, we were infinitely looping through the same page of results and never terminating. This PR fixes it by letting it be a blank string (andnull, for good measure)
-
#332
a2155c1Thanks @threepointone! - fix: wait for port to be available before creating a dev serverWhen we run
wrangler dev, we start a server on a port (defaulting to 8787). We do this separately for both local and edge modes. However, when switching between the two with thelhotkey, we don't 'wait' for the previous server to stop before starting the next one. This can crash the process, and we don't want that (of course). So we introduce a helper functionwaitForPortToBeAvailable()that waits for a port to be available before returning. This is used in both the local and edge modes, and prevents the bug right now, where switching between edge - local - edge crashes the process.(This isn't a complete fix, and we can still cause errors by very rapidly switching between the two modes. A proper long term fix for the future would probably be to hoist the proxy server hook above the
<Remote/>and<Local/>components, and use a single instance throughout. But that requires a deeper refactor, and isn't critical at the moment.)
-
#336
ce61000Thanks @threepointone! - feat: inline text-like files into the worker bundleWe were adding text-like modules (i.e.
.txt,.htmland.pemfiles) as separate modules in the Worker definition, but this only really 'works' with the ES module Worker format. This commit changes that to inline the text-like files into the Worker bundle directly.We still have to do something similar with
.wasmmodules, but that requires a different fix, and we'll do so in a subsequent commit.
-
#336
ce61000Thanks @threepointone! - feat: Sites support for local modewrangler devThis adds support for Workers Sites in local mode when running wrangler
dev. Further, it fixes a bug where we were sending the__STATIC_CONTENT_MANIFESTdefinition as a separate module even with service worker format, and a bug where we weren't uploading the namespace binding when other kv namespaces weren't present.
0.0.14
Patch Changes
-
#307
53c6318Thanks @threepointone! - feat:wrangler secret * --localThis PR implements
wrangler secretfor--localmode. The implementation is simply a no-op, since we don't want to actually write secret values to disk (I think?). I also got the messaging for remote mode right by copying from Wrangler v1. Further, I added tests for all thewrangler secretcommands.
- #324
b816333Thanks @GregBrimble! - Fixeswrangler pages devfailing to start for just a folder of static assets (no functions)
-
#317
d6ef61aThanks @threepointone! - fix: restart thedevproxy server whenever it closesWhen we run
wrangler dev, the session that we setup with the preview endpoint doesn't last forever, it dies after ignoring it for 5-15 minutes or so. The fix for this is to simply reconnect the server. So we use a state hook as a sigil, and add it to the dependency array of the effect that sets up the server, and simply change it every time the server closes.Fixes https://github.com/cloudflare/workers-sdk/issues/197
(In Wrangler v1, we used to restart the whole process, including uploading the worker again, making a new preview token, and so on. It looks like that they may not have been necessary.)
-
#312
77aa324Thanks @threepointone! - fix: remove--prefer-offlinewhen runningnpm installWe were using
--prefer-offlinewhen runningnpm installduringwrangler init. The behaviour is odd, it doesn't seem to fetch from the remote when the cache isn't hit, which is not what I'm expecting. So we remove--prefer-offline.
-
#311
a5537f1Thanks @threepointone! - fix: custom builds should allow multiple commandsWe were running custom builds as a regular command with
execa. This would fail whenever we tried to run compound commands likecargo install -q worker-build && worker-build --release(via https://github.com/cloudflare/workers-sdk/issues/236). The fix is to useshell: true, so that the command is run in a shell and can thus use bash-y syntax like&&, and so on. I also switched to usingexecaCommandwhich splits a command string into parts correctly by itself.
-
#321
5b64a59Thanks @geelen! - fix: disable local persistence by default & add--experimental-enable-local-persistenceflagBREAKING CHANGE:
When running
devlocally any data stored in KV, Durable Objects or the cache are no longer persisted between sessions by default.To turn this back on add the
--experimental-enable-local-persistenceat the command line.
0.0.13
Patch Changes
-
#293
71b0fabThanks @petebacondarwin! - fix: warn if thesite.entry-pointconfiguration is found during publishingAlso updates the message and adds a test for the error when there is no entry-point specified.
Fixes #282
-
#304
7477b52Thanks @threepointone! - feat: enhancewrangler initThis PR adds some enhancements/fixes to the
wrangler initcommand.- doesn't overwrite
wrangler.tomlif it already exists - installs
wranglerwhen creatingpackage.json - offers to install
wranglerintopackage.jsoneven ifpackage.jsonalready exists - offers to install
@cloudflare/workers-typeseven iftsconfig.jsonalready exists - pipes stdio back to the terminal so there's feedback when it's installing npm packages
This does have the side effect of making out tests slower. I added
--prefer-offlineto thenpm installcalls to make this a shade quicker, but I can't figure out a good way of mocking these. I'll think about it some more later. We should work on making the installs themselves quicker (re: https://github.com/cloudflare/workers-sdk/issues/66)This PR also fixes a bug with our tests -
runWranglerwould catch thrown errors, and if we didn't manually verify the error, tests would pass. Instead, it now throws correctly, and I modified all the tests to assert on thrown errors. It seems like a lot, but it was just mechanical rewriting. - doesn't overwrite
-
#294
7746fbaThanks @threepointone! - feature: add more types that get logged viaconsolemethodsThis PR adds more special logic for some data types that get logged via
consolemethods. Types likePromise,Date,WeakMaps, and some more, now get logged correctly (or at least, better than they used to).This PR also fixes a sinister bug - the
typeof theConsoleAPICalledevents don't match 1:1 with actual console methods (eg:console.warnmessage type iswarning). This PR adds a mapping between those types and method names. Some methods don't seem to have a message type, I'm not sure why, but we'll get to them later.
-
#310
52c99eeThanks @threepointone! - feat: error if a site definition doesn't have abucketfieldThis adds an assertion error for making sure a
[site]definition always has abucketfield.As a cleanup, I made some small fixes to theConfigtype definition, and modified the tests inpublish.test.tsto use the config format when creating awrangler.tomlfile.
0.0.12
Patch Changes
-
#292
e5d3690Thanks @threepointone! - fix: use entrypoint specified in esbuuild's metafile as source for building the workerWhen we pass a non-js file as entry to esbuild, it generates a
.jsfile. (which, is the whole job of esbuild, haha). So, given<source>/index.ts, it'll generate<destination>/index.js. However, when we try to 'find' the matching file to pass on as an input to creating the actual worker, we try to use the original file name inside the destination directory. At this point, the extension has changed, so it doesn't find the file, and hence we get the error that looks likeENOENT: no such file or directory, open '/var/folders/3f/fwp6mt7n13bfnkd5vl3jmh1w0000gp/T/tmp-61545-4Y5kwyNI8DGU/src/worker.ts'The actual path to the destination file is actually the key of the block in
metafile.outputsthat matches the given output.entryPoint, so this PR simply rewrites the logic to use that instead.
-
#287
b63efe6Thanks @threepointone! - fix: propagate api errors to the terminal correctlyAny errors embedded in the response from the Cloudflare API were being lost, because
fetchInternal()would throw on a non-200 response. This PR fixes that behaviour:- It doesn't throw on non-200 responses
- It first gets the response text with
.text()and converts it to an object withJSON.parse, so in case the api returns a non json response, we don't lose response we were sent.
Unfortunately, because of the nature of this abstraction, we do lose the response
statuscode andstatusText, but maybe that's acceptable since we have richer error information in the payload. I considered logging the code and text to the terminal, but that may make it noisy.
0.0.11
Patch Changes
- #242
014a731Thanks @petebacondarwin! - Refactor pages code to pass strict-null checks
-
#267
e22f9d7Thanks @petebacondarwin! - refactor: tidy up the typings of the build result in devIn #262 some of the strict null fixes were removed to resolve a regression. This refactor re-applies these fixes in a way that avoids that problem.
- #284
20377e8Thanks @petebacondarwin! - Add whoami command
- #270
2453577Thanks @petebacondarwin! - feat: add support for include and exclude when publishing site assets
-
#270
0289882Thanks @petebacondarwin! - fix: ensurekv:key listmatches the output from Wrangler v1The previous output was passing an array of objects to console.log, which ended up showing something like
[Object object] [Object object] ...Now the result is JSON stringified before being sent to the console. The tests have been fixed to check this too.
-
#258
f9c1423Thanks @petebacondarwin! - fix: correctly handle entry-point path when publishingThe
publishcommand was failing when the entry-point was specified in the wrangler.toml file and the entry-point imported another file.This was because we were using the
metafile.inputsto guess the entry-point file path. But the order in which the source-files were added to this object was not well defined, and so we could end up failing to find a match.This fix avoids this by using the fact that the
metadata.outputsobject will only contain one element that has theentrypointproperty - and then using that as the entry-point path. For runtime safety, we now assert that there cannot be zero or multiple such elements.
-
#275
e9ab55aThanks @petebacondarwin! - feat: add a link to create a github issue when there is an error.When a (non-yargs) error surfaces to the top level, we know also show a link to Github to encourage the developer to report an issue.
-
#286
b661dd0Thanks @dependabot! - chore: Updatenode-fetchto 3.1.1, runnpm audit fixin rootThis commit addresses a secutity issue in
node-fetchand updates it to 3.1.1. I also rannpm audit fixin the root directory to address a similar issue with@changesets/get-github-info.
-
#249
9769bc3Thanks @petebacondarwin! - Do not crash when processing environment configuration.Previously there were corner cases where the configuration might just crash. These are now handled more cleanly with more appropriate warnings.
-
#272
5fcef05Thanks @petebacondarwin! - refactor: enable TypeScript strict-null checksThe codebase is now strict-null compliant and the CI checks will fail if a PR tries to introduce code that is not.
- #277
6cc9ddeThanks @petebacondarwin! - fix: align publishing sites asset keys with Wrangler v1- Use the same hashing strategy for asset keys (xxhash64)
- Include the full path (from cwd) in the asset key
- Match include and exclude patterns against full path (from cwd)
- Validate that the asset key is not over 512 bytes long
-
#270
522d1a6Thanks @petebacondarwin! - fix: check actual asset file size, not base64 encoded sizePreviously we were checking whether the base64 encoded size of an asset was too large (>25MiB). But base64 takes up more space than a normal file, so this was too aggressive.
- #263
402c77dThanks @jkriss! - fix: appropriately fail silently when the open browser command doesn't work
-
#280
f19dde1Thanks @petebacondarwin! - fix: skip unwanted files and directories when publishing site assetsIn keeping with Wrangler v1, we now skip node_modules and hidden files and directories.
An exception is made for
.well-known. See https://datatracker.ietf.org/doc/html/rfc8615.The tests also prove that the asset uploader will walk directories in general.
-
#258
ba6fc9cThanks @petebacondarwin! - chore: add test-watch script to the wrangler workspaceWatch the files in the wrangler workspace, and run the tests when anything changes:
> npm run test-watch -w wranglerThis will also run all the tests in a single process (rather than in parallel shards) and will increase the test-timeout to 50 seconds, which is helpful when debugging.
0.0.10
Patch Changes
0.0.9
Patch Changes
- #243
dc7ce83Thanks @petebacondarwin! - refactor: update test code to pass strict-null checks
- #244
2e7a75fThanks @petebacondarwin! - refactor: update dev and publish commands to pass strict-null checks
-
#238
65f9904Thanks @threepointone! - refactor: simplify and documentconfig.tsThis PR cleans up the type definition for the configuration object, as well as commenting the hell out of it. There are no duplicate definitions, and I annotated what I could.
@optionalmeans providing a value isn't mandatory@deprecatedmeans the field itself isn't necessary anymore in wrangler.toml@breakingmeans the deprecation/optionality is a breaking change from Wrangler v1@todomeans there's more work to be done (with details attached)@inheritedmeans the field is copied to all environments
- #247
edc4b53Thanks @petebacondarwin! - refactor: update miscellaneous source files to pass strict-null checks
- #248
5806932Thanks @petebacondarwin! - refactor: update proxy code to pass strict-null checks
- #241
5d423e9Thanks @petebacondarwin! - chore: add common words to the cSpell config to prevent unwanted warnings
-
#257
00e51cdThanks @threepointone! - fix: description forkv:bulk delete <filename>The description for the
kv:bulk deletecommand was wrong, it was probably copied earlier from thekv:bulk putcommand. This PR fixes the mistake.
-
#262
7494cf7Thanks @threepointone! - fix: fixdevandpublishWe introduced some bugs in recent PRs
- In https://github.com/cloudflare/workers-sdk/pull/196, we broke being able to pass an entrypoint directly to the cli. In this PR, I just reverted that fix. I'll reopen https://github.com/cloudflare/workers-sdk/issues/78 and we'll tackle it again later. (cc @jgentes)
- In https://github.com/cloudflare/workers-sdk/pull/215, we broke being able to publish a script by just passing
--latestor--compatibility-datain the cli. This PR fixes that by reading the correct argument when choosing whether to publish. - In https://github.com/cloudflare/workers-sdk/pull/247, we broke how we made requests by passing headers to requests. This PR reverts the changes made in
cfetch/internal.ts. (cc @petebacondarwin) - In https://github.com/cloudflare/workers-sdk/pull/244, we broke
devand it would immediately crash. This PR fixes the reference indev.tsxthat was breaking. (cc @petebacondarwin)
- #250
3c74a4aThanks @petebacondarwin! - refactor: update inspector code to ensure that strict-null types pass
0.0.8
Patch Changes
-
#231
18f8f65Thanks @threepointone! - refactor: proxy/preview serverThis PR refactors how we setup the proxy server between the developer and the edge preview service during
wrangler dev. Of note, we start the server immediately. We also buffer requests/streams and hold on to them, when starting/refreshing the token. This means a developer should never seeERR_CONNECTION_REFUSEDerror page, or have an older worker respond after making a change to the code. And when the token does get refreshed, we flush said streams/requests with the newer values, making the iteration process a lot smoother and predictable.
- #239
0431093Thanks @Warfields! - Added prompt for users to select an account.
- #225
b901bf7Thanks @GregBrimble! - Fix the--watchcommand forwrangler pages functions build.
-
#208
fe4b099Thanks @petebacondarwin! - Remove explicitanytypes from the codebaseThis change removes all use of
anyfrom the code and updates theno-explicit-anyeslint rule to be an error.
- #223
a979d55Thanks @GregBrimble! - Add ability to compile a directory other thanfunctionsforwrangler pages functions build.
- #216
e1c615fThanks @GregBrimble! - Ignore non-JS files when compiling Pages Functions
- #217
777f4d5Thanks @GregBrimble! - Reverse execution order of Pages Functions middlewares
- #196
fc112d7Thanks @jgentes! - allow specifying only "index" without extension or nothing at all for "wrangler dev" and "wrangler publish"
- #211
3bbfd4fThanks @GregBrimble! - Silently fail to auto-open the browser inwrangler pages devcommand when that errors out.
-
#189
2f7e1b2Thanks @petebacondarwin! - Refactor raw value extraction from Cloudflare APIsMost API responses are JSON of the form:
{ result, success, errors, messages, result_info }where the
resultcontains the actual response value.But some API responses only contain the result value.
This change refactors the client-side fetch API to allow callers to specify what kind of response they expect.
- #202
e26781fThanks @threepointone! - Disable @typescript-lint/no-explicit-any eslint rule in pages code
- #214
79d0f2dThanks @threepointone! - rename--publicas--experimental-public
- #215
41d4c3eThanks @threepointone! - Add--compatibility-date,--compatibility-flags,--latestcli arguments todevandpublish.- A cli arg for adding a compatibility data, e.g
--compatibility_date 2022-01-05 - A shorthand
--latestthat setscompatibility_dateto today's date. Usage of this flag logs a warning. latestis NOT a config field inwrangler.toml.- In
dev, when a compatibility date is not available in eitherwrangler.tomlor as a cli arg, then we default to--latest. - In
publishwe error if a compatibility date is not available in eitherwrangler.tomlor as a cli arg. Usage of--latestlogs a warning. - We also accept compatibility flags via the cli, e.g:
--compatibility-flags formdata_parser_supports_files
- A cli arg for adding a compatibility data, e.g
-
#210
d381fedThanks @GregBrimble! - Exposewrangler pages functions buildcommand, which takes thefunctionsfolder and compiles it into a single Worker.This was already done in
wrangler pages dev, so this change just exposes this build command for use in our build image, or for people who want to do it themselves.
-
#213
5e1222aThanks @GregBrimble! - Adds support for building a Worker from a folder of functions which isn't tied to the Pages platform.This lets developers use the same file-based routing system an simplified syntax when developing their own Workers!
- #199
d9ecb70Thanks @threepointone! - Refactor inspection/debugging code -- I've installed devtools-protocol, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase.
- We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages.
- Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected.
- We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change)
-
#189
2f7e1b2Thanks @petebacondarwin! - Fix pagination handling of list requests to the Cloudflare APIWhen doing a list request to the API, the server may respond with only a single page of results. In this case, it will also provide a
cursorvalue in theresult_infopart of the response, which can be used to request the next page. This change implements this on the client-side so that we get all the results by requesting further pages when there is a cursor.
- #220
6fc2276Thanks @GregBrimble! - Add--live-reloadoption towrangler pages devwhich automatically reloads HTML pages when a change is detected
- #223
a979d55Thanks @GregBrimble! - Add--output-config-pathoption towrangler pages functions buildwhich writes a config file describing thefunctionsfolder.
0.0.7
Patch Changes
-
1fdcfe3: Subfolder Relative Pathing Fix issue #147 The filename from args didn't handle relative paths passed in from users with scripts in subfolders. To handle the subfolder pathing a path.relative using cwd() to user input filepath to the filepath variable passed into Dev
-
0330ecf: Adds the Content-Type header when serving assets with
wrangler pages dev. It guesses the mime-type based on the asset's file extension. -
eaf40e8: Improve the error message for bad
kv:namespace deletecommands -
562d3ad: chore: enable eslint's no-shadow rule
-
9cef492: Adds the logic of @cloudflare/pages-functions-compiler directly into wrangler. This generates a Worker from a folder of functions.
Also adds support for sourcemaps and automatically watching dependents to trigger a re-build.
-
3426c13: fix: prevent
useWorker's inifinite restarts duringdev -
e9a1820: Upgrade
miniflareto2.0.0-rc.5 -
7156e39: Pass bindings correctly to miniflare/child_process.spawn in
dev, to prevent miniflare from erroring out on startup -
ce2d7d1: Add experimental support for worker-to-worker service bindings. This introduces a new field in configuration
experimental_services, and serialises it when creating and uploading a worker definition. This is highly experimental, and doesn't work withwrangler devyet. -
072566f: Fixed KV getNamespaceId preview flag bug
-
5856807: Improve validation message for
kv:namespace createPreviously, if the user passed multiple positional arguments (which is invalid) the error message would suggest that these should be grouped in quotes. But this is also wrong, since a namespace binding name must not contain spaces.
-
34ad323: Refactor the way we convert configurations for bindings all the way through to the API where we upload a worker definition. This commit preserves the configuration structure (mostly) until the point we serialise it for the API. This prevents the way we use duck typing to detect a binding type when uploading, makes the types a bit simpler, and makes it easier to add other types of bindings in the future (notably, the upcoming service bindings.)
0.0.6
Patch Changes
- 421f2e4: Update base version to 0.0.5, copy the README to packages/wrangler
0.0.5
Patch Changes
-
cea27fe: don't log file contents when writing via
kv:key put <key> --path <path> -
b53cbc8: CI/CD
- Release flow triggered on PR's closed
-
43e7a82: When using
wrangler pages dev, enable source maps and log unhandled rejections -
c716abc: Error and exit if the
--typeoption is used for theinitcommand.The
--typeoption is no longer needed, nor supported.The type of a project is implicitly javascript, even if it includes a wasm (e.g. built from rust).
Projects that would have had the
webpacktype need to be configured separately to have a custom build. -
3752acf: Add support for websockets in
dev, i.e. when developing workers. This replaces the proxy layer that we use to connect to the 'edge' during preview mode, using thefaye-wesocketlibrary. -
c7bee70: Patches typing mismatches between us, undici and miniflare when proxying requests in pages dev, and also adds fallback 404 behavior which was missed
-
8b6c2d1: Add more fields to the
tsconfig.jsongenerated bywrangler init -
78cd080: Custom builds for
devandpublish -
cd05d20: import text file types into workers
-
1216fc9: Export regular functions from dialog.ts, pass tests (followup from https://github.com/cloudflare/workers-sdk/pull/124)
-
6fc4c50: Display error message when unknown command is provided to the wrangler CLI.
-
23543fe: Allow the developer to exit
initif there is already a toml file -
1df6b0c: enable @typescript-eslint/no-floating-promises, pass lint+type check
-
3c5725f: CI/CD Cleanup
- Removed the build step from tests, which should speed up the "Tests" Workflow.
- Added a branch specific trigger for "Release", now the Workflow for "Release" should only work on PRs closed to
main - Removed the "Changeset PR" Workflow. Now the "Release" Workflow will handle everything needed for Changesets.
-
fb0eae7: support importing
.wasmfiles /workers-rssupport -
e928f94: Improve support for package exports conditionals, including "worker" condition
-
43e7a82: Upgrade
miniflareto2.0.0-rc.4 -
f473942: Replaces the static asset server with a more faithful simulation of what happens with a production Pages project.
Also improves error handling and automatically opens the browser when running
wrangler pages dev.
0.0.0
Minor Changes
-
689cd55: CI/CD Improvements
Changeset
Adding configuration allows for use of CLI for changesets. A necessary supplement to the changesets bot, and GitHub Action.
- Installed Changeset CLI tool
- NPX changeset init
- Added changesets directory
- Config
- README
- Modified the config for
mainbranch instead ofmaster
ESLint & Prettier Integration
Running Prettier as a rule through ESLint to improve CI/CD usage
- Added additional TypeScript support for ESLint
- Prettier errors as ESLint rule
- .vscode directory w/ settings.json config added that enforces the usage of ESLint by anyone working in the workspace
Patch Changes
-
b0fcc7d: CI/CD Tests & Type Checking GH Workflow additions:
- Added Testing script
- Added Linting script
- tsc is using skipLibCheck as a current workaround
- TODO added for future removal
- Runs on every Pull Request instance
- Removed npm ci in favor of npm install
- Removed --prefer-offline in favor of local cache artifact
-
2f760f5: remove
--polyfill-node -
fd53780:
kv:key put: make only one ofvalueor--path <path>necessary -
dc41476: Added optional shortcuts
-
7858ca2: Removed NPM registry and timeout from CI
-
85b5020: Make
wrangler devwork with durable objects