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: clean up and reduced code size #3711

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EdamAme-x
Copy link
Contributor

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

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
  • 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 29, 2024

Codecov Report

Attention: Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.67%. Comparing base (190e122) to head (0741688).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/router/trie-router/node.ts 89.28% 3 Missing ⚠️
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              

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

@EdamAme-x
Copy link
Contributor Author

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

@EdamAme-x EdamAme-x marked this pull request as draft November 30, 2024 10:32
@EdamAme-x EdamAme-x marked this pull request as ready for review November 30, 2024 14:55
@yusukebe
Copy link
Member

yusukebe commented Dec 2, 2024

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.

@EdamAme-x
Copy link
Contributor Author

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

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