NPM registry in numbers
blog.futurice.com
blog.futurice.com
From these graphs we could come up with some reasonable boundaries. Packages that:
- have more than one version: 71853
- are over two weeks old: 42106
- had a new release in the last 360 days: 71277
There are 31888 packages satisfying all three conditions above. Though it’s only one third of all packages there, the amount is still enormous.
Now, if only I could search those 31,888 packages on NPM alone if I wanted to.EDIT: By the way, for anybody reading this article not familiar with the JavaScript ecosystem, this is interesting:
Mocha is clearly the most popular test framework, while nodeunit is way behind. And no-one seems to use Jasmine.
Jasmine appears to be unpopular within the JavaScript community but in reality that just accounts for those in the NodeJS and, more recently, the subset of the front-end JS community who use NodeJS tools in their projects.Mocha, the most popular test framework, has been a Node module since late 2011 [0], whereas Jasmine has only been one since mid-2013 [1]. I have a hunch that the majority of Jasmine users aren't on-board with the movement of front-end JS and NodeJS ecosystems merging, and since Jasmine [3] doesn't really aim itself at NodeJS projects, it's far less likely to be used in any project which uses NPM for dependency management.
Not really that important, just interesting :)
[0]: https://github.com/visionmedia/mocha/commits/master/package....
[1]: https://github.com/pivotal/jasmine/commits/master/package.js...
Like?
Though there are now much more users, there are still less than of nodeunit or mocha.
We've barely scratched the surface of the ways we can improve npm search, and we'd value any ideas the community has. If you have specific suggestions, I've created an issue over at https://github.com/npm/newww/issues/131 for you to throw them into :-)
I'm happy to see some research behind what my gut has been sensing for a while. The distinction between "popular" and "popular for new projects" is very important too. Is anyone else talking about whether-or-not this is an active downward trend?
It is interesting to get people who will not support your project if it's CoffeeScript... I would think this is the driving force and not so much that CoffeeScript is not popular.
Besides, I've found that writing CoffeeScript is pretty much like writing Javascript. Different syntax, but the semantics are almost entirely 1:1, leaving out the class stuff (which I don't often use). I've introduced CS to many JS devs and while not all of them loved it, they were able to get up to speed very quickly. But I understand peoples' objections to it - I think they're wrong, but I understand them!
I did make a too quick judgement there. It turns out you can't easily see how popularality of CoffeeScript has changed.
It is surprising to see CoffeeScript in this list as a language compiler
should be mainly a dev-dependency. You compile the CoffeeScript source to
JavaScript for distribution, so you don’t need coffee-script to be a
dependency. The packages that depend upon coffee-script include among others:
grunt, jasmine-node, jscoverage, cucumber and hubot. They all allow you to use
CoffeeScript sources.
While there isn't anything wrong in supporting CoffeeScript out-of-the-box, I like karma's approach more. It has "karma-coffee-preprocessor", it should be self-explanatory.You find the graphs and some more info at the following URLs:
- http://exploringdata.github.io/vis/npm-packages-dependencies... (takes a while to load, use Chrome or another Webkit browser)
- http://exploringdata.github.io/vis/npm-top-packages-dependen... (includes only packages with at least 10 dependent packages)
- http://exploringdata.github.io/info/npm-packages-dependencie... (info post)
I think this way of going about data analysis is flawed... "I don't like this conclusion, so I'm going to massage the data until it supports my preference".
I do agree that it'd be nice if the npm maintainers went about clearing out all the dead projects though.
I wrote an article on how you can analyze source code and produce a minimal Lo-Dash build in only 73 characters: http://jjt.io/2014/07/18/analyzing-source-files-to-automatic...
I recommend using a tool like license-checker to create a list of all the licenses. It also shows the unknown ones, so you can start digging for the licenses. Like the article states, there's a large number of npm packages without licenses. I've usually made pull requests whenever I stumble upon a package with missing package.json license information, and I hope the situation is slowly improving.
It would also be interesting to see the average number of lines each package has.
1. http://tomforb.es/how-much-code-is-there-in-the-python-packa...
One could fetch the actual packages too (e.g. the smaller ~20k package set). But there should be more motivators than just counting the amount lines of code :)
Average Django app has less deps than similar Express app.
Like?
Finer control is often required, however, for all sorts of reasons. For these cases, turf is made up of a collection of sub-modules [2][3], and these can be required individually.
I like this approach, since it provides a nice curated framework for users simply wanting to get stuff done quickly, but it also allows for more tuned usage in production environments. It has been a bit more work to maintain (~70 repos, instead of 1), but I have been pleased with the approach so far.
[1] https://github.com/Turfjs/turf [2] https://github.com/Turfjs/turf-buffer [3] https://github.com/Turfjs/turf-smooth
Also, static files should be a part of Express:
>Express 4 no longer depends on Connect, and removes all the built-in middleware from its core, except express.static
A bit longer one:
One can fetch `jsverify` package metadata from http://registry.npmjs.org/jsverify and all current packages are listed in http://registry.npmjs.org/-/all (this one is special, its size is around 50MiB). Please cache your results, let's not DDoS the registry.
There are around one gigabyte of nice JSON data. After initial fetch you can traverse it using any tools you want. I naturally used node.js for that too.
That seems to be at odds with the numbers quoted in the rest of the article. Strange.
(Hint: please do label the axis on your graphs. thanks.)