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

Excluded modules are still being shown in the imports array #56

Open
klu2 opened this issue Mar 23, 2024 · 0 comments
Open

Excluded modules are still being shown in the imports array #56

klu2 opened this issue Mar 23, 2024 · 0 comments

Comments

@klu2
Copy link

klu2 commented Mar 23, 2024

With #38 the option to exclude modules was implemented, which is a great thing!

Suppose I have the following code

const tree = SpelunkerModule.explore(app,{
    ignoreImports: [
        (moduleName) => moduleName === 'GoogleRecaptchaModules',
    ],        
});

Then the GoogleRecaptchaModule is not listed anymore in the tree elements (which is good), but it is still shown is import for all other modules, i.e.

  {
    name: 'MyOtherModule',
    imports: [
      'GoogleRecaptchaModule',
      'ConfigHostModule',
    ],
    providers: {},
    controllers: [],
    exports: []
  },

If you feed such a tree to SpelunkerModule.graph(tree) you get an exception as of the missing GoogleRecaptchaModule.

I therefore believe that if a module is excluded with ignoreImports, it should also not be displayed any longer inside the imports of the resulting tree.

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

No branches or pull requests

1 participant