Compared with 17.0.45: `child_process:ExecFileOptionsWithOtherEncoding`, `child_process:ExecFileException`, `crypto:fips`, `crypto:BinaryToTextEncoding`, `crypto:CharacterEncoding`, and 21 more. 15 newly deprecated.
@types/node 17.0.45 → 26.6.5: deprecates 26 API(s): from its source to your code
crypto:RsaPrivateKey: This type will be removed in a future version.
fs:lchmod: Changes the permissions on a symbolic link. No arguments other than a possible exception are given to the completion callback. This method is only implemented on macOS. See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. Since v0.4.7
fs:lchmodSync: Changes the permissions on a symbolic link. Returns `undefined`. This method is only implemented on macOS. See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. Since v0.4.7
fs:exists: Test whether or not the given path exists by checking with the file system. Then call the `callback` argument with either true or false: ```js import { exists } from 'node:fs'; exists('/etc/passwd', (e) => { console.log(e ? 'it exists' : 'no passwd!'); }); ``` **The parameters for this callback are not consistent with other Node.js** **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback has only one boolean parameter. This is one reason `fs.access()` is recommended instead of `fs.exists()`.
fs:StatSyncFn: This orphaned interface will be removed in a future version.
fs:RmDirOptions: `rmdir()` no longer provides any options. This interface will be removed in a future version.
fs:StatSyncOptions: This orphaned interface will be removed in a future version. Use `StatOptions` instead.
fs/promises:lchmod: Changes the permissions on a symbolic link. This method is only implemented on macOS. Since v10.0.0
fs/promises:FileReadOptions: This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead.
punycode:ucs2: since v7.0.0 The version of the punycode module bundled in Node.js is being deprecated. In a future major version of Node.js this module will be removed. Users currently depending on the punycode module should switch to using the userland-provided Punycode.js module instead.
punycode:version: since v7.0.0 The version of the punycode module bundled in Node.js is being deprecated. In a future major version of Node.js this module will be removed. Users currently depending on the punycode module should switch to using the userland-provided Punycode.js module instead.
readline:ReadLine: This alias will be removed in a future version. Use `import { Interface } from 'node:readline'` instead.
url:parse: The `url.parse()` method takes a URL string, parses it, and returns a URL object. A `TypeError` is thrown if `urlString` is not a string. A `URIError` is thrown if the `auth` property is present but cannot be decoded. `url.parse()` uses a lenient, non-standard algorithm for parsing URL strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted input. CVEs are not issued for `url.parse()` vulnerabilities. Use the [WHATWG URL](https://nodejs.org/docs/latest-v26.x/api/url.h
url:format: The `url.format()` method returns a formatted URL string derived from `urlObject`. ```js import url from 'node:url'; url.format({ protocol: 'https', hostname: 'example.com', pathname: '/some/path', query: { page: 1, format: 'json', }, }); // => 'https://example.com/some/path?page=1&format=json' ``` If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. The formatting process operates as follows: * A new empty string `result` is created. * If `urlObject.protocol` is a string, it is appended as-is to `result`. * Otherwise, if `urlObject.protocol` is not `undef
url:resolve: The `url.resolve()` method resolves a target URL relative to a base URL in a manner similar to that of a web browser resolving an anchor tag. ```js import url from 'node:url'; url.resolve('/one/two/three', 'four'); // '/one/two/four' url.resolve('http://example.com/', '/one'); // 'http://example.com/one' url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' ``` Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. To achieve the same result using the WHATWG URL API: ```js function resolve(from, to) { const resolvedUrl = new URL(t
util:isArray: Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isArray([]); // Returns: true util.isArray(new Array()); // Returns: true util.isArray({}); // Returns: false ``` Since v4.0.0 - Use `isArray` instead.
util/types:isNativeError: Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). ```js console.log(util.types.isNativeError(new Error())); // true console.log(util.types.isNativeError(new TypeError())); // true console.log(util.types.isNativeError(new RangeError())); // true ``` Subclasses of the native error types are also native errors: ```js class MyError extends Error {} console.log(util.types.isNativeError(new MyError())); // true ``` A value being `instanceof` a native error class is not equivalent to `isNativeError()` returning `true`