-
Notifications
You must be signed in to change notification settings - Fork 29
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
Be able to use a specific version of a module #10
Comments
This is a good feature suggestion and something I would love to add. Also, being able to run two different versions of the same package sounds like a good feature as well, as long as the code written to support this can be simple. If anyone want to try to implement it (my time is limited right now), https://github.com/VictorBjelkholm/trymodule/blob/master/index.js#L30 would be the part where |
What if the user could set an alias for a module ? |
Once #19 is merged this should be pretty straightforward 😃 |
I'm thinking how we can actually implement this. I did some quick hacking today, trying to just setting the version when calling var version = 'latest'
if (moduleName.indexOf('@')) {
version = moduleName.split('@')[1]
moduleName = moduleName.split('@')[0]
}
npmi({name: moduleName, path: install_path, version}, (err, result) => { So even with the change above, I'm not sure how to do this... If anyone have any ideas, please speak up! :) |
Say you want to load We'll say the command looks like Something that flows sequentially like this could work.
In doing this, we must be careful to work around require's module caching. |
Currently, this tool always uses
@latest
, but it'd be nice to be able to specify a specific version to try out. It helps when you are trying to identify problems after upgrading. I don't know if you'd want to allow 2 versions in the same session, that might be overkill.The text was updated successfully, but these errors were encountered: