Files
wehub-resource-sync 70bf21e064
Handle Changesets / Handle Changesets (push) Waiting to run
Semgrep OSS scan / semgrep-oss (push) Waiting to run
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:30:11 +08:00

33 KiB

@cloudflare/workers-shared

0.19.7

Patch Changes

0.19.6

Patch Changes

  • #13855 dba84c2 Thanks @courtney-sims! - Temporarily hardcode asset worker cohort to "ent" for latency testing

    Disables the lookupCohort RPC call and cohort-based version routing in the outer entrypoint while keeping all the glue code (analytics, bindings, types) in place for re-enablement.

0.19.5

Patch Changes

  • #13740 6d2a573 Thanks @courtney-sims! - During deployment, routes requests to new versions of asset-worker based on customer account plan.

  • #12276 926bad5 Thanks @penalosa! - Warn when _headers rules contain multiple wildcards or wildcard combined with :splat

    Rules containing multiple wildcards (e.g. https://*.workers.dev/*) or combining a wildcard with a :splat placeholder (e.g. https://*.pages.dev/:splat) are now rejected during parsing. Previously this would fail silently during dev.

0.19.4

Patch Changes

  • #13363 6457fb3 Thanks @courtney-sims! - Prepares router-worker for a more gradual rollout by refactoring and separating out the invocation from the business logic. In the future, this will provide space for us to route requests to new versions of router-worker based on their plan, but should make no functional difference today.

0.19.3

Patch Changes

  • #13668 ef24ff2 Thanks @for-the-kidz! - Fix TypeError: rules is not iterable in the router-worker when static_routing is configured without user_worker rules

    The router-worker's static-routing include-rule evaluation passed config.static_routing.user_worker directly to the matcher, which iterates with for...of. When static_routing was set but user_worker was omitted, the matcher threw TypeError: rules is not iterable and failed the request. The adjacent asset_worker branch already falls back to [] in this case; the user_worker branch now does the same.

0.19.2

Patch Changes

  • #13354 854d66c Thanks @courtney-sims! - Prepares asset-worker for a more gradual rollout by refactoring and separating out the invocation from the business logic. In the future, this will provide space for us to route requests to new versions of asset-worker based on their plan, but should make no functional difference today.

0.19.1

Patch Changes

  • #12752 00a4356 Thanks @WillTaylorDev! - fix: Normalize backslash characters in /cdn-cgi paths

    Requests containing backslash characters in /cdn-cgi paths are now redirected to their normalized equivalents with forward slashes. This ensures consistent URL handling across different browsers and HTTP clients.

0.19.0

Minor Changes

  • #12467 7036310 Thanks @petebacondarwin! - Add support for inline comments in _redirects files

    You can now add inline comments to redirect rules using the # character:

    /old-page /new-page 301 # Moved during site redesign
    /blog/* /articles/:splat # Blog URL migration
    

    This improves the maintainability of _redirects files by allowing documentation of complex redirect rules directly alongside the rules themselves. Full-line comments (lines starting with #) continue to work as before. URL fragments (e.g., /page#section) are preserved correctly.

0.18.11

Patch Changes

0.18.10

Patch Changes

  • #11920 09a8829 Thanks @WillTaylorDev! - The asset-worker now uses a shorter 10-second TTL for cached assets, down from 60 seconds. This ensures that asset updates are reflected more quickly during development and deployment, reducing the window where stale assets might be served.

0.18.9

Patch Changes

0.18.8

Patch Changes

0.18.7

Patch Changes

  • #10462 c4e164c Thanks @WillTaylorDev! - Update mime dependency to 4.X so that javascript files will have content types of text/javascript instead of application/javascript. This will affect the content-types computed by Asset Worker within Workers Static Assets.

0.18.6

Patch Changes

  • #10402 8fd6dc0 Thanks @danielrs! - Sanitize double-slashes in asset-worker relative redirects.

    Without sanitizing, some relative redirect patterns were being treated as external redirects.

0.18.5

Patch Changes

  • #10007 d82c8e8 Thanks @WillTaylorDev! - Bugfix: Removes unnecessary cloning of the request. This is no longer needed. We were also seeing failures in runtime for large files due to this.

  • #10008 ca00d74 Thanks @vicb! - block responses with multiple Content Type values

0.18.4

Patch Changes

0.18.3

Patch Changes

  • #9908 ab75fd8 Thanks @GregBrimble! - perf: graduate asset-server binary search experiment to 100%

    The improved iterative binary search implementation has been graduated from a 50% experiment to the default implementation. This provides better performance for asset manifest lookups by replacing the recursive binary search with an iterative approach.

0.18.2

Patch Changes

0.18.1

Patch Changes

0.18.0

Minor Changes

Patch Changes

0.17.6

Patch Changes

  • #9416 3383021 Thanks @matthewdavidrodgers! - Adds support for static routing to Workers Assets

    Implements the proposal noted here https://github.com/cloudflare/workers-sdk/discussions/9143

    In brief: when static routing is present for a Worker with assets, routing via those static rules takes precedence. When a request is evaluated in the Router Worker, the request path is first compared to the "asset_worker" rules (which are to be specified via "negative" rules, e.g. "!/api/assets"). If any match, the request is forwarded directly to the Asset Worker. If instead any "user_worker" rules match, the request is forwarded directly to the User Worker. If neither match (or static routing was not provided), the existing behavior takes over.

    As part of this explicit routing, when static routing is present, the check against Sec-Fetch-Mode: navigate (to determine if this should serve an asset or go to the User Worker for not_found_handling) is disabled. Routing can be controlled by setting routing rules via assets.run_worker_first in your Wrangler configuration file.

0.17.5

Patch Changes

  • #9050 1be5644 Thanks @WalshyDev! - Adds tracing to _headers & _redirects in Workers Assets allowing Cloudflare employees to better debug customer issues regarding these features.

0.17.4

Patch Changes

0.17.3

Patch Changes

  • #9043 7744f1a Thanks @WalshyDev! - Adds tracing into asset-worker unstable methods so we can better measure/debug these.

0.17.2

Patch Changes

  • #8887 511be3d Thanks @GregBrimble! - Add log message when Sec-Fetch-Mode: navigate is responsible for assets routing decision in wrangler dev

0.17.1

Patch Changes

0.17.0

Minor Changes

  • #8443 3b1d081 Thanks @GregBrimble! - Requests with a Sec-Fetch-Mode: navigate header, made to a project with sec_fetch_mode_navigate_header_prefers_asset_serving compatibility flag, will be routed to the asset-worker rather than a user Worker when no exact asset match is found.

    Requests without that header will continue to be routed to the user Worker when no exact asset match is found.

0.16.0

Minor Changes

  • #7334 869ec7b Thanks @penalosa! - Packages in Workers SDK now support the versions of Node that Node itself supports (Current, Active, Maintenance). Currently, that includes Node v18, v20, and v22.

0.15.0

Minor Changes

  • #8390 53e6323 Thanks @GregBrimble! - Parse and apply metafiles (_headers and _redirects) in wrangler dev for Workers Assets

  • #8373 08b8c46 Thanks @WalshyDev! - Add CF-Cache-Status to Workers Assets responses to indicate if we returned a cached asset or not. This will also populate zone cache analytics and Logpush logs.

  • #8279 aba0e9c Thanks @GregBrimble! - Add support for custom headers and redirects in asset-worker

0.14.5

Patch Changes

  • #8338 2d40989 Thanks @GregBrimble! - feat: Upload _headers and _redirects if present with Workers Assets as part of wrangler deploy and wrangler versions upload.

  • #8350 56a8aed Thanks @GregBrimble! - chore: Removes non-public methods from asset-worker

0.14.4

Patch Changes

  • #8247 a9a4c33 Thanks @GregBrimble! - feat: Omits Content-Type header for files of an unknown extension in Workers Assets

0.14.3

Patch Changes

0.14.2

Patch Changes

0.14.1

Patch Changes

0.14.0

Minor Changes

0.13.2

Patch Changes

  • #8044 7006630 Thanks @GregBrimble! - chore: Adds analytics and code (zero-percent gated) for a new asset manifest search algorithm

0.13.1

Patch Changes

0.13.0

Minor Changes

  • #7897 34f9797 Thanks @WillTaylorDev! - chore: provides run_worker_first for Worker-script-first configuration. Deprecates experimental_serve_directly.

0.12.5

Patch Changes

0.12.4

Patch Changes

  • #7887 cab3e37 Thanks @WalshyDev! - chore: add more observability into asset-worker for the Workers team to better insight into how requests are handled.

  • #7887 cab3e37 Thanks @WalshyDev! - chore: add tracing into router-worker so the Workers team can have a better insight into into how requests are handled.

0.12.3

Patch Changes

  • #7844 92ed81e Thanks @WalshyDev! - chore: plumb through account ID and Worker ID into the asset-worker and router-worker for use in analytics and error reporting.

0.12.2

Patch Changes

  • #7808 7faabeb Thanks @WalshyDev! - fix: fix analytics not being logged for asset-worker in the case of a successful request.

0.12.1

Patch Changes

  • #7790 c588c8a Thanks @WalshyDev! - fix: remove --experimental-versions flag from the Asset/Router Workers deploy scripts, now that Wrangler has removed the flag.

0.12.0

Minor Changes

Patch Changes

  • #7768 97603f0 Thanks @WalshyDev! - fix: on a 404 from KV, we do not want the asset to stay in cache for the normal 1 year TTL. Instead we want to re-insert with a 60s TTL to revalidate and prevent a bad 404 from persisting.

0.11.2

Patch Changes

  • #7612 2e78812 Thanks @Cherry! - fix: resolves an issue where a malformed path such as https://example.com/%A0 would cause an unhandled error

0.11.1

Patch Changes

  • #7598 178fd01 Thanks @CarmenPopoviciu! - Dummy workers-shared version bump

    The Router Worker and Asset Worker of workers-shared are currently in a weird state that prevents us to redeploy them. The current versions of these workers are developer modified due to adding secrets. We want a CI controlled version to safely use these secrets.

    This commit performs a dummy workers-shared version bump to unlock us from this blocked state.

0.11.0

Minor Changes

0.10.0

Minor Changes

0.9.1

Patch Changes

  • #7410 6b21919 Thanks @WalshyDev! - chore: remove awaits from Asset Worker fetches. This has no user-facing impact.

0.9.0

Minor Changes

Patch Changes

0.8.0

Minor Changes

0.7.1

Patch Changes

0.7.0

Minor Changes

0.6.0

Minor Changes

0.5.4

Patch Changes

  • #6728 1ca313f Thanks @emily-shen! - fix: remove filepath encoding on asset upload and handle sometimes-encoded characters

    Some characters like [ ] @ are encoded by encodeURIComponent() but are often requested at an unencoded URL path. This change will make assets with filenames with these characters accessible at both the encoded and unencoded paths, but to use the encoded path as the canonical one, and to redirect requests to the canonical path if necessary.

0.5.3

Patch Changes

0.5.2

Patch Changes

0.5.1

Patch Changes

  • #6670 fed1fda Thanks @GregBrimble! - chore: Rename asset-worker RPC methods as unstable_*

    The Asset Worker is currently set up as a WorkerEntrypoint class so that it is able to accept RPC calls to any of its public methods. There are currently four such public methods defined on this Worker: canFetch, getByETag, getByPathname and exists. While we are stabilising the implementation details of these methods, we would like to prevent developers from having their Workers call these methods directly. To that end, we are adopting the unstable_<method_name> naming convention for all of the aforementioned methods, to indicate that they are still in flux and that they are not an established API contract.

0.5.0

Minor Changes

  • #6631 59a0072 Thanks @emily-shen! - feat: Add asset config behaviour.

    Add html_handling (e.g. /index.html -> /) with options "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none" to Asset Worker.

    Add not_found_handling behaviour with options "404-page" | "single-page-application" | "none" to Asset Worker.

0.4.1

Patch Changes

  • #6588 45ad2e0 Thanks @CarmenPopoviciu! - fix: Stabilize Workers naming across workers-shared

    The Asset Worker and Router Worker use inconsistent naming conventions across workers-shared. This commit stabilizes the naming to Asset Worker and Router Worker and permutations of those.

0.4.0

Minor Changes

  • #6539 6c057d1 Thanks @CarmenPopoviciu! - feat: Add basic Asset Worker behaviour

    This commit implements a basic Asset Worker behaviour, including:

    • headers handling
    • 200/404/500 response handling
    • fetching data from KV

0.3.0

Minor Changes

0.2.0

Minor Changes

  • #6403 00f340f Thanks @CarmenPopoviciu! - feat: Extend KV plugin behaviour to support Workers assets

    This commit extends Miniflare's KV plugin's behaviour to support Workers assets, and therefore enables the emulation of Workers with assets in local development.

0.1.0

Minor Changes

  • #6370 8a3c6c0 Thanks @CarmenPopoviciu! - feat: Create very basic Asset Server Worker and plumb it into wrangler dev

    These changes do the ground work needed in order to add Assets support for Workers in wrangler dev. They implement the following:

    • it creates a new package called workers-shared that hosts the Asset Server Worker, and the Router Workerin the future
    • it scaffolds the Asset Server Worker in some very basic form, with basic configuration. Further behaviour implementation will follow in a subsequent PR
    • it does the ground work of plumbing ASW into Miniflare