Skip to content
verdict:

Fastify 5.0.0

featured

warning: action required

6 breaking changes5 key points

Fastify 5.0.0 drops deprecated APIs, changes defaults, and adds req.hostname, req.port and a new logger API.

summary · from the release notes only · claude-haiku-5-5 · prompt v7

breaking changesall cited, each with a fix

breaking[1]: req.hostname and req.port are added as a breaking change, per the feat! marker.

feat!: Add req.hostname and req.port by @aarontravass in https://github.com/fastify/fastify/pull/4766

help: The notes give no migration steps. Check code that depends on the existing request properties.

breaking[2]: The setDefaultRoute and getDefaultRoute methods are dropped.

lib: drop setDefaultRoute and getDefaultRoute methods by @RafaelGSS in https://github.com/fastify/fastify/pull/4485

help: The notes give no migration steps. Check code that calls these methods and remove those calls.

breaking[3]: The deprecated variadic form of listen is removed.

Remove deprecated variadic listen by @jsumners in https://github.com/fastify/fastify/pull/4900

help: The notes give no migration steps. Check calls to listen that use the removed variadic form.

breaking[4]: The json shorthand is removed.

refactor!: remove json shorthand by @climba03003 in https://github.com/fastify/fastify/pull/5586

help: The notes give no migration steps. Check routes that use the json shorthand.

breaking[5]: The default value of the request id header is changed to false.

Change request id header default value to false by @philippviereck in https://github.com/fastify/fastify/pull/4194

help: The notes give no migration steps. Check code that relies on the request id header being set by default.

breaking[6]: The default of the useSemicolonDefault option is changed to false.

feat: set useSemicolonDefault default option to false by @dancastillo in https://github.com/fastify/fastify/pull/5320

help: The notes give no migration steps. Check code that relies on semicolon handling being enabled by default.

key points

