Digging into explicit resource management

#​663 — November 16, 2023

Read on the Web

JavaScript Weekly

Prettier 3.1 Released — The popular opinionated code formatter has a new release including support for the new control flow syntax in Angular 17 plus a new, experimental formatting option for ternary expressions (as in x ? y : z) explained in more depth in “A curious case of the ternaries.”

Alex Rattray

🤔 With an aim to making code formatting even faster, Prettier’s co-creator has put up a $10k bounty for any Rust project that passes >95% of Prettier’s tests.

Exploring Explicit Resource Management in JS — A practical look at the idea of explicit resource management, an idea both currently at stage 3 in TC39 (and partly supported in TypeScript 5.2) that makes it easier to ‘clean up’ resources once they are no longer used or needed.

Ilia Pozdnyakov

Build Interactive, Live Video Applications with Amazon IVS — Amazon Interactive Video Service (Amazon IVS) allows developers to create dynamic video experiences, such as collaborative real-time livestreams. Check out the new ivs.rocks to find code samples, demos, and other resources. Click here to get started.

Amazon Web Services (AWS) sponsor

On HTML Web Components — “With web components, you might even say React’s component model is being ported to the browser. But it’s being done in a way that works to enhance how the web already works, not replace it”.

Jim Nielsen

A Review of Lightweight JavaScript Frameworks — This overview is targeted at Django (i.e. Python) developers but if you, too, want to avoid larger frameworks like React or Angular, you might appreciate this look at numerous alternatives from Stimulus and htmx to more oblique options like Laravel Livewire.

Michael Yin

🥳 AWS is celebrating a huge release with v6 of the AWS Amplify JavaScript library which includes full support for Next.js App Router and Server Actions.

🌎 Node.js TSC member Yagiz Nizipli is suggesting using Biome for code formatting in Node, since ESLint has deprecated its core formatting rules.

👾 The winners of React Jam, a recent React-based game development contest, have been revealed. An entry I enjoyed was useChess, a set of chess-based puzzles.

▶️ If you’ve wondered what the big deal is about Astro, James Q Quick went on the Software Engineering Daily podcast and explained Astro pretty well.

🎵 Someone’s recorded ▶️ a rap music video about TypeScript..

RELEASES:

Node.js v21.2.0 (Current)

visx 3.5 – D3-based visualization primitives for React.

fx 31.0 – Powerful terminal JSON viewer.

Astro 3.5, Ember 5.4, and Prisma 5.6.

📄 Articles & Tutorials

67 Browser-Based Debugging Tricks — A list of useful, ‘not-obvious’ hacks to get the most out of the browser’s DevTools. Assumes a reasonable existing understanding of said tools.

Alan Norbauer

Exploring V8’s Strings: Implementation and OptimizationsNote: This is very technical and most JavaScript developers do not need to go this deep. That aside, this is a fantastic look under the covers of how the V8 engine handles strings, including the optimizations used that allow it to go toe to toe with languages like C++.

Ilia Pozdnyakov

JavaScript Scratchpad for VS Code — Quokka.js is the #1 tool for exploring/testing JavaScript with edit-continue experience to see realtime execution and runtime values.

Wallaby Team sponsor

▶  An Overview of Angular 17’s New Built-In Control FlowAngular 17 was released last week and a significant enhancement was support for a new syntax in templates that looks and feels more JavaScript-y.

Dmytro Mezhenskyi

Moving Back to React (from Preact) — Preact felt like a logical, lightweight choice to this team at one time, but they’ve switched to React for better compatibility with Next.js, among other things. Their page weight is up slightly, but they feel the tradeoff is worth it.

Ante Barić (Daily․Dev)

My Journey to 3x Faster Builds: Trimming Barrel File Imports“I maintain a small frontend application (4K LOC) which uses Vite as the compiler. The production build, using npm run build, was taking 26 secs on Github Actions. It seemed awfully slow for such a small application. I decided to investigate why.”

Ramana Venkata

Can Bun Eat Node’s ‘Lunch’? — An experiment in migrating a codebase (a restaurant voting app called Lunch) from Node over to Bun and seeing how it fares.

Jeffrey Carl Faden

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

Bosch sponsor

How to Use NPM Packages Outside of Node — Learn how to run NPM packages in ‘other places’ like serverless platforms, the browser, and beyond.

George MacKerron (Neon)

What I Learned Building an Audio Plugins System for the Web

Ben Wiley

Rust for JavaScript Developers: An Overview of Testing

Joshua Mo

🛠 Code & Tools

gsplat.js: A Gaussian Splatting Library — Gaussian splatting is an increasingly popular graphics rendering techniques where rather than render millions of tiny, textured triangles in a scene, you get a more wild paintball-like splatter fest, where each paintball creates a smooth, colorful blob instead of a rigid shape. This demo is both simple and striking.

Dylan Ebert

Reveal.js 5.0: The HTML Presentation Framework — A way to build presentations using standard Web technologies. The project’s homepage is, itself, such a presentation. v5.0 adds support for ‘scroll mode’ which essentially turns presentations into more typically scrolling Web experiences – demo.

Hakim El Hattab

🖍️ Marker.io: Collect Bug Reports With Annotations & Session Replay — Collect feedback on live websites. Get dev-friendly bug reports with screenshots, URLs, console logs & session replay.

Marker.io sponsor

Datasheet Grid: An Airtable-like React Component — If you’ve got an array of objects and you want a way for users to manipulate them, this is for you. It’s not going to replace a spreadsheet or an extensive data grid framework, but it’s a mature solution featuring smooth animations, virtualized rows/columns, keyboard navigation, and more.

Nicolas Keller

Perfect Freehand: A Library for Creating Better ‘Freehand’ Lines — You can try it out here. Makes your e-signature not look like chicken scratch! Might be useful for drawing apps.

Steve Ruiz

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 help communicate the idea.

ehmicky

@storybook-test: More Streamlined and Powerful Storybook Testing — @storybook/test consolidates the API of @storybook/jest and @storybook/testing-library into a new, single package, powered by Vitest.

Kasper Peulen

Marked 10.0 – Markdown parser and compiler. There’s also marked-terminal 6.1 which lets you render Marked-processed Markdown on the terminal.

HumanizeDuration.js 3.31.0 – Turn milliseconds into textual durations in numerous natural languages.

actions/github-script 7.0 – Script the GitHub API in GitHub Actions.

Plasmo v0.84.0“Like Next.js for browser extensions.”

PDFKit 0.14.0 – PDF generation for Node and browser.

React Joyride 2.7 – Create guided tours in your apps.

Job Listing

Full Stack TypeScript Software Engineer – [Remote Europe]Marker.io is a visual bug-reporting tool for the web. Join our dev team and work remotely (Stack: Node.js, Vue.js & MongoDB).

NOTABLE QUOTABLE

“When you choose a language, you’re choosing more than a set of technical trade-offs – you’re choosing a community.”

___
Joshua Bloch

Looking at both 2022 and 2023

#​620 — January 6, 2023

Read on the Web

We’re back for 2023 😀 As is our tradition, we’re taking a quick look back at the past year – this time led by a few choice retrospectives, then followed by the most popular articles and tools included in JavaScript Weekly in 2022. There’s sure to be some things you missed or want to revisit – enjoy!
__
Peter Cooper and the Cooperpress team

JavaScript Weekly

🌟 The 2022 JavaScript Rising Stars — For the seventh time, Michael Rambeau kicks off our year with a roundup of ‘trending projects’ in the JavaScript space. Bun takes the top spot for 2022, but we’ll leave the rest for you to check out. A few guest authors also share their opinions on the ecosystem.

Michael Rambeau et al.

Evan You Looks at 2022 and 2023 — You’ll know Evan for Vue.js and Vite and here he recaps what happened in the Vue world in 2022 (like Vue 3.x becoming the new default version) and what we can expect in 2023, including the mysteriously named Vapor Mode.. We’re also warned Vue 2.x has one year before it reaches EOL.

Evan You

🧈 Retire your Legacy CMS with ButterCMS — ButterCMS is your new content backend. We’re SaaS so we host, maintain, and scale the CMS. Enable your marketing team to update website + app content without needing you. Try the #1 rated SaaS Headless CMS for your JS app today. Free for 30 days.

🧈 ButterCMS sponsor

Six JavaScript Projects to Watch in 2023 — A reasonable selection, focused on newer, more cutting edge, but also very promising projects (including the aforementioned Bun).

AsyncBanana

LOOKING BACK AND FORWARD:

Michael Shilman writes about the future for Storybook in 2023.

Ryan Carniato ponders where JS frameworks are headed in 2023.

📅 ▶️ 10 JavaScript conferences to consider attending this year.

Some other 2022 roundups and reflections: Cassidy Williams, Igalia Web Platform Team, Dave Rupert, Stéphanie Walter, Pawel Grzybek, Stephanie Eckles, Michelle Barker, Rachel Andrew, Remy Sharp, Ahmad Shadeed, the HTTP protocol 😆

RELEASES:

Spacetime 7.4 – Lightweight timezone library.

Lerna 6.4 – JS monorepo build tool.

TestCafe 2.2 – End-to-end Web testing.

Vuetify 3.1 – Vue component framework.

📒 Top Articles & Tutorials of 2022

As determined by their popularity in JavaScript Weekly.

1. Douglas Crockford: “The best thing we can do today to JavaScript is to retire it.” — The most popular link of the year was to an interview with the author of JavaScript: The Good Parts (and discoverer-of-sorts of JSON) where he explained the benefits of code reading, why we need better languages, and how he won’t “write about JavaScript again.”

Evrone

2. Ecma International Approved ECMAScript 2022 — The second most popular item of the year was a bit more positive, with Ecma making ECMAScript 2022 a standard. Dr. Axel brought us up to speed with what this meant at a practical level. You’ll already be using some of these features – this move just tied up the formalities.

Dr. Axel Rauschmayer

▶  Whiskey Web and Whatnot: Your New Favorite JavaScript Podcast — A fireside chat with your favorite devs. Guests include Wes Bos, Charlie Gerard, Chris Coyier, and Kelly Vaughn.

