urish / angular-moment

Moment.JS directives for Angular.JS (timeago and more)
MIT License
2.6k stars 397 forks source link

Installing only angular-moment through bower to avoid version conflicts #240

Closed aalexgabi closed 8 years ago

aalexgabi commented 8 years ago

Sometimes the version of moment from angular-moment dependency and latest differ and this creates a dependecy conflict that should be resolved manually.

% bower install angular-moment moment --save
bower not-cached    https://github.com/urish/angular-moment.git#*
bower resolve       https://github.com/urish/angular-moment.git#*
bower not-cached    https://github.com/moment/moment.git#*
bower resolve       https://github.com/moment/moment.git#*
bower checkout      angular-moment#0.10.3
bower checkout      moment#2.12.0
bower resolved      https://github.com/urish/angular-moment.git#0.10.3
bower not-cached    https://github.com/moment/moment.git#>=2.8.0 <2.11.0
bower resolve       https://github.com/moment/moment.git#>=2.8.0 <2.11.0
bower checkout      moment#2.10.6
bower resolved      https://github.com/moment/moment.git#2.12.0
bower resolved      https://github.com/moment/moment.git#2.10.6

Unable to find a suitable version for moment, please choose one:
    1) moment#>=2.8.0 <2.11.0 which resolved to 2.10.6 and is required by angular-moment#0.10.3
    2) moment#^2.12.0 which resolved to 2.12.0

Prefix the choice with ! to persist it to bower.json

? Answer 1
bower install       angular-moment#0.10.3
bower install       moment#2.10.6

angular-moment#0.10.3 app/bower_components/angular-moment
├── angular#1.4.7
└── moment#2.10.6

moment#2.10.6 app/bower_components/moment
% 

As opposed to:

% bower install angular-moment --save
bower cached        https://github.com/urish/angular-moment.git#0.10.3
bower validate      0.10.3 against https://github.com/urish/angular-moment.git#*
bower cached        https://github.com/moment/moment.git#2.10.6
bower validate      2.10.6 against https://github.com/moment/moment.git#>=2.8.0 <2.11.0
bower install       angular-moment#0.10.3
bower install       moment#2.10.6

angular-moment#0.10.3 app/bower_components/angular-moment
├── angular#1.4.7
└── moment#2.10.6

moment#2.10.6 app/bower_components/moment
% 
coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 92.76% when pulling cf7c04fb0787323bcb9804ac23cc6a1e4283385c on aalexgabi:patch-1 into 8dd729dc4dd68ad63254b4ba44a6d6d5ca5c4cd8 on urish:master.

urish commented 8 years ago

thanks!