Skip to content
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

types: added http header types to reply #5046

Merged
merged 7 commits into from Dec 8, 2023
Merged

Conversation

skwee357
Copy link
Contributor

@skwee357 skwee357 commented Sep 18, 2023

Checklist

@github-actions github-actions bot added the typescript TypeScript related label Sep 18, 2023
@skwee357 skwee357 changed the title added http header types to reply types: added http header types to reply Sep 18, 2023
types/reply.d.ts Outdated Show resolved Hide resolved
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.

Custom http headers are very common. This should also allow any string.

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 19, 2023

Does this even work????????

type name = 'matteo' | 'eomm' | string

Is afaik because of type widening the same as
type name = string

So i doubt that this has any benefit.

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.

Blocking because type widening makes this pointless.

@mcollina
Copy link
Member

Blocking because type widening makes this pointless.

This is incorrect. It improves autocompletion.

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 19, 2023

@Eomm
Copy link
Member

Eomm commented Sep 19, 2023

For reference:

image

@skwee357
Copy link
Contributor Author

A lot of comments, I'll try to address them all:

I'm open for suggestions on how to improve it, but I think typing is necessary.

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 19, 2023

I use vscode (which uses monaco like typescript playground) as reference. And in vscode this change has no effect.

@sergburn
Copy link
Contributor

Fastify's header name constants come from @types/node, so maybe this is the way they should be defined properly, because as Eomm shows, code completion doesn't work this way.
Code completion would look like this:

image

However. Node types do not define response header names, maybe for a reason...

@skwee357
Copy link
Contributor Author

@sergburn thanks. I agree that it's better to take the header names from @types/node. I wonder why they don't define reply headers, though.

@skwee357
Copy link
Contributor Author

Started a discussion in @types/node. Let's see what they will answer and proceed based on their response DefinitelyTyped/DefinitelyTyped#66753

@Semigradsky
Copy link

This is incorrect. It improves autocompletion.

For reference:

image

You have 'eonm' in proposals because you are in the same file where you already typed 'eonm'. Move to another file, import type and you won't have autocomplete.

Unfortunately, the proposed changes do nothing.

@DemonHa
Copy link
Contributor

DemonHa commented Sep 26, 2023

if we do something like this:

type headers = 'mateo' | 'eonm' | (string & {});

it will give us the autocompletion but also we can define general strings
image

@Semigradsky @Eomm @mcollina @Uzlopak

@mcollina
Copy link
Member

type headers = 'mateo' | 'eonm' | (string & {}); is supported syntax and it works.

Good job.

@skwee357 could you update the PR?

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 26, 2023

Nice trick. Is there an explaination?

@mcollina
Copy link
Member

@climba03003
Copy link
Member

climba03003 commented Sep 26, 2023

Reading through the threads, it may suffer from another issue.
microsoft/TypeScript#29729 (comment)

There will be problems on object index. The return of getHeaders

@metcoder95
Copy link
Member

if we do something like this:

type headers = 'mateo' | 'eonm' | (string & {});

it will give us the autocompletion but also we can define general strings image

This past week has been full of new learnings. First split with the extra arg, and now this 😅 🪄

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 26, 2023

I patched it now according to @DemonHa suggestion.

Now the question is, is it safe to merge @climba03003 or do you recommend a hard no?

@DemonHa
Copy link
Contributor

DemonHa commented Sep 26, 2023

Nice trick. Is there an explaination?

@Uzlopak
There is a great explanation here

@skwee357
Copy link
Contributor Author

type headers = 'mateo' | 'eonm' | (string & {}); is supported syntax and it works.

Good job.

@skwee357 could you update the PR?

I'm working on adding the types to @types/node instead, see here DefinitelyTyped/DefinitelyTyped#66783

Once it will be merged, I'll update this PR to use the types from that package, rather that having fastify maintain its own types

@Uzlopak Uzlopak dismissed their stale review December 7, 2023 23:57

I updated it

@Uzlopak
Copy link
Contributor

Uzlopak commented Dec 7, 2023

types/utils.d.ts Outdated Show resolved Hide resolved
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

@Uzlopak
Copy link
Contributor

Uzlopak commented Dec 8, 2023

