Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Replace util._extend with lodash.assign
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nschonni committed Sep 7, 2016
1 parent 6dda1de commit 61f42de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

var path = require('path'),
util = require('util'),
clonedeep = require('lodash.clonedeep'),
errors = require('./errors'),
assign = require('lodash.assign'),
sass = require('./extensions');

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

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

if (cb) {
options.context.callback.call(options.context, payload, null);
Expand Down Expand Up @@ -437,7 +437,7 @@ module.exports.renderSync = function(opts) {
return result;
}

throw util._extend(new Error(), JSON.parse(result.error));
throw assign(new Error(), JSON.parse(result.error));
};

/**
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
"in-publish": "^2.0.0",
"lodash.assign": "^4.2.0",
"lodash.clonedeep": "^4.3.2",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
Expand Down

0 comments on commit 61f42de

Please sign in to comment.