github cloudflare/workers-sdk @cloudflare/workers-utils@0.21.1

latest releases: @cloudflare/vitest-pool-workers@0.16.9, @cloudflare/vite-plugin@1.38.0, @cloudflare/pages-shared@0.13.139...
5 hours ago

Patch Changes

  • #13933 90092c0 Thanks @petebacondarwin! - Mark @cloudflare/workers-utils as side-effect-free and properly declare undici as a runtime dependency

    The package now declares "sideEffects": false in its package.json so that downstream bundlers can tree-shake unused exports. In particular, consumers that only use a subset of the package (for example, getTodaysCompatDate from the main entry) will no longer carry the cloudflared / tunnel exports — or their transitive dependencies — in their final bundle.

    undici has been moved from devDependencies to dependencies. Previously it was incorrectly listed as a devDependency while the bundler config marked it as external, leaving the published dist/index.mjs with an unresolved import { fetch } from "undici" for anyone installing the package directly. undici is deliberately kept external (rather than bundled) so that downstream consumers don't end up with two copies of undici in their bundle — which would break instanceof Request/Response/Headers checks across the boundary and prevent setGlobalDispatcher / proxy configuration from applying to the bundled copy.

    vitest has been added as an optional peerDependency because the ./test-helpers sub-export uses vitest's vi, beforeEach, and afterEach APIs at runtime; consumers that import from ./test-helpers must have vitest installed themselves.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.