Milo: A new HTTP parser for Node?
#510 — November 14, 2023
36 Node CLI App Best Practices — From the creator of several Node-based CLI tools comes this helpful collection of best practices for building “successful, empathic and user-friendly” CLI tools using Node, plus an appendix rounding up popular CLI framework options.
👍 Note: There’s a ‘last update’ badge saying 2021, but it’s incorrect – there was a big update this month 😄
▶ Talks from the Node.js Collab Summit 2023 — If you want to stay up to date with the latest discussions within the Node project, here are the videos from the latest Node.js Collab Summit. For example, have you heard of Milo? It’s a new Rust-powered HTTP parser Paolo Insogna is working on for Node.
Frontend Masters sponsor
Can Bun Eat Node.js’s Lunch? — An experiment in migrating a codebase (a restaurant voting app called Lunch) from Node over to Bun and seeing how it fares. They’re impressed but found it to be “not production-ready as I’m still encountering segmentation faults for common tasks.”
Jeffrey Carl Faden
Erick Wendel of the Node core team reminds us that Node v20.5 and up support horizontally partitioning/sharding your tests. Essentially you run with –test-shard and pass in the number of shards in total and which shard to run.
Prettier 3.1, the opinionated code formatter, has been released with support for the new control flow syntax in Angular 17 (released last week) and a new, experimental formatting option for ternary expressions (as in x ? y : z).
If you use Amazon SQS, consider updating your AWS SDK to reduce latency – AWS has rolled out a new, more efficient JSON-based protocol.
Secure Code Review Tips to Defend Against Vulnerable Node Code — How do you identify vulnerable code patterns? Can you spot insufficient input validation? Enhance your Node development security with this guide to secure code review.
Free Course: Introduction to Temporal Cloud — Check out our new course on the role and features of Temporal Cloud, designed for new and experienced users alike.
Temporal Technologies sponsor
Deploying Node Apps on Vultr with PM2 — I hadn’t noticed MDN was running sponsored articles till now, but they seem to do a good job maintaining the quality. The good thing about this article is you can use it with any VPS, not just those on Vultr.
Vultr / MDN
git rebase: What Can Go Wrong?
How to Use Timeouts in Node
🛠 Code & Tools
Wild Wild Path v5: Object Property Paths with Wildcards and Regexps — A ‘wild’ way to access properties in objects (which can be deeply nested) by way of string based queries that support wildcards and regexes. The examples really help to get the idea over.
Globby 14.0: User-Friendly Glob Matching — Give it an array of globs and it returns an array of matching paths. It even supports negations and .gitignore.
Workshop: Learn how to build apps with Svelte and SvelteKit in our remote workshop – afternoons (CET) of Jan 30th to Feb 1st – only €350.
cRonstrue: Library to Convert Cron Expressions into Natural Language — Not just English either – it supports about thirty different locales. There’s also an online demo.
HyperExpress 6.14: High Performance Server Powered by uWebSockets.js — Despite the name, it’s nothing to do with Express.js, though it does have some limited API compatibility. The main draw is for folks who want to serve up WebSockets quickly.
nve 17: Run Things With a Specific Node.js Version — Execute a file, command, or REPL using a specific version (or multiple versions) of Node. For example, you could run npm test over multiple versions at once, though note that the minimum version is now Node v18.18.0.
wait-on 7.1: A CLI and Node Library to Wait for Ports, Files, Sockets, etc. — For when you need to wait until files, ports, sockets, and similar resources become available (or the opposite).
tsx 4.x – Node.js enhanced to run TypeScript & ESM.
Marked 10.0 – Markdown parser and compiler.
marked-terminal 6.1 – A renderer for Marked (above) for printing Markdown on the terminal.
getmac 6.0 – Get the MAC address of the machine you’re on.
express-openapi-validator 5.1 – Auto-validate API requests and responses using Express and an OpenAPI 3.x spec.
Nightwatch 3.3 – Integrated end-to-end testing framework.
Middy 4.7 – Node middleware engine for AWS Lambda.
“I’m not a great programmer. I’m just a good programmer with great habits.”