Skip to content

Commit

Permalink
Lodash: Refactor away from _.camelCase() (#43220)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Aug 15, 2022
1 parent 1a83ae7 commit 04209c8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ module.exports = {
{
name: 'lodash',
importNames: [
'camelCase',
'capitalize',
'chunk',
'clamp',
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

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

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

/**
* WordPress dependencies
Expand Down
1 change: 1 addition & 0 deletions packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@wordpress/i18n": "file:../i18n",
"@wordpress/is-shallow-equal": "file:../is-shallow-equal",
"@wordpress/shortcode": "file:../shortcode",
"change-case": "^4.1.2",
"colord": "^2.7.0",
"hpq": "^1.3.0",
"is-plain-obj": "^4.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
/**
* External dependencies
*/
import { camelCase, isEmpty, mapKeys, pick, pickBy } from 'lodash';
import { camelCase } from 'change-case';
import { isEmpty, mapKeys, pick, pickBy } from 'lodash';

/**
* WordPress dependencies
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@wordpress/primitives": "file:../primitives",
"@wordpress/rich-text": "file:../rich-text",
"@wordpress/warning": "file:../warning",
"change-case": "^4.1.2",
"classnames": "^2.3.1",
"colord": "^2.7.0",
"dom-scroll-into-view": "^1.2.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
import { find, get, camelCase, has } from 'lodash';
import { camelCase } from 'change-case';
import { find, get, has } from 'lodash';
import { Dimensions } from 'react-native';

/**
Expand Down

0 comments on commit 04209c8

Please sign in to comment.