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

Rewrite the API #286

Merged
merged 24 commits into from
Jan 4, 2020
Merged

Rewrite the API #286

merged 24 commits into from
Jan 4, 2020

Conversation

Borewit
Copy link
Collaborator

@Borewit Borewit commented Jan 2, 2020

Includes pull requests:

I 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.

sindresorhus and others added 24 commits December 20, 2019 14:11
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 <sindresorhus@gmail.com>
* Fix readme usage example

* Fix `extensions` and `mimeTypes` TypeScript types (#270)

Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>

* 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 <sindresorhus@gmail.com>
Co-authored-by: Armando Magalhães <armando.mag95@gmail.com>
# Conflicts:
#	index.d.ts
#	index.js
#	index.test-d.ts
#	readme.md
@Borewit
Copy link
Collaborator Author

Borewit commented Jan 4, 2020

@sindresorhus can you please merge?
I got a few days left to support the transition if required.

@sindresorhus sindresorhus changed the title Fixed merged conflicts Rewrite the API Jan 4, 2020
@sindresorhus sindresorhus merged commit 8f981c3 into sindresorhus:master Jan 4, 2020
@sindresorhus
Copy link
Owner

Done. Thanks for all your work on this 🙌

@sindresorhus
Copy link
Owner

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.
Copy link
Owner

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();
Copy link
Owner

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);

Copy link
Collaborator Author

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

sindresorhus added a commit that referenced this pull request Jan 4, 2020
@Borewit
Copy link
Collaborator Author

Borewit commented Jan 4, 2020

Would you be interested in being added as a maintainer?

Yes I am. Thank you for your cooperation, was a lot work on your end as well.

@Borewit
Copy link
Collaborator Author

Borewit commented Jan 6, 2020

Can we please release?

@sindresorhus
Copy link
Owner

Yes I am.

Awesome! Added you to the repo now. While you have commit access to master, it's usually best to do PRs. It never hurts to have another set eye look at changes.

@sindresorhus
Copy link
Owner

Can we please release?

Yes, will do.

@sindresorhus
Copy link
Owner

It's out: https://github.com/sindresorhus/file-type/releases/tag/v13.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants