build: replace pnpm -s shorthand with --silent for improved readability - #34075
Conversation
Trying to fix the release (cherry picked from commit ded7653)
There was a problem hiding this comment.
Code Review
This pull request replaces the shorthand -s flag with the more explicit --silent flag across various pnpm commands in .bazelrc, Husky hooks, package.json, and build scripts. The feedback suggests double-quoting the $1 variable in the commit-msg hook to prevent word splitting, and using the nullish coalescing operator (??) instead of logical OR (||) in scripts/build-packages-dist.mts for consistency and precision.
| @@ -1 +1 @@ | |||
| pnpm -s ng-dev commit-message pre-commit-validate --file $1; | |||
| pnpm --silent ng-dev commit-message pre-commit-validate --file $1; | |||
|
|
||
| /** Command that runs Bazel. */ | ||
| const bazelCmd = process.env.BAZEL || `pnpm -s bazel`; | ||
| const bazelCmd = process.env.BAZEL || `pnpm --silent bazel`; |
There was a problem hiding this comment.
For consistency with scripts/build.mts (line 16), use the nullish coalescing operator (??) instead of the logical OR operator (||). Since process.env.BAZEL is either a string or undefined, ?? is more precise and aligns with modern TypeScript best practices.
const bazelCmd = process.env.BAZEL ?? 'pnpm --silent bazel';
|
This PR was merged into the repository. The changes were merged into the following branches:
|
Cherry-pick of #34073 to 20.3.x