Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zone.js): check if process is defined when patching the GlobalErrors.install #45392

Closed
wants to merge 1 commit into from

Conversation

arturovt
Copy link
Contributor

PR Checklist

PR Type

  • Bugfix

What is the current behavior?

Issue Number: #42260

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from JiaLiPassion March 19, 2022 01:18
@arturovt arturovt force-pushed the fix/42260 branch 2 times, most recently from 294f7fc to 1a84b05 Compare March 19, 2022 13:44
@arturovt arturovt changed the title fix(zone.js): check is process defined when patching the GlobalErrors.install fix(zone.js): check if process is defined when patching the GlobalErrors.install Mar 19, 2022
…Errors.install`

Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
it installs the browser rejection handler through the `global.addEventListener`.
This code may be run in the browser environment where `process` is not defined, and
this will lead to a runtime exception since Webpack 5 removed automatic Node.js polyfills.

PR Close angular#42260
Copy link
Contributor

@JiaLiPassion JiaLiPassion left a comment

Choose a reason for hiding this comment

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

LGTM! thank you for the PR.

@JiaLiPassion JiaLiPassion added target: patch This PR is targeted for the next patch release area: zones labels Mar 20, 2022
@ngbot ngbot bot added this to the Backlog milestone Mar 20, 2022
@JiaLiPassion JiaLiPassion added the action: merge The PR is ready for merge by the caretaker label Mar 24, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Mar 24, 2022

This PR was merged into the repository by commit c7bcc1b.

@dylhunn dylhunn closed this in c7bcc1b Mar 24, 2022
dylhunn pushed a commit that referenced this pull request Mar 24, 2022
…Errors.install` (#45392)

Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
it installs the browser rejection handler through the `global.addEventListener`.
This code may be run in the browser environment where `process` is not defined, and
this will lead to a runtime exception since Webpack 5 removed automatic Node.js polyfills.

PR Close #42260

PR Close #45392
@arturovt arturovt deleted the fix/42260 branch March 24, 2022 18:27
PiyushAgrawal1243 pushed a commit to PiyushAgrawal1243/angular that referenced this pull request Mar 30, 2022
…Errors.install` (angular#45392)

Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
it installs the browser rejection handler through the `global.addEventListener`.
This code may be run in the browser environment where `process` is not defined, and
this will lead to a runtime exception since Webpack 5 removed automatic Node.js polyfills.

PR Close angular#42260

PR Close angular#45392
@angular-automatic-lock-bot
Copy link

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 Apr 24, 2022
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: zones target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants