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
456 posts 493 followers 98 following
Prolific Poster
Conversation Starter
comment in response to post
In case you’re interested: Option-E on macOS.
comment in response to post
I remember the last time it was brought up it someone from npm mentioned that most developers use create-* packages to scaffold actual projects instead of doing npm init from the ground up, so changing the default of the bare minimum is not worth it vs the breakage.
comment in response to post
You can also use any “create-“ or “/create” module, such as this old one by @jddalton.bsky.social: www.npmjs.com/package/crea... “npm init esm” for that one
comment in response to post
Thanks for asking, but I don’t have anything tech-related that I’d enjoy talking about at the moment. But I’ll keep it in mind for when that changes.
comment in response to post
Interesting point. On one hand: Promise.resolve().finally(() => Promise.reject()); // OK On the other hand: function f(): void { return Promise.reject(); // Type 'Promise<never>' is not assignable to type 'void'. } Either way, I’d still find `void | Promise<void>` more descriptive.
comment in response to post
True! But the callback result should be: void | Promise<void>
comment in response to post
No, that was what I meant: To me, `void` implies “the result of the .finally()` callback will be completely ignored and will never have any effect”. @tjallingt.com’s example shows that returning a rejected Promise does have an effect.
comment in response to post
That changes the rejection value. As does throwing an exception.
comment in response to post
2/ Lesson—dependencies should always be: • Native and use Node-API: nodejs.org/api/addons.h... • WebAssembly • JavaScript
comment in response to post
3/ I created an issue to ask for guidance: github.com/nodejs/help/...
comment in response to post
2/ I don’t see a solution other than writing code that constructs a string given a command and an Array of arguments. This seems like something that Node.js should do for us(?)
comment in response to post
* Option → Result
comment in response to post
This seems topical—Cory Doctorow argues that the top-level management of big tech companies never was on the side of their employees: “The point of AI isn't to make workers more productive, it's to make them weaker when they bargain with their bosses.” pluralistic.net/2025/04/27/s...
comment in response to post
Pipeline operator?
comment in response to post
2/ Upside of "src": • Same distance up to package dir (can import package.json via a relative path) Upsides of ".": • Can have a separate dir test/ for integration tests, next to src/ • [Not that important] Slightly easier to go from src/test.ts to dist/src/test.js when running transpiled tests.
comment in response to post
Excellent! If you wanted to, you could even add a feed (easiest would be JSON Feed; or Atom; or RSS) for these pages.
comment in response to post
There is an interesting effect
comment in response to post
3/ Alas: • Currently only supported by Safari: caniuse.com/jpegxl • Ignored in Interop 2024: www.theregister.com/2024/02/03/j...