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

archiver-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archiver-utils - npm Package Compare versions

Comparing version 2.1.0 to 3.0.3

0

file.js

@@ -0,0 +0,0 @@ /**

23

index.js

@@ -10,3 +10,2 @@ /**

var path = require('path');
var nutil = require('util');
var lazystream = require('lazystream');

@@ -22,8 +21,2 @@ var normalizePath = require('normalize-path');

function assertPath(path) {
if (typeof path !== 'string') {
throw new TypeError('Path must be a string. Received ' + nutils.inspect(path));
}
}
utils.collectStream = function(source, callback) {

@@ -41,3 +34,3 @@ var collection = [];

source.on('end', function() {
var buf = new Buffer(size);
var buf = Buffer.alloc(size);
var offset = 0;

@@ -88,10 +81,10 @@

if (source === null) {
return new Buffer(0);
return Buffer.alloc(0);
} else if (typeof source === 'string') {
return new Buffer(source);
} else if (utils.isStream(source) && !source._readableState) {
var normalized = new PassThrough();
source.pipe(normalized);
return normalized;
return Buffer.from(source);
} else if (utils.isStream(source)) {
// Always pipe through a PassThrough stream to guarantee pausing the stream if it's already flowing,
// since it will only be processed in a (distant) future iteration of the event loop, and will lose
// data if already flowing now.
return source.pipe(new PassThrough());
}

@@ -98,0 +91,0 @@

{
"name": "archiver-utils",
"version": "2.1.0",
"version": "3.0.3",
"license": "MIT",

@@ -28,3 +28,3 @@ "description": "utility functions for archiver",

"engines": {
"node": ">= 6"
"node": ">= 10"
},

@@ -44,9 +44,9 @@ "scripts": {

"normalize-path": "^3.0.0",
"readable-stream": "^2.0.0"
"readable-stream": "^3.6.0"
},
"devDependencies": {
"chai": "^4.2.0",
"mkdirp": "^0.5.0",
"mocha": "^5.0.0",
"rimraf": "^2.6.3"
"chai": "4.3.7",
"mkdirp": "3.0.1",
"mocha": "9.2.2",
"rimraf": "3.0.2"
},

@@ -53,0 +53,0 @@ "publishConfig": {

@@ -1,4 +0,3 @@

# Archiver Utils [![Build Status](https://travis-ci.org/archiverjs/archiver-utils.svg?branch=master)](https://travis-ci.org/archiverjs/archiver-utils) [![Build status](https://ci.appveyor.com/api/projects/status/7254ojgmlglhqbed/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/archiver-utils/branch/master)
# Archiver Utils
## Things of Interest

@@ -5,0 +4,0 @@ - [Changelog](https://github.com/archiverjs/archiver-utils/releases)

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