@types/node 22.13.8 → 22.13.9

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 (4) hide show
  1. node/README.md +1 -1
  2. node/crypto.d.ts +36 -1
  3. node/module.d.ts +4 -4
  4. node/package.json +2 -2
node/README.md CHANGED
@@ -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: Sat, 01 Mar 2025 06:37:25 GMT
11
+ * Last updated: Mon, 03 Mar 2025 18:02:26 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/crypto.d.ts CHANGED
@@ -682,9 +682,10 @@ declare module "crypto" {
682
682
  */
683
683
  type: KeyObjectType;
684
684
  }
685
- type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305";
685
+ type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
686
686
  type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
687
687
  type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
688
+ type CipherChaCha20Poly1305Types = "chacha20-poly1305";
688
689
  type BinaryLike = string | NodeJS.ArrayBufferView;
689
690
  type CipherKey = BinaryLike | KeyObject;
690
691
  interface CipherCCMOptions extends stream.TransformOptions {
@@ -696,6 +697,10 @@ declare module "crypto" {
696
697
  interface CipherOCBOptions extends stream.TransformOptions {
697
698
  authTagLength: number;
698
699
  }
700
+ interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
701
+ /** @default 16 */
702
+ authTagLength?: number | undefined;
703
+ }
699
704
  /**
700
705
  * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
701
706
  * initialization vector (`iv`).
@@ -744,6 +749,12 @@ declare module "crypto" {
744
749
  iv: BinaryLike,
745
750
  options?: CipherGCMOptions,
746
751
  ): CipherGCM;
752
+ function createCipheriv(
753
+ algorithm: CipherChaCha20Poly1305Types,
754
+ key: CipherKey,
755
+ iv: BinaryLike,
756
+ options?: CipherChaCha20Poly1305Options,
757
+ ): CipherChaCha20Poly1305;
747
758
  function createCipheriv(
748
759
  algorithm: string,
749
760
  key: CipherKey,
@@ -943,6 +954,15 @@ declare module "crypto" {
943
954
  ): this;
944
955
  getAuthTag(): Buffer;
945
956
  }
957
+ interface CipherChaCha20Poly1305 extends Cipher {
958
+ setAAD(
959
+ buffer: NodeJS.ArrayBufferView,
960
+ options: {
961
+ plaintextLength: number;
962
+ },
963
+ ): this;
964
+ getAuthTag(): Buffer;
965
+ }
946
966
  /**
947
967
  * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
948
968
  *
@@ -990,6 +1010,12 @@ declare module "crypto" {
990
1010
  iv: BinaryLike,
991
1011
  options?: CipherGCMOptions,
992
1012
  ): DecipherGCM;
1013
+ function createDecipheriv(
1014
+ algorithm: CipherChaCha20Poly1305Types,
1015
+ key: CipherKey,
1016
+ iv: BinaryLike,
1017
+ options?: CipherChaCha20Poly1305Options,
1018
+ ): DecipherChaCha20Poly1305;
993
1019
  function createDecipheriv(
994
1020
  algorithm: string,
995
1021
  key: CipherKey,
@@ -1175,6 +1201,15 @@ declare module "crypto" {
1175
1201
  },
1176
1202
  ): this;
1177
1203
  }
1204
+ interface DecipherChaCha20Poly1305 extends Decipher {
1205
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1206
+ setAAD(
1207
+ buffer: NodeJS.ArrayBufferView,
1208
+ options: {
1209
+ plaintextLength: number;
1210
+ },
1211
+ ): this;
1212
+ }
1178
1213
  interface PrivateKeyInput {
1179
1214
  key: string | Buffer;
1180
1215
  format?: KeyFormat | undefined;
node/module.d.ts CHANGED
@@ -325,9 +325,9 @@ declare module "module" {
325
325
  }
326
326
  interface ResolveFnOutput {
327
327
  /**
328
- * A hint to the load hook (it might be ignored)
328
+ * A hint to the load hook (it might be ignored); can be an intermediary value.
329
329
  */
330
- format?: ModuleFormat | null | undefined;
330
+ format?: string | null | undefined;
331
331
  /**
332
332
  * The import attributes to use when caching the module (optional; if excluded the input will be used)
333
333
  */
@@ -365,9 +365,9 @@ declare module "module" {
365
365
  */
366
366
  conditions: string[];
367
367
  /**
368
- * The format optionally supplied by the `resolve` hook chain
368
+ * The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
369
369
  */
370
- format: ModuleFormat | null | undefined;
370
+ format: string | null | undefined;
371
371
  /**
372
372
  * An object whose key-value pairs represent the assertions for the module to import
373
373
  */
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.13.8",
3
+ "version": "22.13.9",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  "undici-types": "~6.20.0"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "5bedf97bc7316e968d26ed4056ab5980a72db818c2493f707d9cc1f728b11c88",
218
+ "typesPublisherContentHash": "2b83897c50ee990a9f146cb799600cf7a81a0c37cd361aa688bb2c576b847048",
219
219
  "typeScriptVersion": "5.0"
220
220
  }