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

feat(router): Introduce OptimizeRouter #3726

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

EdamAme-x
Copy link
Contributor

@EdamAme-x EdamAme-x commented Dec 5, 2024

A router that caches static routes to objects.

  #routes: Record<string, Record<string, number[]>> = Object.create(null)

Like SmartRouter, it can specify child routers.

new OptimizeRouter({
    router: new TrieRouter(),
})

... (wait a moment)

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

@EdamAme-x EdamAme-x marked this pull request as draft December 5, 2024 04:50
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.73%. Comparing base (fc8fb0f) to head (b54760d).

Files with missing lines Patch % Lines
src/router/optimize-router/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3726      +/-   ##
==========================================
+ Coverage   91.70%   91.73%   +0.02%     
==========================================
  Files         159      161       +2     
  Lines       10165    10214      +49     
  Branches     2981     2890      -91     
==========================================
+ Hits         9322     9370      +48     
- Misses        842      843       +1     
  Partials        1        1              

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

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.

1 participant