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

fix(express): Support multiple routers with common paths. #6253

Merged
merged 3 commits into from Nov 22, 2022

Conversation

onurtemizkan
Copy link
Collaborator

Fixes: #6004

Handles the case when at the end of reconstruction the original URL and the reconstructed URL don't match and there are no parameters.

Added 5 integration tests that cover multiple router usage with / without parameterized routes.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for looking into this and adding the tests! Just had one minor question.

Comment on lines +29 to +30
app.use('/api', root);
app.use('/api/v1', APIv1);
Copy link
Member

Choose a reason for hiding this comment

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

Looking at #6004, this is the order in which the parameterization was incorrect (so this is fixed, great!). Can we also verify that swapping the order still works (as the user originally reported)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added tests 👍

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.52 KB (+0.02% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.39 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.18 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 53.74 KB (+0.04% 🔺)
@sentry/browser - Webpack (gzipped + minified) 19.91 KB (+0.02% 🔺)
@sentry/browser - Webpack (minified) 65.2 KB (+0.03% 🔺)
@sentry/react - Webpack (gzipped + minified) 19.94 KB (+0.01% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.93 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.36 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.78 KB (+0.04% 🔺)

@AbhiPrasad AbhiPrasad merged commit 72c6855 into master Nov 22, 2022
@AbhiPrasad AbhiPrasad deleted the onur/express-multiple-routers branch November 22, 2022 16:30
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.

Wrong transaction name if multiple routers match
3 participants