I followed the link provided by @climba03003 and saw that we can do Record<never, never> instead of {}. So to avoid that unnessary eslint ignore, i used that.

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

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[fastify/fastify#5097
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[fastify/fastify#5124
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[fastify/fastify#5136
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[fastify/fastify#5145
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[fastify/fastify#5144
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[fastify/fastify#5154
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[fastify/fastify#5156
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[fastify/fastify#5161
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[fastify/fastify#5163
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[fastify/fastify#5155
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[fastify/fastify#5186
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[fastify/fastify#5168
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[fastify/fastify#5175
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[fastify/fastify#5179
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[fastify/fastify#5158
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[fastify/fastify#5189
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[fastify/fastify#5046
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[fastify/fastify#5132
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[fastify/fastify#5191
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[fastify/fastify#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 added a commit to redwoodjs/redwood that referenced this pull request 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
[fastify/fastify#5221
- fix: always consume stream payloads when responding to 204 with no
body by [@&#8203;mcollina](https://togithub.com/mcollina) in
[fastify/fastify#5231
- docs: update setErrorHandler to explain not found behaviour by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[fastify/fastify#5218

#### New Contributors

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

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[fastify/fastify#5097
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[fastify/fastify#5124
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[fastify/fastify#5136
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[fastify/fastify#5145
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[fastify/fastify#5144
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[fastify/fastify#5154
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[fastify/fastify#5156
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[fastify/fastify#5161
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[fastify/fastify#5163
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[fastify/fastify#5155
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[fastify/fastify#5186
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[fastify/fastify#5168
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[fastify/fastify#5175
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[fastify/fastify#5179
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[fastify/fastify#5158
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[fastify/fastify#5189
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[fastify/fastify#5046
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[fastify/fastify#5132
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[fastify/fastify#5191
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[fastify/fastify#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 pushed a commit to redwoodjs/redwood that referenced this pull request 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
[fastify/fastify#5221
- fix: always consume stream payloads when responding to 204 with no
body by [@&#8203;mcollina](https://togithub.com/mcollina) in
[fastify/fastify#5231
- docs: update setErrorHandler to explain not found behaviour by
[@&#8203;domdomegg](https://togithub.com/domdomegg) in
[fastify/fastify#5218

#### New Contributors

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

#### New Contributors

- [@&#8203;Fcmam5](https://togithub.com/Fcmam5) made their first
contribution in
[fastify/fastify#5097
- [@&#8203;SgtPooki](https://togithub.com/SgtPooki) made their first
contribution in
[fastify/fastify#5124
- [@&#8203;MikeJeffers](https://togithub.com/MikeJeffers) made their
first contribution in
[fastify/fastify#5136
- [@&#8203;john-ko](https://togithub.com/john-ko) made their first
contribution in
[fastify/fastify#5145
- [@&#8203;fawazahmed0](https://togithub.com/fawazahmed0) made their
first contribution in
[fastify/fastify#5144
- [@&#8203;hanspagel](https://togithub.com/hanspagel) made their first
contribution in
[fastify/fastify#5154
- [@&#8203;shadahmad7](https://togithub.com/shadahmad7) made their first
contribution in
[fastify/fastify#5156
-
[@&#8203;giovanni-bertoncelli](https://togithub.com/giovanni-bertoncelli)
made their first contribution in
[fastify/fastify#5161
- [@&#8203;RjManhas](https://togithub.com/RjManhas) made their first
contribution in
[fastify/fastify#5163
- [@&#8203;MunifTanjim](https://togithub.com/MunifTanjim) made their
first contribution in
[fastify/fastify#5155
- [@&#8203;bngarren](https://togithub.com/bngarren) made their first
contribution in
[fastify/fastify#5186
- [@&#8203;ghostdevv](https://togithub.com/ghostdevv) made their first
contribution in
[fastify/fastify#5168
- [@&#8203;itssimon](https://togithub.com/itssimon) made their first
contribution in
[fastify/fastify#5175
- [@&#8203;avaly](https://togithub.com/avaly) made their first
contribution in
[fastify/fastify#5179
- [@&#8203;fredrikj31](https://togithub.com/fredrikj31) made their first
contribution in
[fastify/fastify#5158
- [@&#8203;tarunrajput](https://togithub.com/tarunrajput) made their
first contribution in
[fastify/fastify#5189
- [@&#8203;skwee357](https://togithub.com/skwee357) made their first
contribution in
[fastify/fastify#5046
- [@&#8203;flodlc](https://togithub.com/flodlc) made their first
contribution in
[fastify/fastify#5132
- [@&#8203;nokazn](https://togithub.com/nokazn) made their first
contribution in
[fastify/fastify#5191
- [@&#8203;UndefinedBehaviour](https://togithub.com/UndefinedBehaviour)
made their first contribution in
[fastify/fastify#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript TypeScript related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants