github cloudflare/workers-sdk wrangler@4.156.1

Patch Changes

  • #16594 effe4ed Thanks @jaeminbird! - Fix wrangler types --check reporting CRLF types files as out of date

    When worker-configuration.d.ts was checked out with CRLF line endings (for example with Git's core.autocrlf=true, the default on Windows), the runtime header kept a trailing \r and never matched the expected header. wrangler types --check then always failed, wrangler dev always warned that the types might be out of date, and cached runtime types were never reused. Generated types files are now read with either line ending.

  • #16635 76e18a8 Thanks @dependabot! - Update DEFAULT_COMPAT_DATE to 2026-11-01

    Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.

  • #16635 76e18a8 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"

    The following dependency versions have been updated:

    Dependency From To
    @cloudflare/workers-types ^5.20261023.1 ^5.20261101.1
    workerd 1.20261023.1 1.20261101.1
  • #16535 5740867 Thanks @petebacondarwin! - Keep Pages development asset lookups within the configured directory

    Validate resolved asset paths relative to the Pages output directory, preventing neighboring files and directories with a shared name prefix from being served. This also applies to the Vitest Pages ASSETS helper. Assets inside the directory and existing not-found fallbacks retain their behavior.

  • #16366 d174de8 Thanks @MattieTK! - Deploy the requested directory when wrangler pages deploy <directory> is run as a Workers static-assets deploy

    When wrangler pages deploy <directory> was carried out as a Workers static-assets deploy, the <directory> argument was only used to check for unsupported Pages features and was then dropped. Autoconfig detected an assets directory of its own instead, and when the project root contained an index.html it chose the whole project root, even when a narrower directory such as public had been requested. Source files and configuration outside the requested directory that were not excluded by .assetsignore could then be uploaded as public static assets.

    The requested directory is now validated before files are written and passed through to the deploy. Unconfigured projects are set up for static assets even when framework dependencies are present; existing Workers configs receive an --assets or legacy --site override. Projects configured through the Cloudflare Vite plugin alone keep their configuration and scripts, using the requested directory and an explicit or default compatibility date just for this deploy. Successful deployments without a config file are recorded in the project's .wrangler/deployments directory for that account and Worker, surviving dependency reinstalls. Repeat deploys verify the recorded version still belongs to the target Worker before allowing an update, preserving protection against name collisions and replacements.

  • #16562 aece4df Thanks @audricbizouarn-dashdoc! - Retry transient failures when starting a Workers assets upload session

    Asset manifest registration now uses the same bounded API retry policy as Worker uploads, including support for Retry-After. Temporary server errors no longer immediately abort an otherwise valid deployment. Persistent failures still surface the original error after the retry limit; this does not repair server-side issues affecting a specific Worker.

  • #16603 2667a9f Thanks @petebacondarwin! - Fix repeated slashes in URL paths bypassing Pages Functions middleware

    Pages Functions now collapse repeated slashes when looking up middleware, so requests such as //secure/one run the same middleware as /secure/one. The original request URL and function-route matching are preserved. Middleware receives a functionPath prefix from the original URL so imported assets can still resolve their relative paths.

  • #16525 ed7fb41 Thanks @petebacondarwin! - Validate OAuth error callbacks against the pending login

    All authorization callbacks, including ones without a code or error, now require the matching login state. Unrelated callbacks leave the login running so the authorization page can complete it, and control characters in provider error messages are displayed as escaped text.

  • #16597 f9dbb22 Thanks @guybedford! - Fix WebAssembly stack frames printing as at [object Object] in source-mapped errors

    WebAssembly frames in source-mapped error stack traces now show their original function and location instead of [object Object].

  • Updated dependencies [76e18a8, 76e18a8, 009ca6e]:

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.