Skip to content

Commit

Permalink
update command to show projects --affected
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhunt27 committed Jan 25, 2024
1 parent a91806e commit 91c01d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 4 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions src/nx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ export function getNxAffected({
head,
workspace
}: GetNxAffectedProps): string[] {
const args = `${base ? `--base=${base}` : ''} ${head ? `--head=${head}` : ' --select=projects'}`
const args = `${base ? `--base=${base}` : ''} ${head ? `--head=${head}` : ''}`
const commands = [
`./node_modules/.bin/nx print-affected ${args}`,
`yarn nx print-affected ${args}`
// `nx print-affected ${args}`,
// `npx nx print-affected ${args}`
`./node_modules/.bin/nx show projects --affected ${args}`,
`yarn nx show projects --affected ${args}`
]
const result = executeNxCommandsUntilSuccessful({commands, workspace})

Expand All @@ -81,7 +79,7 @@ export function getNxAffected({
}

const affected = result
.split(', ')
.split(' ')
.map(x => x.trim())
.filter(x => x.length > 0)

Expand Down

0 comments on commit 91c01d1

Please sign in to comment.