Skip to content

Commit a533e5b

Browse files
AugustinMauroyRafaelGSS
authored andcommitted
doc: add automated migration info to deprecations
PR-URL: #60022 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 35f9b6b commit a533e5b

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

doc/api/deprecations.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ 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)):
555+
556+
```bash
557+
npx codemod@latest @nodejs/tmpDir-to-tmpdir
558+
```
559+
554560
### DEP0023: `os.getNetworkInterfaces()`
555561

556562
<!-- YAML
@@ -628,6 +634,12 @@ Type: End-of-Life
628634

629635
`util.print()` has been removed. Please use [`console.log()`][] instead.
630636

637+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)):
638+
639+
```bash
640+
npx codemod@latest @nodejs/util-print-to-console-log
641+
```
642+
631643
### DEP0027: `util.puts()`
632644

633645
<!-- YAML
@@ -649,6 +661,12 @@ Type: End-of-Life
649661

650662
`util.puts()` has been removed. Please use [`console.log()`][] instead.
651663

664+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)):
665+
666+
```bash
667+
npx codemod@latest @nodejs/util-print-to-console-log
668+
```
669+
652670
### DEP0028: `util.debug()`
653671

654672
<!-- YAML
@@ -670,6 +688,12 @@ Type: End-of-Life
670688

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

691+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-debug-to-console-error)):
692+
693+
```bash
694+
npx codemod@latest @nodejs/util-debug-to-console-error
695+
```
696+
673697
### DEP0029: `util.error()`
674698

675699
<!-- YAML
@@ -691,6 +715,12 @@ Type: End-of-Life
691715

692716
`util.error()` has been removed. Please use [`console.error()`][] instead.
693717

718+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)):
719+
720+
```bash
721+
npx codemod@latest @nodejs/util-print-to-console-log
722+
```
723+
694724
### DEP0030: `SlowBuffer`
695725

696726
<!-- YAML
@@ -1410,6 +1440,12 @@ By adopting one of these alternatives, you can transition away from `util.log()`
14101440
and choose a logging strategy that aligns with the specific
14111441
requirements and complexity of your application.
14121442

1443+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-log-to-console-log)):
1444+
1445+
```bash
1446+
npx codemod@latest @nodejs/util-log-to-console-log
1447+
```
1448+
14131449
### DEP0060: `util._extend()`
14141450

14151451
<!-- YAML
@@ -2729,6 +2765,12 @@ Type: End-of-Life
27292765

27302766
Use [`module.createRequire()`][] instead.
27312767

2768+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/create-require-from-path)):
2769+
2770+
```bash
2771+
npx codemod@latest @nodejs/create-require-from-path
2772+
```
2773+
27322774
### DEP0131: Legacy HTTP parser
27332775

27342776
<!-- YAML
@@ -2882,6 +2924,12 @@ modules is unsupported.
28822924
It is deprecated in favor of [`require.main`][], because it serves the same
28832925
purpose and is only available on CommonJS environment.
28842926

2927+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/process-main-module)):
2928+
2929+
```bash
2930+
npx codemod@latest @nodejs/process-main-module
2931+
```
2932+
28852933
### DEP0139: `process.umask()` with no arguments
28862934

28872935
<!-- YAML
@@ -3049,6 +3097,12 @@ Use `fs.rm(path, { recursive: true, force: true })`,
30493097
`fs.rmSync(path, { recursive: true, force: true })` or
30503098
`fs.promises.rm(path, { recursive: true, force: true })` instead.
30513099

3100+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/rmdir)):
3101+
3102+
```bash
3103+
npx codemod@latest @nodejs/rmdir
3104+
```
3105+
30523106
### DEP0148: Folder mappings in `"exports"` (trailing `"/"`)
30533107

30543108
<!-- YAML
@@ -3630,6 +3684,12 @@ Type: Runtime
36303684
`F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` are
36313685
deprecated. Get them from `fs.constants` or `fs.promises.constants` instead.
36323686

3687+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/fs-access-mode-constants)):
3688+
3689+
```bash
3690+
npx codemod@latest @nodejs/fs-access-mode-constants
3691+
```
3692+
36333693
### DEP0177: `util.types.isWebAssemblyCompiledModule`
36343694

36353695
<!-- YAML
@@ -3961,6 +4021,12 @@ Instantiating classes without the `new` qualifier exported by the `node:http` mo
39614021
It is recommended to use the `new` qualifier instead. This applies to all http classes, such as
39624022
`OutgoingMessage`, `IncomingMessage`, `ServerResponse` and `ClientRequest`.
39634023

4024+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/http-classes-with-new)):
4025+
4026+
```bash
4027+
npx codemod@latest @nodejs/http-classes-with-new
4028+
```
4029+
39644030
### DEP0196: Calling `node:child_process` functions with `options.shell` as an empty string
39654031

39664032
<!-- YAML
@@ -3998,6 +4064,12 @@ Type: Documentation-only
39984064

39994065
The [`util.types.isNativeError`][] API is deprecated. Please use [`Error.isError`][] instead.
40004066

4067+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/types-is-native-error)):
4068+
4069+
```bash
4070+
npx codemod@latest @nodejs/types-is-native-error
4071+
```
4072+
40014073
### DEP0198: Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLength`
40024074

40034075
<!-- YAML

0 commit comments

Comments
 (0)