Skip to content

Commit

Permalink
Lodash: Remove completely from block-directory package (#44206)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Sep 26, 2022
1 parent 83c397d commit ad07008
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
"@wordpress/notices": "file:../notices",
"@wordpress/plugins": "file:../plugins",
"@wordpress/url": "file:../url",
"change-case": "^4.1.2",
"lodash": "^4.17.21"
"change-case": "^4.1.2"
},
"peerDependencies": {
"react": "^17.0.0",
Expand Down
11 changes: 5 additions & 6 deletions packages/block-directory/src/store/actions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* External dependencies
*/
import { pick } from 'lodash';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -119,7 +114,11 @@ export const installBlockType =
return;
}
unstable__bootstrapServerSideBlockDefinitions( {
[ name ]: pick( response, metadataFields ),
[ name ]: Object.fromEntries(
Object.entries( response ).filter( ( [ key ] ) =>
metadataFields.includes( key )
)
),
} );
} );

Expand Down

0 comments on commit ad07008

Please sign in to comment.