I figured out the answer. I’m sharing for others:
If I add the dependency with my favorite version to resolutions in bower.json, Bower will automatically install it. Here is my updated bower.json:
"dependencies": {
"angular": "~1.5.x",
"angular-routing": "*",
"ngDialog": "*",
"requirejs": "*"
},
"resolutions": {
"angular": "~1.5.x"
}
More information here.
Update:
As Mattliu mentioned in comments, it’s possible to answer with ! when any library asks for another version of an already installed dependency. this way you’ll keep existing version and also npm creates resolution config automatically.