-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Rewrite the API #286
Rewrite the API #286
Conversation
…, fromBuffer, fromFile.
…, fromBuffer, fromFile.
Improve sub-type parsing of PNG, matroska & ZIP file types
Remove ID3 header starting at offset 1 fixture.
Sorted function by signature length.
Co-Authored-By: Sindre Sorhus <[email protected]>
* Fix readme usage example * Fix `extensions` and `mimeTypes` TypeScript types (#270) Co-Authored-By: Sindre Sorhus <[email protected]> * 12.4.1 * Fix `.m4b` MPEG-4 audio-book detection (#256) * 12.4.2 * Stop execution after `fileType.stream` error (#273) * Update dependency strtok3 to v5.0 Co-authored-by: Sindre Sorhus <[email protected]> Co-authored-by: Armando Magalhães <[email protected]>
# Conflicts: # index.d.ts # index.js # index.test-d.ts # readme.md
@sindresorhus can you please merge? |
Done. Thanks for all your work on this 🙌 |
Would you be interested in being added as a maintainer? No worries if not though. |
*/ | ||
readonly minimumBytes: number; | ||
/** | ||
Deprecated: The minimum amount of bytes needed to detect a file type. Currently, it's 4100 bytes, but it can change, so don't hard-code it. |
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.
You say it's deprecated here, but it's not marked as such in the readme. What's the plan here for the deprecation process?
### fileType.stream(readableStream) | ||
(async () => { | ||
const httpTokenizer = HttpTokenizer.fromUrl(audioTrackUrl, config); | ||
await httpTokenizer.init(); |
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 API is awkward. It should really just be:
const httpTokenizer = await HttpTokenizer.fromUrl(audioTrackUrl, config);
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.
Just changed the API: #287
Yes I am. Thank you for your cooperation, was a lot work on your end as well. |
Can we please release? |
Awesome! Added you to the repo now. While you have commit access to |
Yes, will do. |
Includes pull requests:
extensions
andmimeTypes
TypeScript types #270: Fixextensions
andmimeTypes
TypeScript typesfileType.stream
error #273: Stop execution afterfileType.stream
errorignore
to be completed #274: Fix waiting forignore
to be completedI don't think I can resolve merge conflicts on stream-tokenizer via a PR, I can only create a PR with resolved conflicts to the master.
To resolve conflicts stream-tokenizer the master branch needs to be merged directly onto stream-tokenizer.