How Node.js v22.5.0 Broke (Almost) Every Package

preview_player
Показать описание
The latest Node release had a well-intended change...that happened to break a lot of things. I thought it would be fun to break down WHAT changed and WHY it broke so much stuff.

SOURCES

S/O Ph4se0n3 for the awesome edit 🙏
Рекомендации по теме
Комментарии
Автор

imagine a large company pushing a change bringing down the internet

froozynoobfan
Автор

But at least they didn't force-push the change to all NodeJS users worldwide simultaneously.

andrew_ray
Автор

A bug not making it through code review is unfortunate, but a big not getting caught in CI is the real problem.

ymi_yugy
Автор

Dude this got me last week.
I thought I was going crazy

ProgrammingWIthRiley
Автор

I migrated an app from node 5.7.0 a few years ago. I'm just happy the version is just in the double-digits at my company.

happykill
Автор

this highlights the tension between dry and maintainability that can exist

shadeblackwolf
Автор

I learned something else from this video. I like the pattern of setting the CB wit ha default call back and checking for that vs checking for undefined for a n option param. Seems like a way better pattern!

JTWebMan
Автор

Instead of the LTS version we agreed on, the guy who configured the deployments for one of our projects just pulled node:latest. Was a very fun morning when we realized all deployments since the night before had failed.

daylen
Автор

If you deploy to prod the latest version of anything 5 minutes after it releases, you don't have the right to complain your app broke because of it.

Niksorus
Автор

If you doing professional stuff always stay in LTS

aquual
Автор

Do they not have any integration tests? How the hell did they not catch this before releasing it?

Zullfix
Автор

I was on 16 LTS until it was deprecated lol

vinialves
Автор

Good video.
This was a good lesson for people. Always test before you push to the whole grid. Never be the first idiot testing the newest version in production (unless it is a serious vulnerability change). Even then backup and test on a 3 or more computers. This is the reason I run freebsd, debian, mac, and microsoft. Test.

complexity
Автор

Maybe they don't do code reviews the way I thought. I was taught, you check out the change, and then you look at what was changed. If you do that an IDE can find all the places something might be called, but somehow they still missed it?

Veretax
Автор

I wonder if this is what got me… npm install suddenly wasn’t populating `node_modules/bin` in a docker image that I thought was on a fixed version of node…

xinaesthetic
Автор

Even an informatics student in 2nd semester would probably understand that calling close(..) in a method closeSync(..) would be a big NoNo. I wonder why there was noone screaming out loud before this piece of code (in fs.js) had its initial release.

BLckViPR
Автор

Question is where are the automated tests as part of the build/release process...

dand
Автор

Would have been pretty nice with some tests for this, no? 😋

KarlOlofsson
Автор

Sounds like their CI system could use some integration or canary testing. Still, like you I am surprised that the code was the same at the C++ level.

I also am not aware of any tools that would help a developer catch this, or even alert the developer to the possibility.

markeggers
Автор

The longer I use JS, the less I like destructuring. If I can avoid destructuring in a clean way, I always will.

LoveLearnShareGrow