Skip to content

Migrate CI setup to pnpm/setup@v1 - #1131

Open
stipsan with Copilot wants to merge 4 commits into
mainfrom
copilot/replace-setup-action-and-update-config
Open

stipsan with Copilot wants to merge 4 commits into
mainfrom
copilot/replace-setup-action-and-update-config

Conversation

Copilot AI commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

This updates repository CI bootstrapping from split pnpm/action-setup + actions/setup-node steps to pnpm/setup@v1, aligned with runtime-aware pnpm setup. It also declares the expected Node runtime in the root package metadata so CI/runtime resolution is explicit and centralized.

  • Root runtime contract

    • Added devEngines.runtime to root package.json to declare Node ^24.0.0 with download-on-mismatch behavior.
  • Edit: devEngines.runtime isn't well supported yet, not when packageManager is also used: Support devEngines in package.json pnpm/action-setup#150 revisit once we are on pnpm v11

  • Composite setup action simplification

    • Replaced .github/actions/setup/action.yml multi-step setup/install flow with a single pnpm/setup@v1 step using:
      • dependency cache enabled
      • runtime resolved from action input (node@${{ inputs.node-version }})
  • Workflow path that only needs runtime (no install)

    • Updated issue-triage workflow to use pnpm/setup@v1 with install: false for the checkout + runtime-only case that previously used actions/setup-node.
- uses: pnpm/setup@v1
  with:
    cache: true
    runtime: node@${{ inputs.node-version }}

@changeset-bot

changeset-bot Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5293b52

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Jun 17, 2026 5:34pm

Request Review

@socket-security

socket-security Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub/​pnpm/​setup@​f7d0e5f4b1b3089d2799ef9722859e7ba314c4c899100100100100

View full report

@stipsan

stipsan commented Jun 17, 2026

Copy link
Copy Markdown
Member

@copilot run pnpm install and commit lockfile

@stipsan
stipsan force-pushed the copilot/replace-setup-action-and-update-config branch from 4604fcf to 954be68 Compare June 17, 2026 17:06

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot run pnpm install and commit lockfile

Done in 8066cce — I ran pnpm install --no-frozen-lockfile and committed the updated pnpm-lock.yaml.

Copilot AI requested a review from stipsan June 17, 2026 17:09
@stipsan
stipsan marked this pull request as ready for review June 17, 2026 17:10
@stipsan
stipsan requested a review from a team as a code owner June 17, 2026 17:10
Copilot AI review requested due to automatic review settings June 17, 2026 17:10
Comment thread .github/actions/setup/action.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo’s CI bootstrapping to use pnpm/setup@v1 (instead of separate pnpm/action-setup + actions/setup-node steps) and adds a root Node runtime contract via devEngines.runtime so the expected Node version is declared centrally.

Changes:

  • Added devEngines.runtime in the root package.json to declare Node ^24.0.0 with onFail: download.
  • Simplified the composite setup action to a single pnpm/setup@v1 step.
  • Updated the issue-triage workflow to use pnpm/setup@v1 with install: false for runtime-only usage.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
pnpm-lock.yaml Adds the pnpm-managed Node runtime entry (node@runtime:24.16.0) corresponding to the new runtime contract.
package.json Declares the Node runtime contract via devEngines.runtime.
.github/workflows/issue-triage.yml Replaces actions/setup-node with pnpm/setup@v1 (runtime-only, no install).
.github/actions/setup/action.yml Replaces multi-step Node/pnpm setup + install with a single pnpm/setup@v1 step.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/setup/action.yml Resolved
@stipsan

stipsan commented Jun 17, 2026

Copy link
Copy Markdown
Member

@copilot use lts instead of lts/*

@stipsan
stipsan force-pushed the copilot/replace-setup-action-and-update-config branch from c3f96fc to 4927f8b Compare June 17, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot stopped work on behalf of stipsan due to an error June 17, 2026 17:29
@stipsan stipsan changed the title Migrate CI setup to pnpm/setup@v1 and declare Node runtime in devEngines Migrate CI setup to pnpm/setup@v1 Jun 17, 2026
@stipsan
stipsan force-pushed the copilot/replace-setup-action-and-update-config branch from 6291626 to 5293b52 Compare June 17, 2026 17:34
cursor Bot pushed a commit to sanity-io/ui that referenced this pull request Jul 1, 2026
pnpm/setup@v1's combined runtime-install feature (used in the previous
commit via the runtime: input) shells out to "pnpm runtime set", a
subcommand that only exists in pnpm >= 11 (see pnpm/pnpm release
v11.0.0). This repo pins "packageManager": "[email protected]", and
pnpm/setup@v1 always self-updates to that pinned version before
running "pnpm runtime set", so every job failed with:

  ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "runtime" not found

Confirmed this is exactly what's happening in the still-open,
still-failing sanity-io/plugins#1131 (pinned to [email protected], which
also predates the runtime subcommand). Only sanity-io/sanity#13233
succeeded, because that repo was already on [email protected] beforehand.

Bumping this repo's pnpm major version is out of scope here: Renovate's
automated "chore(deps): update pnpm to v10 (main)" proposals (#1814,
#1820) and the v2-branch equivalent (#1795) were all closed rather
than merged, while only the separate v4 branch was allowed to move to
pnpm 10 - a deliberate signal that main/v2 are meant to stay on pnpm 9
for now. Bumping further to pnpm 11 would also require Node >=22 to
run the pnpm CLI, moving the "pnpm.overrides" field from package.json
into pnpm-workspace.yaml (pnpm 11 no longer reads it from
package.json), and explicitly approving previously-implicit build
scripts for cypress, esbuild, core-js, and unrs-resolver (blocked by
default since pnpm 10) - verified locally by temporarily bumping to
[email protected].

So: keep actions/setup-node@v5 for Node.js provisioning exactly as
before (with install: false on pnpm/setup@v1, restoring the explicit
pnpm install steps), and only swap pnpm/action-setup@v4 for
pnpm/setup@v1 where that's safe today. This still adopts the org's new
standard action and adds pnpm store caching (cache: true), which none
of these workflows had before, while leaving Node provisioning and the
pnpm version untouched. Once main is ready to move to pnpm >= 11, the
remaining change is small: drop the actions/setup-node step and add
runtime: node@lts to pnpm/setup@v1, same as sanity-io/sanity did.
stipsan added a commit that referenced this pull request Sep 29, 2026
…2048)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Puts this repo on the same pnpm version and settings as
[sanity-io/ui](https://github.com/sanity-io/ui) `main`: `packageManager`
`[email protected]`, ui's pnpm settings in `pnpm-workspace.yaml`, ui's CI
setup action (`pnpm/setup@v3`) but with its store cache off, and a
lockfile regenerated with pnpm 12.6.0. The `Dedupe lockfile` workflow
stays, with the one change pnpm 12 needs.

## Builds on #2044, supersedes #2043, #2044 and #1131

- **#2044** (pnpm 12.6.0 + `autoDedupe` + Vercel CLI bump) is the base.
Its commits are cherry-picked with `-x`. #2044's interim
`installCommand` workaround in `dev/e2e-studio/vercel.json`, which it
later removed, is left out, so this PR doesn't touch any Vercel config.
#2044 left CI on `pnpm/action-setup` + `actions/setup-node`; this PR
switches to ui's action.
- **#2043** (Renovate's plain `packageManager` bump) fails `E2E /
deploy-preview`, because `vercel@57` can't parse pnpm 12's lockfile (see
below).
- **#1131** (an early `pnpm/setup@v1` attempt) is covered by the CI
change here.
- **#2018** (lockfile regenerated from scratch) is not superseded: it
re-resolves every dependency, which is out of this PR's scope.

## Changes

| | Before | After |
| --- | --- | --- |
| `packageManager` | `[email protected]` | `[email protected]` (as in ui) |
| `pnpm-workspace.yaml` | | `autoDedupe: true` and
`strictPeerDependencies: false` (as in ui) |
| `.github/actions/setup` | `pnpm/action-setup@v6` +
`actions/setup-node@v7` + `pnpm install` | ui's action (`pnpm/setup@v3`,
`runtime: node@lts`) with `cache: false`, where ui has `cache: true` |
| `.github/workflows/pnpm-if-needed.yml` (`Dedupe lockfile`) | runs
`pnpm dedupe` once | kept; runs `pnpm dedupe` twice |
| `vercel` (root devDependency) | `^57.0.0` | `^60.1.3` |

- **Lockfile:** main's lockfile after #2039, plus this PR's changes as
pnpm 12.6.0 re-applied them. Those changes are the
`packageManagerDependencies` block, the `[email protected]` tree with the
optional-peer suffixes it brings, and `autoDedupe`'s dedupes: the same
`zod` and `gaxios` ones as the pending #2052, plus the peer toggle
described below. No other versions change, and `[email protected]`
stays put. #2039's refresh had already removed the three duplicates the
first revision collapsed.
- **Vercel CLI:** pnpm 12 writes the lockfile as two YAML documents.
`vercel@57`'s bundled `@vercel/build-utils` reads only the first, falls
back to npm, and fails on `workspace:*`, which is #2043's failure.
`58.9.5` is the first CLI that parses it, and every release from
`58.7.0` on ships without npm provenance (still published from GitHub
Actions OIDC). So `trustPolicy: no-downgrade` needs the exact versions
pnpm reports as `ERR_PNPM_TRUST_DOWNGRADE` in `trustPolicyExclude`:
`[email protected]` and 31 `@vercel/*` packages.
- **CI setup:** `pnpm/setup` reads `packageManager`, installs Node LTS,
runs `pnpm install`, and caches pnpm's lockfile-verification verdict
across jobs, which saves the ~28s supply-chain check. `ailf-eval.yml`
passes `runtime: node@lts` instead of `node-version: lts/*`.
`release.yml` keeps `pnpm/action-setup` + `actions/setup-node`, as in
ui.
- **Store cache off, unlike ui** (commit `bddef7a4`). With `cache:
true`, `pnpm/setup` uploads a new ~645 MiB store entry after every job,
even for an unchanged lockfile, because its keys include the run id.
That was 12 entries (7.7 GB) per push here, evicting the Playwright
browser caches the e2e jobs reuse. With it off, test shards spend 16–19s
in setup and nothing afterwards, against 19–23s plus 9–12s of upload
with it on. ui keeps `cache: true` and has the same issue. Revert
`bddef7a4` to match ui.
- **`Dedupe lockfile` workflow kept, adapted for pnpm 12** (commit
`a7e1057f`). On the current lockfile, pnpm 12.6.0's `pnpm dedupe` isn't
idempotent. Each run toggles `@vitejs/devtools` and
`oxc-transform-react` in the peer suffixes of
`plugins/@sanity/debug-preview-url-secret-plugin`'s `sanity` and
`@sanity/tsdown-config` entries, without changing any version. Run once,
as before, the workflow would open a toggle-only PR after every lockfile
change on `main`, and each automerged dedupe PR would trigger the next.
A second run undoes the toggle and keeps real dedupes. An earlier commit
in this branch deleted the workflow; `82810b5e` reverts that.
- **Docs:** AGENTS.md, CONTRIBUTING.md and README.md now require pnpm
v12. AGENTS.md and `e2e/README.md` explain the two-document lockfile and
the Vercel CLI floor; per Copilot's review of #2044, the trust-policy
wording only lists versions that pnpm reports as downgrades. AGENTS.md
also says not to commit lockfile diffs that only flip the peer toggle.

No changeset: no published package's manifest or runtime code changes,
as with the pnpm 11 bump in #1579.

## Merge with main

`main` gained one commit after this branch started: Renovate's lock file
maintenance (#2039, `cb68d65e`). It conflicted only in `pnpm-lock.yaml`.
`main` is merged in rather than rebased, so nothing was force-pushed.
The resolution takes main's lockfile and lets pnpm 12.6.0 re-apply this
PR's changes; `pnpm-workspace.yaml` needed no further changes. #2039's
25 source files merged cleanly.

## What Cody needs to do

- **Add the "🤖 bot" label.** The agent's label tool can't edit PRs in
this repo.
- **Close #2044 and #1131** when this lands. Renovate autocloses #2043.
The pending dedupe PR #2052 is redundant, since its four lines are
already in this lockfile. It merges cleanly with this PR in either
order.
- **Vercel:** nothing to set up. No project, env var or `vercel.json`
changes; only the root `vercel` CLI devDependency moves.
- **Secrets and ruleset:** no new secrets, and the required checks
(`lint`, `build`, `test`, Socket) keep their names.

## Open questions

1. **Vercel CLI trust exclusions.** This is #2044's call, which
overrides the reason #1890 was closed: 32 exact versions without
provenance in `trustPolicyExclude`. Every future `vercel` bump has to
add its own versions, so Renovate's `vercel` PRs will fail their
artifact update until someone does. The alternative is e2e previews that
can't build on pnpm 12.
2. **`strictPeerDependencies: false`** matches ui but is already pnpm's
default; ui carried it over from an old `.npmrc`. Keep it for parity, or
drop it?
3. **Store cache in ui.** ui has the same per-job uploads. Turn its
store cache off too?

## Known pnpm 12.6.0 issue

The peer toggle also shows up locally. A fresh `pnpm install`, or the
implicit install pnpm runs before scripts when `node_modules` looks
stale, flips those two suffixes in `pnpm-lock.yaml`. Frozen installs,
which CI uses, never do. The lockfile before #2039 didn't toggle; main's
refreshed resolutions exposed it, and it happens with `autoDedupe` off
too.

## Not in this PR

- vitest 5, oxfmt (#2047), oxlint (#2049) and the tsdown setup are
sibling PRs. Whichever lands later merges `main` and regenerates the
lockfile.
- ui's `packageExtensions` entry for `@testing-library/jest-dom` belongs
to its vitest 5 setup.
- ui's root `engines.node: ">=22.13"` and macOS test job are Node and
test-matrix changes, not pnpm. Plugins' tooling needs Node ≥ 22.18
anyway (AGENTS.md).
- Plugins-specific pnpm settings that ui doesn't have (`trustPolicy`,
`dedupePeers`, `dedupeDirectDeps`, `publicHoistPattern`) stay.

## Verification

- **Lockfile:** regenerated on `main` at `cb68d65e` by pnpm 12.6.0 run
directly on Node 24.21.0. A cold `pnpm install --frozen-lockfile` passes
the supply-chain check (2,615 entries), and without the Vercel
exclusions it fails with `ERR_PNPM_TRUST_DOWNGRADE`.
- **Dedupe workflow:** from the committed lockfile, from its toggled
state, and from the committed lockfile with #2052's duplicates put back,
two `CI=true pnpm dedupe --config.ignore-scripts=true` runs give,
respectively, no change, no change, and exactly #2052's dedupes. A
single run gives the toggle every time.
- **Local checks on the merged tree:** `pnpm lint`, `pnpm knip`, `pnpm
build` (52/52 tasks) and `pnpm test run` (224 files, 1,391 tests) pass.
- **CI:** everything passes on `bddef7a4`, including `deploy-preview`
(Vercel CLI 60.1.3 detects the lockfile and installs with pnpm 12.6.0)
and e2e on Chromium and Firefox. CI on `a7e1057f`, which only touches
the dedupe workflow and AGENTS.md, is running.
- **zizmor:** `zizmor .github` reports the same findings as on `main` at
every severity.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-0c45b56b-fd33-55f7-b22c-89bde73748e4?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-0c45b56b-fd33-55f7-b22c-89bde73748e4&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 5293b52f Deployed Jun 17, 2026 by vercel[bot]
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.

3 participants