Skip to content

Commit

Permalink
Default to ^ operator on --save
Browse files Browse the repository at this point in the history
This fix brings us inline with how npm installs work and also brings us
more inline with how semver is supposed to be used.

Fixes #2144
  • Loading branch information
samccone committed Jan 11, 2016
1 parent d4fd719 commit 58d761d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/Manager.js
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 58d761d

Please sign in to comment.