v5.12.8
Added 2
- Add routerOptions.compile to use find-my-way compiler mode
- Support disposables in onClose hook
Fixed 7
- Restore this context in route shorthand hooks for types
- Send stream trailers only after the stream actually finishes in reply
- Clamp error statusCode between 400 and 599 with 500 as fallback behavior changed · inferred, marked in the notes below
- Contain synchronous throws from custom content type parsers
- Allow socket path strings in address types
- Add logSerializers to RouteShorthandOptions types
- Evaluate instance getters once in getDecorator
Removed 1
- Remove plugins that do not support Fastify v5 from the documentation
Security 1
- Fix for security advisory GHSA-3qgw-9275-xf8w
1 change to check, marked in the notes below
From Fastify
⚠️ Security Release
What's Changed
- [Backport 5.x] fix(types): restore this context in route shorthand hooks by @github-actions[bot] in https://github.com/fastify/fastify/pull/7055
- [Backport 5.x] fix(reply): send stream trailers after the stream actually finishes by @github-actions[bot] in https://github.com/fastify/fastify/pull/7111
- [Backport 5.x] test(server): assert the server is listening instead of a literal by @github-actions[bot] in https://github.com/fastify/fastify/pull/7112
- [Backport 5.x] feat: add routerOptions.compile to use find-my-way compiler mode by @Tony133 in https://github.com/fastify/fastify/pull/7116
- [Backport 5.x] fix: clamp error statusCode between 400 and 599 with 500 fallback by @github-actions[bot] in https://github.com/fastify/fastify/pull/7122 behavior changed · inferred
- [Backport 5.x] fix: contain synchronous throws from custom content type parsers by @github-actions[bot] in https://github.com/fastify/fastify/pull/7123
- [Backport 5.x] docs(serverless): clarify per-route observability on serverless platf… by @github-actions[bot] in https://github.com/fastify/fastify/pull/7134
- [Backport 5.x] feat(hooks): support disposables in onClose hook (#5669) by @github-actions[bot] in https://github.com/fastify/fastify/pull/7136
- [Backport 5.x] fix(types): allow socket path strings in addresses by @github-actions[bot] in https://github.com/fastify/fastify/pull/7138
- [Backport 5.x] fix(types): add logSerializers to RouteShorthandOptions by @github-actions[bot] in https://github.com/fastify/fastify/pull/7145
- [Backport 5.x] test: do not assert a HEAD response body through inject() by @github-actions[bot] in https://github.com/fastify/fastify/pull/7149
- [Backport 5.x] docs(request): reorganize Request reference by properties and methods by @Tony133 in https://github.com/fastify/fastify/pull/7150
- [Backport 5.x] docs(reply): reorganize Reply reference by properties and methods by @Tony133 in https://github.com/fastify/fastify/pull/7151
- [Backport 5.x] docs: remove plugins that do not support Fastify v5 by @Tony133 in https://github.com/fastify/fastify/pull/7152
- [Backport 5.x] perf(request): hoist port regex to module level by @github-actions[bot] in https://github.com/fastify/fastify/pull/7153
- [Backport 5.x] fix(decorators): evaluate instance getters once in getDecorator by @github-actions[bot] in https://github.com/fastify/fastify/pull/7154
- [Backport 5.x] docs: clarify that maxParamLength does not prevent ReDoS by @github-actions[bot] in https://github.com/fastify/fastify/pull/7158
- [Backport 5.x] docs: fix syntax errors in code examples by @github-actions[bot] in https://github.com/fastify/fastify/pull/7160
Full Changelog: https://github.com/fastify/fastify/compare/v5.12.7...v5.12.8