feat(v5-migration-recipe): create migration recipe for Express.js v5#101
Merged
bjohansebas merged 6 commits intomainfrom Jan 13, 2026
Merged
feat(v5-migration-recipe): create migration recipe for Express.js v5#101bjohansebas merged 6 commits intomainfrom
bjohansebas merged 6 commits intomainfrom
Conversation
…addressing deprecated APIs
25 tasks
bjohansebas
commented
Dec 26, 2025
Comment on lines
7
to
12
| - **Back Redirect Deprecated**: This transformation updates instances of `res.redirect('back')` and `res.location('back')` to use the recommended alternatives. Registry entry: [https://app.codemod.com/registry/expressjs/back-redirect-deprecated](https://app.codemod.com/registry/expressjs/back-redirect-deprecated). | ||
| - **Req Param**: Migrates usage of the legacy API `req.param(name)` to the current recommended alternatives. Registry entry: [https://app.codemod.com/registry/expressjs/req-param](https://app.codemod.com/registry/expressjs/req-param). | ||
| - **Pluralize Method Names**: Migrates deprecated singular request methods to their pluralized counterparts where applicable. Registry entry: [https://app.codemod.com/registry/expressjs/pluralize-method-names](https://app.codemod.com/registry/expressjs/pluralize-method-names). | ||
| - **Status Send Order**: Migrates usages of `res.send(status)`, `res.send(obj, status)`, `res.json(obj, status)`, and `res.jsonp(obj, status)` to the recommended argument ordering. Registry entry: [https://app.codemod.com/registry/expressjs/status-send-order](https://app.codemod.com/registry/expressjs/status-send-order). | ||
| - **Redirect Arg Order**: Converts `res.redirect(url, status)` calls to the recommended `res.redirect(status, url)` ordering. Registry entry: [https://app.codemod.com/registry/expressjs/redirect-arg-order](https://app.codemod.com/registry/expressjs/redirect-arg-order). | ||
| - **Camelcase Sendfile**: Replaces legacy `res.sendfile(file)` usages with the camel-cased `res.sendFile(file)` API. Registry entry: [https://app.codemod.com/registry/expressjs/camelcase-sendfile](https://app.codemod.com/registry/expressjs/camelcase-sendfile). |
Member
Author
There was a problem hiding this comment.
The links are still to be confirmed, I’ll fix them once they’re in the registry.
Co-authored-by: Mohamad Mohebifar <mohebifar@users.noreply.github.com> Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
Contributor
|
Maybe put this pr as draft until the other being merged |
Member
Author
|
I’ve verified that the codemods work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This creates a codemod that calls the rest of the codemods, so it’s easy to run a single command and change everything.
This codemod won’t work until the other codemods are published in the registry