-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Rework :npm-deps handling & support #998
Comments
semver.js
To put this into more context that doesn't have to be reconstructed from slack history: shadow-cljs currently uses a bundled semver.js file via the graal-js ScriptEngine to eliminate possible conflicts in The problem this is intended to solve is that some CLJS libraries include a This used to use the So the goal should be to get rid of graal-js entirely. So some replacement for I'm also sort of considering dropping the automated install entirely. While convenient it is not perfect either.
It might also be OK to drop the version ranges completely to make comparison easier. Regular versions are easy to compare, so we could just pick the higher version of a given range. |
In I might consider reworking this again at some point but for now this should be good enough. If anyone is seriously interested in working on this you could totally do this as a completely separate library. Nothing in this is dependent on shadow-cljs. As a separate lib/tool this could also then be used together with |
There's a slight leftover:
No clue whether it affects anything - I just noticed it by accident. |
Good catch. That used to be part of the Build reports are also much better for understanding your builds anyways. |
Clojurians Slack discussion thread: https://clojurians.slack.com/archives/C6N245JGG/p1647112910767939
Options:
According to what I gather from
npm
docs, there seems to be yet another option.You can concatenate versions with spaces, it won't break anything since there's only one binary operation,
||
, and it has the highest precedence - the spaces are implied as&&
. So something like>1 <8 >2 >3 || <1
is a valid version string.So:
:npm-deps
merge-with
them with concatenating the version strings with spaces (replace empty versions with"*"
)package.json
, but only for dependencies that were in:npm-deps
npm install
for every accumulated dependency with an explicit versionnpm
will loudly fail. If there are no conflicts, the required dependencies will be installed, if they haven't been installed before.@thheller has mentioned that "forking a node process has other issues". I don't know what those issues are, but
npm
does usenode
, and shadow-cljs does shell out tonpm
when installing dependencies.The text was updated successfully, but these errors were encountered: