npm by the numbers
#517 — January 16, 2024
npm in Review: A Retrospective in Numbers — From Socket comes a look at the past year from the perspective of the npm registry, focused largely on statistics (2.5 million live packages!), including download numbers, popular packages, as well as some ‘quirky facts’ like the package with the most maintainers (554, if you’re wondering.)
Philipp Burckhardt (Socket)
Node v21.6.0 (Current) Released — Includes improvements to the experimental permissions model, the ability to configure snapshots via a JSON config file, and three new events available in the net.createConnection flow.
Redis With Wings — Dragonfly is a simple, performant, and cost-efficient in-memory data store, perfect as a cache or database for your high-performance Node apps. Dragonfly is fully compatible with Redis APIs but without the Redis management complexity.
Nicholas C. Zakas
Node v20.11.0 (LTS) Released — Meanwhile ‘the version of Node you should probably be using’ receives a variety of tweaks, with perhaps the most notable being the addition of import.meta.dirname and import.meta.filename which fulfil the same role as __dirname and __filename, but for our new, shiny ES module-based world.
Not Node specific, but if you’re in the market for a VPS, you might be thinking about their relative performance and Josh Sherman has done an up to date benchmark of DigitalOcean, Linode, and Vultr.
Simon Willison demonstrates how he wired up GitHub Actions, Issues, and Pages to create a daily planner.
Transcribing Audio on Cloudflare Workers with AssemblyAI — This is a little platform specific, but we’ve been experimenting with AssemblyAI for transcribing audio and it works very well.
Niels Swimberghe (AssemblyAI)
Preventing and Debugging Memory Leaks in Node — A primer on the practical basics.
🛠 Code & Tools
Tinybench: A Tiny, Simple Benchmarking Library — No dependencies, but uses whatever precise timing capabilities are available (e.g. process.hrtime or peformance.now). You can then benchmark whatever functions you want, specify how long or how many times to benchmark for, and get a variety of stats in return.
Fast-CSV 5.0: Stream-Based CSV Parser and Formatter — A long standing library that has been well maintained over the years and gets a big new release for 2024. Built ‘streams-first’ to avoid large memory demands when working with large datasets, it offers flexibility out of the box. GitHub repo.
Debug Faster with Log Levels You Can Change on the Fly — More info means faster fixes. Learn how to instantly enable more logging in production without redeploying.
⌨️🐈 wacat: Tests Your Webapp Against ‘Cat Chaos’ — Uses a ‘cat walking across your keyboard’ style approach to tormenting your webapps with random clicks and form submissions. (Fear not, no real cats are involved in the running of this tool.)
Automock: Improve and Optimize Your Unit Testing Process — A library designed for unit testing (alongside Jest, Sinon, or NestJS) that leans on TypeScript to generate mock objects, simplifying the process of testing by automatically mocking external dependencies of classes, and more. GitHub repo.
web-worker 1.3: Consistent Web Workers for Browsers and Node — In Node, it works as a web-compatible Worker implementation atop worker_threads. In the browser, it’s an alias for Worker, so you can get a more consistent experience in isomorphic modules you create.
Piscina 4.3 – Efficient worker thread pool implementation.
Nock 13.5 – HTTP server mocking and expectations library.
Mongo Seeding 4.0 – Tool to populate MongoDB databases.
find-my-way 8.1 – High performance HTTP routing library.
emoji-regex – A regex to match all emoji-only symbols.
hostile 1.4 – Programmatic /etc/hosts manipulation.
Necord 6.6 – Create Discord bots with NestJS.