Skip to content

Commit 2799f59

Browse files
AugustinMauroyRafaelGSS
authored andcommitted
doc: add additional codemods for deprecation
PR-URL: #60811 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 3127a2b commit 2799f59

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

doc/api/buffer.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5189,6 +5189,12 @@ For code running using Node.js APIs, converting between base64-encoded strings
51895189
and binary data should be performed using `Buffer.from(str, 'base64')` and
51905190
`buf.toString('base64')`.**
51915191

5192+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa):
5193+
5194+
```bash
5195+
npx codemod@latest @nodejs/buffer-atob-btoa
5196+
```
5197+
51925198
### `buffer.btoa(data)`
51935199

51945200
<!-- YAML
@@ -5213,6 +5219,12 @@ For code running using Node.js APIs, converting between base64-encoded strings
52135219
and binary data should be performed using `Buffer.from(str, 'base64')` and
52145220
`buf.toString('base64')`.**
52155221

5222+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa):
5223+
5224+
```bash
5225+
npx codemod@latest @nodejs/buffer-atob-btoa
5226+
```
5227+
52165228
### `buffer.isAscii(input)`
52175229

52185230
<!-- YAML

doc/api/deprecations.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,12 @@ Type: Runtime
10341034
The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
10351035
instead.
10361036

1037+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
1038+
1039+
```bash
1040+
npx codemod@latest @nodejs/util-is
1041+
```
1042+
10371043
### DEP0045: `util.isBoolean()`
10381044

10391045
<!-- YAML
@@ -2196,6 +2202,12 @@ Type: Runtime
21962202
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
21972203
and `crypto.getFips()` instead.
21982204

2205+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-fips-to-getFips)).
2206+
2207+
```bash
2208+
npx codemod@latest @nodejs/crypto-fips-to-getFips
2209+
```
2210+
21992211
### DEP0094: Using `assert.fail()` with more than one argument
22002212

22012213
<!-- YAML
@@ -2323,6 +2335,12 @@ Type: End-of-Life
23232335

23242336
This was never a documented feature.
23252337

2338+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/createCredentials-to-createSecureContext)).
2339+
2340+
```bash
2341+
npx codemod@latest @nodejs/createCredentials-to-createSecureContext
2342+
```
2343+
23262344
### DEP0101: `--with-lttng`
23272345

23282346
<!-- YAML
@@ -4046,6 +4064,12 @@ Instantiating classes without the `new` qualifier exported by the `node:repl` mo
40464064
The `new` qualifier must be used instead. This applies to all REPL classes, including
40474065
`REPLServer` and `Recoverable`.
40484066

4067+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-classes-with-new)):
4068+
4069+
```bash
4070+
npx codemod@latest @nodejs/repl-classes-with-new
4071+
```
4072+
40494073
<!-- md-lint skip-deprecation DEP0186 -->
40504074

40514075
### DEP0187: Passing invalid argument types to `fs.existsSync`

doc/api/globals.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ 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)):
277+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa)):
278278

279279
```bash
280280
npx codemod@latest @nodejs/buffer-atob-btoa
@@ -298,6 +298,12 @@ added: v16.0.0
298298
299299
Global alias for [`buffer.btoa()`][].
300300

301+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa)):
302+
303+
```bash
304+
npx codemod@latest @nodejs/buffer-atob-btoa
305+
```
306+
301307
## `clearImmediate(immediateObject)`
302308

303309
<!-- YAML

doc/api/repl.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,12 @@ deprecated:
698698

699699
A list of the names of some Node.js modules, e.g., `'http'`.
700700

701+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
702+
703+
```bash
704+
npx codemod@latest @nodejs/repl-builtin-modules
705+
```
706+
701707
## `repl.start([options])`
702708

703709
<!-- YAML

doc/api/util.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3795,6 +3795,12 @@ util.isArray({});
37953795
// Returns: false
37963796
```
37973797
3798+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
3799+
3800+
```bash
3801+
npx codemod@latest @nodejs/util-is
3802+
```
3803+
37983804
[Common System Errors]: errors.md#common-system-errors
37993805
[Custom inspection functions on objects]: #custom-inspection-functions-on-objects
38003806
[Custom promisified functions]: #custom-promisified-functions

0 commit comments

Comments
 (0)