@emulsify/cli 1.11.3 → 1.12.0

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 (149) hide show
  1. package/dist/index.js +3 -1
  2. package/dist/node_modules/.package-lock.json +34 -24
  3. package/dist/node_modules/@types/node/README.md +2 -2
  4. package/dist/node_modules/@types/node/assert.d.ts +23 -1
  5. package/dist/node_modules/@types/node/async_hooks.d.ts +64 -0
  6. package/dist/node_modules/@types/node/buffer.buffer.d.ts +124 -38
  7. package/dist/node_modules/@types/node/buffer.d.ts +19 -17
  8. package/dist/node_modules/@types/node/child_process.d.ts +88 -161
  9. package/dist/node_modules/@types/node/cluster.d.ts +5 -6
  10. package/dist/node_modules/@types/node/constants.d.ts +14 -12
  11. package/dist/node_modules/@types/node/crypto.d.ts +237 -171
  12. package/dist/node_modules/@types/node/dgram.d.ts +15 -14
  13. package/dist/node_modules/@types/node/diagnostics_channel.d.ts +39 -15
  14. package/dist/node_modules/@types/node/dns/promises.d.ts +11 -9
  15. package/dist/node_modules/@types/node/dns.d.ts +28 -21
  16. package/dist/node_modules/@types/node/events.d.ts +81 -35
  17. package/dist/node_modules/@types/node/fs/promises.d.ts +61 -36
  18. package/dist/node_modules/@types/node/fs.d.ts +251 -193
  19. package/dist/node_modules/@types/node/globals.d.ts +146 -442
  20. package/dist/node_modules/@types/node/globals.typedarray.d.ts +17 -0
  21. package/dist/node_modules/@types/node/http.d.ts +137 -32
  22. package/dist/node_modules/@types/node/http2.d.ts +102 -26
  23. package/dist/node_modules/@types/node/https.d.ts +94 -60
  24. package/dist/node_modules/@types/node/index.d.ts +5 -3
  25. package/dist/node_modules/@types/node/{inspector.d.ts → inspector.generated.d.ts} +272 -2
  26. package/dist/node_modules/@types/node/module.d.ts +362 -138
  27. package/dist/node_modules/@types/node/net.d.ts +27 -20
  28. package/dist/node_modules/@types/node/os.d.ts +14 -3
  29. package/dist/node_modules/@types/node/package.json +4 -89
  30. package/dist/node_modules/@types/node/perf_hooks.d.ts +37 -10
  31. package/dist/node_modules/@types/node/process.d.ts +108 -35
  32. package/dist/node_modules/@types/node/querystring.d.ts +2 -3
  33. package/dist/node_modules/@types/node/readline/promises.d.ts +15 -3
  34. package/dist/node_modules/@types/node/readline.d.ts +66 -17
  35. package/dist/node_modules/@types/node/stream/consumers.d.ts +33 -7
  36. package/dist/node_modules/@types/node/stream/web.d.ts +13 -4
  37. package/dist/node_modules/@types/node/stream.d.ts +963 -1014
  38. package/dist/node_modules/@types/node/string_decoder.d.ts +2 -2
  39. package/dist/node_modules/@types/node/test.d.ts +1504 -1655
  40. package/dist/node_modules/@types/node/timers/promises.d.ts +28 -17
  41. package/dist/node_modules/@types/node/timers.d.ts +157 -111
  42. package/dist/node_modules/@types/node/tls.d.ts +105 -67
  43. package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +120 -37
  44. package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +15 -0
  45. package/dist/node_modules/@types/node/ts5.6/index.d.ts +5 -3
  46. package/dist/node_modules/@types/node/url.d.ts +10 -1
  47. package/dist/node_modules/@types/node/util.d.ts +43 -10
  48. package/dist/node_modules/@types/node/v8.d.ts +7 -6
  49. package/dist/node_modules/@types/node/vm.d.ts +148 -70
  50. package/dist/node_modules/@types/node/wasi.d.ts +1 -1
  51. package/dist/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  52. package/dist/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  53. package/dist/node_modules/@types/node/web-globals/events.d.ts +97 -0
  54. package/dist/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
  55. package/dist/node_modules/@types/node/worker_threads.d.ts +60 -39
  56. package/dist/node_modules/@types/node/zlib.d.ts +21 -20
  57. package/dist/node_modules/debug/package.json +7 -3
  58. package/dist/node_modules/debug/src/browser.js +2 -1
  59. package/dist/node_modules/debug/src/common.js +57 -39
  60. package/dist/node_modules/fast-uri/.github/dependabot.yml +1 -1
  61. package/dist/node_modules/fast-uri/.github/workflows/ci.yml +81 -3
  62. package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +6 -2
  63. package/dist/node_modules/fast-uri/LICENSE +3 -1
  64. package/dist/node_modules/fast-uri/README.md +55 -37
  65. package/dist/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
  66. package/dist/node_modules/fast-uri/benchmark/equal.mjs +51 -0
  67. package/dist/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
  68. package/dist/node_modules/fast-uri/benchmark/package.json +17 -0
  69. package/dist/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
  70. package/dist/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
  71. package/dist/node_modules/fast-uri/eslint.config.js +6 -0
  72. package/dist/node_modules/fast-uri/index.js +98 -61
  73. package/dist/node_modules/fast-uri/lib/schemes.js +160 -81
  74. package/dist/node_modules/fast-uri/lib/utils.js +217 -123
  75. package/dist/node_modules/fast-uri/package.json +44 -14
  76. package/dist/node_modules/fast-uri/test/ajv.test.js +7 -3
  77. package/dist/node_modules/fast-uri/test/equal.test.js +7 -2
  78. package/dist/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
  79. package/dist/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
  80. package/dist/node_modules/fast-uri/test/parse.test.js +31 -31
  81. package/dist/node_modules/fast-uri/test/resolve.test.js +52 -49
  82. package/dist/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
  83. package/dist/node_modules/fast-uri/test/serialize.test.js +55 -47
  84. package/dist/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
  85. package/dist/node_modules/fast-uri/test/uri-js.test.js +230 -230
  86. package/dist/node_modules/fast-uri/test/util.test.js +23 -8
  87. package/dist/node_modules/fast-uri/tsconfig.json +9 -0
  88. package/dist/node_modules/fast-uri/types/index.d.ts +16 -9
  89. package/dist/node_modules/fast-uri/types/index.test-d.ts +9 -9
  90. package/dist/node_modules/fs-extra/LICENSE +1 -1
  91. package/dist/node_modules/fs-extra/README.md +3 -1
  92. package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +11 -1
  93. package/dist/node_modules/fs-extra/lib/copy/copy.js +13 -15
  94. package/dist/node_modules/fs-extra/lib/fs/index.js +6 -0
  95. package/dist/node_modules/fs-extra/lib/util/async.js +29 -0
  96. package/dist/node_modules/fs-extra/lib/util/stat.js +2 -1
  97. package/dist/node_modules/fs-extra/package.json +1 -1
  98. package/dist/node_modules/jsonfile/README.md +1 -1
  99. package/dist/node_modules/jsonfile/index.js +3 -3
  100. package/dist/node_modules/jsonfile/package.json +1 -1
  101. package/dist/node_modules/simple-git/dist/cjs/index.js +235 -235
  102. package/dist/node_modules/simple-git/dist/cjs/index.js.map +3 -3
  103. package/dist/node_modules/simple-git/dist/esm/index.js +229 -233
  104. package/dist/node_modules/simple-git/dist/esm/index.js.map +3 -3
  105. package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +1 -1
  106. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +1 -1
  107. package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +2 -3
  108. package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +2 -3
  109. package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +0 -1
  110. package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +1 -1
  111. package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +2 -2
  112. package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +1 -1
  113. package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +1 -1
  114. package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +1 -1
  115. package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +3 -3
  116. package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +1 -1
  117. package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +4 -2
  118. package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +3 -3
  119. package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +1 -1
  120. package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +2 -2
  121. package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +1 -1
  122. package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +9 -13
  123. package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +5 -6
  124. package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +5 -7
  125. package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +0 -1
  126. package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +1 -1
  127. package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +1 -1
  128. package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +11 -10
  129. package/dist/node_modules/simple-git/package.json +6 -6
  130. package/dist/node_modules/simple-git/readme.md +8 -0
  131. package/dist/node_modules/undici-types/dispatcher.d.ts +1 -0
  132. package/dist/node_modules/undici-types/eventsource.d.ts +0 -2
  133. package/dist/node_modules/undici-types/filereader.d.ts +1 -1
  134. package/dist/node_modules/undici-types/interceptors.d.ts +3 -1
  135. package/dist/node_modules/undici-types/package.json +1 -1
  136. package/dist/node_modules/undici-types/patch.d.ts +0 -38
  137. package/dist/node_modules/undici-types/readable.d.ts +5 -0
  138. package/dist/node_modules/undici-types/webidl.d.ts +6 -0
  139. package/dist/node_modules/undici-types/websocket.d.ts +0 -2
  140. package/dist/package-lock.json +969 -1002
  141. package/dist/package.json +1 -1
  142. package/dist/util/getAvailableStarters.js +2 -2
  143. package/package.json +1 -1
  144. package/dist/node_modules/@types/node/dom-events.d.ts +0 -124
  145. package/dist/node_modules/fast-uri/benchmark.js +0 -105
  146. package/dist/node_modules/fast-uri/lib/scopedChars.js +0 -30
  147. package/dist/node_modules/fast-uri/test/.gitkeep +0 -0
  148. package/dist/node_modules/fast-uri/test/compatibility.test.js +0 -131
  149. package/dist/node_modules/jsonfile/CHANGELOG.md +0 -171
@@ -66,11 +66,11 @@
66
66
  * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js)
67
67
  */
68
68
  declare module "child_process" {
69
- import { ObjectEncodingOptions } from "node:fs";
69
+ import { NonSharedBuffer } from "node:buffer";
70
70
  import { Abortable, EventEmitter } from "node:events";
71
71
  import * as dgram from "node:dgram";
72
72
  import * as net from "node:net";
73
- import { Pipe, Readable, Stream, Writable } from "node:stream";
73
+ import { Readable, Stream, Writable } from "node:stream";
74
74
  import { URL } from "node:url";
75
75
  type Serializable = string | object | number | boolean | bigint;
76
76
  type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
@@ -140,7 +140,7 @@ declare module "child_process" {
140
140
  * no IPC channel exists, this property is `undefined`.
141
141
  * @since v7.1.0
142
142
  */
143
- readonly channel?: Pipe | null | undefined;
143
+ readonly channel?: Control | null;
144
144
  /**
145
145
  * A sparse array of pipes to the child process, corresponding with positions in
146
146
  * the `stdio` option passed to {@link spawn} that have been set
@@ -613,6 +613,10 @@ declare module "child_process" {
613
613
  Readable | Writable | null | undefined, // extra, no modification
614
614
  ];
615
615
  }
616
+ interface Control extends EventEmitter {
617
+ ref(): void;
618
+ unref(): void;
619
+ }
616
620
  interface MessageOptions {
617
621
  keepOpen?: boolean | undefined;
618
622
  }
@@ -887,18 +891,20 @@ declare module "child_process" {
887
891
  signal?: AbortSignal | undefined;
888
892
  maxBuffer?: number | undefined;
889
893
  killSignal?: NodeJS.Signals | number | undefined;
894
+ encoding?: string | null | undefined;
890
895
  }
891
896
  interface ExecOptionsWithStringEncoding extends ExecOptions {
892
- encoding: BufferEncoding;
897
+ encoding?: BufferEncoding | undefined;
893
898
  }
894
899
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
895
- encoding: BufferEncoding | null; // specify `null`.
900
+ encoding: "buffer" | null; // specify `null`.
896
901
  }
902
+ // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
897
903
  interface ExecException extends Error {
898
- cmd?: string | undefined;
899
- killed?: boolean | undefined;
900
- code?: number | undefined;
901
- signal?: NodeJS.Signals | undefined;
904
+ cmd?: string;
905
+ killed?: boolean;
906
+ code?: number;
907
+ signal?: NodeJS.Signals;
902
908
  stdout?: string;
903
909
  stderr?: string;
904
910
  }
@@ -995,39 +1001,24 @@ declare module "child_process" {
995
1001
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
996
1002
  function exec(
997
1003
  command: string,
998
- options: {
999
- encoding: "buffer" | null;
1000
- } & ExecOptions,
1001
- callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
1004
+ options: ExecOptionsWithBufferEncoding,
1005
+ callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1002
1006
  ): ChildProcess;
1003
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1007
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1004
1008
  function exec(
1005
1009
  command: string,
1006
- options: {
1007
- encoding: BufferEncoding;
1008
- } & ExecOptions,
1009
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1010
- ): ChildProcess;
1011
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1012
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1013
- function exec(
1014
- command: string,
1015
- options: {
1016
- encoding: BufferEncoding;
1017
- } & ExecOptions,
1018
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1019
- ): ChildProcess;
1020
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
1021
- function exec(
1022
- command: string,
1023
- options: ExecOptions,
1010
+ options: ExecOptionsWithStringEncoding,
1024
1011
  callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1025
1012
  ): ChildProcess;
1026
1013
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1027
1014
  function exec(
1028
1015
  command: string,
1029
- options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
1030
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1016
+ options: ExecOptions | undefined | null,
1017
+ callback?: (
1018
+ error: ExecException | null,
1019
+ stdout: string | NonSharedBuffer,
1020
+ stderr: string | NonSharedBuffer,
1021
+ ) => void,
1031
1022
  ): ChildProcess;
1032
1023
  interface PromiseWithChild<T> extends Promise<T> {
1033
1024
  child: ChildProcess;
@@ -1039,35 +1030,24 @@ declare module "child_process" {
1039
1030
  }>;
1040
1031
  function __promisify__(
1041
1032
  command: string,
1042
- options: {
1043
- encoding: "buffer" | null;
1044
- } & ExecOptions,
1045
- ): PromiseWithChild<{
1046
- stdout: Buffer;
1047
- stderr: Buffer;
1048
- }>;
1049
- function __promisify__(
1050
- command: string,
1051
- options: {
1052
- encoding: BufferEncoding;
1053
- } & ExecOptions,
1033
+ options: ExecOptionsWithBufferEncoding,
1054
1034
  ): PromiseWithChild<{
1055
- stdout: string;
1056
- stderr: string;
1035
+ stdout: NonSharedBuffer;
1036
+ stderr: NonSharedBuffer;
1057
1037
  }>;
1058
1038
  function __promisify__(
1059
1039
  command: string,
1060
- options: ExecOptions,
1040
+ options: ExecOptionsWithStringEncoding,
1061
1041
  ): PromiseWithChild<{
1062
1042
  stdout: string;
1063
1043
  stderr: string;
1064
1044
  }>;
1065
1045
  function __promisify__(
1066
1046
  command: string,
1067
- options?: (ObjectEncodingOptions & ExecOptions) | null,
1047
+ options: ExecOptions | undefined | null,
1068
1048
  ): PromiseWithChild<{
1069
- stdout: string | Buffer;
1070
- stderr: string | Buffer;
1049
+ stdout: string | NonSharedBuffer;
1050
+ stderr: string | NonSharedBuffer;
1071
1051
  }>;
1072
1052
  }
1073
1053
  interface ExecFileOptions extends CommonOptions, Abortable {
@@ -1076,20 +1056,21 @@ declare module "child_process" {
1076
1056
  windowsVerbatimArguments?: boolean | undefined;
1077
1057
  shell?: boolean | string | undefined;
1078
1058
  signal?: AbortSignal | undefined;
1059
+ encoding?: string | null | undefined;
1079
1060
  }
1080
1061
  interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
1081
- encoding: BufferEncoding;
1062
+ encoding?: BufferEncoding | undefined;
1082
1063
  }
1083
1064
  interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
1084
1065
  encoding: "buffer" | null;
1085
1066
  }
1086
- interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
1087
- encoding: BufferEncoding;
1088
- }
1067
+ /** @deprecated Use `ExecFileOptions` instead. */
1068
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
1069
+ // TODO: execFile exceptions can take many forms... this accurately describes none of them
1089
1070
  type ExecFileException =
1090
1071
  & Omit<ExecException, "code">
1091
1072
  & Omit<NodeJS.ErrnoException, "code">
1092
- & { code?: string | number | undefined | null };
1073
+ & { code?: string | number | null };
1093
1074
  /**
1094
1075
  * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
1095
1076
  * executable `file` is spawned directly as a new process making it slightly more
@@ -1153,91 +1134,63 @@ declare module "child_process" {
1153
1134
  * @param args List of string arguments.
1154
1135
  * @param callback Called with the output when process terminates.
1155
1136
  */
1156
- function execFile(file: string): ChildProcess;
1157
- function execFile(
1158
- file: string,
1159
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1160
- ): ChildProcess;
1161
- function execFile(file: string, args?: readonly string[] | null): ChildProcess;
1162
- function execFile(
1163
- file: string,
1164
- args: readonly string[] | undefined | null,
1165
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1166
- ): ChildProcess;
1167
1137
  // no `options` definitely means stdout/stderr are `string`.
1168
1138
  function execFile(
1169
1139
  file: string,
1170
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1140
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1171
1141
  ): ChildProcess;
1172
1142
  function execFile(
1173
1143
  file: string,
1174
1144
  args: readonly string[] | undefined | null,
1175
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1145
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1176
1146
  ): ChildProcess;
1177
1147
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1178
1148
  function execFile(
1179
1149
  file: string,
1180
1150
  options: ExecFileOptionsWithBufferEncoding,
1181
- callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1151
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1182
1152
  ): ChildProcess;
1183
1153
  function execFile(
1184
1154
  file: string,
1185
1155
  args: readonly string[] | undefined | null,
1186
1156
  options: ExecFileOptionsWithBufferEncoding,
1187
- callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1157
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1188
1158
  ): ChildProcess;
1189
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1159
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1190
1160
  function execFile(
1191
1161
  file: string,
1192
1162
  options: ExecFileOptionsWithStringEncoding,
1193
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1163
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1194
1164
  ): ChildProcess;
1195
1165
  function execFile(
1196
1166
  file: string,
1197
1167
  args: readonly string[] | undefined | null,
1198
1168
  options: ExecFileOptionsWithStringEncoding,
1199
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1200
- ): ChildProcess;
1201
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1202
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1203
- function execFile(
1204
- file: string,
1205
- options: ExecFileOptionsWithOtherEncoding,
1206
- callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1207
- ): ChildProcess;
1208
- function execFile(
1209
- file: string,
1210
- args: readonly string[] | undefined | null,
1211
- options: ExecFileOptionsWithOtherEncoding,
1212
- callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1213
- ): ChildProcess;
1214
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
1215
- function execFile(
1216
- file: string,
1217
- options: ExecFileOptions,
1218
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1219
- ): ChildProcess;
1220
- function execFile(
1221
- file: string,
1222
- args: readonly string[] | undefined | null,
1223
- options: ExecFileOptions,
1224
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1169
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1225
1170
  ): ChildProcess;
1226
1171
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1227
1172
  function execFile(
1228
1173
  file: string,
1229
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1174
+ options: ExecFileOptions | undefined | null,
1230
1175
  callback:
1231
- | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1176
+ | ((
1177
+ error: ExecFileException | null,
1178
+ stdout: string | NonSharedBuffer,
1179
+ stderr: string | NonSharedBuffer,
1180
+ ) => void)
1232
1181
  | undefined
1233
1182
  | null,
1234
1183
  ): ChildProcess;
1235
1184
  function execFile(
1236
1185
  file: string,
1237
1186
  args: readonly string[] | undefined | null,
1238
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1187
+ options: ExecFileOptions | undefined | null,
1239
1188
  callback:
1240
- | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1189
+ | ((
1190
+ error: ExecFileException | null,
1191
+ stdout: string | NonSharedBuffer,
1192
+ stderr: string | NonSharedBuffer,
1193
+ ) => void)
1241
1194
  | undefined
1242
1195
  | null,
1243
1196
  ): ChildProcess;
@@ -1257,16 +1210,16 @@ declare module "child_process" {
1257
1210
  file: string,
1258
1211
  options: ExecFileOptionsWithBufferEncoding,
1259
1212
  ): PromiseWithChild<{
1260
- stdout: Buffer;
1261
- stderr: Buffer;
1213
+ stdout: NonSharedBuffer;
1214
+ stderr: NonSharedBuffer;
1262
1215
  }>;
1263
1216
  function __promisify__(
1264
1217
  file: string,
1265
1218
  args: readonly string[] | undefined | null,
1266
1219
  options: ExecFileOptionsWithBufferEncoding,
1267
1220
  ): PromiseWithChild<{
1268
- stdout: Buffer;
1269
- stderr: Buffer;
1221
+ stdout: NonSharedBuffer;
1222
+ stderr: NonSharedBuffer;
1270
1223
  }>;
1271
1224
  function __promisify__(
1272
1225
  file: string,
@@ -1285,48 +1238,18 @@ declare module "child_process" {
1285
1238
  }>;
1286
1239
  function __promisify__(
1287
1240
  file: string,
1288
- options: ExecFileOptionsWithOtherEncoding,
1241
+ options: ExecFileOptions | undefined | null,
1289
1242
  ): PromiseWithChild<{
1290
- stdout: string | Buffer;
1291
- stderr: string | Buffer;
1243
+ stdout: string | NonSharedBuffer;
1244
+ stderr: string | NonSharedBuffer;
1292
1245
  }>;
1293
1246
  function __promisify__(
1294
1247
  file: string,
1295
1248
  args: readonly string[] | undefined | null,
1296
- options: ExecFileOptionsWithOtherEncoding,
1249
+ options: ExecFileOptions | undefined | null,
1297
1250
  ): PromiseWithChild<{
1298
- stdout: string | Buffer;
1299
- stderr: string | Buffer;
1300
- }>;
1301
- function __promisify__(
1302
- file: string,
1303
- options: ExecFileOptions,
1304
- ): PromiseWithChild<{
1305
- stdout: string;
1306
- stderr: string;
1307
- }>;
1308
- function __promisify__(
1309
- file: string,
1310
- args: readonly string[] | undefined | null,
1311
- options: ExecFileOptions,
1312
- ): PromiseWithChild<{
1313
- stdout: string;
1314
- stderr: string;
1315
- }>;
1316
- function __promisify__(
1317
- file: string,
1318
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1319
- ): PromiseWithChild<{
1320
- stdout: string | Buffer;
1321
- stderr: string | Buffer;
1322
- }>;
1323
- function __promisify__(
1324
- file: string,
1325
- args: readonly string[] | undefined | null,
1326
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1327
- ): PromiseWithChild<{
1328
- stdout: string | Buffer;
1329
- stderr: string | Buffer;
1251
+ stdout: string | NonSharedBuffer;
1252
+ stderr: string | NonSharedBuffer;
1330
1253
  }>;
1331
1254
  }
1332
1255
  interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
@@ -1415,7 +1338,7 @@ declare module "child_process" {
1415
1338
  stderr: T;
1416
1339
  status: number | null;
1417
1340
  signal: NodeJS.Signals | null;
1418
- error?: Error | undefined;
1341
+ error?: Error;
1419
1342
  }
1420
1343
  /**
1421
1344
  * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
@@ -1432,11 +1355,11 @@ declare module "child_process" {
1432
1355
  * @param command The command to run.
1433
1356
  * @param args List of string arguments.
1434
1357
  */
1435
- function spawnSync(command: string): SpawnSyncReturns<Buffer>;
1358
+ function spawnSync(command: string): SpawnSyncReturns<NonSharedBuffer>;
1436
1359
  function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1437
- function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1438
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1439
- function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<Buffer>;
1360
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<NonSharedBuffer>;
1361
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | NonSharedBuffer>;
1362
+ function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<NonSharedBuffer>;
1440
1363
  function spawnSync(
1441
1364
  command: string,
1442
1365
  args: readonly string[],
@@ -1446,12 +1369,12 @@ declare module "child_process" {
1446
1369
  command: string,
1447
1370
  args: readonly string[],
1448
1371
  options: SpawnSyncOptionsWithBufferEncoding,
1449
- ): SpawnSyncReturns<Buffer>;
1372
+ ): SpawnSyncReturns<NonSharedBuffer>;
1450
1373
  function spawnSync(
1451
1374
  command: string,
1452
1375
  args?: readonly string[],
1453
1376
  options?: SpawnSyncOptions,
1454
- ): SpawnSyncReturns<string | Buffer>;
1377
+ ): SpawnSyncReturns<string | NonSharedBuffer>;
1455
1378
  interface CommonExecOptions extends CommonOptions {
1456
1379
  input?: string | NodeJS.ArrayBufferView | undefined;
1457
1380
  /**
@@ -1493,10 +1416,10 @@ declare module "child_process" {
1493
1416
  * @param command The command to run.
1494
1417
  * @return The stdout from the command.
1495
1418
  */
1496
- function execSync(command: string): Buffer;
1419
+ function execSync(command: string): NonSharedBuffer;
1497
1420
  function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
1498
- function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
1499
- function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
1421
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
1422
+ function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
1500
1423
  interface ExecFileSyncOptions extends CommonExecOptions {
1501
1424
  shell?: boolean | string | undefined;
1502
1425
  }
@@ -1504,7 +1427,7 @@ declare module "child_process" {
1504
1427
  encoding: BufferEncoding;
1505
1428
  }
1506
1429
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
1507
- encoding?: "buffer" | null; // specify `null`.
1430
+ encoding?: "buffer" | null | undefined; // specify `null`.
1508
1431
  }
1509
1432
  /**
1510
1433
  * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
@@ -1526,11 +1449,11 @@ declare module "child_process" {
1526
1449
  * @param args List of string arguments.
1527
1450
  * @return The stdout from the command.
1528
1451
  */
1529
- function execFileSync(file: string): Buffer;
1452
+ function execFileSync(file: string): NonSharedBuffer;
1530
1453
  function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1531
- function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1532
- function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
1533
- function execFileSync(file: string, args: readonly string[]): Buffer;
1454
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
1455
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
1456
+ function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
1534
1457
  function execFileSync(
1535
1458
  file: string,
1536
1459
  args: readonly string[],
@@ -1540,8 +1463,12 @@ declare module "child_process" {
1540
1463
  file: string,
1541
1464
  args: readonly string[],
1542
1465
  options: ExecFileSyncOptionsWithBufferEncoding,
1543
- ): Buffer;
1544
- function execFileSync(file: string, args?: readonly string[], options?: ExecFileSyncOptions): string | Buffer;
1466
+ ): NonSharedBuffer;
1467
+ function execFileSync(
1468
+ file: string,
1469
+ args?: readonly string[],
1470
+ options?: ExecFileSyncOptions,
1471
+ ): string | NonSharedBuffer;
1545
1472
  }
