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

fix: accept passing a FileHandle to createReadStream and createWriteStream #1077

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

graue
Copy link
Contributor

@graue graue commented Nov 28, 2024

Letting this option be a FileHandle aligns the API with Node.js's fs module.

(Split out from #1076 per request)

@G-Rath G-Rath changed the title fix: let fd option be FileHandle in createReadStream, createWriteStream fix: accept passing a FileHandle to createReadStream and createWriteStream Nov 28, 2024
@@ -1431,4 +1432,16 @@ describe('volume', () => {
expect(new StatWatcher(vol).vol).toBe(vol);
});
});
describe('.createWriteStream', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why you've added a test for just createWriteStream, but not createReadStream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just because they're very similar but sure I can write one for createReadStream

Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, once you've applied Prettier to the test file, we should be good to go!

@graue graue requested a review from G-Rath December 2, 2024 01:26
@G-Rath G-Rath merged commit af163dc into streamich:master Dec 2, 2024
9 of 10 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 2, 2024
## [4.14.1](v4.14.0...v4.14.1) (2024-12-02)

### Bug Fixes

* accept passing a `FileHandle` to `createReadStream` and `createWriteStream` ([#1077](#1077)) ([af163dc](af163dc))
Copy link

github-actions bot commented Dec 2, 2024

🎉 This PR is included in version 4.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@graue graue deleted the create-stream-fh-as-fd branch December 2, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants