-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support for Nestjs v11 #197
Comments
Try using Surely something to fix, so thanks for reporting. Looking at the error, it feels like you ended up with two copies of |
I opened a PR here to update the version: #198 and the tests worked locally after the update so there's no other changes required to use v11. Think we can run the CI on the PR, and then merge it? For context, nestjs-prometheus had the exact same type issue, fixed by adding v11 as a peer dependency: willsoto/nestjs-prometheus#2392 |
@B4nan as a note before releasing nestjs 11 support, a change needs to be made to nestjs/src/middleware.helper.ts Line 14 in b734867
|
hmm so we'll need to find a way to make this conditional, we cant just break it for nest v10 outside of major bump (and i am not willing to ship v7 just for this) |
Yeah I was thinking of switch of some sort so it works for both 10 and 11. I am trying to find out whether there is a way we can check the express version but think if all comes to it we might need a enum or flag to opt in? |
it would be enough to detect nest version i guess. we could do that by checking for some method or class or symbol that wasn't there before, or similar things. having flags would mean we need to make this opt in, people would most likely not find out unless they fall into some issues. reading versions from the projects package.json is another way out. better than having a flag and delegating this to users (but we can still have a flag to override the detection) |
I noticed in the migration document the following: // In NestJS 11, this will be automatically converted to a valid Express v5 route.
// While it may still work, it's no longer advisable to use this wildcard syntax in Express v5.
forRoutes('*'); // <-- This should not work in Express v5 so we could potentially leave it until v7? |
yes, i thought you actually saw a problem somewhere. the real-world example app works fine with v11 without any changes, so i guess we can close this one again |
NestJS released a new major version today which breaks the
forFeature
type, I cannot doMikroOrmModule.forFeature([MyEntity])
anymore:Error:
Probably more things could be broken, opening this issue to track when mikro-orm/nestjs will support v11, so I can upgrade my project to v11 as well
The text was updated successfully, but these errors were encountered: