Skip to content

Commit

Permalink
Merge pull request #2145 from bower/sjs/use-caret-on-install-save
Browse files Browse the repository at this point in the history
Use caret on install save
  • Loading branch information
sheerun committed Jan 12, 2016
2 parents d4fd719 + d06af7a commit 8cf897c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Manager.prototype._onFetchSuccess = function (decEndpoint, canonicalDir, pkgMeta

// If the package is not targetable, flag it
// It will be needed later so that untargetable endpoints
// will not get * converted to ~version
// will not get * converted to ^version
if (!isTargetable) {
decEndpoint.untargetable = true;
}
Expand Down Expand Up @@ -595,7 +595,7 @@ Manager.prototype._dissect = function () {
// If they are not, the resolver is incapable of handling targets
semvers.forEach(function (decEndpoint) {
if (decEndpoint.newly && decEndpoint.target === '*' && !decEndpoint.untargetable) {
decEndpoint.target = '~' + decEndpoint.pkgMeta.version;
decEndpoint.target = '^' + decEndpoint.pkgMeta.version;
decEndpoint.originalTarget = '*';
}
});
Expand Down

0 comments on commit 8cf897c

Please sign in to comment.