Whiskey Web and Whatnot sponsorpodcast

3. JS Function Composition: What’s The Big Deal? — James’ articles on JavaScript fundamentals are always popular and last year we got a fresh one focusing on a common activity: function composition. “What’s the big deal?” he asks.

James Sinclair

4. AbortController is Your FriendAbortController provides a way to abort web requests at any point without waiting for a response but it’s possible to twist it into other use cases, as we saw here.

Sam Thorogood

5. Ten Common JavaScript Issues Developers Face — A good old-fashioned list. If you’ve been working with JavaScript for many years, these are potholes you (probably) know to avoid but there’s enough to chew on here otherwise.

Ryan J. Peterson

6. A Pipe Operator for JS: Introduction and Use Cases — Many developers feel a pipe operator is missing from JavaScript. Luckily there’s a pipeline operator proposal at stage 2 in TC39. Dr. Axel explains why you’d want this and how it could work.

Dr. Axel Rauschmayer

7. Patterns.dev: Modern Web App Design Patterns — A free book you can download in PDF format or enjoy on the Web. Learn about lots of fundamentals, from how different styles of rendering or importing resources work to performance optimizations and case studies.

Lydia Hallie, Addy Osmani, and Others

8. Decorators for ES6 Proposal Reached Stage 3 at TC39 — It’s a few years in the making, but a decorators proposal conditionally made it to stage 3 and people were very excited. Fingers crossed we see more from this in 2023.

Ecma TC39

🛠 Top Code & Tools of 2022

As determined by their popularity in JavaScript Weekly.

1. Rome Formatter: Super Fast JavaScript Formatting — I liked the image for this enough to want to include it again 😉 As of 2023, Rome (now at version 11) remains an ambitious project that sets out to replace a lot of JS tools in one hit with the initial focus being on Prettier-esque code formatting, as well as linting. Compiling, bundling, and testing features are scheduled to appear throughout 2023.

Rome Team

2. TypeScript 4.6 Released — Not a lot to say here, as TypeScript is always popular, and it’s now up to version 4.9, but with v4.6 it took a step forward by being able to detect more syntax errors in plain old JavaScript, a benefit for all JavaScript-developing VS Code users, at least.

Daniel Rosenwasser

Dynaboard: The Pro-Code Web App Builder Made for Developers — Build high performance public and private web apps in a collaborative — code forward — WYSIWYG environment.

Dynaboard sponsor

3. Vite 4.0 Released — This was only a month ago, too. From the same creator as Vue.js, Vite is an exciting piece of frontend tooling offering lots of goodies out of the box. We look forward to more Vite news in 2023.

Evan You and Vite Contributors

4. Lexical: An Extensible Text Editor Library — Out of Meta came a new text editor framework putting accessibility, performance, and reliability at its heart. At only 22KB gzipped and with React 18+ support (but vanilla is also OK), it reminded us of Draft.js but they say it’s the “next generation” and Meta is already replacing Draft.js with Lexical in their internal apps.

Meta / Facebook

5. Bun: A (Still) Interesting New JavaScript Runtime — Bun appeared in summer 2022 as a new JavaScript runtime built not around V8 (like Node.js or Deno are) but WebKit/Apple’s JavaScriptCore. It includes its own bundler, transpiler, task runner, and npm client, but most significantly boasts huge performance improvements over existing options and supported a lot of Node and Web APIs out of the box.

Jarred Sumner

6. JSON Crack: Visualize JSON Data in Graph Form — Got JSON, want to view it? This is a neat tool for working with and displaying JSON data structures. You can play with it online, embed the graphs into your site, or download them for further use.

Aykut Saraç

Stuck on Node 10? Need to Upgrade but Don’t Have Time? Contact Us 🚀

UpgradeJS.com | Node and JavaScript Upgrade Services sponsor

7. Shader Park: Create Interactive 2D and 3D Shaders with JavaScript — An open source Web-based platform, community, and library for simplifying the mystifying world of shaders and GPUs by letting you create them procedurally with JavaScript. Note: This site is heavy on the browser given its use of WebGL, so may not be suitable for every device.

Blankensmith and Whidden

8. Axios 1.0: The Popular HTTP Client Library/API — With 98k GitHub stars and a presence in numerous thousands of package.json files, Axios remains very popular and it’s amazing it only hit 1.0 in 2022. The Fetch API has taken much of Axios’ thunder but, like jQuery, Axios still wraps up a lot of functionality into a broadly liked API. (Official homepage.)

Axios Project

💻 Jobs

Developer Relations Manager — Join the CKEditor team to build community around an Open Source project used by millions of users around the world 🚀

CKEditor

Backend Engineer, TypeScript (Berlin / Remote) — Thousands of people love our product (see Trustpilot for yourself). Join the team behind it and help us scale. 🚀

Feather

Find JavaScript Jobs with Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It’s free for job-seekers.

Hired

We’re back to normal service as of next week! If you’ve got anything you’d like to submit for our consideration, hit reply and let us know.