-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add missing route config type #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Could you update the test/types/types.test.ts
file too?
d841633
to
b229840
Compare
b229840
to
b3a22a8
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the
test/types/types.test.ts
file too?done
Sorry, I pushed a line because the test was passing without the plugin.d.ts
changes
Landing now!
[![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-raw-body](https://togithub.com/Eomm/fastify-raw-body) | [`4.2.0` -> `4.2.1`](https://renovatebot.com/diffs/npm/fastify-raw-body/4.2.0/4.2.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/fastify-raw-body/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify-raw-body/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify-raw-body/4.2.0/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify-raw-body/4.2.0/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Eomm/fastify-raw-body (fastify-raw-body)</summary> ### [`v4.2.1`](https://togithub.com/Eomm/fastify-raw-body/releases/tag/v4.2.1) [Compare Source](https://togithub.com/Eomm/fastify-raw-body/compare/v4.2.0...v4.2.1) ##### What's Changed - chore(deps-dev): bump tsd from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#46 - chore(deps-dev): bump tsd from 0.26.1 to 0.27.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#47 - chore(deps-dev): bump tsd from 0.27.0 to 0.28.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#48 - chore(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.16.5 to 20.1.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#49 - Add missing route config type by [@​FabianFrank](https://togithub.com/FabianFrank) in [Eomm/fastify-raw-body#50 ##### New Contributors - [@​FabianFrank](https://togithub.com/FabianFrank) made their first contribution in [Eomm/fastify-raw-body#50 **Full Changelog**: Eomm/fastify-raw-body@v4.2.0...v4.2.1 </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/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![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-raw-body](https://togithub.com/Eomm/fastify-raw-body) | [`4.2.0` -> `4.2.1`](https://renovatebot.com/diffs/npm/fastify-raw-body/4.2.0/4.2.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/fastify-raw-body/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify-raw-body/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify-raw-body/4.2.0/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify-raw-body/4.2.0/4.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Eomm/fastify-raw-body (fastify-raw-body)</summary> ### [`v4.2.1`](https://togithub.com/Eomm/fastify-raw-body/releases/tag/v4.2.1) [Compare Source](https://togithub.com/Eomm/fastify-raw-body/compare/v4.2.0...v4.2.1) ##### What's Changed - chore(deps-dev): bump tsd from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#46 - chore(deps-dev): bump tsd from 0.26.1 to 0.27.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#47 - chore(deps-dev): bump tsd from 0.27.0 to 0.28.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#48 - chore(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.16.5 to 20.1.0 by [@​dependabot](https://togithub.com/dependabot) in [Eomm/fastify-raw-body#49 - Add missing route config type by [@​FabianFrank](https://togithub.com/FabianFrank) in [Eomm/fastify-raw-body#50 ##### New Contributors - [@​FabianFrank](https://togithub.com/FabianFrank) made their first contribution in [Eomm/fastify-raw-body#50 **Full Changelog**: Eomm/fastify-raw-body@v4.2.0...v4.2.1 </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/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
interface FastifyContextConfig { | ||
rawBody?: boolean | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey! just wanted to comment that for servers with fastify versions lower than v4.19.0 this conflicts with other plugins typing, since before that this wasn't required before then 😢
for example, my server also imports '@fastify/rate-limit'
with fastify v4.7.0. For this version, such explicit typing wasn't required. And because fastify-raw-body
does so it completely overwrites the config context, so only rawBody
option is accepted
maybe add fastify v4.19.0+ as peer dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why updating a plugin and not the server?
I mean, there are some security releases too since 4.7.0
Anyway, we should bump the version here:
https://github.com/Eomm/fastify-raw-body/blob/main/plugin.js#L106
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of time :) Our server is fairly big and we'd need to jump a few minor versions from fastify. With that some other plugins as well and sadly we don't have very good testing in place.
Anyways, thanks for the response! Happy to open the PR
as of fastify 4.19.0 route configs have to be typed explicitly, without this change with fastify 4.19.0 and above a route like
produces the following error:
See fastify/fastify-rate-limit#306 for a similar fix in an official fastify plugin.