Skip to content
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

fs: allow passing true to emitClose option #29212

Closed
wants to merge 4 commits into from

Conversation

@gntem
Copy link
Contributor

commented Aug 19, 2019

Allow passing true for emitClose option for fs streams.

Fixes: #29177

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: #29177
@cjihrig
Copy link
Contributor

left a comment

Can you add tests and some sort of documentation.

@addaleax
Copy link
Member

left a comment

LGTM but I’d also really prefer to have a test for this.

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

I added tests. PTAL.

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

I've also added documentation.

@Trott Trott requested review from jasnell, addaleax and cjihrig Aug 22, 2019

@nodejs-github-bot

This comment has been minimized.

@gntem

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

Thanks a lot @Trott

I tried adding tests for this but the close event was emitted twice even when autoClose: false -- but then again I didn't see a condition for emitClose somewhere in the code.

doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved

@Trott Trott added the author ready label Aug 23, 2019

@nodejs-github-bot

This comment has been minimized.

@Trott Trott added the semver-minor label Aug 23, 2019

@Trott

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

Landed in ceace1f...47ff44e

@Trott Trott closed this Aug 23, 2019

Trott added a commit that referenced this pull request Aug 23, 2019
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: #29177

PR-URL: #29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Trott added a commit that referenced this pull request Aug 23, 2019
test: add `emitClose: true` tests for fs streams
PR-URL: #29212
Fixes: #29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Trott added a commit that referenced this pull request Aug 23, 2019
doc: add emitClose option for fs streams
PR-URL: #29212
Fixes: #29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2019
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: nodejs#29177

PR-URL: nodejs#29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2019
test: add `emitClose: true` tests for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2019
doc: add emitClose option for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR added a commit that referenced this pull request Sep 3, 2019
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: #29177

PR-URL: #29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR added a commit that referenced this pull request Sep 3, 2019
test: add `emitClose: true` tests for fs streams
PR-URL: #29212
Fixes: #29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR added a commit that referenced this pull request Sep 3, 2019
doc: add emitClose option for fs streams
PR-URL: #29212
Fixes: #29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BridgeAR BridgeAR referenced this pull request Sep 3, 2019
BridgeAR added a commit that referenced this pull request Sep 3, 2019
2019-09-04, Version 12.10.0 (Current)
Notable changes:

* deps:
  * Update npm to 6.10.3 (isaacs)
    #29023
* fs:
  * Add recursive option to rmdir() (cjihrig)
    #29168
  * Allow passing true to emitClose option (Giorgos Ntemiris)
    #29212
  * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung)
    #21387
* net:
  * Allow reading data into a static buffer (Brian White)
    #25436

PR-URL: #29429
BridgeAR added a commit that referenced this pull request Sep 4, 2019
2019-09-04, Version 12.10.0 (Current)
Notable changes:

* deps:
  * Update npm to 6.10.3 (isaacs)
    #29023
* fs:
  * Add recursive option to rmdir() (cjihrig)
    #29168
  * Allow passing true to emitClose option (Giorgos Ntemiris)
    #29212
  * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung)
    #21387
* net:
  * Allow reading data into a static buffer (Brian White)
    #25436

PR-URL: #29429
BridgeAR added a commit that referenced this pull request Sep 4, 2019
2019-09-04, Version 12.10.0 (Current)
Notable changes:

* deps:
  * Update npm to 6.10.3 (isaacs)
    #29023
* fs:
  * Add recursive option to rmdir() (cjihrig)
    #29168
  * Allow passing true to emitClose option (Giorgos Ntemiris)
    #29212
  * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung)
    #21387
* net:
  * Allow reading data into a static buffer (Brian White)
    #25436

PR-URL: #29429
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: nodejs#29177

PR-URL: nodejs#29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
test: add `emitClose: true` tests for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
doc: add emitClose option for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
2019-09-04, Version 12.10.0 (Current)
Notable changes:

* deps:
  * Update npm to 6.10.3 (isaacs)
    nodejs#29023
* fs:
  * Add recursive option to rmdir() (cjihrig)
    nodejs#29168
  * Allow passing true to emitClose option (Giorgos Ntemiris)
    nodejs#29212
  * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung)
    nodejs#21387
* net:
  * Allow reading data into a static buffer (Brian White)
    nodejs#25436

PR-URL: nodejs#29429
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
fs: allow passing true to emitClose option
Allow passing true for emitClose option for fs
streams.

Fixes: nodejs#29177

PR-URL: nodejs#29212
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
test: add `emitClose: true` tests for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
doc: add emitClose option for fs streams
PR-URL: nodejs#29212
Fixes: nodejs#29177
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
2019-09-04, Version 12.10.0 (Current)
Notable changes:

* deps:
  * Update npm to 6.10.3 (isaacs)
    nodejs#29023
* fs:
  * Add recursive option to rmdir() (cjihrig)
    nodejs#29168
  * Allow passing true to emitClose option (Giorgos Ntemiris)
    nodejs#29212
  * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung)
    nodejs#21387
* net:
  * Allow reading data into a static buffer (Brian White)
    nodejs#25436

PR-URL: nodejs#29429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.