Skip to content

fix(reg-exp-router): support line terminators in route paths for v5 - #5547

Merged
yusukebe merged 2 commits into
v5from
fix-regexp-router-line-terminators-v5
Oct 10, 2026
Merged

yusukebe merged 2 commits into
v5from
fix-regexp-router-line-terminators-v5

Conversation

@usualoma

Copy link
Copy Markdown
Member

Fixes #5345.

This is the v5 version of #5524.

v5 already rejects custom parameter patterns that match an empty string. That prevents collisions with the wildcard patterns, so the fix only needs updated wildcard expressions and the tokenizer's s flag.

Compared with v5 at 6465a911, the minified bundle size increases by 27 bytes (18,636 → 18,663 bytes).

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run check:fix to format and lint the code

@github-actions

Copy link
Copy Markdown

Bundle size check

main (f78a245) #5547 (5d3e0f6) +/-
Bundle Size (B) 18,335B 18,663B +328B
Bundle Size (KB) 17.91K 18.23K +0.32K

Compiler Diagnostics (tsc)

main (f78a245) #5547 (5d3e0f6) +/-
Files 83 84 +1
Lines 59,446 59,530 +84
Identifiers 60,625 61,878 +1,253
Symbols 106,532 115,720 +9,188
Types 163,092 171,784 +8,692
Instantiations 414,023 452,803 +38,780
Memory used 206,753K 193,166K -13,587K
I/O read 0s 0.01s +0.01s
I/O write 0s 0s 0s
Parse time 0.18s 0.27s +0.09s
Bind time 0.07s 0.1s +0.03s
Check time 0.79s 1.27s +0.48s
Emit time 0s 0s 0s
Total time 1.03s 1.64s +0.61s

Compiler Diagnostics (typescript-go)

main (f78a245) #5547 (5d3e0f6) +/-
Files 215 216 +1
Lines 121,008 121,092 +84
Identifiers 107,353 108,609 +1,256
Symbols 181,164 189,748 +8,584
Types 262,348 271,038 +8,690
Instantiations 621,588 660,480 +38,892
Memory used 154,031K 158,606K +4,575K
Memory allocs 1,783,898 1,851,976 +68,078
Config time 0s 0.001s +0.001s
BuildInfo read time 0s 0s 0s
Parse time 0.054s 0.092s +0.038s
Bind time 0s 0s 0s
Check time 0.269s 0.446s +0.177s
Emit time 0.007s 0.004s -0.003s
Changes compute time 0.014s 0.022s +0.008s
Total time 0.364s 0.619s +0.255s

Reported by octocov

@github-actions

Copy link
Copy Markdown

HTTP Performance Benchmark

Framework Runtime Average Ping Query Body
hono (origin/main) bun 65,092.34 79,104.01 63,921.55 52,251.46
hono (current) bun 84,679.35 107,544.92 80,105.22 66,387.90
Change +30.09% +35.95% +25.32% +27.05%

@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v5@6465a91). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff          @@
##             v5    #5547   +/-   ##
=====================================
  Coverage      ?   79.93%           
=====================================
  Files         ?      131           
  Lines         ?    10151           
  Branches      ?     2237           
=====================================
  Hits          ?     8114           
  Misses        ?     2037           
  Partials      ?        0           

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

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

@yusukebe

Copy link
Copy Markdown
Member

@usualoma

Compared with v5 at 6465a911, the minified bundle size increases by 27 bytes (18,636 → 18,663 bytes).

This is great! Thanks.

@yusukebe
yusukebe merged commit b0d28c4 into v5 Oct 10, 2026
19 checks passed
@yusukebe
yusukebe deleted the fix-regexp-router-line-terminators-v5 branch October 10, 2026 13:10
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