Skip to content

Standardize the fleet on pnpm (one package manager, one lockfile, pnpm CI everywhere)Β #1

Description

@rep0x

🎯 Goal

Standardize every Node repo in the MIND-Studio org on pnpm β€” one package manager, one lockfile format, one CI install path. Today the fleet is split (mostly npm, a few pnpm, one repo with no committed lockfile at all), which causes drift, mismatched lockfiles, and per-repo special-casing during cross-fleet work (e.g. the recent @mind-studio/ui 0.7.0 rollout, where two PRs shipped the wrong lockfile type).

πŸ“Š Current state (survey 2026-06-21)

Repo Pkg mgr CI Action
ui pnpm βœ… ⭐ reference β€” already standard
compass pnpm ❌ no ci.yml keep pnpm Β· βž• add CI
mind-maps pnpm ❌ no ci.yml keep pnpm Β· βž• add CI
product pnpm ❌ no ci.yml keep pnpm Β· βž• add CI
builder npm βœ… πŸ” convert β†’ pnpm
calendar npm βœ… πŸ” convert β†’ pnpm
chat npm βœ… πŸ” convert β†’ pnpm
codespaces npm βœ… πŸ” convert β†’ pnpm
contacts npm βœ… πŸ” convert β†’ pnpm
dock npm βœ… πŸ” convert β†’ pnpm
drive npm βœ… πŸ” convert β†’ pnpm
landing npm βœ… πŸ” convert β†’ pnpm
mind-cli npm βœ… πŸ” convert β†’ pnpm
notes npm βœ… πŸ” convert β†’ pnpm
photos npm βœ… πŸ” convert β†’ pnpm
projects npm βœ… πŸ” convert β†’ pnpm
shell npm βœ… πŸ” convert β†’ pnpm
slides npm βœ… πŸ” convert β†’ pnpm
videos npm βœ… πŸ” convert β†’ pnpm
whiteboard npm βœ… πŸ” convert β†’ pnpm
core ⚠️ none βœ… πŸ” adopt pnpm (no lockfile committed today)

Totals: 4 already pnpm Β· 16 npm to convert Β· 1 (core) with no committed lockfile Β· 3 pnpm repos missing CI.

πŸ”§ Per-repo conversion recipe

Use ui as the reference for .npmrc, packageManager pin, and CI shape.

  1. Generate the pnpm lockfile from the existing npm one (preserves resolved versions): pnpm import β†’ then pnpm install to materialize. For core (no lockfile), just pnpm install.
  2. Remove npm lockfile: git rm package-lock.json.
  3. Pin the toolchain: add "packageManager": "pnpm@<version>" to package.json (match ui's pinned version) so Corepack uses one pnpm everywhere. (No repo sets this today.)
  4. Keep .npmrc pointing @mind-studio at GitHub Packages β€” unchanged; pnpm reads the same ${NODE_AUTH_TOKEN}.
  5. Update CI (.github/workflows/*.yml): add pnpm/action-setup (or corepack enable), set actions/setup-node cache: pnpm, and swap commands:
    • npm ci β†’ pnpm install --frozen-lockfile
    • npm run <x> β†’ pnpm <x> Β· npx <x> β†’ pnpm dlx <x> (or pnpm exec)
    • keep the NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN || secrets.GITHUB_TOKEN }} env on install/build steps.
  6. Sweep other npm call sites: Dockerfiles, release.yml/release-please.yml, husky hooks (lint-staged), README/CONTRIBUTING, and any scripts/* that shell out to npm/npx.
  7. Verify: pnpm install --frozen-lockfile && pnpm typecheck && pnpm build (and pnpm test where present) green.
  8. Conventional Commit per repo, e.g. build: standardize on pnpm (no JIRA id).

βž• Add CI to the pnpm repos that lack it

compass, mind-maps, product have no ci.yml. Add the standard pnpm CI (lint + typecheck + test + build) as part of this effort so "pnpm everywhere" also means "verified everywhere."

πŸ›οΈ Make it the org standard

Update the org standards in MIND-Studio/.github to mandate pnpm (pinned via packageManager + Corepack) for all Node repos, so new repos start compliant and reviews can enforce it.

⚠️ Sequencing note β€” coordinate with the ui 0.7.0 rollout

The @mind-studio/ui 0.7.0 brand refresh (ui#29) currently has open PRs touching package.json + lockfiles in 15 repos. To avoid churn/conflicts, convert each repo to pnpm AFTER its brand-refresh bump PR merges (or fold the conversion into that PR where it's still open). Do not run both passes on the same repo simultaneously.

βœ… Acceptance criteria

  • Every Node repo listed above uses pnpm: a committed pnpm-lock.yaml, no package-lock.json/yarn.lock, and a packageManager: pnpm@<v> pin.
  • All CI/release workflows install with pnpm install --frozen-lockfile and run pnpm-prefixed scripts; NODE_AUTH_TOKEN still wired for GitHub Packages.
  • No remaining npm/npx invocations in Dockerfiles, scripts, hooks, or docs.
  • compass, mind-maps, product have a working CI workflow.
  • MIND-Studio/.github standards updated to require pnpm.
  • Each repo green on pnpm install --frozen-lockfile && pnpm build (+ typecheck/test where present).

πŸ”— Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions