fix(ci): declare packageManager for pnpm/action-setup #6

Merged
julien merged 2 commits from fix/ci/pin-pnpm-version into main 2026-05-04 12:36:38 +02:00
Owner

Summary

  • Add "packageManager": "pnpm@10.33.2" to root package.json.

Motivation

The smoke-test CI run got past actions/checkout@v4 (runner image fix from PR #4 working), but failed on pnpm/action-setup@v3 with:

Error: No pnpm version is specified.
Please specify it by one of the following ways:
  - in the GitHub Action config with the key "version"
  - in the package.json with the key "packageManager"

The action looks at package.json's packageManager field by default. Setting it there (rather than hardcoding version: in every workflow YAML) is the single-source-of-truth approach: corepack reads the same field locally, so dev environments and CI converge automatically.

Implementation notes

  • Pinned to pnpm@10.33.2 (the exact version the workspace was bootstrapped with). Future bumps go through a dedicated chore(deps): bump pnpm to X.Y.Z PR that updates this field — keeps CI and local dev in lockstep.
  • corepack will pick up this declaration on the next corepack enable or pnpm invocation. Devs already on 10.33.2 see no change; devs on a different version are nudged onto the canonical one.
  • Workflow YAMLs (.gitea/workflows/ci.yml, security-scheduled.yml) untouched — pnpm/action-setup@v3 reads packageManager directly.

Verification

  • Next CI run succeeds at pnpm/action-setup@v3 (= the step that fails on smoke-test PR currently). Confirmed by re-pushing to the smoke-test branch (or any other PR) after this one merges.
  • pnpm install locally still works with the declaration (no change for someone already on 10.33.2).

Related

  • Follow-up to PR #4 (runner image fix). Together they unblock the CI gates.
  • Smoke-test PR can be closed once a real PR (e.g. the upcoming "Local infra recipe") demonstrates green CI end to end.
## Summary - Add `"packageManager": "pnpm@10.33.2"` to root `package.json`. ## Motivation The smoke-test CI run got past `actions/checkout@v4` (runner image fix from PR #4 working), but failed on `pnpm/action-setup@v3` with: ``` Error: No pnpm version is specified. Please specify it by one of the following ways: - in the GitHub Action config with the key "version" - in the package.json with the key "packageManager" ``` The action looks at `package.json`'s `packageManager` field by default. Setting it there (rather than hardcoding `version:` in every workflow YAML) is the single-source-of-truth approach: corepack reads the same field locally, so dev environments and CI converge automatically. ## Implementation notes - Pinned to `pnpm@10.33.2` (the exact version the workspace was bootstrapped with). Future bumps go through a dedicated `chore(deps): bump pnpm to X.Y.Z` PR that updates this field — keeps CI and local dev in lockstep. - `corepack` will pick up this declaration on the next `corepack enable` or pnpm invocation. Devs already on 10.33.2 see no change; devs on a different version are nudged onto the canonical one. - Workflow YAMLs (`.gitea/workflows/ci.yml`, `security-scheduled.yml`) untouched — `pnpm/action-setup@v3` reads `packageManager` directly. ## Verification - [x] Next CI run succeeds at `pnpm/action-setup@v3` (= the step that fails on smoke-test PR currently). Confirmed by re-pushing to the smoke-test branch (or any other PR) after this one merges. - [x] `pnpm install` locally still works with the declaration (no change for someone already on 10.33.2). ## Related - Follow-up to PR #4 (runner image fix). Together they unblock the CI gates. - Smoke-test PR can be closed once a real PR (e.g. the upcoming "Local infra recipe") demonstrates green CI end to end.
julien added 2 commits 2026-05-04 12:06:05 +02:00
chore: smoke-test CI runner image
CI / check (pull_request) Failing after 9s
CI / commits (pull_request) Failing after 7s
CI / a11y (pull_request) Failing after 6s
CI / perf (pull_request) Failing after 17s
CI / scan (pull_request) Has been cancelled
68e177615a
fix(ci): declare packageManager so pnpm/action-setup picks the right version
CI / scan (pull_request) Failing after 6m11s
CI / check (pull_request) Successful in 10m15s
CI / commits (pull_request) Successful in 10m18s
CI / perf (pull_request) Failing after 5m14s
CI / a11y (pull_request) Successful in 9m46s
c104adb226
pnpm/action-setup@v3 needs to know which pnpm version to install,
either via a `version:` input in the workflow YAML or via the
`packageManager` field of package.json. Neither was set, so the
action's self-installer aborts with `No pnpm version is specified`,
breaking every CI job that calls it (check, scan, perf, commits).

Add `"packageManager": "pnpm@10.33.2"` to package.json — single
source of truth for the workspace, also picked up by `corepack` so
local dev gets the same version automatically. Workflow YAMLs stay
untouched (the action reads packageManager directly).

Pinned to the exact 10.33.2 that the workspace was bootstrapped with.
Future bumps go through a `chore(deps):` PR and update this field
explicitly so CI and local dev stay in lockstep.
julien merged commit 25093db0b9 into main 2026-05-04 12:36:38 +02:00
julien deleted branch fix/ci/pin-pnpm-version 2026-05-04 12:36:39 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: julien/apf_portal#6