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

[Improvement] Usage of ESM imports instead of CommonJS #97

Closed
theoludwig opened this issue Aug 13, 2021 · 2 comments · Fixed by #182
Closed

[Improvement] Usage of ESM imports instead of CommonJS #97

theoludwig opened this issue Aug 13, 2021 · 2 comments · Fixed by #182
Assignees
Labels
improvement Improve structure/format/performance/refactor/tests of the code released

Comments

@theoludwig
Copy link
Member

theoludwig commented Aug 13, 2021

Proposal

We should use ESM imports instead of CommonJS.
See: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Blocked by microsoft/TypeScript#33079.

Badly, currently jest doesn't support very well ESM imports, we should wait until it is correctly supported.
See: jestjs/jest#11167 and jestjs/jest#10025

Note: It is a BREAKING CHANGE (not as a CLI).

@theoludwig theoludwig added feature request Suggest a new feature idea blocked labels Aug 13, 2021
@theoludwig theoludwig self-assigned this Aug 13, 2021
@theoludwig theoludwig added feature request Suggest a new feature idea improvement Improve structure/format/performance/refactor/tests of the code and removed feature request Suggest a new feature idea labels Jan 29, 2022
@theoludwig theoludwig removed their assignment Jan 29, 2022
@theoludwig theoludwig self-assigned this Mar 19, 2022
@theoludwig
Copy link
Member Author

Instead of using jest, we could use tap, it supports ESM very well and honestly is far better for running tests in a Node.js environment than jest.

That would be a major refactor of the current codebase but it will bring many benefits in the long term.
I will try to do this issue when I have some time. 😄

@github-actions
Copy link

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improve structure/format/performance/refactor/tests of the code released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant