Skip to content

Commit 504ece0

Browse files
committed
fix: replace deprecated util._extend with Object.assign
The `util._extend` API triggers a DeprecationWarning (DEP0060) on recent versions of Node.js. `Object.assign` has identical semantics and is the recommended replacement. Removes the now-unused `util` import. Fixes #180
1 parent 782cf09 commit 504ece0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/envs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// License text available at https://opensource.org/licenses/MIT
55

66
var fs = require('fs');
7-
var util = require('util');
87
var cons = require('./console').Console;
98

109
function method(name) {
@@ -144,7 +143,7 @@ function loadEnvsFile(path) {
144143
}
145144

146145
function loadEnvs(path) {
147-
var envs = path.split(',').map(loadEnvsFile).reduce(util._extend, {});
146+
var envs = path.split(',').map(loadEnvsFile).reduce(Object.assign, {});
148147
var sorted = Object.create(null);
149148
Object.keys(envs).sort().forEach(function(k) {
150149
sorted[k] = envs[k];

0 commit comments

Comments
 (0)