chore: align Dockerfile pnpm pin with vendored packageManager #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Dockerfile activates pnpm via corepack at a hard-coded version:
But the vendored
package.jsondeclares a different version:Why this is harmless today
When CI runs
pnpm installinside a project that has apackageManagerfield, corepack honours the field — it downloadspnpm@10.33.4toCOREPACK_HOME(/opt/corepack, which is persisted in the image) and uses that version, not the 10.33.2 baked in. So the actual install always matches what the FE repo declares.Why it's still worth fixing
corepack prepare pnpm@10.33.2 --activateline is now a vestigial pin that no longer reflects reality. It also wastes a network round-trip at CI cold-start, because corepack has to fetch 10.33.4 on top of the baked 10.33.2.pnpm install --frozen-lockfilepopulating/opt/pnpm-store) DOES use the project'spackageManager(10.33.4), so the baked store is 10.33.4-shaped. The 10.33.2 pin only fires when something runspnpmoutside a project — unlikely, but a footgun.packageManagerfield via the FE repo and the manifests get re-vendored here automatically. The Dockerfile pin doesn't move with it, so the gap will keep widening.Fix options
Drop the version from
corepack prepareand let corepack resolve from the project'spackageManagerat first invocation:This is the cleanest — one source of truth (
package.json). Downside: cold-start in the prefetch step pays the corepack download.Read the version from the vendored
package.jsonat build time so the Dockerfile stays in sync without manual edits:…with the build workflow passing
--build-arg PNPM_VERSION=$(jq -r '.packageManager | split("@") | .[1]' package.json). More moving parts but no drift.Just bump the literal to
pnpm@10.33.4. Cheapest fix, but the drift will reappear on the next renovate pnpm bump.Option 1 is probably the right one — the
packageManagerfield is the canonical source and is already what wins at install time.Observed in
CI-image commit
76bc1b1 bump package json(the manifest bump after the FE landedpnpm@10.33.4via #219). Image tagsha-76bc1b1ships this drift; everything earlier shipped 10.33.2 in both places.