Releases: cloudflare/workers-sdk
[email protected]
Patch Changes
-
#4466
71fb0b86
Thanks @mrbbot! - fix: ensure unused KV and Cache blobs cleaned upWhen storing data in KV, Cache and R2, Miniflare uses both an SQL database and separate blob store. When writing a key/value pair, a blob is created for the new value and the old blob for the previous value (if any) is deleted. A few months ago, we introduced a change that prevented old blobs being deleted for KV and Cache. R2 was unaffected. This shouldn't have caused any problems, but could lead to persistence directories growing unnecessarily as they filled up with garbage blobs. This change ensures garbage blobs are deleted.
Note existing garbage will not be cleaned up. If you'd like to do this, download this Node script (https://gist.github.com/mrbbot/68787e19dcde511bd99aa94997b39076). If you're using the default Wrangler persistence directory, run
node gc.mjs kv .wrangler/state/v3/kv <namespace_id_1> <namespace_id_2> ...
andnode gc.mjs cache .wrangler/state/v3/cache default named:<cache_name_1> named:<cache_name_2> ...
with each of your KV namespace IDs (not binding names) and named caches. -
#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.
[email protected]
Patch Changes
- #4538
a72f64c8
Thanks @dependabot! - C3: Bumpedcreate-docusaurus
from3.0.0
to3.0.1
@cloudflare/[email protected]
[email protected]
Minor Changes
-
#4532
311ffbd5
Thanks @mrbbot! - fix: changewrangler (pages) dev
to listen onlocalhost
by defaultPreviously, Wrangler listened on all interfaces (
*
) by default. This change switcheswrangler (pages) dev
to 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
]:
[email protected]
Patch Changes
-
#4505
1b348782
Thanks @mrbbot! - fix: remove__STATIC_CONTENT_MANIFEST
from module workerenv
When using Workers Sites with a module worker, the asset manifest must be imported from the
__STATIC_CONTENT_MANIFEST
virtual module. Miniflare provided this module, but also erroneously added__STATIC_CONTENT_MANIFEST
to theenv
object too. Whilst this didn't break anything locally, it could cause users to develop Workers that ran locally, but not when deployed. This change ensuresenv
doesn't contain__STATIC_CONTENT_MANIFEST
.
[email protected]
Minor Changes
-
#4494
9bea4e32
Thanks @RamIdeas! - Change the default project type to the hello world worker script. -
#4525
294ca542
Thanks @jculvey! - C3: Use latest version ofwrangler
and@cloudflare/workers-types
.Also updates the
types
entry of the project'stsconfig.json
to use type definitions corresponding to the latest compatibility date.
Patch Changes
-
#4445
652cc422
Thanks @petebacondarwin! - fix: ensure shell scripts work on WindowsOur use of
shell-quote
was causing problems on Windows where it was
escaping character (such as@
) by placing a backslash in front.
This made Windows think that such path arguments, were at the root.For example,
npm install -D @cloudflare/workers-types
was being converted to
npm install -D \@cloudflare/workers-types
, which resulted in errors like:npm ERR! enoent ENOENT: no such file or directory, open 'D:\@cloudflare\workers-types\package.json'
Now we just rely directly on the Node.js
spawn
API to avoid any shell quoting
concerns. This has resulted in a slightly less streamlined experience for people
writing C3 plugins, but has the benefit that the developer doesn't have to worry
about quoting spawn arguments.Closes #4282
-
#4432
04a2d0ed
Thanks @dependabot! - C3: Bumpedcreate-solid
from0.3.9
to0.3.10
-
#4465
d79a68fd
Thanks @dependabot! - C3: Bumpedcreate-svelte
from5.2.0
to5.3.1
-
#4472
beed1575
Thanks @dependabot! - C3: Bumpednuxi
from3.9.1
to3.10.0
-
#4491
e6ddf8a7
Thanks @dependabot! - C3: Bumpedcreate-qwik
from1.2.17
to1.2.19
-
#4504
3b5407a9
Thanks @dependabot! - C3: Bumped@angular/create
from17.0.1
to17.0.3
-
#4506
d8b5a01e
Thanks @dependabot! - C3: Bumpedgatsby
from5.12.9
to5.12.11
-
#4507
743d15fe
Thanks @dependabot! - C3: Bumpedcreate-remix
from2.2.0
to2.3.1
-
#4508
743df0af
Thanks @dependabot! - C3: Bumpedcreate-svelte
from5.3.1
to5.3.2
-
#4530
774b16c9
Thanks @dependabot! - C3: Bumped@angular/create
from17.0.3
to17.0.5
-
#4481
18a4dd92
Thanks @jculvey! - Minor improvements when using the--existing-script scriptName
flag:- Format the type as "Pre-existing Worker (from Dashboard)"
- Defaults the project name to
scriptName
-
#4445
652cc422
Thanks @petebacondarwin! - fix: update Nuxt template to work on WindowsRather than relying upon the non-Windows shell syntax to specify an environment variable,
we now update thenuxt.config.ts
files to include the cloudflare preset.Fixes #4285
-
#4520
1b945a07
Thanks @petebacondarwin! - fix: ensure Angular alter-polyfill script works on Windows
@cloudflare/[email protected]
Patch Changes
- Updated dependencies [
1b348782
]:
[email protected]
Patch Changes
-
#4474
382ef8f5
Thanks @mrbbot! - fix: open browser to correct url pressingb
in--remote
modeThis 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
3bd57238
Thanks @RamIdeas! - Changes the default directory for log files to workaround frameworks that are watching the entire.wrangler
directory in the project root for changesAlso includes a fix for commands with
--json
where the log file location message would cause stdout to not be valid JSON. That message now goes to stderr.
[email protected]
Minor Changes
-
#4341
d9908743
Thanks @RamIdeas! - Wrangler now writes all logs to a .log file in the.wrangler
directory. 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
d5e1966b
Thanks @mrbbot! - fix: report correct line and column numbers when source mapping errors withwrangler dev --remote
-
#4455
1747d215
Thanks @rozenmd! - fix: make it possible to ignore hyperdrive warnings -
#4456
805d5241
Thanks @dario-piotrowicz! - add warnings about ai and verctorize bindings not being supported locally -
#4478
7b54350b
Thanks @penalosa! - Don't log sensitive data to the Wrangler debug log file by default. This includes API request headers and responses.
[email protected]
Minor Changes
-
#4348
be2b9cf5
Thanks @mrbbot! - feat: add support for wrapped bindingsThis change adds a new
wrappedBindings
worker option for configuring
workerd
's wrapped bindings.
These allow custom bindings to be written as JavaScript functions accepting an
env
parameter of "inner bindings" and returning the value to bind. For more
details, refer to the API docs. -
#4341
d9908743
Thanks @RamIdeas! - Added ahandleRuntimeStdio
which enables wrangler (or any other direct use of Miniflare) to handle thestdout
andstderr
streams from the workerd child process. By default, if this option is not provided, the previous behaviour is retained which splits the streams into lines and callsconsole.log
/console.error
.