aws / aws/graph-explorer

Update pnpm to the latest 12.x release

Open
#2,155 0 comments 0 reactions 0 assignees View on GitHub
dependencies internal tech debt
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

`pnpm` is pinned at 11.9.0 via `packageManager` in the root `package.json`, with `engines.pnpm` set to
`>=11.9.0`. Latest 11.x is 11.26.0. It was left alone in the latest dependency sweep because it does not
behave like an ordinary manifest bump.

## Why it was held back

pnpm records its own version inside the lockfile, in a `packageManagerDependencies` block under the root
importer:

```yaml
importers:
.:
configDependencies: {}
packageManagerDependencies:
'@pnpm/exe':
specifier: 11.9.0
version: 11.9.0
pnpm:
specifier: 11.9.0
version: 11.9.0
```

Editing `packageManager` to 11.26.0 does not update that block. `pnpm install`, `pnpm install
--lockfile-only`, and even `pnpm install --force` all report "Already up to date" and leave the
11.9.0 specifiers in place, along with the `@pnpm/exe@11.9.0` and per-platform `@pnpm/*@11.9.0`
entries in the `packages:` section. Deleting the block by hand doesn't help either — nothing
regenerates it, and the orphaned `packages:` entries are not pruned.

So the bump needs someone to work out the right procedure rather than just edit two fields.

## Work

- Bump `packageManager` to `pnpm@11.26.0` with a matching `+sha512.` integrity hash. The hash is
the hex encoding of npm's base64 `dist.integrity`, not the base64 itself:
`node -e "console.log(Buffer.from(process.argv[1].replace('sha512-',''),'base64').toString('hex'))" "$(npm view pnpm@11.26.0 dist.integrity)"`.
`corepack use pnpm@11.26.0` should write it correctly too.
- Raise `engines.pnpm` to `>=11.26.0` and update the requirement in `docs/development.md`.
- Get the lockfile's `packageManagerDependencies` block and the `@pnpm/exe` / `@pnpm/*` package entries
onto 11.26.0 consistently. Worth checking whether the repo should rely on pnpm's own version
management or on corepack, since the two disagree about who owns this.

## Acceptance

`packageManager`, `engines.pnpm`, `docs/development.md`, and the lockfile all agree on 11.26.0;
`pnpm install --frozen-lockfile` succeeds from a clean checkout; `pnpm checks` and `pnpm test` pass; CI
is green.

> [!IMPORTANT]
> Internal only — this issue is maintained by the core team and is not accepting external contributions.

Contributor guide

Open the contributing guide

Research direction

Start with the root package.json, pnpm-lock.yaml, and docs/development.md, then compare the effects of corepack use pnpm@11.26.0 and the documented pnpm commands. Verify that all version references and lockfile entries agree, then run pnpm install --frozen-lockfile, pnpm checks, and pnpm test; the acceptance criteria also require green CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
build-system, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.