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

bestzip

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestzip - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

13

bin/cli.js

@@ -13,2 +13,7 @@ #!/usr/bin/env node

})
.option("level", {
describe: "Level of compression",
type: "number",
default: -1,
})
.demand(2).argv;

@@ -19,2 +24,7 @@

if (argv.level < -1 || argv.level > 9) {
console.error("Invalid compression level, must be >= 0 and <= 9");
process.exit(1);
}
console.log("Writing %s to %s...", source.join(", "), destination);

@@ -31,3 +41,4 @@

destination: destination,
verbose: argv.verbose,
verbose: !!argv.verbose,
level: argv.level,
})

@@ -34,0 +45,0 @@ .then(function () {

@@ -74,2 +74,11 @@ // creates a zip file using either the native `zip` command if available,

);
if (
typeof options.level == "number" &&
!isNaN(options.level) &&
options.level >= 0 &&
options.level <= 9
) {
args.splice(0, 0, "-" + options.level.toString());
}
const zipProcess = cp.spawn(command, args, {

@@ -103,3 +112,5 @@ stdio: "inherit",

const output = fs.createWriteStream(path.resolve(cwd, options.destination));
const archive = archiver("zip");
const archive = archiver("zip", {
zlib: { level: options.level },
});

@@ -106,0 +117,0 @@ output.on("close", resolve);

2

package.json
{
"name": "bestzip",
"version": "2.2.0",
"version": "2.2.1",
"description": "Uses OS zip command if avaliable (for better performance and speed) or node.js version if there is no system command avaliable. Can be called via node or command line.",

@@ -5,0 +5,0 @@ "main": "lib/bestzip.js",

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