7zip-bin
Advanced tools
Comparing version 2.4.1 to 3.0.0
22
index.js
@@ -5,14 +5,14 @@ "use strict" | ||
const nameMap = { | ||
"darwin": "mac", | ||
"win32": "win", | ||
"linux": "linux", | ||
if (process.env.USE_SYSTEM_7ZA === "true") { | ||
exports.path7za = "7za" | ||
} | ||
const suffix = nameMap[process.platform] | ||
if (suffix == null) { | ||
throw new Error("Unsupported platform " + process.platform) | ||
else if (process.platform === "darwin") { | ||
exports.path7za = path.join(__dirname, "mac", "7za") | ||
} | ||
exports.path7za = process.env.USE_SYSTEM_7ZA === "true" ? "7za" : require(`7zip-bin-${suffix}`).path7za | ||
exports.path7x = path.join(__dirname, "7x.sh") | ||
exports.pathCompressStdIn = path.join(__dirname, "compress.sh") | ||
else if (process.platform === "win32") { | ||
exports.path7za = path.join(__dirname, "win", process.arch, "7za.exe") | ||
} | ||
else { | ||
exports.path7za = path.join(__dirname, "linux", process.arch, "7za") | ||
} | ||
exports.path7x = path.join(__dirname, "7x.sh") |
{ | ||
"name": "7zip-bin", | ||
"description": "7-Zip precompiled binaries", | ||
"version": "2.4.1", | ||
"version": "3.0.0", | ||
"files": [ | ||
@@ -9,12 +9,8 @@ "*.js", | ||
"compress.sh", | ||
"index.d.ts" | ||
"index.d.ts", | ||
"**/7za", | ||
"**/7za.exe" | ||
], | ||
"postinstall": "node ./fix-permissions.js", | ||
"license": "MIT", | ||
"repository": "develar/7zip-bin", | ||
"optionalDependencies": { | ||
"7zip-bin-mac": "~1.0.1", | ||
"7zip-bin-win": "~2.1.1", | ||
"7zip-bin-linux": "~1.3.1" | ||
}, | ||
"keywords": [ | ||
@@ -21,0 +17,0 @@ "7zip", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
8750905
0
14
2
18