-
Notifications
You must be signed in to change notification settings - Fork 4
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
Auto-installation #69
Comments
I have some thoughts, but first I'd like to dig into why you have file-watching on package.json. Are you iterating on changes to the #engines field? For what purpose? I would generally expect that property to be static and very rarely change. (like, exceptionally rarely) But to the "automatic install": First I'll point out that, if you're in a directory that has Which would lead one to assume that in a directory without a .node-version file (but with this plugin installed and a package.json#engines property), But there's a slightly bigger concern; if we did update the node-build install plugin to do so, (or we used some other means to trigger an automatic install) we'd quickly run into the issue that: package.json#engines is meant to specify a semver version spec (ie, range) of versions. Not a singular version. How would you expect a hypothetical Most projects that have an engines field throw in On the flip side, if I jump into a super old project like that, I also wouldn't want my machine to automatically try to install an ancient version like 0.10, which probably doesn't even compile on modern hardware (least of all M1). Now with all that complication out of the way, I do think it would be proper of
TBH, that is probably the extent of what we'd want nodenv to handle. If that sounds reasonable, I'll move this thread over to the node-build repo since it would be node-build's |
On specific projects, we only rely on the And we didn't create the
Exactly, that was my first lead towards a "better" DX actually (better in our specific context).
As a reference, NVM installs the latest version that fits the range.
And yet, that's what's configured so... But I clearly hear you indeed.
Yep :/
It would be great to see that happening, to be honest. Thank you very much for your effort on that topic, it's really appreciated ❤️ |
Hey there 👋
Would you consider an auto-installation feature in your plugin?
Right now, I'm relying on multiple project/hooks/configurations on my setup to achieve that (e.g.: watch the
package.json
file, auto-install and enable the missing Node.js versions). It would be great to have the whole thing in one place.I'm willing to create a PR by the way, but as I never contributed to
nodenv
, I would appreciate some guidance on the API design.The text was updated successfully, but these errors were encountered: