Skip to content

Commit 425a187

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 ae4858c commit 425a187

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()`
@@ -1061,6 +1061,12 @@ Type: End-of-Life
10611061
The `util.isBoolean()` API has been removed. Please use
10621062
`typeof arg === 'boolean'` instead.
10631063

1064+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1065+
1066+
```bash
1067+
npx codemod@latest @nodejs/util-is
1068+
```
1069+
10641070
### DEP0046: `util.isBuffer()`
10651071

10661072
<!-- YAML
@@ -1088,6 +1094,12 @@ Type: End-of-Life
10881094
The `util.isBuffer()` API has been removed. Please use
10891095
[`Buffer.isBuffer()`][] instead.
10901096

1097+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1098+
1099+
```bash
1100+
npx codemod@latest @nodejs/util-is
1101+
```
1102+
10911103
### DEP0047: `util.isDate()`
10921104

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

1134+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1135+
1136+
```bash
1137+
npx codemod@latest @nodejs/util-is
1138+
```
1139+
11221140
### DEP0048: `util.isError()`
11231141

11241142
<!-- YAML
@@ -1145,6 +1163,12 @@ Type: End-of-Life
11451163

11461164
The `util.isError()` API has been removed. Please use `Error.isError(arg)`.
11471165

1166+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1167+
1168+
```bash
1169+
npx codemod@latest @nodejs/util-is
1170+
```
1171+
11481172
### DEP0049: `util.isFunction()`
11491173

11501174
<!-- YAML
@@ -1172,6 +1196,12 @@ Type: End-of-Life
11721196
The `util.isFunction()` API has been removed. Please use
11731197
`typeof arg === 'function'` instead.
11741198

1199+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1200+
1201+
```bash
1202+
npx codemod@latest @nodejs/util-is
1203+
```
1204+
11751205
### DEP0050: `util.isNull()`
11761206

11771207
<!-- YAML
@@ -1199,6 +1229,12 @@ Type: End-of-Life
11991229
The `util.isNull()` API has been removed. Please use
12001230
`arg === null` instead.
12011231

1232+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1233+
1234+
```bash
1235+
npx codemod@latest @nodejs/util-is
1236+
```
1237+
12021238
### DEP0051: `util.isNullOrUndefined()`
12031239

12041240
<!-- YAML
@@ -1226,6 +1262,12 @@ Type: End-of-Life
12261262
The `util.isNullOrUndefined()` API has been removed. Please use
12271263
`arg === null || arg === undefined` instead.
12281264

1265+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1266+
1267+
```bash
1268+
npx codemod@latest @nodejs/util-is
1269+
```
1270+
12291271
### DEP0052: `util.isNumber()`
12301272

12311273
<!-- YAML
@@ -1253,6 +1295,12 @@ Type: End-of-Life
12531295
The `util.isNumber()` API has been removed. Please use
12541296
`typeof arg === 'number'` instead.
12551297

1298+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1299+
1300+
```bash
1301+
npx codemod@latest @nodejs/util-is
1302+
```
1303+
12561304
### DEP0053: `util.isObject()`
12571305

12581306
<!-- YAML
@@ -1280,6 +1328,12 @@ Type: End-of-Life
12801328
The `util.isObject()` API has been removed. Please use
12811329
`arg && typeof arg === 'object'` instead.
12821330

1331+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1332+
1333+
```bash
1334+
npx codemod@latest @nodejs/util-is
1335+
```
1336+
12831337
### DEP0054: `util.isPrimitive()`
12841338

12851339
<!-- YAML
@@ -1306,6 +1360,12 @@ Type: End-of-Life
13061360

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

1363+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1364+
1365+
```bash
1366+
npx codemod@latest @nodejs/util-is
1367+
```
1368+
13091369
### DEP0055: `util.isRegExp()`
13101370

13111371
<!-- YAML
@@ -1333,6 +1393,12 @@ Type: End-of-Life
13331393
The `util.isRegExp()` API has been removed. Please use
13341394
`arg instanceof RegExp` instead.
13351395

1396+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1397+
1398+
```bash
1399+
npx codemod@latest @nodejs/util-is
1400+
```
1401+
13361402
### DEP0056: `util.isString()`
13371403

13381404
<!-- YAML
@@ -1360,6 +1426,12 @@ Type: End-of-Life
13601426
The `util.isString()` API has been removed. Please use
13611427
`typeof arg === 'string'` instead.
13621428

1429+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1430+
1431+
```bash
1432+
npx codemod@latest @nodejs/util-is
1433+
```
1434+
13631435
### DEP0057: `util.isSymbol()`
13641436

13651437
<!-- YAML
@@ -1387,6 +1459,12 @@ Type: End-of-Life
13871459
The `util.isSymbol()` API has been removed. Please use
13881460
`typeof arg === 'symbol'` instead.
13891461

1462+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1463+
1464+
```bash
1465+
npx codemod@latest @nodejs/util-is
1466+
```
1467+
13901468
### DEP0058: `util.isUndefined()`
13911469

13921470
<!-- YAML
@@ -1414,6 +1492,12 @@ Type: End-of-Life
14141492
The `util.isUndefined()` API has been removed. Please use
14151493
`arg === undefined` instead.
14161494

1495+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1496+
1497+
```bash
1498+
npx codemod@latest @nodejs/util-is
1499+
```
1500+
14171501
### DEP0059: `util.log()`
14181502

14191503
<!-- YAML
@@ -1897,6 +1981,12 @@ Type: End-of-Life
18971981
deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with
18981982
file descriptors.
18991983

1984+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/fs-truncate-fd-deprecation)):
1985+
1986+
```bash
1987+
npx codemod@latest @nodejs/fs-truncate-fd-deprecation
1988+
```
1989+
19001990
### DEP0082: `REPLServer.prototype.memory()`
19011991

19021992
<!-- YAML
@@ -2381,6 +2471,12 @@ because it also made sense to interpret the value as the number of bytes
23812471
read by the engine, but is inconsistent with other streams in Node.js that
23822472
expose values under these names.
23832473

2474+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/zlib-bytesread-to-byteswritten)):
2475+
2476+
```bash
2477+
npx codemod@latest @nodejs/zlib-bytesread-to-byteswritten
2478+
```
2479+
23842480
### DEP0109: `http`, `https`, and `tls` support for invalid URLs
23852481

23862482
<!-- YAML
@@ -2539,6 +2635,12 @@ The [legacy URL API][] is deprecated. This includes [`url.format()`][],
25392635
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
25402636
use the [WHATWG URL API][] instead.
25412637

2638+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
2639+
2640+
```bash
2641+
npx codemod@latest @nodejs/node-url-to-whatwg-url
2642+
```
2643+
25422644
### DEP0117: Native crypto handles
25432645

25442646
<!-- YAML
@@ -3027,6 +3129,12 @@ The `node:repl` module exports a `_builtinLibs` property that contains an array
30273129
of built-in modules. It was incomplete so far and instead it's better to rely
30283130
upon `require('node:module').builtinModules`.
30293131

3132+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
3133+
3134+
```bash
3135+
npx codemod@latest @nodejs/repl-builtin-modules
3136+
```
3137+
30303138
### DEP0143: `Transform._transformState`
30313139

30323140
<!-- YAML
@@ -3279,6 +3387,12 @@ Type: End-of-Life
32793387

32803388
Use `'hashAlgorithm'` instead of `'hash'`, and `'mgf1HashAlgorithm'` instead of `'mgf1Hash'`.
32813389

3390+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-rsa-pss-update)):
3391+
3392+
```bash
3393+
npx codemod@latest @nodejs/crypto-rsa-pss-update
3394+
```
3395+
32823396
### DEP0155: Trailing slashes in pattern specifier resolutions
32833397

32843398
<!-- YAML
@@ -4023,6 +4137,12 @@ of built-in modules. This was incomplete and matched the already deprecated
40234137
`repl._builtinLibs` ([DEP0142][]) instead it's better to rely
40244138
upon `require('node:module').builtinModules`.
40254139

4140+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
4141+
4142+
```bash
4143+
npx codemod@latest @nodejs/repl-builtin-modules
4144+
```
4145+
40264146
### DEP0192: `require('node:_tls_common')` and `require('node:_tls_wrap')`
40274147

40284148
<!-- 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
@@ -1794,6 +1794,12 @@ The formatting process operates as follows:
17941794
string, an [`Error`][] is thrown.
17951795
* `result` is returned.
17961796
1797+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
1798+
1799+
```bash
1800+
npx codemod@latest @nodejs/node-url-to-whatwg-url
1801+
```
1802+
17971803
### `url.parse(urlString[, parseQueryString[, slashesDenoteHost]])`
17981804
17991805
<!-- YAML
@@ -1867,6 +1873,12 @@ function getURL(req) {
18671873
}
18681874
```
18691875
1876+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/node-url-to-whatwg-url)).
1877+
1878+
```bash
1879+
npx codemod@latest @nodejs/node-url-to-whatwg-url
1880+
```
1881+
18701882
### `url.resolve(from, to)`
18711883
18721884
<!-- YAML

0 commit comments

Comments
 (0)