Skip to content

fix: support @cloudflare/workers-types v5 (widen peer to >=4) - #59

Merged
zpg6 merged 1 commit into
zpg6:mainfrom
mmcintosh:fix/workers-types-v5-peer
Jul 23, 2026
Merged

fix: support @cloudflare/workers-types v5 (widen peer to >=4)#59
zpg6 merged 1 commit into
zpg6:mainfrom
mmcintosh:fix/workers-types-v5-peer

Conversation

@mmcintosh

@mmcintosh mmcintosh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Widens the @cloudflare/workers-types peerDependency from ^4.0.0 to >=4 so the library installs cleanly for consumers on current wrangler (4.108+ peers workers-types@5, which the old pin made unresolvable). Closes #58.

Validation

Clean clone (pnpm 10.10.0 / Node 20), mirroring what build.yml checks:

Check workers-types@4 (4.20260405.1) workers-types@5 (5.20260721.1)
pnpm build ✅ exit 0 ✅ exit 0
pnpm typecheck ✅ exit 0 ✅ exit 0

v5's only breaking change is the removal of dated entrypoints, which this library never imported — it consumes only stable type-only binding types (D1Database, KVNamespace, R2Bucket, IncomingRequestCfProperties). Fully backward-compatible: v4 remains supported, >=4 only adds v5.

Root cause + reproduction in #58.

@mmcintosh
mmcintosh marked this pull request as ready for review July 22, 2026 00:24
@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/better-auth-cloudflare@59

commit: 4d2953c

@zpg6

zpg6 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

@mmcintosh - hey there.. thanks for the contribution!

Please remove the excess doc changes, we would just need the package.json 1 line change

@mmcintosh
mmcintosh force-pushed the fix/workers-types-v5-peer branch from fc8afde to 4d2953c Compare July 22, 2026 16:08
@mmcintosh mmcintosh changed the title fix: support @cloudflare/workers-types v5 (widen peer + compat CI matrix) fix: support @cloudflare/workers-types v5 (widen peer to >=4) Jul 22, 2026
@mmcintosh

Copy link
Copy Markdown
Contributor Author

Done — slimmed to the one-line package.json change; README and workflow additions removed. Thanks for the quick review!

@zpg6
zpg6 merged commit 72fabcd into zpg6:main Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare Workers types v5 @cloudflare/workers-types v5: peerDependency "^4.0.0" blocks consumers on current wrangler

2 participants