@types/node
Advanced tools
Comparing version 22.0.3 to 22.1.0
@@ -84,6 +84,16 @@ /** | ||
/** | ||
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted | ||
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 | ||
* addresses before IPv4 addresses. Default value is configurable using | ||
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). | ||
* @default `verbatim` (addresses are not reordered) | ||
* @since v22.1.0 | ||
*/ | ||
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; | ||
/** | ||
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 | ||
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder} | ||
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). | ||
* @default true | ||
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, | ||
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} | ||
* @default true (addresses are not reordered) | ||
* @deprecated Please use `order` option | ||
*/ | ||
@@ -667,10 +677,11 @@ verbatim?: boolean | undefined; | ||
/** | ||
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* | ||
* * `ipv4first`: for `verbatim` defaulting to `false`. | ||
* * `verbatim`: for `verbatim` defaulting to `true`. | ||
* * `ipv4first`: for `order` defaulting to `ipv4first`. | ||
* * `ipv6first`: for `order` defaulting to `ipv6first`. | ||
* * `verbatim`: for `order` defaulting to `verbatim`. | ||
* @since v18.17.0 | ||
*/ | ||
export function getDefaultResultOrder(): "ipv4first" | "verbatim"; | ||
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; | ||
/** | ||
@@ -722,7 +733,8 @@ * Sets the IP address and port of servers to be used when performing DNS | ||
/** | ||
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* | ||
* * `ipv4first`: sets default `verbatim` to `false`. | ||
* * `verbatim`: sets default `verbatim` to `true`. | ||
* * `ipv4first`: sets default `order` to `ipv4first`. | ||
* * `ipv6first`: sets default `order` to `ipv6first`. | ||
* * `verbatim`: sets default `order` to `verbatim`. | ||
* | ||
@@ -734,4 +746,5 @@ * The default is `verbatim` and {@link setDefaultResultOrder} have higher | ||
* @since v16.4.0, v14.18.0 | ||
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. | ||
*/ | ||
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; | ||
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; | ||
// Error codes | ||
@@ -738,0 +751,0 @@ export const NODATA: "ENODATA"; |
@@ -349,16 +349,16 @@ /** | ||
/** | ||
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: | ||
* | ||
* * `ipv4first`: sets default `verbatim` to `false`. | ||
* * `verbatim`: sets default `verbatim` to `true`. | ||
* * `ipv4first`: sets default `order` to `ipv4first`. | ||
* * `ipv6first`: sets default `order` to `ipv6first`. | ||
* * `verbatim`: sets default `order` to `verbatim`. | ||
* | ||
* The default is `verbatim` and {@link setDefaultResultOrder} have higher | ||
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using | ||
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main | ||
* thread won't affect the default dns orders in workers. | ||
* The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) | ||
* have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). | ||
* When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) | ||
* from the main thread won't affect the default dns orders in workers. | ||
* @since v16.4.0, v14.18.0 | ||
* @param order must be `'ipv4first'` or `'verbatim'`. | ||
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. | ||
*/ | ||
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; | ||
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; | ||
// Error codes | ||
@@ -365,0 +365,0 @@ const NODATA: "ENODATA"; |
{ | ||
"name": "@types/node", | ||
"version": "22.0.3", | ||
"version": "22.1.0", | ||
"description": "TypeScript definitions for node", | ||
@@ -213,6 +213,6 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", | ||
"dependencies": { | ||
"undici-types": "~6.11.1" | ||
"undici-types": "~6.13.0" | ||
}, | ||
"typesPublisherContentHash": "5ae202076a42a690c53ac3c2165c19dbe294320b891c0db8c3b4448171213ce8", | ||
"typesPublisherContentHash": "a016324027de394c0877c1d44c03999bacaa45ed9b7249649d03dd6b9bfe4e5b", | ||
"typeScriptVersion": "4.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 02 Aug 2024 08:37:31 GMT | ||
* Last updated: Fri, 02 Aug 2024 11:07:10 GMT | ||
* Dependencies: [undici-types](https://npmjs.com/package/undici-types) | ||
@@ -14,0 +14,0 @@ |
@@ -49,2 +49,18 @@ /** | ||
} | ||
interface FileUrlToPathOptions { | ||
/** | ||
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. | ||
* @default undefined | ||
* @since v22.1.0 | ||
*/ | ||
windows?: boolean | undefined; | ||
} | ||
interface PathToFileUrlOptions { | ||
/** | ||
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. | ||
* @default undefined | ||
* @since v22.1.0 | ||
*/ | ||
windows?: boolean | undefined; | ||
} | ||
/** | ||
@@ -302,3 +318,3 @@ * The `url.parse()` method takes a URL string, parses it, and returns a URL | ||
*/ | ||
function fileURLToPath(url: string | URL): string; | ||
function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; | ||
/** | ||
@@ -321,3 +337,3 @@ * This function ensures that `path` is resolved absolutely, and that the URL | ||
*/ | ||
function pathToFileURL(path: string): URL; | ||
function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; | ||
/** | ||
@@ -435,2 +451,11 @@ * This utility function converts a URL object into an ordinary options object as | ||
static canParse(input: string, base?: string): boolean; | ||
/** | ||
* Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs. | ||
* Returns `null` if `input` is not a valid. | ||
* @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is | ||
* `converted to a string` first. | ||
* @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. | ||
* @since v22.1.0 | ||
*/ | ||
static parse(input: string, base?: string): URL | null; | ||
constructor(input: string | { toString: () => string }, base?: string | URL); | ||
@@ -437,0 +462,0 @@ /** |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2083369
46760
+ Addedundici-types@6.13.0(transitive)
- Removedundici-types@6.11.1(transitive)
Updatedundici-types@~6.13.0