alanshaw / david-www

:eyeglasses: David helps keep your Node.js project dependencies up to date.
https://david-dm.org
MIT License
728 stars 130 forks source link

Wrong badge status in case of pinned deps #161

Open arikon opened 9 years ago

arikon commented 9 years ago

Here is the case:

2014-11-17 15-48-15 dependency status for lego - enb-islands-tools 0 6 3

But David shows yellow up-to-date button:

2014-11-17 15-48-49 dependency status for lego - enb-islands-tools 0 6 3

I expect it to be red out-of-date.

alanshaw commented 9 years ago

Yep, that's weird - it should be red!

aivus commented 9 years ago

@arikon can you provide link to test it?

aivus commented 9 years ago

@alanshaw, In the current implementation david calculate percentage of the "out of date" dependencies.

          if (totals.unpinned.outOfDate / depList.length > 0.25) {
            status = "outofdate"
          } else {
            status = "notsouptodate"
          }

We can replace condition on totals.unpinned.outOfDate > 0.

arikon commented 9 years ago

@aivus I can't, because it is on the in-house instance of David.

xPaw commented 8 years ago

This is still a bug, and renders the badge completely useless as one of the projects I have it in has all the package versions pinned.