Skip to content

Commit

Permalink
Update ignore globs depending on compile configuration (fix #33)
Browse files Browse the repository at this point in the history
  • Loading branch information
alebianco-doxee committed Nov 19, 2021
1 parent 34da7bf commit 33846fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function typescriptProvider({negotiateProtocol}) {
return false;
}

return rewritePaths.some(([from]) => filePath.startsWith(from));
return rewritePaths.some(([to, from]) => filePath.startsWith(compile === 'tsc' ? from : to));
},

resolveTestFile(testfile) {
Expand All @@ -142,7 +142,7 @@ export default function typescriptProvider({negotiateProtocol}) {
],
ignoredByWatcherPatterns: [
...ignoredByWatcherPatterns,
...Object.values(relativeRewritePaths).map(to => `${to}**/*.js.map`),
...Object.entries(relativeRewritePaths).map(([to, from]) => `${compile === 'tsc' ? from : to}**`),
],
};
},
Expand Down
2 changes: 1 addition & 1 deletion test/snapshots/protocol-ava-3.2.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ Generated by [AVA](https://avajs.dev).
],
ignoredByWatcherPatterns: [
'assets/**',
'build/**/*.js.map',
'src/**',
],
}
Binary file modified test/snapshots/protocol-ava-3.2.js.snap
Binary file not shown.

0 comments on commit 33846fa

Please sign in to comment.