@emulsify/cli 1.11.0 → 1.11.2

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 (86) hide show
  1. package/dist/handlers/systemInstall.js +3 -4
  2. package/dist/node_modules/.package-lock.json +18 -18
  3. package/dist/node_modules/@types/node/README.md +1 -1
  4. package/dist/node_modules/@types/node/assert.d.ts +2 -2
  5. package/dist/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  6. package/dist/node_modules/@types/node/buffer.d.ts +30 -390
  7. package/dist/node_modules/@types/node/child_process.d.ts +32 -28
  8. package/dist/node_modules/@types/node/cluster.d.ts +1 -1
  9. package/dist/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  10. package/dist/node_modules/@types/node/compatibility/index.d.ts +9 -0
  11. package/dist/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  12. package/dist/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  13. package/dist/node_modules/@types/node/console.d.ts +2 -2
  14. package/dist/node_modules/@types/node/crypto.d.ts +3 -3
  15. package/dist/node_modules/@types/node/dns/promises.d.ts +6 -5
  16. package/dist/node_modules/@types/node/dns.d.ts +5 -5
  17. package/dist/node_modules/@types/node/domain.d.ts +2 -2
  18. package/dist/node_modules/@types/node/events.d.ts +3 -3
  19. package/dist/node_modules/@types/node/fs/promises.d.ts +2 -2
  20. package/dist/node_modules/@types/node/fs.d.ts +2 -2
  21. package/dist/node_modules/@types/node/globals.d.ts +124 -68
  22. package/dist/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  23. package/dist/node_modules/@types/node/http.d.ts +43 -7
  24. package/dist/node_modules/@types/node/http2.d.ts +238 -101
  25. package/dist/node_modules/@types/node/https.d.ts +17 -23
  26. package/dist/node_modules/@types/node/index.d.ts +11 -9
  27. package/dist/node_modules/@types/node/module.d.ts +3 -3
  28. package/dist/node_modules/@types/node/net.d.ts +8 -2
  29. package/dist/node_modules/@types/node/os.d.ts +1 -1
  30. package/dist/node_modules/@types/node/package.json +10 -2
  31. package/dist/node_modules/@types/node/path.d.ts +10 -1
  32. package/dist/node_modules/@types/node/perf_hooks.d.ts +19 -19
  33. package/dist/node_modules/@types/node/punycode.d.ts +1 -1
  34. package/dist/node_modules/@types/node/querystring.d.ts +1 -1
  35. package/dist/node_modules/@types/node/readline/promises.d.ts +1 -1
  36. package/dist/node_modules/@types/node/readline.d.ts +10 -10
  37. package/dist/node_modules/@types/node/repl.d.ts +4 -4
  38. package/dist/node_modules/@types/node/stream/promises.d.ts +8 -1
  39. package/dist/node_modules/@types/node/stream/web.d.ts +182 -25
  40. package/dist/node_modules/@types/node/stream.d.ts +36 -17
  41. package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
  42. package/dist/node_modules/@types/node/test.d.ts +85 -12
  43. package/dist/node_modules/@types/node/timers/promises.d.ts +1 -1
  44. package/dist/node_modules/@types/node/timers.d.ts +1 -1
  45. package/dist/node_modules/@types/node/tls.d.ts +5 -5
  46. package/dist/node_modules/@types/node/trace_events.d.ts +4 -4
  47. package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  48. package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  49. package/dist/node_modules/@types/node/ts5.6/index.d.ts +91 -0
  50. package/dist/node_modules/@types/node/tty.d.ts +1 -1
  51. package/dist/node_modules/@types/node/url.d.ts +14 -11
  52. package/dist/node_modules/@types/node/util.d.ts +49 -49
  53. package/dist/node_modules/@types/node/v8.d.ts +12 -12
  54. package/dist/node_modules/@types/node/vm.d.ts +11 -12
  55. package/dist/node_modules/@types/node/worker_threads.d.ts +22 -22
  56. package/dist/node_modules/@types/node/zlib.d.ts +8 -8
  57. package/dist/node_modules/debug/README.md +1 -1
  58. package/dist/node_modules/debug/package.json +2 -2
  59. package/dist/node_modules/fast-uri/.github/workflows/ci.yml +2 -2
  60. package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
  61. package/dist/node_modules/fast-uri/index.js +3 -9
  62. package/dist/node_modules/fast-uri/package.json +4 -4
  63. package/dist/node_modules/fast-uri/test/ajv.test.js +1 -1
  64. package/dist/node_modules/fast-uri/test/compatibility.test.js +3 -2
  65. package/dist/node_modules/fast-uri/test/equal.test.js +1 -2
  66. package/dist/node_modules/fast-uri/test/parse.test.js +1 -2
  67. package/dist/node_modules/fast-uri/test/resolve.test.js +1 -2
  68. package/dist/node_modules/fast-uri/test/serialize.test.js +1 -2
  69. package/dist/node_modules/fast-uri/test/uri-js.test.js +539 -567
  70. package/dist/node_modules/fast-uri/test/util.test.js +2 -3
  71. package/dist/node_modules/ms/index.js +1 -1
  72. package/dist/node_modules/ms/license.md +1 -1
  73. package/dist/node_modules/ms/package.json +5 -4
  74. package/dist/node_modules/ms/readme.md +1 -2
  75. package/dist/node_modules/simple-git/dist/cjs/index.js +14 -15
  76. package/dist/node_modules/simple-git/dist/cjs/index.js.map +2 -2
  77. package/dist/node_modules/simple-git/dist/esm/index.js +14 -15
  78. package/dist/node_modules/simple-git/dist/esm/index.js.map +2 -2
  79. package/dist/node_modules/simple-git/dist/typings/response.d.ts +7 -6
  80. package/dist/node_modules/simple-git/package.json +5 -5
  81. package/dist/package-lock.json +720 -643
  82. package/dist/package.json +2 -2
  83. package/dist/util/cache/copyItemFromCache.js +9 -1
  84. package/package.json +2 -2
  85. package/dist/node_modules/@types/node/globals.global.d.ts +0 -1
  86. package/dist/node_modules/fast-uri/.taprc +0 -3
