Skip to content

Commit

Permalink
fix(core): ignore yarn/cache when watching with the daemon (#22516)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Mar 27, 2024
1 parent d877873 commit 81cf348
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/nx/src/native/walker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ where
"**/node_modules".into(),
"**/.git".into(),
"**/.nx/cache".into(),
"**/.yarn/cache".into(),
];

if let Some(additional_ignores) = ignores {
Expand Down
1 change: 1 addition & 0 deletions packages/nx/src/native/watch/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl Watcher {
".nx/".into(),
"vitest.config.ts.timestamp*.mjs".into(),
"vite.config.ts.timestamp*.mjs".into(),
".yarn/cache/".into(),
];
if let Some(additional_globs) = additional_globs {
globs.extend(additional_globs);
Expand Down
9 changes: 8 additions & 1 deletion packages/nx/src/utils/ignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export function getIgnoredGlobs(
}

export function getAlwaysIgnore(root?: string) {
const paths = ['node_modules', '**/node_modules', '.git', '.nx', '.vscode'];
const paths = [
'node_modules',
'**/node_modules',
'.git',
'.nx',
'.vscode',
'.yarn/cache',
];
return root ? paths.map((x) => joinPathFragments(root, x)) : paths;
}

Expand Down

0 comments on commit 81cf348

Please sign in to comment.