---
title: "Breaking a promise"
publication: "JavaScript Weekly"
issue: 695
published_at: "2024-07-04"
canonical_url: "https://javascriptweekly.com/issues/695"
---

Plus a powerful barcode generation library, Backbone is back, and the worst way to get 100s on Lighthouse. |        

#​695 — July 4, 2024 

[Read on the Web](https://javascriptweekly.com/issues/695)  

Together with [![QA Wolf\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_676,h_165/e_make_transparent/co_white,e_outline:10/v1697452866/jsfvxyuggor0ygcs9j0c.png)](https://www.qawolf.com/?utm_campaign=CutYourQACycles07042024&utm_source=jsweekly&utm_medium=newsletter)   

JavaScript Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/gesvnavdntu0dln2afcx.jpg)](https://webdeveloper.beehiiv.com/p/cancel-promises-javascript)  

[How to _Annul_ Promises in JavaScript](https://webdeveloper.beehiiv.com/p/cancel-promises-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](https://github.com/slevithan/regex) — 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.  [![\](https://copm.s3.amazonaws.com/6e5f6232.png)](https://www.qawolf.com/?utm_campaign=CutYourQACycles07042024&utm_source=jsweekly&utm_medium=newsletter) 

[✂️ Cut Your QA Cycles Down to Minutes with Automated Testing](https://www.qawolf.com/?utm_campaign=CutYourQACycles07042024&utm_source=jsweekly&utm_medium=newsletter) — Are slow test cycles bottlenecking your dev teams' release velocity? With [QA Wolf](https://www.qawolf.com/?utm_campaign=CutYourQACycles07042024&utm_source=jsweekly&utm_medium=newsletter) , 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](https://www.qawolf.com/?utm_campaign=CutYourQACycles07042024&utm_source=jsweekly&utm_medium=newsletter). 

QA Wolf sponsor   

**IN BRIEF:** 

- Nicholas C. Zakas [writes about different JavaScript runtimes](https://ckarchive.com/b/lmuehmh08vwdxid7kkm78cdoo5v00hg) 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](https://reactnative.dev/blog/2024/06/25/use-a-framework-to-build-react-native-apps), such as [Expo.](https://expo.dev/)
- Web pioneer Marc Andreessen tells [▶️ the origin story of Mosaic and Netscape.](https://pmarca.substack.com/p/the-true-story-as-best-i-can-remember)
- 🤦 If you can't get your Lighthouse scores to 100%, [you could always pretend..](https://www.amitmerchant.com/javascript-snippet-that-sets-all-lighthouse-scores-to-hundred/) A trick to keep an eye out for..
- There are at least [535 ways to reload a page with JavaScript.](https://www.phpied.com/files/location-location/location-location.html)   

**RELEASES:** 

- [Backbone.js 1.6](https://backbonejs.org/#changelog) – The classic library gets a little update.
- [Qwik 1.6](https://github.com/QwikDev/qwik) – [Qwik 2](https://www.builder.io/blog/qwik-2-coming-soon) is coming soon, though.
- A raft of [Node.js Security Releases](https://nodejs.org/en/blog/vulnerability/july-2024-security-releases) are due on July 8.
- [ESLint 9.6](https://eslint.org/blog/2024/06/eslint-v9.6.0-released/), [PrimeVue 4.0](https://primevue.org/), [Bun 1.1.18](https://bun.sh/blog/bun-v1.1.18)  

📒 Articles & Tutorials 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/lw8osak1kztpyuwacnto.jpg)](https://open.nytimes.com/enhancing-the-new-york-times-web-performance-with-react-18-d6f91a7c5af8)  

[Enhancing _The New York Times_' Web Performance with React 18](https://open.nytimes.com/enhancing-the-new-york-times-web-performance-with-react-18-d6f91a7c5af8) — 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](https://tderflinger.com/en/how-to-integrate-go-library-js-webpage-webassembly) — Compiling Go code to WebAssembly opens up some interesting opportunities in the browser. 

Thomas Derflinger   

[Inside Look: How Sentry Debugs with Sentry](https://sentry.io/resources/how-sentry-debugs-with-sentry/?utm_medium=paid-community&utm_source=javascriptweekly&utm_campaign=fy25q2-sentrydebugsworkshop&utm_content=newsletter-sentrydebugsworkshop-register) — 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](https://trigger.dev/blog/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](https://www.w3.org/WAI/people-use-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](https://www.w3.org/WAI/people-use-web/user-stories/) that show the range of specific people’s experiences. 

W3C   

[A Set of Modern Web Performance Guides](https://www.speedcurve.com/web-performance-guide/) — 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](https://web.dev/case-studies/google-sheets-wasmgc) Thomas and Steiner (Google) 

📄 [Working with Pasted Content in JavaScript](https://www.raymondcamden.com/2024/07/03/working-with-pasted-content-in-javascript) Raymond Camden 

📄 [How to Parse HTML Programatically in JavaScript](https://blog.apify.com/javascript-parse-html/) Brian Wachira 

📄 [TypeScript 5.5: A Blockbuster Release](https://effectivetypescript.com/2024/07/02/ts-55/) Dan Vanderkam  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/q7txjbegdwyeprptsfzr.jpg)](https://github.com/metafloor/bwip-js)  

[BWIP-JS: A Barcode Writer in Pure JavaScript](https://github.com/metafloor/bwip-js) — 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](https://bwip-js.metafloor.com/demo/demo.html) 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](https://docs.superstructjs.org/) — Designed for validating data at runtime with an annotation API inspired by TypeScript, Flow, Go and GraphQL. [GitHub repo.](https://github.com/ianstormtaylor/superstruct) 

Ian Storm Taylor   

[Software Consultants Your Team Actually Wants to Work with 🥳](https://link.testdouble.com/uf2) — 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](https://github.com/MarketingPipeline/Termino.js) — No dependencies, customizable, and you can create multiple terminal instances on a single page. [Demos.](https://marketingpipeline.github.io/Termino.js/demo) 

Marketing Pipeline   

[Fabric.js 6.0: A SVG-to-Canvas and Canvas-to-SVG Library](https://github.com/fabricjs/fabric.js) — Provides an interactive object model on top of the HTML5 canvas to make it easier to work with multiple visual elements there. [The homepage](http://fabricjs.com/) is a complete live demo. 

Fabric.js   

[Flitter: A Flutter-Like JavaScript Data Visualization Framework](https://flitter.pages.dev/) — 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](https://squirrelly.js.org/) — A modern, configurable, and fast template engine promising _“the power of Nunjucks”_ and _“the simplicity of EJS”_. There’s an [online playground](https://squirrelly.js.org/playground) if you want to see it in action. [GitHub repo.](https://github.com/squirrellyjs/squirrelly) 

Ben Gubler   

- [Hexo 7.3](https://hexo.io/news/2024/07/02/hexo-7-3-0-released/) – Popular Node.js blog framework / generator.
- [gridstack.js 10.3](https://github.com/gridstack/gridstack.js) – Build responsive interactive dashboards quickly.
- [React-PDF 9.1](https://github.com/wojtekmaj/react-pdf/releases/tag/v9.1.0) – React component to display PDFs.
- [MUI X 7.8](https://github.com/mui/mui-x/releases/tag/v7.8.0) – Popular React component suite.  

🎁 And one for fun 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/vbn7pgjaedjxfv8bhkfx.jpg)](https://sliderland.blinry.org/)  

[Sliderland: A Minimalist Coding Playground](https://sliderland.blinry.org/) — 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](https://tixy.land/) is along similar lines, but based on a 2D grid. 

blinry         

Published by [Cooperpress](https://cooperpress.com/) and edited by [Peter Cooper](https://twitter.com/cooperx86) 

'JavaScript' is a trademark of Oracle Corporation in the US
We are not endorsed by or affiliated with Oracle. 

[Change your email address](https://javascriptweekly.com/edit_subscription/*|UID|*) or [stop getting this newsletter](https://javascriptweekly.com/leave/*|UID|*). 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
