Packages

fastify

5.12.8 · 2 Nov 2026MIT23.8M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major8 Jun 2022Where it was published

4.29.1 is the newest release of 4.x.

In short

1 removed2 deprecated19 new23 fixed47 changed76 internal

  • Removed

    Remove reference to 'ESLint: manage library execution' command

  • Deprecated

    Deprecate modifying reply.sent property

  • Deprecated

    Deprecate variadic listen method (closes #3652)

Security

11 advisories affect 4.0.0; 5.12.5 fixes them

6 more

Release note

Fastify v4!

We are finally shipping Fastify v4, you can read more about it at medium.com/@fastifyjs/fastify-v4-ga-59f2103b5f0e

Individual PRs

  • Checked if error handler is default before setting headers

  • Set undefined on null input

  • Set exposeHeadRoutes: true by default

  • Dropped flatstrt

  • Typed decorators

  • Improve error experience

  • Allow async handler to resolve with undefined

  • Remove overdue deprecations

  • Remove content type coercion for response streams

  • Handle new avvio error codes

  • Handle invalid url

  • Clarification for "Simplify reply sent monitoring (#3072)"

  • Deprecated

    Deprecate modifying reply.sent property

  • Fix responding from a hook doc

  • Deem everything thrown as an error

  • Encapsulated error handling

  • Payload validation

  • Ajv8 by default

  • Update types for Pino 7

  • Update to pino rc4

  • Increase http2SessionTimeout and keepAliveTimeout to 72 seconds

  • typescript: Allow to pass all pino options

  • Fastify Type Providers

  • Adjust existing PRs for the new reply.sent handing

  • Skip encapsulation of Request and Reply when not needed

  • Refactor Context constructor and avoid positional arguments

  • Remove app.use and fix middleware tests

  • Type Provider Reply Types

  • Remove .writableEnded fallbacks for node12

  • Upgrade fast-json-stringify with ajv8

  • Bad headers characters

  • Ajv default array coercion

  • Localhost binds to ipv4 and ipv6

  • Bump ajv-compiler

  • Tests should pass on a host with only a single network interface

  • Call normal 404 handler on unsupported method

  • Replace pem dependency

  • Add ajv dep as dev

  • Add coverage reporting per OS type

  • Fix coverage workflows

  • Remove Coveralls (closes #3720)

  • Removed

    Remove reference to 'ESLint: manage library execution' command

  • Handle aborted requests

  • Drop @typescript-eslint/no-misused-promises

  • Deprecated

    Deprecate variadic listen method (closes #3652)

  • Feat (types): add complete fastify.listen() typescript definitions

  • Response type of serialize method in FastifyReply interface

  • Fixed Node.js v18/master support

  • Fix avvio plugin timeout for 0

  • Update Ecosystem.md

  • Update Ecosystem.md - Add fastify-impressions to the list

  • Improve parser example

  • Automerge major updates

  • Fix

  • Allow custom Context Config types for hooks' request properties

  • Set reply's default charset to utf8

  • Bugfix/streamline fastify request to be generic

  • Reply trailers support

  • reply: Remove content-length when Transfer-Encoding is added

  • Remove duplicate require(http-errors)

  • Remove server.unref from tests

  • allowUnsafeRegex in options

  • Updated benchmarks to v4 and Node v16

  • Fix type providers package names

  • Add SQLite as supported database

  • Update Routes.md

  • content-type: Return undefined when content-type is ''

  • Update fastify-error dependency

  • Add Promise to 404 handler return type

  • Support rc in version checks

  • Replaced semver check code per recommendation

  • Update TypeScript.md

  • Fix link to OpenJS Foundation Image in Readme.md

  • Run automerge in ci only if we have a pull-request or got a pr-number provided

  • Redirect Security Responsible Disclosure Badge in Readme.md to SECURITY.md

  • JSDoc in Get Started Section

  • All hooks should handle undefined error

  • Move querystring parsing to the router

  • Add constraint strategies outside Fastify constructor

  • Http version check

  • Fix getDefaultRoute type

  • Remove mentions of make-promises-safe because it is only needed with Node <=14

  • Add ignoreDuplicateSlashes option

  • Improve schema.response validation error message

  • Handler return reply type

  • Make the root pluginName 'fastify'

  • Preserve chain of proptotypes in multiple nested plugins

  • types: Fix default type provider typings

  • Add hasPlugin method

  • Use new Node.js' connection closing API if available

  • 2XX is a supported status code for the response

  • Allow default as status code

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.