Upgrade to Node.js 22
ProprietaryMoves a project to Node.js 22, running the Node.js 20 upgrade first: raises engines.node, GitHub Actions' node-version, .nvmrc/.node-version and a declared @types/node to 22, never lowering them, marks a typescript too old for that @types/node, and migrates what Node.js 21 and 22 removed or runtime-deprecated. Replaces util.types.isWebAssemblyCompiledModule() (DEP0177), import assertions with import attributes, util.isX() type checks (DEP0044–DEP0058), util._extend() (DEP0060), util.promisify() of an async function (DEP0174), the crypto.Hash and crypto.Hmac constructors (DEP0179, DEP0181) and new fs.Stats() (DEP0180), and marks crypto.createCipher()/createDecipher() (DEP0106) and the punycode module (DEP0040). Also replaces the documentation-only buffer.slice() (DEP0158) and process.features.tls_* (DEP0189), renames the hooks' importAssertions and the ImportAssertions type, which @types/node 22 no longer declares, and marks the other declarations it drops.
io. moderne. javascript. migrate. node. UpgradeToNode22mod run . --recipe= io. moderne. javascript. migrate. node. UpgradeToNode22Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.