Upgrade to Node.js 20

Proprietary

Moves a project to Node.js 20, running the Node.js 18 upgrade first: raises engines.node, GitHub Actions' node-version, .nvmrc/.node-version and a declared @types/node to 20, never lowering them, marks a typescript too old for that @types/node, and migrates what Node.js 19 and 20 removed. Makes process.exit() codes and process.exitCode integers (DEP0164), deletes crypto.DEFAULT_ENCODING = 'buffer' (DEP0091), replaces crypto.constants.ALPN_ENABLED with 1, drops the obsolete SSL_OP_* options from a | chain or deletes an object's property holding only them, and replaces webcrypto.CryptoKey with the global CryptoKey in JavaScript. Marks their other uses, which @types/node 20 no longer declares, and webcrypto.CryptoKey in TypeScript, where @types/node declares the global only from 24.

io.moderne.javascript.migrate.node.UpgradeToNode20
mod run . --recipe=io.moderne.javascript.migrate.node.UpgradeToNode20

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