#682 — April 4, 2024
JavaScript Weekly
A Proposal to Add Signals to JavaScript — A (very) early stage proposal for bringing a new feature to ECMAScript/JavaScript: signals! The proposal brings aboard ideas from a swathe of popular frameworks and aims to align everyone and get us on the same page when it comes to working with state and making updates based upon changes to state. Rob writes more about the proposal here.
Rob Eisenberg and Daniel Ehrenberg
Build a RAG Chatbot App with MongoDB and Node.js — Embark on the RAG to Riches Developer Quest — 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!
MongoDB sponsor
JS-Torch: A PyTorch-Like Library for JavaScript — Python’s PyTorch is one of the gold standards amongst machine learning libraries, but this project brings some of its features directly into the JavaScript world. Here’s a live browser-based demo. Early days but this could become a big deal.
Eduardo Leao
Bun 1.1 Released: Now Supports Windows Too — With the lighthearted codename of Bundows, the alternative server side runtime now runs directly on Windows 10 and up (plus WSL, macOS and Linux, of course). This is a key step in its adoption, with even features like Bun Shell happy on Windows out of the box. Node compatibility continues to improve with support for node:http2 and IPC support between Bun and Node processes.
The Entire Bun Team
IN BRIEF:
Samuel Groß of the V8 team explains the V8 Sandbox, a security mechanism designed to prevent memory corruption in the V8 engine impacting other memory in the process.
Dexie.js is a popular wrapper for IndexedDB and its creator has launched Dexie Cloud, a platform to store and synchronize data between apps.
Svelte’s Rich Harris is ‘shaken up’ after a misunderstanding around ‘self-closing’ HTML tags and their effect on Svelte.
🤡 There was a curious JS-themed April Fools prank where a .js TLD for domain names was ‘announced’. Sadly, it’s not true, but there is js.org if you want something vaguely similar.
An official update on the merging of Angular and Wiz.
RELEASES:
Deno 1.42 – The alternative JS runtime adds first class support for JSR and improves Node.js compatibility further.
Babylon.js 7 (homepage) – Key release of the popular rendering engine.
Node.js April 3 Security Releases – Includes 18.20.1, 20.12.1 & 21.7.2.
Docusaurus 3.2 – Popular content/docs site generator.
📒 Articles & Tutorials
What Even Is a JSON Number? — Despite the presence of standards around JSON, the answer is more complicated than you’d think, particularly when it comes to interfacing with other ecosystems and languages that aren’t JavaScript.
Brian Terlson
The History of JS Interop in Dart — About twelve years ago, Google introduced Dart, a language which initially seemed set to take over a lot of JavaScript’s use cases, but which eventually found its own niche (notably with Flutter). JS interoperability has remained important, though, and with Dart 3.3 has gotten significantly better.
Sigmund Cherem (Google)
Everything I’ve Learned About Scaling Designs Systems (With Examples) — I’ve learned a lot about what it takes to build, maintain, and scale design systems initiatives at large companies.
StackBlitz sponsor
The BFCache Explained — The back/forward cache (‘bfcache’) is a browser optimization that makes going back and forward in the browser a faster experience – it’s been present for years and usually leaves you alone as a JavaScript developer, but there are things worth being aware of.
Sabatino Masala
Running OCR Against PDFs and Images Directly in the Browser — A look behind the scenes at creating a simple tool using JavaScript to perform OCR against images and PDFs dragged on to the page.
Simon Willison
The Easy Way to Access the Last Array Element
Ignace Maes
A Comparison of JavaScript CRDTs
Alexis Métaireau
🛠 Code & Tools
Cally: Small, Feature-Rich Calendar Components — A collection of open-source calendar components for selecting single dates or date ranges. Framework-agnostic, themeable, localizable, and accessible (it even has an accessibility statement showing its commitment to this area).
Nick Williams
📊 Counterscale: Scalable Web Analytics You Can Run on Cloudflare — 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
Product for Engineers: A Newsletter Helping Flex Your Product Muscle — Subscribe for free to get curated advice on building great products and best practices of top startups.
PostHog sponsor
🎵 Tonal.js: A Music Theory Library — Packed with functions to manipulate tonal elements of music like notes, intervals, chords, scales, modes, and keys, and used as the basis of other music related projects. GitHub repo.
danigb
Fancy-ANSI: Convert ANSI Text to HTML — If, for some reason, you want to convert text with ANSI escape codes into HTML.. Lots of examples on the homepage. GitHub repo.
Andres Morey
Dioma: Dependency Injection Container for Vanilla JS and TS — No decorators, no annotations, no magic, no dependencies – you just add the static scope property to your class and use inject to get an instance.
Eugene Daragan
svelte-zoomable-circles: Svelte Component for Browsing Hierarchical Data — A Svelte component for displaying and browsing hierarchical data using zoomable circles. Live demo.
Tyler Berbert
VineJS 2.0 – Form data validation library for Node.js.
PGlite 0.1.1 – Lightweight Postgres packaged as WASM into a TypeScript library for the browser, Node.js, Bun and Deno. Now supports Postgres array types.
TS-Pattern 5.1 – Pattern matching library with smart type inference.
ical.js 2.0 – Parser for ICS (RFC5545) and vCard (RFC6350) data.
Minimatch 9.0.4 – Glob matching function – used by npm itself.
vue-tel-input 9.0 – Telephone number input for Vue. (Demo.)
OverlayScrollbars 2.7 – JS custom scrollbar plugin.
Octokit.js 3.2 – ‘Batteries-included’ GitHub SDK.