Skip to content

Commit

Permalink
fix(actions): Use createProjectGraphAsync instead of `readCachedPro…
Browse files Browse the repository at this point in the history
…jectGraph`
  • Loading branch information
TriPSs committed Jun 14, 2024
1 parent 5585fa5 commit 40b6473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions actions/plan/src/plan.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import { readCachedProjectGraph } from 'nx/src/project-graph/project-graph'
import { createProjectGraphAsync } from 'nx/src/project-graph/project-graph'
import { resolve } from 'path'

import { buildCommand } from './utils/build-command'
Expand Down Expand Up @@ -32,7 +32,7 @@ async function run() {
core.debug(JSON.stringify(projectsNamesToPlanFor))
}

const projectGraph = readCachedProjectGraph()
const projectGraph = await createProjectGraphAsync()

// Get all affected projects
const enabledProjects = projectsNamesToPlanFor.filter((projectName: string) => {
Expand Down
4 changes: 2 additions & 2 deletions actions/run-many/src/run-many.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import { readCachedProjectGraph } from 'nx/src/project-graph/project-graph'
import { createProjectGraphAsync } from 'nx/src/project-graph/project-graph'
import { resolve } from 'path'
import { hideBin } from 'yargs/helpers'
import yargs from 'yargs/yargs'
Expand Down Expand Up @@ -68,7 +68,7 @@ async function run() {
core.debug(JSON.stringify(projectsNamesToRun))
}

const projectGraph = readCachedProjectGraph()
const projectGraph = await createProjectGraphAsync()

// Get all affected projects
const projectsToRun = projectsNamesToRun.filter((projectName: string) => {
Expand Down

0 comments on commit 40b6473

Please sign in to comment.