Zum Inhalt springen
verdict:

Express 5.0.0

featured

note: die Zusammenfassung und die Release Notes sind auf Englisch

warning: Eingriff nötig

3 Breaking Changes5 Kernpunkte

Express 5.0.0 drops Node.js before v18, changes routing and body-parser defaults, and removes deprecated APIs.

Zusammenfassung · nur aus den Release Notes · claude-haiku-5-5 · prompt v7

breaking changesalle zitiert, jeder mit einer Lösung

breaking[1]: Node.js versions before v18 are no longer supported.

**Node.js version support**: Dropped support for Node.js versions before v18.

help: Upgrade Node.js to version 18 or newer, then follow the migration guide.

breaking[2]: Sub-expression regex patterns in route paths are no longer supported.

**Routing changes**: Updated to path-to-regexp@8.x, removing sub-expression regex patterns for security reasons (ReDoS mitigation).

help: Rewrite affected routes without sub-expression regex patterns, following the migration guide.

breaking[3]: Old deprecated API method signatures from Express v3 and v4 are removed.

**Deprecated API methods removed**: Removed old, deprecated API method signatures from Express v3/v4.

help: Replace calls to removed signatures with their v5 equivalents, as listed in the migration guide.

Kernpunkte

release-notesgithub.com/expressjs/express · 104 Zeilen
  1. # Express v5.0.0
  2. 🎉 **Express v5 is finally here!** 🎉
  3. After years of development, the long-awaited Express v5 has been officially released. This version focuses on simplifying the codebase, improving security, and dropping support for older Node.js versions to enable better performance and maintainability.
  4. For detailed information, please check out the official [Express v5 release blog post](https://expressjs.com/2024/10/15/v5-release.html).
  5. ## Most relevant details
  6. ### Major Changes in v5
  7. - **Node.js version support**: Dropped support for Node.js versions before v18.
  8. - **Routing changes**: Updated to `path-to-regexp@8.x`, removing sub-expression regex patterns for security reasons (ReDoS mitigation).
  9. - **Promise support**: Middleware can now return rejected promises, caught by the router as errors.
  10. - **`body-parser` changes**: Several improvements including the ability to customize `urlencoded` body depth and defaulting `extended` to `false`.
  11. - **Deprecated API methods removed**: Removed old, deprecated API method signatures from Express v3/v4.
  12. For a complete list of breaking changes and API deprecations, see the [migration guide](https://expressjs.com/en/guide/migrating-5.html).
  13. ### Security Updates
  14. This release includes important security fixes, including improvements to prevent ReDoS attacks and mitigation for CVE-2024-45590. Full details can be found in the [security release notes](https://expressjs.com/2024/09/29/security-releases.html).
  15. ### Migration
  16. Be sure to check out our [migration guide](https://expressjs.com/en/guide/migrating-5.html) for instructions on how to update your applications from Express v4 to v5.
  17. ### Security Guidance
  18. For best practices, we recommend reviewing the [Threat Model](https://github.com/expressjs/security-wg/blob/main/docs/ThreatModel.md) which outlines Express' approach to securing your applications, including tips for user input validation and other critical aspects.
  19. ## What's Changed
  20. * 4.19.2 Staging by @wesleytodd in https://github.com/expressjs/express/pull/5561
  21. * remove duplicate location test for data uri by @wesleytodd in https://github.com/expressjs/express/pull/5562
  22. * feat: document beta releases expectations by @marco-ippolito in https://github.com/expressjs/express/pull/5565
  23. * Cut down on duplicated CI runs by @jonchurch in https://github.com/expressjs/express/pull/5564
  24. * Add a Threat Model by @UlisesGascon in https://github.com/expressjs/express/pull/5526
  25. * Assign captain of encodeurl by @blakeembrey in https://github.com/expressjs/express/pull/5579
  26. * Nominate jonchurch as repo captain for `http-errors`, `expressjs.com`, `morgan`, `cors`, `body-parser` by @jonchurch in https://github.com/expressjs/express/pull/5587
  27. * docs: update Security.md by @inigomarquinez in https://github.com/expressjs/express/pull/5590
  28. * docs: update triage nomination policy by @UlisesGascon in https://github.com/expressjs/express/pull/5600
  29. * Add CodeQL (SAST) by @UlisesGascon in https://github.com/expressjs/express/pull/5433
  30. * docs: add UlisesGascon as triage initiative captain by @UlisesGascon in https://github.com/expressjs/express/pull/5605
  31. * Use object with null prototype for various app properties by @EvanHahn in https://github.com/expressjs/express/pull/4861
  32. * deps: encodeurl@~2.0.0 by @blakeembrey in https://github.com/expressjs/express/pull/5569
  33. * skip QUERY method test by @jonchurch in https://github.com/expressjs/express/pull/5628
  34. * ignore ETAG query test on 21 and 22, reuse skip util by @jonchurch in https://github.com/expressjs/express/pull/5639
  35. * add support Node.js@22 in the CI by @mertcanaltin in https://github.com/expressjs/express/pull/5627
  36. * doc: add table of contents, tc/triager lists to readme by @mertcanaltin in https://github.com/expressjs/express/pull/5619
  37. * List and sort all projects, add captains by @blakeembrey in https://github.com/expressjs/express/pull/5653
  38. * Call callback once on listen error by @wesleytodd in https://github.com/expressjs/express/pull/3216
  39. * docs: add @UlisesGascon as captain for cookie-parser by @UlisesGascon in https://github.com/expressjs/express/pull/5666
  40. * ✨ bring back query tests for node 21 by @ctcpip in https://github.com/expressjs/express/pull/5690
  41. * [v4] Deprecate `res.clearCookie` accepting `options.maxAge` and `options.expires` by @jonchurch in https://github.com/expressjs/express/pull/5672
  42. * skip QUERY tests for Node 21 only, still not supported by @jonchurch in https://github.com/expressjs/express/pull/5695
  43. * 📝 update people, add ctcpip to TC by @ctcpip in https://github.com/expressjs/express/pull/5683
  44. * remove minor version pinning from ci by @jonchurch in https://github.com/expressjs/express/pull/5722
  45. * Fix link variable use in attribution section of CODE OF CONDUCT by @IamLizu in https://github.com/expressjs/express/pull/5762
  46. * Replace Appveyor windows testing with GHA by @jonchurch in https://github.com/expressjs/express/pull/5599
  47. * Add OSSF Scorecard badge by @UlisesGascon in https://github.com/expressjs/express/pull/5436
  48. * Throw on invalid status codes by @jonchurch in https://github.com/expressjs/express/pull/4212
  49. * Use Array.flat instead of array-flatten by @almic in https://github.com/expressjs/express/pull/5677
  50. * Adopt Node@18 as the minimum supported version by @UlisesGascon in https://github.com/expressjs/express/pull/5803
  51. * Ignore `expires` and `maxAge` in `res.clearCookie()` by @jonchurch in https://github.com/expressjs/express/pull/5792
  52. * send@1.0.0 by @wesleytodd in https://github.com/expressjs/express/pull/5786
  53. * chore: upgrade `debug` dep from 3.10 to 4.3.6 by @carpasse in https://github.com/expressjs/express/pull/5829
  54. * refactor: replace 'path-is-absolute' dep with node:path isAbsolute method by @carpasse in https://github.com/expressjs/express/pull/5830
  55. * update scorecard link by @bjohansebas in https://github.com/expressjs/express/pull/5814
  56. * Nominate @IamLizu to the triage team by @UlisesGascon in https://github.com/expressjs/express/pull/5836
  57. * deps: path-to-regexp@0.1.8 by @blakeembrey in https://github.com/expressjs/express/pull/5603
  58. * docs: specify new instructions for `question` and `discuss` by @IamLizu in https://github.com/expressjs/express/pull/5835
  59. * 5.x: Upgrading `merge-descriptors` with allowing minors by @RobinTail in https://github.com/expressjs/express/pull/5782
  60. * 4.x: Upgrade `merge-descriptors` dependency by @RobinTail in https://github.com/expressjs/express/pull/5781
  61. * WIP: serve-static@2 by @wesleytodd in https://github.com/expressjs/express/pull/5790
  62. * chore: upgrade qs dp from 6.11.0 to 6.13.0 by @carpasse in https://github.com/expressjs/express/pull/5847
  63. * Upgrade cookie signature by @IamLizu in https://github.com/expressjs/express/pull/5833
  64. * accepts@2 by @wesleytodd in https://github.com/expressjs/express/pull/5881
  65. * mime-types@3 by @wesleytodd in https://github.com/expressjs/express/pull/5882
  66. * type-is@^2.0.0 by @wesleytodd in https://github.com/expressjs/express/pull/5883
  67. * content-disposition@^1.0.0 by @wesleytodd in https://github.com/expressjs/express/pull/5884
  68. * fix(deps): finalhandler@^2.0.0 by @wesleytodd in https://github.com/expressjs/express/pull/5899
  69. * path-to-regexp@0.1.10 by @blakeembrey in https://github.com/expressjs/express/pull/5902
  70. * update to `fresh@^2.0.0` by @jonchurch in https://github.com/expressjs/express/pull/5916
  71. * router@^2.0.0 by @wesleytodd in https://github.com/expressjs/express/pull/5885
  72. * Adopt Node@18 as the minimum supported version by @UlisesGascon in https://github.com/expressjs/express/pull/5595
  73. * master -> 5.0 by @ctcpip in https://github.com/expressjs/express/pull/5785
  74. * 🔧 update CI, remove unsupported versions, clean up by @ctcpip in https://github.com/expressjs/express/pull/5931
  75. * Delete `back` as a magic string by @blakeembrey in https://github.com/expressjs/express/pull/5933
  76. * Release 5.0 by @dougwilson in https://github.com/expressjs/express/pull/2237
  77. ## New Contributors
  78. * @marco-ippolito made their first contribution in https://github.com/expressjs/express/pull/5565
  79. * @inigomarquinez made their first contribution in https://github.com/expressjs/express/pull/5590
  80. * @mertcanaltin made their first contribution in https://github.com/expressjs/express/pull/5627
  81. * @ctcpip made their first contribution in https://github.com/expressjs/express/pull/5690
  82. * @IamLizu made their first contribution in https://github.com/expressjs/express/pull/5762
  83. * @almic made their first contribution in https://github.com/expressjs/express/pull/5677
  84. * @carpasse made their first contribution in https://github.com/expressjs/express/pull/5829
  85. * @bjohansebas made their first contribution in https://github.com/expressjs/express/pull/5814
  86. * @RobinTail made their first contribution in https://github.com/expressjs/express/pull/5782
  87. **Full Changelog**: https://github.com/expressjs/express/compare/v5.0.0-beta.3...v5.0.0

auf github ansehenimported 2026-09-28 über npm