Skip to content
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

Use caret on install save #2145

Merged
merged 1 commit into from
Jan 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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