Skip to content

chore: migrate from yarn to pnpm and Node 24 - #102

Merged
maaaathis merged 2 commits into
mainfrom
chore/migrate-to-pnpm
Nov 19, 2026
Merged

maaaathis merged 2 commits into
mainfrom
chore/migrate-to-pnpm

Conversation

@ntdoJanneck

@ntdoJanneck ntdoJanneck commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Why

Moves the monorepo from Yarn 4 to pnpm (pnpm@12.21.0, pinned via packageManager) and puts every place that names a Node version on Node 24.

What changed

  • Lockfile: yarn.lock was converted with pnpm import, so all resolved versions stay the same. .yarn/, .yarnrc.yml and yarn.lock are gone.
  • Workspace: new pnpm-workspace.yaml. pnpm doesn't run dependency install scripts by default, so it allows them for esbuild, nx and puppeteer (puppeteer downloads Chrome for the executor).
  • Undeclared dependencies: pnpm doesn't hoist like Yarn's node-modules linker did, so packages that were used but not declared stopped resolving:
    • web2 now declares @internationalized/date, cron-parser and mongodb, at the versions that were already installed.
    • executor imported @typegoose/typegoose without declaring it. Adding it there would have given the executor its own mongoose instance, and isDocument() (an instanceof check) would then return false for documents loaded through storage. Instead, storage now re-exports isDocument and DocumentType, and the executor imports them from there.
  • Dockerfiles: install with pnpm install --frozen-lockfile, filtered to the root plus the image's package and its workspace dependencies (so the web image still doesn't pull in puppeteer). The web runtime stage also copies packages/web2/node_modules, because pnpm links each project's dependencies there, and starts srvx from that folder.
  • CI: pnpm/action-setup (SHA-pinned, reads packageManager) and setup-node with cache: pnpm.
  • Scripts (yarn workspaces foreach … → pnpm --recursive --parallel run dev, yarn build → pnpm build), .gitignore, .dockerignore, .gitattributes and the README are updated.

Node 24

  • Dockerfiles: node:24 / node:24-slim (still ships Corepack; the executor's --no-experimental-require-module flag still works).
  • New .nvmrc (24); CI reads it via node-version-file instead of the hard-coded Node 20.
  • Root package.json declares engines.node: ">=24".
  • @types/node is ^24 in every package. Root and web2 now declare it too, so vite/vitest no longer pull in @types/node 22 transitively.
  • README says Node 24 or higher.

Testing

  • pnpm install --frozen-lockfile from a clean node_modules, on Node 24
  • pnpm build, pnpm lint, pnpm typecheck, pnpm test (8/8) pass; pnpm format:check passes for storage and executor (web2 only flags my local, gitignored .output/ folder)
  • Both Docker images build locally on Node 24 (container reports v24.22.3). Both containers start, resolve all modules, and fail only on the deliberately unreachable MongoDB. A real scan was not run.

For reviewers / after merge

Locally: switch to Node 24 (nvm use), run corepack enable, delete node_modules (including packages/*/node_modules), then run pnpm install.

🤖 Generated with Claude Code

ntdoJanneck and others added 2 commits November 19, 2026 13:52
Replace Yarn 4 with pnpm 12.21.0, pinned via packageManager. The lockfile
was converted with `pnpm import`, so resolved versions stay the same.

- Add pnpm-workspace.yaml; allow the install scripts of esbuild, nx and
  puppeteer (puppeteer downloads Chrome for the executor).
- Declare dependencies that only resolved through Yarn's hoisting:
  web2 now lists @internationalized/date, cron-parser and mongodb.
- The executor imported @typegoose/typegoose without declaring it. Under
  pnpm it would get its own mongoose copy, and isDocument() would then
  fail its instanceof check for models from storage. Storage now
  re-exports isDocument and DocumentType, and the executor imports them
  from there.
- Dockerfiles install with --frozen-lockfile, filtered to the image's
  packages; the web image also copies web2's node_modules and starts srvx
  from there.
- CI sets up pnpm via pnpm/action-setup and caches the pnpm store.
- Update scripts, ignore files and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Docker images build and run on node:24 / node:24-slim.
- Add .nvmrc (24); CI reads it via setup-node's node-version-file
  instead of a hard-coded Node 20.
- Require Node >= 24 via engines in the root package.json.
- Align @types/node on ^24 in all packages; the root and web2 declare it
  too, so vite/vitest no longer pull in @types/node 22 transitively.
- README: Node 24 or higher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ntdoJanneck ntdoJanneck changed the title chore: migrate from yarn to pnpm chore: migrate from yarn to pnpm and Node 24 Nov 19, 2026
@maaaathis
maaaathis merged commit f6f1e86 into main Nov 19, 2026
3 checks passed
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.

2 participants