---
title: "zx 8.0 for better Node scripting"
publication: "Node Weekly"
issue: 527
published_at: "2024-04-09"
canonical_url: "https://nodeweekly.com/issues/527"
---

Plus more security releases, big Bun and Deno updates, and a comparison of JS runtimes |        

#​527 — April 9, 2024 

[Read on the Web](https://nodeweekly.com/issues/527)  

Together with [![MongoDB\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_1100,h_277/co_white,e_outline:17/titvkejxse7xykalot6p.png)](https://www.mongodb.com/events/rag-to-riches?utm_campaign=node_weekly_rag_to_riches_primary&utm_source=node_weekly&utm_medium=sponsored_newsletter)  

![Node.js Weekly](https://res.cloudinary.com/cpress/image/upload/v1653576619/lgfqinzbdqttwmhvljxb.png) 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/jowpbxj6eevdnde1pfcd.jpg)](https://github.com/google/zx/releases/tag/8.0.0)  

[zx v8.0: Google's Way to Write Shell Scripts with Node](https://github.com/google/zx/releases/tag/8.0.0) — A long-standing way to make scripting a more pleasant experience. _zx_ provides useful wrappers around `child_process`, escapes arguments and gives sensible defaults. v8.0 somehow makes zx _20x smaller_, faster, makes it easier to kill processes, pass input to commands, and more. A substantial release. 

Google   [![\](https://copm.s3.amazonaws.com/f2cbfd10.png)](https://www.mongodb.com/events/rag-to-riches?utm_campaign=node_weekly_rag_to_riches_primary&utm_source=node_weekly&utm_medium=sponsored_newsletter) 

[Build a RAG Chatbot App with MongoDB and Node.js](https://www.mongodb.com/events/rag-to-riches?utm_campaign=node_weekly_rag_to_riches_primary&utm_source=node_weekly&utm_medium=sponsored_newsletter) — Embark on the [RAG to Riches Developer Quest](https://www.mongodb.com/events/rag-to-riches?utm_campaign=node_weekly_rag_to_riches_primary&utm_source=node_weekly&utm_medium=sponsored_newsletter) — a month of innovation, learning, and exclusive rewards awaits you. You’ll interact with AI-enhanced bots and learn how to build your own with Atlas Vector Search and Node.js. [Register now!](https://www.mongodb.com/events/rag-to-riches?utm_campaign=node_weekly_rag_to_riches_primary&utm_source=node_weekly&utm_medium=sponsored_newsletter) 

MongoDB sponsor   

[The April 3 Node.js Security Releases](https://nodejs.org/en/blog/vulnerability/april-2024-security-releases) — Includes [v18.20.1 (LTS)](https://nodejs.org/en/blog/release/v18.20.1), [v20.12.1 (LTS)](https://nodejs.org/en/blog/release/v20.12.1) and [v21.7.2 (Current)](https://nodejs.org/en/blog/release/v21.7.2), each rolling out fixes to llhttp and Undici to tackle two HTTP related vulnerabilities. 

The Node.js Project   

⚠️ There's also [a set of April 9 security releases](https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2) likely to land later today, if you'd prefer to wait for those.  

[Bun 1.1 Released with Windows Support](https://bun.sh/blog/bun-v1.1) — With the codename _Bundows_, the popular alternative JS runtime can now run directly on Windows 10+ (plus WSL, macOS and Linux, etc). This is a key step in Bun's broader adoption vs Node, and even features like [Bun Shell](https://bun.sh/blog/bun-v1.1#the-bun-shell) work on Windows. Node compatibility continues to improve too with support for `node:http2` and **IPC support between Bun and Node processes.** 

The Bun Team   

_IN BRIEF:_ 

- [Deno 1.42](https://deno.com/blog/v1.42) has been released with [JSR](https://jsr.io/) becoming a first-class citizen and [further Node compatibility improvements](https://deno.com/blog/v1.42#nodejs-and-npm-compatibility).
- [A developer explains](https://gist.github.com/guest271314/da04334bb0dce19fcd970415bb003b02) why they use Node, Deno, Bun, QuickJS and [txiki.js](https://github.com/saghul/txiki.js) – essentially a bulletpoint comparison of the strengths of each.
- Samuel Groß of the V8 team [explains the V8 Sandbox](https://v8.dev/blog/sandbox), a security mechanism designed to prevent memory corruption in the V8 engine impacting other memory in the process.   

[Node.js Debugging in Chrome DevTools](https://frontendmasters.com/blog/node-js-debugging-in-chrome-devtools/) — If Chris didn’t know how to do it, I’m going to predict many readers don’t either, so his simple example of setting it up might be helpful :-) 

Chris Coyier   

[Migrating 500+ Tests from Mocha to Node.js](https://astro.build/blog/node-test-migration/) — A quick retrospective of how the Astro team migrated more than 500 test suites from Mocha to the Node.js test runner. 

Astro   

[Versioning Workflows with TypeScript](https://t.mp/4aEqC19) — Learn when and how to apply versioning, then practice using our TypeScript SDK in this free, hands-on training course. 

Temporal Technologies sponsor   

[How to Implement Rate Limiting in Express.js](https://blog.appsignal.com/2024/04/03/how-to-implement-rate-limiting-in-express-for-nodejs.html) — A practical walk through a simple setup. A viable option against certain bots and users, though not a universal solution for DDoS or determined attackers. 

Antonello Zanini   

🤖 [A Quick First Look at Amazon Bedrock (with Node)](https://www.raymondcamden.com/2024/04/04/a-quick-first-look-at-amazon-bedrock-with-nodejs) – [Amazon Bedrock](https://aws.amazon.com/bedrock/) is AWS's service for working with various machine learning models. Raymond Camden 

📄 [Building an Article Recommendation System with Upstash, Fly and OpenAI](https://upstash.com/blog/article-recommendation-system) Rishi Raj Jain 

📄 [Managing Node.js Processes](https://jrfom.com/posts/2023/12/15/node-process-management/) _“why I think using `pm2` is unnecessary and what I think should be done instead.”_ James Sumners 

📺 [Building a Modular Monolith with Fastify](https://www.youtube.com/watch?v=e1jkA-ee_aY) Matteo Molina 

📄 [Understanding Threads in Node.js](https://pavel-romanov.com/understanding-nodejs-threads) Pavel Romanov    

🛠 Code & Tools  

[JS-Torch: A PyTorch-Like Library for JavaScript](https://github.com/eduardoleao052/js-torch) — Python’s [PyTorch](https://pytorch.org/) is one of the gold standards amongst machine learning libraries, but this project brings some of its features directly into the JavaScript world. Early days but this could become a big deal for ML in JS? 

Eduardo Leao   

[Flyweight: An ORM Specifically for SQLite](https://github.com/thebinarysearchtree/flyweight) — Some interesting ideas here, a little different to your typical ORM. 

Andrew Jones   

📊 [Counterscale: Scalable Web Analytics You Can Run on Cloudflare](https://counterscale.dev/) — A simple web analytics tracker and dashboard that’s designed to be easy to deploy and maintain by hosting it on Cloudflare (for free too, up to a certain level). 

Ben Vinegar      

📰 Classifieds   

📆 [Using AI-powered Autofix to fix broken code](https://sentry.io/resources/autofix-workshop/?utm_medium=paid-community&utm_source=nodeweekly&utm_campaign=fy25q1-autofixworkshop&utm_content=newsletter-autofixworkshop-register) - Join us on April 25th to preview Autofix and learn how we are using ML to prioritize issues and alerts. 

--- 

[Hookdeck](https://hookdeck.com/discover/nodeweekly?ref=nodeweekly-527): The Amazon EventBridge Alternative. Receive, authenticate, transform, filter, route, and send messages across your EDAs.     

[Janeway: A Node Console REPL with Object Inspection](https://github.com/11ways/janeway) — Has some neat features including being able to look into buffers with a built-in hex viewer. 

Eleven Ways   

- [PGlite 0.1.2](https://github.com/electric-sql/pglite) – Lightweight Postgres packaged as WASM into a TypeScript library for the browser, Node.js, Bun and Deno.
- [VineJS 2.0](https://vinejs.dev/docs/introduction) – Form data validation library for Node.js.
- [better-sqlite 9.4.5](https://github.com/WiseLibs/better-sqlite3) – Neat way to use SQLite from Node and Electron (and now supporting Electron 29).
- [js-bson 6.6](https://github.com/mongodb/js-bson/releases/tag/v6.6.0) – MongoDB BSON parser for Node and browsers. `Binary.toString` and `Binary.toJSON` now align with BSON serialization.
- [node-source-walk 7.0](https://github.com/dependents/node-source-walk) – Execute a callback on every node of a source code's AST.
- [Nightwatch.js 3.6](https://nightwatchjs.org/) – Node.js end-to-end testing framework.
- [Electron Packager 29.2](https://github.com/electron/electron/releases/tag/v29.2.0) – Customize and package Electron apps.
- [stream-to-it 1.0](https://github.com/alanshaw/stream-to-it) – Convert Node streams to streaming iterables.
- [Mongoose 8.3](https://github.com/Automattic/mongoose) – MongoDB object modelling approach.
- [Octokit.js 3.2](https://github.com/octokit/octokit.js) – 'Batteries-included' GitHub SDK.
- 🖼 [TIFF 6.0](https://github.com/image-js/tiff) – Pure JS TIFF image decoder.
- [Pino 8.20](https://github.com/pinojs/pino/releases/tag/v8.20.0) – Fast JSON-powered logging.    

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. _Thanks!_ 

--- 

**Sponsorship:** Email `[kristina@cooperpress.com](mailto:kristina@cooperpress.com)` for details. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Cancel your subscription](https://nodeweekly.com/leave/*|UID|*) or [change your address](https://nodeweekly.com/edit_subscription/*|UID|*).
