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

VSCode extension not running per project/library in NX-workspace #1183

Open
work933k opened this issue Dec 7, 2023 · 0 comments
Open

VSCode extension not running per project/library in NX-workspace #1183

work933k opened this issue Dec 7, 2023 · 0 comments

Comments

@work933k
Copy link

work933k commented Dec 7, 2023

Describe the bug
I tried this VSCode extension in a NX-monorepository which is a integrated-workspace. This means that not all projects/libraries have a package.json file, but rely on the package.json in the root.
Per project/library i've set-up a specific betterer configuration, but the vscode extension does not take this structure into account.

To Reproduce
If possible please share a repo with the issue, or another repository which demonstrates the issue.
If possible please include the .betterer.ts file, and the .betterer.results file if applicable.
At a minimum please share the command you are using to run Betterer.

Expected behavior
I expected that upon saving this VSCode extension would start at the directory of the saved file and then traverse upwards until it finds a .betterer.ts file.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: [e.g. Windows, MacOS]
  • Betterer Version [e.g. 4.*]
  • Node Version [e.g. 14.*]

Additional context
I see this in the log output:

[Info  - 2:21:51 PM] Server: file:///root/OurNx/libs/myproduct/profile/src/lib/pages/profile-children-page/profile-children-page.component.ts saved, validating:
[Info  - 2:21:51 PM] Server: Adding "file:///root/OurNx/libs/myproduct/profile/src/lib/pages/profile-children-page/profile-children-page.component.ts" to validation queue at 2023-12-07T13:21:51.037Z
[Info  - 2:21:51 PM] Server: Processing queue at 2023-12-07T13:21:51.037Z
[Info  - 2:21:51 PM] Server: Validating document "file:///root/OurNx/libs/myproduct/profile/src/lib/pages/profile-children-page/profile-children-page.component.ts".
[Info  - 2:21:51 PM] Validator: Folders: 1, Documents: 1
[Info  - 2:21:51 PM] Validator: About to run Betterer.
[Info  - 2:21:51 PM] Validator: Setting CWD to "/root/OurNx".
[Info  - 2:21:51 PM] Validator: Getting Betterer for "/root/OurNx".
[Info  - 2:21:51 PM] Validator: Getting Betterer config.
[Info  - 2:21:51 PM] {"cache":true,"cachePath":"/root/OurNx/.betterer.cache","configPaths":["/root/OurNx/.betterer.ts"],"cwd":"/root/OurNx","filters":[".*"],"resultsPath":"/root/OurNx/.betterer.results","silent":true}
[Info  - 2:21:51 PM] Validator: Running Betterer in "/root/OurNx".
[Info  - 2:21:51 PM] Validator: Running Betterer on "["/root/OurNx/libs/myproduct/profile/src/lib/pages/profile-children-page/profile-children-page.component.ts"]."
[Error - 2:21:51 PM] Validator: Error: could not find config file at "/root/OurNx/.betterer.ts". 😔
[Info  - 2:21:51 PM] Validator: Restoring CWD to "/mnt/c/Users/me/AppData/Local/Programs/Microsoft VS Code".

I would expect that the /root/OurNx/libs/myproduct/profile/.betterer.ts would be used for validation.

Installed VSCode extension: v5.2.1

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

No branches or pull requests

1 participant