-
-
Notifications
You must be signed in to change notification settings - Fork 133
Migrate to Express v5 routes #686
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
Conversation
add names to wildcards for middlewares
|
Any update on this? |
|
The feature is already working for me, there's just a linter issue to fix to be merged. |
| .apply(I18nMiddleware) | ||
| .forRoutes( | ||
| isNestMiddleware(consumer) && usingFastify(consumer) ? '(.*)' : '*', | ||
| isNestMiddleware(consumer) && usingFastify(consumer) ? '(.*path)' : '*path', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As both Fastify and Express now use the latest path-to-regexp package there's no need to have different formats.
| isNestMiddleware(consumer) && usingFastify(consumer) ? '(.*path)' : '*path', | |
| '*path' |
|
Migrating to express@5 routes would be wonderful. Looking forward to that.
Someone also opened up an issue regarding my problem right here: |
|
@Mut1aq woud it be possible to check whenever express v5 is used? Currently this would make a breaking change right? |
add names to wildcards for middlewares
Description
In Express 5, wildcards must have names; i18n.module had middleware registeration for all routes, so a name must be used after the "*" character.
Linked Issues
Additional context