bower/bower — pull request #980 by wibblymat (2013-11-22 13:54:09+00:00)
Title: Fixed an infinite recursion bug

Well, probably not infinite, actually.

`bower install git://github.com/Polymer/designer.git#e9696a03e506efaaa070989effdf4c272d23c0a2` was taking a very long time.

When a package has a dependency that we are still fetching:

Old logic: re-parse all of the dependencies for the package when this particular dependency has been fetched. If `n` dependencies are being fetched, re-parse ALL dependencies `n` times. When the first one resolves we will end up adding a `.then` for each of the still fetching ones again. Off the top of my head I think this is O(n!).

New logic: re-parse all of the dependencies just ONCE when ALL of the in-flight dependencies have resolved.