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: add support to monorepo and fix varius issues #10

Closed
wants to merge 3 commits into from
Closed

feat: add support to monorepo and fix varius issues #10

wants to merge 3 commits into from

Conversation

rluvaton
Copy link

@rluvaton rluvaton commented Jun 19, 2023

Given that this project is not maintained anymore I've created a new extension that actually works - here


3 things this PR fixes:

Monorepo support

add support to Monorepo by looking up the nearest vitest config

inside a monorepo we have vitest config in the application folder and not the folder where the package json exists

- package.json
- apps/
  - app1/
     - vitest.config.ts
     - src/
     - tests/

Fix #7

React scripts fix

don't cd to the current dir name as some places rely on the cwd

like this:
https://github.com/facebook/create-react-app/blob/0a827f69ab0d2ee3871ba9b71350031d8a81b7ae/packages/react-scripts/config/paths.js#L15-L30

it will try to read the package json in the cwd

Reuse existing terminal

this will reuse the existing terminal fix #8

@rluvaton rluvaton changed the title feat: add support to monorepo feat: add support to monorepo and fix varius issues Jun 21, 2023
Comment on lines +36 to +41
let terminalAlreadyExists = true;
if (!terminal || terminal.exitStatus) {
terminalAlreadyExists = false;
terminal?.dispose();
terminal = vscode.window.createTerminal(`vscode-vitest-runner`);
}

Choose a reason for hiding this comment

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

👍🏻 hope this change is released soon. Would like this behavior.

Copy link
Author

Choose a reason for hiding this comment

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

forked and published my own package given this is not maintained https://marketplace.visualstudio.com/items?itemName=rluvaton.vscode-vitest

@rluvaton rluvaton closed this by deleting the head repository Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants