Skip to content

Conversation

@hansott
Copy link
Member

@hansott hansott commented Nov 26, 2025

No description provided.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 88.42105% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
library/agent/addRouteParam.ts 84.21% 6 Missing ⚠️
library/helpers/buildRouteFromURL.ts 91.89% 3 Missing ⚠️
library/sources/http-server/contextFromRequest.ts 75.00% 1 Missing ⚠️
...ary/sources/http-server/http2/contextFromStream.ts 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!


for (const pattern of customPatterns) {
if (pattern.test(segment)) {
return `:custom`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we return the actual pattern name set by the app? eg: :tenant

return;
}

if (registeredPatternsSet.has(pattern)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check before compiling?

const NUMBER_ARRAY = /^\d+(?:,\d+)*$/;

export function buildRouteFromURL(url: string) {
export function buildRouteFromURL(url: string, custom: RegExp[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make custom parameter optional and call getRegisteredRouteParams() by default, so we can still easily test but don't have to modify so many files? Only an idea, not required.

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.

4 participants