cdk-common 2.1.46 → 2.1.48

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 (39) hide show
  1. package/.jsii +3 -3
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +108 -0
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +14 -3
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +126 -0
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +4 -2
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +2 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.generated.d.ts +5 -0
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +1 -0
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +25 -1
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +2 -2
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +15 -0
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/iter.d.ts +301 -0
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +38 -12
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +2 -0
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +2 -0
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +5 -4
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib/iter.d.ts +131 -0
  21. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  22. package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +108 -0
  23. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +14 -3
  24. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +126 -0
  25. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +4 -2
  26. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +2 -0
  27. package/node_modules/@types/form-data/node_modules/@types/node/inspector.generated.d.ts +5 -0
  28. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +1 -0
  29. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  30. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +25 -1
  31. package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +2 -2
  32. package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +15 -0
  33. package/node_modules/@types/form-data/node_modules/@types/node/stream/iter.d.ts +301 -0
  34. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +38 -12
  35. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +2 -0
  36. package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +2 -0
  37. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +5 -4
  38. package/node_modules/@types/form-data/node_modules/@types/node/zlib/iter.d.ts +131 -0
  39. package/package.json +4 -4
package/.jsii CHANGED
@@ -3943,7 +3943,7 @@
3943
3943
  "stability": "experimental"
3944
3944
  },
3945
3945
  "homepage": "https://github.com/neilkuan/cdk-common.git",
3946
- "jsiiVersion": "5.9.40 (build 8be98bb)",
3946
+ "jsiiVersion": "5.9.41 (build 8930737)",
3947
3947
  "keywords": [
3948
3948
  "aws",
3949
3949
  "aws-cdk",
@@ -13008,6 +13008,6 @@
13008
13008
  "symbolId": "src/main:LambdaArmFunctionProps"
13009
13009
  }
13010
13010
  },
13011
- "version": "2.1.46",
13012
- "fingerprint": "FRuNlc+R36+f2J5BsdeiQ8YqhEk3X4VAqLOBOkLwCi8="
13011
+ "version": "2.1.48",
13012
+ "fingerprint": "iV5CC9XRvw117c9TixS+fbWydJ5nc5ritrZezxReLdk="
13013
13013
  }
package/lib/main.js CHANGED
@@ -38,5 +38,5 @@ class LambdaArmFunction extends constructs_1.Construct {
38
38
  }
39
39
  exports.LambdaArmFunction = LambdaArmFunction;
40
40
  _a = JSII_RTTI_SYMBOL_1;
