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 yarn #535

Closed
wants to merge 1 commit into from
Closed

feat: add yarn #535

wants to merge 1 commit into from

Conversation

nickajacks1
Copy link
Contributor

Yarn is a bit unique in that it recommends installing via Corepack. To facilitate adding yarn via hermit, we can take the same approach that the official Node.JS Docker image takes, which is to install yarn v1, which can then be used to bootstrap yarn v2 and higher.

Provides an alternative to Corepack for those using Yarn. See also: #253
Validated against a yarn v3 project using the pnp linker.

Yarn is a bit unique in that it recommends installing via Corepack. To
facilitate adding yarn via hermit, we can take the same approach that the
official Node.JS Docker image takes, which is to install yarn v1, which
can then be used to bootstrap yarn v2 and higher.
@alecthomas
Copy link
Collaborator

Hermit generally doesn't get involved in installing language specific packages. For example, the recommended means of installing yarn is via npm.

@nickajacks1
Copy link
Contributor Author

You are right that you can install it using npm. I incorrectly remembered there being a warning that you are not supposed to use install yarn from an npm install...maybe I confused that with apt or something. Anyway, I suppose I see yarn a bit more like pnpm (which is provided by hermit) as being its own package manager rather than an npm package itself.

By following what the official Node Docker image does and installing the "binary" release of yarn, Hermit would let my team run yarn right away without having to remember to run npm install --global yarn or corepack enable for each cloned repo. In my opinion that leads to a much nicer and transparent experience.

That is just my opinion. If you disagree, please close this at your discretion.

@nickajacks1
Copy link
Contributor Author

Thought about it some more, and given the uncertainty of the future of corepack and how nodejs package managers will be installed, it probably makes sense to at the very least hold off on this.
yarnpkg/berry#6443

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

Successfully merging this pull request may close these issues.

2 participants