Breaking a promise

#​695 — July 4, 2024

Read on the Web

JavaScript Weekly

How to Annul Promises in JavaScript — You can ‘cancel’ XHR and fetch requests, but can you cancel regular promises? Currently, no, but Zachary looks into doing the next best thing: telling a promise the game’s up, and discarding/ignoring its eventual results.

Zachary Lee

regex 2.1: Turn JavaScript’s Regular Expression Support Up to Eleven — From the co-author of O’Reilly’s High Performance JavaScript and Regular Expressions Cookbook comes an enhancement for JavaScript’s regex support. Supporting all of ES2024’s regex functionality, it adds support for free spacing and comments, atomic groups, regex subroutines, context-aware interpolation of RegExp instances, and more.

Steven Levithan

💡 The author also tells us a Babel plugin for regex is expected to be released later today.

✂️ Cut Your QA Cycles Down to Minutes with Automated Testing — Are slow test cycles bottlenecking your dev teams’ release velocity? With QA Wolf
, your organization can run entire test suites in minutes, not days. Plus, get to 80% automated E2E coverage in just 4 months (zero flakes, guaranteed). Schedule a demo.

QA Wolf sponsor

IN BRIEF:

Nicholas C. Zakas writes about different JavaScript runtimes and how you can preserve the ability to switch runtimes easily.

The React Native team says developers building modern React Native apps should be using a framework to do so, such as Expo.

Web pioneer Marc Andreessen tells ▶️ the origin story of Mosaic and Netscape.

🤦 If you can’t get your Lighthouse scores to 100%, you could always pretend.. A trick to keep an eye out for..

There are at least 535 ways to reload a page with JavaScript.

RELEASES:

Backbone.js 1.6 – The classic library gets a little update.

Qwik 1.6Qwik 2 is coming soon, though.

A raft of Node.js Security Releases are due on July 8.

ESLint 9.6, PrimeVue 4.0, Bun 1.1.18

📒 Articles & Tutorials

Enhancing The New York Times‘ Web Performance with React 18 — Last year, The New York Times set out to take full advantage of React 18 on its flagship news site. This is a tour of the challenges faced in upgrading, coupled with the significant benefits they managed to take advantage of.

Ilya Gurevich (NYT)

How to Use a Go(lang) Library from JavaScript with WebAssembly — Compiling Go code to WebAssembly opens up some interesting opportunities in the browser.

Thomas Derflinger

Inside Look: How Sentry Debugs with Sentry — Join Sentry engineer Yagiz Nizipli to learn how he optimizes tasks with Sentry, saving $160K/yr. RSVP for tips & tricks!

Sentry sponsor

How We Tamed Node.js Event Loop Lag — Node famously uses very few threads yet can handle a large number of clients performantly, as long as the work associated with each client is ‘small.’ When that work isn’t ‘small’, as here, things can go off the rails quickly.

Eric Allam

How People with Disabilities Use the Web — Describes tools and approaches that disabled people use to interact with the Web and the barriers these people face. Of interest are the user personas that show the range of specific people’s experiences.

W3C

A Set of Modern Web Performance Guides — A helpful collection of guides, covering things such as working with the different core web vitals, JavaScript optimization, metrics, and more.

SpeedCurve

📄 Why Google Sheets Ported Its Calculation Worker from JS to WasmGC Thomas and Steiner (Google)

📄 Working with Pasted Content in JavaScript Raymond Camden

📄 How to Parse HTML Programatically in JavaScript Brian Wachira

📄 TypeScript 5.5: A Blockbuster Release Dan Vanderkam

🛠 Code & Tools

BWIP-JS: A Barcode Writer in Pure JavaScript — A library that can generate barcodes using over 100 different barcode types and standards, both single and two dimensional. There is, of course, a live demo where you, too, can discover far more types of barcodes exist than you ever imagined.

Mark Warren

Superstruct 2.0: Define Interfaces to Validate Data at Runtime — Designed for validating data at runtime with an annotation API inspired by TypeScript, Flow, Go and GraphQL. GitHub repo.

Ian Storm Taylor

Software Consultants Your Team Actually Wants to Work with 🥳 — Test Double solves tough problems from strategy to execution. Weekly rates. Open contracts. No management required.

Test Double sponsor

Termino.js 2.0: Create Terminal-Like Experiences in the Browser — No dependencies, customizable, and you can create multiple terminal instances on a single page. Demos.

Marketing Pipeline

Fabric.js 6.0: A SVG-to-Canvas and Canvas-to-SVG Library — Provides an interactive object model on top of the HTML5 canvas to make it easier to work with multiple visual elements there. The homepage is a complete live demo.

Fabric.js

Flitter: A Flutter-Like JavaScript Data Visualization Framework — Boasts a declarative syntax and support for both SVG and Canvas to allow you to build high-performance data visualizations, interactive charts, diagrams, and more. It’s also easy to integrates with React, Svelte, etc.

Flitter

SquirrellyJS 9: A Powerful Template Engine — A modern, configurable, and fast template engine promising “the power of Nunjucks” and “the simplicity of EJS”. There’s an online playground if you want to see it in action. GitHub repo.

Ben Gubler

Hexo 7.3 – Popular Node.js blog framework / generator.

gridstack.js 10.3 – Build responsive interactive dashboards quickly.

React-PDF 9.1 – React component to display PDFs.

MUI X 7.8 – Popular React component suite.

🎁 And one for fun

Sliderland: A Minimalist Coding Playground — A slider control based visualization you can code with simple formulas. We last linked to this a few years ago, but it’s still a fun way to do some quick, visual JS math experimentation. Tixy.land is along similar lines, but based on a 2D grid.

blinry

Leave a Reply

Your email address will not be published. Required fields are marked *