Skip to content

fix(#1752): specific root '/' path should not be removed#1769

Open
Teyik0 wants to merge 1 commit intoelysiajs:mainfrom
Teyik0:main
Open

fix(#1752): specific root '/' path should not be removed#1769
Teyik0 wants to merge 1 commit intoelysiajs:mainfrom
Teyik0:main

Conversation

@Teyik0
Copy link
Contributor

@Teyik0 Teyik0 commented Feb 27, 2026

fix related to -> #1752 (comment)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed path normalization to correctly preserve root paths while maintaining expected behavior for other paths in the adapter.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Walkthrough

A utility function removeTrailingPath in the Bun adapter is modified to conditionally strip trailing slashes. It now preserves the root path ("/") by only removing trailing slashes when the key length exceeds one character.

Changes

Cohort / File(s) Summary
Bun Adapter Path Handling
src/adapter/bun/index.ts
Updated removeTrailingPath function logic to skip trailing slash removal for single-character keys (root path), maintaining behavior for longer paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A path stands tall, roots must stay,
No trailing slashes swept away,
When length is one, we let it be,
The "/" remains wild and free! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main change: preventing removal of the root '/' path, which aligns with the file summary showing the fix prevents collapsing the root-like path.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/elysia@1769

commit: 2722538

@Teyik0 Teyik0 changed the title fix(#1752): specific root '/' should not be removed fix(#1752): specific root '/' path should not be removed Feb 27, 2026
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