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

decompress

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decompress - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

19

index.js
'use strict';
const fs = require('fs');
const path = require('path');
const fs = require('graceful-fs');
const decompressTar = require('decompress-tar');

@@ -11,2 +11,3 @@ const decompressTarbz2 = require('decompress-tarbz2');

const stripDirs = require('strip-dirs');
const fsP = pify(fs);

@@ -45,9 +46,12 @@

return Promise.all(files.map(x => {
const dest = path.join(output, x.path);
const mode = x.mode & ~process.umask();
const now = new Date();
if (x.type === 'directory') {
return pify(mkdirp)(path.join(output, x.path)).then(() => x);
return pify(mkdirp)(dest)
.then(() => fsP.utimes(dest, now, x.mtime))
.then(() => x);
}
const dest = path.join(output, x.path);
const mode = x.mode & ~process.umask();
return pify(mkdirp)(path.dirname(dest))

@@ -59,2 +63,6 @@ .then(() => {

if (x.type === 'symlink' && process.platform === 'win32') {
return fsP.link(x.linkname, dest);
}
if (x.type === 'symlink') {

@@ -66,2 +74,3 @@ return fsP.symlink(x.linkname, dest);

})
.then(() => x.type === 'file' && fsP.utimes(dest, now, x.mtime))
.then(() => x);

@@ -68,0 +77,0 @@ }));

{
"name": "decompress",
"version": "4.0.0",
"version": "4.1.0",
"description": "Extracting archives made easy",

@@ -37,5 +37,6 @@ "license": "MIT",

"decompress-unzip": "^4.0.1",
"graceful-fs": "^4.1.10",
"mkdirp": "^0.5.1",
"pify": "^2.3.0",
"strip-dirs": "^1.1.1"
"strip-dirs": "^2.0.0"
},

@@ -42,0 +43,0 @@ "devDependencies": {

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