Commit 61f42dee by Nick Schonning

Replace util._extend with lodash.assign

This was never part of the public API, and has officially been
depreciated in Node 6 https://github.com/nodejs/node/pull/4903
Object.assign can't be used yet since it requires ES2015
parent 6dda1ded
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
*/ */
var path = require('path'), var path = require('path'),
util = require('util'),
clonedeep = require('lodash.clonedeep'), clonedeep = require('lodash.clonedeep'),
errors = require('./errors'), errors = require('./errors'),
assign = require('lodash.assign'),
sass = require('./extensions'); sass = require('./extensions');
if (!sass.hasBinary(sass.getBinaryPath())) { if (!sass.hasBinary(sass.getBinaryPath())) {
...@@ -289,7 +289,7 @@ module.exports.render = function(opts, cb) { ...@@ -289,7 +289,7 @@ module.exports.render = function(opts, cb) {
// options.error and options.success are for libsass binding // options.error and options.success are for libsass binding
options.error = function(err) { options.error = function(err) {
var payload = util._extend(new Error(), JSON.parse(err)); var payload = assign(new Error(), JSON.parse(err));
if (cb) { if (cb) {
options.context.callback.call(options.context, payload, null); options.context.callback.call(options.context, payload, null);
...@@ -437,7 +437,7 @@ module.exports.renderSync = function(opts) { ...@@ -437,7 +437,7 @@ module.exports.renderSync = function(opts) {
return result; return result;
} }
throw util._extend(new Error(), JSON.parse(result.error)); throw assign(new Error(), JSON.parse(result.error));
}; };
/** /**
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
"get-stdin": "^4.0.1", "get-stdin": "^4.0.1",
"glob": "^7.0.3", "glob": "^7.0.3",
"in-publish": "^2.0.0", "in-publish": "^2.0.0",
"lodash.assign": "^4.2.0",
"lodash.clonedeep": "^4.3.2", "lodash.clonedeep": "^4.3.2",
"meow": "^3.7.0", "meow": "^3.7.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment