Skip to content

Commit

Permalink
fix: projects input highest priority (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylvln authored Jan 30, 2023
1 parent a531870 commit 0a4e03b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: npm ci

- name: Run tests
uses: npm run test
run: npm run test

lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/run-nx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export async function runNx(inputs: Inputs): Promise<void> {
? ([...nxArgs, '--', inputs.args] as const)
: ([...nxArgs] as const);

if (inputs.all === true || inputs.affected === false) {
return runNxAll(inputs, args);
} else if (inputs.projects.length > 0) {
if (inputs.projects.length > 0) {
return runNxProjects(inputs, args);
} else if (inputs.all === true || inputs.affected === false) {
return runNxAll(inputs, args);

This comment has been minimized.

Copy link
@ValeriyMaslenikov

ValeriyMaslenikov Jan 30, 2023

I think this one sounds like a breaking change...
Before the command executed looked like this: npx nx deploy project --configuration=prod --parallel=3

And after today's commit it looks like this: nx deploy project --parallel=3 -- --configuration=prod

This comment has been minimized.

Copy link
@ValeriyMaslenikov

ValeriyMaslenikov Jan 30, 2023

@IamBlueSlime could you please take a look

This comment has been minimized.

Copy link
@jeremylvln

jeremylvln Jan 30, 2023

Author Member

Are you sure about that? Inverting these two if blocks does not change argument placement, which is done in the lines just above this (L114 → L117).

If you added --configuration=prod to the args input of the action, I can confirm it is expected for these args to be placed after the --. However, I can see one issue with that approach: you cannot add arguments to the Nx command itself.

I'm not sure how to handle this, so I opened an issue: #327
Could you add some feedback on it directly?

Thanks!

This comment has been minimized.

Copy link
@jeremylvln

jeremylvln Jan 30, 2023

Author Member

By looking at the dist file, it seems that the last release was not built correctly, that's why it caused some issues on your side. I agree with you about this being a breaking change. I will pin back the v3 tag to the last commit and will release a v4 after this discussion being solved.

This comment has been minimized.

Copy link
@ValeriyMaslenikov

ValeriyMaslenikov Jan 30, 2023

Thank you, @IamBlueSlime!

This comment has been minimized.

Copy link
@jeremylvln

jeremylvln Jan 30, 2023

Author Member

Done, sorry for this issue. Thank you for the really fast ping!

image

} else {
return runNxAffected(inputs, args);
}
Expand Down

0 comments on commit 0a4e03b

Please sign in to comment.