Migrate to Express 5

MSAL

Migrates an Express 4 application to Express 5, following the migration guide, and keeps it behaving as it did. Replaces the methods, signatures and options Express 5 removed, rewrites route paths to the syntax of path-to-regexp 8, keeps the extended parsers of query strings and URL-encoded bodies Express 4 defaulted to, rethrows the errors app.listen() now passes to its callback, keeps req.params typed as strings, and upgrades express and its types. What cannot be rewritten with the same behaviour is marked for review.

org.openrewrite.javascript.migrate.express.MigrateToExpress5
mod run . --recipe=org.openrewrite.javascript.migrate.express.MigrateToExpress5

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.