fastify breaking changes
Updated December 4, 2026
On this page
Latest version 5.12.8, released November 2, 2026. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
fastify 5.12.8 breaking changes
- Behavior changed
Errors with a statusCode outside 400-599 now get a status of 500 instead of the original value. Code that relies on other status codes for errors must be updated. github.com - Signature changed
FastifyInstance.addresses
Was addresses(): AddressInfo[]; now addresses(): Array<AddressInfo | string>. npmjs.com - Signature changed
FastifyRouterOptions
Was type FastifyRouterOptions<RawServer extends RawServerBase> = Omit<FindMyWayConfigForServer<RawServer>, 'defaultRoute' | 'onBadUrl' | 'onMaxParamLength' | 'querystringParser'> & {defaultRoute?: (req... npmjs.com
fastify 5.12.6 breaking changes
- Signature changed
The TypeScript types for route lookup methods are narrowed, so TypeScript code that relied on the broader types may now fail to compile. github.com - Signature changed
FastifyInstance.findRoute
Was findRoute<RouteGeneric extends RouteGenericInterface = RouteGenericInterface, ContextConfig = ContextConfigDefault, SchemaCompiler extends FastifySchema = FastifySchema>(opts: Pick<RouteOptions<RawServer, RawRequest, RawReply... npmjs.com - Signature changed
FastifyInstance.hasRoute
Was hasRoute<RouteGeneric extends RouteGenericInterface = RouteGenericInterface, ContextConfig = ContextConfigDefault, SchemaCompiler extends FastifySchema = FastifySchema>(opts: Pick<RouteOptions<RawServer, RawRequest, RawReply... npmjs.com
fastify 5.12.1 breaking changes
- Signature changed
FastifyHttp2Options.trustProxy
Was trustProxy?: boolean | string | string[] | number | TrustProxyFunction; now trustProxy?: boolean | string | string[] | TrustProxyFunction. npmjs.com - Signature changed
FastifyHttp2SecureOptions.trustProxy
Was trustProxy?: boolean | string | string[] | number | TrustProxyFunction; now trustProxy?: boolean | string | string[] | TrustProxyFunction. npmjs.com - Signature changed
FastifyHttpOptions.trustProxy
Was trustProxy?: boolean | string | string[] | number | TrustProxyFunction; now trustProxy?: boolean | string | string[] | TrustProxyFunction. npmjs.com - Signature changed
FastifyHttpsOptions.trustProxy
Was trustProxy?: boolean | string | string[] | number | TrustProxyFunction; now trustProxy?: boolean | string | string[] | TrustProxyFunction. npmjs.com - Signature changed
FastifyServerOptions
Was type FastifyServerOptions<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... npmjs.com - Signature changed
FastifyServerOptions.trustProxy
Was trustProxy?: boolean | string | string[] | number | TrustProxyFunction; now trustProxy?: boolean | string | string[] | TrustProxyFunction. npmjs.com
fastify 5.12.0 breaking changes
- Behavior changed
Invalid media types now yield undefined instead of the previous result. Code that checks the parsed content type for invalid input should handle undefined. github.com
fastify 5.11.3 breaking changes
- Signature changed
LogController.requestCompleted
Was requestCompleted (error: Error | null, request: FastifyRequest, reply: FastifyReply, metadata?: Record<string, unknown>): void; now requestCompleted (error: Error | null | undefined, request: FastifyRequest, reply: FastifyReply... npmjs.com
fastify 5.11.1 breaking changes
- Signature changed
FastifyHttpOptions
Was type FastifyHttpOptions<Server extends http.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {http?: http.ServerOptions | null}; now type FastifyHttpOptions<Server extends... npmjs.com - Signature changed
FastifyHttpsOptions
Was type FastifyHttpsOptions<Server extends https.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {https: https.ServerOptions | null}; now type FastifyHttpsOptions<Server extends... npmjs.com - Signature changed
FastifyInstance.addHttpMethod
Was addHttpMethod(method: string, methodOptions?: {hasBody: boolean}): FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>; now addHttpMethod(method: string, methodOptions?: {hasBody?: boolean; overrideExisting?... npmjs.com
Older versions
16 older versions, each with its first changes. Sign up to see every change
Show 16 older versions
fastify 5.11.0 breaking changes
- Signature changed
FastifyErrorCodes
Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... npmjs.com
fastify 5.10.0 breaking changes
- Behavior changed
request.port
request.port is now taken from request.host, so code reading request.port may see different values than before. github.com - Signature changed
FastifyErrorCodes
Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... npmjs.com
And 1 more in this version.
fastify 5.9.0 breaking changes
- Behavior changed
Requests without a socket no longer take host or protocol from forwarded headers. Code that relied on those headers in that case must read them another way. github.com - Behavior changed
checkDependencies now throws FST_ERR_PLUGIN_DEPENDENCY_NOT_REGISTERED instead of AssertionError. Code that catches AssertionError for this case must check the new error code. github.com
And 4 more in this version.
fastify 5.8.3 breaking changes
- Signature changed
FastifyRequest.port
Was readonly port: number; now readonly port: number | null. npmjs.com
fastify 5.8.0 breaking changes
- Signature changed
FastifyErrorCodes
Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... npmjs.com - Signature changed
FastifyServerOptions
Was type FastifyServerOptions<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... npmjs.com
And 10 more in this version.
fastify 5.7.2 breaking changes
- Behavior changed
The content-type header is now parsed by a strict parser that accepts only values in the RFC 9110 form. Requests with non-compliant content-type values may now be rejected, so check clients that send unusual values. github.com
fastify 5.7.0 breaking changes
- Removed
FastifyHttp2Options.ajv.customOptions
FastifyHttp2Options.ajv.customOptions was removed in fastify 5.7.0 npmjs.com - Removed
FastifyHttp2Options.ajv.plugins
FastifyHttp2Options.ajv.plugins was removed in fastify 5.7.0 npmjs.com
And 32 more in this version.
fastify 5.6.2 breaking changes
- Signature changed
FastifyInstance.errorHandler
Was errorHandler: (error: FastifyError, request: FastifyRequest, reply: FastifyReply) => void; now errorHandler: <TError = unknown>(error: TError, request: FastifyRequest, reply: FastifyReply) => void. npmjs.com - Signature changed
FastifyInstance.setErrorHandler
The error parameter type for setErrorHandler and errorHandler is now unknown instead of any, though it can be set through the generic TError. TypeScript code that relied on the error being typed as any may need a type annotation or the... npmjs.com
fastify 5.6.0 breaking changes
- Signature changed
FastifyBaseLogger
Was interface FastifyBaseLogger extends pino.BaseLogger; now interface FastifyBaseLogger extends Pick<BaseLogger, 'level' | 'info' | 'error' | 'debug' | 'fatal' | 'warn' | 'trace' | 'silent'>. npmjs.com - Signature changed
FastifyInstance.initialConfig
Was initialConfig: Readonly<{connectionTimeout?: number, keepAliveTimeout?: number, forceCloseConnections?: boolean, bodyLimit?: number, caseSensitive?: boolean, allowUnsafeRegex?: boolean, http2?: boolean, https?: boolean |... npmjs.com
And 1 more in this version.
fastify 5.5.0 breaking changes
- Configuration changed
Router options are now set under their own key rather than at the top level of the options object. Users who pass router options must move them to that key. github.com - Signature changed
FastifyErrorCodes
Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... npmjs.com
And 2 more in this version.
fastify 5.4.0 breaking changes
- Signature changed
FastifyServerOptions
Was type FastifyServerOptions<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = {ignoreTrailingSlash?: boolean, ignoreDuplicateSlashes?: boolean, connectionTimeout?: number... npmjs.com
fastify 5.3.3 breaking changes
- Signature changed
FastifyErrorCodes
Was type FastifyErrorCodes = Record<'FST_ERR_NOT_FOUND' | 'FST_ERR_OPTIONS_NOT_OBJ' | 'FST_ERR_QSP_NOT_FN' | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN' | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN' | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'... npmjs.com
fastify 5.3.2 breaking changes
- Behavior changed
Content-type headers are now parsed with a space treated as a delimiter, which closes a validation bypass. Requests whose content-type relied on the old parsing may now be handled differently. github.com
fastify 5.2.0 breaking changes
- Removed
FastifyRequest.connection
The connection property was removed from the FastifyRequest TypeScript type, so code that reads request.connection in typed code will no longer compile. npmjs.com
fastify 5.1.0 breaking changes
- Behavior changed
fastify
Fastify now makes a shallow copy of the options object before changing it, so code that relied on the passed-in options object being modified must read the values from its own copy instead. github.com - Signature changed
TypeScript users whose plugin options have defined properties must now pass the options object, so existing calls that omit it may fail to type-check. github.com
And 4 more in this version.
fastify 5.0.0 breaking changes
- Removed
FastifyHttp2Options.jsonShorthand
FastifyHttp2Options.jsonShorthand was removed in fastify 5.0.0 npmjs.com - Removed
FastifyHttp2Options.versioning
FastifyHttp2Options.versioning was removed in fastify 5.0.0 npmjs.com
And 100 more in this version.
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.