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(utils/mime): make object and type commonality #3606

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

EdamAme-x
Copy link
Contributor

@EdamAme-x EdamAme-x commented Nov 1, 2024

In the previous state, we were writing the same thing twice. This PR defines it in only one place and then creates the type definition from the union of the object's values.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.74%. Comparing base (4dd8b2b) to head (e863ad1).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3606      +/-   ##
==========================================
- Coverage   94.71%   89.74%   -4.97%     
==========================================
  Files         158      158              
  Lines        9555    10083     +528     
  Branches     2813     2887      +74     
==========================================
- Hits         9050     9049       -1     
- Misses        505     1034     +529     

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

src/utils/mime.ts Outdated Show resolved Hide resolved
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Nov 2, 2024

@EdamAme-x

Thanks! Looks good. Let's go.

@yusukebe yusukebe merged commit 3aad86c into honojs:main Nov 2, 2024
16 checks passed
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.

2 participants