Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tar

Package Overview
Dependencies
Maintainers
4
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 4.4.4 to 4.4.5

lib/.header.js.swp

22

lib/header.js

@@ -12,6 +12,7 @@ 'use strict'

const SLURP = Symbol('slurp')
const TYPE = Symbol('type')
class Header {
constructor (data, off) {
constructor (data, off, ex, gex) {
this.cksumValid = false

@@ -39,3 +40,3 @@ this.needPax = false

if (Buffer.isBuffer(data))
this.decode(data, off || 0)
this.decode(data, off || 0, ex, gex)
else if (data)

@@ -45,3 +46,3 @@ this.set(data)

decode (buf, off) {
decode (buf, off, ex, gex) {
if (!off)

@@ -61,2 +62,7 @@ off = 0

// if we have extended or global extended headers, apply them now
// See https://github.com/npm/node-tar/pull/187
this[SLURP](ex)
this[SLURP](gex, true)
// old tar versions marked dirs as a file with a trailing /

@@ -108,2 +114,12 @@ this[TYPE] = decString(buf, off + 156, 1)

[SLURP] (ex, global) {
for (let k in ex) {
// we slurp in everything except for the path attribute in
// a global extended header, because that's weird.
if (ex[k] !== null && ex[k] !== undefined &&
!(global && k === 'path'))
this[k] = ex[k]
}
}
encode (buf, off) {

@@ -110,0 +126,0 @@ if (!buf) {

2

lib/parse.js

@@ -104,3 +104,3 @@ 'use strict'

[CONSUMEHEADER] (chunk, position) {
const header = new Header(chunk, position)
const header = new Header(chunk, position, this[EX], this[GEX])

@@ -107,0 +107,0 @@ if (header.nullBlock)

@@ -334,4 +334,6 @@ 'use strict'

const tx = this.transform ? this.transform(entry) || entry : entry
if (tx !== entry)
if (tx !== entry) {
tx.on('error', er => this[ONERROR](er, entry))
entry.pipe(tx)
}
tx.pipe(stream)

@@ -516,4 +518,6 @@ }

const tx = this.transform ? this.transform(entry) || entry : entry
if (tx !== entry)
if (tx !== entry) {
tx.on('error', er => this[ONERROR](er, entry))
entry.pipe(tx)
}

@@ -520,0 +524,0 @@ tx.on('data', chunk => {

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

"description": "tar for node",
"version": "4.4.4",
"version": "4.4.5",
"repository": {

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

@@ -233,3 +233,6 @@ # node-tar

[Alias: `m`, `no-mtime`]
- `mtime` Set to a `Date` object to force a specific `mtime` for
everything added to the archive. Overridden by `noMtime`.
The following options are mostly internal, but can be modified in some

@@ -236,0 +239,0 @@ advanced use cases, such as re-using caches between runs.

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