-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't automatically exclude local node_modules #10
Comments
@localnerve I think this update will do the trick: It will take a little while for it to land in nyc, because we'll need to be fairly careful when pulling it in. |
@localnerve mind giving the next release candidate of nyc a spin? You can now provide an empty array to exclude, which will allow you to cover
|
@bcoe I did this per your instructions, but still did not get local node_modules to show up in coverage. I've tried a few variations of include/exclude, used the nyc 8.0.0 release with babel-plugin-istanbul 1.1.0. |
@localnerve mind if I ask about the motivation behind getting coverage on What information does it give you about your codebase/project? |
Also I'd say this has been fixed in v2.1.x |
@JaKXz I felt that it would be interesting to be able to see how covered your dependencies in |
@bcoe yeah I agree about the flexibility :) I'm just curious about how it's empowering to know "how covered your dependencies are" apart from their hopefully documented coverage... I guess I just need to see an example of it in action |
@JaKXz No problem! I'm always open to sharing and receiving feedback, it's how I learn. MotivationsHere is a project that uses local node_modules, as a basis. It uses them at the project level, service-worker level, and for tests. Just "go"To make every shared module a universally reusable thing adds time/$$ that may or may not make sense. Even to make that conclusive decision takes time. With local node_modules, you can just code and "go" forward. As the project unfolds, it will become more clear where that module should live and evolve. That doesn't have to be solved right now. In development, just "go" and solve the project specific problems - Make it a local node_module, at least for now. CleanerEliminates '../../..' import specifications from code altogether. Simple, Self DocumentingAt a glance, you can see what the shared modules for a section of code are. Once you see node_modules you know the modules in there are shared for modules in this sub-tree. Aggregate SharedOnce you start using local node_modules, you have an aggregate of shared modules that are available for module reference at sub-trees with zero configuration ("just use Node"). Simple folder organization is how you configure it and prevent collisions. Drawbacks
|
Resolved with nyc 8.1.0, babel-plugin-istanbul 2.0.0. |
This doesn't seem to be resolved if you are looking to only provide excludes to If I apply a negate exclude per the docs ( Feature request would be to only exclude root node_modules by default – |
It seems this project will not allow any node_modules, not even ones local to a project. Given how node_modules works, why disallow any coverage of code there?
I can help. Please let me know if there is any positive interest in this.
The text was updated successfully, but these errors were encountered: