chore: migrate monorepo from npm to pnpm (tooling, Docker, docs) #169
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
What is the current behavior?
The monorepo currently:
npm
with a committedpackage-lock.json
pnpm-workspace.yaml
)npx
or globally installedturbo
in Docker imagesnpm
/npx
What is the new behavior?
pnpm
with pinned version via"packageManager": "[email protected]"
pnpm-workspace.yaml
(apps/*
,packages/*
)pnpm-lock.yaml
, removedpackage-lock.json
npm i
,npm run
, andnpx
usages withpnpm install
,pnpm <script>
,pnpm dlx
corepack enable
pnpm install --frozen-lockfile
(fallback to plain install)pnpm dlx turbo
@database.build/deploy
now declared as"workspace:*"
MIGRATION-PNPM.md
README.md
instructions accordinglyRationale / Benefits
pnpm-lock.yaml
+--frozen-lockfile
enforces exact dependency graphpnpm-workspace.yaml
workspace:*
pnpm store path
)Migration Notes (Developer Actions)
If you have lingering
node_modules
orpackage-lock.json
locally:rm -rf node_modules **/node_modules package-lock.json pnpm install
Command Mapping
npm install
pnpm install
npm install <pkg>
pnpm add <pkg>
npm install -D <pkg>
pnpm add -D <pkg>
npm uninstall <pkg>
pnpm remove <pkg>
npm run build
pnpm build
(orpnpm run build
)npx <bin>
pnpm dlx <bin>
npm outdated
pnpm outdated
npm update
pnpm update
npm audit
pnpm audit
Testing / Verification
pnpm install
succeeds from clean clonepnpm dev
(root script ->turbo watch dev
)"workspace:*"
package-lock.json
fully removed; onlypnpm-lock.yaml
presentRisk Assessment & Mitigations
npm ci
corepack enable && pnpm install --frozen-lockfile
package-lock.json
.gitignore
rule or pre-commit check (follow-up)npm
commands)--frozen-lockfile
in CIFollow-up Opportunities (Not in this PR)
pnpm store path
)package-lock.json
appearspnpm fetch
+ offline installs for CI speedScreenshots
N/A (infrastructure-only change)
Additional Context
See
MIGRATION-PNPM.md
added in this PR for deeper guidance, troubleshooting, and future upgrade instructions.Checklist
package-lock.json
pnpm-workspace.yaml
pnpm-lock.yaml
package.json
packageManager
Dev Environment
If you need a more concise or Conventional Commits–style summary, let me know.