mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
doc: add additional codemods for deprecation
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
8dc2bddbd5
commit
bed8e2aa74
@ -5189,6 +5189,12 @@ For code running using Node.js APIs, converting between base64-encoded strings
|
||||
and binary data should be performed using `Buffer.from(str, 'base64')` and
|
||||
`buf.toString('base64')`.**
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/buffer-atob-btoa
|
||||
```
|
||||
|
||||
### `buffer.btoa(data)`
|
||||
|
||||
<!-- YAML
|
||||
@ -5213,6 +5219,12 @@ For code running using Node.js APIs, converting between base64-encoded strings
|
||||
and binary data should be performed using `Buffer.from(str, 'base64')` and
|
||||
`buf.toString('base64')`.**
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/buffer-atob-btoa
|
||||
```
|
||||
|
||||
### `buffer.isAscii(input)`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
@ -1034,6 +1034,12 @@ Type: Runtime
|
||||
The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
|
||||
instead.
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/util-is
|
||||
```
|
||||
|
||||
### DEP0045: `util.isBoolean()`
|
||||
|
||||
<!-- YAML
|
||||
@ -2199,6 +2205,12 @@ Type: Runtime
|
||||
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
|
||||
and `crypto.getFips()` instead.
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-fips-to-getFips)).
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/crypto-fips-to-getFips
|
||||
```
|
||||
|
||||
### DEP0094: Using `assert.fail()` with more than one argument
|
||||
|
||||
<!-- YAML
|
||||
@ -2326,6 +2338,12 @@ Type: End-of-Life
|
||||
|
||||
This was never a documented feature.
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/createCredentials-to-createSecureContext)).
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/createCredentials-to-createSecureContext
|
||||
```
|
||||
|
||||
### DEP0101: `--with-lttng`
|
||||
|
||||
<!-- YAML
|
||||
@ -4049,6 +4067,12 @@ Instantiating classes without the `new` qualifier exported by the `node:repl` mo
|
||||
The `new` qualifier must be used instead. This applies to all REPL classes, including
|
||||
`REPLServer` and `Recoverable`.
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-classes-with-new)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/repl-classes-with-new
|
||||
```
|
||||
|
||||
<!-- md-lint skip-deprecation DEP0186 -->
|
||||
|
||||
### DEP0187: Passing invalid argument types to `fs.existsSync`
|
||||
|
||||
@ -274,7 +274,7 @@ added: v16.0.0
|
||||
|
||||
Global alias for [`buffer.atob()`][].
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/buffer-atob-btoa
|
||||
@ -298,6 +298,12 @@ added: v16.0.0
|
||||
|
||||
Global alias for [`buffer.btoa()`][].
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/buffer-atob-btoa)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/buffer-atob-btoa
|
||||
```
|
||||
|
||||
## `clearImmediate(immediateObject)`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
@ -698,6 +698,12 @@ deprecated:
|
||||
|
||||
A list of the names of some Node.js modules, e.g., `'http'`.
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/repl-builtin-modules)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/repl-builtin-modules
|
||||
```
|
||||
|
||||
## `repl.start([options])`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
@ -3797,6 +3797,12 @@ util.isArray({});
|
||||
// Returns: false
|
||||
```
|
||||
|
||||
An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)):
|
||||
|
||||
```bash
|
||||
npx codemod@latest @nodejs/util-is
|
||||
```
|
||||
|
||||
[Common System Errors]: errors.md#common-system-errors
|
||||
[Custom inspection functions on objects]: #custom-inspection-functions-on-objects
|
||||
[Custom promisified functions]: #custom-promisified-functions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user