News for hackers. Stuff that matters.
Re:JavaScript Structs by Zanfa on Friday October 11, 2024 @02:37AM (#41806853)
And ESM vs CJS. What should be an inconsequential transition, has turned into a minefield where adding a dependency to your package.json might blow up your build system, testing library or application without warning. Literally wasted weeks of my life debugging this pile of poop that is the JS ecosystem.
Re:JavaScript Structs by devjab on Friday October 11, 2024 @03:17AM (#41807098)
Is this really a JS or a Node issue though? We have no such issues with Bun.
Re:JavaScript Structs by Zanfa on Friday October 11, 2024 @06:41AM (#41808245)
I guess technically Node, but in practice JS, since Node is still the de facto standard non-browser JS runtime. "Just use X" where X is some other build tool/runtime/testing ecosystem is another weird trope that's somehow considered acceptable advice in JS, but would be a massive undertaking for any non-trivial project.
Re:JavaScript Structs by devjab on Saturday October 12, 2024 @12:08PM (#41820137)
Maybe if someone suggests Deno or similar, but Bun is a drop in for Node and is as such completely interoperable with your Node code. Its similar to how you can adopt PNPM easily because it’s a drop in for NPM, where as yarn and others are their own things.