cleanup lodash usage
This commit is contained in:
parent
db2be9fe50
commit
562473a718
7 changed files with 25 additions and 15 deletions
|
|
@ -2,7 +2,7 @@ import vm from 'vm';
|
|||
import notify from '../notify';
|
||||
import mapKeys from '../utils/map-keys';
|
||||
import type {parsedConfig, rawConfig, configOptions} from '../../lib/config';
|
||||
import _ from 'lodash';
|
||||
import merge from 'lodash/merge';
|
||||
|
||||
const _extract = (script?: vm.Script): Record<string, any> => {
|
||||
const module: Record<string, any> = {};
|
||||
|
|
@ -44,7 +44,7 @@ const _init = (userCfg: rawConfig, defaultCfg: rawConfig): parsedConfig => {
|
|||
if (!conf.profiles.map((p) => p.name).includes(conf.defaultProfile)) {
|
||||
conf.defaultProfile = conf.profiles[0].name;
|
||||
}
|
||||
return _.merge({}, defaultCfg.config, conf);
|
||||
return merge({}, defaultCfg.config, conf);
|
||||
} else {
|
||||
notify('Error reading configuration: `config` key is missing');
|
||||
return defaultCfg.config || ({} as configOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue