Skip to content

Migrate package manager from Yarn to pnpm - #143

Merged
vogelsgesang merged 1 commit into
mainfrom
pnpm-migrate
Aug 22, 2026
Merged

vogelsgesang merged 1 commit into
mainfrom
pnpm-migrate

Conversation

@vogelsgesang

Copy link
Copy Markdown
Collaborator

Switch the monorepo from Yarn (classic) to pnpm and modernize CI.

Package manager and workspace:

  • Add packageManager: pnpm@11.21.0 and engines.node >=24 (the repo previously pinned neither; CI ran on Node ^20.18.0, so this also raises the Node floor to 24).
  • Replace the root workspaces array with pnpm-workspace.yaml; the members (query-graphs, standalone-app, upload-server) are unchanged. plan-dumper is a Python tool and is intentionally not a workspace member.
  • Point standalone-app at the core library via workspace:^.
  • Remove yarn.lock and regenerate pnpm-lock.yaml; this bumped all dependency versions to the latest version within the declared ranges.
  • Add .pnpm-store to .gitignore.

Declare missing dependencies that Yarn's hoisting had masked (pnpm's isolated node_modules surfaces them as errors):

  • root: @eslint/js and globals (imported by the ESLint flat config).
  • query-graphs: @types/react and @types/react-dom (needed for the library's declaration emit; otherwise tsc fails with TS2742 under pnpm's non-hoisted layout).

CI (.github/workflows/ci.yaml):

  • Replace the manual yarn cache (actions/cache plus the deprecated ::set-output dance) with pnpm/action-setup and setup-node's cache: 'pnpm'; pin node-version: 24.
  • Install with pnpm install --frozen-lockfile; build all modules with a single pnpm -r build, which pnpm runs in workspace-dependency order (query-graphs before standalone-app), replacing the two per-module build steps.
  • Bump peaceiris/actions-gh-pages v3 -> v4.

Other:

  • Fix the query-graphs clean script: it ran rimraf dist/, but the tsc outDir is lib/, so it never removed the build output or the incremental tsconfig.tsbuildinfo. Point it at lib/ and the buildinfo so a clean actually forces a fresh tsc --build.
  • media: give the logo SVG unitless (px) width/height matching its viewBox instead of millimetre units. The freshly-resolved, newer sharp (pulled in via favicons) rasterizes mm-unit SVGs at a size that grows quadratically with the requested density, overshooting sharp's input-pixel limit on the large iOS appleStartup splash images and failing the build. Unitless dimensions scale linearly and render identically (the app sizes the logo via CSS).
  • Reformat one line in postgres.ts (flagged by newer Prettier).
  • Update the developer docs and agent guide to reference pnpm.

Switch the monorepo from Yarn (classic) to pnpm and modernize CI.

Package manager and workspace:
- Add `packageManager: pnpm@11.21.0` and `engines.node >=24` (the repo
  previously pinned neither; CI ran on Node `^20.18.0`, so this also
  raises the Node floor to 24).
- Replace the root `workspaces` array with `pnpm-workspace.yaml`; the
  members (query-graphs, standalone-app, upload-server) are unchanged.
  plan-dumper is a Python tool and is intentionally not a workspace member.
- Point standalone-app at the core library via `workspace:^`.
- Remove `yarn.lock` and regenerate `pnpm-lock.yaml`; this bumped all
  dependency versions to the latest version within the declared ranges.
- Add `.pnpm-store` to `.gitignore`.

Declare missing dependencies that Yarn's hoisting had masked (pnpm's
isolated node_modules surfaces them as errors):
- root: `@eslint/js` and `globals` (imported by the ESLint flat config).
- query-graphs: `@types/react` and `@types/react-dom` (needed for the
  library's declaration emit; otherwise `tsc` fails with TS2742 under
  pnpm's non-hoisted layout).

CI (.github/workflows/ci.yaml):
- Replace the manual yarn cache (`actions/cache` plus the deprecated
  `::set-output` dance) with `pnpm/action-setup` and setup-node's
  `cache: 'pnpm'`; pin `node-version: 24`.
- Install with `pnpm install --frozen-lockfile`; build all modules with
  a single `pnpm -r build`, which pnpm runs in workspace-dependency
  order (query-graphs before standalone-app), replacing the two
  per-module build steps.
- Bump peaceiris/actions-gh-pages v3 -> v4.

Other:
- Fix the query-graphs `clean` script: it ran `rimraf dist/`, but the
  `tsc` outDir is `lib/`, so it never removed the build output or the
  incremental `tsconfig.tsbuildinfo`. Point it at `lib/` and the
  buildinfo so a clean actually forces a fresh `tsc --build`.
- media: give the logo SVG unitless (px) `width`/`height` matching its
  `viewBox` instead of millimetre units. The freshly-resolved, newer
  `sharp` (pulled in via `favicons`) rasterizes mm-unit SVGs at a size
  that grows quadratically with the requested density, overshooting
  sharp's input-pixel limit on the large iOS `appleStartup` splash
  images and failing the build. Unitless dimensions scale linearly and
  render identically (the app sizes the logo via CSS).
- Reformat one line in postgres.ts (flagged by newer Prettier).
- Update the developer docs and agent guide to reference pnpm.
@vogelsgesang
vogelsgesang merged commit c7651fd into main Aug 22, 2026
5 checks passed
@vogelsgesang
vogelsgesang deleted the pnpm-migrate branch August 22, 2026 11:33
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.

1 participant