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

Yarn support #3

Open
aviaviavi opened this issue Mar 17, 2020 · 3 comments
Open

Yarn support #3

aviaviavi opened this issue Mar 17, 2020 · 3 comments

Comments

@aviaviavi
Copy link
Contributor

Right now Scarf uses npm ls output to determine dependency info for finding scarfSettings in a package.json. We'll need parity for users that are using yarn.

@aviaviavi
Copy link
Contributor Author

Due to yarnpkg/yarn#5476, yarn support in scarf-js seems challenging as it looks like we can't print anything to the console during postintsall. It looks like we could still fire off analytics calls since the script will get run, but not being able to tell the user what we're doing is a serious limitation. I'll be investigating more.

@zenflow
Copy link

zenflow commented Jul 20, 2020

@aviaviavi What about the other package scripts, preinstall & install?
https://classic.yarnpkg.com/en/docs/package-json#toc-scripts

If none of them work I would open up an issue with Yarn.

@aviaviavi
Copy link
Contributor Author

aviaviavi commented Jul 24, 2020

Great idea @zenflow - I did some testing and unfortunately it looks like for transitive dependencies (which scarf-js typically is) each of the preinstall, postinstall and install scripts are not hooked up to stdout in yarn even though people have asked (see yarnpkg/yarn#6971, yarnpkg/yarn#5476). So we're still in a position where we can't inform users about analytics when using yarn, so scarf-js will have to continue to be disabled until something there changes.

It seems like this request has already been essentially rejected but maybe it's worth opening up a new issue anyway?

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

2 participants