Replace lodash 'extend' usage with Object.assign (#11812)
This commit is contained in:
parent
bff6298578
commit
aae1862170
@ -1,6 +1,5 @@
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import clone from "lodash/clone";
|
||||
import extend from "lodash/extend";
|
||||
import semver from "semver";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
@ -119,7 +118,7 @@ function pushTask(taskName, taskDir, suite, suiteName) {
|
||||
const taskOpts = cloneDeep(suite.options);
|
||||
|
||||
const taskOptsLoc = tryResolve(taskDir + "/options");
|
||||
if (taskOptsLoc) extend(taskOpts, require(taskOptsLoc));
|
||||
if (taskOptsLoc) Object.assign(taskOpts, require(taskOptsLoc));
|
||||
|
||||
const test = {
|
||||
optionsDir: taskOptsLoc ? path.dirname(taskOptsLoc) : null,
|
||||
|
||||
@ -7,7 +7,6 @@ import { codeFrameColumns } from "@babel/code-frame";
|
||||
import defaults from "lodash/defaults";
|
||||
import escapeRegExp from "lodash/escapeRegExp";
|
||||
import * as helpers from "./helpers";
|
||||
import extend from "lodash/extend";
|
||||
import merge from "lodash/merge";
|
||||
import resolve from "resolve";
|
||||
import assert from "assert";
|
||||
@ -380,7 +379,7 @@ export default function (
|
||||
sourceMap: !!(task.sourceMappings || task.sourceMap),
|
||||
});
|
||||
|
||||
extend(task.options, taskOpts);
|
||||
Object.assign(task.options, taskOpts);
|
||||
|
||||
if (dynamicOpts) dynamicOpts(task.options, task);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user