Skip to content

Commit

Permalink
Replace lodash 'extend' usage with Object.assign (#11812)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Jul 9, 2020
1 parent bff6298 commit aae1862
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/babel-helper-fixtures/src/index.js
@@ -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";
Expand Down Expand Up @@ -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,
Expand Down
Expand Up @@ -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";
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit aae1862

Please sign in to comment.