Socket
Socket
Sign inDemoInstall

tar

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar - npm Package Compare versions

Comparing version 7.3.0 to 7.4.0

4

dist/commonjs/create.js

@@ -41,3 +41,3 @@ "use strict";

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -58,3 +58,3 @@ }

noResume: true,
onentry: entry => {
onReadEntry: entry => {
p.add(entry);

@@ -61,0 +61,0 @@ },

@@ -37,8 +37,8 @@ "use strict";

const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js");
const onentryFunction = (opt) => {
const onentry = opt.onentry;
opt.onentry =
onentry ?
const onReadEntryFunction = (opt) => {
const onReadEntry = opt.onReadEntry;
opt.onReadEntry =
onReadEntry ?
e => {
onentry(e);
onReadEntry(e);
e.resume();

@@ -135,4 +135,4 @@ }

if (!opt.noResume)
onentryFunction(opt);
onReadEntryFunction(opt);
});
//# sourceMappingURL=list.js.map

@@ -212,3 +212,3 @@ /// <reference types="node" />

* When parsing/listing archives, `entry` streams are by default resumed
* (set into "flowing" mode) immediately after the call to `onentry()`.
* (set into "flowing" mode) immediately after the call to `onReadEntry()`.
* Set `noResume: true` to suppress this behavior.

@@ -226,6 +226,2 @@ *

* be called with each WriteEntry that is created.
*
* It's not called 'onentry' because that's already taken for the ReadEntry
* when reading archives, and it's just easier to only have one type of
* options object that this whole library can pass around without issue.
*/

@@ -240,3 +236,3 @@ onWriteEntry?: (entry: WriteEntry) => any;

*/
onentry?: (entry: ReadEntry) => any;
onReadEntry?: (entry: ReadEntry) => any;
/**

@@ -401,2 +397,8 @@ * Pack the targets of symbolic links rather than the link itself.

forceChown?: boolean;
/**
* ambiguous deprecated name for {@link onReadEntry}
*
* @deprecated
*/
onentry?: (entry: ReadEntry) => any;
}

@@ -403,0 +405,0 @@ export type TarOptionsSync = TarOptions & {

@@ -25,2 +25,3 @@ "use strict";

['h', 'follow'],
['onentry', 'onReadEntry'],
]);

@@ -27,0 +28,0 @@ const isSyncFile = (o) => !!o.sync && !!o.file;

@@ -129,4 +129,4 @@ "use strict";

}
if (typeof opt.onentry === 'function') {
this.on('entry', opt.onentry);
if (typeof opt.onReadEntry === 'function') {
this.on('entry', opt.onReadEntry);
}

@@ -133,0 +133,0 @@ }

@@ -184,3 +184,3 @@ "use strict";

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -201,3 +201,3 @@ }

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -204,0 +204,0 @@ }

@@ -35,3 +35,3 @@ import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass';

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -52,3 +52,3 @@ }

noResume: true,
onentry: entry => {
onReadEntry: entry => {
p.add(entry);

@@ -55,0 +55,0 @@ },

@@ -8,8 +8,8 @@ // tar -t

import { stripTrailingSlashes } from './strip-trailing-slashes.js';
const onentryFunction = (opt) => {
const onentry = opt.onentry;
opt.onentry =
onentry ?
const onReadEntryFunction = (opt) => {
const onReadEntry = opt.onReadEntry;
opt.onReadEntry =
onReadEntry ?
e => {
onentry(e);
onReadEntry(e);
e.resume();

@@ -105,4 +105,4 @@ }

if (!opt.noResume)
onentryFunction(opt);
onReadEntryFunction(opt);
});
//# sourceMappingURL=list.js.map

@@ -212,3 +212,3 @@ /// <reference types="node" resolution-mode="require"/>

* When parsing/listing archives, `entry` streams are by default resumed
* (set into "flowing" mode) immediately after the call to `onentry()`.
* (set into "flowing" mode) immediately after the call to `onReadEntry()`.
* Set `noResume: true` to suppress this behavior.

@@ -226,6 +226,2 @@ *

* be called with each WriteEntry that is created.
*
* It's not called 'onentry' because that's already taken for the ReadEntry
* when reading archives, and it's just easier to only have one type of
* options object that this whole library can pass around without issue.
*/

@@ -240,3 +236,3 @@ onWriteEntry?: (entry: WriteEntry) => any;

*/
onentry?: (entry: ReadEntry) => any;
onReadEntry?: (entry: ReadEntry) => any;
/**

@@ -401,2 +397,8 @@ * Pack the targets of symbolic links rather than the link itself.

forceChown?: boolean;
/**
* ambiguous deprecated name for {@link onReadEntry}
*
* @deprecated
*/
onentry?: (entry: ReadEntry) => any;
}

@@ -403,0 +405,0 @@ export type TarOptionsSync = TarOptions & {

@@ -22,2 +22,3 @@ // turn tar(1) style args like `C` into the more verbose things like `cwd`

['h', 'follow'],
['onentry', 'onReadEntry'],
]);

