Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): exclude projects from affected based on tags #3812

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-dep-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### file

output file (e.g. --file=output.json or --file=dep-graph.html)
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/format-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/format-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/angular/cli/print-affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-dep-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### file

output file (e.g. --file=output.json or --file=dep-graph.html)
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/format-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/format-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/node/cli/print-affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-dep-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### file

output file (e.g. --file=output.json or --file=dep-graph.html)
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/format-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/format-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 4 additions & 0 deletions docs/react/cli/print-affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Default: ``

Exclude certain projects from being processed

### excludeTags

Exclude projects with tags matching one or more of the provided tags

### files

Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nrwl/nx-source",
"version": "10.2.1",
"version": "999.9.8",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be checked in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I didn't notice this. I'll remove it thanks!

I'm going to take a second look at this anyway and possibly make some changes to it.

"description": "Extensible Dev Tools for Monorepos",
"homepage": "https://nx.dev",
"main": "index.js",
Expand Down Expand Up @@ -254,4 +254,4 @@
"pre-push": "yarn checkcommit && yarn documentation && pretty-quick --check"
}
}
}
}
10 changes: 9 additions & 1 deletion packages/workspace/src/command-line/affected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ export async function affected(
const projects = parsedArgs.all ? projectGraph.nodes : affectedGraph.nodes;
const env = readEnvironment(nxArgs.target, projects);
const affectedProjects = Object.values(projects)
.filter((n) => !parsedArgs.exclude.includes(n.name))
.filter(
(n) =>
!parsedArgs.exclude.includes(n.name) &&
env.nxJson.projects[n.name] &&
Array.isArray(parsedArgs.excludeTags) &&
env.nxJson.projects[n.name].tags.filter((tag) =>
parsedArgs.excludeTags.includes(tag)
).length === 0
)
.filter(
(n) => !parsedArgs.onlyFailed || !env.workspaceResults.getResult(n.name)
);
Expand Down
Loading