Skip to content

Commit

Permalink
Merge pull request #4 from banoni-dev/fix-util-extend-issue
Browse files Browse the repository at this point in the history
Fix issue with util._extend deprecation in @ladjs/consolidate
  • Loading branch information
titanism authored Jul 10, 2024
2 parents 54df695 + d16051f commit 3a43539
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function fromStringRenderer(name) {

return promisify(cb, function (cb) {
readPartials(path, options, function (err, partials) {
const extend = requires.extend || (requires.extend = util._extend);
const extend = requires.extend || (requires.extend = Object.assign);

Check failure on line 183 in lib/consolidate.js

View workflow job for this annotation

GitHub Actions / Node 16 on ubuntu-latest

'extend' is assigned a value but never used.

Check failure on line 183 in lib/consolidate.js

View workflow job for this annotation

GitHub Actions / Node 18 on ubuntu-latest

'extend' is assigned a value but never used.
const opts = extend({}, options);
opts.partials = partials;
if (err) return cb(err);
Expand Down Expand Up @@ -1363,7 +1363,7 @@ exports.dot.render = function (str, options, cb) {
return promisify(cb, function (cb) {
try {
const engine = requires.dot || (requires.dot = require('dot'));
const extend = requires.extend || (requires.extend = util._extend);
const extend = requires.extend || (requires.extend = Object.assign);
let settings = {};
settings = extend(settings, engine.templateSettings);
settings = extend(settings, options ? options.dot : {});
Expand Down Expand Up @@ -1421,7 +1421,7 @@ exports.ractive.render = function (str, options, cb) {
options.template = template;

if (options.data === null || options.data === undefined) {
const extend = requires.extend || (requires.extend = util._extend);
const extend = requires.extend || (requires.extend = Object.assign);

Check failure on line 1424 in lib/consolidate.js

View workflow job for this annotation

GitHub Actions / Node 16 on ubuntu-latest

'extend' is assigned a value but never used.

Check failure on line 1424 in lib/consolidate.js

View workflow job for this annotation

GitHub Actions / Node 18 on ubuntu-latest

'extend' is assigned a value but never used.

// Shallow clone the options object
options.data = extend({}, options);
Expand Down

0 comments on commit 3a43539

Please sign in to comment.