Open guybedford opened 11 years ago
So, to clarify, you did this in the directory with that package.json:
volo add -f
and it was not this:
volo add -f jquery
If the first case, then I can see there being a bug there. If the second case, that is an explicit bypass of any local state.
Ahh I see. Yes this was actually volo add -f jquery
. The point being that I didn't want to have to update everything else and just specifically jquery. Ok this would probably require another sytax then. No worries then.
OK, so then maybe volo update jquery
and the update command would be limited only to what was in the package.json. I can see if the package.json is using a branch name, that it would just fetch the latest branch value, but what if it specified a version number? I can see some folks wanting to update to latest version. Maybe it is a prompt -- 'at version x, latest is y, update?'
I'm not sure how version updates would work. With specific version numbers, typically the intent would be to update to a major, minor or patch version. So perhaps along the lines volo update jquery/2.x.x
to indicate the greatest minor version of version 2. Not sure what the best way is here though!
I do like the idea of an update
command that would work with the package.json as you say though.
Alternatively to get in to semver ranges - https://github.com/isaacs/node-semver.
If I have a library in the package.json and use a volo add -f, it doesn't seem to use the same library version settings etc that are already in the package.json
Ideally an update command would check the package.json, and then use the add command on the resource that has been aliased in the package.json.
For example:
Should update jquery to master.
But if I had -
It would be nice to stick with the same fork and just update from master. A global update command could then update all the respective masters for all projects.
Just some ideas, not sure if the exact implementation is correct!