# Node.js Userland Migrations ## Docs - [AST-grep Utilities](https://mintlify.wiki/nodejs/userland-migrations/api/ast-grep-utilities.md): Core helper functions for working with AST nodes in Node.js codemods - [Binding Resolution](https://mintlify.wiki/nodejs/userland-migrations/api/binding-resolution.md): Utilities for resolving and transforming import bindings - [Import and Require Detection](https://mintlify.wiki/nodejs/userland-migrations/api/import-require-detection.md): Utilities for finding and analyzing module import and require statements - [API Reference Overview](https://mintlify.wiki/nodejs/userland-migrations/api/overview.md): Comprehensive API reference for Node.js Userland Migrations codemod utilities - [Package.json Utilities](https://mintlify.wiki/nodejs/userland-migrations/api/package-json-utilities.md): Utilities for analyzing and transforming package.json files - [How Codemods Work](https://mintlify.wiki/nodejs/userland-migrations/concepts/how-codemods-work.md): Learn how Node.js Userland codemods use AST transformations with ast-grep and the jssg API to automate code migrations - [Safety Best Practices](https://mintlify.wiki/nodejs/userland-migrations/concepts/safety-best-practices.md): Learn how to run Node.js codemods safely with version control, testing, and validation strategies - [When to Use Codemods](https://mintlify.wiki/nodejs/userland-migrations/concepts/when-to-use.md): Understand when automated codemods are the right choice versus manual migration for your Node.js project - [Creating Recipes](https://mintlify.wiki/nodejs/userland-migrations/contributing/creating-recipes.md): Step-by-step guide to creating new migration recipes - [Contributing Overview](https://mintlify.wiki/nodejs/userland-migrations/contributing/overview.md): Get started contributing to Node.js Userland Migrations - [Testing](https://mintlify.wiki/nodejs/userland-migrations/contributing/testing.md): Testing requirements and best practices for migration recipes - [Development Workflow](https://mintlify.wiki/nodejs/userland-migrations/contributing/workflow.md): Development workflow, pre-commit checks, and pull request process - [Installation & Setup](https://mintlify.wiki/nodejs/userland-migrations/installation.md): Install the Codemod CLI and configure your environment for running Node.js migrations - [Introduction](https://mintlify.wiki/nodejs/userland-migrations/introduction.md): Learn about Node.js Userland Migrations and how codemods can automate your code transformations - [Quick Start](https://mintlify.wiki/nodejs/userland-migrations/quickstart.md): Run your first Node.js migration in minutes with step-by-step instructions - [buffer.atob() & buffer.btoa() Migration](https://mintlify.wiki/nodejs/userland-migrations/recipes/buffer-atob-btoa.md): Migrate from legacy buffer.atob() and buffer.btoa() APIs to modern Buffer methods for base64 encoding and decoding - [Chalk to util.styleText Migration](https://mintlify.wiki/nodejs/userland-migrations/recipes/chalk-to-util-styletext.md): Migrate from the external chalk package to Node.js built-in util.styleText() API for terminal text styling - [Correct TypeScript Specifiers](https://mintlify.wiki/nodejs/userland-migrations/recipes/correct-ts-specifiers.md): Transform TypeScript import specifiers from .js extensions to correct .ts/.cts/.mts extensions for Node.js ESM compatibility - [createRequireFromPath Migration (DEP0130)](https://mintlify.wiki/nodejs/userland-migrations/recipes/create-require-from-path.md): Migrate from deprecated createRequireFromPath to createRequire for creating require functions in ES modules - [createCredentials Migration (DEP0010)](https://mintlify.wiki/nodejs/userland-migrations/recipes/createCredentials-to-createSecureContext.md): Migrate from deprecated crypto.createCredentials to tls.createSecureContext for TLS credential management - [crypto.fips Migration (DEP0093)](https://mintlify.wiki/nodejs/userland-migrations/recipes/crypto-fips-to-getFips.md): Migrate from deprecated crypto.fips property to crypto.getFips() and crypto.setFips() methods - [RSA-PSS Crypto Options Update (DEP0154)](https://mintlify.wiki/nodejs/userland-migrations/recipes/crypto-rsa-pss-update.md): Update deprecated RSA-PSS key generation options from hash/mgf1Hash to hashAlgorithm/mgf1HashAlgorithm - [dirent.path to dirent.parentPath (DEP0178)](https://mintlify.wiki/nodejs/userland-migrations/recipes/dirent-path-to-parent-path.md): Migrate from deprecated dirent.path property to dirent.parentPath for directory entries - [fs Access Mode Constants Migration (DEP0176)](https://mintlify.wiki/nodejs/userland-migrations/recipes/fs-access-mode-constants.md): Migrate fs.F_OK, fs.R_OK, fs.W_OK, and fs.X_OK from root fs module to fs.constants - [fs.truncate() with File Descriptor](https://mintlify.wiki/nodejs/userland-migrations/recipes/fs-truncate-fd-deprecation.md): Migrate from fs.truncate() to fs.ftruncate() when using file descriptors (DEP0081) - [HTTP Classes with new Keyword](https://mintlify.wiki/nodejs/userland-migrations/recipes/http-classes-with-new.md): Add new keyword when instantiating HTTP classes like OutgoingMessage and ServerResponse (DEP0195) - [OutgoingMessage Header Methods](https://mintlify.wiki/nodejs/userland-migrations/recipes/http-outgoingmessage-headers.md): Replace private _headers and _headerNames fields with public getHeaders() and getRawHeaderNames() methods (DEP0066) - [Import Assertions to Attributes](https://mintlify.wiki/nodejs/userland-migrations/recipes/import-assertions-to-attributes.md): Convert import assertions (assert) to standardized import attributes (with) syntax - [Node.js URL to WHATWG URL](https://mintlify.wiki/nodejs/userland-migrations/recipes/node-url-to-whatwg-url.md): Migrate from legacy Node.js url module to the modern WHATWG URL API (DEP0116) - [Migration Recipes Overview](https://mintlify.wiki/nodejs/userland-migrations/recipes/overview.md): Comprehensive guide to all Node.js userland migration recipes for updating deprecated APIs and adopting modern best practices - [process.assert to node:assert](https://mintlify.wiki/nodejs/userland-migrations/recipes/process-assert-to-node-assert.md): Migrate from process.assert to the node:assert module (DEP0100) - [process.mainModule to require.main](https://mintlify.wiki/nodejs/userland-migrations/recipes/process-main-module.md): Replace process.mainModule with require.main in CommonJS modules (DEP0138) - [repl.builtinModules to module.builtinModules](https://mintlify.wiki/nodejs/userland-migrations/recipes/repl-builtin-modules.md): Migrate from repl.builtinModules and repl._builtinLibs to module.builtinModules (DEP0191, DEP0142) - [REPL Classes with new Keyword](https://mintlify.wiki/nodejs/userland-migrations/recipes/repl-classes-with-new.md): Add new keyword when instantiating REPL classes like REPLServer and Recoverable (DEP0185) - [fs.rmdir to fs.rm](https://mintlify.wiki/nodejs/userland-migrations/recipes/rmdir.md): Migrate from fs.rmdir with recursive option to fs.rm for directory removal (DEP0147) - [SlowBuffer to Buffer.allocUnsafeSlow](https://mintlify.wiki/nodejs/userland-migrations/recipes/slow-buffer-to-buffer-alloc-unsafe-slow.md): Migrate deprecated SlowBuffer constructor to Buffer.allocUnsafeSlow() for Node.js DEP0030 - [Node.js Timers Deprecations](https://mintlify.wiki/nodejs/userland-migrations/recipes/timers-deprecations.md): Migrate deprecated timer internals from node:timers to the supported public timers API - [tmpDir to tmpdir](https://mintlify.wiki/nodejs/userland-migrations/recipes/tmpdir-to-tmpdir.md): Migrate deprecated os.tmpDir() to os.tmpdir() for Node.js DEP0022 - [types.isNativeError to Error.isError](https://mintlify.wiki/nodejs/userland-migrations/recipes/types-is-native-error.md): Migrate deprecated types.isNativeError() to Error.isError() for Node.js DEP0197 - [util._extend to Object.assign](https://mintlify.wiki/nodejs/userland-migrations/recipes/util-extend-to-object-assign.md): Migrate deprecated util._extend() to Object.assign() for Node.js DEP0060 - [util.is*() Type Checks](https://mintlify.wiki/nodejs/userland-migrations/recipes/util-is.md): Migrate deprecated util.is*() methods to modern JavaScript type checking equivalents - [util.log to console.log](https://mintlify.wiki/nodejs/userland-migrations/recipes/util-log-to-console-log.md): Migrate deprecated util.log() to console.log() with timestamp for Node.js DEP0059 - [util Print Functions to console](https://mintlify.wiki/nodejs/userland-migrations/recipes/util-print-to-console-log.md): Migrate deprecated util.print(), util.puts(), util.debug(), and util.error() to console equivalents - [zlib.bytesRead to zlib.bytesWritten](https://mintlify.wiki/nodejs/userland-migrations/recipes/zlib-bytesread-to-byteswritten.md): Migrate deprecated zlib.bytesRead property to zlib.bytesWritten for Node.js DEP0108