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

Detect parent directories rather than adding all child directories #61

Closed
whitfin opened this issue Jul 13, 2020 · 1 comment
Closed

Comments

@whitfin
Copy link

whitfin commented Jul 13, 2020

This is an issue related to node_modules, although other dependencies may have the same issue. Basically, there's a lot of noise in the entries list unnecessarily.

An example is a directory with this structure:

root/
  node_modules/
    moduleA/
      node_modules/
        moduleD/
          package.json
      package.json
    moduleB/
      node_modules/
        moduleE/
          package.json
      package.json
    moduleC/ 
      package.json
  package.json

This will add the following directories to your exclusions:

./root/node_modules/moduleA/node_modules
./root/node_modules/moduleB/node_modules
./root/node_modules

Obviously this is redundant as the final entry already covers the former. In a single project directory, my node_modules caused ~50 entries to be added, rather than a single entry. This is a pain when it comes to reversing the process, or just inspecting the excluded entries list.

@whitfin
Copy link
Author

whitfin commented Jul 13, 2020

Actually, forget this - it was caused by a bad directory where I had node_modules in a non-node project, so there was no package.json!

@whitfin whitfin closed this as completed Jul 13, 2020
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