Programming Languages

This Week in Numbers: Managing JavaScript Packages with NPM and Yarn

9 Jun 2018 9:00am, by

This week we analyze more data from the Node.js Foundation‘s user survey. Almost three-quarters (73 percent) of survey respondents said they use a package manager. NPM was used by 60 percent and Yarn cited by 13 percent. Since Yarn sits on top of NPM, in reality these respondents are referring to an interface or tool they actually use day-to-day. Yarn’s use rose 44 percent compared to last year’s study.

Is Yarn a better alternative to NPM? That is up to you to decide. That being said, it is notable that Yarn users are much more likely to care about managing packages across multiple environments. When asked about the importance of managing different packages across multiple environments, 50 percent of Yarn users said it is important (8 on a scale of 1-10) in comparison to only 39 percent of NPM respondents. It is noteworthy that respondents from Latin American and the Asia Pacific region were more likely to say multi-environment package managing is important.

Other Interesting Bits

We looked through the raw data provided by the Node.js Foundation and found two questions about JavaScript tooling that were not included as charts in its reports. The graphic below shows the charts we created about transpiler and modular bundler usage. The New Stack will use this data to support future reporting.

  • Transpilers convert code in one language into another. Sixty-nine percent of respondents use a transpiler. About twice as many use Babel as compared to TypeScript.
  • Modular bundlers compile small pieces of code into a more complex library or application. Seventy-seven percent of respondents use a modular bundler. Webpack is far ahead of any of the nearest competitors.

The Linux Foundation, which manages the Node.js Foundation, is a sponsor of The New Stack.

Feature image via Pixabay.


A digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.