Skip to content

Commit

Permalink
feat(core): support matching projects specifiers in dependsOn
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed May 1, 2023
1 parent 85ddd8b commit 3115236
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/nx/src/tasks-runner/create-task-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { Task, TaskGraph } from '../config/task-graph';
import { TargetDependencies } from '../config/nx-json';
import { TargetDependencyConfig } from '../devkit-exports';
import { findMatchingProjects } from '../utils/find-matching-projects';

export class ProcessTasks {
private readonly seen = new Set<string>();
Expand Down Expand Up @@ -144,10 +145,12 @@ export class ProcessTasks {
taskOverrides: Object | { __overrides_unparsed__: any[] },
overrides: Object
) {
const targetProjectSpecifiers =
const targetProjectSpecifiers = findMatchingProjects(
typeof dependencyConfig.projects === 'string'
? [dependencyConfig.projects]
: dependencyConfig.projects;
: dependencyConfig.projects,
this.projectGraph.nodes
);
for (const projectSpecifier of targetProjectSpecifiers) {
// Lerna uses `dependencies` in `prepNxOptions`, so we need to maintain
// support for it until lerna can be updated to use the syntax.
Expand Down

0 comments on commit 3115236

Please sign in to comment.