@types/node 17.0.41 → 17.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. node/README.md +1 -1
  2. node/domain.d.ts +2 -1
  3. node/package.json +3 -3
  4. node/stream.d.ts +13 -0
  5. node/url.d.ts +5 -1
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 07 Jun 2022 19:01:35 GMT
11
+ * Last updated: Wed, 15 Jun 2022 15:01:35 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/domain.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * **This module is pending deprecation.** Once a replacement API has been
3
- * finalized, this module will be fully deprecated. Most developers should**not** have cause to use this module. Users who absolutely must have
3
+ * finalized, this module will be fully deprecated. Most developers should
4
+ * **not** have cause to use this module. Users who absolutely must have
4
5
  * the functionality that domains provide may rely on it for the time being
5
6
  * but should expect to have to migrate to a different solution
6
7
  * in the future.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "17.0.41",
3
+ "version": "17.0.44",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  },
221
221
  "scripts": {},
222
222
  "dependencies": {},
223
- "typesPublisherContentHash": "9e1502e0553fb32bd0595c18b2baac4ef97c4aa2fae1006ead4e396591c10d6e",
224
- "typeScriptVersion": "3.9"
223
+ "typesPublisherContentHash": "e6ce63cbca091d75f6b46351e25b597e89ee10c6da8e57b36751665d74739c29",
224
+ "typeScriptVersion": "4.0"
225
225
  }
node/stream.d.ts CHANGED
@@ -20,6 +20,7 @@ declare module 'stream' {
20
20
  import { EventEmitter, Abortable } from 'node:events';
21
21
  import * as streamPromises from 'node:stream/promises';
22
22
  import * as streamConsumers from 'node:stream/consumers';
23
+ import * as streamWeb from 'node:stream/web';
23
24
  class internal extends EventEmitter {
24
25
  pipe<T extends NodeJS.WritableStream>(
25
26
  destination: T,
@@ -52,11 +53,23 @@ declare module 'stream' {
52
53
  * A utility method for creating Readable Streams out of iterators.
53
54
  */
54
55
  static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
56
+ /**
57
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
58
+ * @since v17.0.0
59
+ * @experimental
60
+ */
61
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>): Readable;
55
62
  /**
56
63
  * Returns whether the stream has been read from or cancelled.
57
64
  * @since v16.8.0
58
65
  */
59
66
  static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
67
+ /**
68
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
69
+ * @since v17.0.0
70
+ * @experimental
71
+ */
72
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
60
73
  /**
61
74
  * Returns whether the stream was destroyed or errored before emitting `'end'`.
62
75
  * @since v16.8.0
node/url.d.ts CHANGED
@@ -59,8 +59,12 @@ declare module 'url' {
59
59
  * lenient, non-standard algorithm for parsing URL strings, security
60
60
  * issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
61
61
  * incorrect handling of usernames and passwords have been identified.
62
+ *
63
+ * Deprecation of this API has been shelved for now primarily due to the the
64
+ * inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
65
+ * [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
66
+ *
62
67
  * @since v0.1.25
63
- * @deprecated Legacy: Use the WHATWG URL API instead.
64
68
  * @param urlString The URL string to parse.
65
69
  * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
66
70
  * on the returned URL object will be an unparsed, undecoded string.