100,000 stars within reach for Node
#513 — December 5, 2023
Node v21.3.0 and v21.4.0 (Current) Released — We’ve mentioned it in passing, but Node has gained a new –disable-warning option to disable specific warnings (as opposed to all warnings). There’s also a perf boost for fs.writeFileSync to work up to 2.5x faster under certain conditions. v21.4.0 followed on today to fix a regression caused by the writeFileSync work.
A Recap of the Electron Ecosystem in 2023 — The Electron project takes December off so now’s a good time to look at recent developments. Electron 28 is the final release of the year and uses Chromium 120, Node 18.18.2, and V8 12.0, plus ES module support has been enabled.
Build AI-Powered Apps with OpenAI and Node.js — Join Scott for this detailed video course and learn how to integrate OpenAI’s powerful language models into your Node projects. Learn to build AI chat interfaces, semantic search, document QA, function calling, and create AI images – all with Node.js!
Frontend Masters sponsor
⭐️ Node’s GitHub repo is sitting at 99,803 stars. Can it hit 100k by next week? You know what to do.. 😄
🟩 The two LTS Node.js branches have received releases backporting features from newer versions: Node v20.10.0 (LTS) gains WebSocket and an experimental flag to auto-detect ESM code. Node v18.19.0 (LTS) gets npm 10 and tweaks for customization hooks and loaders.
Deno rather than Node, but Deno Cron is an interesting addition to their platform – it’s cron-like scheduling of functions both locally and on their edge/FaaS platform. The integration of language features with their hosting platform has its pros and cons but is interesting nonetheless.
We mentioned the release of Mongoose 8.0 (the MongoDB object modelling library) a few weeks ago, but Valeri Karpov now has a post explaining Mongoose 8 in more detail.
Node.js performance guru Yagiz Nizipli ▶️ went on the DevTools.fm podcast to talk about Node.js performance and, in particular, his work on the Ada URL parser Node now uses. (There’s ▶️ a video version, if you prefer.)
Vercel has announced its deprecation schedule for Node 16. with no new deployments from February 6, 2024.
Advanced Patterns for Taking Page Element Screenshots with Playwright — Let’s say you take screenshots of pages using Playwright but want to do things like mask certain bits of content, modify the image in other ways, or even manipulate the DOM before taking the screenshot? Liran shares some code snippets for you.
Biome Wins the ‘Prettier Challenge’ — Three weeks ago, the creator of Prettier put up a $10k bounty for a Rust-powered code formatter that could pass over 95% of Prettier’s tests. Biome has claimed the prize and everyone is hoping this leads to further advances in performance for both projects.
I Replaced npm, yarn and nvm with pnpm — npm hasn’t been the only package manager in town for many years.
🛠 Code & Tools
Pelias: A Modular, Stand-Alone ‘Coarse’ Geocoder — Given an address or place name this will come up with geographic coordinates, and vice versa. In terms of finding a location, it’s not super accurate (hence the ‘coarse’) but it may be acceptable for your use case. Demo here.
⚠️ NPMprune: Prune Unnecessary Files from node_modules — A script that cleans up node_modules by removing ‘unnecessary files’ meeting various patterns. You need to be really careful with this approach, hence the warning icon! The technique is easy to understand at a glance, though, and could perhaps be extended to offer a ‘dry run’ option?
tldts: Library to Work with Domain Names, Subdomains and URIs — A ‘blazing fast’ library for extracting hostnames, domains, public suffixes, and more from URLs, with full Unicode/IDA support, TS type definitions, and more.
Parisot and Berson
If you’ve got an event or some sort of community activity going on, hit reply, let us know, and you may be able to appear here too!
Node File Trace: Node.js Dependency Tracing Utility — Used to determine exactly which files are needed for a Node app to run. Finally, an NFT that actually makes any sense.
Got 14: A Powerful HTTP Request Library for Node — A popular HTTP request library. v14 bumps the minimum required version of Node to Node v20. If you still need to support v18 for now, Sindre recommends staying on Got 13.
AVA 6.0 – Popular test runner for Node.
AdminJS 7.5 – Admin interface for webapps.
better-sqlite 9.2.2 – Neat way to use SQLite from Node.
Nock 13.4 – HTTP server mocking and expectations.
JSPyBridge 1.1 – Interop for Node and Python.