diff --git a/flake.nix b/flake.nix index 30b82ab18..61ebb1aeb 100644 --- a/flake.nix +++ b/flake.nix @@ -154,7 +154,6 @@ graphviz perl go_1_27 - yarn # qemu and e2fsprogs are needed for natlab qemu diff --git a/release/dist/dist.go b/release/dist/dist.go index ffad58027..d7afea16a 100644 --- a/release/dist/dist.go +++ b/release/dist/dist.go @@ -68,11 +68,6 @@ type Build struct { // web client assets. If empty, BuildWebClientAssets looks for tool/pnpm in // Repo, then pnpm in $PATH. Pnpm string - // Yarn is the path to the yarn binary, if one is available. - // - // Deprecated: the web client is built with Pnpm. Yarn is no longer used by - // this package and will be removed along with tool/yarn. - Yarn string // Version is the version info of the build. Version mkversion.VersionInfo // Time is the timestamp of the build. @@ -115,14 +110,11 @@ func NewBuild(repo, out string) (*Build, error) { if err != nil { return nil, fmt.Errorf("finding go binary: %w", err) } - // Best effort: Yarn is deprecated and only populated for existing callers. - yarnTool, _ := findTool(repo, "yarn") b := &Build{ Repo: repo, Tmp: tmp, Out: out, Go: goTool, - Yarn: yarnTool, Version: mkversion.Info(), Time: time.Now().UTC(), extra: map[any]any{}, diff --git a/tool/yarn b/tool/yarn deleted file mode 100755 index 6357beda6..000000000 --- a/tool/yarn +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# Run a command with our local yarn install, rather than any globally installed -# instance. - -set -euo pipefail - -if [[ "${CI:-}" == "true" ]]; then - set -x -fi - -( - if [[ "${CI:-}" == "true" ]]; then - set -x - fi - - repo_root="${BASH_SOURCE%/*}/../" - cd "$repo_root" - - ./tool/node --version >/dev/null # Ensure node is unpacked and ready - - cachedir="$HOME/.cache/tailscale-yarn" - tarball="${cachedir}.tar.gz" - - read -r want_rev < "./tool/yarn.rev" - - got_rev="" - if [[ -x "${cachedir}/bin/yarn" ]]; then - got_rev=$(PATH="$HOME/.cache/tailscale-node/bin:$PATH" "${cachedir}/bin/yarn" --version) - fi - - if [[ "$want_rev" != "$got_rev" ]]; then - rm -rf "$cachedir" "$tarball" - mkdir -p "$cachedir" - curl -f -L -o "$tarball" "https://github.com/yarnpkg/yarn/releases/download/v${want_rev}/yarn-v${want_rev}.tar.gz" - (cd "$cachedir" && tar --strip-components=1 -xf "$tarball") - rm -f "$tarball" - fi -) - -# Deliberately not using cachedir here, to keep the environment -# completely pristine for execution of yarn. -export PATH="$HOME/.cache/tailscale-node/bin:$HOME/.cache/tailscale-yarn/bin:$PATH" -exec "$HOME/.cache/tailscale-yarn/bin/yarn" "$@" diff --git a/tool/yarn.rev b/tool/yarn.rev deleted file mode 100644 index de5856e86..000000000 --- a/tool/yarn.rev +++ /dev/null @@ -1 +0,0 @@ -1.22.19