Eexpressjs

expressjs/v5-migration-recipe

This codemod migration recipe helps you update your Express.js v4 applications to be compatible with Express.js v5 by addressing deprecated APIs.

transformationmigrationexpressv5v4legacy
PublicBundle
2,559 executions

Run locally

npx codemod @expressjs/v5-migration-recipe
  • v1.1.0@expressjs/back-redirect-deprecatedv1.0.0Workflow default · Migrates usage of the legacy APIs `res.redirect('back')` and `res.location('back')` to the current recommended approaches
  • v1.1.0@expressjs/explicit-request-paramsv1.0.0Workflow default · Migrates usage of the legacy APIs `req.param(name)` to the current recommended approaches.
  • v1.1.0@expressjs/pluralize-method-namesv1.0.0Workflow default · Migrates usage of deprecated singular request methods to their pluralized versions in Express.js applications.
  • v1.1.0@expressjs/status-send-orderv1.0.0Workflow default · Migrates usage of the legacy APIs `res.send(status)`, `res.send(obj, status)`, `res.json(obj, status)` and `res.jsonp(obj, status)` to the current recommended approaches
  • v1.1.0@expressjs/redirect-arg-orderv1.0.0Workflow default · Migrates usage of the legacy APIs `res.redirect(url, status)` to use the recommended argument order `res.redirect(status, url)`.
  • v1.1.0@expressjs/camelcase-sendfilev1.0.0Workflow default · Migrates usage of the legacy API `res.sendfile(file)` to `res.sendFile(file)`
  • v1.1.0@expressjs/route-del-to-deletev1.0.0Workflow default · Migrates usage of the legacy APIs `app.del()` to `app.delete()`
  • v1.1.0@expressjs/static-dotfilesv1.0.0Workflow default · Adds explicit dotfiles option to express.static() calls to preserve Express 4 behavior
  • v1.1.0@expressjs/static-mimev1.0.0Workflow default · Migrates express.static.mime to the mime-types package
  • v1.1.0@expressjs/sendfile-optionsv1.0.0Workflow default · Adds explicit dotfiles option to res.sendFile() calls to preserve Express 4 behavior
  • v1.0.0@expressjs/back-redirect-deprecatedv1.0.0Workflow default · Migrates usage of the legacy APIs `res.redirect('back')` and `res.location('back')` to the current recommended approaches
  • v1.0.0@expressjs/explicit-request-paramsv1.0.0Workflow default · Migrates usage of the legacy APIs `req.param(name)` to the current recommended approaches.
  • v1.0.0@expressjs/pluralize-method-namesv1.0.0Workflow default · Migrates usage of deprecated singular request methods to their pluralized versions in Express.js applications.
  • v1.0.0@expressjs/status-send-orderv1.0.0Workflow default · Migrates usage of the legacy APIs `res.send(status)`, `res.send(obj, status)`, `res.json(obj, status)` and `res.jsonp(obj, status)` to the current recommended approaches
  • v1.0.0@expressjs/redirect-arg-orderv1.0.0Workflow default · Migrates usage of the legacy APIs `res.redirect(url, status)` to use the recommended argument order `res.redirect(status, url)`.
  • v1.0.0@expressjs/camelcase-sendfilev1.0.0Workflow default · Migrates usage of the legacy API `res.sendfile(file)` to `res.sendFile(file)`
  • v1.0.0@expressjs/route-del-to-deletev1.0.0Workflow default · Migrates usage of the legacy APIs `app.del()` to `app.delete()`

Ready to contribute?

Build your own codemod and share it with the community.