Skip to content

Commit fad0046

Browse files
committed
docs(changeset): Do not walk through node_modules
1 parent 02b49a5 commit fad0046

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/plenty-loops-fly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"git-json-resolver": patch
3+
---
4+
5+
Do not walk through node_modules

lib/src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ export const listMatchingFiles = async (options: CollectFilesOptions): Promise<F
5858

5959
if (entry.isDirectory()) {
6060
/* v8 ignore next */
61-
await walk(fullPath);
61+
if (!/node_modules/.test(entry.name)) {
62+
await walk(fullPath);
63+
}
6264
} else if (fileFilter(fullPath)) {
6365
try {
6466
const content = await fs.readFile(fullPath, "utf8");

0 commit comments

Comments
 (0)