@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
@@ -4,7 +4,7 @@
4
4
  * is primarily provided by the {@link spawn} function:
5
5
  *
6
6
  * ```js
7
- * const { spawn } = require('node:child_process');
7
+ * import { spawn } from 'node:child_process';
8
8
  * const ls = spawn('ls', ['-lh', '/usr']);
9
9
  *
10
10
  * ls.stdout.on('data', (data) => {
@@ -109,7 +109,7 @@ declare module "child_process" {
109
109
  * refer to the same value.
110
110
  *
111
111
  * ```js
112
- * const { spawn } = require('node:child_process');
112
+ * import { spawn } from 'node:child_process';
113
113
  *
114
114
  * const subprocess = spawn('ls');
115
115
  *
@@ -152,9 +152,9 @@ declare module "child_process" {
152
152
  * in the array are `null`.
153
153
  *
154
154
  * ```js
155
- * const assert = require('node:assert');
156
- * const fs = require('node:fs');
157
- * const child_process = require('node:child_process');
155
+ * import assert from 'node:assert';
156
+ * import fs from 'node:fs';
157
+ * import child_process from 'node:child_process';
158
158
  *
159
159
  * const subprocess = child_process.spawn('ls', {
160
160
  * stdio: [
@@ -202,7 +202,7 @@ declare module "child_process" {
202
202
  * emitted.
203
203
  *
204
204
  * ```js
205
- * const { spawn } = require('node:child_process');
205
+ * import { spawn } from 'node:child_process';
206
206
  * const grep = spawn('grep', ['ssh']);
207
207
  *
208
208
  * console.log(`Spawned child pid: ${grep.pid}`);
@@ -249,7 +249,7 @@ declare module "child_process" {
249
249
  * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
250
250
  *
251
251
  * ```js
252
- * const { spawn } = require('node:child_process');
252
+ * import { spawn } from 'node:child_process';
253
253
  * const grep = spawn('grep', ['ssh']);
254
254
  *
255
255
  * grep.on('close', (code, signal) => {
@@ -282,7 +282,7 @@ declare module "child_process" {
282
282
  *
283
283
  * ```js
284
284
  * 'use strict';
285
- * const { spawn } = require('node:child_process');
285
+ * import { spawn } from 'node:child_process';
286
286
  *
287
287
  * const subprocess = spawn(
288
288
  * 'sh',
@@ -320,7 +320,7 @@ declare module "child_process" {
320
320
  * For example, in the parent script:
321
321
  *
322
322
  * ```js
323
- * const cp = require('node:child_process');
323
+ * import cp from 'node:child_process';
324
324
  * const n = cp.fork(`${__dirname}/sub.js`);
325
325
  *
326
326
  * n.on('message', (m) => {
@@ -374,10 +374,12 @@ declare module "child_process" {
374
374
  * a TCP server object to the child process as illustrated in the example below:
375
375
  *
376
376
  * ```js
377
- * const subprocess = require('node:child_process').fork('subprocess.js');
377
+ * import child_process from 'node:child_process';
378
+ * const subprocess = child_process.fork('subprocess.js');
378
379
  *
379
380
  * // Open up the server object and send the handle.
380
- * const server = require('node:net').createServer();
381
+ * import net from 'node:net';
382
+ * const server = net.createServer();
381
383
  * server.on('connection', (socket) => {
382
384
  * socket.end('handled by parent');
383
385
  * });
@@ -412,13 +414,14 @@ declare module "child_process" {
412
414
  * handle connections with "normal" or "special" priority:
413
415
  *
414
416
  * ```js
415
- * const { fork } = require('node:child_process');
417
+ * import { fork } from 'node:child_process';
416
418
  * const normal = fork('subprocess.js', ['normal']);
417
419
  * const special = fork('subprocess.js', ['special']);
418
420
  *
419
421
  * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
420
422
  * // the sockets from being read before they are sent to the child process.
421
- * const server = require('node:net').createServer({ pauseOnConnect: true });
423
+ * import net from 'node:net';
424
+ * const server = net.createServer({ pauseOnConnect: true });
422
425
  * server.on('connection', (socket) => {
423
426
  *
424
427
  * // If this is special priority...
@@ -490,7 +493,7 @@ declare module "child_process" {
490
493
  * the child and the parent.
491
494
  *
492
495
  * ```js
493
- * const { spawn } = require('node:child_process');
496
+ * import { spawn } from 'node:child_process';
494
497
  *
495
498
  * const subprocess = spawn(process.argv[0], ['child_program.js'], {
496
499
  * detached: true,
@@ -508,7 +511,7 @@ declare module "child_process" {
508
511
  * to wait for the child to exit before exiting itself.
509
512
  *
510
513
  * ```js
511
- * const { spawn } = require('node:child_process');
514
+ * import { spawn } from 'node:child_process';
512
515
  *
513
516
  * const subprocess = spawn(process.argv[0], ['child_program.js'], {
514
517
  * detached: true,
@@ -711,7 +714,7 @@ declare module "child_process" {
711
714
  * exit code:
712
715
  *
713
716
  * ```js
714
- * const { spawn } = require('node:child_process');
717
+ * import { spawn } from 'node:child_process';
715
718
  * const ls = spawn('ls', ['-lh', '/usr']);
716
719
  *
717
720
  * ls.stdout.on('data', (data) => {
@@ -730,7 +733,7 @@ declare module "child_process" {
730
733
  * Example: A very elaborate way to run `ps ax | grep ssh`
731
734
  *
732
735
  * ```js
733
- * const { spawn } = require('node:child_process');
736
+ * import { spawn } from 'node:child_process';
734
737
  * const ps = spawn('ps', ['ax']);
735
738
  * const grep = spawn('grep', ['ssh']);
736
739
  *
@@ -767,7 +770,7 @@ declare module "child_process" {
767
770
  * Example of checking for failed `spawn`:
768
771
  *
769
772
  * ```js
770
- * const { spawn } = require('node:child_process');
773
+ * import { spawn } from 'node:child_process';
771
774
  * const subprocess = spawn('bad_command');
772
775
  *
773
776
  * subprocess.on('error', (err) => {
@@ -785,7 +788,7 @@ declare module "child_process" {
785
788
  * the error passed to the callback will be an `AbortError`:
786
789
  *
787
790
  * ```js
788
- * const { spawn } = require('node:child_process');
791
+ * import { spawn } from 'node:child_process';
789
792
  * const controller = new AbortController();
790
793
  * const { signal } = controller;
791
794
  * const grep = spawn('grep', ['ssh'], { signal });
@@ -906,7 +909,7 @@ declare module "child_process" {
906
909
  * need to be dealt with accordingly:
907
910
  *
908
911
  * ```js
909
- * const { exec } = require('node:child_process');
912
+ * import { exec } from 'node:child_process';
910
913
  *
911
914
  * exec('"/path/to/test file/test.sh" arg1 arg2');
912
915
  * // Double quotes are used so that the space in the path is not interpreted as
@@ -932,7 +935,7 @@ declare module "child_process" {
932
935
  * encoding, `Buffer` objects will be passed to the callback instead.
933
936
  *
934
937
  * ```js
935
- * const { exec } = require('node:child_process');
938
+ * import { exec } from 'node:child_process';
936
939
  * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
937
940
  * if (error) {
938
941
  * console.error(`exec error: ${error}`);
@@ -957,8 +960,9 @@ declare module "child_process" {
957
960
  * callback, but with two additional properties `stdout` and `stderr`.
958
961
  *
959
962
  * ```js
960
- * const util = require('node:util');
961
- * const exec = util.promisify(require('node:child_process').exec);
963
+ * import util from 'node:util';
964
+ * import child_process from 'node:child_process';
965
+ * const exec = util.promisify(child_process.exec);
962
966
  *
963
967
  * async function lsExample() {
964
968
  * const { stdout, stderr } = await exec('ls');
@@ -972,7 +976,7 @@ declare module "child_process" {
972
976
  * the error passed to the callback will be an `AbortError`:
973
977
  *
974
978
  * ```js
975
- * const { exec } = require('node:child_process');
979
+ * import { exec } from 'node:child_process';
976
980
  * const controller = new AbortController();
977
981
  * const { signal } = controller;
978
982
  * const child = exec('grep ssh', { signal }, (error) => {
@@ -1096,7 +1100,7 @@ declare module "child_process" {
1096
1100
  * supported.
1097
1101
  *
1098
1102
  * ```js
1099
- * const { execFile } = require('node:child_process');
1103
+ * import { execFile } from 'node:child_process';
1100
1104
  * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
1101
1105
  * if (error) {
1102
1106
  * throw error;
@@ -1119,7 +1123,7 @@ declare module "child_process" {
1119
1123
  * callback, but with two additional properties `stdout` and `stderr`.
1120
1124
  *
1121
1125
  * ```js
1122
- * const util = require('node:util');
1126
+ * import util from 'node:util';
1123
1127
  * const execFile = util.promisify(require('node:child_process').execFile);
1124
1128
  * async function getVersion() {
1125
1129
  * const { stdout } = await execFile('node', ['--version']);
@@ -1136,7 +1140,7 @@ declare module "child_process" {
1136
1140
  * the error passed to the callback will be an `AbortError`:
1137
1141
  *
1138
1142
  * ```js
1139
- * const { execFile } = require('node:child_process');
1143
+ * import { execFile } from 'node:child_process';
1140
1144
  * const controller = new AbortController();
1141
1145
  * const { signal } = controller;
1142
1146
  * const child = execFile('node', ['--version'], { signal }, (error) => {
@@ -1377,7 +1381,7 @@ declare module "child_process" {
1377
1381
  * console.log(`Hello from ${process.argv[2]}!`);
1378
1382
  * }, 1_000);
1379
1383
  * } else {
1380
- * const { fork } = require('node:child_process');
1384
+ * import { fork } from 'node:child_process';
1381
1385
  * const controller = new AbortController();
1382
1386
  * const { signal } = controller;
1383
1387
  * const child = fork(__filename, ['child'], { signal });
@@ -231,6 +231,7 @@ declare module "cluster" {
231
231
  * the `'disconnect'` event has not been emitted after some time.
232
232
  *
233
233
  * ```js
234
+ * import net from 'node:net';
234
235
  * if (cluster.isPrimary) {
235
236
  * const worker = cluster.fork();
236
237
  * let timeout;
@@ -248,7 +249,6 @@ declare module "cluster" {
248
249
  * });
249
250
  *
250
251
  * } else if (cluster.isWorker) {
251
- * const net = require('node:net');
252
252
  * const server = net.createServer((socket) => {
253
253
  * // Connections never end
254
254
  * });
@@ -0,0 +1,16 @@
1
+ // Polyfills for the explicit resource management types added in TypeScript 5.2.
2
+ // TODO: remove once this package no longer supports TS 5.1, and replace with a
3
+ // <reference> to TypeScript's disposable library in index.d.ts.
4
+
5
+ interface SymbolConstructor {
6
+ readonly dispose: unique symbol;
7
+ readonly asyncDispose: unique symbol;
8
+ }
9
+
10
+ interface Disposable {
11
+ [Symbol.dispose](): void;
12
+ }
13
+
14
+ interface AsyncDisposable {
15
+ [Symbol.asyncDispose](): PromiseLike<void>;
16
+ }
@@ -0,0 +1,9 @@
1
+ // Declaration files in this directory contain types relating to TypeScript library features
2
+ // that are not included in all TypeScript versions supported by DefinitelyTyped, but
3
+ // which can be made backwards-compatible without needing `typesVersions`.
4
+ // If adding declarations to this directory, please specify which versions of TypeScript require them,
5
+ // so that they can be removed when no longer needed.
6
+
7
+ /// <reference path="disposable.d.ts" />
8
+ /// <reference path="indexable.d.ts" />
9
+ /// <reference path="iterators.d.ts" />
@@ -0,0 +1,20 @@
1
+ // Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
2
+
3
+ interface RelativeIndexable<T> {
4
+ at(index: number): T | undefined;
5
+ }
6
+
7
+ interface String extends RelativeIndexable<string> {}
8
+ interface Array<T> extends RelativeIndexable<T> {}
9
+ interface ReadonlyArray<T> extends RelativeIndexable<T> {}
10
+ interface Int8Array extends RelativeIndexable<number> {}
11
+ interface Uint8Array extends RelativeIndexable<number> {}
12
+ interface Uint8ClampedArray extends RelativeIndexable<number> {}
13
+ interface Int16Array extends RelativeIndexable<number> {}
14
+ interface Uint16Array extends RelativeIndexable<number> {}
15
+ interface Int32Array extends RelativeIndexable<number> {}
16
+ interface Uint32Array extends RelativeIndexable<number> {}
17
+ interface Float32Array extends RelativeIndexable<number> {}
18
+ interface Float64Array extends RelativeIndexable<number> {}
19
+ interface BigInt64Array extends RelativeIndexable<bigint> {}
20
+ interface BigUint64Array extends RelativeIndexable<bigint> {}
@@ -0,0 +1,21 @@
1
+ // Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
2
+ // The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
3
+ // are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
4
+ // Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
5
+ // if lib.esnext.iterator is loaded.
6
+ // TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
7
+
8
+ // Placeholders for TS <5.6
9
+ interface IteratorObject<T, TReturn, TNext> {}
10
+ interface AsyncIteratorObject<T, TReturn, TNext> {}
11
+
12
+ declare namespace NodeJS {
13
+ // Populate iterator methods for TS <5.6
14
+ interface Iterator<T, TReturn, TNext> extends globalThis.Iterator<T, TReturn, TNext> {}
15
+ interface AsyncIterator<T, TReturn, TNext> extends globalThis.AsyncIterator<T, TReturn, TNext> {}
16
+
17
+ // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
18
+ type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
19
+ globalThis.Iterator<any, infer TReturn> ? TReturn
20
+ : any;
21
+ }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
8
8
  * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
9
- * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('node:console')`.
9
+ * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
10
10
  *
11
11
  * _**Warning**_: The global console object's methods are neither consistently
12
12
  * synchronous like the browser APIs they resemble, nor are they consistently
@@ -362,7 +362,7 @@ declare module "node:console" {
362
362
  *
363
363
  * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
364
364
  * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
365
- * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('console')`.
365
+ * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
366
366
  *
367
367
  * _**Warning**_: The global console object's methods are neither consistently
368
368
  * synchronous like the browser APIs they resemble, nor are they consistently
@@ -3389,8 +3389,8 @@ declare module "crypto" {
3389
3389
  * Example:
3390
3390
  *
3391
3391
  * ```js
3392
- * const crypto = require('node:crypto');
3393
- * const { Buffer } = require('node:buffer');
3392
+ * import crypto from 'node:crypto';
3393
+ * import { Buffer } from 'node:buffer';
3394
3394
  *
3395
3395
  * // Hashing a string and return the result as a hex-encoded string.
3396
3396
  * const string = 'Node.js';
@@ -4107,7 +4107,7 @@ declare module "crypto" {
4107
4107
  saltLength: number;
4108
4108
  }
4109
4109
  /**
4110
- * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
4110
+ * Importing the `webcrypto` object (`import { webcrypto } from 'node:crypto'`) gives an instance of the `Crypto` class.
4111
4111
  * `Crypto` is a singleton that provides access to the remainder of the crypto API.
4112
4112
  * @since v15.0.0
4113
4113
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The `dns.promises` API provides an alternative set of asynchronous DNS methods
3
3
  * that return `Promise` objects rather than using callbacks. The API is accessible
4
- * via `require('node:dns').promises` or `require('node:dns/promises')`.
4
+ * via `import { promises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`.
5
5
  * @since v10.6.0
6
6
  */
7
7
  declare module "dns/promises" {
@@ -60,7 +60,7 @@ declare module "dns/promises" {
60
60
  * Example usage:
61
61
  *
62
62
  * ```js
63
- * const dns = require('node:dns');
63
+ * import dns from 'node:dns';
64
64
  * const dnsPromises = dns.promises;
65
65
  * const options = {
66
66
  * family: 6,
@@ -96,8 +96,8 @@ declare module "dns/promises" {
96
96
  * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
97
97
  *
98
98
  * ```js
99
- * const dnsPromises = require('node:dns').promises;
100
- * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
99
+ * import dns from 'node:dns';
100
+ * dns.promises.lookupService('127.0.0.1', 22).then((result) => {
101
101
  * console.log(result.hostname, result.service);
102
102
  * // Prints: localhost ssh
103
103
  * });
@@ -394,7 +394,8 @@ declare module "dns/promises" {
394
394
  * other resolvers:
395
395
  *
396
396
  * ```js
397
- * const { Resolver } = require('node:dns').promises;
397
+ * import dns from 'node:dns';
398
+ * const { Resolver } = dns.promises;
398
399
  * const resolver = new Resolver();
399
400
  * resolver.setServers(['4.4.4.4']);
400
401
  *
@@ -9,7 +9,7 @@
9
9
  * system do, use {@link lookup}.
10
10
  *
11
11
  * ```js
12
- * const dns = require('node:dns');
12
+ * import dns from 'node:dns';
13
13
  *
14
14
  * dns.lookup('example.org', (err, address, family) => {
15
15
  * console.log('address: %j family: IPv%s', address, family);
@@ -23,7 +23,7 @@
23
23
  * DNS queries, bypassing other name-resolution facilities.
24
24
  *
25
25
  * ```js
26
- * const dns = require('node:dns');
26
+ * import dns from 'node:dns';
27
27
  *
28
28
  * dns.resolve4('archive.org', (err, addresses) => {
29
29
  * if (err) throw err;
@@ -138,7 +138,7 @@ declare module "dns" {
138
138
  * Example usage:
139
139
  *
140
140
  * ```js
141
- * const dns = require('node:dns');
141
+ * import dns from 'node:dns';
142
142
  * const options = {
143
143
  * family: 6,
144
144
  * hints: dns.ADDRCONFIG | dns.V4MAPPED,
@@ -198,7 +198,7 @@ declare module "dns" {
198
198
  * where `err.code` is the error code.
199
199
  *
200
200
  * ```js
201
- * const dns = require('node:dns');
201
+ * import dns from 'node:dns';
202
202
  * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
203
203
  * console.log(hostname, service);
204
204
  * // Prints: localhost ssh
@@ -786,7 +786,7 @@ declare module "dns" {
786
786
  * other resolvers:
787
787
  *
788
788
  * ```js
789
- * const { Resolver } = require('node:dns');
789
+ * import { Resolver } from 'node:dns';
790
790
  * const resolver = new Resolver();
791
791
  * resolver.setServers(['4.4.4.4']);
792
792
  *
@@ -63,8 +63,8 @@ declare module "domain" {
63
63
  * This is the most basic way to use a domain.
64
64
  *
65
65
  * ```js
66
- * const domain = require('node:domain');
67
- * const fs = require('node:fs');
66
+ * import domain from 'node:domain';
67
+ * import fs from 'node:fs';
68
68
  * const d = domain.create();
69
69
  * d.on('error', (er) => {
70
70
  * console.error('Caught error!', er);
@@ -304,12 +304,12 @@ declare module "events" {
304
304
  emitter: NodeJS.EventEmitter,
305
305
  eventName: string | symbol,
306
306
  options?: StaticEventEmitterIteratorOptions,
307
- ): AsyncIterableIterator<any[]>;
307
+ ): NodeJS.AsyncIterator<any[]>;
308
308
  static on(
309
309
  emitter: EventTarget,
310
310
  eventName: string,
311
311
  options?: StaticEventEmitterIteratorOptions,
312
- ): AsyncIterableIterator<any[]>;
312
+ ): NodeJS.AsyncIterator<any[]>;
313
313
  /**
314
314
  * A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`.
315
315
  *
@@ -396,7 +396,7 @@ declare module "events" {
396
396
  * ```
397
397
  * @since v15.4.0
398
398
  * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
399
- * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
399
+ * @param eventTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
400
400
  * objects.
401
401
  */
402
402
  static setMaxListeners(n?: number, ...eventTargets: Array<EventTarget | NodeJS.EventEmitter>): void;
@@ -929,7 +929,7 @@ declare module "fs/promises" {
929
929
  * The `fsPromises.mkdtemp()` method will append the six randomly selected
930
930
  * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing
931
931
  * platform-specific path separator
932
- * (`require('node:path').sep`).
932
+ * (`import { sep } from 'node:node:path'`).
933
933
  * @since v10.0.0
934
934
  * @return Fulfills with a string containing the file system path of the newly created temporary directory.
935
935
  */
@@ -1171,7 +1171,7 @@ declare module "fs/promises" {
1171
1171
  * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
1172
1172
  *
1173
1173
  * ```js
1174
- * const { watch } = require('node:fs/promises');
1174
+ * import { watch } from 'node:fs/promises';
1175
1175
  *
1176
1176
  * const ac = new AbortController();
1177
1177
  * const { signal } = ac;
@@ -282,7 +282,7 @@ declare module "fs" {
282
282
  /**
283
283
  * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
284
284
  */
285
- [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
285
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<Dirent>;
286
286
  /**
287
287
  * Asynchronously close the directory's underlying resource handle.
288
288
  * Subsequent reads will result in errors.
@@ -1898,7 +1898,7 @@ declare module "fs" {
1898
1898
  * The `fs.mkdtemp()` method will append the six randomly selected characters
1899
1899
  * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
1900
1900
  * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
1901
- * (`require('node:path').sep`).
1901
+ * (`import { sep } from 'node:node:path'`).
1902
1902
  *
1903
1903
  * ```js
1904
1904
  * import { tmpdir } from 'node:os';