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

Request to work with yarn workspaces #67

Open
hoekma opened this issue Sep 1, 2021 · 2 comments
Open

Request to work with yarn workspaces #67

hoekma opened this issue Sep 1, 2021 · 2 comments

Comments

@hoekma
Copy link

hoekma commented Sep 1, 2021

Hi Markis -- Love the tool! This has really enhanced my TDD in node/react projects. Recently I've started playing around with yarn workspaces to make monorepos. I've generated the coverage directory in the packages/{sub-app} folder and also had the tests generate the coverage directory at the root of the monorepo. But the blue underlines are not showing in the code. Not sure if I'm doing something wrong or if this isn't supported. If it's the latter, would love to see this supported as a new feature.

Thanks for all of the work you have and continue to put into this awesome tool!

@markis
Copy link
Owner

markis commented Sep 1, 2021

It's probably a bug with this area. This extension tries to match up the workspace and the lcov folder path. But it's always exact.

@guyellis
Copy link

I'm having a problem getting this to work with npm workspaces and it might be the same problem that you're running into @hoekma

If I run my script npm run --workspace @scope/my-package coverage then it generates an lcov.info file in a path in that package. If I take a look inside that lcov.info file I see lines like this:

SF:src/Form/Fields/MyFile.tsx

Presumably SF stands for Source File. The source file is path'd from within the package and not from the root of the repo. However this extension is looking for the file from the root.

@markis is there a way that you can add an option to this like you've done with Search location for lcov files that's called something like workspace and then prepend that to the SF values?

Or can you point me and @hoekma to where we'd make these modifications in this repo and one of us can PR this if you think that it's acceptable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants