Skip to content

Build, test, and release with pnpm - #28

Merged
chris-peterson merged 3 commits into
mainfrom
use-pnpm-for-tooling
Nov 17, 2026
Merged

chris-peterson merged 3 commits into
mainfrom
use-pnpm-for-tooling

Conversation

@andyalm

@andyalm andyalm commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Context

pnpm is the preferred package manager at Getty, but git-fi's own tooling (install, build, test, release, the local trial) ran on npm, so a contributor with only pnpm couldn't work on it. This PR moves the tooling to pnpm, pinned by packageManager in package.json, with pnpm-lock.yaml imported from package-lock.json so no dependency version moves. End users can still install with either: both Windows install jobs now run once with npm install -g and once with pnpm add -g.

Review guide

Release: the one path that can't be tried before it ships

CI

Trial

  • scripts/trial.sh: pnpm 12 has no link --global, so the checkout is added as a link: global
  • scripts/trial.sh: pnpm ls -g gives a linked checkout its own version, so a link is spotted by resolving outside any node_modules

Setup (skim)

@andyalm andyalm self-assigned this Nov 13, 2026
@andyalm andyalm added the enhancement New feature or request label Nov 13, 2026
@andyalm
andyalm added this pull request to stack #29 November 13, 2026 00:56
Base automatically changed from update-with-pnpm to main November 16, 2026 20:35
pnpm is the preferred package manager at Getty, and the repo's tooling
ran on npm: a contributor with only pnpm could not install, test, or
run a trial. The tooling now runs on pnpm, pinned by `packageManager`,
with the lockfile imported from package-lock.json so no dependency
version moves.

Releases publish with `pnpm publish --provenance` through trusted
publishing, which pnpm 12 supports. Both Windows install jobs now run
once with npm and once with pnpm, since end users install with either
and the two lay a global install out differently. pnpm 12 has no
`link --global`, so the trial links the checkout with
`pnpm add -g <checkout>` (BUILD-03).
Comment thread scripts/trial.sh Resolved
The README's paragraph on generated files still told contributors to
rebuild and verify with npm, which a contributor with only pnpm doesn't
have.

trial:on reads the global install through `pnpm ls -g` alone, so a copy
installed with npm (every install before pnpm was supported) went
unseen: the trial reported nothing installed, linked beside the npm
copy, and trial:off then added a second copy at the latest version
instead of handing the first one back (BUILD-03). trial:on now stops
and names the npm copy to remove first.

A terminal opened before `pnpm setup` doesn't have pnpm's global bin
directory on PATH, and pnpm refuses a global add there. trial:on only
hit that after building and recording the version to restore. It now
runs `pnpm bin -g` first, which makes the same check, and stops with
pnpm's error and the steps that fix it.

pnpm's global commands ran inside the checkout, so pnpm read the
`packageManager` pin and printed a warning on every one that --global
skips it. They run from $HOME now. install-completions' advice to put
the directory on your fpath is dropped from the trial's output, since
the trial's rc block already does that.
The shadowed-install notice (INSTALL-01) closed every report with a
sentence about the Ruby gem's leftover launcher. The gem launcher was
the case the notice was written for, but most readers now hit it with
an npm or pnpm launcher in the way. To them the sentence names a tool
they may never have installed and hints the fix lies in Ruby's bin
directory.

RubyGems stamps each launcher it generates, so the notice now reads the
launcher in the way and adds the gem sentence only when the stamp is
there.
@chris-peterson
chris-peterson marked this pull request as ready for review November 17, 2026 00:26
@chris-peterson
chris-peterson merged commit 0253cec into main Nov 17, 2026
11 checks passed
@chris-peterson
chris-peterson deleted the use-pnpm-for-tooling branch November 17, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants