Packages

fastify

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

Your version

5.0.0

major17 Sep 2024Where it was published

5.12.8 is the newest release of 5.x.

In short

2 breaking2 removed18 new3 faster15 fixed5 changed71 internal

  • Breaking

    Add req.hostname and req.port

  • Breaking

    Remove json shorthand

  • Removed

    lib: Drop setDefaultRoute and getDefaultRoute methods

  • Removed

    Remove deprecated variadic listen

Security

Release note

What's Changed

  • Add missing route shorthands

  • Removed

    lib: Drop setDefaultRoute and getDefaultRoute methods

  • Sync next-branch

  • Next: Disallow decorate('name', null) in the types

  • Breaking

    Add req.hostname and req.port

  • Change request id header default value to false

  • Removed

    Remove deprecated variadic listen

  • Sync next-branch

  • requestIdHeader docs

  • Sync next-branch

  • Sync next-branch

  • types: Remove variadic listen types

  • Remove http version check

  • New logger api

  • plugins: Mixing async and callback style now returns an error

  • Align fastify.hasRoute to fmw.hasRoute

  • Set useSemicolonDefault default option to false

  • Make contentTypeParser's existingParser check more strict

  • Loosen content-type checking

  • Rework contentTypeParser methods

  • Limit search space for contentType

  • Update method matching

  • (types) add shorthand types for MKCALENDAR and REPORT

  • Ci labeler

  • Optimize resolving X-Forwarded-For addresses

  • config type in RouteShorthandOptions

  • Request and reply decorators can not be a reference type

  • Log all available addresses if listening host is 0.0.0.0

  • writeEarlyHints

  • Emit diagnostics_channel events upon routing request

  • hasRoute method comparison with case insensitive

  • types: Introduce SafePromiseLike

  • Type inferrence with auxilliary hook handlers

  • Server.listen listener is not cleanup properly

  • Type definitions and documentation for separated type provider.

  • v5: Update .npmignore

  • Support different body schema per content type

  • Res serializer not given reply

  • Customize http methods

  • Breaking

    Remove json shorthand

  • Nullish host

  • Removed warning listener from tests

  • Test suite import.js emitting errors

  • Throwing "FST_ERR_DUPLICATED_ROUTE" error instead of raw error

  • Reorder handling of Response replies

  • Add fastify v4 codemods

  • types: Remove nonexistant done parameter from onRegister

  • Bind this to instance in onclose

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.