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

fix: remove lodash-es to fix cjs issues [TOL-1346] #1452

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

2wce
Copy link
Contributor

@2wce 2wce commented Jul 24, 2023

@contentful/field-editor-shared is importing lodash-es which seems to cause some issues: https://discord.com/channels/1030176999471321129/1111350294434025613/1132070425254445186

In General:
ESM can import CJS
CJS can't import ESM

@contentful/field-editor-shared is published as CJS and "ESM". Therefore it should only import CJS dependencies. FieldConnector.ts is importing from lodash-es. Also, the package depends on lodash-es. Removing the dependency and avoid importing from lodash-es to have a proper CJS package

@2wce 2wce requested a review from a team as a code owner July 24, 2023 15:40
@2wce 2wce self-assigned this Jul 24, 2023
@2wce 2wce changed the title feat: remove lodash-es to fix cjs issues feat: remove lodash-es to fix cjs issues [] Jul 24, 2023
@2wce 2wce changed the title feat: remove lodash-es to fix cjs issues [] feat: remove lodash-es to fix cjs issues [TOL-1346] Jul 25, 2023
Copy link
Contributor

@andipaetzold andipaetzold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick search and found some remaining usaged of lodash-es. Should we remove those as well to prevent future devs from using lodash-es?

image

Rest looks good

Should we merge this as a bugfix release rather than a feature release?

packages/single-line/src/SingleLineEditor.test.tsx Outdated Show resolved Hide resolved
@2wce 2wce force-pushed the fix/remove-lodash-es-dependency branch from e683681 to 65470b9 Compare July 25, 2023 07:41
@2wce 2wce changed the title feat: remove lodash-es to fix cjs issues [TOL-1346] fix: remove lodash-es to fix cjs issues [TOL-1346] Jul 25, 2023
@2wce 2wce merged commit 0147baa into master Jul 25, 2023
8 checks passed
@2wce 2wce deleted the fix/remove-lodash-es-dependency branch July 25, 2023 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment