Profile avatar
dr-axel.de
• JavaScript, TypeScript, web development • Blog: https://2ality.com My main account is on Mastodon (you can follow via RSS): https://fosstodon.org/@rauschma
455 posts 493 followers 98 following
Prolific Poster
Conversation Starter

I've been working on this for the past few months, and excited to finally share! A new web-component library from Shopify that allows you to easily add Shopify to any site. webcomponents.shopify.dev

Instead of inferring bundler entry points from `package.json` exports, why not let your bundler generate them for you? With tsdown, you write less boilerplate and always have correct exports—even no publint needed! 🔗 tsdown.dev/options/pack...

“The pipe operator is coming to PHP 8.5” www.amitmerchant.com/the-pipe-ope... (via @frontenddogma.com) Still high on my wish list for JavaScript: 2ality.com/2022/01/pipe...

Nice to see our newsletter “ECMAScript News” being mentioned in State of JS 2024: It wasn’t even part of the official list, but people wrote it in. It’s also here on Bluesky: @ecmascript.news 2024.stateofjs.com/en-US/resour...

JavaScript trick—RegExp with insignificant whitespace and comments: const cmt = () => ''; const RE = new RegExp( String.raw` a+ ${cmt`one or more as`} `.replaceAll(/\s+/g, ''), 'v' ); assert.equal( String(RE), '/a+/v' );

Node.js—I just learned that there is: npm init --init-type=module --yes But it doesn’t help much. I’ll probably continue to use `npm init` without that flag and change "commonjs" to "module" manually. It feels like npm could switch to "module" as the default now.

I wonder what's the history behind noreply@ emails, especially for order confirmations. How did they come to be and become so widespread? Who thought it's a user-friendly approach? Is it really that hard to hook up an email to whatever customer support system you use?

I'm learning Wasm is an abbreviation of WebAssembly, but not an acronym*, so there's no need to SHOUT. And WebAssembly has no space. I think they've done this on purpose to bait pedantry. *don't you dare

The first official node.js migration: correcting legacy typescript imports to standard imports to run in node without jiggery-pokery codemod.com/registry/nod...

#TypeScript: I don’t think this type for .finally() is correct—returning a rejected Promise from `onfinally` does have an effect: interface Promise<T> { finally(onfinally?: (() => void) | undefined | null): Promise<T>; }

1/ Node.js: One of my CLI apps has a dependency with a native module and that makes upgrading to a new Node.js version painful: • Each major Node.js version requires a different binary format version. • To make matters worse, the dependency often isn’t updated for months.

Styling console text in Node.js 2ality.com/2025/05/ansi... #NodeJS #JavaScript #2ality

One of the coolest things is seeing how the upcoming Temporal API works seamlessly with Intl.DurationFormat. I didn't mention it in the episode but it's in the example snippet repo 👌

1/ New Node.js warning (child_process.spawnSync): “DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.”

#TypeScript – use case for testing types (*): import type { Assert, Includes } from 'asserttt'; type Config = {url: string}; const prop_url = 'url'; // Compile-time check: Is `prop_url` really a prop key? type _ = Assert<Includes<keyof Config, typeof prop_url>>; (*) exploringjs.com/ts/book/ch_t...

I finally managed to publish a TypeScript version of the Babel monorepo to @jsr.io (jsr.io/@babel-test-...), use it to build Babel itself, and... it works :) If their docs generator becomes good enough it might make sense for us to just switch to it as our primary docs source.

Every now and then I write a shell script with a server that serves auto-reloading HTML pages. Maybe that’s something that could be built into terminals: You’d simply pipe HTML somewhere and it would be rendered in the window (e.g. its top half).

I don’t understand why exceptions are so widely disliked: • Rust’s Option is nice for handling errors we want to take care of immediately. • However, there are also many cases where going up the call stack is a feature, not a bug—e.g.: exploringjs.com/js/book/ch_e... Has anyone written about this?

#Git tip: git config --global core.pager "less -FR" -F: Only use a pager when the output is longer than one terminal screen. -C: Display color; don’t filter it out.

The latest Google and Microsoft layoffs make no sense to me. I hope we’ll have more co-ops in the future where decisions aren’t driven by fads.

Rendering HTML to a terminal via #JavaScript: echo '<ul><li>One</li><li>Two</li></ul>' | npx cli-html github.com/grigorii-hor...

Rendering HTML to a terminal via #JavaScript: echo '<ul><li>One</li><li>Two</li></ul>' | npx cli-html github.com/grigorii-hor...

Over the weekend, I wrote an overview of Biome's type architecture, including our motivation and a discussion of the constraints that led to this architecture: https://arendjr.nl/blog/2025/05/biome-type-architecture/ Reply to this post to comment! #OpenSource #WebDev #Tooling #JavaScript […]

1/ tsconfig.json—two alternatives: • "rootDir": "." = proj/src/lib.ts → proj/dist/src/lib.js • "rootDir": "src" = proj/src/lib.ts → proj/dist/lib.js

Fuck off Notion - ‘this shitty feature you didn’t want was $8 per month but is ‘free’ now! Btw also we’re increasing your monthly rate by $6’

For years, one of the most befuddling things for me in CSS was how “height: 100%” would sometimes just not work. Every time I tried to use it was a roll of the dice. 😅 Like everything else in CSS, though, it all makes perfect sense when we understand the underlying mechanism. ✨ Let’s explore. 🧵

#TypeScript – typing the result of `yield`: function* gen(): Generator<void, void, string> { const value = yield; // string console.log(value); }; const genObj = gen(); genObj.next('Hello'); // OK genObj.next(123); // error

#iPhone: I just now noticed that there is an “Options” menu if you share a link in Safari—with the following entries: • Automatic • PDF • Reader PDF • Web Archive

We are planning to port this to Rust as well in the future. Meaning you'll be able to build both your JS bundle and bundled dts files in one go with @rolldown.rs when you use isolated declarations!

Stringification of a function in JavaScript really does return a fragment of the source code (but the trailing comma is excluded): > ({'twice'(x) { return x + x /*times two*/},})['twice'].toString() "'twice'(x) { return x + x /*times two*/}"

Great feature of Markdown: Pasting is always without formatting.

I think this movie is a musical.