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

Convert nodecg-io-cli to ES Modules #829

Open
hlxid opened this issue Dec 6, 2022 · 0 comments
Open

Convert nodecg-io-cli to ES Modules #829

hlxid opened this issue Dec 6, 2022 · 0 comments
Assignees
Labels
cli Requires changes to the nodecg-io cli enhancement New feature or request major Needs a major change

Comments

@hlxid
Copy link
Member

hlxid commented Dec 6, 2022

Description

Our cli should be refactored to use ES modules instead of CommonJS. Since our minimum supported node.js version is now 14 we can finally do this because ES modules are only officially supported in node.js 14 and up. Some dependencies like axios (see codeoverflow-org/nodecg-io-cli#307) require ES modules in order to be able to use the newest version.

nodecg-io will remain CommonJS for now because NodeCG 1.9.0 is required to be able to use ES modules in NodeCG which is not widely used yet. For the rest of nodecg-io converting to ES modules might make sense when NodeCG v2 is released and we support it.

I have started working on this here: codeoverflow-org/nodecg-io-cli#308

References

node.js ES module docs
jest ES module docs
TypeScript modules

@hlxid hlxid added enhancement New feature or request major Needs a major change cli Requires changes to the nodecg-io cli labels Dec 6, 2022
@hlxid hlxid self-assigned this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Requires changes to the nodecg-io cli enhancement New feature or request major Needs a major change
Projects
None yet
Development

No branches or pull requests

1 participant