Skip to content

Commit

Permalink
refactor(actions): Use correct way of reading keys from map
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Aug 5, 2023
1 parent a87ab3b commit 20a3ed0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions actions/plan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -273679,12 +273679,12 @@ function run() {
const targets = core.getMultilineInput('targets', { required: true, trimWhitespace: true });
// Get all the project names
const projectsNamesToPlanFor = affectedOnly
? JSON.parse((0, exec_1.execCommand)(`npx nx show projects ${affectedOnly ? '--affected' : ''} --json`, {
? JSON.parse((0, exec_1.execCommand)('npx nx show projects --affected --json', {
asString: true,
silent: !core.isDebug(),
cwd: (0, path_1.resolve)(process.cwd(), workingDirectory)
})).map((projectName) => projectName.trim())
: Object.keys(projects);
: projects.keys();
// Make sure to still log the project names
if (!affectedOnly) {
core.debug(JSON.stringify(projectsNamesToPlanFor));
Expand Down
4 changes: 2 additions & 2 deletions actions/plan/src/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ async function run() {
// Get all the project names
const projectsNamesToPlanFor = affectedOnly
? JSON.parse(execCommand<string>(
`npx nx show projects ${affectedOnly ? '--affected' : ''} --json`,
'npx nx show projects --affected --json',
{
asString: true,
silent: !core.isDebug(),
cwd: resolve(process.cwd(), workingDirectory)
}
)).map((projectName: string) => projectName.trim())
: Object.keys(projects)
: projects.keys()

// Make sure to still log the project names
if (!affectedOnly) {
Expand Down
2 changes: 1 addition & 1 deletion actions/run-many/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -273062,7 +273062,7 @@ function run() {
silent: !(core.isDebug() || exports.argv.verbose),
cwd
}))
: Object.keys(projects);
: projects.keys();
// Make sure to still log the project names
if (!affectedOnly) {
core.debug(JSON.stringify(projectsNamesToRun));
Expand Down
2 changes: 1 addition & 1 deletion actions/run-many/src/run-many.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function run() {
cwd
}
))
: Object.keys(projects)
: projects.keys()

// Make sure to still log the project names
if (!affectedOnly) {
Expand Down

0 comments on commit 20a3ed0

Please sign in to comment.