-
Notifications
You must be signed in to change notification settings - Fork 13
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
CommonJS #65
Comments
For users of the |
I am mostly curious why there is both CommonJS and ESM (somewhat, see #64) and not only one of them: ESM. It's just simpler to do one thing rather than multiple ones. Personally I would just remove CommonJS completely. Going with the spirit of JSR. But it's also a library and that will be a breaking change. Are you ok with that? Then I can create a Pull Request for that. |
Looks like For the |
You can use this snippet to polyfill __dirname (specifically taken from SO, but it's the standard polyfill): const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); |
Why is the tool for the ECMAScript module only registry outputting CommonJS?
I would expect it to be in ESM too, ignoring the legacy CommonJS like its registry does. When the (Node.js) runtime does not support esm in the first place JSR as a whole is useless anyway. Publishing the code is not of interest and installing from JSR wont work either.
jsr-npm/tsconfig.json
Line 3 in 1973af9
The text was updated successfully, but these errors were encountered: