Conversation
There was a problem hiding this comment.
Code Review
This pull request extracts the PNPM lockfile check and workspace dependency installation logic into a reusable composite GitHub Action, simplifying the unit tests workflow. Feedback suggests recommending pnpm install --lockfile-only instead of pnpm install --no-frozen-lockfile --ignore-scripts in the error message instructions, as the latter can leave local environments in an incomplete state.
| echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml." | ||
| echo "" | ||
| echo "To resolve this failure, please update the lockfile locally and commit the result:" | ||
| echo " pnpm install --no-frozen-lockfile --ignore-scripts" |
There was a problem hiding this comment.
Running pnpm install with --ignore-scripts locally can leave the local node_modules in an incomplete or unbuilt state (e.g., missing generated types, git hooks, or compiled native modules), which can break subsequent local development or testing. If the goal is to quickly update the lockfile without running scripts or installing full dependencies locally, using pnpm install --lockfile-only is a safer and faster alternative. Otherwise, a standard pnpm install should be recommended to ensure the local environment is fully set up.
echo " pnpm install --lockfile-only"
--ignore-scriptstopnpm installin the CI error mesage - this reduces the installation time from 6 minutes to 6 seconds, so it's important to advertise it!