Socket
Socket
Sign inDemoInstall

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.1 to 4.4.2

16

lib/unpack.js

@@ -15,2 +15,3 @@ 'use strict'

const CHECKFS = Symbol('checkFs')
const ISREUSABLE = Symbol('isReusable')
const MAKEFS = Symbol('makeFs')

@@ -355,2 +356,13 @@ const FILE = Symbol('file')

// Check if we can reuse an existing filesystem entry safely and
// overwrite it, rather than unlinking and recreating
// Windows doesn't report a useful nlink, so we just never reuse entries
[ISREUSABLE] (entry, st) {
return entry.type === 'File' &&
!this.unlink &&
st.isFile() &&
st.nlink <= 1 &&
process.platform !== 'win32'
}
// check if a thing is there, and if so, try to clobber it

@@ -365,3 +377,3 @@ [CHECKFS] (entry) {

this[SKIP](entry)
else if (er || (entry.type === 'File' && !this.unlink && st.isFile()))
else if (er || this[ISREUSABLE](entry, st))
this[MAKEFS](null, entry)

@@ -428,3 +440,3 @@ else if (st.isDirectory()) {

return this[SKIP](entry)
else if (entry.type === 'File' && !this.unlink && st.isFile())
else if (this[ISREUSABLE](entry, st))
return this[MAKEFS](null, entry)

@@ -431,0 +443,0 @@ else {

10

package.json

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

"description": "tar for node",
"version": "4.4.1",
"version": "4.4.2",
"repository": {

@@ -25,3 +25,3 @@ "type": "git",

"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.1",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.2"

@@ -35,5 +35,5 @@ },

"rimraf": "^2.6.2",
"tap": "^11.1.3",
"tar-fs": "^1.16.0",
"tar-stream": "^1.5.2"
"tap": "^11.1.4",
"tar-fs": "^1.16.2",
"tar-stream": "^1.6.0"
},

@@ -40,0 +40,0 @@ "license": "ISC",

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