Skip to content

Commit 6181e9d

Browse files
AugustinMauroyaduh95
authored andcommitted
doc: mention more codemods in deprecations.md
PR-URL: #60243 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
1 parent 534f249 commit 6181e9d

File tree

3 files changed

+141
-3
lines changed

3 files changed

+141
-3
lines changed

doc/api/deprecations.md

Lines changed: 123 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ Type: End-of-Life
551551
The `os.tmpDir()` API was deprecated in Node.js 7.0.0 and has since been
552552
removed. Please use [`os.tmpdir()`][] instead.
553553

554-
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/tmpDir-to-tmpdir)):
554+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/tmpdir-to-tmpdir)):
555555

556556
```bash
557557
npx codemod@latest @nodejs/tmpDir-to-tmpdir
@@ -688,10 +688,10 @@ Type: End-of-Life
688688

689689
`util.debug()` has been removed. Please use [`console.error()`][] instead.
690690

691-
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-debug-to-console-error)):
691+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)):
692692

693693
```bash
694-
npx codemod@latest @nodejs/util-debug-to-console-error
694+
npx codemod@latest @nodejs/util-print-to-console-log
695695
```
696696

697697
### DEP0029: `util.error()`
@@ -1055,6 +1055,12 @@ Type: End-of-Life
10551055
The `util.isBoolean()` API has been removed. Please use
10561056
`typeof arg === 'boolean'` instead.
10571057

1058+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1059+
1060+
```bash
1061+
npx codemod@latest @nodejs/util-is
1062+
```
1063+
10581064
### DEP0046: `util.isBuffer()`
10591065

10601066
<!-- YAML
@@ -1082,6 +1088,12 @@ Type: End-of-Life
10821088
The `util.isBuffer()` API has been removed. Please use
10831089
[`Buffer.isBuffer()`][] instead.
10841090

1091+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1092+
1093+
```bash
1094+
npx codemod@latest @nodejs/util-is
1095+
```
1096+
10851097
### DEP0047: `util.isDate()`
10861098

10871099
<!-- YAML
@@ -1113,6 +1125,12 @@ Also for stronger approaches, consider using:
11131125
`Date.prototype.toString.call(arg) === '[object Date]' && !isNaN(arg)`.
11141126
This can also be used in a `try/catch` block to handle invalid date objects.
11151127

1128+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1129+
1130+
```bash
1131+
npx codemod@latest @nodejs/util-is
1132+
```
1133+
11161134
### DEP0048: `util.isError()`
11171135

11181136
<!-- YAML
@@ -1139,6 +1157,12 @@ Type: End-of-Life
11391157

11401158
The `util.isError()` API has been removed. Please use `Error.isError(arg)`.
11411159

1160+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1161+
1162+
```bash
1163+
npx codemod@latest @nodejs/util-is
1164+
```
1165+
11421166
### DEP0049: `util.isFunction()`
11431167

11441168
<!-- YAML
@@ -1166,6 +1190,12 @@ Type: End-of-Life
11661190
The `util.isFunction()` API has been removed. Please use
11671191
`typeof arg === 'function'` instead.
11681192

1193+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1194+
1195+
```bash
1196+
npx codemod@latest @nodejs/util-is
1197+
```
1198+
11691199
### DEP0050: `util.isNull()`
11701200

11711201
<!-- YAML
@@ -1193,6 +1223,12 @@ Type: End-of-Life
11931223
The `util.isNull()` API has been removed. Please use
11941224
`arg === null` instead.
11951225

1226+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1227+
1228+
```bash
1229+
npx codemod@latest @nodejs/util-is
1230+
```
1231+
11961232
### DEP0051: `util.isNullOrUndefined()`
11971233

11981234
<!-- YAML
@@ -1220,6 +1256,12 @@ Type: End-of-Life
12201256
The `util.isNullOrUndefined()` API has been removed. Please use
12211257
`arg === null || arg === undefined` instead.
12221258

1259+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1260+
1261+
```bash
1262+
npx codemod@latest @nodejs/util-is
1263+
```
1264+
12231265
### DEP0052: `util.isNumber()`
12241266

12251267
<!-- YAML
@@ -1247,6 +1289,12 @@ Type: End-of-Life
12471289
The `util.isNumber()` API has been removed. Please use
12481290
`typeof arg === 'number'` instead.
12491291

1292+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1293+
1294+
```bash
1295+
npx codemod@latest @nodejs/util-is
1296+
```
1297+
12501298
### DEP0053: `util.isObject()`
12511299

12521300
<!-- YAML
@@ -1274,6 +1322,12 @@ Type: End-of-Life
12741322
The `util.isObject()` API has been removed. Please use
12751323
`arg && typeof arg === 'object'` instead.
12761324

1325+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1326+
1327+
```bash
1328+
npx codemod@latest @nodejs/util-is
1329+
```
1330+
12771331
### DEP0054: `util.isPrimitive()`
12781332

12791333
<!-- YAML
@@ -1300,6 +1354,12 @@ Type: End-of-Life
13001354

13011355
The `util.isPrimitive()` API has been removed. Please use `Object(arg) !== arg` instead.
13021356

1357+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1358+
1359+
```bash
1360+
npx codemod@latest @nodejs/util-is
1361+
```
1362+
13031363
### DEP0055: `util.isRegExp()`
13041364

13051365
<!-- YAML
@@ -1327,6 +1387,12 @@ Type: End-of-Life
13271387
The `util.isRegExp()` API has been removed. Please use
13281388
`arg instanceof RegExp` instead.
13291389

1390+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1391+
1392+
```bash
1393+
npx codemod@latest @nodejs/util-is
1394+
```
1395+
13301396
### DEP0056: `util.isString()`
13311397

13321398
<!-- YAML
@@ -1354,6 +1420,12 @@ Type: End-of-Life
13541420
The `util.isString()` API has been removed. Please use
13551421
`typeof arg === 'string'` instead.
13561422

1423+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1424+
1425+
```bash
1426+
npx codemod@latest @nodejs/util-is
1427+
```
1428+
13571429
### DEP0057: `util.isSymbol()`
13581430

13591431
<!-- YAML
@@ -1381,6 +1453,12 @@ Type: End-of-Life
13811453
The `util.isSymbol()` API has been removed. Please use
13821454
`typeof arg === 'symbol'` instead.
13831455

1456+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1457+
1458+
```bash
1459+
npx codemod@latest @nodejs/util-is
1460+
```
1461+
13841462
### DEP0058: `util.isUndefined()`
13851463

13861464
<!-- YAML
@@ -1408,6 +1486,12 @@ Type: End-of-Life
14081486
The `util.isUndefined()` API has been removed. Please use
14091487
`arg === undefined` instead.
14101488

1489+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1490+
1491+
```bash
1492+
npx codemod@latest @nodejs/util-is
1493+
```
1494+
14111495
### DEP0059: `util.log()`
14121496

14131497
<!-- YAML
@@ -1885,6 +1969,12 @@ Type: End-of-Life
18851969
deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with
18861970
file descriptors.
18871971

1972+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/fs-truncate-fd-deprecation)):
1973+
1974+
```bash
1975+
npx codemod@latest @nodejs/fs-truncate-fd-deprecation
1976+
```
1977+
18881978
### DEP0082: `REPLServer.prototype.memory()`
18891979

18901980
<!-- YAML
@@ -2366,6 +2456,12 @@ because it also made sense to interpret the value as the number of bytes
23662456
read by the engine, but is inconsistent with other streams in Node.js that
23672457
expose values under these names.
23682458

2459+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/zlib-bytesread-to-byteswritten)):
2460+
2461+
```bash
2462+
npx codemod@latest @nodejs/zlib-bytesread-to-byteswritten
2463+
```
2464+
23692465
### DEP0109: `http`, `https`, and `tls` support for invalid URLs
23702466

23712467
<!-- YAML
@@ -2521,6 +2617,12 @@ The [legacy URL API][] is deprecated. This includes [`url.format()`][],
25212617
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
25222618
use the [WHATWG URL API][] instead.
25232619

2620+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
2621+
2622+
```bash
2623+
npx codemod@latest @nodejs/node-url-to-whatwg-url
2624+
```
2625+
25242626
### DEP0117: Native crypto handles
25252627

25262628
<!-- YAML
@@ -2994,6 +3096,12 @@ The `node:repl` module exports a `_builtinLibs` property that contains an array
29943096
of built-in modules. It was incomplete so far and instead it's better to rely
29953097
upon `require('node:module').builtinModules`.
29963098

3099+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
3100+
3101+
```bash
3102+
npx codemod@latest @nodejs/repl-builtin-modules
3103+
```
3104+
29973105
### DEP0143: `Transform._transformState`
29983106

29993107
<!-- YAML
@@ -3238,6 +3346,12 @@ Type: Runtime
32383346
The `'hash'` and `'mgf1Hash'` options are replaced with `'hashAlgorithm'`
32393347
and `'mgf1HashAlgorithm'`.
32403348

3349+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-rsa-pss-update)):
3350+
3351+
```bash
3352+
npx codemod@latest @nodejs/crypto-rsa-pss-update
3353+
```
3354+
32413355
### DEP0155: Trailing slashes in pattern specifier resolutions
32423356

32433357
<!-- YAML
@@ -3961,6 +4075,12 @@ of built-in modules. This was incomplete and matched the already deprecated
39614075
`repl._builtinLibs` ([DEP0142][]) instead it's better to rely
39624076
upon `require('node:module').builtinModules`.
39634077

4078+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
4079+
4080+
```bash
4081+
npx codemod@latest @nodejs/repl-builtin-modules
4082+
```
4083+
39644084
### DEP0192: `require('node:_tls_common')` and `require('node:_tls_wrap')`
39654085

39664086
<!-- YAML

doc/api/globals.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ added: v16.0.0
274274
275275
Global alias for [`buffer.atob()`][].
276276

277+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
278+
279+
```bash
280+
npx codemod@latest @nodejs/buffer-atob-btoa
281+
```
282+
277283
## Class: `BroadcastChannel`
278284

279285
<!-- YAML

doc/api/url.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,12 @@ The formatting process operates as follows:
17881788
string, an [`Error`][] is thrown.
17891789
* `result` is returned.
17901790
1791+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
1792+
1793+
```bash
1794+
npx codemod@latest @nodejs/node-url-to-whatwg-url
1795+
```
1796+
17911797
### `url.parse(urlString[, parseQueryString[, slashesDenoteHost]])`
17921798
17931799
<!-- YAML
@@ -1861,6 +1867,12 @@ function getURL(req) {
18611867
}
18621868
```
18631869
1870+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
1871+
1872+
```bash
1873+
npx codemod@latest @nodejs/node-url-to-whatwg-url
1874+
```
1875+
18641876
### `url.resolve(from, to)`
18651877
18661878
<!-- YAML

0 commit comments

Comments
 (0)