-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating for v5 #119
Updating for v5 #119
Conversation
/* istanbul ignore next */ | ||
const clearPerformance = performance.clearMeasures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we do not support Node v14 anymore, this is not needed, I guest
@@ -59,7 +52,7 @@ async function fastifyRoutesStats (fastify, opts) { | |||
|
|||
fastify.addHook('onSend', function (request, reply, _, next) { | |||
if (request[decoratorName]) { | |||
const routeId = reply.context.config.statsId || request.raw.url | |||
const routeId = request.routeOptions.config.statsId || request.raw.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.context
will be deprecated in Fastify v5, thus I used the new suggested request.routeOptions.config
@@ -1,2 +1,3 @@ | |||
show-full-coverage: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old version of tap
showed the coverage even when it was 100%. New version doesn't unless show-full-coverage
is set to true
Also You should remove them or replace with |
Latest version of `tap` uses `c8` instead of `istanbul`
Sorry, I missed that. I also forgot to push the workflow file, so the actions were failing: I've updated the |
Thanks! |
* chore: update tap configuration and NPM deps * fix: update code to be compliant with node>=16 and fastify>=5 * chore: update plugin-ci to v4.1 * chore: use c8 comment instead of istanbul Latest version of `tap` uses `c8` instead of `istanbul` * fix: add missing patch in plugin version
Closes #118
Checklist
npm run test
andnpm run benchmark
and the Code of conduct
CC @simoneb