Skip to content

fix(@angular/cli): default ignoreScripts to true when install options are provided - #34631

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:fix/package-manager-ignore-scripts
Nov 2, 2026
Merged

alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:fix/package-manager-ignore-scripts

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Previously, PackageManager.install() used a parameter-level default options = { ignoreScripts: true }, which caused ignoreScripts to be undefined whenever any option (such as ignorePeerDependencies during ng update) was provided without explicitly specifying ignoreScripts. Similarly, PackageManager.acquireTempPackage() did not default ignoreScripts to true unless explicitly passed.

Ensure ignoreScripts defaults to true in both methods unless explicitly set to false.

… are provided

Previously, `PackageManager.install()` used a parameter-level default
`options = { ignoreScripts: true }`, which caused `ignoreScripts` to be
`undefined` whenever any option (such as `ignorePeerDependencies` during
`ng update`) was provided without explicitly specifying `ignoreScripts`.
Similarly, `PackageManager.acquireTempPackage()` did not default
`ignoreScripts` to `true` unless explicitly passed.

Ensure `ignoreScripts` defaults to `true` in both methods unless
explicitly set to `false`.
@alan-agius4
alan-agius4 requested a review from clydin November 2, 2026 12:12
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Nov 2, 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 refactors the PackageManager class to ensure that ignoreScripts defaults to true when destructuring options in both the install and package addition methods. It also introduces unit tests to verify this behavior for the install method. The feedback suggests adding similar unit tests for the acquireTempPackage method to guarantee full test coverage and prevent future regressions.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 2, 2026
@alan-agius4
alan-agius4 merged commit a69fe51 into angular:main Nov 2, 2026
40 checks passed
@alan-agius4
alan-agius4 deleted the fix/package-manager-ignore-scripts branch November 2, 2026 16:48
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

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

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: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants