Skip to content

fix(#5180): close secondary bindings after primary is closed#5201

Merged
Uzlopak merged 2 commits intomainfrom
fix/5180
Dec 12, 2023
Merged

fix(#5180): close secondary bindings after primary is closed#5201
Uzlopak merged 2 commits intomainfrom
fix/5180

Conversation

@metcoder95
Copy link
Member

@metcoder95 metcoder95 commented Dec 10, 2023

Closes #5180

I tried to add a small test to reproduce it, it does covers the case but open to any suggestion to improve it.

Checklist

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tchapacan
Copy link

tchapacan commented Dec 11, 2023

Hello, sorry I’m quite new to the ecosystem (few weeks) but on my spare time I try follow some issues here and there and would be happy to help if needed.

Following initial work on this fix, after pulling this branch and playing arround, it seems the issue is still present using the reproduction example https://github.com/kingston/fastify-websocket-repro

Even after the fix I still encounter the issue :

  • Without connection: (still OK)
Closing main server
NET 35039: SERVER _emitCloseIfDrained
NET 35039: SERVER: emit close
Closing secondary server
NET 35039: SERVER _emitCloseIfDrained
NET 35039: SERVER: emit close
  • With connection: (KO)
Closing main server
NET 34756: destroy
NET 34756: close
NET 34756: close handle
NET 34756: has server
NET 34756: SERVER _emitCloseIfDrained
NET 34756: SERVER handle? true   connections? 1
NET 34756: SERVER _emitCloseIfDrained
NET 34756: SERVER handle? false   connections? 1
NET 34756: emit close
HTTP 34756: server socket close

If seems that in the callback function of the preClose, not all statement are evaluated using the else if causing the first true to be resolved and exit.
As far as I have understand (sorry I'm really new and don't manage all the codebase), to properly close the server we need absolutely all connection to be terminated before, so switching to multiple if statement might solved the issue ?


  • Before :

    fastify/fastify.js

    Lines 434 to 452 in 71385a7

    if (fastify[kState].listening) {
    /* istanbul ignore next: Cannot test this without Node.js core support */
    if (forceCloseConnections === 'idle') {
    // Not needed in Node 19
    instance.server.closeIdleConnections()
    /* istanbul ignore next: Cannot test this without Node.js core support */
    } else if (serverHasCloseAllConnections && forceCloseConnections) {
    instance.server.closeAllConnections()
    } else if (forceCloseConnections === true) {
    for (const conn of fastify[kKeepAliveConnections]) {
    // We must invoke the destroy method instead of merely unreffing
    // the sockets. If we only unref, then the callback passed to
    // `fastify.close` will never be invoked; nor will any of the
    // registered `onClose` hooks.
    conn.destroy()
    fastify[kKeepAliveConnections].delete(conn)
    }
    }
    }

  • After (one possible proposition) :

if (fastify[kState].listening) {
    /* istanbul ignore next: Cannot test this without Node.js core support */
    if (forceCloseConnections === 'idle') {
      // Not needed in Node 19instance.server.closeIdleConnections()
      instance.server.closeIdleConnections()
    }
    if (serverHasCloseAllConnections && forceCloseConnections) {
      instance.server.closeAllConnections()
    }
    if (forceCloseConnections === true) {
      for (const conn of fastify[kKeepAliveConnections]) {
        // We must invoke the destroy method instead of merely unreffing
        // the sockets. If we only unref, then the callback passed to
        // `fastify.close` will never be invoked; nor will any of the
        // registered `onClose` hooks.
        conn.destroy()
        fastify[kKeepAliveConnections].delete(conn)
      }
    }
  }

Now it seems connection are properly close and server as well :

Closing main server
NET 35164: destroy
NET 35164: close
NET 35164: close handle
NET 35164: has server
NET 35164: SERVER _emitCloseIfDrained
NET 35164: SERVER handle? true   connections? 1
NET 35164: destroy
NET 35164: close
NET 35164: close handle
NET 35164: has server
NET 35164: SERVER _emitCloseIfDrained
NET 35164: SERVER handle? true   connections? 0
NET 35164: SERVER _emitCloseIfDrained
NET 35164: SERVER: emit close
Closing secondary server
NET 35164: SERVER _emitCloseIfDrained
NET 35164: SERVER: emit close

Does it seems correct to you ?

I can pull and push on top of this branch if needed or I can let you handle and update the code (test seems to pass on my local env)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@metcoder95
Copy link
Member Author

With connection: (KO)

It seems the log for the secondary server is missing, it never triggered in order.

@tchapacan
Copy link

tchapacan commented Dec 12, 2023

  • Here logging for the failed scenario : (with some console.log at some keepoint in the logic)
$ NODE_DEBUG=net,http,timers node index.js
...
{"level":30,"time":1702373258116,"pid":1713,"hostname":"lalala","msg":"Received SIGINT signal. Shutting down..."}
start closing main server
start flushing idle connection
NET 1713: destroy
NET 1713: close
NET 1713: close handle
NET 1713: has server
NET 1713: SERVER _emitCloseIfDrained
NET 1713: SERVER handle? true   connections? 1
end flushing idle connection
NET 1713: SERVER _emitCloseIfDrained
NET 1713: SERVER handle? false   connections? 1
NET 1713: emit close
HTTP 1713: server socket close
{"level":50,"time":1702373263118,"pid":1713,"hostname":"lalala","err":{"type":"Error","message":"Shutdown timed out","stack":"Error: Shutdown timed out\n    at Timeout._onTimeout (/Users/lalalala/nodejourney/fastify-websocket-repro/index.js:25:23)\n    at listOnTimeout (node:internal/timers:573:17)\n    at process.processTimers (node:internal/timers:514:7)"},"msg":"Shutdown timed out"}
  • Here logging after proposition of modify the else if into a multiple if statement in the preClose callback function
$ NODE_DEBUG=net,http,timers node index.js
...
{"level":30,"time":1702373627585,"pid":1985,"hostname":"lalalala","msg":"Received SIGINT signal. Shutting down..."}
start closing main server
start flushing idle connection
NET 1985: destroy
NET 1985: close
NET 1985: close handle
NET 1985: has server
NET 1985: SERVER _emitCloseIfDrained
NET 1985: SERVER handle? true   connections? 1
end flushing idle connection
start flushing all connection
NET 1985: destroy
NET 1985: close
NET 1985: close handle
NET 1985: has server
NET 1985: SERVER _emitCloseIfDrained
NET 1985: SERVER handle? true   connections? 0
end flushing all connection
NET 1985: SERVER _emitCloseIfDrained
NET 1985: SERVER: emit close
start closing secoundary server
NET 1985: SERVER _emitCloseIfDrained
start flushing connection
end closing secoundary server
end closing main server
NET 1985: SERVER: emit close

I was suspecting that all connection wasn't properly flushed before closing the main server, causing the timeout in the first scenario. And the secondary server to never being properly close ? The else if statement was my suspect here :

fastify/fastify.js

Lines 434 to 452 in 71385a7

if (fastify[kState].listening) {
/* istanbul ignore next: Cannot test this without Node.js core support */
if (forceCloseConnections === 'idle') {
// Not needed in Node 19
instance.server.closeIdleConnections()
/* istanbul ignore next: Cannot test this without Node.js core support */
} else if (serverHasCloseAllConnections && forceCloseConnections) {
instance.server.closeAllConnections()
} else if (forceCloseConnections === true) {
for (const conn of fastify[kKeepAliveConnections]) {
// We must invoke the destroy method instead of merely unreffing
// the sockets. If we only unref, then the callback passed to
// `fastify.close` will never be invoked; nor will any of the
// registered `onClose` hooks.
conn.destroy()
fastify[kKeepAliveConnections].delete(conn)
}
}
}

But if you aren't able to reproduce it anymore with your fix then it might be my local setup maybe sorry!

Note that i try to reproduce the scenario here https://github.com/kingston/fastify-websocket-repro and i close the server immediately after having established a session with the browser, i don't let the socket die by entering in timeout

@Uzlopak
Copy link
Contributor

Uzlopak commented Dec 12, 2023

@metcoder95 What about the remark of @tchapacan ?

CI is green. Ready to merge?

@metcoder95
Copy link
Member Author

But if you aren't able to reproduce it anymore with your fix then it might be my local setup maybe sorry!

No worries @tchapacan, nothing to worry about it is helpful what you provide so I can thoroughly test the fix. Sadly I couldn't reproduce the problem it after this fix, and it behave exactly the same as we were deleting the else/if from your xample:

node index.js
closing primary
secondary server closed

Using DEBUG:

NET 20920: setupListenHandle ::1 3000 6 0 undefined <- primary
NET 20920: setupListenHandle: create a handle
NET 20920: bind to ::1
NET 20920: setupListenHandle 127.0.0.1 3000 4 0 undefined <- secondary
NET 20920: setupListenHandle: create a handle
NET 20920: bind to 127.0.0.1
NET 20920: onconnection
NET 20920: _read
NET 20920: Socket._handle.readStart
HTTP 20920: SERVER new http connection
(node:20920) Warning: Setting the NODE_DEBUG environment variable to 'http' can expose sensitive data (such as passwords, tokens and authentication headers) in the resulting log.
(Use `node --trace-warnings ...` to show where the warning was created)
HTTP 20920: SERVER socketOnParserExecute 533
HTTP 20920: SERVER upgrade or connect GET
HTTP 20920: SERVER have listener for upgrade
^Chello world! undefined
NET 20920: SERVER _emitCloseIfDrained
NET 20920: SERVER handle? false   connections? 1
NET 20920: _final: not ended, call shutdown()
NET 20920: _read
NET 20920: afterShutdown destroyed=false
NET 20920: destroy
NET 20920: close
NET 20920: close handle
NET 20920: has server
NET 20920: SERVER _emitCloseIfDrained <- primary
NET 20920: SERVER: emit close
NET 20920: SERVER _emitCloseIfDrained <- secondary
NET 20920: SERVER: emit close

I believe the PR should be okay to go for now, we can always open a new issue if we face the same happening.

@Uzlopak Uzlopak merged commit cd84d13 into main Dec 12, 2023
@Uzlopak Uzlopak deleted the fix/5180 branch December 12, 2023 19:54
renovate bot referenced this pull request in tomacheese/telcheck Dec 13, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.dev/)
([source](https://togithub.com/fastify/fastify)) | [`4.24.3` ->
`4.25.0`](https://renovatebot.com/diffs/npm/fastify/4.24.3/4.25.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.24.3/4.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.24.3/4.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.25.0`](https://togithub.com/fastify/fastify/releases/tag/v4.25.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.24.3...v4.25.0)

#### What's Changed

- feat: Improve RouteShorthandOptions\['constraints'] type by
[@&#8203;Fcmam5](https://togithub.com/Fcmam5) in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- fix: add [@&#8203;eomm](https://togithub.com/eomm) and
[@&#8203;jsumners](https://togithub.com/jsumners) as lead maintainers by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5115](https://togithub.com/fastify/fastify/pull/5115)
- fix: reply.send supports Uint8Array payload by
[@&#8203;SgtPooki](https://togithub.com/SgtPooki) in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- refactor: migrate deprecation warnings to actual deprecation warnings
by [@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/5126](https://togithub.com/fastify/fastify/pull/5126)
- docs: added documentation about warnings by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5108](https://togithub.com/fastify/fastify/pull/5108)
- test(logger): restrict temp file permissions by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5128](https://togithub.com/fastify/fastify/pull/5128)
- refactor(lib/hooks): replace `typeof` undefined check by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5127](https://togithub.com/fastify/fastify/pull/5127)
- chore: replace mention of fastify `.io` domain with `.dev` by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5129](https://togithub.com/fastify/fastify/pull/5129)
- docs(security): add prose explaining OpenSSF CII Best Practices badge
results by [@&#8203;ljharb](https://togithub.com/ljharb) in
[https://github.com/fastify/fastify/pull/5111](https://togithub.com/fastify/fastify/pull/5111)
- chore: Bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5134](https://togithub.com/fastify/fastify/pull/5134)
- fix(types): add handler property to routeOptions by
[@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- docs(readme): fix ci badge path by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5138](https://togithub.com/fastify/fastify/pull/5138)
- docs: Fix small typo in Typescript docs by
[@&#8203;john-ko](https://togithub.com/john-ko) in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- feat(plugins): mixing async and callback style now returns a warning
by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5139](https://togithub.com/fastify/fastify/pull/5139)
- docs: mention about multipart support by
[@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- docs: add [@&#8203;fastify/vite](https://togithub.com/fastify/vite) to
core plugins list by [@&#8203;galvez](https://togithub.com/galvez) in
[https://github.com/fastify/fastify/pull/5153](https://togithub.com/fastify/fastify/pull/5153)
- docs: add
[@&#8203;scalar/fastify-api-reference](https://togithub.com/scalar/fastify-api-reference)
to community plugins list by
[@&#8203;hanspagel](https://togithub.com/hanspagel) in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- docs: Remove routeOptions reference in Reply.md by
[@&#8203;shadahmad7](https://togithub.com/shadahmad7) in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
- docs(ecosystem): add fastify-uws by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/5160](https://togithub.com/fastify/fastify/pull/5160)
- docs: removed unmaintained fastify-nodemailer from ecosystem by
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- docs: clarify handling of streams and buffers by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/5166](https://togithub.com/fastify/fastify/pull/5166)
-
docs([#&#8203;5142](https://togithub.com/fastify/fastify/issues/5142)):
aligned errors and warnings documentation by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5162](https://togithub.com/fastify/fastify/pull/5162)
- docs(reference/hooks): add information about prehandler by
[@&#8203;RjManhas](https://togithub.com/RjManhas) in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- fix: type FastifyInstance\['route'] and RouteShorthandMethod by
[@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- docs (reference): Fix small typo in Request by
[@&#8203;bngarren](https://togithub.com/bngarren) in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- chore: gitpodify by
[@&#8203;ghostdevv](https://togithub.com/ghostdevv) in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- docs(ecosystem): Add Apitally by
[@&#8203;itssimon](https://togithub.com/itssimon) in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- fix: Update reply.context deprecation warning by
[@&#8203;avaly](https://togithub.com/avaly) in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- docs(ecosystem): adds @&#8203;blastorg/fastify/aws-dynamodb-cache to
community plugins list by
[@&#8203;fredrikj31](https://togithub.com/fredrikj31) in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- docs: update preHandler hook example by
[@&#8203;tarunrajput](https://togithub.com/tarunrajput) in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- types: added http header types to reply by
[@&#8203;skwee357](https://togithub.com/skwee357) in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- test: add tests for TOC of errors.md by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5194](https://togithub.com/fastify/fastify/pull/5194)
- ci: pin node 18 to 18.18.2 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5197](https://togithub.com/fastify/fastify/pull/5197)
- docs(ecosystem): add http-wizard by
[@&#8203;flodlc](https://togithub.com/flodlc) in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- chore: Bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5183](https://togithub.com/fastify/fastify/pull/5183)
- ci: fix broken ci by skipping tests if node v > 18.19.0 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5195](https://togithub.com/fastify/fastify/pull/5195)
- fix: allow async hooks in `RouteShorthandOptions` without breaking
`request` and `reply` types by
[@&#8203;bienzaaron](https://togithub.com/bienzaaron) in
[https://github.com/fastify/fastify/pull/5147](https://togithub.com/fastify/fastify/pull/5147)
- fix([#&#8203;5180](https://togithub.com/fastify/fastify/issues/5180)):
close secondary bindings after primary is closed by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5201](https://togithub.com/fastify/fastify/pull/5201)
- chore: update process-warning by
[@&#8203;Eomm](https://togithub.com/Eomm) in
[https://github.com/fastify/fastify/pull/5206](https://togithub.com/fastify/fastify/pull/5206)
- types: nullish error types in callback function's parameter for
`after` and `ready` method by
[@&#8203;nokazn](https://togithub.com/nokazn) in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- fix([#&#8203;5049](https://togithub.com/fastify/fastify/issues/5049)):
Remove duplicated calls to onReady by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5051](https://togithub.com/fastify/fastify/pull/5051)
- chore: remove unused type assertion by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

**Full Changelog**:
fastify/fastify@v4.24.3...v4.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tomacheese/telcheck).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in redwoodjs/graphql Jan 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.dev/)
([source](https://togithub.com/fastify/fastify)) | [`4.24.3` ->
`4.25.2`](https://renovatebot.com/diffs/npm/fastify/4.24.3/4.25.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.24.3/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.24.3/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.25.2`](https://togithub.com/fastify/fastify/releases/tag/v4.25.2)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.25.1...v4.25.2)

#### What's Changed

- fix: `npm run test:watch` by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[https://github.com/fastify/fastify/pull/5221](https://togithub.com/fastify/fastify/pull/5221)
- fix: always consume stream payloads when responding to 204 with no
body by [@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5231](https://togithub.com/fastify/fastify/pull/5231)
- docs: update setErrorHandler to explain not found behaviour by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[https://github.com/fastify/fastify/pull/5218](https://togithub.com/fastify/fastify/pull/5218)

#### New Contributors

- [@&#8203;domdomegg](https://togithub.com/domdomegg) made their first
contribution in
[https://github.com/fastify/fastify/pull/5221](https://togithub.com/fastify/fastify/pull/5221)

**Full Changelog**:
fastify/fastify@v4.25.1...v4.25.2

###
[`v4.25.1`](https://togithub.com/fastify/fastify/releases/tag/v4.25.1)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.25.0...v4.25.1)

#### What's Changed

- fix: route constraints by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[https://github.com/fastify/fastify/pull/5207](https://togithub.com/fastify/fastify/pull/5207)
- fix: Better plugin name detection for FSTWRN002 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5209](https://togithub.com/fastify/fastify/pull/5209)
- chore: at-large project by [@&#8203;Eomm](https://togithub.com/Eomm)
in
[https://github.com/fastify/fastify/pull/5211](https://togithub.com/fastify/fastify/pull/5211)

**Full Changelog**:
fastify/fastify@v4.25.0...v4.25.1

###
[`v4.25.0`](https://togithub.com/fastify/fastify/releases/tag/v4.25.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.24.3...v4.25.0)

#### What's Changed

- feat: Improve RouteShorthandOptions\['constraints'] type by
[@&#8203;Fcmam5](https://togithub.com/Fcmam5) in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- fix: add [@&#8203;eomm](https://togithub.com/eomm) and
[@&#8203;jsumners](https://togithub.com/jsumners) as lead maintainers by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5115](https://togithub.com/fastify/fastify/pull/5115)
- fix: reply.send supports Uint8Array payload by
[@&#8203;SgtPooki](https://togithub.com/SgtPooki) in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- refactor: migrate deprecation warnings to actual deprecation warnings
by [@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/5126](https://togithub.com/fastify/fastify/pull/5126)
- docs: added documentation about warnings by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5108](https://togithub.com/fastify/fastify/pull/5108)
- test(logger): restrict temp file permissions by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5128](https://togithub.com/fastify/fastify/pull/5128)
- refactor(lib/hooks): replace `typeof` undefined check by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5127](https://togithub.com/fastify/fastify/pull/5127)
- chore: replace mention of fastify `.io` domain with `.dev` by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5129](https://togithub.com/fastify/fastify/pull/5129)
- docs(security): add prose explaining OpenSSF CII Best Practices badge
results by [@&#8203;ljharb](https://togithub.com/ljharb) in
[https://github.com/fastify/fastify/pull/5111](https://togithub.com/fastify/fastify/pull/5111)
- chore: Bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5134](https://togithub.com/fastify/fastify/pull/5134)
- fix(types): add handler property to routeOptions by
[@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- docs(readme): fix ci badge path by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5138](https://togithub.com/fastify/fastify/pull/5138)
- docs: Fix small typo in Typescript docs by
[@&#8203;john-ko](https://togithub.com/john-ko) in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- feat(plugins): mixing async and callback style now returns a warning
by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5139](https://togithub.com/fastify/fastify/pull/5139)
- docs: mention about multipart support by
[@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- docs: add [@&#8203;fastify/vite](https://togithub.com/fastify/vite) to
core plugins list by [@&#8203;galvez](https://togithub.com/galvez) in
[https://github.com/fastify/fastify/pull/5153](https://togithub.com/fastify/fastify/pull/5153)
- docs: add
[@&#8203;scalar/fastify-api-reference](https://togithub.com/scalar/fastify-api-reference)
to community plugins list by
[@&#8203;hanspagel](https://togithub.com/hanspagel) in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- docs: Remove routeOptions reference in Reply.md by
[@&#8203;shadahmad7](https://togithub.com/shadahmad7) in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
- docs(ecosystem): add fastify-uws by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/5160](https://togithub.com/fastify/fastify/pull/5160)
- docs: removed unmaintained fastify-nodemailer from ecosystem by
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- docs: clarify handling of streams and buffers by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/5166](https://togithub.com/fastify/fastify/pull/5166)
-
docs([#&#8203;5142](https://togithub.com/fastify/fastify/issues/5142)):
aligned errors and warnings documentation by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5162](https://togithub.com/fastify/fastify/pull/5162)
- docs(reference/hooks): add information about prehandler by
[@&#8203;RjManhas](https://togithub.com/RjManhas) in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- fix: type FastifyInstance\['route'] and RouteShorthandMethod by
[@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- docs (reference): Fix small typo in Request by
[@&#8203;bngarren](https://togithub.com/bngarren) in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- chore: gitpodify by
[@&#8203;ghostdevv](https://togithub.com/ghostdevv) in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- docs(ecosystem): Add Apitally by
[@&#8203;itssimon](https://togithub.com/itssimon) in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- fix: Update reply.context deprecation warning by
[@&#8203;avaly](https://togithub.com/avaly) in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- docs(ecosystem): adds @&#8203;blastorg/fastify/aws-dynamodb-cache to
community plugins list by
[@&#8203;fredrikj31](https://togithub.com/fredrikj31) in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- docs: update preHandler hook example by
[@&#8203;tarunrajput](https://togithub.com/tarunrajput) in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- types: added http header types to reply by
[@&#8203;skwee357](https://togithub.com/skwee357) in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- test: add tests for TOC of errors.md by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5194](https://togithub.com/fastify/fastify/pull/5194)
- ci: pin node 18 to 18.18.2 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5197](https://togithub.com/fastify/fastify/pull/5197)
- docs(ecosystem): add http-wizard by
[@&#8203;flodlc](https://togithub.com/flodlc) in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- chore: Bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5183](https://togithub.com/fastify/fastify/pull/5183)
- ci: fix broken ci by skipping tests if node v > 18.19.0 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5195](https://togithub.com/fastify/fastify/pull/5195)
- fix: allow async hooks in `RouteShorthandOptions` without breaking
`request` and `reply` types by
[@&#8203;bienzaaron](https://togithub.com/bienzaaron) in
[https://github.com/fastify/fastify/pull/5147](https://togithub.com/fastify/fastify/pull/5147)
- fix([#&#8203;5180](https://togithub.com/fastify/fastify/issues/5180)):
close secondary bindings after primary is closed by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5201](https://togithub.com/fastify/fastify/pull/5201)
- chore: update process-warning by
[@&#8203;Eomm](https://togithub.com/Eomm) in
[https://github.com/fastify/fastify/pull/5206](https://togithub.com/fastify/fastify/pull/5206)
- types: nullish error types in callback function's parameter for
`after` and `ready` method by
[@&#8203;nokazn](https://togithub.com/nokazn) in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- fix([#&#8203;5049](https://togithub.com/fastify/fastify/issues/5049)):
Remove duplicated calls to onReady by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5051](https://togithub.com/fastify/fastify/pull/5051)
- chore: remove unused type assertion by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

**Full Changelog**:
fastify/fastify@v4.24.3...v4.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jtoar referenced this pull request in redwoodjs/graphql Jan 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [fastify](https://www.fastify.dev/)
([source](https://togithub.com/fastify/fastify)) | [`4.24.3` ->
`4.25.2`](https://renovatebot.com/diffs/npm/fastify/4.24.3/4.25.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/fastify/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify/4.24.3/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify/4.24.3/4.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify (fastify)</summary>

###
[`v4.25.2`](https://togithub.com/fastify/fastify/releases/tag/v4.25.2)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.25.1...v4.25.2)

#### What's Changed

- fix: `npm run test:watch` by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[https://github.com/fastify/fastify/pull/5221](https://togithub.com/fastify/fastify/pull/5221)
- fix: always consume stream payloads when responding to 204 with no
body by [@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5231](https://togithub.com/fastify/fastify/pull/5231)
- docs: update setErrorHandler to explain not found behaviour by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[https://github.com/fastify/fastify/pull/5218](https://togithub.com/fastify/fastify/pull/5218)

#### New Contributors

- [@&#8203;domdomegg](https://togithub.com/domdomegg) made their first
contribution in
[https://github.com/fastify/fastify/pull/5221](https://togithub.com/fastify/fastify/pull/5221)

**Full Changelog**:
fastify/fastify@v4.25.1...v4.25.2

###
[`v4.25.1`](https://togithub.com/fastify/fastify/releases/tag/v4.25.1)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.25.0...v4.25.1)

#### What's Changed

- fix: route constraints by
[@&#8203;climba03003](https://togithub.com/climba03003) in
[https://github.com/fastify/fastify/pull/5207](https://togithub.com/fastify/fastify/pull/5207)
- fix: Better plugin name detection for FSTWRN002 by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5209](https://togithub.com/fastify/fastify/pull/5209)
- chore: at-large project by [@&#8203;Eomm](https://togithub.com/Eomm)
in
[https://github.com/fastify/fastify/pull/5211](https://togithub.com/fastify/fastify/pull/5211)

**Full Changelog**:
fastify/fastify@v4.25.0...v4.25.1

###
[`v4.25.0`](https://togithub.com/fastify/fastify/releases/tag/v4.25.0)

[Compare
Source](https://togithub.com/fastify/fastify/compare/v4.24.3...v4.25.0)

#### What's Changed

- feat: Improve RouteShorthandOptions\['constraints'] type by
[@&#8203;Fcmam5](https://togithub.com/Fcmam5) in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- fix: add [@&#8203;eomm](https://togithub.com/eomm) and
[@&#8203;jsumners](https://togithub.com/jsumners) as lead maintainers by
[@&#8203;mcollina](https://togithub.com/mcollina) in
[https://github.com/fastify/fastify/pull/5115](https://togithub.com/fastify/fastify/pull/5115)
- fix: reply.send supports Uint8Array payload by
[@&#8203;SgtPooki](https://togithub.com/SgtPooki) in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- refactor: migrate deprecation warnings to actual deprecation warnings
by [@&#8203;jsumners](https://togithub.com/jsumners) in
[https://github.com/fastify/fastify/pull/5126](https://togithub.com/fastify/fastify/pull/5126)
- docs: added documentation about warnings by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5108](https://togithub.com/fastify/fastify/pull/5108)
- test(logger): restrict temp file permissions by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5128](https://togithub.com/fastify/fastify/pull/5128)
- refactor(lib/hooks): replace `typeof` undefined check by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5127](https://togithub.com/fastify/fastify/pull/5127)
- chore: replace mention of fastify `.io` domain with `.dev` by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5129](https://togithub.com/fastify/fastify/pull/5129)
- docs(security): add prose explaining OpenSSF CII Best Practices badge
results by [@&#8203;ljharb](https://togithub.com/ljharb) in
[https://github.com/fastify/fastify/pull/5111](https://togithub.com/fastify/fastify/pull/5111)
- chore: Bump actions/setup-node from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5134](https://togithub.com/fastify/fastify/pull/5134)
- fix(types): add handler property to routeOptions by
[@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- docs(readme): fix ci badge path by
[@&#8203;Fdawgs](https://togithub.com/Fdawgs) in
[https://github.com/fastify/fastify/pull/5138](https://togithub.com/fastify/fastify/pull/5138)
- docs: Fix small typo in Typescript docs by
[@&#8203;john-ko](https://togithub.com/john-ko) in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- feat(plugins): mixing async and callback style now returns a warning
by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5139](https://togithub.com/fastify/fastify/pull/5139)
- docs: mention about multipart support by
[@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- docs: add [@&#8203;fastify/vite](https://togithub.com/fastify/vite) to
core plugins list by [@&#8203;galvez](https://togithub.com/galvez) in
[https://github.com/fastify/fastify/pull/5153](https://togithub.com/fastify/fastify/pull/5153)
- docs: add
[@&#8203;scalar/fastify-api-reference](https://togithub.com/scalar/fastify-api-reference)
to community plugins list by
[@&#8203;hanspagel](https://togithub.com/hanspagel) in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- docs: Remove routeOptions reference in Reply.md by
[@&#8203;shadahmad7](https://togithub.com/shadahmad7) in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
- docs(ecosystem): add fastify-uws by
[@&#8203;tinchoz49](https://togithub.com/tinchoz49) in
[https://github.com/fastify/fastify/pull/5160](https://togithub.com/fastify/fastify/pull/5160)
- docs: removed unmaintained fastify-nodemailer from ecosystem by
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- docs: clarify handling of streams and buffers by
[@&#8203;brettwillis](https://togithub.com/brettwillis) in
[https://github.com/fastify/fastify/pull/5166](https://togithub.com/fastify/fastify/pull/5166)
-
docs([#&#8203;5142](https://togithub.com/fastify/fastify/issues/5142)):
aligned errors and warnings documentation by
[@&#8203;giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide)
in
[https://github.com/fastify/fastify/pull/5162](https://togithub.com/fastify/fastify/pull/5162)
- docs(reference/hooks): add information about prehandler by
[@&#8203;RjManhas](https://togithub.com/RjManhas) in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- fix: type FastifyInstance\['route'] and RouteShorthandMethod by
[@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- docs (reference): Fix small typo in Request by
[@&#8203;bngarren](https://togithub.com/bngarren) in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- chore: gitpodify by
[@&#8203;ghostdevv](https://togithub.com/ghostdevv) in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- docs(ecosystem): Add Apitally by
[@&#8203;itssimon](https://togithub.com/itssimon) in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- fix: Update reply.context deprecation warning by
[@&#8203;avaly](https://togithub.com/avaly) in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- docs(ecosystem): adds @&#8203;blastorg/fastify/aws-dynamodb-cache to
community plugins list by
[@&#8203;fredrikj31](https://togithub.com/fredrikj31) in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- docs: update preHandler hook example by
[@&#8203;tarunrajput](https://togithub.com/tarunrajput) in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- types: added http header types to reply by
[@&#8203;skwee357](https://togithub.com/skwee357) in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- test: add tests for TOC of errors.md by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5194](https://togithub.com/fastify/fastify/pull/5194)
- ci: pin node 18 to 18.18.2 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5197](https://togithub.com/fastify/fastify/pull/5197)
- docs(ecosystem): add http-wizard by
[@&#8203;flodlc](https://togithub.com/flodlc) in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- chore: Bump actions/github-script from 6 to 7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/fastify/fastify/pull/5183](https://togithub.com/fastify/fastify/pull/5183)
- ci: fix broken ci by skipping tests if node v > 18.19.0 by
[@&#8203;Uzlopak](https://togithub.com/Uzlopak) in
[https://github.com/fastify/fastify/pull/5195](https://togithub.com/fastify/fastify/pull/5195)
- fix: allow async hooks in `RouteShorthandOptions` without breaking
`request` and `reply` types by
[@&#8203;bienzaaron](https://togithub.com/bienzaaron) in
[https://github.com/fastify/fastify/pull/5147](https://togithub.com/fastify/fastify/pull/5147)
- fix([#&#8203;5180](https://togithub.com/fastify/fastify/issues/5180)):
close secondary bindings after primary is closed by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5201](https://togithub.com/fastify/fastify/pull/5201)
- chore: update process-warning by
[@&#8203;Eomm](https://togithub.com/Eomm) in
[https://github.com/fastify/fastify/pull/5206](https://togithub.com/fastify/fastify/pull/5206)
- types: nullish error types in callback function's parameter for
`after` and `ready` method by
[@&#8203;nokazn](https://togithub.com/nokazn) in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- fix([#&#8203;5049](https://togithub.com/fastify/fastify/issues/5049)):
Remove duplicated calls to onReady by
[@&#8203;metcoder95](https://togithub.com/metcoder95) in
[https://github.com/fastify/fastify/pull/5051](https://togithub.com/fastify/fastify/pull/5051)
- chore: remove unused type assertion by
[@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour) in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[https://github.com/fastify/fastify/pull/5097](https://togithub.com/fastify/fastify/pull/5097)
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[https://github.com/fastify/fastify/pull/5124](https://togithub.com/fastify/fastify/pull/5124)
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[https://github.com/fastify/fastify/pull/5136](https://togithub.com/fastify/fastify/pull/5136)
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[https://github.com/fastify/fastify/pull/5145](https://togithub.com/fastify/fastify/pull/5145)
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[https://github.com/fastify/fastify/pull/5144](https://togithub.com/fastify/fastify/pull/5144)
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[https://github.com/fastify/fastify/pull/5154](https://togithub.com/fastify/fastify/pull/5154)
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[https://github.com/fastify/fastify/pull/5156](https://togithub.com/fastify/fastify/pull/5156)
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[https://github.com/fastify/fastify/pull/5161](https://togithub.com/fastify/fastify/pull/5161)
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[https://github.com/fastify/fastify/pull/5163](https://togithub.com/fastify/fastify/pull/5163)
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[https://github.com/fastify/fastify/pull/5155](https://togithub.com/fastify/fastify/pull/5155)
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[https://github.com/fastify/fastify/pull/5186](https://togithub.com/fastify/fastify/pull/5186)
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[https://github.com/fastify/fastify/pull/5168](https://togithub.com/fastify/fastify/pull/5168)
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[https://github.com/fastify/fastify/pull/5175](https://togithub.com/fastify/fastify/pull/5175)
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[https://github.com/fastify/fastify/pull/5179](https://togithub.com/fastify/fastify/pull/5179)
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[https://github.com/fastify/fastify/pull/5158](https://togithub.com/fastify/fastify/pull/5158)
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[https://github.com/fastify/fastify/pull/5189](https://togithub.com/fastify/fastify/pull/5189)
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[https://github.com/fastify/fastify/pull/5046](https://togithub.com/fastify/fastify/pull/5046)
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[https://github.com/fastify/fastify/pull/5132](https://togithub.com/fastify/fastify/pull/5132)
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[https://github.com/fastify/fastify/pull/5191](https://togithub.com/fastify/fastify/pull/5191)
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[https://github.com/fastify/fastify/pull/5184](https://togithub.com/fastify/fastify/pull/5184)

**Full Changelog**:
fastify/fastify@v4.24.3...v4.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Websocket connections to secondary server prevents server from shutting down

4 participants