Skip to content

Commit 61f42de

Browse files
committed
Replace util._extend with lodash.assign
This was never part of the public API, and has officially been depreciated in Node 6 nodejs/node#4903 Object.assign can't be used yet since it requires ES2015
1 parent 6dda1de commit 61f42de

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44

55
var path = require('path'),
6-
util = require('util'),
76
clonedeep = require('lodash.clonedeep'),
87
errors = require('./errors'),
8+
assign = require('lodash.assign'),
99
sass = require('./extensions');
1010

1111
if (!sass.hasBinary(sass.getBinaryPath())) {
@@ -289,7 +289,7 @@ module.exports.render = function(opts, cb) {
289289

290290
// options.error and options.success are for libsass binding
291291
options.error = function(err) {
292-
var payload = util._extend(new Error(), JSON.parse(err));
292+
var payload = assign(new Error(), JSON.parse(err));
293293

294294
if (cb) {
295295
options.context.callback.call(options.context, payload, null);
@@ -437,7 +437,7 @@ module.exports.renderSync = function(opts) {
437437
return result;
438438
}
439439

440-
throw util._extend(new Error(), JSON.parse(result.error));
440+
throw assign(new Error(), JSON.parse(result.error));
441441
};
442442

443443
/**

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"get-stdin": "^4.0.1",
6060
"glob": "^7.0.3",
6161
"in-publish": "^2.0.0",
62+
"lodash.assign": "^4.2.0",
6263
"lodash.clonedeep": "^4.3.2",
6364
"meow": "^3.7.0",
6465
"mkdirp": "^0.5.1",

0 commit comments

Comments
 (0)