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

onezip

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onezip - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

bin/onezip.mjs

1

lib/inhale.js

@@ -25,2 +25,1 @@ 'use strict';

});
'use strict';
const process = require('node:process');
const isString = (a) => typeof a === 'string';
const {

@@ -7,2 +9,3 @@ createReadStream,

} = require('fs');
const {

@@ -13,2 +16,3 @@ mkdir,

} = require('fs/promises');
const path = require('path');

@@ -35,3 +39,3 @@ const {EventEmitter} = require('events');

function check(from, to, files) {
assert(typeof from === 'string', 'from should be a string!');
assert(isString(from), 'from should be a string!');
assert(/string|object/.test(typeof to), 'to should be string or object!');

@@ -167,4 +171,3 @@

const streamFile = typeof _to === 'object' ?
_to : createWriteStream(_to);
const streamFile = typeof _to === 'object' ? _to : createWriteStream(_to);

@@ -229,2 +232,3 @@ const [errorPipe] = await tryToCatch(pipe, [

const autoClose = true;
const options = {

@@ -257,3 +261,3 @@ lazyEntries,

if (/\/$/.test(fileName)) {
if (fileName.endsWith('/')) {
const [e] = await tryToCatch(mkdir, name, {

@@ -268,2 +272,3 @@ recursive: true,

let e;
[e] = await tryToCatch(mkdir, dirname(name), {

@@ -276,6 +281,3 @@ recursive: true,

[e] = await tryToCatch(pipe, [
readStream,
createWriteStream(name),
]);
[e] = await tryToCatch(pipe, [readStream, createWriteStream(name)]);

@@ -313,2 +315,1 @@ fn(e);

}

@@ -15,7 +15,3 @@ 'use strict';

link,
} = await inhale(finder, [
'file',
'directory',
'link',
]);
} = await inhale(finder, ['file', 'directory', 'link']);

@@ -35,2 +31,1 @@ const names = [

};
{
"name": "onezip",
"version": "5.0.0",
"version": "6.0.0",
"description": "pack and extract .zip archives with emitter",

@@ -9,3 +9,3 @@ "type": "commonjs",

"bin": {
"onezip": "bin/onezip.js"
"onezip": "bin/onezip.mjs"
},

@@ -27,6 +27,6 @@ "scripts": {

"findit2": "^2.2.3",
"glob": "^7.0.0",
"glob": "^10.3.10",
"pipe-io": "^4.0.0",
"try-to-catch": "^3.0.0",
"yargs-parser": "^20.2.4",
"yargs-parser": "^21.1.1",
"yauzl": "^2.6.0",

@@ -36,19 +36,18 @@ "yazl": "^2.4.1"

"devDependencies": {
"@cloudcmd/stub": "^3.1.0",
"@iocmd/wait": "^1.0.0",
"coveralls": "^3.0.0",
"eslint": "^7.3.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-putout": "^6.11.0",
"madrun": "^8.2.0",
"@cloudcmd/stub": "^4.0.1",
"@iocmd/wait": "^2.1.0",
"eslint": "^9.0.0-alpha.2",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-putout": "^22.3.1",
"madrun": "^10.0.1",
"mock-require": "^3.0.2",
"nodemon": "^2.0.2",
"nodemon": "^3.0.3",
"nyc": "^15.0.0",
"putout": "^13.1.2",
"rimraf": "^3.0.0",
"supertape": "^4.1.0",
"putout": "^35.0.1",
"rimraf": "^5.0.5",
"supertape": "^10.0.0",
"try-catch": "^3.0.0"
},
"engines": {
"node": ">=14"
"node": ">=18"
},

@@ -55,0 +54,0 @@ "repository": {

@@ -1,2 +0,2 @@

# OneZip [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
# OneZip [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

@@ -48,10 +48,6 @@ Pack and extract .zip archives with emitter.

const name = 'pipe.tar.gz';
const from = cwd + '/pipe-io';
const from = `${cwd}/pipe-io`;
const to = path.join(cwd, name);
const pack = onezip.pack(from, to, [
'LICENSE',
'README.md',
'package.json',
]);
const pack = onezip.pack(from, to, ['LICENSE', 'README.md', 'package.json']);

@@ -67,3 +63,3 @@ pack.on('file', (name) => {

pack.on('progress', (percent) => {
console.log(percent + '%');
console.log(`${percent}%`);
});

@@ -90,3 +86,3 @@

const name = 'pipe.zip';
const to = cwd + '/pipe-io';
const to = `${cwd}/pipe-io`;
const from = path.join(cwd, name);

@@ -105,3 +101,3 @@

extract.on('progress', (percent) => {
console.log(percent + '%');
console.log(`${percent}%`);
});

@@ -139,9 +135,7 @@

[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/node-onezip/master.svg?style=flat
[DependencyStatusIMGURL]: https://img.shields.io/david/coderaiser/node-onezip.svg?style=flat
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[NPMURL]: https://npmjs.org/package/onezip "npm"
[BuildStatusURL]: https://travis-ci.org/coderaiser/node-onezip "Build Status"
[DependencyStatusURL]: https://david-dm.org/coderaiser/node-onezip "Dependency Status"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]: https://coveralls.io/github/coderaiser/node-onezip?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/node-onezip/badge.svg?branch=master&service=github

Sorry, the diff of this file is not supported yet

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