Skip to content

Conversation

@rvagg
Copy link
Contributor

@rvagg rvagg commented Dec 2, 2025

Closes #2624
Closes #2626

An alternative to #2626 that's a little more explicit and targets the Node.js v25 behaviour.

And re this comment in that thread:

Node.js v25 is an experimental version by design

This is not true, it's intended to be stable and perfectly usable and is supposed to be a good target for developers to use. Just not recommended for production deployments where stability is key.

Like a lot of devs, I use current and lts/* as targets in my GitHub actions, so this started coming up as a failure for us pretty quickly.

@kettanaito kettanaito changed the title fix: handle incomplete localStorage in Node.js v25 fix: handle incomplete localStorage in Node.js v25 Dec 3, 2025
Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kettanaito
Copy link
Member

Just not recommended for production deployments where stability is key.

It's not recommended for the same reason I stated it was experimental. Odd versions move faster, break more, and, as a result, gather more bugs to tackle before the next even release. That is why they are not recommended and why you are unlikely to find tooling that claims their support.

But based on the discussion around, as weird as it is, it seems that Node.js will keep that way of treating web storages so libraries would have to dance around it. It's needless but an extra seems fine.

@kettanaito kettanaito merged commit 3da2c76 into mswjs:main Dec 3, 2025
18 checks passed
@kettanaito
Copy link
Member

Released: v2.12.4 🎉

This has been released in v2.12.4.

Get these changes by running the following command:

npm i msw@latest

Predictable release automation by Release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node.js 25: localStorage.getItem is not a function in MSW

2 participants