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

Remove lodash/pull #13026

Merged
merged 1 commit into from Mar 19, 2021
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-plugin-transform-proto-to-assign/package.json
Expand Up @@ -17,8 +17,7 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.12.13",
"lodash": "^4.17.19"
"@babel/helper-plugin-utils": "workspace:^7.12.13"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
Expand Down
8 changes: 5 additions & 3 deletions packages/babel-plugin-transform-proto-to-assign/src/index.js
@@ -1,5 +1,4 @@
import { declare } from "@babel/helper-plugin-utils";
import pull from "lodash/pull";
import { types as t } from "@babel/core";

export default declare(api => {
Expand Down Expand Up @@ -65,11 +64,14 @@ export default declare(api => {
ObjectExpression(path, file) {
let proto;
const { node } = path;
const { properties } = node;

for (const prop of (node.properties: Array)) {
for (let i = 0; i < properties.length; i++) {
const prop = properties[i];
if (isProtoKey(prop)) {
proto = prop.value;
pull(node.properties, prop);
properties.splice(i, 1);
break;
}
}

Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Expand Up @@ -2565,7 +2565,6 @@ __metadata:
"@babel/core": "workspace:*"
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/helper-plugin-utils": "workspace:^7.12.13"
lodash: ^4.17.19
peerDependencies:
"@babel/core": ^7.0.0-0
languageName: unknown
Expand Down