hono icon indicating copy to clipboard operation
hono copied to clipboard

refactor: clean up and reduced code size

Open EdamAme-x opened this issue 1 year ago • 4 comments

Some cleanups and commonization of Object.create(null) to reduce the amount of code.

18.5kb -> 18.1kb

The author should do the following, if applicable

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

EdamAme-x avatar Nov 29 '24 10:11 EdamAme-x

Codecov Report

:x: Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 91.67%. Comparing base (190e122) to head (0741688). :warning: Report is 207 commits behind head on main.

Files with missing lines Patch % Lines
src/router/trie-router/node.ts 89.28% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3711      +/-   ##
==========================================
- Coverage   91.70%   91.67%   -0.03%     
==========================================
  Files         159      159              
  Lines       10158    10150       -8     
  Branches     2855     2885      +30     
==========================================
- Hits         9315     9305      -10     
- Misses        842      844       +2     
  Partials        1        1              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 29 '24 10:11 codecov[bot]

Oddly, coverage shows a line of code that doesn't exist 👀

EdamAme-x avatar Nov 29 '24 10:11 EdamAme-x

Not only this, but we would like to reduce the amount of code by using a common single method, e.g., new Response(). Please wait while I think about how to do it.

yusukebe avatar Dec 02 '24 02:12 yusukebe

Okay. Common file or put them together at build time.

EdamAme-x avatar Dec 03 '24 02:12 EdamAme-x