omegon 0.8.4 → 0.9.1

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 (139) hide show
  1. package/extensions/cleave/dispatcher.ts +213 -20
  2. package/extensions/cleave/rpc-child.ts +269 -0
  3. package/extensions/cleave/types.ts +52 -0
  4. package/node_modules/@types/node/README.md +3 -3
  5. package/node_modules/@types/node/assert/strict.d.ts +11 -5
  6. package/node_modules/@types/node/assert.d.ts +173 -50
  7. package/node_modules/@types/node/async_hooks.d.ts +8 -28
  8. package/node_modules/@types/node/buffer.buffer.d.ts +7 -1
  9. package/node_modules/@types/node/buffer.d.ts +168 -44
  10. package/node_modules/@types/node/child_process.d.ts +70 -27
  11. package/node_modules/@types/node/cluster.d.ts +332 -240
  12. package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  13. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  14. package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  15. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
  16. package/node_modules/@types/node/console.d.ts +350 -49
  17. package/node_modules/@types/node/constants.d.ts +4 -3
  18. package/node_modules/@types/node/crypto.d.ts +1110 -630
  19. package/node_modules/@types/node/dgram.d.ts +51 -15
  20. package/node_modules/@types/node/diagnostics_channel.d.ts +6 -4
  21. package/node_modules/@types/node/dns/promises.d.ts +4 -4
  22. package/node_modules/@types/node/dns.d.ts +133 -132
  23. package/node_modules/@types/node/domain.d.ts +17 -13
  24. package/node_modules/@types/node/events.d.ts +663 -734
  25. package/node_modules/@types/node/fs/promises.d.ts +9 -43
  26. package/node_modules/@types/node/fs.d.ts +411 -628
  27. package/node_modules/@types/node/globals.d.ts +30 -8
  28. package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
  29. package/node_modules/@types/node/http.d.ts +265 -364
  30. package/node_modules/@types/node/http2.d.ts +715 -551
  31. package/node_modules/@types/node/https.d.ts +239 -65
  32. package/node_modules/@types/node/index.d.ts +6 -24
  33. package/node_modules/@types/node/inspector.d.ts +53 -69
  34. package/node_modules/@types/node/inspector.generated.d.ts +410 -759
  35. package/node_modules/@types/node/module.d.ts +186 -52
  36. package/node_modules/@types/node/net.d.ts +194 -70
  37. package/node_modules/@types/node/os.d.ts +11 -12
  38. package/node_modules/@types/node/package.json +3 -13
  39. package/node_modules/@types/node/path.d.ts +133 -120
  40. package/node_modules/@types/node/perf_hooks.d.ts +643 -318
  41. package/node_modules/@types/node/process.d.ts +132 -223
  42. package/node_modules/@types/node/punycode.d.ts +5 -5
  43. package/node_modules/@types/node/querystring.d.ts +4 -4
  44. package/node_modules/@types/node/readline/promises.d.ts +3 -3
  45. package/node_modules/@types/node/readline.d.ts +120 -68
  46. package/node_modules/@types/node/repl.d.ts +100 -87
  47. package/node_modules/@types/node/sea.d.ts +1 -10
  48. package/node_modules/@types/node/sqlite.d.ts +19 -363
  49. package/node_modules/@types/node/stream/consumers.d.ts +10 -10
  50. package/node_modules/@types/node/stream/promises.d.ts +15 -136
  51. package/node_modules/@types/node/stream/web.d.ts +502 -176
  52. package/node_modules/@types/node/stream.d.ts +475 -581
  53. package/node_modules/@types/node/string_decoder.d.ts +4 -4
  54. package/node_modules/@types/node/test.d.ts +196 -308
  55. package/node_modules/@types/node/timers/promises.d.ts +4 -4
  56. package/node_modules/@types/node/timers.d.ts +132 -4
  57. package/node_modules/@types/node/tls.d.ts +226 -110
  58. package/node_modules/@types/node/trace_events.d.ts +9 -9
  59. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -1
  60. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
  61. package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
  62. package/node_modules/@types/node/tty.d.ts +16 -58
  63. package/node_modules/@types/node/url.d.ts +573 -130
  64. package/node_modules/@types/node/util.d.ts +1100 -181
  65. package/node_modules/@types/node/v8.d.ts +8 -76
  66. package/node_modules/@types/node/vm.d.ts +72 -280
  67. package/node_modules/@types/node/wasi.d.ts +4 -25
  68. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
  69. package/node_modules/@types/node/web-globals/events.d.ts +0 -9
  70. package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
  71. package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
  72. package/node_modules/@types/node/worker_threads.d.ts +335 -268
  73. package/node_modules/@types/node/zlib.d.ts +74 -9
  74. package/node_modules/undici-types/agent.d.ts +12 -13
  75. package/node_modules/undici-types/api.d.ts +26 -26
  76. package/node_modules/undici-types/balanced-pool.d.ts +12 -13
  77. package/node_modules/undici-types/client.d.ts +19 -19
  78. package/node_modules/undici-types/connector.d.ts +2 -2
  79. package/node_modules/undici-types/cookies.d.ts +0 -2
  80. package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
  81. package/node_modules/undici-types/dispatcher.d.ts +103 -123
  82. package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
  83. package/node_modules/undici-types/errors.d.ts +54 -66
  84. package/node_modules/undici-types/eventsource.d.ts +4 -9
  85. package/node_modules/undici-types/fetch.d.ts +20 -22
  86. package/node_modules/undici-types/file.d.ts +39 -0
  87. package/node_modules/undici-types/filereader.d.ts +54 -0
  88. package/node_modules/undici-types/formdata.d.ts +7 -7
  89. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  90. package/node_modules/undici-types/global-origin.d.ts +5 -5
  91. package/node_modules/undici-types/handlers.d.ts +8 -8
  92. package/node_modules/undici-types/header.d.ts +1 -157
  93. package/node_modules/undici-types/index.d.ts +47 -64
  94. package/node_modules/undici-types/interceptors.d.ts +8 -64
  95. package/node_modules/undici-types/mock-agent.d.ts +18 -36
  96. package/node_modules/undici-types/mock-client.d.ts +4 -6
  97. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  98. package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
  99. package/node_modules/undici-types/mock-pool.d.ts +4 -6
  100. package/node_modules/undici-types/package.json +1 -1
  101. package/node_modules/undici-types/patch.d.ts +4 -0
  102. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  103. package/node_modules/undici-types/pool.d.ts +13 -15
  104. package/node_modules/undici-types/proxy-agent.d.ts +4 -5
  105. package/node_modules/undici-types/readable.d.ts +16 -19
  106. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  107. package/node_modules/undici-types/retry-handler.d.ts +10 -19
  108. package/node_modules/undici-types/util.d.ts +3 -3
  109. package/node_modules/undici-types/webidl.d.ts +29 -142
  110. package/node_modules/undici-types/websocket.d.ts +10 -46
  111. package/package.json +2 -1
  112. package/scripts/check-vendor-dist.mjs +56 -0
  113. package/skills/cleave/SKILL.md +62 -2
  114. package/node_modules/@types/node/inspector/promises.d.ts +0 -41
  115. package/node_modules/@types/node/path/posix.d.ts +0 -8
  116. package/node_modules/@types/node/path/win32.d.ts +0 -8
  117. package/node_modules/@types/node/quic.d.ts +0 -910
  118. package/node_modules/@types/node/test/reporters.d.ts +0 -96
  119. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  120. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  121. package/node_modules/@types/node/ts5.7/index.d.ts +0 -117
  122. package/node_modules/@types/node/util/types.d.ts +0 -558
  123. package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  124. package/node_modules/@types/node/web-globals/console.d.ts +0 -9
  125. package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  126. package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  127. package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  128. package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  129. package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  130. package/node_modules/@types/node/web-globals/streams.d.ts +0 -115
  131. package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  132. package/node_modules/@types/node/web-globals/url.d.ts +0 -24
  133. package/node_modules/undici-types/cache-interceptor.d.ts +0 -173
  134. package/node_modules/undici-types/client-stats.d.ts +0 -15
  135. package/node_modules/undici-types/h2c-client.d.ts +0 -73
  136. package/node_modules/undici-types/mock-call-history.d.ts +0 -111
  137. package/node_modules/undici-types/round-robin-pool.d.ts +0 -41
  138. package/node_modules/undici-types/snapshot-agent.d.ts +0 -109
  139. package/node_modules/undici-types/utility.d.ts +0 -7
@@ -40,11 +40,11 @@
40
40
  * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
41
41
  * environment variables. This will also deactivate the colors in the REPL. For
42
42
  * more on color support in terminal environments, read the tty
43
- * [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation.
43
+ * [`getColorDepth()`](https://nodejs.org/docs/latest-v22.x/api/tty.html#writestreamgetcolordepthenv) documentation.
44
44
  * @since v15.0.0
45
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js)
45
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert/strict.js)
46
46
  */
47
- declare module "node:assert/strict" {
47
+ declare module "assert/strict" {
48
48
  import {
49
49
  Assert,
50
50
  AssertionError,
@@ -52,6 +52,9 @@ declare module "node:assert/strict" {
52
52
  AssertOptions,
53
53
  AssertPredicate,
54
54
  AssertStrict,
55
+ CallTracker,
56
+ CallTrackerCall,
57
+ CallTrackerReportInformation,
55
58
  deepStrictEqual,
56
59
  doesNotMatch,
57
60
  doesNotReject,
@@ -76,6 +79,9 @@ declare module "node:assert/strict" {
76
79
  AssertOptions,
77
80
  AssertPredicate,
78
81
  AssertStrict,
82
+ CallTracker,
83
+ CallTrackerCall,
84
+ CallTrackerReportInformation,
79
85
  deepStrictEqual,
80
86
  deepStrictEqual as deepEqual,
81
87
  doesNotMatch,
@@ -99,7 +105,7 @@ declare module "node:assert/strict" {
99
105
  }
100
106
  export = strict;
101
107
  }
102
- declare module "assert/strict" {
103
- import strict = require("node:assert/strict");
108
+ declare module "node:assert/strict" {
109
+ import strict = require("assert/strict");
104
110
  export = strict;
105
111
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The `node:assert` module provides a set of assertion functions for verifying
3
3
  * invariants.
4
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert.js)
5
5
  */
6
- declare module "node:assert" {
7
- import strict = require("node:assert/strict");
6
+ declare module "assert" {
7
+ import strict = require("assert/strict");
8
8
  /**
9
9
  * An alias of {@link assert.ok}.
10
10
  * @since v0.5.9
@@ -44,13 +44,6 @@ declare module "node:assert" {
44
44
  * @default true
45
45
  */
46
46
  strict?: boolean | undefined;
47
- /**
48
- * If set to `true`, skips prototype and constructor
49
- * comparison in deep equality checks.
50
- * @since v24.9.0
51
- * @default false
52
- */
53
- skipPrototype?: boolean | undefined;
54
47
  }
55
48
  interface Assert extends Pick<typeof assert, AssertMethodNames> {
56
49
  readonly [kOptions]: AssertOptions & { strict: false };
@@ -60,7 +53,7 @@ declare module "node:assert" {
60
53
  }
61
54
  /**
62
55
  * The `Assert` class allows creating independent assertion instances with custom options.
63
- * @since v24.6.0
56
+ * @since v22.19.0
64
57
  */
65
58
  var Assert: {
66
59
  /**
@@ -74,8 +67,7 @@ declare module "node:assert" {
74
67
  * ```
75
68
  *
76
69
  * **Important**: When destructuring assertion methods from an `Assert` instance,
77
- * the methods lose their connection to the instance's configuration options (such
78
- * as `diff`, `strict`, and `skipPrototype` settings).
70
+ * the methods lose their connection to the instance's configuration options (such as `diff` and `strict` settings).
79
71
  * The destructured methods will fall back to default behavior instead.
80
72
  *
81
73
  * ```js
@@ -89,41 +81,14 @@ declare module "node:assert" {
89
81
  * strictEqual({ a: 1 }, { b: { c: 1 } });
90
82
  * ```
91
83
  *
92
- * The `skipPrototype` option affects all deep equality methods:
93
- *
94
- * ```js
95
- * class Foo {
96
- * constructor(a) {
97
- * this.a = a;
98
- * }
99
- * }
100
- *
101
- * class Bar {
102
- * constructor(a) {
103
- * this.a = a;
104
- * }
105
- * }
106
- *
107
- * const foo = new Foo(1);
108
- * const bar = new Bar(1);
109
- *
110
- * // Default behavior - fails due to different constructors
111
- * const assert1 = new Assert();
112
- * assert1.deepStrictEqual(foo, bar); // AssertionError
113
- *
114
- * // Skip prototype comparison - passes if properties are equal
115
- * const assert2 = new Assert({ skipPrototype: true });
116
- * assert2.deepStrictEqual(foo, bar); // OK
117
- * ```
118
- *
119
84
  * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
120
85
  * (diff: 'simple', non-strict mode).
121
86
  * To maintain custom options when using destructured methods, avoid
122
87
  * destructuring and call methods directly on the instance.
123
- * @since v24.6.0
88
+ * @since v22.19.0
124
89
  */
125
90
  new(
126
- options?: AssertOptions & { strict?: true | undefined },
91
+ options?: AssertOptions & { strict?: true },
127
92
  ): AssertStrict;
128
93
  new(
129
94
  options: AssertOptions,
@@ -182,6 +147,152 @@ declare module "node:assert" {
182
147
  */
183
148
  operator: string;
184
149
  }
150
+ /**
151
+ * This feature is deprecated and will be removed in a future version.
152
+ * Please consider using alternatives such as the `mock` helper function.
153
+ * @since v14.2.0, v12.19.0
154
+ * @deprecated Deprecated
155
+ */
156
+ class CallTracker {
157
+ /**
158
+ * The wrapper function is expected to be called exactly `exact` times. If the
159
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
160
+ * error.
161
+ *
162
+ * ```js
163
+ * import assert from 'node:assert';
164
+ *
165
+ * // Creates call tracker.
166
+ * const tracker = new assert.CallTracker();
167
+ *
168
+ * function func() {}
169
+ *
170
+ * // Returns a function that wraps func() that must be called exact times
171
+ * // before tracker.verify().
172
+ * const callsfunc = tracker.calls(func);
173
+ * ```
174
+ * @since v14.2.0, v12.19.0
175
+ * @param [fn='A no-op function']
176
+ * @param [exact=1]
177
+ * @return A function that wraps `fn`.
178
+ */
179
+ calls(exact?: number): () => void;
180
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
181
+ /**
182
+ * Example:
183
+ *
184
+ * ```js
185
+ * import assert from 'node:assert';
186
+ *
187
+ * const tracker = new assert.CallTracker();
188
+ *
189
+ * function func() {}
190
+ * const callsfunc = tracker.calls(func);
191
+ * callsfunc(1, 2, 3);
192
+ *
193
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
194
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
195
+ * ```
196
+ * @since v18.8.0, v16.18.0
197
+ * @return An array with all the calls to a tracked function.
198
+ */
199
+ getCalls(fn: Function): CallTrackerCall[];
200
+ /**
201
+ * The arrays contains information about the expected and actual number of calls of
202
+ * the functions that have not been called the expected number of times.
203
+ *
204
+ * ```js
205
+ * import assert from 'node:assert';
206
+ *
207
+ * // Creates call tracker.
208
+ * const tracker = new assert.CallTracker();
209
+ *
210
+ * function func() {}
211
+ *
212
+ * // Returns a function that wraps func() that must be called exact times
213
+ * // before tracker.verify().
214
+ * const callsfunc = tracker.calls(func, 2);
215
+ *
216
+ * // Returns an array containing information on callsfunc()
217
+ * console.log(tracker.report());
218
+ * // [
219
+ * // {
220
+ * // message: 'Expected the func function to be executed 2 time(s) but was
221
+ * // executed 0 time(s).',
222
+ * // actual: 0,
223
+ * // expected: 2,
224
+ * // operator: 'func',
225
+ * // stack: stack trace
226
+ * // }
227
+ * // ]
228
+ * ```
229
+ * @since v14.2.0, v12.19.0
230
+ * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
231
+ */
232
+ report(): CallTrackerReportInformation[];
233
+ /**
234
+ * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
235
+ * If no arguments are passed, all tracked functions will be reset.
236
+ *
237
+ * ```js
238
+ * import assert from 'node:assert';
239
+ *
240
+ * const tracker = new assert.CallTracker();
241
+ *
242
+ * function func() {}
243
+ * const callsfunc = tracker.calls(func);
244
+ *
245
+ * callsfunc();
246
+ * // Tracker was called once
247
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
248
+ *
249
+ * tracker.reset(callsfunc);
250
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
251
+ * ```
252
+ * @since v18.8.0, v16.18.0
253
+ * @param fn a tracked function to reset.
254
+ */
255
+ reset(fn?: Function): void;
256
+ /**
257
+ * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
258
+ * have not been called the expected number of times.
259
+ *
260
+ * ```js
261
+ * import assert from 'node:assert';
262
+ *
263
+ * // Creates call tracker.
264
+ * const tracker = new assert.CallTracker();
265
+ *
266
+ * function func() {}
267
+ *
268
+ * // Returns a function that wraps func() that must be called exact times
269
+ * // before tracker.verify().
270
+ * const callsfunc = tracker.calls(func, 2);
271
+ *
272
+ * callsfunc();
273
+ *
274
+ * // Will throw an error since callsfunc() was only called once.
275
+ * tracker.verify();
276
+ * ```
277
+ * @since v14.2.0, v12.19.0
278
+ */
279
+ verify(): void;
280
+ }
281
+ interface CallTrackerCall {
282
+ thisArg: object;
283
+ arguments: unknown[];
284
+ }
285
+ interface CallTrackerReportInformation {
286
+ message: string;
287
+ /** The actual number of times the function was called. */
288
+ actual: number;
289
+ /** The number of times the function was expected to be called. */
290
+ expected: number;
291
+ /** The name of the function that is wrapped. */
292
+ operator: string;
293
+ /** A stack trace of the function. */
294
+ stack: object;
295
+ }
185
296
  type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
186
297
  /**
187
298
  * Throws an `AssertionError` with the provided error message or a default
@@ -200,10 +311,22 @@ declare module "node:assert" {
200
311
  * assert.fail(new TypeError('need array'));
201
312
  * // TypeError: need array
202
313
  * ```
314
+ *
315
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
316
+ * See below for further details.
203
317
  * @since v0.1.21
204
318
  * @param [message='Failed']
205
319
  */
206
320
  function fail(message?: string | Error): never;
321
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
322
+ function fail(
323
+ actual: unknown,
324
+ expected: unknown,
325
+ message?: string | Error,
326
+ operator?: string,
327
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
328
+ stackStartFn?: Function,
329
+ ): never;
207
330
  /**
208
331
  * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
209
332
  *
@@ -253,10 +376,10 @@ declare module "node:assert" {
253
376
  * import assert from 'node:assert/strict';
254
377
  *
255
378
  * // Using `assert()` works the same:
256
- * assert(2 + 2 > 5);;
379
+ * assert(0);
257
380
  * // AssertionError: The expression evaluated to a falsy value:
258
381
  * //
259
- * // assert(2 + 2 > 5)
382
+ * // assert(0)
260
383
  * ```
261
384
  * @since v0.1.21
262
385
  */
@@ -771,7 +894,7 @@ declare module "node:assert" {
771
894
  * check that the promise is rejected.
772
895
  *
773
896
  * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
774
- * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
897
+ * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value)
775
898
  * error. In both cases the error handler is skipped.
776
899
  *
777
900
  * Besides the async nature to await the completion behaves identically to {@link throws}.
@@ -841,7 +964,7 @@ declare module "node:assert" {
841
964
  *
842
965
  * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
843
966
  * the function does not return a promise, `assert.doesNotReject()` will return a
844
- * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
967
+ * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value) error. In both cases
845
968
  * the error handler is skipped.
846
969
  *
847
970
  * Using `assert.doesNotReject()` is actually not useful because there is little
@@ -904,7 +1027,7 @@ declare module "node:assert" {
904
1027
  * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
905
1028
  * to the value of the `message` parameter. If the `message` parameter is
906
1029
  * undefined, a default error message is assigned. If the `message` parameter is an
907
- * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
1030
+ * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
908
1031
  * @since v13.6.0, v12.16.0
909
1032
  */
910
1033
  function match(value: string, regExp: RegExp, message?: string | Error): void;
@@ -927,7 +1050,7 @@ declare module "node:assert" {
927
1050
  * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
928
1051
  * to the value of the `message` parameter. If the `message` parameter is
929
1052
  * undefined, a default error message is assigned. If the `message` parameter is an
930
- * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
1053
+ * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
931
1054
  * @since v13.6.0, v12.16.0
932
1055
  */
933
1056
  function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
@@ -949,7 +1072,7 @@ declare module "node:assert" {
949
1072
  }
950
1073
  export = assert;
951
1074
  }
952
- declare module "assert" {
953
- import assert = require("node:assert");
1075
+ declare module "node:assert" {
1076
+ import assert = require("assert");
954
1077
  export = assert;
955
1078
  }
@@ -2,8 +2,8 @@
2
2
  * We strongly discourage the use of the `async_hooks` API.
3
3
  * Other APIs that can cover most of its use cases include:
4
4
  *
5
- * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context
6
- * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
5
+ * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v22.x/api/async_context.html#class-asynclocalstorage) tracks async context
6
+ * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
7
7
  *
8
8
  * The `node:async_hooks` module provides an API to track asynchronous resources.
9
9
  * It can be accessed using:
@@ -12,9 +12,9 @@
12
12
  * import async_hooks from 'node:async_hooks';
13
13
  * ```
14
14
  * @experimental
15
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js)
15
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/async_hooks.js)
16
16
  */
17
- declare module "node:async_hooks" {
17
+ declare module "async_hooks" {
18
18
  /**
19
19
  * ```js
20
20
  * import { executionAsyncId } from 'node:async_hooks';
@@ -44,7 +44,7 @@ declare module "node:async_hooks" {
44
44
  * ```
45
45
  *
46
46
  * Promise contexts may not get precise `executionAsyncIds` by default.
47
- * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
47
+ * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
48
48
  * @since v8.1.0
49
49
  * @return The `asyncId` of the current execution context. Useful to track when something calls.
50
50
  */
@@ -117,7 +117,7 @@ declare module "node:async_hooks" {
117
117
  * ```
118
118
  *
119
119
  * Promise contexts may not get valid `triggerAsyncId`s by default. See
120
- * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
120
+ * the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
121
121
  * @return The ID of the resource responsible for calling the callback that is currently being executed.
122
122
  */
123
123
  function triggerAsyncId(): number;
@@ -320,16 +320,6 @@ declare module "node:async_hooks" {
320
320
  */
321
321
  triggerAsyncId(): number;
322
322
  }
323
- interface AsyncLocalStorageOptions {
324
- /**
325
- * The default value to be used when no store is provided.
326
- */
327
- defaultValue?: any;
328
- /**
329
- * A name for the `AsyncLocalStorage` value.
330
- */
331
- name?: string | undefined;
332
- }
333
323
  /**
334
324
  * This class creates stores that stay coherent through asynchronous operations.
335
325
  *
@@ -379,11 +369,6 @@ declare module "node:async_hooks" {
379
369
  * @since v13.10.0, v12.17.0
380
370
  */
381
371
  class AsyncLocalStorage<T> {
382
- /**
383
- * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a
384
- * `run()` call or after an `enterWith()` call.
385
- */
386
- constructor(options?: AsyncLocalStorageOptions);
387
372
  /**
388
373
  * Binds the given function to the current execution context.
389
374
  * @since v19.8.0
@@ -445,11 +430,6 @@ declare module "node:async_hooks" {
445
430
  * @since v13.10.0, v12.17.0
446
431
  */
447
432
  getStore(): T | undefined;
448
- /**
449
- * The name of the `AsyncLocalStorage` instance if provided.
450
- * @since v24.0.0
451
- */
452
- readonly name: string;
453
433
  /**
454
434
  * Runs a function synchronously within a context and returns its
455
435
  * return value. The store is not accessible outside of the callback function.
@@ -618,6 +598,6 @@ declare module "node:async_hooks" {
618
598
  const VERIFYREQUEST: number;
619
599
  }
620
600
  }
621
- declare module "async_hooks" {
622
- export * from "node:async_hooks";
601
+ declare module "node:async_hooks" {
602
+ export * from "async_hooks";
623
603
  }
@@ -1,4 +1,4 @@
1
- declare module "node:buffer" {
1
+ declare module "buffer" {
2
2
  type ImplicitArrayBuffer<T extends WithImplicitCoercion<ArrayBufferLike>> = T extends
3
3
  { valueOf(): infer V extends ArrayBufferLike } ? V : T;
4
4
  global {
@@ -463,4 +463,10 @@ declare module "node:buffer" {
463
463
  */
464
464
  type AllowSharedBuffer = Buffer<ArrayBufferLike>;
465
465
  }
466
+ /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
467
+ var SlowBuffer: {
468
+ /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
469
+ new(size: number): Buffer<ArrayBuffer>;
470
+ prototype: Buffer;
471
+ };
466
472
  }