chore(deps): update dependency wrangler to v3.28.0 #542
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.27.0
->3.28.0
Release Notes
cloudflare/workers-sdk (wrangler)
v3.28.0
Compare Source
Minor Changes
#4499
cf9c029b
Thanks @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: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:crypto
import and failed with the following error: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):However, in a lot of cases, it's possible to know at build time whether the import is safe. This change also injects
navigator.userAgent
intoesbuild
's bundle settings as a predefined constant, which means thatesbuild
can tree-shake away imports ofnode:*
APIs that are guaranteed not to be hit at runtime, supressing the warning entirely.#4926
a14bd1d9
Thanks @dario-piotrowicz! - feature: add acf
field to thegetBindingsProxy
resultAdd a new
cf
field to thegetBindingsProxy
result that people can use to mock the productioncf
(IncomingRequestCfProperties
) object.Example:
Patch Changes
#4931
321c7ed7
Thanks @dario-piotrowicz! - fix: make the entrypoint optional for thetypes
commandCurrently running
wrangler types
against awrangler.toml
file without a defined entrypoint (main
value)causes the command to error with the following message:
However developers could want to generate types without the entrypoint being defined (for example when using
getBindingsProxy
), so these changesmake the entrypoint optional for the
types
command, assuming modules syntax if none is specified.#4867
d637bd59
Thanks @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.
4a735c46
Thanks @sdnts! - fix: Update API calls for Sippy's endpoints#4938
75bd08ae
Thanks @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:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.