We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01d6afc commit 8713561Copy full SHA for 8713561
.changeset/moody-otters-march.md
@@ -0,0 +1,5 @@
1
+---
2
+"git-json-resolver": patch
3
4
+
5
+fix file walker. Do not walk .git and cleanly process only relative path to ensure proper pattern match.
lib/src/utils.ts
@@ -58,10 +58,10 @@ export const listMatchingFiles = async (options: CollectFilesOptions): Promise<F
58
59
if (entry.isDirectory()) {
60
/* v8 ignore next */
61
- if (!/node_modules/.test(entry.name)) {
+ if (!/node_modules|\.git/.test(entry.name)) {
62
await walk(fullPath);
63
}
64
- } else if (fileFilter(fullPath)) {
+ } else if (fileFilter(path.relative(fullPath, root))) {
65
try {
66
const content = await fs.readFile(fullPath, "utf8");
67
0 commit comments