Upgrade Node.js version in version files

Proprietary

Increases the Node.js version in .nvmrc and .node-version files. Major versions (20, v20) and pinned versions (20.11.0) become the target major, and LTS codenames (lts/iron) become the target's codename. Floating aliases such as lts/* and node are left alone. Never decreases the version.

org.openrewrite.nodejs.migrate.UpgradeNodeVersion

Required

The Node.js major version to set, e.g. 20 or 22.

mod run . --recipe=org.openrewrite.nodejs.migrate.UpgradeNodeVersion \ -P version=22

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