Skip to content

Commit

Permalink
feat: remove lodash-es to fix cjs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
2wce committed Jul 24, 2023
1 parent 9d756d6 commit fab8312
Show file tree
Hide file tree
Showing 20 changed files with 12 additions and 28 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ module.exports = {
alphabetize: { order: 'asc', ignoreCase: true },
},
],
'no-restricted-imports': ['warn'],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { NavigatorSlideInfo } from '@contentful/app-sdk';
import { Button, Card, Heading, Note, Paragraph } from '@contentful/f36-components';
import { Entry } from '@contentful/field-editor-shared';
import { cloneDeep, set } from 'lodash-es';
import { cloneDeep, set } from 'lodash';

import { CombinedLinkActions, MultipleEntryReferenceEditor } from '../../../packages/reference/src';
import { Entity, Link } from '../../../packages/reference/src/types';
Expand Down
3 changes: 1 addition & 2 deletions packages/_shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"@contentful/f36-note": "^4.2.8",
"@contentful/f36-tokens": "^4.0.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.21"
"lodash": "^4.17.15"
},
"peerDependencies": {
"@contentful/app-sdk": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/_shared/src/FieldConnector.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';

import { FieldAPI, ValidationError } from '@contentful/app-sdk';
import { throttle } from 'lodash-es';
import isEqual from 'lodash/isEqual';
import throttle from 'lodash/throttle';

type Nullable = null | undefined;

Expand Down
1 change: 0 additions & 1 deletion packages/_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@contentful/f36-tokens": "^4.0.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"mitt": "2.1.0"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/boolean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"nanoid": "^3.1.3"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
1 change: 0 additions & 1 deletion packages/dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.0",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"nanoid": "^3.1.3"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"@uiw/react-codemirror": "^4.11.4",
"deep-equal": "2.0.5",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/location/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"deep-equal": "2.0.5",
"emotion": "^10.0.17",
"google-map-react": "2.2.0",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
1 change: 0 additions & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"dompurify": "^2.2.9",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"markdown-to-jsx": "^7.1.1"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/multiple-line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
1 change: 0 additions & 1 deletion packages/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"nanoid": "^3.1.3"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/rating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
1 change: 0 additions & 1 deletion packages/reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"deep-equal": "2.0.5",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"moment": "^2.20.0",
"p-queue": "^4.0.0",
"react-intersection-observer": "9.4.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/single-line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down
1 change: 0 additions & 1 deletion packages/slug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"@types/speakingurl": "^13.0.2",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"speakingurl": "^13.0.0",
"use-debounce": "^7.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/tags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"array-move": "^3.0.0",
"emotion": "^10.0.0",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"react-sortable-hoc": "^2.0.0"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"@contentful/f36-tokens": "^4.0.0",
"@contentful/field-editor-shared": "^1.3.0",
"emotion": "^10.0.17",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.15"
},
"devDependencies": {
"@contentful/field-editor-test-utils": "^1.4.0"
Expand Down

0 comments on commit fab8312

Please sign in to comment.