Skip to content

feat(v5-migration-recipe): create migration recipe for Express.js v5#101

Merged
bjohansebas merged 6 commits into
mainfrom
v5-group
Jan 13, 2026
Merged

feat(v5-migration-recipe): create migration recipe for Express.js v5#101
bjohansebas merged 6 commits into
mainfrom
v5-group

Conversation

@bjohansebas

@bjohansebas bjohansebas commented Dec 26, 2025

Copy link
Copy Markdown
Member

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

@bjohansebas bjohansebas self-assigned this Dec 26, 2025
@bjohansebas bjohansebas mentioned this pull request Dec 26, 2025
25 tasks
Comment thread codemods/v5-migration-recipe/README.md Outdated
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).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The links are still to be confirmed, I’ll fix them once they’re in the registry.

@mohebifar mohebifar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment thread codemods/v5-migration-recipe/workflow.yaml Outdated
Co-authored-by: Mohamad Mohebifar <mohebifar@users.noreply.github.com>
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
@AugustinMauroy

Copy link
Copy Markdown
Contributor

Maybe put this pr as draft until the other being merged

@bjohansebas bjohansebas marked this pull request as draft January 9, 2026 22:03
@bjohansebas bjohansebas marked this pull request as ready for review January 13, 2026 15:36
@bjohansebas

Copy link
Copy Markdown
Member Author

I’ve verified that the codemods work

@bjohansebas bjohansebas merged commit add40f7 into main Jan 13, 2026
23 checks passed
@bjohansebas bjohansebas deleted the v5-group branch January 13, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants