-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support ECMAScript
modules.
#8
Conversation
I published the package as |
Thanks a lot for this! I'll take a closer look in a few days, but it looks pretty good to me at a glance so far. One comment is that generally I'd like to try to restrict both It's true that Similarly, I'd prefer not to bump For now, would you be willing to remove the |
Thank you very much for this library :). The lowest working version of Version I adjusted the PR to use this version instead. |
@lostfictions, did you already have time to look at the PR? |
@lostfictions I use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for this PR and for making the additional changes I requested!
And thanks for your patience -- I know this is a long time to wait for a review. I'm no longer at an employer that is okay with me taking time out to contribute to open source, so this is all unpaid work on my own time (and I haven't had much free time for the past little while).
Overall this looks good to me, though I haven't cloned it and tried it yet. I've left a few comments and suggestions -- let me know what you think about them.
esm-postbuild.sh
Outdated
cat >dist/package.json <<!EOF | ||
{ | ||
"type": "commonjs" | ||
} | ||
!EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, it seems unfortunate that an hackish little script like this is necessary to support dual-format packages. there's really no simpler way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know of any other way actually. An alternative is to use different extensions (e.g. .cjs
), but this would be more complicated to setup. We can also inline the script in the package.json
if you prefer this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative could be to just commit the package.json
into the repository (inside a dist
folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed another version with the simplified build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea! for simplicity i think i'll move the additional package.json
to the project root under a different name (rather than unignoring it and using find
). but i'll make that change after merging rather than requesting more changes from you!
looks great! thanks so much for all your work on this, and sorry again for the delay. i'll cut a new release shortly! |
published as |
Awesome! Thank you!! |
This PR adds support for
es
modules. This fixes #4.I further bumped
zod
and added missing cases that where not handled currently.I wanted to update typescript to version
5
, but it's causing one type error (on this line: https://github.com/BowlingX/znv/blob/6b69a204a35dd6bf86e345e12a22ee27210a31b4/src/parse-env.test.ts#L305-L305).I was not able to fix it.