41
- LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.1.46" };
41
+ LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.1.48" };
42
42
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9tYWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbUNBQW1DO0FBQ25DLGlEQUFpRDtBQUNqRCwyQ0FBdUM7QUFLdkMsTUFBYSxpQkFBa0IsU0FBUSxzQkFBUztJQUU5QyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQTRCO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFakIsTUFBTSxlQUFlLEdBQUcsSUFBSSxHQUFHLENBQXlCO1lBQ3RELENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsbUNBQW1DLENBQUM7WUFDakUsQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxtQ0FBbUMsQ0FBQztZQUNqRSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxFQUFFLG1DQUFtQyxDQUFDO1lBQ2pFLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsa0NBQWtDLENBQUM7WUFDaEUsQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxrQ0FBa0MsQ0FBQztZQUNoRSxDQUFDLE1BQU0sQ0FBQyxPQUFPL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tYmRhL2xhdGVzdC9kZy9mb3VuZGF0aW9uLWFyY2guaHRtbD9pY21waWQ9ZG9jc19sYW1iZGFfcnNzYCk7XG4gICAgfVxuXG4gICAgdGhpcy5sYW1iZGFGdW5jdGlvbiA9IG5ldyBsYW1iZGEuRnVuY3Rpb24odGhpcywgJ0xhbWJkYUZ1bmN0aW9uJywge1xuICAgICAgYXJjaGl0ZWN0dXJlOiBwcm9wcy5hcmNoaXRlY3R1cmUgPz8gbGFtYmRhLkFyY2hpdGVjdHVyZS5BUk1fNjQsXG4gICAgICAuLi5wcm9wcyxcbiAgICB9KTtcbiAgfVxufVxuIl19
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 14 May 2026 16:39:50 GMT
11
+ * Last updated: Tue, 19 May 2026 17:48:56 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -491,6 +491,75 @@ declare module "node:async_hooks" {
491
491
  * @experimental
492
492
  */
493
493
  exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
494
+ /**
495
+ * Creates a disposable scope that enters the given store and automatically
496
+ * restores the previous store value when the scope is disposed. This method is
497
+ * designed to work with JavaScript's explicit resource management (`using` syntax).
498
+ *
499
+ * Example:
500
+ *
501
+ * ```js
502
+ * import { AsyncLocalStorage } from 'node:async_hooks';
503
+ *
504
+ * const asyncLocalStorage = new AsyncLocalStorage();
505
+ *
506
+ * {
507
+ * using _ = asyncLocalStorage.withScope('my-store');
508
+ * console.log(asyncLocalStorage.getStore()); // Prints: my-store
509
+ * }
510
+ *
511
+ * console.log(asyncLocalStorage.getStore()); // Prints: undefined
512
+ * ```
513
+ *
514
+ * The `withScope()` method is particularly useful for managing context in
515
+ * synchronous code where you want to ensure the previous store value is restored
516
+ * when exiting a block, even if an error is thrown.
517
+ *
518
+ * ```js
519
+ * import { AsyncLocalStorage } from 'node:async_hooks';
520
+ *
521
+ * const asyncLocalStorage = new AsyncLocalStorage();
522
+ *
523
+ * try {
524
+ * using _ = asyncLocalStorage.withScope('my-store');
525
+ * console.log(asyncLocalStorage.getStore()); // Prints: my-store
526
+ * throw new Error('test');
527
+ * } catch (e) {
528
+ * // Store is automatically restored even after error
529
+ * console.log(asyncLocalStorage.getStore()); // Prints: undefined
530
+ * }
531
+ * ```
532
+ *
533
+ * **Important:** When using `withScope()` in async functions before the first
534
+ * `await`, be aware that the scope change will affect the caller's context. The
535
+ * synchronous portion of an async function (before the first `await`) runs
536
+ * immediately when called, and when it reaches the first `await`, it returns the
537
+ * promise to the caller. At that point, the scope change becomes visible in the
538
+ * caller's context and will persist in subsequent synchronous code until something
539
+ * else changes the scope value. For async operations, prefer using `run()` which
540
+ * properly isolates context across async boundaries.
541
+ *
542
+ * ```js
543
+ * import { AsyncLocalStorage } from 'node:async_hooks';
544
+ *
545
+ * const asyncLocalStorage = new AsyncLocalStorage();
546
+ *
547
+ * async function example() {
548
+ * using _ = asyncLocalStorage.withScope('my-store');
549
+ * console.log(asyncLocalStorage.getStore()); // Prints: my-store
550
+ * await someAsyncOperation(); // Function pauses here and returns promise
551
+ * console.log(asyncLocalStorage.getStore()); // Prints: my-store
552
+ * }
553
+ *
554
+ * // Calling without await
555
+ * example(); // Synchronous portion runs, then pauses at first await
556
+ * // After the promise is returned, the scope 'my-store' is now active in caller!
557
+ * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!)
558
+ * ```
559
+ * @since v25.9.0
560
+ * @experimental
561
+ */
562
+ withScope(store: T): RunScope;
494
563
  /**
495
564
  * Transitions into the context for the remainder of the current
496
565
  * synchronous execution and then persists the store through any following
@@ -533,6 +602,45 @@ declare module "node:async_hooks" {
533
602
  */
534
603
  enterWith(store: T): void;
535
604
  }
605
+ /**
606
+ * A disposable scope returned by `asyncLocalStorage.withScope()` that
607
+ * automatically restores the previous store value when disposed. This class
608
+ * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work
609
+ * with JavaScript's `using` syntax.
610
+ *
611
+ * The scope automatically restores the previous store value when the `using` block
612
+ * exits, whether through normal completion or by throwing an error.
613
+ * @since v25.9.0
614
+ * @experimental
615
+ */
616
+ interface RunScope extends Disposable {
617
+ /**
618
+ * Explicitly ends the scope and restores the previous store value. This method
619
+ * is idempotent: calling it multiple times has the same effect as calling it once.
620
+ *
621
+ * The `[Symbol.dispose]()` method defers to `dispose()`.
622
+ *
623
+ * If `withScope()` is called without the `using` keyword, `dispose()` must be
624
+ * called manually to restore the previous store value. Forgetting to call
625
+ * `dispose()` will cause the store value to persist for the remainder of the
626
+ * current execution context:
627
+ *
628
+ * ```js
629
+ * import { AsyncLocalStorage } from 'node:async_hooks';
630
+ *
631
+ * const storage = new AsyncLocalStorage();
632
+ *
633
+ * // Without using, the scope must be disposed manually
634
+ * const scope = storage.withScope('my-store');
635
+ * // storage.getStore() === 'my-store' here
636
+ *
637
+ * scope.dispose(); // Restore previous value
638
+ * // storage.getStore() === undefined here
639
+ * ```
640
+ * @since v25.9.0
641
+ */
642
+ dispose(): void;
643
+ }
536
644
  /**
537
645
  * @since v17.2.0, v16.14.0
538
646
  * @return A map of provider types to the corresponding numeric id.
@@ -3778,7 +3778,7 @@ declare module "node:crypto" {
3778
3778
  interface CShakeParams extends Algorithm {
3779
3779
  customization?: NodeJS.BufferSource;
3780
3780
  functionName?: NodeJS.BufferSource;
3781
- length: number;
3781
+ outputLength: number;
3782
3782
  }
3783
3783
  interface ContextParams extends Algorithm {
3784
3784
  context?: NodeJS.BufferSource;
@@ -3815,6 +3815,10 @@ declare module "node:crypto" {
3815
3815
  hash: HashAlgorithmIdentifier;
3816
3816
  length?: number;
3817
3817
  }
3818
+ interface KangarooTwelveParams {
3819
+ customization?: NodeJS.BufferSource;
3820
+ outputLength: number;
3821
+ }
3818
3822
  interface JsonWebKey {
3819
3823
  alg?: string;
3820
3824
  crv?: string;
@@ -3849,7 +3853,7 @@ declare module "node:crypto" {
3849
3853
  }
3850
3854
  interface KmacParams extends Algorithm {
3851
3855
  customization?: NodeJS.BufferSource;
3852
- length: number;
3856
+ outputLength: number;
3853
3857
  }
3854
3858
  interface Pbkdf2Params extends Algorithm {
3855
3859
  hash: HashAlgorithmIdentifier;
@@ -3884,6 +3888,10 @@ declare module "node:crypto" {
3884
3888
  interface RsaPssParams extends Algorithm {
3885
3889
  saltLength: number;
3886
3890
  }
3891
+ interface TurboShakeParams {
3892
+ domainSeparation?: number;
3893
+ outputLength: number;
3894
+ }
3887
3895
  interface Crypto {
3888
3896
  readonly subtle: SubtleCrypto;
3889
3897
  getRandomValues<
@@ -3945,7 +3953,10 @@ declare module "node:crypto" {
3945
3953
  extractable: boolean,
3946
3954
  keyUsages: readonly KeyUsage[],
3947
3955
  ): Promise<CryptoKey>;
3948
- digest(algorithm: AlgorithmIdentifier | CShakeParams, data: NodeJS.BufferSource): Promise<ArrayBuffer>;
3956
+ digest(
3957
+ algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams,
3958
+ data: NodeJS.BufferSource,
3959
+ ): Promise<ArrayBuffer>;
3949
3960
  encapsulateBits(
3950
3961
  encapsulationAlgorithm: AlgorithmIdentifier,
3951
3962
  encapsulationKey: CryptoKey,
@@ -37,6 +37,7 @@ declare module "node:fs/promises" {
37
37
  WriteVResult,
38
38
  } from "node:fs";
39
39
  import { Stream } from "node:stream";
40
+ import { ByteReadableStream, Transform, Writer } from "node:stream/iter";
40
41
  import { ReadableStream } from "node:stream/web";
41
42
  interface FileChangeInfo<T extends string | Buffer> {
42
43
  eventType: WatchEventType;
@@ -85,6 +86,57 @@ declare module "node:fs/promises" {
85
86
  interface ReadableWebStreamOptions {
86
87
  autoClose?: boolean | undefined;
87
88
  }
89
+ interface PullOptions extends Abortable {
90
+ /**
91
+ * Close the file handle when the stream ends.
92
+ * @default false
93
+ */
94
+ autoClose?: boolean | undefined;
95
+ /**
96
+ * Byte offset to begin reading from. When specified,
97
+ * reads use explicit positioning (`pread` semantics).
98
+ */
99
+ start?: number | undefined;
100
+ /**
101
+ * Maximum number of bytes to read before ending the
102
+ * iterator. Reads stop when `limit` bytes have been delivered or EOF is
103
+ * reached, whichever comes first.
104
+ */
105
+ limit?: number | undefined;
106
+ /**
107
+ * Size in bytes of the buffer allocated for each
108
+ * read operation.
109
+ * @default 131072
110
+ */
111
+ chunkSize?: number | undefined;
112
+ }
113
+ interface WriterOptions {
114
+ /**
115
+ * Close the file handle when the writer ends or fails.
116
+ * @default false
117
+ */
118
+ autoClose?: boolean | undefined;
119
+ /**
120
+ * Byte offset to start writing at. When specified,
121
+ * writes use explicit positioning.
122
+ */
123
+ start?: number | undefined;
124
+ /**
125
+ * Maximum number of bytes the writer will accept.
126
+ * Async writes (`write()`, `writev()`) that would exceed the limit reject
127
+ * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`)
128
+ * return `false`.
129
+ */
130
+ limit?: number | undefined;
131
+ /**
132
+ * Maximum chunk size in bytes for synchronous write
133
+ * operations. Writes larger than this threshold fall back to async I/O.
134
+ * Set this to match the reader's `chunkSize` for optimal `pipeTo()`
135
+ * performance.
136
+ * @default 131072
137
+ */
138
+ chunkSize?: number | undefined;
139
+ }
88
140
  // TODO: Add `EventEmitter` close