1546
1473
  declare module "node:child_process" {
1547
1474
  export * from "child_process";
@@ -72,7 +72,7 @@ declare module "cluster" {
72
72
  * String arguments passed to worker.
73
73
  * @default process.argv.slice(2)
74
74
  */
75
- args?: string[] | undefined;
75
+ args?: readonly string[] | undefined;
76
76
  /**
77
77
  * Whether or not to send output to parent's stdio.
78
78
  * @default false
@@ -265,7 +265,7 @@ declare module "cluster" {
265
265
  * @since v0.7.7
266
266
  * @return A reference to `worker`.
267
267
  */
268
- disconnect(): void;
268
+ disconnect(): this;
269
269
  /**
270
270
  * This function returns `true` if the worker is connected to its primary via its
271
271
  * IPC channel, `false` otherwise. A worker is connected to its primary after it
@@ -480,7 +480,7 @@ declare module "cluster" {
480
480
  * ```
481
481
  * @since v0.7.0
482
482
  */
483
- readonly worker?: Worker | undefined;
483
+ readonly worker?: Worker;
484
484
  /**
485
485
  * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
486
486
  *
@@ -496,7 +496,7 @@ declare module "cluster" {
496
496
  * ```
497
497
  * @since v0.7.0
498
498
  */
499
- readonly workers?: NodeJS.Dict<Worker> | undefined;
499
+ readonly workers?: NodeJS.Dict<Worker>;
500
500
  readonly SCHED_NONE: number;
501
501
  readonly SCHED_RR: number;
502
502
  /**
@@ -549,10 +549,9 @@ declare module "cluster" {
549
549
  prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
550
550
  prependListener(event: "fork", listener: (worker: Worker) => void): this;
551
551
  prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
552
- // the handle is a net.Socket or net.Server object, or undefined.
553
552
  prependListener(
554
553
  event: "message",
555
- listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void,
554
+ listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
556
555
  ): this;
557
556
  prependListener(event: "online", listener: (worker: Worker) => void): this;
558
557
  prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
@@ -1,16 +1,18 @@
1
- /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
1
+ /**
2
+ * @deprecated The `node:constants` module is deprecated. When requiring access to constants
3
+ * relevant to specific Node.js builtin modules, developers should instead refer
4
+ * to the `constants` property exposed by the relevant module. For instance,
5
+ * `require('node:fs').constants` and `require('node:os').constants`.
6
+ */
2
7
  declare module "constants" {
3
- import { constants as osConstants, SignalConstants } from "node:os";
4
- import { constants as cryptoConstants } from "node:crypto";
5
- import { constants as fsConstants } from "node:fs";
6
-
7
- const exp:
8
- & typeof osConstants.errno
9
- & typeof osConstants.priority
10
- & SignalConstants
11
- & typeof cryptoConstants
12
- & typeof fsConstants;
13
- export = exp;
8
+ const constants:
9
+ & typeof import("node:os").constants.dlopen
10
+ & typeof import("node:os").constants.errno
11
+ & typeof import("node:os").constants.priority
12
+ & typeof import("node:os").constants.signals
13
+ & typeof import("node:fs").constants
14
+ & typeof import("node:crypto").constants;
15
+ export = constants;
14
16
  }
15
17
 
16
18
  declare module "node:constants" {