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

tar-fs

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tar-fs - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

test/fixtures/b/a/test.txt

22

index.js

@@ -71,8 +71,8 @@ var tar = require('tar-stream')

if (opts.readable) {
dmode |= 0555
fmode |= 0444
dmode |= parseInt(555, 8)
fmode |= parseInt(444, 8)
}
if (opts.writable) {
dmode |= 0333
fmode |= 0222
dmode |= parseInt(333, 8)
fmode |= parseInt(222, 8)
}

@@ -148,3 +148,3 @@

var head = function (list) {
return list.length ? list[list.length-1] : null
return list.length ? list[list.length - 1] : null
}

@@ -180,8 +180,8 @@

if (opts.readable) {
dmode |= 0555
fmode |= 0444
dmode |= parseInt(555, 8)
fmode |= parseInt(444, 8)
}
if (opts.writable) {
dmode |= 0333
fmode |= 0222
dmode |= parseInt(333, 8)
fmode |= parseInt(222, 8)
}

@@ -264,6 +264,6 @@

stack.push([name, header.mtime])
return mkdirp(name, {fs:xfs}, stat)
return mkdirp(name, {fs: xfs}, stat)
}
mkdirp(path.dirname(name), {fs:xfs}, function (err) {
mkdirp(path.dirname(name), {fs: xfs}, function (err) {
if (err) return next(err)

@@ -270,0 +270,0 @@ if (header.type === 'symlink') return onlink()

{
"name": "tar-fs",
"version": "1.8.0",
"version": "1.8.1",
"description": "filesystem bindings for tar-stream",

@@ -20,6 +20,7 @@ "dependencies": {

"rimraf": "^2.2.8",
"standard": "^4.5.4",
"tape": "^3.0.0"
},
"scripts": {
"test": "tape test/index.js"
"test": "standard && tape test/index.js"
},

@@ -26,0 +27,0 @@ "bugs": {

@@ -19,3 +19,3 @@ var test = require('tape')

.pipe(tar.extract(b))
.on('finish', function() {
.on('finish', function () {
var files = fs.readdirSync(b)

@@ -41,3 +41,3 @@ t.same(files.length, 1)

.pipe(tar.extract(b))
.on('finish', function() {
.on('finish', function () {
var files = fs.readdirSync(b)

@@ -51,4 +51,4 @@ t.same(files.length, 1)

t.ok(fs.statSync(dirB).isDirectory())
var fileB = path.join(dirB, 'test.js')
var fileA = path.join(dirA, 'test.js')
var fileB = path.join(dirB, 'test.txt')
var fileA = path.join(dirA, 'test.txt')
t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))

@@ -79,3 +79,3 @@ t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)

.pipe(tar.extract(b))
.on('finish', function() {
.on('finish', function () {
var files = fs.readdirSync(b).sort()

@@ -127,3 +127,2 @@ t.same(files.length, 2)

test('strip', function (t) {

@@ -138,7 +137,7 @@ t.plan(2)

tar.pack(a)
.pipe(tar.extract(b, {strip:1}))
.pipe(tar.extract(b, {strip: 1}))
.on('finish', function () {
var files = fs.readdirSync(b).sort()
t.same(files.length, 1)
t.same(files[0], 'test.js')
t.same(files[0], 'test.txt')
})

@@ -161,7 +160,7 @@ })

tar.pack(a)
.pipe(tar.extract(b, {strip:1, map:uppercase}))
.pipe(tar.extract(b, {strip: 1, map: uppercase}))
.on('finish', function () {
var files = fs.readdirSync(b).sort()
t.same(files.length, 1)
t.same(files[0], 'TEST.JS')
t.same(files[0], 'TEST.TXT')
})

@@ -179,4 +178,4 @@ })

var aWithMode = function (header) {
if(header.name === 'a') {
header.mode = 0700
if (header.name === 'a') {
header.mode = parseInt(700, 8)
}

@@ -187,3 +186,3 @@ return header

tar.pack(a)
.pipe(tar.extract(b, {map:aWithMode}))
.pipe(tar.extract(b, {map: aWithMode}))
.on('finish', function () {

@@ -193,3 +192,3 @@ var files = fs.readdirSync(b).sort()

t.same(files.length, 1)
t.same(stat.mode & 0777, 0700)
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
})

@@ -207,3 +206,3 @@ })

rimraf.sync(b)
tar.pack(a, { entries: entries })
tar.pack(a, {entries: entries})
.pipe(tar.extract(b))

@@ -210,0 +209,0 @@ .on('finish', function () {

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