89
141
  interface FileHandle {
90
142
  /**
@@ -202,6 +254,41 @@ declare module "node:fs/promises" {
202
254
  * @return Fulfills with `undefined` upon success.
203
255
  */
204
256
  datasync(): Promise<void>;
257
+ /**
258
+ * Return the file contents as an async iterable using the
259
+ * [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte
260
+ * chunks (default 128 KB). If transforms are provided, they are applied
261
+ * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pullsource-transforms-options).
262
+ *
263
+ * The file handle is locked while the iterable is being consumed and unlocked
264
+ * when iteration completes, an error occurs, or the consumer breaks.
265
+ *
266
+ * This function is only available when the `--experimental-stream-iter` flag is
267
+ * enabled.
268
+ *
269
+ * ```js
270
+ * import { open } from 'node:fs/promises';
271
+ * import { text } from 'node:stream/iter';
272
+ * import { compressGzip } from 'node:zlib/iter';
273
+ *
274
+ * const fh = await open('input.txt', 'r');
275
+ *
276
+ * // Read as text
277
+ * console.log(await text(fh.pull({ autoClose: true })));
278
+ *
279
+ * // Read 1 KB starting at byte 100
280
+ * const fh2 = await open('input.txt', 'r');
281
+ * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true })));
282
+ *
283
+ * // Read with compression
284
+ * const fh3 = await open('input.txt', 'r');
285
+ * const compressed = fh3.pull(compressGzip(), { autoClose: true });
286
+ * ```
287
+ * @since v25.9.0
288
+ * @experimental
289
+ */
290
+ pull(...transforms: Transform[]): ByteReadableStream;
291
+ pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream;
205
292
  /**
206
293
  * Request that all data for the open file descriptor is flushed to the storage
207
294
  * device. The specific implementation is operating system and device specific.
@@ -450,6 +537,45 @@ declare module "node:fs/promises" {
450
537
  buffers: TBuffers,
451
538
  position?: number,
452
539
  ): Promise<WriteVResult<TBuffers>>;
540
+ /**
541
+ * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) writer backed by this file handle.
542
+ *
543
+ * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`:
544
+ *
545
+ * * `await using w = fh.writer()` — if the writer is still open (no `end()`
546
+ * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits
547
+ * for it to complete.
548
+ * * `using w = fh.writer()` — calls `fail()` unconditionally.
549
+ *
550
+ * The `writeSync()` and `writevSync()` methods enable the try-sync fast path
551
+ * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the
552
+ * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete
553
+ * synchronously with zero promise overhead.
554
+ *
555
+ * This function is only available when the `--experimental-stream-iter` flag is
556
+ * enabled.
557
+ *
558
+ * ```js
559
+ * import { open } from 'node:fs/promises';
560
+ * import { from, pipeTo } from 'node:stream/iter';
561
+ * import { compressGzip } from 'node:zlib/iter';
562
+ *
563
+ * // Async pipeline
564
+ * const fh = await open('output.gz', 'w');
565
+ * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true }));
566
+ *
567
+ * // Sync pipeline with limit
568
+ * const src = await open('input.txt', 'r');
569
+ * const dst = await open('output.txt', 'w');
570
+ * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB
571
+ * await pipeTo(src.pull({ autoClose: true }), w);
572
+ * await w.end();
573
+ * await dst.close();
574
+ * ```
575
+ * @since v25.9.0
576
+ * @experimental
577
+ */
578
+ writer(options?: WriterOptions): Writer;
453
579
  /**
454
580
  * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
455
581
  * @since v13.13.0, v12.17.0
@@ -380,7 +380,8 @@ declare module "node:fs" {
380
380
  "ready": [];
381
381
  }
382
382
  /**
383
- * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
383
+ * Instances of `fs.ReadStream` cannot be constructed directly. They are created and
384
+ * returned using the `fs.createReadStream()` function.
384
385
  * @since v0.1.93
385
386
  */
386
387
  class ReadStream extends stream.Readable {
@@ -643,7 +644,8 @@ declare module "node:fs" {
643
644
  "ready": [];
644
645
  }
645
646
  /**
646
- * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
647
+ * Instances of `fs.WriteStream` cannot be constructed directly. They are created and
648
+ * returned using the `fs.createWriteStream()` function.
647
649
  * @since v0.1.93
648
650
  */
649
651
  class WriteStream extends stream.Writable {
@@ -95,6 +95,7 @@
95
95
  /// <reference path="sqlite.d.ts" />
96
96
  /// <reference path="stream.d.ts" />
97
97
  /// <reference path="stream/consumers.d.ts" />
98
+ /// <reference path="stream/iter.d.ts" />
98
99
  /// <reference path="stream/promises.d.ts" />
99
100
  /// <reference path="stream/web.d.ts" />
100
101
  /// <reference path="string_decoder.d.ts" />
@@ -113,3 +114,4 @@
113
114
  /// <reference path="wasi.d.ts" />
114
115
  /// <reference path="worker_threads.d.ts" />
115
116
  /// <reference path="zlib.d.ts" />
117
+ /// <reference path="zlib/iter.d.ts" />
@@ -2035,6 +2035,9 @@ declare module "node:inspector" {
2035
2035
  autoAttach: boolean;
2036
2036
  waitForDebuggerOnStart: boolean;
2037
2037
  }
2038
+ interface GetTargetsReturnType {
2039
+ targetInfos: TargetInfo[];
2040
+ }
2038
2041
  interface TargetCreatedEventDataType {
2039
2042
  targetInfo: TargetInfo;
2040
2043
  }
@@ -2506,6 +2509,7 @@ declare module "node:inspector" {
2506
2509
  */
2507
2510
  post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
2508
2511
  post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
2512
+ post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void;
2509
2513
  post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void;
2510
2514
  post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void;
2511
2515
  post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void;
@@ -3642,6 +3646,7 @@ declare module "node:inspector/promises" {
3642
3646
  * Detached from the worker with given sessionId.
3643
3647
  */
3644
3648
  post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise<void>;
3649
+ post(method: "Target.getTargets"): Promise<Target.GetTargetsReturnType>;
3645
3650
  post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise<void>;
3646
3651
  post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise<void>;
3647
3652
  /**
@@ -218,6 +218,7 @@ declare module "node:module" {
218
218
  * This feature requires `--allow-worker` if used with the
219
219
  * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model).
220
220
  * @since v20.6.0, v18.19.0
221
+ * @deprecated Use `module.registerHooks()` instead.
221
222
  * @param specifier Customization hooks to be registered; this should be
222
223
  * the same string that would be passed to `import()`, except that if it is
223
224
  * relative, it is resolved relative to `parentURL`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "25.8.0",
3
+ "version": "25.9.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -150,6 +150,6 @@
150
150
  "undici-types": ">=7.24.0 <7.24.7"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "e3b0c76dfc9cc84424890451a36d8ae1dbc86b0b0e49cc458f2a886fda8e4649",
153
+ "typesPublisherContentHash": "2546f5f588e15fc9aa202a3005dab2859d006fd48a8448107741e5ce184e9098",
154
154
  "typeScriptVersion": "5.3"
155
155
  }
@@ -822,6 +822,28 @@ declare module "node:process" {
822
822
  * @since v0.7.0
823
823
  */
824
824
  abort(): never;
825
+ /**
826
+ * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback
827
+ * that will be invoked when an uncaught exception occurs, receiving the exception
828
+ * value as its first argument.
829
+ *
830
+ * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows
831
+ * multiple callbacks to be registered and does not conflict with the
832
+ * [`domain`](https://nodejs.org/docs/latest-v25.x/api/domain.html) module. Callbacks are called in reverse order of registration
833
+ * (most recent first). If a callback returns `true`, subsequent callbacks
834
+ * and the default uncaught exception handling are skipped.
835
+ *
836
+ * ```js
837
+ * import process from 'node:process';
838
+ *
839
+ * process.addUncaughtExceptionCaptureCallback((err) => {
840
+ * console.error('Caught exception:', err.message);
841
+ * return true; // Indicates exception was handled
842
+ * });
843
+ * ```
844
+ * @since v25.9.0
845
+ */
846
+ addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void;
825
847
  /**
826
848
  * The `process.chdir()` method changes the current working directory of the
827
849
  * Node.js process or throws an exception if doing so fails (for instance, if
@@ -1418,9 +1440,11 @@ declare module "node:process" {
1418
1440
  * method with a non-`null` argument while another capture function is set will
1419
1441
  * throw an error.
1420
1442
  *
1421
- * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
1443
+ * To register multiple callbacks that can coexist, use
1444
+ * `process.addUncaughtExceptionCaptureCallback()` instead.
1422
1445
  * @since v9.3.0
1423
1446
  */
1447
+ // TODO: callback parameter should be `unknown`
1424
1448
  setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
1425
1449
  /**
1426
1450
  * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
@@ -179,7 +179,7 @@ declare module "node:quic" {
179
179
  * The TLS crypto keys to use for sessions.
180
180
  * @since v23.8.0
181
181
  */
182
- keys?: KeyObject | webcrypto.CryptoKey | ReadonlyArray<KeyObject | webcrypto.CryptoKey> | undefined;
182
+ keys?: KeyObject | readonly KeyObject[] | undefined;
183
183
  /**
184
184
  * Specifies the maximum UDP packet payload size.
185
185
  * @since v23.8.0
@@ -653,7 +653,7 @@ declare module "node:quic" {
653
653
  /**
654
654
  * Sends an unreliable datagram to the remote peer, returning the datagram ID.
655
655
  * If the datagram payload is specified as an `ArrayBufferView`, then ownership of
656
- * that view will be transfered to the underlying stream.
656
+ * that view will be transferred to the underlying stream.
657
657
  * @since v23.8.0
658
658
  */
659
659
  sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint;
@@ -86,6 +86,21 @@ declare module "node:repl" {
86
86
  * @default false
87
87
  */
88
88
  breakEvalOnSigint?: boolean | undefined;
89
+ /**
90
+ * This function customizes error handling in the REPL.
91
+ * It receives the thrown exception as its first argument and must return one
92
+ * of the following values synchronously:
93
+ * * `'print'` to print the error to the output stream (default behavior).
94
+ * * `'ignore'` to skip all remaining error handling.
95
+ * * `'unhandled'` to treat the exception as fully unhandled. In this case,
96
+ * the error will be passed to process-wide exception handlers, such as
97
+ * the `'uncaughtException'` event.
98
+ * The `'unhandled'` value may or may not be desirable in situations
99
+ * where the `REPLServer` instance has been closed, depending on the particular
100
+ * use case.
101
+ * @since v25.9.0
102
+ */
103
+ handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined;
89
104
  }
90
105
  type REPLEval = (
91
106
  this: REPLServer,