Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4013,6 +4013,20 @@ To make [`child_process.exec`][] invoke the default shell, either omit the
`shell` option, or set it to a nullish value. If the intention is not to invoke
a shell, use [`child_process.execFile`][] instead.

### DEP0197: `util.types.isNativeError()`

<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/58262
description: Documentation-only deprecation.
-->

Type: Documentation-only

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

[DEP0142]: #dep0142-repl_builtinlibs
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
Expand All @@ -4031,6 +4045,7 @@ a shell, use [`child_process.execFile`][] instead.
[`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj
[`Cipheriv`]: crypto.md#class-cipheriv
[`Decipheriv`]: crypto.md#class-decipheriv
[`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
[`ReadStream.open()`]: fs.md#class-fsreadstream
[`Server.getConnections()`]: net.md#servergetconnectionscallback
Expand Down Expand Up @@ -4143,6 +4158,7 @@ a shell, use [`child_process.execFile`][] instead.
[`util.isArray()`]: util.md#utilisarrayobject
[`util.promisify`]: util.md#utilpromisifyoriginal
[`util.toUSVString()`]: util.md#utiltousvstringstring
[`util.types.isNativeError`]: util.md#utiltypesisnativeerrorvalue
[`util.types`]: util.md#utiltypes
[`util`]: util.md
[`worker.exitedAfterDisconnect`]: cluster.md#workerexitedafterdisconnect
Expand Down
7 changes: 7 additions & 0 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -3328,8 +3328,14 @@ util.types.isModuleNamespaceObject(ns); // Returns true

<!-- YAML
added: v10.0.0
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated: Use [`Error.isError`][] instead.

**Note:** As of Node.js v24, `Error.isError()` is currently slower than `util.types.isNativeError()`.
If performance is critical, consider benchmarking both in your environment.

* `value` {any}
* Returns: {boolean}

Expand Down Expand Up @@ -3716,6 +3722,7 @@ util.isArray({});
[`'warning'`]: process.md#event-warning
[`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
[`ArrayBuffer.isView()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
[`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
[`MIMEparams`]: #class-utilmimeparams
[`Object.assign()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
Expand Down
Loading