Skip to content

Commit bc82a84

Browse files
doc: add additional codemods for deprecation
1 parent 45eeb6f commit bc82a84

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
@@ -2199,6 +2205,12 @@ Type: Runtime
21992205
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
22002206
and `crypto.getFips()` instead.
22012207

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

22042216
<!-- YAML
@@ -2326,6 +2338,12 @@ Type: End-of-Life
23262338

23272339
This was never a documented feature.
23282340

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

23312349
<!-- YAML
@@ -4049,6 +4067,12 @@ Instantiating classes without the `new` qualifier exported by the `node:repl` mo
40494067
The `new` qualifier must be used instead. This applies to all REPL classes, including
40504068
`REPLServer` and `Recoverable`.
40514069

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

40544078
### 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
@@ -3797,6 +3797,12 @@ util.isArray({});
37973797
// Returns: false
37983798
```
37993799
3800+
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
3801+
3802+
```bash
3803+
npx codemod@latest @nodejs/util-is
3804+
```
3805+
38003806
[Common System Errors]: errors.md#common-system-errors
38013807
[Custom inspection functions on objects]: #custom-inspection-functions-on-objects
38023808
[Custom promisified functions]: #custom-promisified-functions

0 commit comments

Comments
 (0)