Modern shell scripting with JavaScript

#​672 — January 25, 2024

Read on the Web

JavaScript Weekly

Better JavaScript Shell Scripting with Bun Shell — Performance-focused server-side runtime Bun continues its rapid evolution with a side quest into the world of shell scripting by making it easier, cross-platform friendly, and less verbose. zx offers similar (but less integrated and focused) functionality to Node users, if you should prefer.

Jarred Sumner (Bun)

Announcing AdonisJS v6 — If you want a backend Web framework with amazing docs and packed with features, Adonis is a good choice. v6 is a big step forward moving to ESM by default, with more type safety overall (including for routes and middleware references), a new validation library, and more.

Harminder Virk

Learn Vite, The Fast Build Tool for Modern Web Projects — Join Steve Kinney for this video course tour of Vite’s capabilities, including a look at bundling, optimizing static assets, hot module reloading, and its plugin ecosystem. You’ll come away proficient at using Vite to build scalable, performant apps.

Frontend Masters sponsor

QuickJS: The Small, Embeddable JavaScript Engine — Several years ago, Fabrice Bellard, the genius behind FFMPEG and JSLinux, built a tiny and complete JavaScript engine in C. It now supports ES2023 and its latest release adds top-level await in modules and its REPL, as well as support for some cutting edge JS features (changelog).

Fabrice Bellard

IN BRIEF:

@npm_malware on Twitter/X shares malicious packages detected in real time.

JetBrains has opened up its Early Access Program for WebStorm 2024.1, its commercial JS/TS IDE.

📅 React Conf 2024 takes place this May 15-16 online and at Lake Las Vegas.

RELEASES:

Astro 4.2 – The framework that never ceases to amaze.

Node.js 21.6.1 (Current) – A bug fix for Undici.

Puppeteer 21.9 – Now using Chromium 121.

Next.js 14.1, Qwik 1.4, Expo Router v3, Redux Toolkit 2.1

📒 Articles & Tutorials

Web Components in Earnest — This is.. epic! If you want to really get a walk through the journey of building an entire app using Web Components and JavaScript, this is it. The app in this case is simple, but complete, and the author shows off the realities of going all in with Web Components here.

David Bryant Copeland

▶  An Alpine, HTMX, and Astro-Based Wordle App — Popular dev YouTuber Jack demonstrates building a Wordle clone with a modern Alpine, HTMX and Astro-based stack. Or you can go straight to the code, if you prefer.

Jack Herrington

Complete Your AI Coding Experience with Wallaby.js — Get instant test feedback and powerful debugging for AI code suggestions.

Wallaby Team sponsor

How to Start a React Project in 2024 — Robin explains the pros and cons of a few common approaches, including using Vite, Astro, and Next.js.

Robin Wieruch

Build a Next.js App in Storybook with React Server Components and Mock Service Worker — How to develop, document, and test RSC apps in isolation, while using MSW to mock network requests.

Michael Shilman

Reversing and Tooling a Signed Request Hash in Obfuscated JS

Brett Buerhaus

Create a Currency Converter with HTML, CSS, and Vanilla JavaScript

Esther Vaati

🛠 Code & Tools

Jint 3.0: A JavaScript Interpreter for .NET — Run JavaScript within a .NET app and expose .NET objects and functions to JavaScript code. v3 arrives after seven years of work and is the most standards-compliant JS engine running entirely within .NET.

Sébastien Ros

Mutative: A Library for Efficient Immutable Updates — A library for efficient immutable updates, boasting being 2-6x faster than naive handcrafted reducers, and even more than 10x faster than Immer. GitHub repo.

Michael Lin

Auth Without Complexity — Authentication in a Straightforward Platform — Userfront streamlines authentication & access control so engineers can focus on their core business. Read the docs now.

Userfront sponsor

React Email 2.0: Build Better Emails with ReactReact Email is a collection of unstyled components for creating emails using JSX and React (this example shows you the basic idea).

Gabriel Miranda (Resend)

workerpool 9.1: Offload Tasks to a Pool of Workers — A long established thread pool library that works not only on Node but also in the browser.

Jos de Jong

Microsoft TypeSpec: A TypeScript-Inspired Way to Define APIs — A language for concisely describing cloud service APIs and generating other API description languages (e.g. OpenAPI), client and service code, docs, and more. Formerly known as CADL.GitHub repo.

Microsoft

Receive, Authenticate, Transform, Filter, Route, and Deliver Webhooks — The Hookdeck Event Gateway is a reliable platform to support event-driven application development across the full development lifecycle.

Hookdeck sponsor

Partytown 0.9: Run Third Party Scripts in a Web Worker — A way to run resource intensive scripts on a separate thread (in a web worker) to let the main thread remain responsive. GitHub repo.

Partytown

pretty-ms 9.0: Convert Milliseconds to Readable Strings — 1337000000 → 15d 11h 23m 20s

Sindre Sorhus

nmea.js: A Library to Parse Maritime Electronics Data — I’d never even heard of NMEA till now, but if you work with sonars, gyrocompasses, and similar marine electronics, this is for you.

Bruno Vieira

Zustand 4.5 – Barebones flux-y state management.

Mongoose 8.1 – MongoDB object modelling approach.

EverShop 1.0 – Node.js-based ecommerce platform.

pretty-quick 4.0 – Run Prettier on changed files.

wavesurfer.js 7.7 – Waveform rendering and playback.

Flatbush 4.3 – Fast spatial index for 2D points/rectangles.

Culori 4.0 – Comprehensive color library.

Astro + htmx + Alpine.js == AHA

#​671 — January 18, 2024

Read on the Web

JavaScript Weekly

console.delight — You use console.log to output text, but did you know that in the browser console it can be used to render other things, like SVGs and HTML? This post is packed with examples and goes deeper into the creative options opened up by the technique than you’ll probably ever need 😅

Zach Saucier

The AHA Stack: Another Way to Build Modern Webapps — The AHA Stack is a full-stack webapp approach that brings together Astro, htmx, and Alpine.js, and where you send HTML over the wire. This is a fantastic showcase site that sells the idea well, complete with explanations and examples.

Flavio Copes

Transform the Way You Handle Forms with SurveyJS Form Libraries — With SurveyJS UI components you can set up a powerful form management system fully integrated into your IT. Effortlessly build, edit and style dynamic JSON-based forms in the drag & drop form builder with an integrated CSS-based theme editor.

SurveyJS sponsor

React Libraries for 2024 — The latest update of a popular, opinionated, annual guide to libraries and tools suitable for various tasks when building React apps, covering areas like state management, UI libraries, authentication, and testing.

Robin Wieruch

IN BRIEF:

htmx has just become 0 clause BSD-licensed. It was 2 clause BSD before – the main change being attribution is no longer required on redistribution.

Yagiz Nizipli ▶️ went on the Syntax․fm podcast to talk about all things JS performance related.

A showcase of what PWAs can do today.

A look at how to compile a standalone executable using modern JavaScript runtimes.

RELEASES:

Prettier 3.2 – The popular code formatter gains support for JSONC and Angular ICU expressions.

Knip 4.0 – Find and remove unused files and dependencies.

ReScript 11.0 – OCaml-inspired, typed ‘compile to JS’ language.

Node.js v21.6.0 (Current)

Node.js v20.11.0 (LTS) – Now with import.meta.dirname and import.meta.filename

📒 Articles & Tutorials

The Golden Rule of Assertions — Artem shares a tip that helps him write better tests or, as he calls it, the ‘Golden Rule of Assertions’: “A test must fail if, and only if, the intention behind the system is not met.”

Artem Zakharchenko

▶  Let’s Code Minesweeper in JavaScript — Ania is back with another of her fantastic step-by-step walkthrough videos. Now you can actually implement Minesweeper, rather than waste time playing it.. 😁

Ania Kubów

JavaScript Frontend Error Monitoring 101 — Take a crash (pun intended) course on JavaScript error monitoring and debugging with Sentry. Read on.

Sentry sponsor

5 CSS Snippets Every Frontend Developer Should Know in 2024 — Adam did a similar roundup last year, now he’s back with more toolbelt-worthy, powerful, CSS tips worth knowing.

Adam Argyle

Migrating from Zod to Valibot: A Comparative Experience — Zod and Valibot both provide a mechanism to validate data using types, and Matthew looks at how he found Valibot better for validating his contact form.

Matthew Kwong

A Difference Between getElementByID and querySelector — IDs with leading digits pose problems when it comes to CSS selectors.

Kiru from Switzerland

Kind of Annoyed at React“Just a little ranty rant about my fave JS library”

Cassidy Williams

The Building Blocks of a Greenfield Vue App in 2024

Fotis Adamakis

Manually Dispatching an Event to a Target

Chris Coyier

🛠 Code & Tools

Heat.js: A Heat Map Visualization Library — It has no dependencies, and is small, responsive, and themeable. GitHub repo.

William Troup

Some Top Frontend Tools of 2023 — Louis walks through a collection of tools that he found useful in the past year. It’s a rather eclectic selection – I certainly hadn’t heard of many of them – and you’re sure to find some that could help in your day-to-day work.

Louis Lazaris

Drop-In Authentication & User Management for Next.js — Add auth in minutes with Clerk’s prebuilt components, hooks, and helpers for Next.js 14.

Clerk sponsor

Tinybench: A Tiny, Simple Benchmarking Library — No dependencies – it uses whatever timing capabilities are available (e.g. process.hrtime or peformance.now). You can then benchmark whatever functions you want, specify how long/how many times to benchmark, and get a variety of stats back.

Tinylibs

🛰  Orbital Object Toolkit: Orbital Mechanics Made Easier — This is miles above my paygrade (about 100 miles in fact) but if determining the positions of satellites and terms like ‘SGP4 propagation’ and ‘TLE parsing’ make sense to you..

Theodore Kruczek

worker-timers: setInterval/setTimeout for Unfocused Windows — When a tab loses focus, any timers used within can be throttled. A workaround is to use a Web Worker.

Christoph Guttandin

A Reliable Event Gateway for Asynchronous Applications — Receive, send, and route messages across your event-driven architecture with Hookdeck’s platform for engineering teams.

Hookdeck sponsor

Sutra.js: A Behavior Tree Library for Managing Behavior Patterns — Primarily targeting game development use cases, Sutra lets you define and model complex behavior patterns in code.

Yantra

🗓 Schedule-X 1.9 – Event calendar/date picker (above).

🤖 LangChain 0.1.0 – A popular LLM app framework available in both Python and JavaScript variants.

Frappe 15.10 – Low code Python + JavaScript web framework.

React Redux 9.1 – Adds a new syntax for pre-typing hooks.

NanoPop 2.4 – Fast, minimal positioning engine.

🧊 d3-3d 1.0 – D3-powered visualizations, but 3D.

Angular 17.1🐦 More context here.

Is htmx Just Another JS Framework?

#​670 — January 11, 2024

Read on the Web

JavaScript Weekly

Is htmx Just Another JavaScript Framework? — Despite being four years old, htmx has seen a surge in popularity recently, parly due to fatigue with ‘big frameworks’ and also because its simple HTML-based approach to adding functionality to a page appeals to an increasingly diverse group. But is it just another framework itself? Yes. And no.

Alexander Petros

▶  HTMX for React Developers in 10 Minutes — You’re not interested in discussions about semantics.. you just want to get something done with htmx? Here, Jack takes ten minutes to show off the essentials.

Jack Herrington

Add Excel-like Spreadsheet Functionality to Your JavaScript Apps — SpreadJS is the industry-leading JavaScript spreadsheet for adding advanced spreadsheet features to your enterprise apps. Build finance, analysis, budget, and other apps. Excel I/O, 500+ calc functions, tables, charts, and more. View demos now.

SpreadJS from MESCIUS inc sponsor

33 JavaScript Concepts Every Developer Should Know — A curated collection of links to tutorials on 33 different areas worth understanding well, including: types, closures, equality, scope, and different engines. We linked this two years ago, but it remains frequently updated.

Leonardo Maldonado

Introducing fsx: A Modern Filesystem API for JavaScript — Filesystem APIs in JavaScript runtimes haven’t been great for a long time. This is one prominent JavaScript expert’s attempt to make a better one.

Nicholas C. Zakas

IN BRIEF:

CodePen shares its top 100 ‘pens’ of 2023. Lots of fantastic bits and pieces to look through and learn from here.

Bored? The Deno team is running a little hackathon over the next week.

jsfree.org is a new effort to catalog web services that can work without JavaScript.

🌼 Enjoy the drawing.garden.

RELEASES:

Docusaurus 3.1 – Popular site generator/framework.

Rspack 0.5 – Fast Rust-based web bundler.

MikroORM 6 – TypeScript ORM for Node.js.

Node.js v20.11.0 (LTS), Bun 1.0.22, npm 10.3 and Astro 4.1.

📒 Articles & Tutorials

The Website vs. Web App Dichotomy Doesn’t Exist — An interesting think piece that will help you flesh out your own opinions on the matter: “If there’s one takeaway from all this, it’s that the web is a flexible medium where any number of technologies can be combined in all sorts of interesting ways.

Jake Lazaroff

Rust-Based JavaScript Linters: Fast, But No Typed Linting Right Now — An explanation of why the speed gains from Rust-powered linters aren’t comparable to the full feature set of typescript-eslint.

Josh Goldberg

Reduce 80%+ Latency with Vercel Edge Functions — Learn how TiDB Serverless + Vercel Edge Functions can significantly reduce latency for global users. Read now!

TiDB sponsor

The State of Benchmarking in Node.js — While Node has always been fast (thanks largely to its V8 underpinnings), there’s a renewed focus on performance in the face of benchmarks and claims from alternatives like Deno and Bun. Lars looks at the ecosystem of benchmarking options in the space.

Lars Kappert

A CSS Media Query for Scripting Support — A new media query (e.g. @media (scripting: none)) was just added to Chrome (and Edge) to let you to define styles upon whether scripting languages are available. It’s supported in all major browsers now – a rare case of Chromium playing catch-up!

Stephanie Stimac

▶  What is Remix Exactly? — As in Remix, the full-stack web framework.

Alem Tuzlak

🛠 Code & Tools

zip.js: Library to Zip and Unzip Files — Sounds simple, and it is, but it supports a couple of different formats and can generate password protected ZIPs. There are a few demos, but the simplest one sold me on its own. GitHub repo.

Gildas Lormeau

Element Plus: Vue 3 Component Library — Out of the box you get a large variety of clean components with a minimal vibe. You can see them in action here.

Element Plus Team

Add Authorization, MFA, Biometrics and More to Your JavaScript App in Just Minutes — It’s about time that somebody talked some sense about OAuth and JavaScript. So we did. You’re welcome.

FusionAuth sponsor

RE2JS: Linear Time Matching for Regular Expressions — RE2 is a regex engine built by Google designed to operate in time proportional to the size of the input, in order to avoid so-called ‘ReDoS’ problems backtracking can cause. There are bindings for Node.js, but this version works in the browser.

Oleksii Vasyliev

Penrose: Beautiful Math Diagrams by Writing Plain Text — It might sound a little like Mermaid (indeed, their homepages are strikingly similar) but its scope feels somewhat more math-focused – there are many examples.

Penrose Contributors

DOMPurify 3.0.8: A Fast, Tolerant XSS Sanitizer for HTML — Supports all modern browsers and is heavily tested. There’s a live demo here.

Cure53

remoteStorage: Cross Browser/Device Persistence — Combines the localStorage API with a remote server to persist data across browsers and devices – so basically, imagine localStorage but remote. Here’s the server part.

Frigade

eslint-plugin-vue 9.20.0 – The official ESLint plugin for Vue.js now supports Vue 3.4. Homepage.

file-type 19.0 – Detect file type from a Buffer, Uint8Array, or ArrayBuffer.

React Unity WebGL 9.5 – Embed Unity WebGL builds in React apps.

htmlparser2 9.1 – A fast and forgiving HTML/XML parser.

YouTube.js 8.2 – Wrapper around YouTube’s internal API.

React-PDF 7.7 – React component to display PDFs.

HLS.js 1.5 – HTTP Live Streaming client library.

React Icons 5.0 – Easily use popular icons in React apps.

Chai 5.0 – BDD / TDD assertion library.

JavaScript’s rising stars

#​669 — January 4, 2024

Read on the Web

JavaScript Weekly

🌟 The 2023 JavaScript Rising Stars — At the start of each year, Michael rounds up the projects that gained the most popularity on GitHub in the prior year. Rocketing to #1 is the shadcn/ui suite of React components, but there are a lot of fresh entries. Bun and Next.js stay on the list, while htmx and Drizzle ORM make their first appearances in the top ten.

Michael Rambeau et al.

10 Interview Questions Every JS Developer Should Know in 2024 — I’d usually shy away from a list-based post on Medium, but this is a good exception. As a rare example of a top-notch developer who’s also involved in hiring other developers, Eric provides useful advice.

Eric Elliott

Authentication & User Management for the Modern WebClerk is the easiest way to add authentication and user management to your app.
With prebuilt UI components and feature-rich SDKs & APIs, Clerk is purpose-built for React, Next.js, and the modern web. Get started with Clerk for free.

Clerk sponsor

Vue 3.4 Released — Vue 2 went ‘end of life’ last week, but never fear, we got a new version of Vue 3 to make up for it, complete with a rewritten, faster template parser, and a more efficient reactivity system. If you prefer a screencast tour, ▶️ Erik Hanchett has one for you.

Evan You

😢 If the loss of Vue 2 stings, you might enjoy Fotis Adamakis’ tribute.

IN BRIEF:

Oracle is introducing JavaScript support in MySQL.

Some 2024 predictions from JS framework maintainers.

