chore(deps): update dependency wrangler to v4 #555
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.114.17→4.59.3Release Notes
cloudflare/workers-sdk (wrangler)
v4.59.3Compare Source
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:
#11942
133bf95Thanks @penalosa! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#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: #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:
#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]:v4.59.2Compare Source
Patch Changes
#11908
e78186dThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#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:
UND_ERR_CONNECT_TIMEOUT) - typically due to slow networks or connectivity issuesEPERM,EACCES) - caused by insufficient permissions, locked files, or antivirus softwareENOTFOUND) - caused by network connectivity issues or DNS configuration problems#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]:v4.59.1Compare Source
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.v4.59.0Compare Source
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:
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:
#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 to
tiers: [1, 2].Note that
constraintsis 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:
#11844
e574ef3Thanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#11872
b6148edThanks @dependabot! - chore: update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#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]:v4.58.0Compare Source
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:
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:
Updated dependencies [
97e67b9]:v4.57.0Compare Source
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:
The command returns whichever authentication method is currently configured:
wrangler login(automatically refreshed if expired)CLOUDFLARE_API_TOKENenvironment variableUse
--jsonto get structured output including the token type, which also supports API key/email authentication:This is similar to
gh auth tokenin the GitHub CLI.#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:
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:
--typesflag when runningwrangler dev.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 } }#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 specifiedThese 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 autoconfigPatch 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 namesto 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_keepThe 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 loggingUpdated dependencies [
65d1850,1615fce,b2769bf,554a4df,8eede3f,6a05b1c,62fd118,a7e9f80,eac5cf7]:v4.56.0Compare Source
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 expirationSnapshot expiration helps manage storage costs by automatically removing old table snapshots while keeping a minimum number of recent snapshots for recovery purposes.
Example usage:
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 projectsUpdated dependencies [
ae1ad22,737c0f4]:v4.55.0Compare Source
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 autoconfigPatch 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().Updated dependencies [
5d085fb,b75b710,1e9be12]:v4.54.0Compare Source
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:
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 sshcommandPatch 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.
Updated dependencies [
31c162a,bd5f087,c6dd86f]:v4.53.0Compare Source
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 resourceThese fields are mutually exclusive - only one can be specified at a time.
Example configuration:
#11498
ac861f8Thanks @penalosa! - Add React Router support in autoconfig#11506
79d30d4Thanks @vicb! - Set the target JS version to ES2024Patch 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 projectUpdated dependencies [
819e287,56e78c8,0aa959a]:v4.52.1Compare Source
Patch Changes
#11504
7e80340Thanks @dario-piotrowicz! - Fixwrangler deployfailing for new workers containing environment variables or bindingsUpdated dependencies [
59534ba]:v4.52.0Compare Source
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 regist
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.