express breaking changes
npm5 curated breaking changes across major versions of express. Use this as a migration checklist before bumping dependencies.
- 4 \u2192 5api
path-to-regexp upgraded to 8.x: wildcards now require an explicit name (e.g. `/files/*filepath` instead of `/files/*`).
MigrationUpdate route patterns: `/assets/*` -> `/assets/*assetPath`. Regex routes unchanged.
- 4 \u2192 5behavior
req.body is `undefined` by default when no body-parsing middleware matches (was `{}` in 4.x).
MigrationGuard with `req.body ?? {}` or mount `express.json()` / `express.urlencoded()` as needed.
- 4 \u2192 5behavior
Async middleware: rejected promises propagate to the error handler automatically.
MigrationYou can now `throw` or reject inside async middleware without try/catch. Remove manual `.catch(next)` wrappers.
- 4 \u2192 5removal
`req.param(name)` removed (deprecated in 4.x). `app.del` alias removed.
MigrationUse `req.params.name`, `req.body.name`, or `req.query.name` explicitly. Rename `app.del` to `app.delete`.
- 4 \u2192 5runtime
Node.js 18+ required.
MigrationUpgrade Node to >= 18 before installing express@5.
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/npm/express