Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Fastify template project from v4 to v5, migrating from the tap testing framework to Node.js native test runner (node:test). This modernizes the project to align with the latest Fastify CLI template and reduces external dependencies.
Key Changes:
- Upgraded Fastify from v4.28.1 to v5.0.0 and all related packages (@fastify/autoload, @fastify/sensible, fastify-plugin, fastify-cli)
- Migrated test framework from
tapto Node.js nativenode:testandnode:assert - Updated test lifecycle hooks from
t.teardown()tot.after() - Updated Fastify documentation URLs from
www.fastify.iotofastify.dev - Streamlined .gitignore to remove unnecessary entries
- Added repository metadata to package.json
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated dependencies to Fastify v5 ecosystem; changed test script to use Node.js native test runner; added repository metadata |
| package-lock.json | Updated all dependency versions to match new package.json requirements |
| test/routes/root.test.js | Migrated from tap to node:test/assert; updated assertions from t.same() to assert.deepStrictEqual() |
| test/routes/example.test.js | Migrated from tap to node:test/assert; updated assertions from t.equal() to assert.equal() |
| test/plugins/support.test.js | Migrated from tap to node:test/assert; updated assertions from t.equal() to assert.equal() |
| test/helper.js | Updated test cleanup from t.teardown() to t.after(); added skipOverride: true config for proper plugin registration in tests |
| routes/README.md | Updated documentation URLs to fastify.dev; improved description of modular monolith approach |
| plugins/README.md | Updated documentation URLs to fastify.dev |
| README.md | Simplified header; updated documentation URL to fastify.dev |
| .gitignore | Streamlined to remove unnecessary entries for cleaner configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| "fastify-cli": "^7.4.0" | ||
| }, | ||
| "devDependencies": { | ||
| "tap": "^21.0.0" |
There was a problem hiding this comment.
The tap package is still listed as a devDependency but is no longer used since the tests have been migrated to Node.js native test runner (node:test). This unused dependency should be removed from devDependencies.
| "tap": "^21.0.0" |
Tony133
left a comment
There was a problem hiding this comment.
Need to remove the tap dependency from package.json, for the rest LGTM
PR to upgrade to the latest version of the project bootstrapped with fastify-cli