Skip to content

Releases: cloudflare/workers-sdk

[email protected]

05 Dec 19:26
5e67ea1
Compare
Choose a tag to compare

Patch Changes

  • #4466 71fb0b86 Thanks @mrbbot! - fix: ensure unused KV and Cache blobs cleaned up

    When 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> ... and node 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: validate Host and Orgin headers where appropriate

    Host and Origin 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]

05 Dec 19:26
5e67ea1
Compare
Choose a tag to compare

Patch Changes

@cloudflare/[email protected]

05 Dec 19:26
5e67ea1
Compare
Choose a tag to compare

Patch Changes

[email protected]

30 Nov 19:01
97727de
Compare
Choose a tag to compare

Minor Changes

  • #4532 311ffbd5 Thanks @mrbbot! - fix: change wrangler (pages) dev to listen on localhost by default

    Previously, Wrangler listened on all interfaces (*) by default. This change switches wrangler (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 use wrangler (pages) dev --ip * to restore the previous behaviour.

Patch Changes

[email protected]

30 Nov 19:01
97727de
Compare
Choose a tag to compare

Patch Changes

  • #4505 1b348782 Thanks @mrbbot! - fix: remove __STATIC_CONTENT_MANIFEST from module worker env

    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 the env 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 ensures env doesn't contain __STATIC_CONTENT_MANIFEST.

[email protected]

30 Nov 19:00
97727de
Compare
Choose a tag to compare

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 of wrangler and @cloudflare/workers-types.

    Also updates the types entry of the project's tsconfig.json to use type definitions corresponding to the latest compatibility date.

Patch Changes

  • #4445 652cc422 Thanks @petebacondarwin! - fix: ensure shell scripts work on Windows

    Our 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: Bumped create-solid from 0.3.9 to 0.3.10

  • #4465 d79a68fd Thanks @dependabot! - C3: Bumped create-svelte from 5.2.0 to 5.3.1

  • #4472 beed1575 Thanks @dependabot! - C3: Bumped nuxi from 3.9.1 to 3.10.0

  • #4491 e6ddf8a7 Thanks @dependabot! - C3: Bumped create-qwik from 1.2.17 to 1.2.19

  • #4504 3b5407a9 Thanks @dependabot! - C3: Bumped @angular/create from 17.0.1 to 17.0.3

  • #4506 d8b5a01e Thanks @dependabot! - C3: Bumped gatsby from 5.12.9 to 5.12.11

  • #4507 743d15fe Thanks @dependabot! - C3: Bumped create-remix from 2.2.0 to 2.3.1

  • #4508 743df0af Thanks @dependabot! - C3: Bumped create-svelte from 5.3.1 to 5.3.2

  • #4530 774b16c9 Thanks @dependabot! - C3: Bumped @angular/create from 17.0.3 to 17.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 Windows

    Rather than relying upon the non-Windows shell syntax to specify an environment variable,
    we now update the nuxt.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]

30 Nov 19:01
97727de
Compare
Choose a tag to compare

Patch Changes

[email protected]

22 Nov 19:16
7438e5c
Compare
Choose a tag to compare

Patch Changes

  • #4474 382ef8f5 Thanks @mrbbot! - fix: open browser to correct url pressing b in --remote mode

    This change ensures Wrangler doesn't try to open http://* when * is used as the dev server's hostname. Instead, Wrangler will now open http://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 changes

    Also 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]

21 Nov 21:14
f728503
Compare
Choose a tag to compare

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 with WRANGLER_LOG_PATH=../Desktop/my-logs/ or WRANGLER_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

[email protected]

21 Nov 21:14
f728503
Compare
Choose a tag to compare

Minor Changes

  • #4348 be2b9cf5 Thanks @mrbbot! - feat: add support for wrapped bindings

    This 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 a handleRuntimeStdio which enables wrangler (or any other direct use of Miniflare) to handle the stdout and stderr 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 calls console.log/console.error.