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

Prevent End-Of-Stream error in stream() #468

Merged
merged 2 commits into from Jul 22, 2021

Conversation

Borewit
Copy link
Collaborator

@Borewit Borewit commented Jul 20, 2021

Suppress the End-Of-Stream, instead assign undefined to stream.fileType.
Restrict updating strtok3 to minor version.

Fixes:

Suppress the End-Of-Stream, instead assign `undefined` to `stream.fileType`.

Fix: #467
@Borewit Borewit added the bug label Jul 20, 2021
@Borewit Borewit self-assigned this Jul 20, 2021
@Borewit Borewit force-pushed the issue-467-prevent-End-Of-Stream-error branch from 7c2f32a to 88e5884 Compare July 20, 2021 09:49
@Borewit Borewit linked an issue Jul 20, 2021 that may be closed by this pull request
@Borewit Borewit force-pushed the issue-467-prevent-End-Of-Stream-error branch from 88e5884 to 0219e87 Compare July 20, 2021 12:29
@sindresorhus sindresorhus merged commit 67c8fcb into main Jul 22, 2021
@sindresorhus sindresorhus deleted the issue-467-prevent-End-Of-Stream-error branch July 22, 2021 11:12
@sindresorhus
Copy link
Owner

@Borewit Are you ok with us moving file-type to ESM?

That would require Node.js 12, but would further improve browser usage.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@Borewit
Copy link
Collaborator Author

Borewit commented Jul 22, 2021

@Borewit Are you ok with us moving file-type to ESM?

That would require Node.js 12, but would further improve browser usage.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

I need to get my head around the ESM modules. As you know I have been working on this Buffer abstraction and UInt8Array, requiring Node v10. I would like to fully finalize that effort, and shake out any issue if required, before refactoring any further.
Involves:

But it sounds good to me, I looking forward to the day these modules are equally easy to use in Node.js and browser environment.
Life is too short to deal with over-complicated things.

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.

Updated dependency strtok3 v6.2 will break file-type stream() may throw End-Of-Stream error
2 participants