npm / download-counts

Background jobs and a minimal service for collecting and delivering download counts
329 stars 27 forks source link

How can engine.io have vastly fewer downloads than socket.io? #14

Closed yaronyg closed 7 years ago

yaronyg commented 9 years ago

Socket.io has around 30k downloads in the last day. Engine.io, which is a core dependency of socket.io, has around 7k. How is that possible?

Either there is a bug or something is wrong in my mental model of how npm stats work. I was sort of assuming that if there is package A and package B and package A requires package B in its package.json then every download of A should turn into a download of B. Therefore the total download count for A should always be <= to B.

But in the case of Socket.io and Engine.io that clearly isn't the case. So um... what's going on?

Thanks!

seldo commented 7 years ago

Not everything that downloads socket.io downloads its dependencies; either because they are cached locally already or because they are not an npm client.