Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lodash 'extend' usage with Object.assign #11812

Merged
merged 1 commit into from Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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