From d16051f3d66abe440c508d5f230a099765626f0c Mon Sep 17 00:00:00 2001 From: Ahmed Barhoumi Date: Wed, 10 Jul 2024 22:40:28 +0100 Subject: [PATCH] Fix issue with util._extend deprecation in @ladjs/consolidate --- lib/consolidate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/consolidate.js b/lib/consolidate.js index 9706d4c..59eca13 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -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); const opts = extend({}, options); opts.partials = partials; if (err) return cb(err); @@ -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 : {}); @@ -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); // Shallow clone the options object options.data = extend({}, options);