Skip to content

Commit

Permalink
feat: add yarn
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nickajacks1 committed Nov 17, 2024
1 parent cb8bddc commit 8a9c124
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions yarn.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description = "Yarn is a fast, secure, and reliable package manager for JavaScript, designed to manage dependencies efficiently in JavaScript and Node.js projects."
source = "https://yarnpkg.com/downloads/${version}/yarn-v${version}.tar.gz"
homepage = "https://yarnpkg.com/"
repository = "https://github.com/yarnpkg/berry"
binaries = ["bin/yarn", "bin/yarnpkg"]
requires = ["node"]
strip = 1
test = "yarn --version"

// Yarn v2+, AKA berry, bootstraps itself from either yarn v1 or Corepack, so v2+ releases need not be provided by Hermit.
version "1.22.22" {
}

sha256sums = {
"https://yarnpkg.com/downloads/1.22.22/yarn-v1.22.22.tar.gz": "88268464199d1611fcf73ce9c0a6c4d44c7d5363682720d8506f6508addf36a0",
}

0 comments on commit 8a9c124

Please sign in to comment.