Update dependency wrangler to v4.65.0 #159
Merged
+145
−147
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:
4.63.0→4.65.0Release Notes
cloudflare/workers-sdk (wrangler)
v4.65.0Compare Source
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:
This 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:wrangler deploy, it warns the user but still allows them to proceedwrangler setupand the programmatic autoconfig API, it throws a fatal error#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.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:
#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:
1209600seconds for all queues users because it was required to be on paid tier.Updated:
1209600seconds for paid tier queues#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.Updated dependencies [
f7fa326,7aaa2a5,d06ad09]:v4.64.0Compare Source
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:
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.#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:
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:Example usage:
#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:
#12485
d636d6aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#12502
bf8df0cThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
#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:
#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:
After:
#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]: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.