Skip to content

chore(admin-ui): bump pnpm to 10+ everywhere and keep overrides only in pnpm-workspace.yaml #136

Open

Description

@Manuthor

Problem

admin-ui is built and checked with pnpm 9 (CI, Nix, mise) while Dependabot runs pnpm 12.x (Installed version of pnpm: 12.10.1, Dependabot job of run 43935320583). pnpm 12 ignores pnpm.overrides in package.json (it reads them only from pnpm-workspace.yaml), so the Dependabot lockfile of #135 was written without the overrides: block and pnpm 9 rejected it on develop (ERR_PNPM_LOCKFILE_CONFIG_MISMATCH).

PR #134 works around it by declaring the same overrides in both admin-ui/package.json and admin-ui/pnpm-workspace.yaml, plus a jq/yq guard step in admin-ui.yml that fails on drift. That is a workaround, not a fix: two copies to maintain and a CI step to police them.

Constraint found: the pinned nixpkgs has no pnpm >= 10

default.nix pins nixpkgs 8b27c1239e5c421a2bbc2c65d52e4a6fbf2ff296. Evaluating it:

attribute result
pnpm_9 / pnpm 9.12.3
pnpm_10, pnpm_11, pnpm_12 do not exist (the error suggests only pnpm_8 or pnpm_9)

So the Nix build cannot move to pnpm 10+ without bumping the nixpkgs pin (or packaging pnpm another way), which also changes fetchDeps/configHook and the admin-ui.pnpm.* hashes. Decide this first.

Where pnpm 9 is pinned

  • mise.toml:10: "npm:pnpm" = "9" (documented in admin-ui/DEV_GUIDE.md)
  • .github/workflows/admin-ui.yml: pnpm/action-setup version: 9 at lines 29, 64, 86 and 125
  • nix/admin-ui.nix: pkgs.pnpm_9.fetchDeps (line 57), pkgs.pnpm_9 and pkgs.pnpm_9.configHook (lines 106-107), and the pnpm 9.12.3 sandbox workaround that patches pnpm.cjs to re-create the lost overrides: block (comment starting at line 20)
  • admin-ui/package.json: no packageManager field, so nothing tells Dependabot or contributors which pnpm to use
  • .pre-commit-config.yaml:114: the admin-ui-lockfile hook runs whatever pnpm is on the PATH
  • Docs: AGENTS.md and nix/expected-hashes/README.md (pnpm hash instructions)

Acceptance criteria

  • One pnpm major (10 or newer) is used by CI, mise, pre-commit and Nix, and is declared in package.json packageManager.
  • The overrides exist only in admin-ui/pnpm-workspace.yaml; package.json pnpm.overrides and the "pnpm overrides match" step of admin-ui.yml are deleted.
  • The nixpkgs pin provides that pnpm (bump default.nix if needed) and the sandbox workaround in nix/admin-ui.nix is removed or shown to be still required.
  • admin-ui/pnpm-lock.yaml and all three nix/expected-hashes/admin-ui.pnpm.*.sha256 files are regenerated, each from a build on its own platform.
  • pnpm install --frozen-lockfile passes in the Admin UI workflow, in nix-build -A admin-ui and in the pre-commit hook.
  • The next Dependabot PR on /admin-ui keeps the overrides: block in its lockfile and passes CI without a manual fix.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or requestfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions