Skip to content

Commit

Permalink
feat(core): allow using project patterns rather than just project nam…
Browse files Browse the repository at this point in the history
…es with `nx watch`
  • Loading branch information
AgentEnder committed May 4, 2023
1 parent 203a874 commit 837455f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Socket } from 'net';
import { findMatchingProjects } from '../../../utils/find-matching-projects';
import { ProjectGraph } from '../../../config/project-graph';
import { findAllProjectNodeDependencies } from '../../../utils/project-graph-utils';
import { PromisedBasedQueue } from '../../../utils/promised-based-queue';
Expand Down Expand Up @@ -55,7 +56,12 @@ export function notifyFileWatcherSockets(
changedFiles.push(...projectFiles);
}
} else {
const watchedProjects = new Set<string>(config.watchProjects);
const watchedProjects = new Set<string>(
findMatchingProjects(
config.watchProjects,
currentProjectGraphCache.nodes
)
);

if (config.includeDependentProjects) {
for (const project of config.watchProjects) {
Expand Down

0 comments on commit 837455f

Please sign in to comment.