Skip to content

Commit

Permalink
chore(core): change retrieveProjectConfigurationPaths to async
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Aug 18, 2023
1 parent 8183524 commit b7edafe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { retrieveProjectConfigurationPaths } from '../../project-graph/utils/ret

export default async function (tree: Tree) {
const nxJson = readNxJson(tree);
const projectFiles = retrieveProjectConfigurationPaths(tree.root, nxJson);
const projectFiles = await retrieveProjectConfigurationPaths(
tree.root,
nxJson
);
const projectJsons = projectFiles.filter((f) => f.endsWith('project.json'));

for (let f of projectJsons) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ function _retrieveProjectConfigurations(
};
}

export function retrieveProjectConfigurationPaths(
export async function retrieveProjectConfigurationPaths(
root: string,
nxJson: NxJsonConfiguration
): string[] {
): Promise<string[]> {
const projectGlobPatterns = configurationGlobs(
root,
loadNxPluginsSync(nxJson?.plugins ?? [], getNxRequirePaths(root), root)
await loadNxPlugins(nxJson?.plugins ?? [], getNxRequirePaths(root), root)
);
const { getProjectConfigurationFiles } =
require('../../native') as typeof import('../../native');
Expand Down

0 comments on commit b7edafe

Please sign in to comment.