CommonJS, we love you, we love you not..

July 6, 2023 By Mark Otto Off

What’s Next for JavaScript: New Features to Look Forward to โ€” A reassuring and high level look at just what goes into making JavaScript better over time, along with some of the new things about to appear or still making their way through the arduous TC39 process.

Mary Branscombe (The New Stack)

Mary has followed up this piece with Beyond Browsers: The Longterm Future of JavaScript Standards which goes into more depth on JavaScript’s ongoing developments in the world of servers and edge functions.

A Brief Primer to Engineering Efficiency โ€” Software teams are dealing with many changes and budget cuts, yet still have the same delivery expectations. So, how do you keep up? ๐Ÿค” The answer: invest in efficiency. Get ahead of the game with this brief on engineering efficiency.

Sleuth

‘CommonJS is Hurting JavaScript’ โ€” An interesting take on Nodeโ€™s default module system, its history, its shortcomings, and the trickiness of managing both CommonJS and ES modules at once. It’s perhaps no surprise the folks at Deno would like to see CommonJS disappear, but…

Andy Jiang (Deno)

.. the Bun team, on the other hand, say au contraire and tell us CommonJS is not going away! They explain CommonJS’s plus points and why Bun is adding support for it.

RELEASES:

  • TypeScript 5.2 Beta โ€“ Just a month after the final release of 5.1, too. using is the headline feature and the release post goes into fantastic detail.

  • Node.js v20.4.0 (Current) โ€“ Node gains an interesting new ‘mock timers’ feature for writing more reliable and deterministic tests for time-dependent functionality.

  • Vite 4.4 โ€“ The frontend toolkit updates to esbuild 0.18, adds experimental Lightning CSS support, and there are new starter templates for Solid and Qwik users.

  • Billboard.js 3.9 โ€“ A popular D3-based chart library. (Demos.)

  • Deno 1.35 โ€“ The alternative JS runtime makes Deno.serve() (its Web server API) stable, and improves npm and Node compatibility.

  • Bun 0.6.13

โšก๏ธ IN BRIEF:

๐Ÿ“’ Articles & Tutorials

In Defence of DOMContentLoaded โ€” A solid explainer on measuring browser events and the use cases for DOMContentLoaded (and related events) in particular. “The DOMContentLoaded event fires once all of your deferred JavaScript has finished running.”

Harry Roberts

Breaking Up with SVG-in-JS in 2023 โ€” โ€œSVGs in JS have a cost and SVGs do not belong into your JS bundle.โ€ A look into why you shouldnโ€™t have SVGs in your JS bundle and better techniques for using them from JSX.

Jacob GroรŸ

JavaScript Gom Jabbar โ€” In the Dune universe, a โ€œgom jabbarโ€ is a poisonous needle used in an eponymous test where people are subjected to intense pain. Somehow this is turned into a metaphor for painful JavaScript experiences.. ๐Ÿ˜

Alex Kotliarskyi

๐Ÿ“… That ‘year old’ thing is an interesting idea. We should introduce a section where we look back at things from a year ago and if they’re still going.. ๐Ÿ˜…

๐Ÿ›  Code & Tools

Starlight: A Documentation Site Builder from Astro โ€” React has Docusaurus, now Astro has Starlight. Being Astro, itโ€™s framework agnostic and you can extend it with React, Vue, Svelte, Solid, etc. You get site navigation, search, internationalization, code highlighting, dark mode, and more out of the box. GitHub repo.

Starlight

rrule.js: Work with Recurrence Rules for Calendar Dates โ€” iCalendar is a data format for representing calendars and schedules, and RRULE is its way to define recurring events. rrule.js allows you to work with such rules, and has an amazing โ€˜playgroundโ€™ style homepage to show it off.

Jakub Roztocil

Find JavaScript Jobs with Hired โ€” Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.
Hired

๐Ÿง‘โ€๐Ÿ’ป Got a job listing to share? Here’s how.

๐ŸŽ And one for luck..