github cloudflare/workers-sdk wrangler@4.126.0

Minor Changes

  • #15332 d1cc3af Thanks @pombosilva! - Add default_retention to Workflow bindings for configuring how long instances are retained

    Workflow instances are retained for an account-wide default period after they finish. You can now set a per-Workflow default in your Wrangler configuration, applied to instances that do not specify their own retention:

    {
      "workflows": [
        {
          "binding": "MY_WORKFLOW",
          "name": "my-workflow",
          "class_name": "MyWorkflow",
          "default_retention": {
            "success_retention": "3 days",
            "error_retention": "7 days"
          }
        }
      ]
    }

    Each side is optional and accepts either a duration string such as "3 days" or a whole number of milliseconds. Durations are interpreted by the Workflows API, which also caps them at your account's retention limit.

  • #15064 693ca29 Thanks @tpmmorris! - Include a chronological list of handler events in email test harness results, so programmatic local email tests can assert the order in which messages are received, forwarded, replied to, or rejected.

    const result = await server.getWorker().email({
      from: "sender@example.com",
      to: "inbox@example.com",
      raw: [
        "From: Sender <sender@example.com>",
        "To: Inbox <inbox@example.com>",
        "Message-ID: <test@example.com>",
        "Subject: Test email",
        "",
        "Hello from the test harness",
      ].join("\r\n"),
    });
    
    expect(result.events).toEqual([
      { type: "received", timestamp: expect.any(String) },
      {
        type: "forward",
        timestamp: expect.any(String),
        messageId: expect.any(String),
      },
      {
        type: "reply",
        timestamp: expect.any(String),
        messageId: expect.any(String),
      },
    ]);
  • #15065 ad89456 Thanks @mtlemilio! - Add experimental wrangler hyperdrive planetscale signature for provisioning Cloudflare-billed PlanetScale databases

    wrangler hyperdrive planetscale signature prints a signed authorization as JSON, proving to PlanetScale that Cloudflare will be billed for the database you are about to create:

    npx wrangler hyperdrive planetscale signature | \
      pscale database create <name> \
        --org <org> \
        --engine postgresql \
        --cloudflare-billing @- \
        --format json

    pscale database create defaults to Vitess, so pass --engine postgresql for a Postgres database, and --format json is recommended when the output is consumed by an agent.

    This requires pscale v0.313.0 or newer. Wrangler authorizes the Cloudflare billing side only, so your PlanetScale credentials stay between you and pscale.

    The signature is a cryptographically signed token that authorizes creating a database billed to your Cloudflare account. Treat it as a credential and do not share it. Piping it, as above, is recommended over passing it as a command line argument.

    This command is experimental and its interface may change.

  • #15134 c66d2d5 Thanks @gpanders! - Enable FUSE-capable local container development

    Miniflare now automatically passes the Docker privileges needed for FUSE to local Durable Object containers when using local rootless Docker on Linux with /dev/fuse available, or a local Docker engine on macOS or through WSL where Linux containers run in a VM. This applies to Wrangler, the Cloudflare Vite plugin, and direct Miniflare use.

  • #15326 9fcb1c9 Thanks @jamesopstad! - Record the selected mode in the Build Output Specification top-level config.json

    The mode a build was produced in is now written to .cloudflare/output/v0/config.json as a mode field, alongside the account and compliance settings.

  • #14966 a4c3458 Thanks @yomna-shousha! - Add pull request metadata to wrangler preview deployments

    wrangler preview now detects the pull request associated with the current CI run (GitHub Actions, GitLab CI, CircleCI, and a generic PULL_REQUEST_URL/PR_URL/CHANGE_URL fallback) and attaches it, along with the repository URL, to the preview deployment as annotations (workers/pull_request_number, workers/pull_request_url, workers/repository_url).

    This is best effort: if no pull request can be detected, nothing changes. When a pull request is detected, its URL is now also shown in the wrangler preview command output.

  • #15307 433fa98 Thanks @for-the-kidz! - Add pull request title to wrangler preview deployment annotations

    wrangler preview now also detects the title of the pull/merge request associated with the current CI run (GitHub Actions and GitLab CI, plus a generic PULL_REQUEST_TITLE fallback) and attaches it to the preview deployment as the workers/pull_request_title annotation, alongside the existing pull request number/URL, repository URL, and commit SHA annotations.

    This is best effort: if no pull request title can be detected, nothing changes.

Patch Changes

  • #15294 4a67a28 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260820.1 ^5.20260821.1
    workerd 1.20260820.1 1.20260821.1
  • #15328 2d78137 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260821.1 ^5.20260823.1
    workerd 1.20260821.1 1.20260824.1
  • #15346 04e8564 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20260823.1 ^5.20260825.1
    workerd 1.20260824.1 1.20260825.1
  • #15246 daefb3c Thanks @edmundhung! - Prepare autoconfig for multiple configuration targets

    Add target-specific configuration output and command detection while preserving Wrangler's existing setup and deployment behavior.

  • #15320 c809851 Thanks @Om-singhaI! - Fix wrangler login --use-keyring incorrectly reporting that secret-tool is missing on Linux

    Libsecret's secret-tool does not support --version; it prints usage and exits 2, which Wrangler previously interpreted as unavailable. Wrangler now reports it missing only when launching the executable fails.

  • #15336 22182da Thanks @podonnell-dev! - [private beta]: Explain unavailable Preview URLs after wrangler preview deployments

    When a Preview deployment has no active URLs, Wrangler now explains how to enable Preview Deployments on workers.dev or a custom domain.

  • #15296 d589d30 Thanks @MattieTK! - Stop automatically offering to install Cloudflare skills for new users

    Wrangler will no longer prompt new users to install Cloudflare skills after commands complete. It will continue to offer updates to skills that Wrangler previously installed.

  • Updated dependencies [aa54b49, 4a67a28, 2d78137, 04e8564, 693ca29, 693ca29, 693ca29, 37ed753, f76b68e, c66d2d5, 693ca29, 74de3ab, 0cb8690, dd5148d, 82d11fc]:

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.