nest
nest copied to clipboard
fix(core): allow importing providers from global modules in lazy modules
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)
- [x] 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: 9622
What is the new behavior?
Imports of global modules in lazy imported modules is now possible.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
Implementation of the solution proposed by dsullivan comment in the issue.
Not sure if my test is the correct one to do, I'll be happy to update it if needed.
Pull Request Test Coverage Report for Build f6624719-4eb9-425b-8322-58d6a73e9754
- 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
- 43 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+0.2%) to 94.025%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| packages/core/injector/lazy-module-loader.ts | 3 | 76.0% |
| packages/common/module-utils/configurable-module.builder.ts | 5 | 91.84% |
| packages/microservices/server/server-rmq.ts | 7 | 81.67% |
| packages/core/router/router-explorer.ts | 13 | 79.88% |
| packages/microservices/client/client-rmq.ts | 15 | 81.21% |
| <!-- | Total: | 43 |
| Totals | |
|---|---|
| Change from base Build 8ed6457b-8f6f-480e-bd33-17d74c4dd4a1: | 0.2% |
| Covered Lines: | 6059 |
| Relevant Lines: | 6444 |
💛 - Coveralls
https://github.com/nestjs/nest/pull/10005