Remove lodash/pull (#13026)
This commit is contained in:
parent
78cf07767a
commit
d12f9a98c7
@ -17,8 +17,7 @@
|
|||||||
"babel-plugin"
|
"babel-plugin"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-plugin-utils": "workspace:^7.12.13",
|
"@babel/helper-plugin-utils": "workspace:^7.12.13"
|
||||||
"lodash": "^4.17.19"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@babel/core": "^7.0.0-0"
|
"@babel/core": "^7.0.0-0"
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { declare } from "@babel/helper-plugin-utils";
|
import { declare } from "@babel/helper-plugin-utils";
|
||||||
import pull from "lodash/pull";
|
|
||||||
import { types as t } from "@babel/core";
|
import { types as t } from "@babel/core";
|
||||||
|
|
||||||
export default declare(api => {
|
export default declare(api => {
|
||||||
@ -65,11 +64,14 @@ export default declare(api => {
|
|||||||
ObjectExpression(path, file) {
|
ObjectExpression(path, file) {
|
||||||
let proto;
|
let proto;
|
||||||
const { node } = path;
|
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)) {
|
if (isProtoKey(prop)) {
|
||||||
proto = prop.value;
|
proto = prop.value;
|
||||||
pull(node.properties, prop);
|
properties.splice(i, 1);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2565,7 +2565,6 @@ __metadata:
|
|||||||
"@babel/core": "workspace:*"
|
"@babel/core": "workspace:*"
|
||||||
"@babel/helper-plugin-test-runner": "workspace:*"
|
"@babel/helper-plugin-test-runner": "workspace:*"
|
||||||
"@babel/helper-plugin-utils": "workspace:^7.12.13"
|
"@babel/helper-plugin-utils": "workspace:^7.12.13"
|
||||||
lodash: ^4.17.19
|
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@babel/core": ^7.0.0-0
|
"@babel/core": ^7.0.0-0
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user