refactor(server-nestjs): replace InfrastructureModule with explicit module imports#2316
Open
shikanime wants to merge 1 commit into
Open
refactor(server-nestjs): replace InfrastructureModule with explicit module imports#2316shikanime wants to merge 1 commit into
shikanime wants to merge 1 commit into
Conversation
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
c7bf108 to
a82f0a0
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
a82f0a0 to
155202f
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
155202f to
27d5dad
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
27d5dad to
41a7299
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
41a7299 to
d7b4e9b
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
…odule imports Signed-off-by: Shikanime Deva <william.phetsinorath@shikanime.studio> Change-Id: Ib0cb9dd4c83a5e8e2127eb7bd0f432926a6a6964
d7b4e9b to
499ef61
Compare
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (26.70% Estimated after merge)
Issues liées
Extrait de: #2293
Quel est le comportement actuel ?
Les modules de
apps/server-nestjsimportent l'agrégateurInfrastructureModulepour accéder aux services d'infrastructure (auth, database, configuration, events, logger, permissions).Quel est le nouveau comportement ?
Chaque module déclare explicitement ses dépendances d'infrastructure (ex.
AuthModule,DatabaseModule,EventsModule,PermissionModule,LoggerModule,ConfigurationModule) au lieu de passer par l'agrégateurInfrastructureModule, qui n'est plus utilisé que comme point d'entrée racine dansmain.module.ts.ServiceChainModuleexporte désormaisServiceChainService. Les tests e2e (test/*.e2e-spec.ts) utilisent les modules explicites à la place deInfrastructureModule.Cette PR introduit-elle un breaking change ?
Non. Refactorisation interne de l'injection de dépendances, sans changement de contrat ni d'API.
Pourquoi ce changement ?
L'utilisation de l'agrégateur
InfrastructureModulemasquait les dépendances réelles de chaque module : un import unique exposait l'ensemble des services d'infrastructure, rendant le graphe de dépendances illisible et compliquant le diagnostic des erreurs d'injection (ex.Nest can't resolve dependencies). En déclarant les modules explicitement, chaque module expose uniquement ce dont il a besoin, ce qui réduit le couplage implicite, facilite la réutilisation isolée (tests, modules autonomes) et rend les erreurs de DI immédiatement localisables.