Closed hdaws closed 8 years ago
See #1296 for why I don't want to allow a RegExp
@sheerun - Removed regex, changed into a simple array since it's what you preferred as well.
Example of use: "ignoredDependencies": [ "angular", "jquery", "d3", "angular-translate", "jquery-ui", "nvd3", "angular-ui-sortable" ]
@sheerun Could this possibly be merged/added to bower now? Or are there further objections?
@SignalDancer Thanks for the work!! I cannot wait to finally be able to use bower.
@cfoellmann you are quite welcome! I hope this gets in soon. @sheerun commas, spacing and that array initialization all fixed. Hopefully we are ready to go this time! Apologies for not noticing the spacing/array thing in the last revision.
Thanks :) For now I'm scheduling this for 1.4.x
Maybe this PR should be modified to go into the branch 1.4.0
?
Just a note, we've been using this for several months now and it works quite well for us with no unexpected side effects.
@rosskevin How are you using this patch? "Manually" using a patched version of bower? or is there an automated way to grab this version?
@cfoellmann
npm uninstall -g bower
npm install -g https://github.com/SignalDancer/bower/tarball/Bower-Ignore-Dependencies
Looking forward to seeing this feature!
waiting for this feature :dancer:
Me too!
Very useful!
Does anyone know when the 1.4 release is scheduled? I am really looking forward to this.
This just fixed one of my biggest headaches. I'm looking forward to it getting into the main line.
That doesn't fully work though.
For example I have
"dependencies": {
"jquery": "^2.1.3",
"lodash": "^3.1.0",
"backbone": "~1.1.2"
},
"ignoredDependencies": [
"underscore"
]
When I run bower install
the first time it works as expected
bower install
bower install
bower jquery#^2.1.3 cached git://github.com/jquery/jquery.git#2.1.3
bower jquery#^2.1.3 validate 2.1.3 against git://github.com/jquery/jquery.git#^2.1.3
bower lodash#^3.1.0 cached git://github.com/lodash/lodash.git#3.1.0
bower lodash#^3.1.0 validate 3.1.0 against git://github.com/lodash/lodash.git#^3.1.0
bower backbone#~1.1.2 cached git://github.com/jashkenas/backbone.git#1.1.2
bower backbone#~1.1.2 validate 1.1.2 against git://github.com/jashkenas/backbone.git#~1.1.2
bower bootstrap-sass#~3.3.3 cached git://github.com/twbs/bootstrap-sass.git#3.3.3
bower bootstrap-sass#~3.3.3 validate 3.3.3 against git://github.com/twbs/bootstrap-sass.git#~3.3.3
bower jquery#>= 1.9.0 cached git://github.com/jquery/jquery.git#2.1.3
bower jquery#>= 1.9.0 validate 2.1.3 against git://github.com/jquery/jquery.git#>= 1.9.0
bower backbone#~1.1.2 skipped underscore
bower lodash#^3.1.0 install lodash#3.1.0
bower bootstrap-sass#~3.3.3 install bootstrap-sass#3.3.3
bower jquery#^2.1.3 install jquery#2.1.3
bower backbone#~1.1.2 install backbone#1.1.2
If I run it again, though:
bower install
bower underscore#>=1.5.0 not-cached git://github.com/jashkenas/underscore.git#>=1.5.0
bower underscore#>=1.5.0 resolve git://github.com/jashkenas/underscore.git#>=1.5.0
bower underscore#>=1.5.0 download https://github.com/jashkenas/underscore/archive/1.7.0.tar.gz
git bower underscore#>=1.5.0 extract archive.tar.gz
bower underscore#>=1.5.0 resolved git://github.com/jashkenas/underscore.git#1.7.0
bower underscore#>=1.5.0 install underscore#1.7.0
Or if you want to install something else afterwards:
bower install handlebars --save
bower underscore#>=1.5.0 cached git://github.com/jashkenas/underscore.git#1.7.0
bower underscore#>=1.5.0 validate 1.7.0 against git://github.com/jashkenas/underscore.git#>=1.5.0
bower handlebars#* not-cached git://github.com/components/handlebars.js.git#*
bower handlebars#* resolve git://github.com/components/handlebars.js.git#*
bower handlebars#* download https://github.com/components/handlebars.js/archive/v3.0.0.tar.gz
bower handlebars#* extract archive.tar.gz
bower handlebars#* invalid-meta handlebars is missing "ignore" entry in bower.json
bower handlebars#* resolved git://github.com/components/handlebars.js.git#3.0.0
bower underscore#>=1.5.0 install underscore#1.7.0
bower handlebars#~3.0.0 install handlebars#3.0.0
Underscore is installed even though is not in the handlebars dependencies and it's in the ignoredDependencies list
This Sounds bad and I really need to check this out- finally.
So... will this ever be merged?
waiting for this merge to happen too!!!
@rosskevin thanks using it like you suggested works as expected, waiting for this merge
Guys - it's been almost a year. Can we get a merge here?
I would love to see this feature but it seems to be not ready for merge. I would love to help but I can not help with JS programming
Fix to mentioned behavior + integration tests in test/commands/install.js
would be nice.
@sheerun I will attempt to find time to work on this sometime soon. That said, why is the TravisCI build passing if integration tests are failing? Are they not covered by this as priorly that is what I had been using as the "flag" for whether it was merge-safe with all the tests after this had been flagged for commit and tested originally.
Looking forward to see this feature!
+1
+1
+1
+1
@sheerun maybe you should change the milestone.?
+1
+1
+1
+1
@SignalDancer would you mind adding some tests to this PR?
If anyone else would like this feature ( @Arkh1 , @frankthelen , @shea256 , @cfoellmann , @leafymind , @azaslavsky [and others] ) the big blocker is simply adding tests, if anyone would like to help and see this feature land, feel free to fork this commit and reopen a new commit into master with added tests.
Thanks everyone for the interest.
We are working with a Chinese team who can't access some dependencies with bower (due to national internet restriction). Allowing to ignore some of them in order to provide them manually would be very useful.
For the love of god, accept this pull request.
Any reason for not accepting this pull request? It's kind of old topic now but still it's not working.
+1
@krzysztofantczak: see https://github.com/bower/bower/pull/1394#issuecomment-97456155
@samccone Some high level tests added in PR #1828 , is that enough/acceptable to get this feature included?
What is the status of this?
+1
+1
+1
+1
It's quite frustrating to use Bower without such a basic functionality.
Re-posting question from earlier: " @samccone Some high level tests added in PR #1828 , is that enough/acceptable to get this feature included? "
That pull request looks to include the testing you were asking for. I'm also seeing "All checks have passed" on this pull as well.
+1
+1
Fix for bug #927. Ignore package if name matches specified in bower.json. Permit fetch if package is explicitly declared in dependencies or devDependencies. Designed for users who need tighter control of versions due to corporate liscence restrictions or other reasons.