Skip to content

Releases: cloudflare/workers-sdk

[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Minor Changes

  • #14995 59872c4 Thanks @ThomasRubini! - Add connect trigger for raw sockets

    You can now configure a Worker to receive raw socket connections during wrangler dev, delivered directly to the Worker's connect(socket, env, ctx) handler:

    {
      "connect": [{ "protocol": "tcp", "port": 5432 }]
    }

    Each entry opens a listening socket on 127.0.0.1 (or the given address) that forwards incoming connections straight to the Worker, bypassing the local dev HTTP entry point. This requires the experimental compatibility flag. Only "tcp" is supported at the moment.

    @cloudflare/config also supports declaring this trigger via triggers.connect(...), which lowers to the connect field above:

    import { defineWorker, triggers } from "@cloudflare/config";
    
    export default defineWorker({
      triggers: [
        triggers.connect({ protocol: "tcp", port: 5432, address: "127.0.0.1" }),
      ],
    });
  • #15172 c68f9cb Thanks @WillTaylorDev! - Add container support to worker previews

    Worker previews now support containers through a new previews.containers configuration block. Container configuration doesn't inherit, so declare containers explicitly in the previews block to enable them for previews. This mirrors how previews.durable_objects works today. Wrangler names each preview container application {worker_name}_{preview_slug}_{class_name}, normalising and shortening the result to what the API accepts. Either change appends a short digest of the composed name, so two names that would otherwise land on one stay distinct. An entry cannot set its own name, because application names are unique to an account and a fixed name would collide between two previews of the same Worker. A Durable Object class is backed by at most one container application, so the validator rejects two entries that share a class_name. Wrangler skips container applications bound to Durable Object classes that another Worker implements through script_name, because the implementing Worker owns its own container application. A binding is not required: a Durable Object declared through migrations or exports and reached only over ctx.exports can still back a container. Every entry must set class_name. A previews.containers entry whose class_name matches no Durable Object class at all is rejected before the preview deployment is created, so a typo fails loudly instead of producing a preview with no container.

    Wrangler creates the container applications on wrangler preview. Deleting a preview tears them down server side, so wrangler preview delete doesn't remove them.

    Container build and deploy progress prints to stdout. wrangler preview --json suppresses wrangler's own output so it doesn't interleave with the payload, and warnings and errors still go to stderr. Docker's build output and the progress spinner write to stdout directly and bypass that suppression, so parse --json from a non interactive shell, where the spinner is skipped, and prefer a prebuilt image over a Dockerfile.

  • #15174 649f667 Thanks @WillTaylorDev! - [private beta]: Create the parent Worker automatically when wrangler preview targets one that doesn't exist yet

    Previews hang off a parent Worker, so running wrangler preview before the Worker had ever been deployed failed with a raw API error naming the Preview endpoint. Wrangler now offers to create an empty parent Worker and then carries on creating the Preview. The parent uses the same workers.dev and Preview URL settings that wrangler deploy would resolve, without applying routes or cron triggers. In non-interactive environments, Wrangler creates the Worker without asking.

  • #14735 30c2d47 Thanks @vaishnav-mk! - Add individual and batch Workflow instance deletion to the runtime and SDK.

    • WorkflowInstance.delete() deletes one instance. Self-deletion stops the current execution.
    • env.MY_WORKFLOW.deleteBatch(instanceIds) deletes up to 100 instances and returns { deleted, errors } per input position.
    • wrangler workflows instances delete <name> [id..] deletes instances remotely or with --local; IDs can also come from a JSON array passed with --filename, with a combined limit of 100.

Patch Changes

  • #15260 5ae9d5b Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260815.1 ^5.20260816.1
    workerd 1.20260815.1 1.20260816.1
  • #15264 4b52975 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260816.1 ^5.20260819.1
    workerd 1.20260816.1 1.20260819.1
  • #15277 ce9b151 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260819.1 ^5.20260820.1
    workerd 1.20260819.1 1.20260820.1
  • #15192 ef73a28 Thanks @ondraulehla! - Fixes kv bulk put corrupting binary values written to local KV

    Values marked base64: true were stored incorrectly whenever they contained bytes that do not form valid UTF-8, which covers images, compressed data and most other binary payloads. A Worker reading such a key back under wrangler dev got a different, longer value than the one that was written: a 12 byte PNG header came back as 20 bytes.

    kv bulk put writes to local KV by default, so the plain command was the affected one. Remote writes were never affected, and neither were entries without base64 or values written with kv key put.

  • #15284 39dcea6 Thanks @emily-shen! - Move deploy output writing into shared deploy helpers

  • #15130 99a1f49 Thanks @emily-shen! - Remove unsupported remote configuration from Workflow bindings

    Workflow bindings no longer accept remote in configuration, as remote Workflow bindings have never actually been supported.

  • #15278 f2437e6 Thanks @Sosokker! - Fix the --temporary error on commands that authenticate more than one time

    wrangler d1 migrations apply --remote --temporary failed with this error: You're already authenticated with Cloudflare, so --temporary can't be used. The failure occurred with no login and with no CLOUDFLARE_API_TOKEN. This command authenticates one time for each statement that it runs. The first authentication makes a temporary preview account. The second authentication read the token of this new account as an earlier login.

    Wrangler now uses again the temporary account from the same command run. Commands that authenticate more than one time now work as wrangler deploy --temporary works. If real credentials are available, --temporary is still an error.

  • Updated dependencies [59872c4, 99a1f49, 5ae9d5b, 4b52975, ce9b151, 99a1f49, [99a1f49](https://github.com/clo...

Read more

[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Patch Changes

  • #15263 29b8138 Thanks @dependabot! - Update dependencies of "create-cloudflare"

    The following dependency versions have been updated:

    Dependency From To
    create-vike 0.0.675 0.0.677
  • #15265 0854f04 Thanks @dependabot! - Update dependencies of "create-cloudflare"

    The following dependency versions have been updated:

    Dependency From To
    create-solid 0.10.0 0.11.0
  • #15264 4b52975 Thanks @dependabot! - Update Hello World templates to use @cloudflare/vitest-pool-workers 0.22

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Minor Changes

  • #14735 30c2d47 Thanks @vaishnav-mk! - Add individual and batch Workflow instance deletion to the runtime and SDK.

    • WorkflowInstance.delete() deletes one instance. Self-deletion stops the current execution.
    • env.MY_WORKFLOW.deleteBatch(instanceIds) deletes up to 100 instances and returns { deleted, errors } per input position.
    • wrangler workflows instances delete <name> [id..] deletes instances remotely or with --local; IDs can also come from a JSON array passed with --filename, with a combined limit of 100.

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Minor Changes

  • #14995 59872c4 Thanks @ThomasRubini! - Add connect trigger for raw sockets

    You can now configure a Worker to receive raw socket connections during wrangler dev, delivered directly to the Worker's connect(socket, env, ctx) handler:

    {
      "connect": [{ "protocol": "tcp", "port": 5432 }]
    }

    Each entry opens a listening socket on 127.0.0.1 (or the given address) that forwards incoming connections straight to the Worker, bypassing the local dev HTTP entry point. This requires the experimental compatibility flag. Only "tcp" is supported at the moment.

    @cloudflare/config also supports declaring this trigger via triggers.connect(...), which lowers to the connect field above:

    import { defineWorker, triggers } from "@cloudflare/config";
    
    export default defineWorker({
      triggers: [
        triggers.connect({ protocol: "tcp", port: 5432, address: "127.0.0.1" }),
      ],
    });
  • #15172 c68f9cb Thanks @WillTaylorDev! - Add container support to worker previews

    Worker previews now support containers through a new previews.containers configuration block. Container configuration doesn't inherit, so declare containers explicitly in the previews block to enable them for previews. This mirrors how previews.durable_objects works today. Wrangler names each preview container application {worker_name}_{preview_slug}_{class_name}, normalising and shortening the result to what the API accepts. Either change appends a short digest of the composed name, so two names that would otherwise land on one stay distinct. An entry cannot set its own name, because application names are unique to an account and a fixed name would collide between two previews of the same Worker. A Durable Object class is backed by at most one container application, so the validator rejects two entries that share a class_name. Wrangler skips container applications bound to Durable Object classes that another Worker implements through script_name, because the implementing Worker owns its own container application. A binding is not required: a Durable Object declared through migrations or exports and reached only over ctx.exports can still back a container. Every entry must set class_name. A previews.containers entry whose class_name matches no Durable Object class at all is rejected before the preview deployment is created, so a typo fails loudly instead of producing a preview with no container.

    Wrangler creates the container applications on wrangler preview. Deleting a preview tears them down server side, so wrangler preview delete doesn't remove them.

    Container build and deploy progress prints to stdout. wrangler preview --json suppresses wrangler's own output so it doesn't interleave with the payload, and warnings and errors still go to stderr. Docker's build output and the progress spinner write to stdout directly and bypass that suppression, so parse --json from a non interactive shell, where the spinner is skipped, and prefer a prebuilt image over a Dockerfile.

Patch Changes

  • #15251 5c10e39 Thanks @dario-piotrowicz! - Fix ESM-only packages missing from deploy metadata

    ESM-only package dependencies (such as @cloudflare/think) were silently omitted from the package dependency metadata reported during wrangler deploy and wrangler versions upload. These packages are now correctly detected and included.

  • #15284 39dcea6 Thanks @emily-shen! - Move deploy output writing into shared deploy helpers

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Patch Changes

  • #15223 8a04946 Thanks @petebacondarwin! - Recover from a partially installed keyring backend on Windows

    Choosing to keep your credentials in the OS keyring on Windows installs a native backend the first time you opt in. An install interrupted part-way through — by a dropped connection, a full disk, or an npm told to skip optional packages — could leave a broken backend behind that was nonetheless treated as working. Every login, token refresh, and credential read from then on failed with an internal error, and because the broken state was never re-examined, no amount of retrying would clear it.

    A broken backend is now spotted and reinstalled automatically. If the reinstall still cannot produce a working one, you get a single explanation of how to install it by hand and fall back to the plaintext credentials file for the rest of the session, rather than sitting through a fresh install attempt on every credential access.

  • #15278 f2437e6 Thanks @Sosokker! - Fix the --temporary error on commands that authenticate more than one time

    wrangler d1 migrations apply --remote --temporary failed with this error: You're already authenticated with Cloudflare, so --temporary can't be used. The failure occurred with no login and with no CLOUDFLARE_API_TOKEN. This command authenticates one time for each statement that it runs. The first authentication makes a temporary preview account. The second authentication read the token of this new account as an earlier login.

    Wrangler now uses again the temporary account from the same command run. Commands that authenticate more than one time now work as wrangler deploy --temporary works. If real credentials are available, --temporary is still an error.

  • Updated dependencies [59872c4, c68f9cb, 5c10e39, 39dcea6]:

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Major Changes

  • #15074 bfcc442 Thanks @penalosa! - Rename @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin for the v1 release

    The package has been renamed from @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin to be clearer about it's usage.

    To migrate, run the codemod from the root of your project:

    npx @cloudflare/codemods vitest:pool-workers-to-vitest-plugin

    This handles the whole rename for you:

    • Replaces the dependency in your package.json, moving plain version ranges to ^1.0.0 while preserving workspace:/catalog:/link:/file: protocol references, along with any overrides, resolutions and pnpm.overrides entries.
    • Rewrites imports such as import { cloudflareTest } from "@cloudflare/vitest-pool-workers" to import { cloudflareTest } from "@cloudflare/vitest-plugin", preserving any subpaths.
    • Updates the types entry in your test tsconfig.json from @cloudflare/vitest-pool-workers/types to @cloudflare/vitest-plugin/types.

    Pass --dry-run to preview the changes first, or --files <glob> to restrict which files are considered.

    If you would rather migrate by hand, the only changes needed are the dependency name in package.json, the package specifier in any import/require of the plugin, and the types entry in your test tsconfig.json.

Minor Changes

  • #14690 d81fae7 Thanks @penalosa! - Add a central CLI for Cloudflare codemods

    Run a codemod by name, e.g. npx @cloudflare/codemods vitest:v3-to-v4. The initial migrations cover Vitest v3 to v4 configuration (vitest:v3-to-v4) and the @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin v1 rename (vitest:pool-workers-to-vitest-plugin). The existing Vitest transform now lives in this dedicated package.

Patch Changes

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Minor Changes

  • #13102 e200179 Thanks @dario-piotrowicz! - First release of new package

    Add @cloudflare/codemod package with internal AST-based codemod utilities (parseJs, parseTs, parseFile, transformFile, mergeObjectProperties) built on recast.

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623

Patch Changes

@cloudflare/[email protected]

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Aug 17:42
38b4623