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

Do not store resolutions with force-latest when --dont-save-resolutions is used #2345

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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: 3 additions & 1 deletion lib/core/Manager.js
Expand Up @@ -815,7 +815,9 @@ Manager.prototype._electSuitable = function (name, semvers, nonSemvers) {
});

// Save resolution
this._storeResolution(picks[suitable]);
if (!this._config.argv.cooked.includes('--dont-save-resolutions')) {
this._storeResolution(picks[suitable]);
}

return Q.resolve(picks[suitable]);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/templates/json/help-install.json
Expand Up @@ -40,6 +40,10 @@
"shorthand": "-E",
"flag": "--save-exact",
"description": "Configure installed packages with an exact version rather than semver"
},
{
"flag": "--dont-save-resolutions",
"description": "Causes bower to not automatically save resolutions to bower.json when force-latest is used"
}
]
}
4 changes: 4 additions & 0 deletions lib/templates/json/help-update.json
Expand Up @@ -29,6 +29,10 @@
"shorthand": "-D",
"flag": "--save-dev",
"description": "Update devDependencies in bower.json"
},
{
"flag": "--dont-save-resolutions",
"description": "Causes bower to not automatically save resolutions to bower.json when force-latest is used"
}
]
}