Patch Changes
-
#13933
90092c0Thanks @petebacondarwin! - Mark@cloudflare/workers-utilsas side-effect-free and properly declareundicias a runtime dependencyThe package now declares
"sideEffects": falsein itspackage.jsonso that downstream bundlers can tree-shake unused exports. In particular, consumers that only use a subset of the package (for example,getTodaysCompatDatefrom the main entry) will no longer carry thecloudflared/tunnelexports — or their transitive dependencies — in their final bundle.undicihas been moved fromdevDependenciestodependencies. Previously it was incorrectly listed as a devDependency while the bundler config marked it as external, leaving the publisheddist/index.mjswith an unresolvedimport { fetch } from "undici"for anyone installing the package directly.undiciis deliberately kept external (rather than bundled) so that downstream consumers don't end up with two copies ofundiciin their bundle — which would breakinstanceof Request/Response/Headerschecks across the boundary and preventsetGlobalDispatcher/ proxy configuration from applying to the bundled copy.vitesthas been added as an optionalpeerDependencybecause the./test-helperssub-export usesvitest'svi,beforeEach, andafterEachAPIs at runtime; consumers that import from./test-helpersmust havevitestinstalled themselves.