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(core): Calculate module distance after bindGlobalScope #14110

Merged

Conversation

wenlong-chen
Copy link
Contributor

@wenlong-chen wenlong-chen commented Nov 6, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • 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?

The global module’s onModuleInit is not called before its dependent’s onModuleInit. This happens because, during the distance calculation, the global module is not yet included in the dependent’s imports. It only appears in the imports after bindGlobalScope, so the distance should be calculated at that point.

Issue Number: #14117

What is the new behavior?

The global module’s onModuleInit is called before its dependent’s onModuleInit.

The test mentioned above passes.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build 16217631-6001-4694-9201-514ddbcaa94a

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.243%

Totals Coverage Status
Change from base Build 72f148bc-4145-44b3-a3c4-06a616307114: 0.0%
Covered Lines: 6754
Relevant Lines: 7322

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec added this to the 11.0.0 milestone Nov 8, 2024
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 11.0.0 November 8, 2024 13:13
@kamilmysliwiec kamilmysliwiec merged commit 3ad835c into nestjs:11.0.0 Nov 18, 2024
3 checks passed
@kamilmysliwiec
Copy link
Member

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants