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

[package] expose as a commonjs module? #35

Closed
severo opened this issue Nov 14, 2024 · 3 comments
Closed

[package] expose as a commonjs module? #35

severo opened this issue Nov 14, 2024 · 3 comments
Labels
question Further information is requested

Comments

@severo
Copy link
Contributor

severo commented Nov 14, 2024

https://arethetypeswrong.github.io/?p=hyparquet%401.5.0 reports an issue:

ESM (dynamic import only)

A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import.

Two options:

@severo severo changed the title [package] expose as a commmonjs module [package] expose as a commmonjs module? Nov 14, 2024
@severo severo added the question Further information is requested label Nov 14, 2024
@severo severo changed the title [package] expose as a commmonjs module? [package] expose as a commonjs module? Nov 14, 2024
@severo
Copy link
Contributor Author

severo commented Nov 14, 2024

We could also add https://github.com/marketplace/actions/are-the-types-wrong-checker as a github action, here and in the other repos, to check the package

@severo
Copy link
Contributor Author

severo commented Nov 15, 2024

Note also https://github.com/isaacs/tshy, which aims to help package publishers get the package.json right when the code is typescript. It's used now by Hugging Face at huggingface/huggingface.js#1029

@platypii
Copy link
Collaborator

README is updated to emphasize that it is ESM only. I think that is sufficient, the future is ESM. If someone really needs commonjs they can transpile it or use a transpiling CDN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants