Skip to content

chore: refactor pnpm lockfile check and add --ignore-scripts - #9360

Open
bshaffer wants to merge 1 commit into
mainfrom
update-pnpm-check-message
Open

bshaffer wants to merge 1 commit into
mainfrom
update-pnpm-check-message

Conversation

@bshaffer

@bshaffer bshaffer commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
  • adds --ignore-scripts to pnpm install in the CI error mesage - this reduces the installation time from 6 minutes to 6 seconds, so it's important to advertise it!
  • refactor all messages (7 different places) into a single reusable action

@bshaffer
bshaffer requested a review from a team as a code owner September 17, 2026 00:26

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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"

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.

1 participant