-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: install git repositories that use pnpm #3618
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
base: master
Are you sure you want to change the base?
Conversation
// It seems that pnpm doesn't support specifying the pack output path, | ||
// so we have to extract the stdout on top of forking it to the logs. | ||
|
||
// - `pnpm pack` doesn't support the `--filter` flag so we have to use `pnpm exec` | ||
// - We have to use the `--pack-destination` flag because otherwise pnpm generates the tarball inside the workspace cwd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we point --pack-destination
to an empty temp folder and then just read its contents thus avoiding the parsing of stdout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but after a bit more research it looks like only pnpm@>=6.x
supports --pack-destination
. Because of this, I'd prefer to only pass the --pack-destination
option when packing a workspace so that pnpm 5 can be used to install regular packages too.
ea1e965
to
7c2c68b
Compare
? [`--filter`, workspace, `exec`, `pnpm`, `pack`, `--pack-destination`, npath.fromPortablePath(cwd)] | ||
: [`pack`]; | ||
|
||
const pack = await execUtils.pipevp(`pnpm`, packArgs, {cwd, env, stdin, stdout: packStream, stderr}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure we don't forget; this needs to apply the same fix as #4403
Any chance this could be in the next canary release? |
This PR makes Yarn able to install any
Most likely yes, I originally put it on hold because it required a fix inside |
Great, thanks!
Are you saying that the dependency itself is built with pnpm or the project that refers to the git dependency is pnpm? I'm the latter for instance, I got a dependency, I wanna try out a fork. The dependency isn't even using yarn. |
Hey @paul-soporan @merceyz any chance the feature to support pnpm will be released soon? |
@justinfagnani just a quick reply here as the original issue is now locked – please accept my sincerest apologies in case i have offended you. My intention was much the contrary: I think yarn berry is a great product which gets better with every release. As i have seen multiple repos moving away from yarn while mentioning this issue i felt it was critical to raise attention to what i couldn't know better as being the core team. If i was in that team's shoes it's what i would hope the community to do if something endangers the success and adoption of a project that so much love and dedication went into. Sorry again if that didn't come across as part of a constructive process. And thanks to everybody making yarn even better by the day. |
What's the problem this PR addresses?
We don't currently support installing git repositories that use pnpm.
Fixes #3169
How did you fix it?
Added support for installing git repositories that use pnpm; workspaces are supported too.
Checklist