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

Incorrectly resolves root in monorepo #4

Open
joefiorini opened this issue Aug 20, 2019 · 9 comments
Open

Incorrectly resolves root in monorepo #4

joefiorini opened this issue Aug 20, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@joefiorini
Copy link

I have a monorepo with many package.json files throughout (managed with yarn workspaces). When I try to run :Jest or :JestCurrent it errors saying it can't find the Jest executable. In order to run it I have to first open my root level package.json.

It seems that the resolveRoot function uses findUp to find the nearest package.json and assumes that will be the location of Jest. Since I have multiple packages, it's most likely stopping too soon. Is there a reason not to use workspace.root from the coc.nvim plugin? I'm still new to this plugin and its ecosystem, but seems to be if something already has the root plugins should prefer that, no?

@Dammic
Copy link

Dammic commented Sep 6, 2019

I would also add myself to that question. It's a problem for yarn managed repositories. I would propose taking the workspace.root and adding a way to define our own independent files

@chemzqm chemzqm added the enhancement New feature or request label Sep 9, 2019
@chemzqm
Copy link
Member

chemzqm commented Sep 9, 2019

It could be improved, consider send PR.

@IndexXuan
Copy link

any further ? please ~

@Geschoss
Copy link
Contributor

@chemzqm
hi!
Can you give me permission to create PR
I have PR with some stuff, like:
-did some refactoring
-using workspace.root as root dir
-split logic in to different files

@IndexXuan
Copy link

IndexXuan commented Sep 23, 2020

@Geschoss you should

  1. fork this repo in yours, as your coc-jest
  2. clone it and do sth
  3. git push your forked one
  4. create pull request to origin coc-jest

@Geschoss
Copy link
Contributor

@IndexXuan
nice, thank you!

@Geschoss
Copy link
Contributor

#9
need review=)

@Geschoss
Copy link
Contributor

@IndexXuan
can you check new version?

@IndexXuan
Copy link

@Geschoss I will local build your code and check it in my project tomorrow.
while I am just user of coc-jest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants