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 #93

Closed
theoludwig opened this issue Apr 22, 2021 · 2 comments
Closed

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

theoludwig opened this issue Apr 22, 2021 · 2 comments
Assignees
Labels
improvement Improve structure/format/performance/refactor/tests of the code
Milestone

Comments

@theoludwig
Copy link
Member

theoludwig commented Apr 22, 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.

@theoludwig theoludwig added the improvement Improve structure/format/performance/refactor/tests of the code label Apr 22, 2021
@theoludwig theoludwig added this to the 3.0.0 milestone Apr 22, 2021
@theoludwig theoludwig self-assigned this Apr 22, 2021
@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. 😄

@theoludwig
Copy link
Member Author

Fixed in dbb3637

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
Projects
None yet
Development

No branches or pull requests

1 participant