Wrangler Changelog
2024-01-18
3.23.0
#4310
dae30015
Thanks @gabivlj! - Addedwrangler cloudchamber
commandsSee #4310 for more details.
#4674
54ea6a53
Thanks @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
4a9f03cf
Thanks @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//test
tohttp://localhost:8787/test
). This change ensures URLs are passed through without modification.Fixes #4743.
2.21.0
2024-01-16
3.22.5
#4707
96a27f3d
Thanks @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
078cf84d
Thanks @dario-piotrowicz! - make sure the script path is correctly resolved inpages dev
when no directory is specified#4722
5af6df13
Thanks @mrbbot! - fix: don’t require auth forwrangler r2 object --local
operationsPreviously, 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
c37d94b5
Thanks @mrbbot! - fix: ensureminiflare
andwrangler
can source map in the same processPreviously, if in a
wrangler dev
session 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
24147166
Thanks @mrbbot! - fix: ensure logs containingat
not truncated toat [object Object]
Previously, logs containing
at
were always treated as stack trace call sites requiring source mapping. This change updates the call site detection to avoid false positives.#4748
3603a60d
Thanks @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.wasm
file isn’t explicitly exported from the@jsquash/jpeg
module.Fixes #4726
#4687
0a488f66
Thanks @mrbbot! - fix: remove confusing--local
messaging fromwrangler pages dev
Running
wrangler pages dev
would previously log a warning saying--local is no longer required
even though--local
was never set. This change removes this warning.
2024-01-09
3.22.4
#4699
4b4c1416
Thanks @mrbbot! - fix: prevent repeated reloads with circular service bindingswrangler@3.19.0
introduced a bug where starting multiplewrangler dev
sessions with service bindings to each other resulted in a reload loop. This change ensures Wrangler only reloads when dependentwrangler dev
sessions start/stop.
2024-01-04
3.22.3
#4693
93e88c43
Thanks @mrbbot! - fix: ensurewrangler dev
exits with code0
on clean exitPreviously,
wrangler dev
would exit with a non-zero exit code when pressing CTRL+C or x. This change ensureswrangler
exits with code0
in these cases.#4630
037de5ec
Thanks @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 dev
we 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-Url
header, 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-Secret
header. 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
0f8a03c0
Thanks @mrbbot! - fix: ensure API failures without additional messages logged correctly#4693
93e88c43
Thanks @mrbbot! - fix: ensurewrangler pages dev
exits cleanlyPreviously, pressing CTRL+C or x when running
wrangler pages dev
wouldn’t actually exitwrangler
. You’d need to press CTRL+C a second time to exit the process. This change ensureswrangler
exits the first time.#4696
624084c4
Thanks @mrbbot! - fix: include additional modules inlargest dependencies
warningIf 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
]:
2024-01-02
3.22.2
#4600
4233e514
Thanks @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
15717333
Thanks @mrbbot! - fix: automatically create required directories forwrangler r2 object get
Previously, if you tried to use
wrangler r2 object get
with an object name containing a/
or used the--file
flag with a path containing a/
, and the specified directory didn’t exist, Wrangler would throw anENOENT
error. This change ensures Wrangler automatically creates required parent directories if they don’t exist.#4592
20da658e
Thanks @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
e1d50407
Thanks @mrbbot! - fix: suggest checking permissions on authentication error with API token set#4593
c370026d
Thanks @mrbbot! - fix: include messages from API in errors#4588
4e5ed0b2
Thanks @mrbbot! - fix: require worker name for rollbackPreviously, Wrangler would fail with a cryptic error if you tried to run
wrangler rollback
outside of a directory containing a Wrangler configuration file with aname
defined. This change validates that a worker name is defined, and allows you to set it from the command line using the--name
flag.Updated dependencies [
c410ea14
]:
2023-12-20
3.22.1
#4635
5bc2699d
Thanks @mrbbot! - fix: prevent zombieworkerd
processesPreviously, running
wrangler dev
would leave behind “zombie”workerd
processes. These processes prevented the same port being bound ifwrangler dev
was restarted and sometimes consumed lots of CPU time. This change ensures allworkerd
processes are killed whenwrangler dev
is shutdown.To clean-up existing zombie processes, run
pkill -KILL workerd
on macOS/Linux ortaskkill /f /im workerd.exe
on Windows.
2023-12-19
3.22.0
#4632
a6a4e8a4
Thanks @G4brym! - Deprecate constellation commands and add a warning when using the constellation binding#4130
e8a2a1d9
Thanks @vkrasnov! - Added support for R2 Sippy incremental migration#4621
98dee932
Thanks @rozenmd! - feat: add rows written/read in the last 24 hours towrangler d1 info
output#4426
c628de59
Thanks @OilyLime! - Improve queues list displaying as table, update queues API types
2023-12-15
3.21.0
#4423
a94ef570
Thanks @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#stack
does not return a source mapped stack trace. This means the actual runtime value ofnew Error().stack
and the output fromconsole.log(new Error().stack)
may be different.#4511
66394681
Thanks @huw! - Add ’took recursive isolate lock’ warning to workerd output exceptions
2.20.2
#4609
c228c912
Thanks @mrbbot! - fix: pinworkerd
to1.20230404.0
#4587
49a46960
Thanks @mrbbot! - Change dev registry and inspector server to listen on 127.0.0.1 instead of all interfaces#4587
49a46960
Thanks @mrbbot! - fix: validateHost
andOrgin
headers where appropriateHost
andOrigin
headers are now checked when connecting to the inspector proxy. If these don’t match what’s expected, the request will fail.
2023-12-12
3.20.0
#4522
c10bf0fd
Thanks @G4brym! - Add support for Workers AI in local mode#4571
3314dbde
Thanks @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.
#4577
4c85fe99
Thanks @dario-piotrowicz! - During the R2 validation, showMAX_UPLOAD_SIZE
errors using MiB (consistently with the Cloudflare docs)#4577
4c85fe99
Thanks @dario-piotrowicz! - During the Pages validation, showMAX_UPLOAD_SIZE
errors using MiB (consistently with the Cloudflare docs)Updated dependencies [
eb08e2dc
]:
2023-12-05
3.19.0
#4547
86c81ff0
Thanks @mrbbot! - fix: listen on IPv4 loopback only by default on WindowsDue to a known issue,
workerd
will only listen on the IPv4 loopback address127.0.0.1
when it’s asked to listen onlocalhost
. On Node.js > 17,localhost
will resolve to the IPv6 loopback address, meaning requests toworkerd
would fail. This change switches to using the IPv4 loopback address throughout Wrangler on Windows, while workerd#1408 gets fixed.#4535
29df8e17
Thanks @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
#4521
6c5bc704
Thanks @zebp! - fix: init from dash specifying explicit usage model in wrangler.toml for standard users#4550
63708a94
Thanks @mrbbot! - fix: validateHost
andOrgin
headers where appropriateHost
andOrigin
headers 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.