Uh oh!
There was an error while loading. Please reload this page.
writeable stream: group all properties - #31187
Conversation
52819a8 to
88f20ecCompareUh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jan 5, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I think ObjectDefineProperties defaults enumerable to false, so I don't think these are needed? I'm not sure I understand the above comment about making it explicit? @BridgeAR any idea who is the original author of this comment?
There was a problem hiding this comment.
@ronag: That's a good point. I guess we no need to add these properties. For example, I tested the below code and by default the enumerable property is false:
const a = {}
Object.defineProperties(a, { test: { get() { return 'test'} } })
a.test // test
a.propertyIsEnumerable('test') // false
Edit: Guess you have wrongly pinged instead of me :)
There was a problem hiding this comment.
Seems like that was Calvin. Some people prefer explicit descriptor properties. Probably because not everyone is handling descriptors frequently and knows that their defaults are all false. It should be fine either way.
There was a problem hiding this comment.
As this also came up in #31287 (comment):
I think it’s better to be explicit here, regardless of what people may know about the default values; partly because it removes cognitive overhead of figuring out what the behaviour is, partly because making it explicit forces code authors to be deliberate about the values they choose.
Uh oh!
There was an error while loading. Please reload this page.
88f20ec to
ad4b942CompareUh oh!
There was an error while loading. Please reload this page.
antsmartian
commented
Jan 5, 2020
@ronag Done. @lpinca: Removed enumerable definition as mentioned here: #31187 (comment) Could you PTAL again? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM with the comments addressed.
Trott
left a comment
There was a problem hiding this comment.
Pile-on "LGTM with nits addressed"
BridgeAR
commented
Jan 11, 2020
Ping @antsmartian |
Sorry for delay, taken care the comments.. cc @BridgeAR @nodejs/streams |
nodejs-github-bot
commented
Jan 13, 2020
Uh oh!
There was an error while loading. Please reload this page.
addaleax
commented
Feb 7, 2020
@antsmartian Can you sqaush the commits here together? CI detects a merge conflict in one of the earlier ones that is then resolved later, but it still fails to rebase because of that. (Also happy to do that for you if you prefer.) |
Another property |
2f226c8 to
5494213Compare5494213 to
36c6219Comparenodejs-github-bot
commented
Feb 10, 2020
@addaleax PTAL.. This should be fine now. |
addaleax
commented
Feb 10, 2020
Landed in 0ac04ec 🙂 |
PR-URL: #31187 Refs: #31144 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins
commented
Mar 9, 2020
Hey All, this doesn't land cleanly on v13.x should there be a backport? |
mcollina
commented
Mar 9, 2020
A backport will be good to have to avoid future conflicts. |
PR-URL: nodejs#31187 Refs: nodejs#31144 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Backport-PR-URL: nodejs#32164
Backport-PR-URL: #32164 PR-URL: #31187 Refs: #31144 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Backport-PR-URL: #32164 PR-URL: #31187 Refs: #31144 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refs: #31144 for writable streams.
cc @nodejs/streams
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes