-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] babel's "loose mode" class transform enbrittles BufferList #428
Conversation
```js Object.defineProperty(Object.prototype, util.inspect.custom, { set(v) { throw 'this should not happen inside readable-stream'; } }); ``` With this change, I believe the output will use [[Define]] instead of [[Set]] for https://github.com/nodejs/node/blob/c101251a95cc82142bee4637f8db6cc360a06d82/lib/internal/streams/buffer_list.js#L167, and thus no longer fail when Object.prototype is modified.
Seems like vweevers@432d4b7 is when it first was put into loose mode, in #299, due to #293. Does readable-stream still support pre-ES5 environments? #344 implies that it does not. |
We support IE11 in readable-stream v3, while we still support pre-es5 environments in v2. This can land but not be backported. |
Can you also regenerate the code?
|
just v3 is fine; I’m mainly concerned with the version of this that’s vendored in core; that one doesn’t need to run Babel at all :-) will update the build shortly |
744c5d2
to
186503e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
cc @vweevers what do you think? |
👍 |
yay! what are the next steps to get this into core? |
I think you'll have to wait for npm to do a release, and then update core to that. Or you can force a replacement directly. |
done in npm/cli#824 and nodejs/node#31977 |
With this change, I believe the output will use [[Define]] instead of [[Set]] for https://github.com/nodejs/node/blob/c101251a95cc82142bee4637f8db6cc360a06d82/lib/internal/streams/buffer_list.js#L167, and thus no longer fail when Object.prototype is modified.