Skip to content

feat: add Fastify v4/v5 dual compatibility in package and CI#87

Merged
denbon05 merged 1 commit into
mainfrom
fastify-v4-and-v5-support
Mar 28, 2026
Merged

feat: add Fastify v4/v5 dual compatibility in package and CI#87
denbon05 merged 1 commit into
mainfrom
fastify-v4-and-v5-support

Conversation

@denbon05

Copy link
Copy Markdown
Owner

Summary

  • Add explicit dual Fastify peer support by changing peerDependencies.fastify to ^4.10.0 || ^5.0.0.
  • Update plugin metadata in lib/index.ts (fastify-plugin compatibility range) to the same dual-major constraint.
  • Raise supported Node engine to >=18.x.
  • Upgrade dev Fastify to v5 and refresh lockfile.
  • Expand CI matrix to test both Fastify 4.x and 5.x across Node LTS versions, excluding unsupported combo (node 18.x + fastify 5.x).

Why

  • Keep compatibility for existing users on Fastify v4 while enabling users migrating to v5.
  • Address dependency/security pressure on Fastify v4 without forcing an immediate hard cutover for all consumers.
  • Continuously verify compatibility in CI rather than relying on a single dev dependency version.

Test plan

  • npm run build
  • npm run lint
  • npm test with Fastify v5
  • npm install --no-save fastify@4.x && npm test (manual compatibility check)
  • CI matrix now validates both Fastify majors on PRs

@denbon05 denbon05 merged commit 5b91b98 into main Mar 28, 2026
10 checks passed
@denbon05 denbon05 deleted the fastify-v4-and-v5-support branch March 28, 2026 12:13
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.

1 participant