From 3d35ad5bd21c2e2043000294773d03240fdc5263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Sat, 18 Aug 2018 13:46:28 +0200 Subject: [PATCH 1/3] =?UTF-8?q?follow=20node=20LTS,=20node=204=20has=20rea?= =?UTF-8?q?ched=20it=E2=80=99s=20end=20of=20life=20in=20April?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index f9638d95d..c8ea1f962 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lib" ], "engines": { - "node": ">= 4" + "node": ">= 6" }, "scripts": { "test": "mocha --reporter dot", @@ -33,7 +33,6 @@ "async": "^2.0.0", "buffer-crc32": "^0.2.1", "glob": "^7.0.0", - "lodash.assign": "^4.2.0", "readable-stream": "^2.0.0", "tar-stream": "^1.5.0", "zip-stream": "^1.2.0" From 55b661b6a11c4c7d329398c29d59afc50d2743e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Sat, 18 Aug 2018 13:46:59 +0200 Subject: [PATCH 2/3] Removed lodash completely --- lib/core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/core.js b/lib/core.js index 8ca545690..f74248859 100644 --- a/lib/core.js +++ b/lib/core.js @@ -8,7 +8,6 @@ var fs = require('fs'); var glob = require('glob'); var async = require('async'); -var _ = { extend: require('lodash.assign') }; var path = require('path'); var util = require('archiver-utils'); @@ -639,7 +638,7 @@ Archiver.prototype.directory = function(dirpath, destpath, data) { function onGlobMatch(match){ var ignoreMatch = false; - var entryData = _.extend({}, data); + var entryData = Object.assign({}, data); entryData.name = match; entryData.prefix = destpath; match = globber._makeAbs(match); @@ -729,7 +728,7 @@ Archiver.prototype.glob = function(pattern, options, data) { } function onGlobMatch(match){ - var entryData = _.extend({}, data); + var entryData = Object.assign({}, data); if (options.cwd) { entryData.name = match; From 0fa98c451f2ffda74e735747a3d487edc93887f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Sat, 18 Aug 2018 13:58:36 +0200 Subject: [PATCH 3/3] Removed deprecated constructor --- benchmark/common.js | 2 +- test/helpers/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/common.js b/benchmark/common.js index 52dfb4011..667c741cd 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -1,5 +1,5 @@ function binaryBuffer(n) { - var buffer = new Buffer(n); + var buffer = Buffer.alloc(n); for (var i = 0; i < n; i++) { buffer.writeUInt8(i&255, i); diff --git a/test/helpers/index.js b/test/helpers/index.js index 22957fa74..05cb597ad 100644 --- a/test/helpers/index.js +++ b/test/helpers/index.js @@ -21,7 +21,7 @@ function adjustDateByOffset(d, offset) { module.exports.adjustDateByOffset = adjustDateByOffset; function binaryBuffer(n) { - var buffer = new Buffer(n); + var buffer = Buffer.alloc(n); for (var i = 0; i < n; i++) { buffer.writeUInt8(i&255, i); @@ -35,7 +35,7 @@ module.exports.binaryBuffer = binaryBuffer; function BinaryStream(size, options) { Readable.call(this, options); - var buf = new Buffer(size); + var buf = Buffer.alloc(size); for (var i = 0; i < size; i++) { buf.writeUInt8(i&255, i);