From 52bea15ad715778a4ca38d150577f0d1d8c190f8 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 26 Apr 2017 23:04:08 +0100 Subject: [PATCH] Upgrade libvips dependency to v8.5.4, plus other bumps --- lib/input.js | 3 +-- package.json | 12 ++++++------ test/unit/io.js | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/input.js b/lib/input.js index fd1e4fe9..9687da44 100644 --- a/lib/input.js +++ b/lib/input.js @@ -1,6 +1,5 @@ 'use strict'; -const util = require('util'); const color = require('color'); const is = require('./is'); const sharp = require('../build/Release/sharp.node'); @@ -143,7 +142,7 @@ function clone () { const that = this; // Clone existing options const clone = this.constructor.call(); - util._extend(clone.options, this.options); + clone.options = Object.assign({}, this.options); // Pass 'finish' event to clone for Stream-based input this.on('finish', function () { // Clone inherits input data diff --git a/package.json b/package.json index 3dd32b18..450d1e21 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "caw": "^2.0.0", "color": "^1.0.3", "got": "^6.7.1", - "nan": "^2.5.1", + "nan": "^2.6.2", "semver": "^5.3.0", "tar": "^2.2.1" }, @@ -76,18 +76,18 @@ "async": "^2.3.0", "bufferutil": "^3.0.0", "cc": "^1.0.0", - "documentation": "^4.0.0-beta.18", + "documentation": "^4.0.0-rc.0", "exif-reader": "^1.0.2", "icc": "^1.0.0", - "mocha": "^3.2.0", - "nyc": "^10.2.0", + "mocha": "^3.3.0", + "nyc": "^10.2.2", "rimraf": "^2.5.4", - "semistandard": "^10.0.0", + "semistandard": "^11.0.0", "unzip": "^0.1.11" }, "license": "Apache-2.0", "config": { - "libvips": "8.5.1" + "libvips": "8.5.4" }, "engines": { "node": ">=4" diff --git a/test/unit/io.js b/test/unit/io.js index 800d90cc..c73e100a 100644 --- a/test/unit/io.js +++ b/test/unit/io.js @@ -288,7 +288,7 @@ describe('Input/output', function () { }); it('Fail when input is empty Buffer', function (done) { - sharp(new Buffer(0)).toBuffer().then(function () { + sharp(Buffer.alloc(0)).toBuffer().then(function () { assert(false); done(); }).catch(function (err) { @@ -298,7 +298,7 @@ describe('Input/output', function () { }); it('Fail when input is invalid Buffer', function (done) { - sharp(new Buffer([0x1, 0x2, 0x3, 0x4])).toBuffer().then(function () { + sharp(Buffer.from([0x1, 0x2, 0x3, 0x4])).toBuffer().then(function () { assert(false); done(); }).catch(function (err) {