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

[POC] Move from CJS to ESM #838

Merged
merged 8 commits into from
May 17, 2021
Merged

[POC] Move from CJS to ESM #838

merged 8 commits into from
May 17, 2021

Conversation

PopGoesTheWza
Copy link
Collaborator

@PopGoesTheWza PopGoesTheWza commented May 11, 2021

Fixes no known issues but enable use of ESM dependencies.

  • [?] npm run test succeeds.
  • npm run lint succeeds.
  • Appropriate changes to README are included in PR.

Sorry, something went wrong.

@google-cla google-cla bot added the cla: yes label May 11, 2021
@PopGoesTheWza PopGoesTheWza requested a review from sqrrrl May 11, 2021 23:14
@PopGoesTheWza
Copy link
Collaborator Author

@sqrrrl please review this PR. No fix nor new feature... but it enable the uses of ESM dependencies (i.e. package.json now uses latest version of many packages from sindre horsus)

Trend is popular package switching to ESM. Hence in order to benefit new feature and fix from dependencies, it seem sensible to switch from CJS to ESM.

@sqrrrl
Copy link
Member

sqrrrl commented May 12, 2021

Thanks. Was just starting to look at updating dependencies and it was quickly becoming a rat hole :)

@PopGoesTheWza
Copy link
Collaborator Author

Thanks. Was just starting to look at updating dependencies and it was quickly becoming a rat hole :)

With this PR, ESM packages can be used "as is". Most CJS packages should not need any changes (one counter example is fs-extra)

@PopGoesTheWza
Copy link
Collaborator Author

This Pure ESM package gist was helpful in order to transition.

@sqrrrl sqrrrl merged commit 5126ae0 into google:master May 17, 2021
@PopGoesTheWza PopGoesTheWza deleted the esm branch June 4, 2021 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants