@types/tar 6.1.0 → 6.1.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 (3) hide show
  1. tar/README.md +1 -1
  2. tar/index.d.ts +17 -4
  3. tar/package.json +3 -3
tar/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for tar (https://github.com/npm/node-tar)
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 21 Oct 2021 07:01:23 GMT
11
+ * Last updated: Sat, 20 Nov 2021 01:31:10 GMT
12
12
  * Dependencies: [@types/minipass](https://npmjs.com/package/@types/minipass), [@types/node](https://npmjs.com/package/@types/node)
13
13
  * Global values: none
14
14
 
tar/index.d.ts CHANGED
@@ -198,14 +198,27 @@ export const knownExtended: {
198
198
  export const headerSize: number;
199
199
  export const blockSize: number;
200
200
 
201
+ export interface ParseOptions {
202
+ strict?: boolean;
203
+ filter?: (path: string, entry: ReadEntry) => boolean;
204
+ onentry?: (entry: ReadEntry) => void;
205
+ onwarn?: (code: string, message: string, data: Buffer) => void;
206
+ }
207
+ /**
208
+ * A writable stream. Write tar data to it and it will emit entry events for each entry parsed from the tarball. This is used by tar.Extract.
209
+ */
210
+ export interface Parse extends ParseStream {
211
+ on(event: 'end' | 'close', listener: () => void): this;
212
+ on(event: 'entry', listener: (entry: ReadEntry) => void): this;
213
+ }
214
+
215
+ export const Parse: {
216
+ new(opt?: ParseOptions): Parse;
217
+ };
201
218
  //#endregion
202
219
 
203
220
  //#region Global Methods
204
221
 
205
- /**
206
- * Returns a writable stream. Write tar data to it and it will emit entry events for each entry parsed from the tarball. This is used by tar.Extract.
207
- */
208
- export function Parse(): ParseStream;
209
222
  /**
210
223
  * Returns a through stream. Use fstream to write files into the pack stream and you will receive tar archive data from the pack stream.
211
224
  * This only works with directories, it does not work with individual files.
tar/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/tar",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "TypeScript definitions for tar",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar",
6
6
  "license": "MIT",
@@ -28,6 +28,6 @@
28
28
  "@types/minipass": "*",
29
29
  "@types/node": "*"
30
30
  },
31
- "typesPublisherContentHash": "aebf6b80128a2e3a776d3742fd05cafcc88c431c2fbc925074bea71195da6229",
32
- "typeScriptVersion": "3.7"
31
+ "typesPublisherContentHash": "b6e3e62eb97754081bd85e908ecdd88b5f90caea3d29212e8624995f91f24321",
32
+ "typeScriptVersion": "3.8"
33
33
  }