-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http2: use getter replace use directly _witableState.finished #28007
Conversation
It's worth noting that Duplex already has some getters for _writableState. Does this need to be moved to writable.prototype? I'm also looking for a way to proxy all _writableState properties at once, without losing readability and conciseness. |
They are also on Lines 42 to 46 in 187b056
non enumerable properties are skipped, so we have to redefine them. |
@zero1five I think this PR should be split in two logical changes/commits:
What do you think? |
@lpinca Ok, I feel good. i will update this PR later to update this section with relevant tests. And then see what else is being used. (a little curiosity 🗿, why does Duplex prototype set skip non enumerable properties?) |
@zero1five I'm not sure, I think that with a little care we can use |
868f2f1
to
6ce51da
Compare
Hmmm...🏊♂️ i made some changes to add getter with relevant tests for Duplex and Writable.
Because this PR is mainly to modify http2, so other changes should be modified in the new PR. |
LGTM but can you please move the http2 change to a separate commit? Thank you. |
6ce51da
to
cdb22c4
Compare
@lpinca 👌 |
LGTM |
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.
This needs some documentation. Otherwise it's LGTM.
d54a111
to
de53445
Compare
@BridgeAR Added the doc, PTAL. |
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.
Good work! I’ve just added a nit on the doc!
f1d35d4
to
12622a5
Compare
Can someone please trigger a CI build? |
284f714
to
2c66f6c
Compare
Windows re-build: https://ci.nodejs.org/job/node-test-commit-windows-fanned/28330/ |
Landed in 2bb93e1...f11a4ec |
add a new getter to duplex stream to replace the property `this .writableState.finished` of the object that inherited duplex. Refs: nodejs#445 PR-URL: nodejs#28007 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#28007 Refs: nodejs#445 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Node 12.4.0 has already been released. Replace the version with REPLACEME so that the proper version gets inserted at release time. Refs: nodejs#28007
Node 12.4.0 has already been released. Replace the version with REPLACEME so that the proper version gets inserted at release time. PR-URL: #28431 Refs: #28007 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
add a new getter to duplex stream to replace the property `this .writableState.finished` of the object that inherited duplex. Refs: #445 PR-URL: #28007 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28007 Refs: #445 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Node 12.4.0 has already been released. Replace the version with REPLACEME so that the proper version gets inserted at release time. PR-URL: #28431 Refs: #28007 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Notable changes: * build: * Experimental support for building Node.js on MIPS architecture is back. #27992 * child_process: * The promisified versions of `child_process.exec` and `child_process.execFile` now both return a `Promise` which has the child instance attached to their `child` property. #28325 * deps: * Updated libuv to 1.30.0. #28449 * Support for the Haiku platform has been added. * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to 1024. * `uv_fs_copyfile()` now works properly when the source and destination files are the same. * process: * A new method, `process.resourceUsage()` was added. It returns resource usage for the current process, such as CPU time. #28018 * src: * Fixed an issue related to stdio that could lead to a crash of the process in some circumstances. #28490 * stream: * Added a `writableFinished` property to writable streams. It indicates that all the data has been flushed to the underlying system. #28007 * worker: * Fixed an issue that prevented worker threads to listen for data on stdin. #28153 PR-URL: #28508
Notable changes: * build: * Experimental support for building Node.js on MIPS architecture is back. #27992 * child_process: * The promisified versions of `child_process.exec` and `child_process.execFile` now both return a `Promise` which has the child instance attached to their `child` property. #28325 * deps: * Updated libuv to 1.30.0. #28449 * Support for the Haiku platform has been added. * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to 1024. * `uv_fs_copyfile()` now works properly when the source and destination files are the same. * process: * A new method, `process.resourceUsage()` was added. It returns resource usage for the current process, such as CPU time. #28018 * src: * Fixed an issue related to stdio that could lead to a crash of the process in some circumstances. #28490 * stream: * Added a `writableFinished` property to writable streams. It indicates that all the data has been flushed to the underlying system. #28007 * worker: * Fixed an issue that prevented worker threads to listen for data on stdin. #28153 * meta: * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators. #28322 PR-URL: #28508
Notable changes: * build: * Experimental support for building Node.js on MIPS architecture is back. #27992 * child_process: * The promisified versions of `child_process.exec` and `child_process.execFile` now both return a `Promise` which has the child instance attached to their `child` property. #28325 * deps: * Updated libuv to 1.30.1. #28449, #28511 * Support for the Haiku platform has been added. * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to 1024. * `uv_fs_copyfile()` now works properly when the source and destination files are the same. * process: * A new method, `process.resourceUsage()` was added. It returns resource usage for the current process, such as CPU time. #28018 * src: * Fixed an issue related to stdio that could lead to a crash of the process in some circumstances. #28490 * stream: * Added a `writableFinished` property to writable streams. It indicates that all the data has been flushed to the underlying system. #28007 * worker: * Fixed an issue that prevented worker threads to listen for data on stdin. #28153 * meta: * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators. #28322 PR-URL: #28508
Notable changes: * build: * Experimental support for building Node.js on MIPS architecture is back. #27992 * child_process: * The promisified versions of `child_process.exec` and `child_process.execFile` now both return a `Promise` which has the child instance attached to their `child` property. #28325 * deps: * Updated libuv to 1.30.1. #28449, #28511 * Support for the Haiku platform has been added. * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to 1024. * `uv_fs_copyfile()` now works properly when the source and destination files are the same. * process: * A new method, `process.resourceUsage()` was added. It returns resource usage for the current process, such as CPU time. #28018 * src: * Fixed an issue related to stdio that could lead to a crash of the process in some circumstances. #28490 * stream: * Added a `writableFinished` property to writable streams. It indicates that all the data has been flushed to the underlying system. #28007 * worker: * Fixed an issue that prevented worker threads to listen for data on stdin. #28153 * meta: * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators. #28322 PR-URL: #28508
@nodejs/http2, should this land on v10.x? Please add the 'lts-watch' label if so |
@BethGriggs yes please, I've added the tag. |
add a new getter to duplex stream to replace the property
this .writableState.finished
of the object that inherited duplex.Refs: #445
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes