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

Remove NodeFileTypeParser in favor of using FileTypeParser on all platforms #707

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

Borewit
Copy link
Collaborator

@Borewit Borewit commented Dec 18, 2024

In Node.js class FileTypeParser shall contain the Node.js specific functions (fromFile()) as well.

Why: This simplify the usage and documentation of the FileTypeParser class.

NodeFileTypeParser still works, as this is defined as alias for FileTypeParser.

@Borewit Borewit added the improvement Improvement of existing functionality label Dec 18, 2024
@Borewit Borewit self-assigned this Dec 18, 2024
@Borewit Borewit force-pushed the deprecate-class-NodeFileTypeParser branch from 8553091 to f526ce6 Compare December 18, 2024 09:47
@Borewit
Copy link
Collaborator Author

Borewit commented Dec 18, 2024

I have no problem removing NodeFileTypeParser entirely, make it obsolete, elevating this change to a breaking API change.
I don't think the class NodeFileTypeParser is very widely used.

@sindresorhus
Copy link
Owner

Just remove NodeFileTypeParser.

In Node.js class `FileTypeParser` shall contain the Node.js specific functions (`fromFile()`) as well.
@Borewit Borewit force-pushed the deprecate-class-NodeFileTypeParser branch from f526ce6 to 81a150f Compare December 18, 2024 14:32
@Borewit Borewit requested a review from sindresorhus December 18, 2024 14:34
@Borewit Borewit added the API change Major change, dependents may need to update their code label Dec 18, 2024
@Borewit Borewit changed the title Deprecate NodeFileTypeParser Replace class name NodeFileTypeParser with FileTypeParser` Dec 18, 2024
@Borewit Borewit changed the title Replace class name NodeFileTypeParser with FileTypeParser` Replace class name NodeFileTypeParser with FileTypeParser Dec 18, 2024
@sindresorhus sindresorhus changed the title Replace class name NodeFileTypeParser with FileTypeParser Remove NodeFileTypeParser in favor of using FileTypeParser on all platforms Dec 18, 2024
@sindresorhus sindresorhus merged commit ff8eed8 into main Dec 18, 2024
6 checks passed
@sindresorhus sindresorhus deleted the deprecate-class-NodeFileTypeParser branch December 18, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Major change, dependents may need to update their code improvement Improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants