+14
-20
| var path = require('path'), | ||
| fs = require('fs'), | ||
| tar = require('tar'), | ||
| fstream = require('fstream'); | ||
| tar = require('tar'); | ||
@@ -20,13 +19,9 @@ | ||
| var dest = fs.createWriteStream(pkg); | ||
| var packer = tar.Pack({noProprietary: true}) | ||
| .on('error', _cb) | ||
| .on('end', _cb); | ||
| fstream.Reader({path: dir, type: 'Directory'}) | ||
| .pipe(packer) | ||
| .pipe(dest) | ||
| .on('error', _cb) | ||
| .on('end', _cb); | ||
| tar.c({ | ||
| cwd: path.dirname(dir), | ||
| file: pkg, | ||
| portable: true | ||
| }, [path.basename(dir)]).then(function() { | ||
| _cb(); | ||
| }).catch(_cb); | ||
| }; | ||
@@ -43,9 +38,8 @@ | ||
| var extractor = tar.Extract({path: dir}) | ||
| .on('error', _cb) | ||
| .on('end', _cb); | ||
| fs.createReadStream(pkg) | ||
| .on('error', _cb) | ||
| .pipe(extractor); | ||
| tar.x({ | ||
| cwd: dir, | ||
| file: pkg | ||
| }).then(function() { | ||
| _cb(); | ||
| }).catch(_cb); | ||
| }; |
+3
-4
| { | ||
| "name": "inst", | ||
| "version": "1.1.0", | ||
| "version": "2.0.0", | ||
| "publishConfig": { | ||
@@ -9,5 +9,4 @@ "registry": "https://registry.npmjs.org/" | ||
| "commander": "^2.9.0", | ||
| "fstream": "^1.0.8", | ||
| "npm": "^2.14.13", | ||
| "tar": "^2.2.1" | ||
| "tar": "^7.5.9" | ||
| }, | ||
@@ -45,4 +44,4 @@ "description": "Faster npm installs via caching whole node_module dir", | ||
| "engines": { | ||
| "node": "^4.2" | ||
| "node": ">=14" | ||
| } | ||
| } |
@@ -15,3 +15,3 @@ var assert = require('assert'), | ||
| fs.mkdirSync(base, 0755); | ||
| fs.mkdirSync(base, 0o755); | ||
| fs.writeFileSync(base + '/1.tar', 'data'); | ||
@@ -18,0 +18,0 @@ setTimeout(function() { |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
3
-25%7
-12.5%15898
-1.72%16
-5.88%294
-1.01%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated