Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use nx utils to read all configuration files #1184

Merged
merged 3 commits into from
Dec 10, 2021

Conversation

Cammisuli
Copy link
Member

What it does

This PR removes all direct reads to the workspace/project/angular/nx.json files and uses the utils provided by Nx. This allows Nx Console to always know what configurations are available without having to worry about workspace changes.

@nx-cloud
Copy link

nx-cloud bot commented Dec 3, 2021

Nx Cloud Report

CI ran the following commands for commit c08f1e6. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --all --parallel --target=build
#000000 nx run-many --all --parallel --target=test
#000000 nx run-many --all --parallel --target=lint

Sent with 💌 from NxCloud.

@@ -116,6 +117,7 @@ export async function activate(c: ExtensionContext) {
const vscodeWorkspacePath =
workspace.workspaceFolders && workspace.workspaceFolders[0].uri.fsPath;

debugger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably remove?

@@ -352,7 +355,9 @@ function renameProperty(obj: any, from: string, to: string) {
delete obj[from];
}

export function toWorkspaceFormat(w: any): WorkspaceJsonConfiguration {
export function toWorkspaceFormat(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function could reuse toNewFormat from @nrwl/tao

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These linked lines are probably not needed anymore since we use the NX helpers to read config

https://github.com/Cammisuli/nx-console/blob/use-nx-utils-for-configs/libs/server/src/lib/utils/utils.ts#L380-L382

@Cammisuli
Copy link
Member Author

Need to finish #1057 before this can complete. The latest versions of angular cli is not as backwards compatible as nx, so we need to completely remove our dependency on ng cli

@Cammisuli Cammisuli merged commit 630ac6e into nrwl:master Dec 10, 2021
@Cammisuli Cammisuli deleted the use-nx-utils-for-configs branch December 10, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants