doc: mention more codemods in deprecations.md

PR-URL: https://github.com/nodejs/node/pull/60243
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
This commit is contained in:
Augustin Mauroy 2025-10-27 14:54:31 +01:00 committed by GitHub
parent 3c8c1efe1e
commit b9de5d0cb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 141 additions and 3 deletions

View File

@ -551,7 +551,7 @@ Type: End-of-Life
The `os.tmpDir()` API was deprecated in Node.js 7.0.0 and has since been
removed. Please use [`os.tmpdir()`][] instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/tmpDir-to-tmpdir)):
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/tmpdir-to-tmpdir)):
```bash
npx codemod@latest @nodejs/tmpDir-to-tmpdir
@ -688,10 +688,10 @@ Type: End-of-Life
`util.debug()` has been removed. Please use [`console.error()`][] instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-debug-to-console-error)):
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)):
```bash
npx codemod@latest @nodejs/util-debug-to-console-error
npx codemod@latest @nodejs/util-print-to-console-log
```
### DEP0029: `util.error()`
@ -1061,6 +1061,12 @@ Type: End-of-Life
The `util.isBoolean()` API has been removed. Please use
`typeof arg === 'boolean'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0046: `util.isBuffer()`
<!-- YAML
@ -1088,6 +1094,12 @@ Type: End-of-Life
The `util.isBuffer()` API has been removed. Please use
[`Buffer.isBuffer()`][] instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0047: `util.isDate()`
<!-- YAML
@ -1119,6 +1131,12 @@ Also for stronger approaches, consider using:
`Date.prototype.toString.call(arg) === '[object Date]' && !isNaN(arg)`.
This can also be used in a `try/catch` block to handle invalid date objects.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0048: `util.isError()`
<!-- YAML
@ -1145,6 +1163,12 @@ Type: End-of-Life
The `util.isError()` API has been removed. Please use `Error.isError(arg)`.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0049: `util.isFunction()`
<!-- YAML
@ -1172,6 +1196,12 @@ Type: End-of-Life
The `util.isFunction()` API has been removed. Please use
`typeof arg === 'function'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0050: `util.isNull()`
<!-- YAML
@ -1199,6 +1229,12 @@ Type: End-of-Life
The `util.isNull()` API has been removed. Please use
`arg === null` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0051: `util.isNullOrUndefined()`
<!-- YAML
@ -1226,6 +1262,12 @@ Type: End-of-Life
The `util.isNullOrUndefined()` API has been removed. Please use
`arg === null || arg === undefined` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0052: `util.isNumber()`
<!-- YAML
@ -1253,6 +1295,12 @@ Type: End-of-Life
The `util.isNumber()` API has been removed. Please use
`typeof arg === 'number'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0053: `util.isObject()`
<!-- YAML
@ -1280,6 +1328,12 @@ Type: End-of-Life
The `util.isObject()` API has been removed. Please use
`arg && typeof arg === 'object'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0054: `util.isPrimitive()`
<!-- YAML
@ -1306,6 +1360,12 @@ Type: End-of-Life
The `util.isPrimitive()` API has been removed. Please use `Object(arg) !== arg` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0055: `util.isRegExp()`
<!-- YAML
@ -1333,6 +1393,12 @@ Type: End-of-Life
The `util.isRegExp()` API has been removed. Please use
`arg instanceof RegExp` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0056: `util.isString()`
<!-- YAML
@ -1360,6 +1426,12 @@ Type: End-of-Life
The `util.isString()` API has been removed. Please use
`typeof arg === 'string'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0057: `util.isSymbol()`
<!-- YAML
@ -1387,6 +1459,12 @@ Type: End-of-Life
The `util.isSymbol()` API has been removed. Please use
`typeof arg === 'symbol'` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0058: `util.isUndefined()`
<!-- YAML
@ -1414,6 +1492,12 @@ Type: End-of-Life
The `util.isUndefined()` API has been removed. Please use
`arg === undefined` instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/util-is
```
### DEP0059: `util.log()`
<!-- YAML
@ -1897,6 +1981,12 @@ Type: End-of-Life
deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with
file descriptors.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/fs-truncate-fd-deprecation)):
```bash
npx codemod@latest @nodejs/fs-truncate-fd-deprecation
```
### DEP0082: `REPLServer.prototype.memory()`
<!-- YAML
@ -2381,6 +2471,12 @@ because it also made sense to interpret the value as the number of bytes
read by the engine, but is inconsistent with other streams in Node.js that
expose values under these names.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/zlib-bytesread-to-byteswritten)):
```bash
npx codemod@latest @nodejs/zlib-bytesread-to-byteswritten
```
### DEP0109: `http`, `https`, and `tls` support for invalid URLs
<!-- YAML
@ -2539,6 +2635,12 @@ The [legacy URL API][] is deprecated. This includes [`url.format()`][],
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
use the [WHATWG URL API][] instead.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
```bash
npx codemod@latest @nodejs/node-url-to-whatwg-url
```
### DEP0117: Native crypto handles
<!-- YAML
@ -3027,6 +3129,12 @@ The `node:repl` module exports a `_builtinLibs` property that contains an array
of built-in modules. It was incomplete so far and instead it's better to rely
upon `require('node:module').builtinModules`.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
```bash
npx codemod@latest @nodejs/repl-builtin-modules
```
### DEP0143: `Transform._transformState`
<!-- YAML
@ -3279,6 +3387,12 @@ Type: End-of-Life
Use `'hashAlgorithm'` instead of `'hash'`, and `'mgf1HashAlgorithm'` instead of `'mgf1Hash'`.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-rsa-pss-update)):
```bash
npx codemod@latest @nodejs/crypto-rsa-pss-update
```
### DEP0155: Trailing slashes in pattern specifier resolutions
<!-- YAML
@ -4023,6 +4137,12 @@ of built-in modules. This was incomplete and matched the already deprecated
`repl._builtinLibs` ([DEP0142][]) instead it's better to rely
upon `require('node:module').builtinModules`.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
```bash
npx codemod@latest @nodejs/repl-builtin-modules
```
### DEP0192: `require('node:_tls_common')` and `require('node:_tls_wrap')`
<!-- YAML

View File

@ -274,6 +274,12 @@ added: v16.0.0
Global alias for [`buffer.atob()`][].
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
```bash
npx codemod@latest @nodejs/buffer-atob-btoa
```
## Class: `BroadcastChannel`
<!-- YAML

View File

@ -1794,6 +1794,12 @@ The formatting process operates as follows:
string, an [`Error`][] is thrown.
* `result` is returned.
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
```bash
npx codemod@latest @nodejs/node-url-to-whatwg-url
```
### `url.parse(urlString[, parseQueryString[, slashesDenoteHost]])`
<!-- YAML
@ -1867,6 +1873,12 @@ function getURL(req) {
}
```
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
```bash
npx codemod@latest @nodejs/node-url-to-whatwg-url
```
### `url.resolve(from, to)`
<!-- YAML