Skip to content

chore: replace Rush with pnpm workspaces and move to Node 22 - #58

Open
jrhender wants to merge 1 commit into
developfrom
chore/pnpm-workspaces-node22
Open

chore: replace Rush with pnpm workspaces and move to Node 22#58
jrhender wants to merge 1 commit into
developfrom
chore/pnpm-workspaces-node22

Conversation

@jrhender

@jrhender jrhender commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

First of five stacked PRs for #57.

  • Replaces Rush 5.100/pnpm 8 with plain pnpm 11 workspaces: root pnpm-workspace.yaml with a catalog for shared dependency versions (the pnpm-native replacement for Rush's ensureConsistentVersions), a single root lockfile, and root build/test scripts. rush.json and common/ are gone; the pre-commit hook (openapi regen + pretty-quick) moved to .githooks/ wired via core.hooksPath; the Credo pnpm patch moved to patches/.
  • Node 18 → 22 (.nvmrc, CI, Dockerfile). Node 22 rather than 24 because Credo 0.5's native bindings (@2060.io/ref-napi) only ship prebuilds up to Node 22 and fail to compile with Debian bookworm's gcc; the Credo 0.7 PR in this stack removes those bindings and bumps to Node 24.
  • CI uses pnpm/action-setup + setup-node@v5 with pnpm caching; the Dockerfile installs with pnpm and replaces rush deploy with pnpm deploy --legacy.
  • Version pins to keep behaviour identical while regenerating the lockfile from scratch: @credo-ts/* 0.5.10 (the patched version), @nestjs/config ~3.2.3, class-validator 0.14.1 (0.14.2+ changes nested validation), reflect-metadata ^0.1 everywhere (mixed 0.1/0.2 peers split @nestjs/core into multiple DI-incompatible instances), @peculiar/* type pins (removed by the TS 5.9 PR).
  • axios ~1.4 → ~1.18: 1.4 throws Invalid URL on newer Node.

Verification

  • pnpm install, pnpm run build, all unit suites, the did library suite and the standalone e2e project pass on Node 22
  • Docker image builds and runs: seeder seeds its DIDs, Swagger serves, DID creation works
  • 4 Resident Card e2e tests require w3id.org network access (JSON-LD contexts) and pass only where the network allows; covered by CI

Part of #57

🤖 Generated with Claude Code

Migrate the monorepo from Rush 5.100/pnpm 8 to plain pnpm workspaces:
- root pnpm-workspace.yaml with a catalog for shared dependency versions
  (replaces Rush's ensureConsistentVersions) and a single root lockfile
- delete rush.json and common/ (config, scripts, autoinstallers); the
  pre-commit hook moves to .githooks wired up via git core.hooksPath
- pnpm patch for @credo-ts/core moves to patches/

Node 18 -> 22 (.nvmrc, CI, Dockerfile). Node 22 rather than 24 because
Credo 0.5's native bindings (@2060.io/ref-napi) only have prebuilds up
to Node 22 and fail to compile with Debian bookworm's gcc; the Credo
0.7 migration removes those bindings and will bump to Node 24.

CI now uses pnpm/action-setup + setup-node@v5 with pnpm caching. The
Dockerfile installs with pnpm and replaces 'rush deploy' with
'pnpm deploy'.

Version pins needed to keep behaviour identical while regenerating the
lockfile from scratch:
- @credo-ts/* pinned to 0.5.10 (the version the removed patch targets)
- @nestjs/config ~3.2.3 (3.3.0 makes forRoot async)
- class-validator 0.14.1 override (0.14.2+ changes nested validation)
- reflect-metadata ^0.1.13 everywhere (auto-installed 0.2.x peers split
  @nestjs/core into multiple instances and broke DI in tests/e2e)
- @peculiar/asn1-schema + webcrypto-core overrides (newer versions need
  TypeScript >= 5 type resolution; remove with the TS upgrade)

axios ~1.4 -> ~1.18 because 1.4 throws 'Invalid URL' on Node >= 24 and
newer Node 22 releases.

Part of #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Henderson <jrhender@users.noreply.github.com>
@jrhender
jrhender force-pushed the chore/pnpm-workspaces-node22 branch from 57f8efe to 354d97e Compare July 3, 2026 13:18
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