-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Only update the packages requested by the user #2070
Conversation
@bower/contributors Could you review and test? |
@@ -112,7 +114,12 @@ Manager.prototype.resolve = function () { | |||
// Otherwise, fetch each target from the repository | |||
// and let the process roll out | |||
} else { | |||
this._targets.forEach(this._fetch.bind(this)); | |||
this._targets.forEach(function (target) { | |||
var name = target.name || target.source; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you define the var
outside the loop and just reuse it later in each iteration?
@contolini very good job here, I think this will be a very good improvement, looking forward to it ;) |
👍 Thanks for the feedback @zzarcon! |
👍 Works for me. |
@contolini I think you might want to rebase and squash the commits by the way |
I'm diggin' it, @contolini . Really useful feature 👍 |
Sorry, I’m not in the position to review, I can’t even get Sage getting installed, so better remove me from the reviewers list. Thank you.
|
it('installs only the specified dependencies', function() { | ||
var package4 = new helpers.TempDir({ | ||
'bower.json': { | ||
name: 'package3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be package4
?
kudos on increasing coverage 👍 |
👍 |
10138d4
to
8c1f30b
Compare
Thanks @riyadhalnur. I went through all the test files and reformatted them to comply with the new jscs rules. |
Looks good :) Thank you for a great pull request |
Only update the packages requested by the user
Given:
Running
bower update component-one
will update component-one and component-two. This is particularly problematic if you have dozens of dependencies because you'll be waiting for bower to download all of them when all you wanted was component-one. Runningbower install component-XYZ
does the same thing -- update every component.This PR instructs the manager to only update the requested component(s).
General logic:
Related to #256, #924, #1770 and probably many other issues.
Feedback appreciated.