Skip to content

Commit

Permalink
Replace lodash 'clone' usage with ES6 Spread initializer (#11811)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Jul 9, 2020
1 parent aae1862 commit 55ce749
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,5 +1,4 @@
import cloneDeep from "lodash/cloneDeep";
import clone from "lodash/clone";
import semver from "semver";
import path from "path";
import fs from "fs";
Expand Down Expand Up @@ -262,7 +261,7 @@ export default function get(entryLoc): Array<Suite> {
if (shouldIgnore(suiteName)) continue;

const suite = {
options: clone(rootOpts),
options: { ...rootOpts },
tests: [],
title: humanize(suiteName),
filename: entryLoc + "/" + suiteName,
Expand Down
3 changes: 1 addition & 2 deletions packages/babel-traverse/src/visitors.js
@@ -1,6 +1,5 @@
import * as virtualTypes from "./path/lib/virtual-types";
import * as t from "@babel/types";
import clone from "lodash/clone";

/**
* explode() will take a visitor object with all of the various shorthands
Expand Down Expand Up @@ -106,7 +105,7 @@ export function explode(visitor) {
if (existing) {
mergePair(existing, fns);
} else {
visitor[alias] = clone(fns);
visitor[alias] = { ...fns };
}
}
}
Expand Down

0 comments on commit 55ce749

Please sign in to comment.