github cloudflare/workers-sdk @cloudflare/deploy-helpers@0.20.0

Minor Changes

  • #15998 b75421f Thanks @dario-piotrowicz! - Add assets.base_path support to Workers Assets

    Serve an asset directory from a public URL prefix without changing its on-disk layout:

    {
      "assets": {
        "directory": "./public",
        "base_path": "/docs"
      }
    }

    Wrangler, preview, Miniflare, and generated build configuration preserve the explicitly selected value, while the Asset Worker normalizes it and strips the prefix only for asset lookup. Requests passed to a user Worker, request-facing headers, and redirects retain the public path. Relative pathname inputs are interpreted as root-relative prefixes, URL-shaped values are rejected, and omitting the option preserves existing root-path behavior.

    Authored _headers and _redirects rules continue to match full public paths. In particular, both the source and destination of an authored 200 asset rewrite must include the configured public prefix; Asset Worker-generated redirects are prefixed automatically.

Patch Changes

  • #16069 425662b Thanks @Pitchfork-and-Torch! - fix: infer Preview/git branch names from unborn repositories

    getBranchName() previously used git rev-parse --abbrev-ref HEAD, which fails (and can leak stderr) before the first commit, and returns the literal HEAD on detached checkouts. It now uses git branch --show-current with stderr suppressed so unborn branches resolve and detached checkouts return no inferred name.

    Preview commit ref, commit message, and the CI repository URL git fallback swallow stderr the same way, so an unborn repository does not print Git fatal errors.

    Refs: cloudflare/cf#24

  • Updated dependencies [f025bbf, b75421f, 0ec13b7, 2b1a0ca, c492d63, ba52118, 946aaa7, 48f3c04, 5606a74, f8cdcb9, e44cf6b, aa2f9b7, 0b51fec]:

    • @cloudflare/config@0.24.0
    • @cloudflare/workers-utils@0.47.0
    • miniflare@5.20261006.0-alpha
    • @cloudflare/containers-shared@0.21.4
    • @cloudflare/cli-shared-helpers@0.2.4

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.