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

feat: Add support for --exclude-node-modules to subcommands. #1053

Merged
merged 1 commit into from Apr 6, 2019

Conversation

coreyfarrell
Copy link
Member

This adds support for the --exclude-node-modules option/setting to
instrument, check-coverage and report sub-commands.

Add testing to verify that --exclude-node-modules=false is honored for
all commands.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.429% when pulling 8678cef on coreyfarrell:excludeNodeModules into 8da097e on istanbuljs:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.429% when pulling 8678cef on coreyfarrell:excludeNodeModules into 8da097e on istanbuljs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.429% when pulling 8678cef on coreyfarrell:excludeNodeModules into 8da097e on istanbuljs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.429% when pulling 8678cef on coreyfarrell:excludeNodeModules into 8da097e on istanbuljs:master.

@coveralls
Copy link

coveralls commented Apr 4, 2019

Coverage Status

Coverage remained the same at 96.429% when pulling b0f29ff on coreyfarrell:excludeNodeModules into 8da097e on istanbuljs:master.

lib/commands/instrument.js Outdated Show resolved Hide resolved
This adds support for the `--exclude-node-modules` option/setting to
instrument, check-coverage and report sub-commands.

Add testing to verify that `--exclude-node-modules=false` is honored for
all commands.
Copy link
Member

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this has been explained to me before, but refresh me on why this couldn't be handled by passing in alternate exclude rules that don't include node_modules.

Trust the research you've done on this topic, and am 👍 just curious.

@@ -100,20 +106,7 @@ exports.handler = function (argv) {
? './lib/instrumenters/istanbul'
: './lib/instrumenters/noop'

const nyc = new NYC({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little weird that this refactor happens in this pull, seems like an improvement to picking and choosing parameters though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaKXz saw that I was manually adding yet another option to this constructor, asked if we could do this.

@coreyfarrell
Copy link
Member Author

I know this has been explained to me before, but refresh me on why this couldn't be handled by passing in alternate exclude rules that don't include node_modules.

exclude rules are handled by test-exclude which adds **/node_modules/** to the exclude list if it's not there already, unless you add the excludeNodeModules: false option.

@coreyfarrell coreyfarrell merged commit e597c46 into istanbuljs:master Apr 6, 2019
@coreyfarrell coreyfarrell deleted the excludeNodeModules branch April 6, 2019 23:14
@coreyfarrell coreyfarrell mentioned this pull request Apr 9, 2019
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

Successfully merging this pull request may close these issues.

None yet

4 participants