-
Notifications
You must be signed in to change notification settings - Fork 469
refactor: split dir for CLI and dev scripts #6782
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
Conversation
gentype again 😂 just opened #6783 |
98b5b5f would be better to support third-party tools that need to spawn ReScript binary themselves, but that also means we're adding an official API that we need to keep maintain its compatibility |
1f539cd
to
ee252bc
Compare
Thanks a lot! Could you also remove |
], | ||
"exports": { | ||
"./bin_path": "./cli/bin_path.js", | ||
"./package.json": "./package.json" |
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.
This is only used once in .github/workflows/prepare_package_upload.js
.
I'd prefer to keep .github/workflows/prepare_package_upload.js
as it was and just export bin_path
here.
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.
If no consumers exist, it's better to minimize the API exposure. I can convert this back to an import map.
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.
👍
but do we really need to keep this? The `postinstall` hooks is avoided by default in other PMs
a072c46
to
dd9bb74
Compare
I understand that we already have a managed artifact list for it. but isolating actual artifacts from scripts makes it much easier to maintain, and prevents accidents and dependencies between them.
I added a subpath imports as an easy resolution. That means it is only referenced in internally. Alternatively we can add it as
exports
entry to make it possible to referenced by outside of this package (e.g.require('rescript/bin_path')
in https://github.com/rescript-lang/rescript-compiler/blob/f56f5c2/.github/workflows/get_artifact_dir_name.js#L4)