Skip to content

refactor(system): replace mime db with common dataset #1788

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

Merged
merged 13 commits into from
Jan 29, 2023

Conversation

xDivisionByZerox
Copy link
Member

Remove most mime-type definitions to only support common ones based on the MDN Web Docs.
A section regarding this change was documented in the "upgrade" section of the user guides.
Furthermore, remove all other properties other than extensions for a specific mime type since that's the only thing that is used.

Unique mime types before: 2279
Unique mime types now: 72

Closes #1317.

@xDivisionByZerox xDivisionByZerox added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug c: infra Changes to our infrastructure or project setup m: system Something is referring to the system module labels Jan 28, 2023
@xDivisionByZerox xDivisionByZerox requested a review from a team January 28, 2023 21:51
@xDivisionByZerox xDivisionByZerox self-assigned this Jan 28, 2023
@xDivisionByZerox xDivisionByZerox linked an issue Jan 28, 2023 that may be closed by this pull request
@xDivisionByZerox xDivisionByZerox marked this pull request as ready for review January 28, 2023 21:52
@xDivisionByZerox xDivisionByZerox requested a review from a team January 28, 2023 21:52
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner January 28, 2023 21:52
@xDivisionByZerox
Copy link
Member Author

The methods commonFileName, commonFileType and commonFileExt method should be deprecated in a separate PR.

@codecov
Copy link

codecov bot commented Jan 28, 2023

Codecov Report

Merging #1788 (d37991f) into next (64f480d) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head d37991f differs from pull request most recent head 94dd2a2. Consider uploading reports for the commit 94dd2a2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1788      +/-   ##
==========================================
- Coverage   99.65%   99.63%   -0.02%     
==========================================
  Files        2340     2340              
  Lines      242622   234301    -8321     
  Branches     1113     1110       -3     
==========================================
- Hits       241786   233454    -8332     
- Misses        815      826      +11     
  Partials       21       21              
Impacted Files Coverage Δ
src/definitions/system.ts 0.00% <0.00%> (ø)
src/locales/en/system/mimeTypes.ts 100.00% <ø> (ø)
src/modules/internet/user-agent.ts 91.12% <0.00%> (-2.96%) ⬇️
src/locales/ar/index.ts 100.00% <0.00%> (ø)
src/locales/az/index.ts 100.00% <0.00%> (ø)
src/locales/el/index.ts 100.00% <0.00%> (ø)
src/locales/en/index.ts 100.00% <0.00%> (ø)
src/locales/ge/index.ts 100.00% <0.00%> (ø)
src/locales/he/index.ts 100.00% <0.00%> (ø)
src/locales/hy/index.ts 100.00% <0.00%> (ø)
... and 9 more

Shinigami92
Shinigami92 previously approved these changes Jan 28, 2023
Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

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

IMO from here on we can just add stuff back again on demand
Thx for the work 👍

ST-DDT
ST-DDT previously approved these changes Jan 29, 2023
@xDivisionByZerox xDivisionByZerox dismissed stale reviews from ST-DDT and Shinigami92 via d37991f January 29, 2023 11:43
@xDivisionByZerox
Copy link
Member Author

Can anybody tell me why the pipeline is failing?

@Shinigami92
Copy link
Member

Can anybody tell me why the pipeline is failing?

Yes, this is the codecov pipeline and you remove a huge chunk of code, so the diff from prev to now differs "to much"
But as we know what we are doing here, this can be just taken as a warning and should be ignored

@xDivisionByZerox
Copy link
Member Author

Yes, this is the codecov pipeline and you remove a huge chunk of code, so the diff from prev to now differs "to much" But as we know what we are doing here, this can be just taken as a warning and should be ignored

Ah ok, thank you. Never saw this one failing before. That's why I was a bit lost on what to do/how to fix.

@Shinigami92 Shinigami92 requested review from ST-DDT and matthewmayer and removed request for matthewmayer January 29, 2023 15:18
@Shinigami92 Shinigami92 changed the title infra: replace mime db with common dataset refactor(system): replace mime db with common dataset Jan 29, 2023
@Shinigami92 Shinigami92 enabled auto-merge (squash) January 29, 2023 21:27
@Shinigami92 Shinigami92 merged commit 52e9c1c into next Jan 29, 2023
@ST-DDT ST-DDT deleted the refactor/system/replace-mime-db-with-common-dataset branch January 29, 2023 21:45
matthewmayer pushed a commit to matthewmayer/faker that referenced this pull request Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup m: system Something is referring to the system module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove mime-db and use a small common set of mime-types
5 participants