nest
nest copied to clipboard
fix(core): let the middleware can get the params in the global prefix
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
What is the current behavior?
Issue Number: #9776
What is the new behavior?
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
Pull Request Test Coverage Report for Build 88e8b676-a087-4894-ad55-c3b4e77ab62f
- 29 of 30 (96.67%) changed or added relevant lines in 5 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.03%) to 92.997%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
packages/microservices/server/server-kafka.ts | 0 | 1 | 0.0% |
<!-- | Total: | 29 | 30 |
Totals | |
---|---|
Change from base Build 2f44b0f1-4e06-49ac-b845-35bef850e129: | 0.03% |
Covered Lines: | 6401 |
Relevant Lines: | 6883 |
š - Coveralls
Does this pull request fix the issue described in https://github.com/nestjs/nest/issues/8844#issuecomment-1315242129 by any chance? If not, can we please fix that bug in this PR please and add some tests? Please let me know if that's not possible and I'll create a separate issue and open a PR.
EDIT: here's the ticket in case you decide to fix the bug https://github.com/nestjs/nest/issues/10566
@mareksuscak I think I can get this PR to fix https://github.com/nestjs/nest/issues/10566 with a few small tweaks. But I think this should be two different questions. I'm not sure if we need to open another PR.
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] Bugfix
- [ ] Feature
- [x] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
What is the current behavior?
Issue Number: #9776
What is the new behavior?
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
@mareksuscak Hi, I tried to fix the issue described in https://github.com/nestjs/nest/issues/8844#issuecomment-1315242129 and added some tests in this PR. Iād appreciate it if you have time to review the commit and give me some advice.
Thanks for your useful suggestions, @thiagomini ! I will look carefully at your suggestions and optimize the code later.
Hey @kamilmysliwiec , could you review this too?
Apologies for not reviewing this PR sooner.. There's a few conflicts that occurred after we introduced a new PathsExplorer class https://github.com/nestjs/nest/blob/master/packages/core/router/paths-explorer.ts. Would you be able to resolve them @CodyTseng?
Of course! I will resolve the conflict later.
Hey @kamilmysliwiec, I've resolved conflicts. You can review it when you have time š
I'm wondering if this PR solves this issue https://github.com/nestjs/nest/issues/9990 as well š¤
Unfortunately, this issue #9990 has not been solved in this PR.
I'm also following this issue, if I think of a suitable solution, I'd be happy to create a PR for it. I think the following method needs to be modified. https://github.com/nestjs/nest/blob/03efdce8d6bdbdd401f98399c833bfe62a413414/packages/core/middleware/utils.ts#L94-L111
LGTM