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

refactor: switch MimeTypes to MimeType and use IANA media types #603

Merged
merged 2 commits into from
Aug 18, 2024

Conversation

kyranet
Copy link
Member

@kyranet kyranet commented Aug 16, 2024

This PR also comes with a workflow to automatically update the MimeType type automatically every week.

🔥 BREAKING CHANGE: MimeTypes has been removed in favor of the MimeType string union type consists of all IANA media types

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 15.62500% with 27 lines in your changes missing coverage. Please review.

Project coverage is 19.08%. Comparing base (280d498) to head (a8b2b1f).

Files Patch % Lines
packages/api/scripts/sync-mime-types.mts 5.00% 19 Missing ⚠️
packages/api/src/lib/structures/api/ApiResponse.ts 40.00% 3 Missing ⚠️
packages/api/src/lib/structures/MediaParser.ts 0.00% 1 Missing ⚠️
packages/api/src/lib/utils/MimeType.ts 0.00% 1 Missing ⚠️
.../api/src/mediaParsers/applicationFormUrlEncoded.ts 50.00% 1 Missing ⚠️
packages/api/src/mediaParsers/applicationJson.ts 0.00% 1 Missing ⚠️
packages/api/src/mediaParsers/textPlain.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
- Coverage   19.58%   19.08%   -0.51%     
==========================================
  Files         127      128       +1     
  Lines        4033     4029       -4     
  Branches      173      174       +1     
==========================================
- Hits          790      769      -21     
- Misses       3242     3259      +17     
  Partials        1        1              
Flag Coverage Δ
18 19.08% <15.62%> (-0.51%) ⬇️
19 19.08% <15.62%> (-0.51%) ⬇️
20 19.08% <15.62%> (-0.51%) ⬇️
21 19.08% <15.62%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

packages/api/scripts/sync-mime-types.mts Outdated Show resolved Hide resolved
packages/api/package.json Outdated Show resolved Hide resolved
.github/workflows/auto-updater.yml Outdated Show resolved Hide resolved
Copy link
Member

@favna favna left a comment

Choose a reason for hiding this comment

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

wrong button

@kyranet kyranet force-pushed the refactor/switch-to-iana-mime-types branch from 011a678 to 78ec4a1 Compare August 16, 2024 17:37
@kyranet kyranet requested a review from favna August 16, 2024 17:37
favna
favna previously approved these changes Aug 16, 2024
@kyranet kyranet force-pushed the refactor/switch-to-iana-mime-types branch from 78ec4a1 to a8b2b1f Compare August 16, 2024 18:35
@kyranet kyranet requested review from favna and vladfrangu August 16, 2024 18:36
@favna favna force-pushed the refactor/switch-to-iana-mime-types branch from a8b2b1f to 79f8881 Compare August 18, 2024 10:31
.github/workflows/auto-updater.yml Outdated Show resolved Hide resolved
BREAKING CHANGE: `MimeTypes` has been removed in favor of the `MimeType` string union type consists of all IANA media types
@favna favna force-pushed the refactor/switch-to-iana-mime-types branch from 79f8881 to 11b7c1a Compare August 18, 2024 10:34
Co-authored-by: Jeroen Claassens <support@favware.tech>
Copy link

@kyranet kyranet requested a review from favna August 18, 2024 10:49
@kyranet kyranet merged commit 834b446 into main Aug 18, 2024
8 checks passed
@kyranet kyranet deleted the refactor/switch-to-iana-mime-types branch August 18, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants