#​500 — September 5, 2023

Read on the Web

Together with  Frontend Masters logo
Node.js Weekly

Node v20.6.0 (Current) Released — As we teased last week, the latest Node release includes all-new built-in support for setting environment variables via .env files, so you may no longer have a need for dotenv, depending on your use case. You can now also use import.meta.resolve to get an absolute URL string to a specified module, plus there are some enhancements around module customization hooks.

Juan José and the Node.js Team

💡 If you just want to see a quick example of the .env feature in action, Phil Nash comes to the rescue here and also outlines some of the missing features.

A Modern Introduction to Node.js — Take your JavaScript to server-side coding with CLI development, file I/O, async coding, CRUD operations, testing with Jest, and creating servers!

Frontend Masters sponsor

My Node.js is a Bit Rusty.. — The tale of how replacing a Node.js module with a native Rust module resulted in a 25x perf boost for Wix. Gal shows off the details of how it came about before concluding: “If something is too slow, profile it first, then encapsulate it, and then—perhaps—consider rewriting it in Rust.”

Gal Schlezinger

Using Rust alongside Node is an increasingly popular technique. You can read more on the topic in Exposing a Rust Library to Node with Napi-rs or by watching ▶️ Creating Node.js libraries with Rust using Neon.

Choosing the Best Node.js Docker Image — If you feel tempted to just throw FROM node into your Dockerfile, think again – there are other options to consider. (An article we first posted in 2022 but which has had an August 2023 update.)

Liran Tal (Snyk)

ASIDES:

How to Use SSL/TLS Pinning in Node — SSL/TLS pinning adds an extra layer of security to connections between your apps and remote servers by storing certificates and keys for connections, thus reducing the potential for MITM attacks.

Nwani Victory

How to Create a Dual-Mode Cross-Runtime Package — Specifically, supporting both ESM and CommonJS, and across runtimes like Node, Deno and the browser.

Hexagon

Tracking Errors in a Node App — A look at how to track errors in a Node app in a “convenient, automated, and safe way”.

Rishabh Rawat (AppSignal)

How to Use Headless Chrome in Serverless Functions with a 50MB Limit
Stefan Judis

🛠 Code & Tools

Benchmarking 24 CSV Parsing Approaches — Certainly the most extensive Node.js CSV parsing benchmark I’ve seen. The author, himself the creator of the μDSV CSV parsing library, wanted to contest the common ‘lightning fast performance’ claims of other CSV parsing libaries. Unsurprisingly, μDSV tends to win in all but a couple of cases.

Leon Sorokin

React Authentication — Without Complexity — Userfront streamlines authentication & access control so engineers can focus on their core business. Read the docs now.

Userfront sponsor

Marked 8.0: A Fast Markdown Parser and Compiler — There's a demo here to see it in action.

Christopher Jeffrey

Better SQLite3 8.6: Fast and Simple SQLite3 Library — And with good docs too. Supports a lot of SQLite specific functionality, has a synchronous API that boasts better concurrency than an async one (why?), and worker thread support. v8.6 introduces SQLite 3.43.0.

Joshua Wise

📰 Classifieds

📅 Next week, Semaphore presents the online CI/CD Express Conference, an online CI/CD conference for engineering leaders (and it's free).


💻 Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.

📢 If you have a community related event, project, podcast, or similar, that would be of interest to Node Weekly readers, let us know by replying to this email and we may be able to run a classified listing as above for free. We want to have a good mix of community and commercial listings.

QUICK RELEASES: