Skip to content

fix(@angular/core): mark zone.js as an optional peer dependency#61616

Closed
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:optional-zone.js
Closed

fix(@angular/core): mark zone.js as an optional peer dependency#61616
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:optional-zone.js

Conversation

@alan-agius4
Copy link
Copy Markdown
Contributor

zone.js is no longer mandatory.

@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 May 22, 2025
@pullapprove pullapprove bot requested a review from crisbeto May 22, 2025 16:13
@alan-agius4 alan-agius4 changed the title fix(@angular/core): zone.js should be an optional peer dependency fix(@angular/core): mark zone.js as an optional peer dependency May 22, 2025
@atscott atscott 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 May 22, 2025
@alan-agius4 alan-agius4 removed the request for review from crisbeto May 22, 2025 16:24
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed target: patch This PR is targeted for the next patch release labels May 22, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label May 22, 2025
@ngbot ngbot bot added this to the Backlog milestone May 22, 2025
@alan-agius4 alan-agius4 added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 22, 2025
@alan-agius4
Copy link
Copy Markdown
Contributor Author

caretaker note: this change does not effect G3.

@Martinspire
Copy link
Copy Markdown

Quick question: won't this break backwards compatibility with old projects that don't have ZoneJS in their dependency list, since Angular 2+ would automatically grab it?

@alan-agius4
Copy link
Copy Markdown
Contributor Author

alan-agius4 commented May 22, 2025

npm (v7+) and pnpm (v7+) support auto-installing peer dependencies, including those explicitly marked as optional so that should not be a problem.

Although in general, it would be recommended to have a stricter dependency policy and avoid auto-installing peer dependency and have them explicitly listed.

atscott pushed a commit that referenced this pull request May 22, 2025
`zone.js` is no longer mandatory.

PR Close #61616
@atscott
Copy link
Copy Markdown
Contributor

atscott commented May 22, 2025

This PR was merged into the repository by commit 229cdde.

The changes were merged into the following branches: main, 20.0.x

@atscott atscott closed this in 229cdde May 22, 2025
@alan-agius4 alan-agius4 deleted the optional-zone.js branch May 22, 2025 19:15
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants