MCPcopy Index your code
hub / github.com/code-pushup/cli / loadNxProjectGraph

Function loadNxProjectGraph

packages/utils/src/lib/nx.ts:9–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 * Tries to read from cache first, falls back to async creation.
8 */
9export async function loadNxProjectGraph(): Promise<ProjectGraph> {
10 const { readCachedProjectGraph, createProjectGraphAsync } = await import(
11 '@nx/devkit'
12 );
13 try {
14 return readCachedProjectGraph();
15 } catch (error) {
16 logger.warn(
17 `Could not read cached project graph, falling back to async creation.\n${stringifyError(error)}`,
18 );
19 return createProjectGraphAsync({ exitOnError: false });
20 }
21}

Callers 5

getNxCoveragePathsFunction · 0.90

Calls 2

warnMethod · 0.80
stringifyErrorFunction · 0.70

Tested by

no test coverage detected