Skip to content

build: replace pnpm -s shorthand with --silent for improved readability - #34075

Merged
alan-agius4 merged 1 commit into
angular:20.3.xfrom
alan-agius4:cherry-pick-34073-20.3.x
Sep 10, 2026
Merged

build: replace pnpm -s shorthand with --silent for improved readability#34075
alan-agius4 merged 1 commit into
angular:20.3.xfrom
alan-agius4:cherry-pick-34073-20.3.x

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Cherry-pick of #34073 to 20.3.x

Trying to fix the release

(cherry picked from commit ded7653)
@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Sep 10, 2026

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

Copy link
Copy Markdown

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 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.

Comment thread .husky/commit-msg
@@ -1 +1 @@
pnpm -s ng-dev commit-message pre-commit-validate --file $1;
pnpm --silent ng-dev commit-message pre-commit-validate --file $1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In shell scripts, it is a best practice to double-quote variable expansions like "$1" to prevent word splitting and globbing if the argument contains spaces or special characters.

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`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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';

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: lts This PR is targeting a version currently in long-term support labels Sep 10, 2026
@alan-agius4
alan-agius4 merged commit 54529a0 into angular:20.3.x Sep 10, 2026
12 of 13 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4
alan-agius4 deleted the cherry-pick-34073-20.3.x branch September 10, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: lts This PR is targeting a version currently in long-term support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants