@fedify/cfworkers: support @cloudflare/workers-types v5.x in peerDependencies #1255
Copy link
Copy link
Closed
Copy link
Labels
component/buildBuild system and packagingBuild system and packagingcomponent/kvKey–value store relatedKey–value store relatedcomponent/mqMessage queue relatedMessage queue relateddependenciesDependency updates and issuesDependency updates and issuesdifficulty/beginnerBeginner friendlyBeginner friendlyruntime/cfworkersCloudflare Workers runtime relatedCloudflare Workers runtime related
Description
Activity
- addedruntime/cfworkersCloudflare Workers runtime relatedCloudflare Workers runtime relatedcomponent/kvKey–value store relatedKey–value store relatedcomponent/mqMessage queue relatedMessage queue relatedcomponent/buildBuild system and packagingBuild system and packagingdependenciesDependency updates and issuesDependency updates and issuesdifficulty/beginnerBeginner friendlyBeginner friendly
on Oct 6, 2026 - linked a pull request that will close this issueAccept `@cloudflare/workers-types` v5 in `@fedify/cfworkers` #1260
on Oct 6, 2026 - added a commit that references this issue
on Oct 6, 2026 Fixed in Fedify 2.0.32, 2.1.28, 2.2.17, 2.3.12, and 2.4.2.
Reacted by Cody Bromley
Metadata
Metadata
Assignees
Labels
component/buildBuild system and packagingBuild system and packagingcomponent/kvKey–value store relatedKey–value store relatedcomponent/mqMessage queue relatedMessage queue relateddependenciesDependency updates and issuesDependency updates and issuesdifficulty/beginnerBeginner friendlyBeginner friendlyruntime/cfworkersCloudflare Workers runtime relatedCloudflare Workers runtime related
Type
Fields
Priority
None yet
Effort
None yet
@fedify/cfworkers 2.4.1 (and the current dev builds) declares a peer dependency on @cloudflare/workers-types@^4.20260511.1. Cloudflare stopped publishing
v4at4.20260702.1, and latest is now5.x. The current version of wrangler (4.147.0) declares an optional peer on @cloudflare/workers-types@^5.20261001.1, so npm can't install @fedify/cfworkers alongside wrangler without--legacy-peer-depsor an overrides entry pinning workers-types back tov4.Reproduction
Installing @cloudflare/workers-types@5 directly instead of wrangler fails the same way.
Proposed fix
Widen the peer range to accept v5, e.g.
^4.20260511.1 || ^5.20260511.1. The peer currently comes from the"@cloudflare/workers-types": ^4.20260511.1entry in the pnpm catalog (pnpm-workspace.yaml), via"catalog:"in packages/cfworkers/package.json. So the fix is either to bump that catalog entry or to give the peer its own range. pnpm only warns on peer conflicts, so the workspace probably doesn't hit this, but npm fails outright.The v5 types appear to work as-is. With
--legacy-peer-deps, this typechecks with zero errors against both @cloudflare/workers-types@4.20260702.1 and@5.20261005.1(TypeScript 6.0.3,@fedify/*2.4.1):{ "compilerOptions": { "target": "ESNext", "lib": ["ESNext"], "module": "ESNext", "moduleResolution": "bundler", "strict": true, "noEmit": true, "types": ["@cloudflare/workers-types"] }, "files": ["check.ts"] }