release-notesgithub.com/fastify/fastify · 149 lines
  1. ## What's Changed
  2. * add missing route shorthands by @Uzlopak in https://github.com/fastify/fastify/pull/4409
  3. * lib: drop setDefaultRoute and getDefaultRoute methods by @RafaelGSS in https://github.com/fastify/fastify/pull/4485
  4. * Sync next-branch by @github-actions in https://github.com/fastify/fastify/pull/4815
  5. * Next: Disallow `decorate('name', null)` in the types by @voxpelli in https://github.com/fastify/fastify/pull/4878
  6. * feat!: Add req.hostname and req.port by @aarontravass in https://github.com/fastify/fastify/pull/4766
  7. * Change request id header default value to false by @philippviereck in https://github.com/fastify/fastify/pull/4194
  8. * Remove deprecated variadic listen by @jsumners in https://github.com/fastify/fastify/pull/4900
  9. * Sync next-branch by @github-actions in https://github.com/fastify/fastify/pull/4894
  10. * fix: requestIdHeader docs by @philippviereck in https://github.com/fastify/fastify/pull/4916
  11. * Sync next-branch by @github-actions in https://github.com/fastify/fastify/pull/4930
  12. * Sync next-branch by @github-actions in https://github.com/fastify/fastify/pull/4941
  13. * types: Remove variadic listen types by @Uzlopak in https://github.com/fastify/fastify/pull/4966
  14. * fix: remove http version check by @beyazit in https://github.com/fastify/fastify/pull/4962
  15. * feat: new logger api by @aarontravass in https://github.com/fastify/fastify/pull/5020
  16. * fix(plugins): mixing async and callback style now returns an error by @giuliowaitforitdavide in https://github.com/fastify/fastify/pull/5141
  17. * feat: align fastify.hasRoute to fmw.hasRoute by @dancastillo in https://github.com/fastify/fastify/pull/5102
  18. * feat: set useSemicolonDefault default option to false by @dancastillo in https://github.com/fastify/fastify/pull/5320
  19. * feat: make contentTypeParser's existingParser check more strict by @gurgunday in https://github.com/fastify/fastify/pull/5329
  20. * feat: loosen content-type checking by @climba03003 in https://github.com/fastify/fastify/pull/4450
  21. * feat: rework contentTypeParser methods by @gurgunday in https://github.com/fastify/fastify/pull/5372
  22. * perf: limit search space for contentType by @gurgunday in https://github.com/fastify/fastify/pull/5400
  23. * perf: update method matching by @gurgunday in https://github.com/fastify/fastify/pull/5419
  24. * chore: updated dependencies to latest versions by @puskin94 in https://github.com/fastify/fastify/pull/5422
  25. * chore: merge next into main for v5 release by @jsumners in https://github.com/fastify/fastify/pull/5446
  26. * docs(ref/typescript): support Docusaurus v3 by @james-kaguru in https://github.com/fastify/fastify/pull/5450
  27. * chore: remove unused dependency and fix ci by @gurgunday in https://github.com/fastify/fastify/pull/5454
  28. * feat: (types) add shorthand types for MKCALENDAR and REPORT by @gurgunday in https://github.com/fastify/fastify/pull/5455
  29. * fix: ci labeler by @Eomm in https://github.com/fastify/fastify/pull/5463
  30. * docs(guides/database): correct typo by @monish001 in https://github.com/fastify/fastify/pull/5461
  31. * test: add tests for error handling by @domdomegg in https://github.com/fastify/fastify/pull/5451
  32. * docs(reference/routes): fix example on constraints by @Cadienvan in https://github.com/fastify/fastify/pull/5468
  33. * perf: Optimize resolving X-Forwarded-For addresses by @dmkng in https://github.com/fastify/fastify/pull/5458
  34. * fix: `config` type in RouteShorthandOptions by @BrianValente in https://github.com/fastify/fastify/pull/5355
  35. * feat: request and reply decorators can not be a reference type by @Eomm in https://github.com/fastify/fastify/pull/5462
  36. * docs: update indentation on type providers section by @Tony133 in https://github.com/fastify/fastify/pull/5474
  37. * feat: log all available addresses if listening host is 0.0.0.0 by @mcollina in https://github.com/fastify/fastify/pull/5476
  38. * chore: remove node 18 from CI by @gurgunday in https://github.com/fastify/fastify/pull/5481
  39. * feat: writeEarlyHints by @gurgunday in https://github.com/fastify/fastify/pull/5480
  40. * docs: update indentation and code snippet in the routes section by @Tony133 in https://github.com/fastify/fastify/pull/5482
  41. * refactor: change `reply.redirect()` signature by @gurgunday in https://github.com/fastify/fastify/pull/5483
  42. * docs: update indentation and code snippet in the type providers section by @Tony133 in https://github.com/fastify/fastify/pull/5485
  43. * feat: emit diagnostics_channel events upon routing request by @tlhunter in https://github.com/fastify/fastify/pull/5252
  44. * chore: Bump pnpm/action-setup from 3 to 4 by @dependabot in https://github.com/fastify/fastify/pull/5492
  45. * chore: remove unnecessary eslint override by @Cangit in https://github.com/fastify/fastify/pull/5493
  46. * docs(ecosystem): Add fastify-kysely plugin by @alenap93 in https://github.com/fastify/fastify/pull/5475
  47. * chore: update tap@19 by @climba03003 in https://github.com/fastify/fastify/pull/5471
  48. * chore: Remove `reply.getReponseTime()` in https://github.com/fastify/fastify/pull/5490
  49. * chore: remove unused test by @Cangit in https://github.com/fastify/fastify/pull/5496
  50. * chore: readyListener can be async on server.ready() by @remidewitte in https://github.com/fastify/fastify/pull/5501
  51. * chore: test deprecation cleanup by @Cangit in https://github.com/fastify/fastify/pull/5510
  52. * chore: Migrate to neostandard by @mcollina in https://github.com/fastify/fastify/pull/5509
  53. * fix: hasRoute method comparison with case insensitive by @SMNBLMRR in https://github.com/fastify/fastify/pull/5508
  54. * feat(types): Introduce SafePromiseLike by @rozzilla in https://github.com/fastify/fastify/pull/5506
  55. * fix: Type inferrence with auxilliary hook handlers by @aadito123 in https://github.com/fastify/fastify/pull/5517
  56. * docs: addContentTypeParser with fastify.register by @moradebianchetti81 in https://github.com/fastify/fastify/pull/5499
  57. * docs: remove navigation for empty content by @liuhanqu in https://github.com/fastify/fastify/pull/5521
  58. * fix: server.listen listener is not cleanup properly by @climba03003 in https://github.com/fastify/fastify/pull/5522
  59. * feat: type definitions and documentation for separated type provider. by @Bram-dc in https://github.com/fastify/fastify/pull/5427
  60. * chore: support pre and alpha tags by @jsumners in https://github.com/fastify/fastify/pull/5528
  61. * chore: Bump the dependencies-major group with 2 updates by @dependabot in https://github.com/fastify/fastify/pull/5530
  62. * chore: Bump neostandard from 0.7.2 to 0.8.0 in the dev-dependencies group by @dependabot in https://github.com/fastify/fastify/pull/5531
  63. * fix(v5): update .npmignore by @Eomm in https://github.com/fastify/fastify/pull/5537
  64. * test: fix test finished earlier than expected by @climba03003 in https://github.com/fastify/fastify/pull/5540
  65. * chore: rm < node19 support from secondaryServer.close() by @Cangit in https://github.com/fastify/fastify/pull/5542
  66. * chore(sponsor): add valtown by @Eomm in https://github.com/fastify/fastify/pull/5543
  67. * chore: Bump the dev-dependencies group with 2 updates by @dependabot in https://github.com/fastify/fastify/pull/5546
  68. * docs: use `http2` directive in nginx config by @LiviaMedeiros in https://github.com/fastify/fastify/pull/5548
  69. * chore: Bump neostandard from 0.10.0 to 0.11.0 in the dev-dependencies group by @dependabot in https://github.com/fastify/fastify/pull/5554
  70. * chore: fix lint by @climba03003 in https://github.com/fastify/fastify/pull/5558
  71. * ci: remove automerge from ci alternative runtimes by @climba03003 in https://github.com/fastify/fastify/pull/5557
  72. * feat: support different body schema per content type by @nflaig in https://github.com/fastify/fastify/pull/5545
  73. * chore: remove dc-polyfill by @Cangit in https://github.com/fastify/fastify/pull/5560
  74. * fix: res serializer not given reply (#5556) by @mch-dsk in https://github.com/fastify/fastify/pull/5561
  75. * chore: Bump process-warning from 3.0.0 to 4.0.0 in the dependencies-major group by @dependabot in https://github.com/fastify/fastify/pull/5568
  76. * chore: Bump the dev-dependencies group with 2 updates by @dependabot in https://github.com/fastify/fastify/pull/5569
  77. * chore: allow ! in PR title by @climba03003 in https://github.com/fastify/fastify/pull/5571
  78. * docs: add @pybot/fastify-autoload to comm plugins by @kunal097 in https://github.com/fastify/fastify/pull/5579
  79. * feat: customize http methods by @Eomm in https://github.com/fastify/fastify/pull/5567
  80. * refactor(typescript): re-order FastifyReply generic parameters by @climba03003 in https://github.com/fastify/fastify/pull/5570
  81. * docs: Adding `crudify-mongo` plugin to community list by @aaroncadillac in https://github.com/fastify/fastify/pull/5581
  82. * docs(reference/typescript): remove type provider from typebox example by @jscheffner in https://github.com/fastify/fastify/pull/5576
  83. * refactor!: remove json shorthand by @climba03003 in https://github.com/fastify/fastify/pull/5586
  84. * chore: remove deprecation 005 by @jsumners in https://github.com/fastify/fastify/pull/5589
  85. * fix: nullish host by @sourcecodeit in https://github.com/fastify/fastify/pull/5590
  86. * chore(sponsor): add handsontable by @Eomm in https://github.com/fastify/fastify/pull/5592
  87. * fix: removed warning listener from tests by @sourcecodeit in https://github.com/fastify/fastify/pull/5598
  88. * fix: test suite import.js emitting errors by @dancastillo in https://github.com/fastify/fastify/pull/5599
  89. * chore: Bump @types/node from 20.14.13 to 22.0.0 in the dev-dependencies group by @dependabot in https://github.com/fastify/fastify/pull/5600
  90. * docs(reply): standardize import style in examples by @Tony133 in https://github.com/fastify/fastify/pull/5580
  91. * docs(typescript): update example fastify version by @Fdawgs in https://github.com/fastify/fastify/pull/5602
  92. * refactor: remove FSTDEP007 by @climba03003 in https://github.com/fastify/fastify/pull/5604
  93. * refactor: remove `FSTDEP008` and `FSTDEP009` by @climba03003 in https://github.com/fastify/fastify/pull/5609
  94. * refactor: remove `FSTDEP010` by @climba03003 in https://github.com/fastify/fastify/pull/5611
  95. * refactor: remove `FSTDEP021` by @gurgunday in https://github.com/fastify/fastify/pull/5613
  96. * refactor: use `Object.hasOwn` by @gurgunday in https://github.com/fastify/fastify/pull/5614
  97. * refactor: remove `FSTDEP012`, `FSTDEP015`, `FSTDEP016`, `FSTDEP017`, `FSTDEP018`, `FSTDEP019` by @climba03003 in https://github.com/fastify/fastify/pull/5616
  98. * refactor: remove `FSTDEP013` by @climba03003 in https://github.com/fastify/fastify/pull/5618
  99. * fix: throwing "FST_ERR_DUPLICATED_ROUTE" error instead of raw error by @Rantoledo in https://github.com/fastify/fastify/pull/5621
  100. * chore: Bump @sinclair/typebox from 0.32.35 to 0.33.4 in the dev-dependencies group by @dependabot in https://github.com/fastify/fastify/pull/5625
  101. * fix: reorder handling of `Response` replies by @barbieri in https://github.com/fastify/fastify/pull/5612
  102. * ci(.github): use latest node lts version by @Fdawgs in https://github.com/fastify/fastify/pull/5577
  103. * docs: add default value for maxParamLength by @busybox11 in https://github.com/fastify/fastify/pull/5630
  104. * chore: simplify `neostandard` setup by @voxpelli in https://github.com/fastify/fastify/pull/5635
  105. * chore: fix sponsor link by @Eomm in https://github.com/fastify/fastify/pull/5640
  106. * docs: move RafaelGSS to past collaborators by @RafaelGSS in https://github.com/fastify/fastify/pull/5645
  107. * docs(type-providers): fix typos by @mikesamm in https://github.com/fastify/fastify/pull/5651
  108. * feat: add fastify v4 codemods by @arshcodemod in https://github.com/fastify/fastify/pull/5642
  109. * chore: bump find-my-way to v9 by @mcollina in https://github.com/fastify/fastify/pull/5652
  110. * chore: bump ajv-compiler to v4.0.0 by @mcollina in https://github.com/fastify/fastify/pull/5653
  111. * chore: Bumped light-my-request to v6.0.0 by @mcollina in https://github.com/fastify/fastify/pull/5655
  112. * chore: Bumped avvio to v9.0.0 by @mcollina in https://github.com/fastify/fastify/pull/5656
  113. * chore: bump fast-json-stringify-compiler to v5.0.0 by @mcollina in https://github.com/fastify/fastify/pull/5660
  114. * docs: add dancastillo to Fastify Plugins team by @dancastillo in https://github.com/fastify/fastify/pull/5668
  115. * docs: join plugin team by @jean-michelet in https://github.com/fastify/fastify/pull/5677
  116. * chore: list the next deprecation code by @mcollina in https://github.com/fastify/fastify/pull/5673
  117. * types: remove nonexistant done parameter from onRegister by @gurgunday in https://github.com/fastify/fastify/pull/5678
  118. * docs: add v5 guide by @mcollina in https://github.com/fastify/fastify/pull/5674
  119. * feat: bind `this` to instance in onclose by @gurgunday in https://github.com/fastify/fastify/pull/5670
  120. * docs: update v4 codemods by @mohab-sameh in https://github.com/fastify/fastify/pull/5666
  121. * docs: Add required .js extension to relative ESM imports by @masto in https://github.com/fastify/fastify/pull/5685
  122. ## New Contributors
  123. * @beyazit made their first contribution in https://github.com/fastify/fastify/pull/4962
  124. * @puskin94 made their first contribution in https://github.com/fastify/fastify/pull/5422
  125. * @james-kaguru made their first contribution in https://github.com/fastify/fastify/pull/5450
  126. * @monish001 made their first contribution in https://github.com/fastify/fastify/pull/5461
  127. * @dmkng made their first contribution in https://github.com/fastify/fastify/pull/5458
  128. * @BrianValente made their first contribution in https://github.com/fastify/fastify/pull/5355
  129. * @Cangit made their first contribution in https://github.com/fastify/fastify/pull/5493
  130. * @alenap93 made their first contribution in https://github.com/fastify/fastify/pull/5475
  131. * @moradebianchetti81 made their first contribution in https://github.com/fastify/fastify/pull/5499
  132. * @Bram-dc made their first contribution in https://github.com/fastify/fastify/pull/5427
  133. * @LiviaMedeiros made their first contribution in https://github.com/fastify/fastify/pull/5548
  134. * @mch-dsk made their first contribution in https://github.com/fastify/fastify/pull/5561
  135. * @kunal097 made their first contribution in https://github.com/fastify/fastify/pull/5579
  136. * @aaroncadillac made their first contribution in https://github.com/fastify/fastify/pull/5581
  137. * @jscheffner made their first contribution in https://github.com/fastify/fastify/pull/5576
  138. * @sourcecodeit made their first contribution in https://github.com/fastify/fastify/pull/5590
  139. * @Rantoledo made their first contribution in https://github.com/fastify/fastify/pull/5621
  140. * @barbieri made their first contribution in https://github.com/fastify/fastify/pull/5612
  141. * @busybox11 made their first contribution in https://github.com/fastify/fastify/pull/5630
  142. * @mikesamm made their first contribution in https://github.com/fastify/fastify/pull/5651
  143. * @arshcodemod made their first contribution in https://github.com/fastify/fastify/pull/5642
  144. * @jean-michelet made their first contribution in https://github.com/fastify/fastify/pull/5677
  145. * @mohab-sameh made their first contribution in https://github.com/fastify/fastify/pull/5666
  146. * @masto made their first contribution in https://github.com/fastify/fastify/pull/5685
  147. **Full Changelog**: https://github.com/fastify/fastify/compare/v4.27.0...v5.0.0

view on githubimported 2026-09-28 via npm