Repository navigation
refactor(types)!: remove deprecated FastifyPlugin type - #6897
Merged
climba03003 merged 4 commits intoAug 4, 2026
Merged
Conversation
Tony133
force-pushed
the
refactor/remove-deprecated-fastify-plugin
branch
from
August 2, 2026 14:14
b8303f6 to
f6e7420
Compare
Tony133
marked this pull request as ready for review
August 2, 2026 14:19
fastify#6891) * docs: clarify what attachValidation exposes on request.validationError The docs described `request.validationError` as carrying "the raw validation result", and the inline example pointed only at `.validation`. That wording implied the descriptive message had to be rebuilt by hand, which is what prompted fastify#5235. `wrapValidationError()` in lib/validation.js runs `schemaErrorFormatter` and `validationCompleted()` in lib/handle-request.js assigns that same error to `request.validationError`. There is no raw-only path, so `.message` is identical to the message sent when `attachValidation` is unset. List the properties actually available (`message`, `validation`, `validationContext`, `code`, `statusCode`) and add a test pinning the equivalence between the attached and the default message. * test: improve validation error message assertions in attached validation test
Tony133
force-pushed
the
refactor/remove-deprecated-fastify-plugin
branch
from
August 2, 2026 20:25
f6e7420 to
c5e58c8
Compare
Tony133
force-pushed
the
refactor/remove-deprecated-fastify-plugin
branch
from
August 2, 2026 20:59
c5e58c8 to
5553c3e
Compare
Tony133
force-pushed
the
refactor/remove-deprecated-fastify-plugin
branch
from
August 2, 2026 21:09
5553c3e to
3b0d058
Compare
Removed the deprecated FastifyPlugin type export and its corresponding test definitions. Users should use FastifyPluginAsync or FastifyPluginCallback instead.
Tony133
force-pushed
the
refactor/remove-deprecated-fastify-plugin
branch
from
August 2, 2026 21:20
3b0d058 to
599dcd0
Compare
climba03003
requested changes
Aug 3, 2026
Member
|
I think we should clarify what practices we follow regarding ts versioning: I am a bit lost, in practice, ts team doesn't even follow semver, but they consider breaking changes.
|
Member
Next
Bugfix breaking changes is determine by how large it affect and if it is beneficial to provide such fix. |
Member
Author
|
I added the tag for milestone v6.0.0, I don't have permission to switch to the “next” branch. |
climba03003
approved these changes
Aug 3, 2026
jean-michelet
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Proposal:
FastifyPluginTypeScript definition and its related type assertions.FastifyPluginwas previously marked as@deprecated, the users should explicitly useFastifyPluginCallbackorFastifyPluginAsyncinstead. ( see screenshot )Changes:
FastifyPlugintype definition fromtypes/plugin.d.tsand its exports/imports fromfastify.d.ts.FastifyPluginindocs/Reference/TypeScript.mdanddocs/Reference/Getting-Started.md.test/types/fastify.tst.ts.Screenshot: