leon-ai / leon-cli

⌨️ Command-line interface (CLI) for a better use of Leon, your open-source personal assistant. GNU/Linux, macOS and Windows supported.
https://getleon.ai
MIT License
177 stars 21 forks source link

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

Closed theoludwig closed 2 years ago

theoludwig commented 3 years ago

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: https://github.com/facebook/jest/issues/11167 and https://github.com/facebook/jest/issues/10025

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

theoludwig commented 2 years ago

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. :smile:

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: