Aalexbit-codemod

nodejs-modernization-bundle

Official Node.js codemod bundle for planning and orchestrating modernization across large production codebases. Runs all @nodejs registry transforms to power Codemod Insights dashboards.

nodejsnodemigrationdeprecationbundlerecipeinsights
PROBundle
0 executions

nodejs-modernization-bundle

A codemod bundle containing all the official Node.js codemods for planning and orchestrating modernization
across large production codebases. Runs 29 @nodejs registry transforms
in one pass to power Codemod Insights dashboards.

Five packages are temporarily excluded until they are republished with inlined
@nodejs/codemod-utils (bare imports fail at CLI runtime):
http-classes-with-new, process-main-module, rmdir, tmpDir-to-tmpdir,
and util-log-to-console-log.

Click Apply to repo to start building customizable Insight dashboards with
Codemod AI.

Bundled codemods

StepPackageDescription
1@nodejs/axios-to-whatwg-fetchReplace axios with fetch
2@nodejs/buffer-atob-btoaMigrate legacy buffer.atob() / buffer.btoa() to the current APIs
3@nodejs/chalk-to-util-styletextMigrate from chalk to Node.js util.styleText
4@nodejs/create-require-from-pathDEP0130: createRequireFromPathcreateRequire
5@nodejs/createCredentials-to-createSecureContextDEP0010: crypto.createCredentialstls.createSecureContext
6@nodejs/crypto-createcipheriv-migrationReplace removed createCipher / createDecipher with createCipheriv / createDecipheriv
7@nodejs/crypto-fips-to-getFipsDEP0093: crypto.fipscrypto.getFips() / crypto.setFips()
8@nodejs/crypto-rsa-pss-updateDEP0154: RSA-PSS hashhashAlgorithm options
9@nodejs/dirent-path-to-parent-pathDEP0178: dirent.pathdirent.parentPath
10@nodejs/err-invalid-callbackDEP0159: ERR_INVALID_CALLBACKERR_INVALID_ARG_TYPE
11@nodejs/fs-access-mode-constantsDEP0176: migrate fs.F_OK / R_OK / W_OK / X_OK imports
12@nodejs/fs-truncate-fd-deprecationDEP0081: truncateftruncateSync when using a file descriptor
13@nodejs/http-classes-with-new (temporarily disabled)DEP0195: instantiate node:http classes with new
14@nodejs/http-outgoingmessage-headersDEP0066: migrate deprecated OutgoingMessage _headers / _headerNames
15@nodejs/http2-priority-signalingDEP0194: remove HTTP/2 priority-related options and methods
16@nodejs/import-assertions-to-attributesReplace assert import attributes with with
17@nodejs/mocha-to-node-test-runnerMigrate Mocha 8.x tests to the Node.js test runner
18@nodejs/mock-module-exportsHandle mock.module exports deprecation
19@nodejs/node-url-to-whatwg-urlDEP0116: url.parsenew URL()
20@nodejs/process-assert-to-node-assertDEP0100: process.assertnode:assert
21@nodejs/process-main-module (temporarily disabled)DEP0138: process.mainModulerequire.main
22@nodejs/repl-builtin-modulesDEP0191: repl.builtinModulesmodule.builtinModules
23@nodejs/repl-classes-with-newDEP0185: instantiate node:repl classes with new
24@nodejs/rmdir (temporarily disabled)DEP0147: fs.rmdirfs.rm
25@nodejs/slow-buffer-to-buffer-alloc-unsafe-slowDEP0030: SlowBufferBuffer.allocUnsafeSlow()
26@nodejs/timers-deprecationsMigrate deprecated node:timers APIs to public timer functions
27@nodejs/tls-create-secure-pair-to-tls-socketDEP0064: createSecurePairTLSSocket
28@nodejs/tmpDir-to-tmpdir (temporarily disabled)DEP0022: tmpDirtmpdir
29@nodejs/types-is-native-errorDEP0197: types.isNativeErrorError.isError
30@nodejs/util-extend-to-object-assignDEP0060: util._extend()Object.assign()
31@nodejs/util-isReplace deprecated util.is*() methods with modern equivalents
32@nodejs/util-log-to-console-log (temporarily disabled)DEP0059: util.log()console.log()
33@nodejs/util-print-to-console-logDEP0026–DEP0029: util.print / puts / debug / errorconsole
34@nodejs/zlib-bytesread-to-byteswrittenDEP0108: zlib.bytesReadzlib.bytesWritten

Ready to contribute?

Build your own codemod and share it with the community.