@@ -24,0 +25,0 @@ export const isSyncFile = (o) => !!o.sync && !!o.file;

@@ -126,4 +126,4 @@ // this[BUFFER] is the remainder of a chunk if we're waiting for

}
if (typeof opt.onentry === 'function') {
this.on('entry', opt.onentry);
if (typeof opt.onReadEntry === 'function') {
this.on('entry', opt.onReadEntry);
}

@@ -130,0 +130,0 @@ }

@@ -178,3 +178,3 @@ // tar -r

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -195,3 +195,3 @@ }

noResume: true,
onentry: entry => p.add(entry),
onReadEntry: entry => p.add(entry),
});

@@ -198,0 +198,0 @@ }

@@ -5,3 +5,3 @@ {

"description": "tar for node",
"version": "7.3.0",
"version": "7.4.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -217,3 +217,3 @@ # node-tar

file: 'my-tarball.tgz',
onentry: entry => { .. do whatever with it .. }
onReadEntry: entry => { .. do whatever with it .. }
})

@@ -229,3 +229,3 @@ ```

file: tarballFilename,
onentry: entry => filenames.push(entry.path),
onReadEntry: entry => filenames.push(entry.path),
})

@@ -255,3 +255,3 @@ return filenames

file: tarballFilename,
onentry: entry => filenames.push(entry.path),
onReadEntry: entry => filenames.push(entry.path),
sync: true,

@@ -341,2 +341,5 @@ })

everything added to the archive. Overridden by `noMtime`.
- `onWriteEntry` Called with each `WriteEntry` or
`WriteEntrySync` that is created in the course of writing the
archive.

@@ -434,3 +437,3 @@ The following options are mostly internal, but can be modified in some

the `filter` option described above.)
- `onentry` A function that gets called with `(entry)` for each entry
- `onReadEntry` A function that gets called with `(entry)` for each entry
that passes the filter.

@@ -486,3 +489,3 @@ - `onwarn` A function that will get called with `(code, message, data)` for

that resolves when the file has been fully traversed in async mode, or
`undefined` if `sync: true` is set. Thus, you _must_ specify an `onentry`
`undefined` if `sync: true` is set. Thus, you _must_ specify an `onReadEntry`
method in order to do anything useful with the data it parses.

@@ -502,3 +505,3 @@

archive, or `false` to skip it.
- `onentry` A function that gets called with `(entry)` for each entry
- `onReadEntry` A function that gets called with `(entry)` for each entry
that passes the filter. This is important for when `file` is set,

@@ -509,3 +512,3 @@ because there is no other way to do anything useful with this method.

- `noResume` By default, `entry` streams are resumed immediately after
the call to `onentry`. Set `noResume: true` to suppress this
the call to `onReadEntry`. Set `noResume: true` to suppress this
behavior. Note that by opting into this, the stream will never

@@ -567,2 +570,5 @@ complete until the entry data is consumed.

everything added to the archive. Overridden by `noMtime`.
- `onWriteEntry` Called with each `WriteEntry` or
`WriteEntrySync` that is created in the course of writing the
archive.

@@ -620,6 +626,9 @@ ### tar.r(options, fileList, callback) [alias: tar.replace]

everything added to the archive. Overridden by `noMtime`.
- `onWriteEntry` Called with each `WriteEntry` or
`WriteEntrySync` that is created in the course of writing the
archive.
## Low-Level API
### class tar.Pack
### class Pack

@@ -653,3 +662,2 @@ A readable tar stream.

from absolute paths.
- `linkCache` A Map object containing the device and inode value for

@@ -675,2 +683,5 @@ any file whose nlink is > 1, to identify hard links.

everything added to the archive. Overridden by `noMtime`.
- `onWriteEntry` Called with each `WriteEntry` or
`WriteEntrySync` that is created in the course of writing the
archive.

@@ -689,7 +700,7 @@ #### add(path)

### class tar.Pack.Sync
### class PackSync
Synchronous version of `tar.Pack`.
Synchronous version of `Pack`.
### class tar.Unpack
### class Unpack

@@ -773,3 +784,3 @@ A writable stream that unpacks a tar archive onto the file system.

- `strict` Treat warnings as crash-worthy errors. Default false.
- `onentry` A function that gets called with `(entry)` for each entry
- `onReadEntry` A function that gets called with `(entry)` for each entry
that passes the filter.

@@ -792,5 +803,5 @@ - `onwarn` A function that will get called with `(code, message, data)` for

### class tar.Unpack.Sync
### class UnpackSync
Synchronous version of `tar.Unpack`.
Synchronous version of `Unpack`.

@@ -828,3 +839,3 @@ Note that using an asynchronous stream type with the `transform`

archive, or `false` to skip it.
- `onentry` A function that gets called with `(entry)` for each entry
- `onReadEntry` A function that gets called with `(entry)` for each entry
that passes the filter.

@@ -831,0 +842,0 @@ - `onwarn` A function that will get called with `(code, message, data)` for

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc