14:22
<shu>
does anyone know of npm packages / libraries that depend on the non-standard .stack?
14:31
<Luca Casonato>
does anyone know of npm packages / libraries that depend on the non-standard .stack?
https://www.npmjs.com/package/get-caller-file
14:33
<Luca Casonato>
It also depends on v8 specific Error APIs
14:33
<nicolo-ribaudo>
Babel does some stack trace manipulation to show both plugin files and the code that originally called Babel
14:35
<Luca Casonato>
(It also uses prepareStackTrace)
14:37
<shu>
thanks luca and nicolo
14:37
<shu>
the context here is we're going to make it an accessor property instead of a data property because that's the right thing to do
14:37
<shu>
hopefully we don't break too anything but now i need to read these packages
14:38
<nicolo-ribaudo>
(we not only use .stack, but also do very bad things like relying on .prepareStackTrace)
14:38
<nicolo-ribaudo>
the context here is we're going to make it an accessor property instead of a data property because that's the right thing to do
It won't break Babel
14:38
<Luca Casonato>
Some of our enterprise customers also make use of Error.stack in various ways
14:39
<nicolo-ribaudo>
It won't break Babel
Oh actually, we do reassign .stack, so if it's only a getter it might throw on assignment
14:40
<Luca Casonato>
I’ll check with our customers whether this will break them
14:41
<shu>
so, currently it's not a real data property. it appears as one but it has C++ getter and setter
14:41
<shu>
we want to change it to an accessor property, it'll have the same getter and setter
14:41
<shu>
assignment should still work
14:41
<shu>
what'll break is stuff like getOwnPropertyDescriptor and depending on its being a data property
14:41
<shu>
I’ll check with our customers whether this will break them
thanks!
14:42
<littledan>
I like this change. I'll note that I previously changed some random Intl/Promise stuff into getters/setters when trying to deprecate them, and it didn't seem to break anything. But each case is random and different.
14:42
<shu>
yeah
15:50
<ljharb>
that's amazing, thank you - it will dramatically reduce the web reality that the stack proposal has to account for
16:02
<shu>
fingers crossed on no breakages
16:16
<Luca Casonato>
thanks!
Yeah, no breakages for the customer I was concerned about. 👍 from me
18:12
<shu>
thank you for checking