Upgrade to NestJS 11

Proprietary

Chains the earlier majors: a project several majors behind needs only this recipe, and upgrades the dependencies once, straight to 11.x, so no intermediate version has to resolve. Upgrade the @nestjs/* framework packages to 11.x in package.json: common, core, platform-*, websockets, microservices, testing, cli, schematics, typeorm, mongoose, passport and jwt, with @nestjs/config 4.x and @nestjs/swagger 11.x. NestJS 11 requires Node.js 20 or later and Express 5 for @nestjs/platform-express, which changes route wildcard syntax. Wildcard route paths such as @Get('*') and forRoutes('*') are moved to the Express 5 syntax (MigrateRouteWildcards). Not done by this recipe: raising engines.node, wildcard paths built from variables, the cache-manager 6 Keyv migration, and @nestjs/* packages not listed here such as graphql, schedule and bull.

org.openrewrite.nodejs.migrate.nestjs.UpgradeToNestJs11
mod run . --recipe=org.openrewrite.nodejs.migrate.nestjs.UpgradeToNestJs11

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