fix(pnpm-build): run dedupe --check after install, not before #67
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
schmalz/shared-actions!67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pnpm-build-dedupe-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
pnpm-build'sBuildstep runspnpm dedupe --checkbeforepnpm install. On a fresh checkout (nonode_modulesyet),dedupe --checkwritesnode_modules/.pnpm-workspace-state-v1.jsonas a side effect even though it never links any packages. The subsequentpnpm install --frozen-lockfilethen reads that marker, believes the install is already up to date, and skips linking entirely — silently leavingnode_modulesempty.This surfaced downstream as
sh: 1: biome: not foundin a consumer repo's CI (biomeis a devDependency that was simply never installed), even though the lockfile and scripts were correct.Reproduced locally against a real consumer repo:
Fix
Reorder the
Buildstep sopnpm installruns first, andpnpm dedupe --checkruns afterward against the fully-linkednode_modules(which is also more semantically correct — dedupe-check is meant to validate an existing install, not a bare checkout). Verified locally that this ordering installs devDependency binaries correctly anddedupe --checkstill passes.Status
Marking as WIP — please review the ordering/comment before merge, and let me know if you'd like a version bump / tag update strategy for
pnpm-build-v1once this lands.WIP: fix(pnpm-build): run dedupe --check after install, not beforeto fix(pnpm-build): run dedupe --check after install, not before