@@ -63,7 +63,7 @@ var API = module.exports = function(opts) {
63
63
if ( opts . pm2_home ) {
64
64
// Override default conf file
65
65
this . pm2_home = opts . pm2_home ;
66
- conf = util . _extend ( conf , path_structure ( this . pm2_home ) ) ;
66
+ conf = Object . assign ( conf , path_structure ( this . pm2_home ) ) ;
67
67
}
68
68
else if ( opts . independent == true && conf . IS_WINDOWS === false ) {
69
69
// Create an unique pm2 instance
@@ -75,7 +75,7 @@ var API = module.exports = function(opts) {
75
75
// It will go as in proc
76
76
if ( typeof ( opts . daemon_mode ) == 'undefined' )
77
77
this . daemon_mode = false ;
78
- conf = util . _extend ( conf , path_structure ( this . pm2_home ) ) ;
78
+ conf = Object . assign ( conf , path_structure ( this . pm2_home ) ) ;
79
79
}
80
80
81
81
this . _conf = conf ;
@@ -299,7 +299,7 @@ API.prototype.start = function(cmd, opts, cb) {
299
299
300
300
var that = this ;
301
301
302
- if ( util . isArray ( opts . watch ) && opts . watch . length === 0 )
302
+ if ( Array . isArray ( opts . watch ) && opts . watch . length === 0 )
303
303
opts . watch = ( opts . rawArgs ? ! ! ~ opts . rawArgs . indexOf ( '--watch' ) : ! ! ~ process . argv . indexOf ( '--watch' ) ) || false ;
304
304
305
305
if ( Common . isConfigFile ( cmd ) || ( typeof ( cmd ) === 'object' ) )
@@ -760,7 +760,7 @@ API.prototype._startScript = function(script, opts, cb) {
760
760
resolved_paths . env [ 'PM2_HOME' ] = that . pm2_home ;
761
761
762
762
var additional_env = Modularizer . getAdditionalConf ( resolved_paths . name ) ;
763
- util . _extend ( resolved_paths . env , additional_env ) ;
763
+ Object . assign ( resolved_paths . env , additional_env ) ;
764
764
765
765
// Is KM linked?
766
766
resolved_paths . km_link = that . gl_is_km_linked ;
@@ -940,7 +940,7 @@ API.prototype._startJson = function(file, opts, action, pipe, cb) {
940
940
// Notice: if people use the same name in different apps,
941
941
// duplicated envs will be overrode by the last one
942
942
var env = envs . reduce ( function ( e1 , e2 ) {
943
- return util . _extend ( e1 , e2 ) ;
943
+ return Object . assign ( e1 , e2 ) ;
944
944
} ) ;
945
945
946
946
// When we are processing JSON, allow to keep the new env by default
@@ -1012,7 +1012,7 @@ API.prototype._startJson = function(file, opts, action, pipe, cb) {
1012
1012
resolved_paths . env [ 'PM2_HOME' ] = that . pm2_home ;
1013
1013
1014
1014
var additional_env = Modularizer . getAdditionalConf ( resolved_paths . name ) ;
1015
- util . _extend ( resolved_paths . env , additional_env ) ;
1015
+ Object . assign ( resolved_paths . env , additional_env ) ;
1016
1016
1017
1017
resolved_paths . env = Common . mergeEnvironmentVariables ( resolved_paths , opts . env , deployConf ) ;
1018
1018
@@ -1226,7 +1226,7 @@ API.prototype._operate = function(action_name, process_name, envs, cb) {
1226
1226
if ( conf . PM2_PROGRAMMATIC == true )
1227
1227
new_env = Common . safeExtend ( { } , process . env ) ;
1228
1228
else
1229
- new_env = util . _extend ( { } , process . env ) ;
1229
+ new_env = Object . assign ( { } , process . env ) ;
1230
1230
1231
1231
Object . keys ( envs ) . forEach ( function ( k ) {
1232
1232
new_env [ k ] = envs [ k ] ;
@@ -1355,7 +1355,7 @@ API.prototype._operate = function(action_name, process_name, envs, cb) {
1355
1355
* if yes load configuration variables and merge with the current environment
1356
1356
*/
1357
1357
var additional_env = Modularizer . getAdditionalConf ( process_name ) ;
1358
- util . _extend ( envs , additional_env ) ;
1358
+ Object . assign ( envs , additional_env ) ;
1359
1359
1360
1360
return processIds ( ids , cb ) ;
1361
1361
} ) ;
@@ -1401,7 +1401,7 @@ API.prototype._handleAttributeUpdate = function(opts) {
1401
1401
1402
1402
delete appConf . exec_mode ;
1403
1403
1404
- if ( util . isArray ( appConf . watch ) && appConf . watch . length === 0 ) {
1404
+ if ( Array . isArray ( appConf . watch ) && appConf . watch . length === 0 ) {
1405
1405
if ( ! ~ opts . rawArgs . indexOf ( '--watch' ) )
1406
1406
delete appConf . watch
1407
1407
}
0 commit comments