Skip to content

Commit

Permalink
Revert "use {dot: true} for all micromatches"
Browse files Browse the repository at this point in the history
This reverts commit 592d50b.
  • Loading branch information
thymikee committed Jul 10, 2018
1 parent 592d50b commit b26a039
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/jest-cli/src/run_jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export default (async function runJest({
!micromatch(
[path.relative(globalConfig.rootDir, filename)],
globalConfig.collectCoverageFrom,
{dot: true},
).length
) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-haste-map/src/haste_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class HasteFS {
const files = new Set();
for (const file in this._files) {
const filePath = root ? path.relative(root, file) : file;
if (micromatch([filePath], globs, {dot: true}).length) {
if (micromatch([filePath], globs).length) {
files.add(file);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-message-util/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const formatPaths = (config: StackTraceConfig, relativeTestPath, line) => {
if (
(config.testMatch &&
config.testMatch.length &&
micromatch(filePath, config.testMatch, {dot: true})) ||
micromatch(filePath, config.testMatch)) ||
filePath === relativeTestPath
) {
filePath = chalk.reset.cyan(filePath);
Expand Down
5 changes: 2 additions & 3 deletions packages/jest-runtime/src/should_instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function shouldInstrument(
if (
config.forceCoverageMatch &&
config.forceCoverageMatch.length &&
micromatch.any(filename, config.forceCoverageMatch, {dot: true})
micromatch.any(filename, config.forceCoverageMatch)
) {
return true;
}
Expand All @@ -42,7 +42,7 @@ export default function shouldInstrument(
if (
config.testMatch &&
config.testMatch.length &&
micromatch.any(filename, config.testMatch, {dot: true})
micromatch.any(filename, config.testMatch)
) {
return false;
}
Expand All @@ -63,7 +63,6 @@ export default function shouldInstrument(
!micromatch(
[path.relative(config.rootDir, filename)],
options.collectCoverageFrom,
{dot: true},
).length
) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ function buildFile(file, silent) {
const destPath = getBuildPath(file, BUILD_DIR);

mkdirp.sync(path.dirname(destPath));
if (micromatch.isMatch(file, IGNORE_PATTERN, {dot: true})) {
if (micromatch.isMatch(file, IGNORE_PATTERN)) {
silent ||
process.stdout.write(
chalk.dim(' \u2022 ') +
path.relative(PACKAGES_DIR, file) +
' (ignore)\n'
);
} else if (!micromatch.isMatch(file, JS_FILES_PATTERN, {dot: true})) {
} else if (!micromatch.isMatch(file, JS_FILES_PATTERN)) {
fs.createReadStream(file).pipe(fs.createWriteStream(destPath));
silent ||
process.stdout.write(
Expand Down

0 comments on commit b26a039

Please sign in to comment.