While I was still busy eating turkey, someone created an ‘everything‘ npm package (complete with an 80MB package.json) that turned every public package into a dependency, preventing any of them from being unpublished. Unsurprisingly, this resulted in much drama. 😅

Minko Gechev walks through the results of the Angular Developer Survey 2023.

A look at both the current and future state of Storybook in 2024.

RELEASES:

Dependency Cruiser 16.0 – Validate and visualize dependencies.

VueFire – A first-class Vue + Firebase experience.

Effection 3.0 – Structured concurrency and effects.

Parcel 2.11 – The zero config build tool.

Node.js v21.5.0 (Current)

📒 Articles & Tutorials

Let’s Bring Back JavaScript’s with Statement..? — Famously roasted in JavaScript: The Good Parts before its deprecation, with isn’t a popular language feature at all, so Alex’s appeal here is partly tongue in cheek. Nonetheless, with has some potentially interesting uses in modern JavaScript.

Alex MacArthur

Session Replay Basics – Debug Web App Issues Faster — Join us on Jan 11 to learn how Session Replay can help find and resolve the most difficult-to-reproduce issues in JavaScript.

Sentry sponsor

Making Sense of ‘Senseless’ JavaScript Features — We’ve tackled with (above), now Juan Diego Rodriguez looks at several other seemingly “absurd” JS eccentricities, explains how they came into existence, and tries to help you avoid the problems they cause.

Juan Diego Rodriguez

A Look at 2023’s New Array Methods — A look at toReversed(), toSplice(), toSorted(), and with() (no, not that with.. 😆)

Chris Ferdinandi

What the Heck is a Homomorphic Mapped Type?“Let’s try to understand what the TypeScript guys mean when they talk about homomorphic mapped types.”

Andrea Simone Costa

React Server Components: The Good, The Bad, and The Ugly“I’d argue that adding server capabilities to React is much less important than fixing its many existing issues.”

Mayank

Try a Lightning-Fast Pairing Tool Built with You in Mind — Tuple will change the way you think about pair programming. Try it with your team free for 14 days, no card required.

Tuple sponsor

Introduction to HTMXhtmx is an interesting library for imbuing your HTML with dynamic functionality in a lightweight, dependency-free way.

Refine

🔥 Simulating Fluids, Fire, and Smoke in Real-Time — Only tangentially JavaScript related, but a fantastic article nonetheless.

Andrew Chan

The Complete Playwright Cheatsheet

Mohan Ganesan

🛠 Code & Tools

React Aria 1.0: 40+ Accessible Components, Your Way — Anyone who follows Devon Govett (also of Parcel fame) on social media will know just how much he’s put into this suite of components, and v1.0 is now here. If you’re building your own components and want to get accessibility right, this is for you. Devon explains a little more here.

Adobe

📆  Schedule-X: A Material Design Calendar and Date Picker — Available in the form of React, Vue or plain JS components. GitHub repo.

Tom Österlund

Auth Without Complexity — React Auth in a Straightforward Platform — Userfront streamlines authentication & access control so engineers can focus on their core business. Read the docs now.

Userfront sponsor

quick-lint-js 3.0: Tool to Find JavaScript Bugs As You Code — We first linked this two years ago when it hit 1.0. It’s an interesting alternative to tools like ESLint and aims to give you instant feedback while coding. v3.0 introduces TypeScript support.

Matthew Glazar

Plotteus: A JavaScript Library for Data Storytelling — Looks to be a powerful solution not just for creating static visualizations (graphs, plots, etc.) but interactive ones that visualize data changes via scrolling, UI controls, or other user interactions.

Bartosz Prusinowski

LIPS: A Scheme-Style Lisp in JavaScript — A Lisp interpreter written in JavaScript that also has good integration with JavaScript both in the browser or atop Node.js.

Jakub T. Jankiewicz

💡 Prefer Smalltalk to Lisp? Amber might be for you.

vue-concurrency 5.0 – Concurrency ops for Vue and Composition API.

Secretlint 8.1 – Tool to prevent committing credentials/secrets.

Wretch 2.8 – Tiny, fluent wrapper built around fetch.

wavesurfer.js 7.6 – Waveform renderer and player.

DOCX 8.5 – Generate .docx/Word files from JS/TS.

jest-dom 6.2 – Jest matchers to test DOM state.

lowdb 7.0 – Simple, fast JSON database.

Reflecting on a big year for JavaScript

#​668 — December 21, 2023

Read on the Web

🎄 Welcome to the final issue of 2023! We’re taking a week off for Christmas, so this issue focuses on looking back at the past year and the items that intrigued you the most. We’re back at full steam on January 4, 2024 and we hope you have a fantastic holiday season.
__
Peter Cooper and the Cooperpress team

JavaScript Weekly

🎉  V8 is Faster and Safer Than Ever — The V8 team wants to end the year on a high and they’ve certainly pulled it off performance-wise. This post covers the highlights for the V8 engine in 2023, including the new Maglev mid-tier JIT compiler, the faster HTML parser, and support for several new JS features.

Victor Gomes (V8)

Announcing SvelteKit 2 — SvelteKit’s first official release was a year ago, and despite its relative youth, the framework has been quickly embraced by the community. This 2.0 release is an incremental one, adding support for Vite 5, and laying the groundwork for Svelte 5 which is due for release in 2024.

Svelte

Feel the Power of More Than 420,000 Teammates and Work #LikeABosch — At Bosch, we shape the future with high-quality technologies and services to inspire people and improve their lives. And it’s our people who make us remarkable. Our success is your success. Let’s celebrate together. Learn more.

Bosch sponsor

date-fns v3 Released — The hugely popular suite of 200+ functions for working with dates in JavaScript has been rewritten in TypeScript, reintroduces String date arguments, has ESM support on Node, and all functions now export via named exports. GitHub repo.

Sasha Koss

v0: Vercel’s AI-Powered React Component Creator — The AI-powered v0 looked fascinating on its release, but has been stuck behind a waitlist till now. Vercel has dropped that list, opening it to all users. Even Larry David would admit it’s pretty, pretty good.

Vercel Labs

IN BRIEF:

RIP Vue 2.x: If you’re using Vue 2, be prepared: Vue 2 goes ‘End of Life’ (EOL) on December 31st, 2023.

We’ve revisited Robin Wieruch’s 10 Web Development Trends in 2023 from January 2023 – he was on the money with all of them.

Linus Schlumberger took a look back at all the main new JS and TS features of the past three years.

Conversely, The New Stack took to looking at what’s next for JavaScript.

Remote Workshop: Svelte & SvelteKit – Afternoons of Jan 30 to Feb 1

Mainmatter sponsor

▶  TypeScript Origins: The Documentary — Videos don’t tend to do well in JavaScript Weekly, but this was the most popular one, so I wanted to feature it again! I truly enjoyed watching all of this; it’s so well made. It digs into the motivations and process behind TypeScript’s creation and release, and could easily replace Die Hard in your Christmas rotation. Maybe.

OfferZen

26 Web Dev Terms You May Not Have Heard Of

Jens Oliver Meiert

📒 Top Articles & Tutorials of 2023

As determined by their popularity in JavaScript Weekly.

Deep Cloning Objects in JavaScript, The Modern Way — I’m as surprised as you, but this was the top-clicked link in 2023. If you’ve been leaning on something like Lodash for deep cloning, we “finally now have the built-in structuredClone function to make deep cloning objects in JavaScript a breeze.”

Steve Sewell

Web Components Will Outlive Your JavaScript Framework — Web Components have been having ‘quite a moment’ this year and this looks set to continue in 2024. This was a spicy opinion piece but the points raised provoked a lot of discussion and remain highly relevant in the JS zeitgeist.

Jake Lazaroff

What Is Deeper SAST in JavaScript? — Read about the expanded capabilities of Sonar’s SAST to help detect security vulnerabilities in your JavaScript apps.

Sonar sponsor

You’ve Got Options for Removing Event Listeners — A review of some of the most common approaches available to remove event listeners in JavaScript.

Alex MacArthur

Things You Forgot (or Never Knew) Because of ReactThe item that was popular in both this newsletter and our React newsletter and easily one of the ‘classics’ of the year.

Josh Collinsworth

Writing JavaScript Without a Build System — Using a variety of build tools for things like bundling and transpiling is reasonably standard in modern JavaScript development, but what if you want to keep things simple? For simple things, it’s not necessary, says Julia. This led to a lot of discussion on Hacker News.

Julia Evans

Julia didn’t mention them, but 2023 was also the year that import maps became broadly supported in browsers, opening up extra opportunities for build-free JavaScript. The whole topic remains a little up in the air, though, judging by the reaction to DHH’s (he of Ruby on Rails fame) excitement about the ‘no build’ experience.

🛠 Top Code & Tools of 2023

As determined by their popularity in JavaScript Weekly.

UnsuckJS: Comparing Lightweight JavaScript Options — A list of frontend JS libraries in a table on a single, fast page. It remains a handy way to see the relative popularity, file size, and latest versions of libraries as diverse as Preact, Bau, htmx, Hyperapp, and Mithril.

Adam Hill

React Libraries for 2023 — The React ecosystem is so large that there’s often a problem of being spoiled for choice, so opinionated guides to different solutions tend to do well, like this annual list from Robin.

Robin Wieruch

Session Replay Basics – Debug Web App Issues Faster — Join us on Jan 11 to learn how Session Replay can help find and resolve the most difficult-to-repro issues in JavaScript.

Sentry sponsor

A Huge Year for Playwright — The popular Web testing and automation framework took some serious steps forward in 2023, particularly with v1.32.0 (linked above) offering a ‘UI mode’ that lets you explore, run and debug tests in a UI environment, complete with built-in watch mode. ▶️ This video provides a good introduction.

Microsoft

You Don’t (May Not) Need Lodash or Underscore — Inspired by the popular You Might Not Need jQuery, this extensive document provides pure JS alternatives to almost 100 different functions as you’d find in popular utility libraries like Lodash.

You Don’t Need

Driver.js: Tours, Highlights, Contextual Help, and More — A no-dependency library for putting together on-page tours and contextual help. The project is a few years old but was rewritten in TypeScript in 2023, gained numerous enhancements, and got a fresh lick of paint.

Kamran Ahmed

Transformers.js: Running ML Models in Your Browser — Transformers are a type of machine learning model often used in language or visual processing and while running these in the browser remains in its infancy, Transformers.js opens up some ML models to you with some impressive demos here.

Xenova

DeviceScript: Microsoft’s Even-Tinier TypeScript — DeviceScript brings the TypeScript experience to low-resource microcontroller devices. It’s compiled to a custom VM bytecode that can run in such constrained environments (a la Go’s TinyGo.) It’s aimed at VS Code users but there’s a CLI option.

Microsoft

Please note that these are the items that got the most clicks in the newsletter, but as we’ve covered throughout the year, many projects have had significant releases this year, including Deno, Astro, TypeScript, Node.js, Ember and Bun.

That’s all for now, and we’ll see you again in 2024! ❄️

Join our Partner Program!

Are you a Systems Integrator, Consulting Company, or Agency building Node.js based solutions to your clients? If you are then our new NodeSource Approved Partner Program may be right for you.

This program is specifically designed to help companies like yours win more deals, earn revenue from sales of NodeSource N|Solid Pro, and build better solutions for your clients.

The program offers the following benefits for members:

Revenue share from sold N|Solid licenses
Pre-sales support to help you close deals
Sales training on N|Solid and other NodeSource products
Access to Technical training programs to enhance your teams skills with Node.js and Javascript
Account management and technical support through Slack/Teams
Early access to N|Solid product updates and roadmap insights
Co-marketing opportunities
Listing in the NodeSource Partner finder

To learn more and apply please contact our partnerships team at [email protected]

JS Runtime Royale

#​667 — December 14, 2023

Read on the Web

✍️ Christmas is almost here, so we’re preparing our annual roundup issue for next week, before we take some time off! Keep an eye out for that next Thursday 🙂
__
Your editor, Peter Cooper

JavaScript Weekly

Oxlint: A New JS Linter ’50-100x Faster’ than ESLint? — Making tools as fast as possible is a common theme in the JavaScript world, and it’s the MO for the JavaScript Oxidation Compiler toolkit. Oxlint is one of their tools that’s now GA. It’s still early days, but when Evan You says “the performance is absolutely nuts” when running against the Vue 3 codebase, we sit up and listen.

Boshen

Bun v1.0.18: The JS Runtime Preparing to Take Over the World — I might have overegged the headline, but Bun is on a serious mission to replace Node.js, at least, with their ‘one goal for 2024’ being to “flip the default backend JavaScript runtime from Node.js to Bun.” They are also placing a focus on shipping Windows support ASAP.

Jarred Sumner et al.

New TypeScript Courses: Take the Learning Path — Join Mike North (Tech Lead at Stripe) for this series of brand new TypeScript courses. You’ll get hands-on practice covering both the fundamentals and advanced features like utility types and advanced generics. Learn best practices to configure and evolve your TS codebase!

Frontend Masters sponsor

Visual Studio Code November 2023 — The latest VS Code release has some handy enhancements for JS developers, including a V8 heap snapshot visualizer, the ability to drag tabs into their own new windows (a.k.a. ‘floating editor windows’), and TypeScript 5.3.

Microsoft

Deno 1.39: The Return of WebGPU — Deno introduced WebGPU support in Deno 1.8 but it was removed for various reasons. It’s back and gives you a tidy way to work with the GPU directly from JavaScript (behind the –unstable-webgpu flag, at least). Improvements to Node.js compatibility and various Deno APIs, as well as TypeScript 5.3, are included.

The Deno Team

IN BRIEF:

🎁 GitHub Unwrapped is a fun project that renders your GitHub activity into a video (a la Spotify’s “Wrapped” roundups). The source is available. It uses the React-based Remotion to dynamically create the videos.

Safari 17.2 is a particularly jam-packed release of Apple’s browser, but on the JavaScript side it has added support for import attributes.

There’s only a day or two left to take the State of JS 2023 survey.

The latest Storybook beta has added support for React Server Components.

A handy list of JavaScript engines, runtimes, and interpreters.

RELEASES:

Million 3.0 – VDOM replacement for faster React.

Croner 8.0 – Trigger functions using cron syntax.

Rollup 4.9, Ember.js 5.5, Expo Router 3.0 beta, Remix 2.4.

📄 Articles & Tutorials

The Await Event Horizon in JavaScript — You know someone’s getting heavy when they start a JavaScript article by talking about the event horizon around black holes and how “a similar boundary exists around every JavaScript Promise.” Enjoy.

Charles Lowell

Benchmarking, Profiling, and Optimizing JS Libraries — As part of this year’s Web Performance Calendar, take a journey with Stéphane to learn about optimizing a library (globalize, in his case) by way of benchmarking and profiling.

Stéphane Goetz

[Live Today] Fix Slow Code and Improve Browser JavaScript Performance

Sentry sponsor

The New TC39 FAQs — TC39 is the committee responsible for evolving and maintaining the ECMAScript spec, the standardized form of JavaScript, and its members have started a disclaimer-riddled FAQ. You can suggest new topics by opening an issue, or learn a little from the nine questions covered so far, including Will JS ever add JSX notation? and Will WebAssembly replace JS?

Ecma TC39

You Don’t Need JavaScript for That“Just because you know something needs JavaScript, doesn’t mean it still does. You can make better websites if you test those assumptions every now and then.”

Killian Valkhof

What Vue’s Creator Learned the Hard Way with Vue 3 — Evan You shared some of the lessons he learned from the release and reception of Vue 3 around things like including a lot of small breaking changes, to choosing deprecation over breaking changes.

Loraine Lawson (The New Stack)

▶  Deploying Node.js with Google’s Duet AIDuet AI is Google’s AI-based assistive agent that works both in the IDE and within Google Cloud.

Google Cloud

Stop Nesting Ternaries in JavaScript

Phil Nash

🛠 Code & Tools

RE:DOM 4.0: The 2K UI Library — We first linked to this library over 6 years ago but it’s still going, so if you want something to help with creating and syncing DOM elements that’s ‘close to the metal’, it’s worth a look. v4.0 enables tree shaking and adds viewFactory.

Juha Lindstedt and contributors

TS Docs: Online Reference Docs for npm Packages — Browse reference TypeScript documentation for any package or version of a library.

Shubham Kanodia

Add Authorization, MFA, Biometrics and More to Your JavaScript App in Just Minutes — It’s about time that somebody talked some sense about OAuth and JavaScript. So we did. You’re welcome.

FusionAuth sponsor

Seroval 1.0: Stringify JS Values — A handy utility library for turning JavaScript values into strings that can handle far more complex things than JSON, say.

Alexis H. Munsayac

SpaceTime 7.5: A Lightweight Timezone Library — Use this to calculate times in other timezones. Has a Moment-like API but is immutable. No dependencies. GitHub repo.

Spencer Kelly

React Responsive Pagination: Component for Smart Pagination — A responsive pagination component which intelligently adjusts to the available width. The homepage is a live demo, or you can hit the GitHub repo.

Jon Elantha

Svelte SPA Router: A Router for Svelte 3 and 4 SPAs — Previously for Svelte 3 only, Svelte 4 support has now been added. Upgrade guide.

Alessandro (Ale) Segala

📊 vue-chartjs: A Vue.js Wrapper for Chart.js — Using Vue? Want charts? Consider this. Demos here.

Jakub

Bringing Performance, Reliability, and CI/CD to Data — Managed infrastructure for versioning, access controls, and performance. Subscribe now.

Patch sponsor

Facebook Relay 16.1 – The React GraphQL framework.

React PDF 7.6 – Display PDFs in your React apps.

Reactotron 3.0 – React Native debugging tool.

jest-image-snapshot 6.4 – Jest matcher for image comparisons.

pnpm 8.12 – Fast, efficient package manager.

ws 8.15 – Fast Node.js WebSocket library.

np 9.2 – A better npm publish.

😍 Beautiful Planets

Three.js Procedural Planets — This is gorgeous! You can have a lot of fun adjusting the parameters to change the outcome, or you can spin up and play with your own copy using the source code. If you don’t want to stress out your browser, you can see how it looks ▶️ in this video.

Daniel Greenheck

Innovating for Performance: How our Infra Team Powers 100+ Million Downloads A Year (While Keeping our SaaS Reliable and Secure)

We just shared big news about the open-sourcing of our Node.js Runtime and the release of our AI Copilot for Node, both requiring a big role from our infrastructure (Infra) team. They are the team behind the scenes, dedicated to delivering top performance, and have been instrumental in maintaining our reputation for fast, stable, and secure delivery of our SaaS product and Binary Distributions–which generate over 100 million annual downloads a year.

The team is always looking for ways to innovate our infra to meet the growing demand and efficiency of our services, and as a part of the product releases, made some key updates to our platform. We wanted to share so others could gain value in their efforts as well as celebrate this critical group for us. Next time you talk to your infra team, give them some love, they do so much!

Infrastructure Enhancements: Moving Forward with EKS and GitOps

Our Infra team has recently completed significant updates to further improve our services:

1. Migration from ECS to EKS: To streamline our operations, we have transitioned from AWS Elastic Container Service (ECS) to Elastic Kubernetes Service (EKS). This move simplifies our operational framework by unifying it on a single platform (EKS), significantly reducing the need to manage and monitor multiple platforms. This change also enhanced our security. In Kubernetes, we now manage our security with policies and roles and the automated Kubernetes control plane security provides the services that make Kubernetes work.

2. Pipeline Enhancements: Our deployment processes have been upgraded for efficiency and reliability. The integration of GitOps and GitHub Actions play a pivotal role in these improvements:
Single Source of Truth: Both infrastructure and application configurations now have a centralized, standardized management system. This approach ensures consistency and reliability in our deployment processes.
Enhanced Collaboration and Automation: The adoption of GitOps allows for smoother collaboration and automation, making it easier to deploy changes rapidly and efficiently.
Declarative Configuration: Our configuration is designed to be easily readable and understandable, facilitating quick and accurate deployments.

3. Faster Deployment Times: One of our key achievements has been a reduction in deployment times of almost 70%. This efficiency gain translates to quicker availability of new features and updates for our customers, enhancing their overall experience.

4. Reduced Cost: In addition to all of the above, we also reduced the costs for our deployments by 80%!!!

Our Commitment to Timely Updates and Ecosystem Support

At NodeSource, we are proud to be a leading distributor of the open source binaries for DEB and RHEL and for setting the standard for release speed. Millions of websites, apps and more count on our binaries because we deliver them rapidly. We release security updates within 24 hours and Node.js feature builds inside of 48 hours. This rapid response time supports the evolving needs of the Node.js ecosystem and demonstrates our commitment to providing the latest and most secure features to our customers. Check out our GitHub Distributions for more.

Conclusion: A Continued Legacy of Innovation and Excellence

At NodeSource, the Infra team’s ongoing innovations ensure that we remain at the forefront of performance, stability, security, and availability. We are proud of our efforts to support the Node.js ecosystem, as well as organizations that rely on Node, by providing the best tooling, service, and support.

Learning JS framework concepts by building one

#​666 — December 7, 2023

Read on the Web

JavaScript Weekly

Learn How Modern JS Frameworks Work by Building One — Building things is a great way to learn, even if you don’t end up using what you built. Even better is when someone who’s already built something successful introduces you to the process. Nolan doesn’t go super deep but far enough to whet your appetite and for you to learn a few things by taking it further.

Nolan Lawson

🚀  Astro 4.0 Released — The new major release of the Astro content-site framework is just out, including a new dev toolbar, automatic i18n routing, new view transition APIs, and more. There’s also, experimentally, incremental content caching. Upgrading is simple – an npx @astrojs/upgrade away for most folks.

Astro

Streamline API Development With Postman Workspaces — Postman workspaces give teams shared access to the API tools they need to solve problems together. They are the go-to place for development teams to collaborate and move quickly while staying on the same page.

Postman sponsor

Maglev: V8’s Fastest Optimizing JIT — An interesting look under the hood of how the V8 JavaScript engine (as used in Chrome, Node.js and elsewhere) continues to get faster thanks to work on its Maglev JIT compiler which sits between the existing Sparkplug and TurboFan compilers (which both have distinct compilation speed vs code performance tradeoffs).

The V8 Team

IN BRIEF:

📊 The WebAssembly vs JavaScript (PDF) paper compares the energy requirements and performance of JS and WASM on the Web. Spoiler: “WebAssembly is faster than JavaScript and even more energy efficient.”

A recap of the Electron ecosystem in 2023.

The New Stack weighs up the pros and cons of using React today.

Talk about going down a rabbit hole, but did you know it’s possible to use Nuxt, Vue and Tailwind CSS to build an Adobe Premier Pro plugin?

Popular ingress service ngrok has unveiled a JavaScript SDK to add secure ingress to Node apps.

The Construct 3 2D game engine now supports TypeScript.

RELEASES:

Electron 28 – Now with ESM support, Chromium 120 & Node.js 18.18.2.

Fresh 1.6 – The Deno-based web framework.

React Native 0.73 – Now with full Android 14 support, Kotlin becomes the recommended language for Android, and more.

HTML5 Boilerplate v9.0 – Blast from the past!

Redux 5.0, Redux Toolkit 2.0, and more.

Node.js v21.4.0 (Current), Qwik 1.3, and Redwood 6.5

📄 Articles & Tutorials

Prettier’s CLI: A Performance Deep Dive — We’ve recently written about the bounty the Prettier project put up (and how Biome won it) but Prettier has also been working on itself by hiring the author of this post to find and implement performance improvements, all while sticking with JavaScript.

Fabio Spampinato

The Complete Puppeteer Cheatsheet — If you want to control a headless Chrome browser from JavaScript, Puppeteer is for you.

Mohan Ganesan

Accelerate Your API Development with Postman Collection Templates — Browse 70+ free and customizable templates to jump-start your API design, documentation, development, and testing workflows.

Postman sponsor

How Marketing Changed OOP in JavaScript — A look at JavaScript’s earliest history and its prototypal nature.

Juan Diego Rodríguez

Goodbye, Clean Code — Much as Donald Knuth warned us away from premature optimization, here Dan Abramov tells us to beware of premature refactoring and de-duplication. (A golden oldie post from 2020.)

Dan Abramov

I Replaced npm, yarn and nvm with pnpm — npm hasn’t been the only package manager in town for many years.

Pawel Grzybek

Advanced Patterns for Taking Page Element Screenshots with Playwright

Liran Tal

TypeScript’s Hidden Feature: Subtypes

Tim Johns

🛠 Code & Tools

TSDiagram: Diagrams as Code with TypeScript — Draft diagrams quickly with TypeScript. Define data models through top-level type aliases and interfaces and it automatically lays out things out in an efficient way. GitHub repo.

Andrei Neculaesei

StyleX: Meta’s CSS-in-JS Styling System — A newly open sourced “CSS-in-JS” library from Meta made up of a JavaScript syntax and compiler for styling web apps. Jack Herrington has ▶️ a 13-minute screencast taking a practical look.

Goel and Gallagher (Meta)

Simplify Debugging with Console Ninja’s Predictive Logging — Smart predictions and ahead of time logging saves you multiple iterations of adding logs and re-running your app to get the values you need.

Wallaby Team sponsor

tsParticles 3.0: Particles, Confetti and Fireworks for Your Pages — Create customizable particle related effects for use on the Web. Uses the regular 2D canvas for broad support.

Matteo Bruni

Culori: A General-Purpose Color Manipulation Library — Supports most color spaces and formats defined in the CSS Colors Level 4 spec and can parse, convert, mix, create color differences, and more. GitHub repo.

Moqups

Perfume.js 9.2: Web Performance Library for Measuring User-Centric Metrics — A tiny web perf monitoring library that reports data back to your favorite analytics tool and supports the latest browser performance APIs for precise metrics on things like first paint, total blocking time, etc.

Leonardo Zizzamia

Timenames: A Unique Name for Each Second of the Day — The author had an app and wanted to create more interesting unique filenames without using the time directly. There’s a live demo showing the names in action.

Ankur Seth

YouTube.js 8.0: A Wrapper Around YouTube’s Private ‘InnerTube’ API — It uses the same behind the scenes API as official YouTube clients, rather than the official developer API, so, as always, your mileage may vary.

LuanRT

Feel the Power of More Than 420,000 Teammates and Work #LikeABosch

Bosch sponsor

Storybook 7.6 – The frontend UI component workshop.

Mantine 7.3 – Full featured React component suite.

swup 4.5 – Page transition library for server-rendered sites.

wavesurfer.js 7.5 – Audio waveform rendering and playing.

Nano Events 9.0 – An event emitter library in 107 bytes.

AdminJS 7.5 – Admin interface for webapps.

AVA 6.0 – Popular test runner for Node.

NodeSource Team Supports JSConf Colombia for the Event’s 10th Anniversary

Over a thousand developers gathered together two weeks ago to engage in all things JavaScript at the sold-out JSConf Colombia (https://www.jsconf.co/) while celebrating its 10th year in Medellin. Our NodeSource team members (current and past) played impactful roles in leading, planning, and speaking to support the community event. We are incredibly proud of our Colombian team members, who are a massive part of creating our best-in-class OSS N|Solid Runtime and premium platform N|Solid Pro.

Adrian Estrada, our VP of Engineering and OpenJS Foundation Board Member, has been a key leader for years in supporting Colombia’s Node.js and JS community. His great passion for technology and enabling people to develop and grow makes him a fantastic leader for our global engineering team and community engagement. Alongside Adrian, Julian Duque, a NodeSource alumni, has also been instrumental in the Colombian JavaScript community. His leadership and contributions have significantly shaped the region’s JavaScript development landscape. Julian’s efforts, combined with Adrian’s dedication, underscore the deep involvement and influence NodeSource has in nurturing and advancing the tech community in Colombia.

This event has had an incredible decade-long run, with a commitment to breaking down barriers, promoting accessibility, and creating a space that champions diversity. As the last in the series, the community was committed to making this final event one to remember.

The event opened to local musicians on stage, setting the tone for a joyous and creative experience. Talks at the event showcased the diversity of the community, including topics like “Making Art with JavaScript and Garbage,” “Unlock the Power of JavaScript Generators,” “IDX, WebIDE’s and the Future of JavaScript Debugging,” and the AI-themed “Chatting with the Canvas; How to Assemble Art from AI Image Prompts.”

Jessica Felix highlighted N|Solid, our product, emphasizing its significance in modern Node.js development and performance analysis. This array of topics underlined JavaScript’s dynamic and multifaceted nature, catering to a wide range of interests and expertise within the community.

NodeSource Alumni and JS Rockstar Erick Wendel shared his knowledge about “How to consume gigabytes of data in JavaScript without slowing down applications.”

And one of our current team members, the talented Juan José Arboleda, challenged the attendees that “JavaScript can be as fast as C++.”

Colombia has long been a crucial part of NodeSource, and the talent and energy from the region have produced many great team members. Like Maria Fernanda Serna and NodeSource Alumni Liz Parody, who helped organize this year’s event, we have enjoyed the spirit and talents of this region. Colombia has also been a place where we give back. From these community events to where we planted trees for every customer in our NodeForest campaign, Colombia is ¡Qué nota de lugar! (a fantastic place!).

In keeping with this spirit of community and innovation, a new event is being born to replace JSConf Colombia. It will be announced soon and is set to happen in October 2024. This upcoming event, which includes some of the organizers of JSConf Colombia, will continue to foster the region’s vibrant tech community. NodeSource will also continue to support this initiative, highlighting its ongoing commitment to the Colombian tech scene.