@@ -10,7 +10,7 @@ declare module "https" {
10
10
  import { URL } from "node:url";
11
11
  type ServerOptions<
12
12
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
13
- Response extends typeof http.ServerResponse = typeof http.ServerResponse,
13
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
14
14
  > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
15
15
  type RequestOptions =
16
16
  & http.RequestOptions
@@ -34,7 +34,7 @@ declare module "https" {
34
34
  }
35
35
  interface Server<
36
36
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
37
- Response extends typeof http.ServerResponse = typeof http.ServerResponse,
37
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
38
38
  > extends http.Server<Request, Response> {}
39
39
  /**
40
40
  * See `http.Server` for more information.
@@ -42,7 +42,7 @@ declare module "https" {
42
42
  */
43
43
  class Server<
44
44
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
45
- Response extends typeof http.ServerResponse = typeof http.ServerResponse,
45
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
46
46
  > extends tls.Server {
47
47
  constructor(requestListener?: http.RequestListener<Request, Response>);
48
48
  constructor(
@@ -119,25 +119,19 @@ declare module "https" {
119
119
  emit(
120
120
  event: "checkContinue",
121
121
  req: InstanceType<Request>,
122
- res: InstanceType<Response> & {
123
- req: InstanceType<Request>;
124
- },
122
+ res: InstanceType<Response>,
125
123
  ): boolean;
126
124
  emit(
127
125
  event: "checkExpectation",
128
126
  req: InstanceType<Request>,
129
- res: InstanceType<Response> & {
130
- req: InstanceType<Request>;
131
- },
127
+ res: InstanceType<Response>,
132
128
  ): boolean;
133
129
  emit(event: "clientError", err: Error, socket: Duplex): boolean;
134
130
  emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
135
131
  emit(
136
132
  event: "request",
137
133
  req: InstanceType<Request>,
138
- res: InstanceType<Response> & {
139
- req: InstanceType<Request>;
140
- },
134
+ res: InstanceType<Response>,
141
135
  ): boolean;
142
136
  emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
143
137
  on(event: string, listener: (...args: any[]) => void): this;
@@ -276,8 +270,8 @@ declare module "https" {
276
270
  /**
277
271
  * ```js
278
272
  * // curl -k https://localhost:8000/
279
- * const https = require('node:https');
280
- * const fs = require('node:fs');
273
+ * import https from 'node:https';
274
+ * import fs from 'node:fs';
281
275
  *
282
276
  * const options = {
283
277
  * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
@@ -293,8 +287,8 @@ declare module "https" {
293
287
  * Or
294
288
  *
295
289
  * ```js
296
- * const https = require('node:https');
297
- * const fs = require('node:fs');
290
+ * import https from 'node:https';
291
+ * import fs from 'node:fs';
298
292
  *
299
293
  * const options = {
300
294
  * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
@@ -312,11 +306,11 @@ declare module "https" {
312
306
  */
313
307
  function createServer<
314
308
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
315
- Response extends typeof http.ServerResponse = typeof http.ServerResponse,
309
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
316
310
  >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
317
311
  function createServer<
318
312
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
319
- Response extends typeof http.ServerResponse = typeof http.ServerResponse,
313
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
320
314
  >(
321
315
  options: ServerOptions<Request, Response>,
322
316
  requestListener?: http.RequestListener<Request, Response>,
@@ -334,7 +328,7 @@ declare module "https" {
334
328
  * upload a file with a POST request, then write to the `ClientRequest` object.
335
329
  *
336
330
  * ```js
337
- * const https = require('node:https');
331
+ * import https from 'node:https';
338
332
  *
339
333
  * const options = {
340
334
  * hostname: 'encrypted.google.com',
@@ -407,9 +401,9 @@ declare module "https" {
407
401
  * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
408
402
  *
409
403
  * ```js
410
- * const tls = require('node:tls');
411
- * const https = require('node:https');
412
- * const crypto = require('node:crypto');
404
+ * import tls from 'node:tls';
405
+ * import https from 'node:https';
406
+ * import crypto from 'node:crypto';
413
407
  *
414
408
  * function sha256(s) {
415
409
  * return crypto.createHash('sha256').update(s).digest('base64');
@@ -517,7 +511,7 @@ declare module "https" {
517
511
  * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
518
512
  *
519
513
  * ```js
520
- * const https = require('node:https');
514
+ * import https from 'node:https';
521
515
  *
522
516
  * https.get('https://encrypted.google.com/', (res) => {
523
517
  * console.log('statusCode:', res.statusCode);
@@ -22,18 +22,22 @@
22
22
  * IN THE SOFTWARE.
23
23
  */
24
24
 
25
- // NOTE: These definitions support NodeJS and TypeScript 4.9+.
25
+ // NOTE: These definitions support Node.js and TypeScript 5.7+.
26
26
 
27
- // Reference required types from the default lib:
27
+ // Reference required TypeScript libs:
28
28
  /// <reference lib="es2020" />
29
- /// <reference lib="esnext.asynciterable" />
30
- /// <reference lib="esnext.intl" />
31
- /// <reference lib="esnext.bigint" />
32
29
 
33
- // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
30
+ // TypeScript backwards-compatibility definitions:
31
+ /// <reference path="compatibility/index.d.ts" />
32
+
33
+ // Definitions specific to TypeScript 5.7+:
34
+ /// <reference path="globals.typedarray.d.ts" />
35
+ /// <reference path="buffer.buffer.d.ts" />
36
+
37
+ // Definitions for Node.js modules that are not specific to any version of TypeScript:
38
+ /// <reference path="globals.d.ts" />
34
39
  /// <reference path="assert.d.ts" />
35
40
  /// <reference path="assert/strict.d.ts" />
36
- /// <reference path="globals.d.ts" />
37
41
  /// <reference path="async_hooks.d.ts" />
38
42
  /// <reference path="buffer.d.ts" />
39
43
  /// <reference path="child_process.d.ts" />
@@ -85,5 +89,3 @@
85
89
  /// <reference path="wasi.d.ts" />
86
90
  /// <reference path="worker_threads.d.ts" />
87
91
  /// <reference path="zlib.d.ts" />
88
-
89
- /// <reference path="globals.global.d.ts" />
@@ -12,9 +12,9 @@ declare module "module" {
12
12
  * does not add or remove exported names from the `ES Modules`.
13
13
  *
14
14
  * ```js
15
- * const fs = require('node:fs');
16
- * const assert = require('node:assert');
17
- * const { syncBuiltinESMExports } = require('node:module');
15
+ * import fs from 'node:fs';
16
+ * import assert from 'node:assert';
17
+ * import { syncBuiltinESMExports } from 'node:module';
18
18
  *
19
19
  * fs.readFile = newAPI;
20
20
  *
@@ -8,7 +8,7 @@
8
8
  * It can be accessed using:
9
9
  *
10
10
  * ```js
11
- * const net = require('node:net');
11
+ * import net from 'node:net';
12
12
  * ```
13
13
  * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js)
14
14
  */
@@ -532,6 +532,12 @@ declare module "net" {
532
532
  * @since v16.5.0
533
533
  */
534
534
  keepAliveInitialDelay?: number | undefined;
535
+ /**
536
+ * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
537
+ * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
538
+ * @since v18.17.0, v20.1.0
539
+ */
540
+ highWaterMark?: number | undefined;
535
541
  }
536
542
  interface DropArgument {
537
543
  localAddress?: string;
@@ -812,7 +818,7 @@ declare module "net" {
812
818
  * on port 8124:
813
819
  *
814
820
  * ```js
815
- * const net = require('node:net');
821
+ * import net from 'node:net';
816
822
  * const server = net.createServer((c) => {
817
823
  * // 'connection' listener.
818
824
  * console.log('client connected');
@@ -3,7 +3,7 @@
3
3
  * properties. It can be accessed using:
4
4
  *
5
5
  * ```js
6
- * const os = require('node:os');
6
+ * import os from 'node:os';
7
7
  * ```
8
8
  * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js)
9
9
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.16.2",
3
+ "version": "20.17.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -203,6 +203,13 @@
203
203
  ],
204
204
  "main": "",
205
205
  "types": "index.d.ts",
206
+ "typesVersions": {
207
+ "<=5.6": {
208
+ "*": [
209
+ "ts5.6/*"
210
+ ]
211
+ }
212
+ },
206
213
  "repository": {
207
214
  "type": "git",
208
215
  "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
@@ -212,6 +219,7 @@
212
219
  "dependencies": {
213
220
  "undici-types": "~6.19.2"
214
221
  },
215
- "typesPublisherContentHash": "bfa190547a4fe06159207f447a2b225d7ee753bec878cab8292ade89f64f3a06",
222
+ "peerDependencies": {},
223
+ "typesPublisherContentHash": "9cef648f04b5992e1dfca68a79575ad391a019a0c0dc0e237b99be9e79c8f046",
216
224
  "typeScriptVersion": "4.8"
217
225
  }
@@ -11,7 +11,7 @@ declare module "path/win32" {
11
11
  * paths. It can be accessed using:
12
12
  *
13
13
  * ```js
14
- * const path = require('node:path');
14
+ * import path from 'node:path';
15
15
  * ```
16
16
  * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/path.js)
17
17
  */
@@ -94,6 +94,15 @@ declare module "path" {
94
94
  * @throws {TypeError} if any of the arguments is not a string.
95
95
  */
96
96
  resolve(...paths: string[]): string;
97
+ /**
98
+ * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
99
+ * @param path The path to glob-match against.
100
+ * @param pattern The glob to check the path against.
101
+ * @returns Whether or not the `path` matched the `pattern`.
102
+ * @throws {TypeError} if `path` or `pattern` are not strings.
103
+ * @since v20.17.0
104
+ */
105
+ matchesGlob(path: string, pattern: string): boolean;
97
106
  /**
98
107
  * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
99
108
  *
@@ -10,7 +10,7 @@
10
10
  * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
11
11
  *
12
12
  * ```js
13
- * const { PerformanceObserver, performance } = require('node:perf_hooks');
13
+ * import { PerformanceObserver, performance } from 'node:perf_hooks';
14
14
  *
15
15
  * const obs = new PerformanceObserver((items) => {
16
16
  * console.log(items.getEntries()[0].duration);
@@ -348,10 +348,10 @@ declare module "perf_hooks" {
348
348
  * A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
349
349
  *
350
350
  * ```js
351
- * const {
351
+ * import {
352
352
  * performance,
353
353
  * PerformanceObserver,
354
- * } = require('node:perf_hooks');
354
+ * } from 'node:perf_hooks';
355
355
  *
356
356
  * function someFunction() {
357
357
  * console.log('hello world');
@@ -390,10 +390,10 @@ declare module "perf_hooks" {
390
390
  * with respect to `performanceEntry.startTime`.
391
391
  *
392
392
  * ```js
393
- * const {
393
+ * import {
394
394
  * performance,
395
395
  * PerformanceObserver,
396
- * } = require('node:perf_hooks');
396
+ * } from 'node:perf_hooks';
397
397
  *
398
398
  * const obs = new PerformanceObserver((perfObserverList, observer) => {
399
399
  * console.log(perfObserverList.getEntries());
@@ -433,10 +433,10 @@ declare module "perf_hooks" {
433
433
  * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
434
434
  *
435
435
  * ```js
436
- * const {
436
+ * import {
437
437
  * performance,
438
438
  * PerformanceObserver,
439
- * } = require('node:perf_hooks');
439
+ * } from 'node:perf_hooks';
440
440
  *
441
441
  * const obs = new PerformanceObserver((perfObserverList, observer) => {
442
442
  * console.log(perfObserverList.getEntriesByName('meow'));
@@ -484,10 +484,10 @@ declare module "perf_hooks" {
484
484
  * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`.
485
485
  *
486
486
  * ```js
487
- * const {
487
+ * import {
488
488
  * performance,
489
489
  * PerformanceObserver,
490
- * } = require('node:perf_hooks');
490
+ * } from 'node:perf_hooks';
491
491
  *
492
492
  * const obs = new PerformanceObserver((perfObserverList, observer) => {
493
493
  * console.log(perfObserverList.getEntriesByType('mark'));
@@ -537,10 +537,10 @@ declare module "perf_hooks" {
537
537
  * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`:
538
538
  *
539
539
  * ```js
540
- * const {
540
+ * import {
541
541
  * performance,
542
542
  * PerformanceObserver,
543
- * } = require('node:perf_hooks');
543
+ * } from 'node:perf_hooks';
544
544
  *
545
545
  * const obs = new PerformanceObserver((list, observer) => {
546
546
  * // Called once asynchronously. `list` contains three items.
@@ -809,7 +809,7 @@ declare module "perf_hooks" {
809
809
  * detect.
810
810
  *
811
811
  * ```js
812
- * const { monitorEventLoopDelay } = require('node:perf_hooks');
812
+ * import { monitorEventLoopDelay } from 'node:perf_hooks';
813
813
  * const h = monitorEventLoopDelay({ resolution: 20 });
814
814
  * h.enable();
815
815
  * // Do something.
@@ -858,7 +858,7 @@ declare module "perf_hooks" {
858
858
  } from "perf_hooks";
859
859
  global {
860
860
  /**
861
- * `PerformanceEntry` is a global reference for `require('node:perf_hooks').PerformanceEntry`
861
+ * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:node:perf_hooks'`
862
862
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry
863
863
  * @since v19.0.0
864
864
  */
@@ -868,7 +868,7 @@ declare module "perf_hooks" {
868
868
  } ? T
869
869
  : typeof _PerformanceEntry;
870
870
  /**
871
- * `PerformanceMark` is a global reference for `require('node:perf_hooks').PerformanceMark`
871
+ * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:node:perf_hooks'`
872
872
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark
873
873
  * @since v19.0.0
874
874
  */
@@ -878,7 +878,7 @@ declare module "perf_hooks" {
878
878
  } ? T
879
879
  : typeof _PerformanceMark;
880
880
  /**
881
- * `PerformanceMeasure` is a global reference for `require('node:perf_hooks').PerformanceMeasure`
881
+ * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:node:perf_hooks'`
882
882
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure
883
883
  * @since v19.0.0
884
884
  */
@@ -888,7 +888,7 @@ declare module "perf_hooks" {
888
888
  } ? T
889
889
  : typeof _PerformanceMeasure;
890
890
  /**
891
- * `PerformanceObserver` is a global reference for `require('node:perf_hooks').PerformanceObserver`
891
+ * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:node:perf_hooks'`
892
892
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver
893
893
  * @since v19.0.0
894
894
  */
@@ -898,7 +898,7 @@ declare module "perf_hooks" {
898
898
  } ? T
899
899
  : typeof _PerformanceObserver;
900
900
  /**
901
- * `PerformanceObserverEntryList` is a global reference for `require('node:perf_hooks').PerformanceObserverEntryList`
901
+ * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:node:perf_hooks'`
902
902
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist
903
903
  * @since v19.0.0
904
904
  */
@@ -908,7 +908,7 @@ declare module "perf_hooks" {
908
908
  } ? T
909
909
  : typeof _PerformanceObserverEntryList;
910
910
  /**
911
- * `PerformanceResourceTiming` is a global reference for `require('node:perf_hooks').PerformanceResourceTiming`
911
+ * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:node:perf_hooks'`
912
912
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming
913
913
  * @since v19.0.0
914
914
  */
@@ -918,7 +918,7 @@ declare module "perf_hooks" {
918
918
  } ? T
919
919
  : typeof _PerformanceResourceTiming;
920
920
  /**
921
- * `performance` is a global reference for `require('node:perf_hooks').performance`
921
+ * `performance` is a global reference for `import { performance } from 'node:node:perf_hooks'`
922
922
  * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance
923
923
  * @since v16.0.0
924
924
  */
@@ -8,7 +8,7 @@
8
8
  * can be accessed using:
9
9
  *
10
10
  * ```js
11
- * const punycode = require('punycode');
11
+ * import punycode from 'node:punycode';
12
12
  * ```
13
13
  *
14
14
  * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
@@ -3,7 +3,7 @@
3
3
  * query strings. It can be accessed using:
4
4
  *
5
5
  * ```js
6
- * const querystring = require('node:querystring');
6
+ * import querystring from 'node:querystring';
7
7
  * ```
8
8
  *
9
9
  * `querystring` is more performant than `URLSearchParams` but is not a
@@ -115,7 +115,7 @@ declare module "readline/promises" {
115
115
  * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
116
116
  *
117
117
  * ```js
118
- * const readlinePromises = require('node:readline/promises');
118
+ * import readlinePromises from 'node:readline/promises';
119
119
  * const rl = readlinePromises.createInterface({
120
120
  * input: process.stdin,
121
121
  * output: process.stdout,
@@ -304,7 +304,7 @@ declare module "readline" {
304
304
  prependOnceListener(event: "SIGINT", listener: () => void): this;
305
305
  prependOnceListener(event: "SIGTSTP", listener: () => void): this;
306
306
  prependOnceListener(event: "history", listener: (history: string[]) => void): this;
307
- [Symbol.asyncIterator](): AsyncIterableIterator<string>;
307
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
308
308
  }
309
309
  export type ReadLine = Interface; // type forwarded for backwards compatibility
310
310
  export type Completer = (line: string) => CompleterResult;
@@ -342,7 +342,7 @@ declare module "readline" {
342
342
  * The `readline.createInterface()` method creates a new `readline.Interface` instance.
343
343
  *
344
344
  * ```js
345
- * const readline = require('node:readline');
345
+ * import readline from 'node:readline';
346
346
  * const rl = readline.createInterface({
347
347
  * input: process.stdin,
348
348
  * output: process.stdout,
@@ -398,7 +398,7 @@ declare module "readline" {
398
398
  * implement a small command-line interface:
399
399
  *
400
400
  * ```js
401
- * const readline = require('node:readline');
401
+ * import readline from 'node:readline';
402
402
  * const rl = readline.createInterface({
403
403
  * input: process.stdin,
404
404
  * output: process.stdout,
@@ -430,8 +430,8 @@ declare module "readline" {
430
430
  * well as a `for await...of` loop:
431
431
  *
432
432
  * ```js
433
- * const fs = require('node:fs');
434
- * const readline = require('node:readline');
433
+ * import fs from 'node:fs';
434
+ * import readline from 'node:readline';
435
435
  *
436
436
  * async function processLineByLine() {
437
437
  * const fileStream = fs.createReadStream('input.txt');
@@ -455,8 +455,8 @@ declare module "readline" {
455
455
  * Alternatively, one could use the `'line'` event:
456
456
  *
457
457
  * ```js
458
- * const fs = require('node:fs');
459
- * const readline = require('node:readline');
458
+ * import fs from 'node:fs';
459
+ * import readline from 'node:readline';
460
460
  *
461
461
  * const rl = readline.createInterface({
462
462
  * input: fs.createReadStream('sample.txt'),
@@ -471,9 +471,9 @@ declare module "readline" {
471
471
  * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied:
472
472
  *
473
473
  * ```js
474
- * const { once } = require('node:events');
475
- * const { createReadStream } = require('node:fs');
476
- * const { createInterface } = require('node:readline');
474
+ * import { once } from 'node:events';
475
+ * import { createReadStream } from 'node:fs';
476
+ * import { createInterface } from 'node:readline';
477
477
  *
478
478
  * (async function processLineByLine() {
479
479
  * try {
@@ -4,7 +4,7 @@
4
4
  * applications. It can be accessed using:
5
5
  *
6
6
  * ```js
7
- * const repl = require('node:repl');
7
+ * import repl from 'node:repl';
8
8
  * ```
9
9
  * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/repl.js)
10
10
  */
@@ -130,7 +130,7 @@ declare module "repl" {
130
130
  * or directly using the JavaScript `new` keyword.
131
131
  *
132
132
  * ```js
133
- * const repl = require('node:repl');
133
+ * import repl from 'node:repl';
134
134
  *
135
135
  * const options = { useColors: true };
136
136
  *
@@ -257,7 +257,7 @@ declare module "repl" {
257
257
  * The following example shows two new commands added to the REPL instance:
258
258
  *
259
259
  * ```js
260
- * const repl = require('node:repl');
260
+ * import repl from 'node:repl';
261
261
  *
262
262
  * const replServer = repl.start({ prompt: '> ' });
263
263
  * replServer.defineCommand('sayhello', {
@@ -407,7 +407,7 @@ declare module "repl" {
407
407
  * If `options` is a string, then it specifies the input prompt:
408
408
  *
409
409
  * ```js
410
- * const repl = require('node:repl');
410
+ * import repl from 'node:repl';
411
411
  *
412
412
  * // a Unix style prompt
413
413
  * repl.start('$ ');
@@ -1,12 +1,19 @@
1
1
  declare module "stream/promises" {
2
2
  import {
3
- FinishedOptions,
3
+ FinishedOptions as _FinishedOptions,
4
4
  PipelineDestination,
5
5
  PipelineOptions,
6
6
  PipelinePromise,
7
7
  PipelineSource,
8
8
  PipelineTransform,
9
9
  } from "node:stream";
10
+ interface FinishedOptions extends _FinishedOptions {
11
+ /**
12
+ * If true, removes the listeners registered by this function before the promise is fulfilled.
13
+ * @default false
14
+ */
15
+ cleanup?: boolean | undefined;
16
+ }
10
17
  function finished(
11
18
  stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
12
19
  options?: FinishedOptions,