bower-shrinkwrap-resolver
bower-shrinkwrap-resolver copied to clipboard
Compatibility with third party resolvers
I can't seem to get this resolver to work with other resolvers, in particular bower-npm-resolver.
npm install --save-dev bower bower-npm-resolver bower-shrinkwrap-resolver
.bowerrc:
{
"resolvers": [
"bower-npm-resolver",
"bower-shrinkwrap-resolver"
]
}
It doesn't matter if the resolvers are in the reverse order.
npm install --save npm:jquery npm:@angular/core
Neither package ends up in the bower-shrinkwrap.json
.
In my opinion, bower-shrinkwrap should capture which version of the package was actually installed, and be able to restore that on future bower install
.
Hi Mathieu.
Yeah, bower-shrinkwrap-resolver doesn't play well with other resolvers. Unfortunately given current resolver API getting it work might be (quite) challenging. Each resolver has it's own idea of resolved version (take mercurial resolver for example). It should be relatively easy to get bower-shrinkwrap-resolver to work with bower-npm-resolver but getting a universal solution not so much.
My advice would be to use package.json for packages available on npm (which supports shrinkwrap out-of-the-box) and (over time) drop bower in favor of npm. This module was created to support our legacy codebases, we personally moved away from using bower a long time ago.