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

Allow negation of ignore and only patterns. #5625

Merged
merged 1 commit into from Apr 12, 2017

Conversation

Projects
None yet
4 participants
@loganfsmyth
Member

loganfsmyth commented Apr 11, 2017

Q A
Patch: Bug Fix? N
Major: Breaking Change? N
Minor: New Feature? Y
Deprecations?
Spec Compliancy?
Tests Added/Pass?
Fixed Tickets Fixes #5086
License MIT
Doc PR
Dependency Changes

Only handles negations within a single pattern set so if you add some negation lines, it won't negate patterns from other ignore or only blocks.

@mention-bot

This comment has been minimized.

mention-bot commented Apr 11, 2017

@loganfsmyth, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jamestalmage, @existentialism and @kaicataldo to be potential reviewers.

@loganfsmyth loganfsmyth referenced this pull request Apr 11, 2017

Closed

negate ignores #5086

@codecov

This comment has been minimized.

codecov bot commented Apr 11, 2017

Codecov Report

Merging #5625 into 7.0 will increase coverage by 0.02%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##              7.0    #5625      +/-   ##
==========================================
+ Coverage   84.45%   84.48%   +0.02%     
==========================================
  Files         285      285              
  Lines        9648     9653       +5     
  Branches     2711     2714       +3     
==========================================
+ Hits         8148     8155       +7     
+ Misses        998      996       -2     
  Partials      502      502
Impacted Files Coverage Δ
...ckages/babel-core/src/config/build-config-chain.js 83.09% <73.33%> (+2.79%) ⬆️
packages/babel-traverse/src/path/context.js 85.34% <0%> (-0.87%) ⬇️
...bel-plugin-transform-es2015-classes/src/vanilla.js 90.59% <0%> (+0.42%) ⬆️
packages/babel-traverse/src/visitors.js 86.66% <0%> (+0.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ea3338...bfa7ec4. Read the comment docs.

if (this.matchesPattern(pattern, dirname)) return true;
}
if (ignore && !Array.isArray(ignore)) {
throw new Error(`.ignore should be an array, was ${JSON.stringify(ignore)}`);

This comment has been minimized.

@xtuc

xtuc Apr 12, 2017

Member

I don't like the was ... What about:

.ignore should be an array, "foobar" given

This comment has been minimized.

@loganfsmyth
options: {
ignore: [
"*",
"!src.js",

This comment has been minimized.

@xtuc

xtuc Apr 12, 2017

Member

Could we add an test with a folder?

This comment has been minimized.

@loganfsmyth

loganfsmyth Apr 12, 2017

Member

Done.

@xtuc

xtuc approved these changes Apr 12, 2017

@loganfsmyth loganfsmyth merged commit d1c954b into babel:7.0 Apr 12, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/project 84.48% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@loganfsmyth loganfsmyth deleted the loganfsmyth:negate-ignore-only branch Apr 12, 2017

loganfsmyth added a commit that referenced this pull request Apr 12, 2017

loganfsmyth added a commit to loganfsmyth/babel that referenced this pull request Apr 17, 2017

loganfsmyth added a commit that referenced this pull request Apr 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment