-
Notifications
You must be signed in to change notification settings - Fork 141
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
refactor(auto-reshim): add npm wrapper and remove npm hooks #232
refactor(auto-reshim): add npm wrapper and remove npm hooks #232
Conversation
Instead of relying in npm global installation hook for auto reshimming, a pretty obscure functionality of npm, I just wrote a wrapper script that intercept calls for npm and invokes asdf reshim whenever necessary. The wrapper needs to be configured manually by the user, following the practices of other plugins with similar settings. I also wrote an utility for printing the current wrapper path easing the configuration of new environments. README now has an example of how to configure auto-reshimming. There's also a notice on plugin installation about setting up the auto-reshimming configuration. A notice was also added to the install command, so that we reach more people about the changes.
@Stratus3D can you check this PR? I don't know if we tried this before, but it seems like the best way of keeping auto-reshimming in the new npm versions. What do you think? |
Now we are using a shim template, we find the true binary in the path and then call asdf reshim only when necessary
It seems like NodeJS is deprecating |
Thanks for all your work on this @augustobmoura ! Hoping these changes will make things easier for people! |
Instead of relying in npm global installation hook for auto reshimming,
a pretty obscure functionality of npm, I just wrote a wrapper script
that intercept calls for npm and invokes asdf reshim whenever necessary.
The wrapper needs to be configured manually by the user, following the
practices of other plugins with similar settings.
I also wrote an utility for printing the current wrapper path easing the
configuration of new environments.
README now has an example of how to configure auto-reshimming.
There's also a notice on plugin installation about setting up the
auto-reshimming configuration.
A notice was also added to the install command, so that we reach more
people about the changes.