GeezerVison is showing github.com — fix(zone.js): zone-node only patch Promise.prototype.then by JiaLiPassion · Pull Request #49144 · angular/angular
Conversation
Close #47872
zone-node only patches Promise.prototype.then instead of patch
Promise itself. So the new NodeJS SafePromise will not complain
the Promise.prototype.then called on incompatible receiver.
We should also do this change on browser zone.js patch, but it will
be a big breaking change, because Promise.prototype.then will not work
with fakeAsync any longer.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
brandonroberts, alan-agius4, AndrewKushnir, and nitedani reacted with hooray emoji
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, confirmed that this solved the issue.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JiaLiPassion thanks for the fix 👍
I've left a couple minor comments and I also have a question (just to double check): would that version work correctly with the NodeJS version range that we have for Angular apps (starting from v15.2)?
(we can also update the feat(zone.js) -> fix(zone.js), so that we can land this change sooner than v16)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Close angular#47872
zone-node only patches `Promise.prototype.then` instead of patch
`Promise` itself. So the new NodeJS `SafePromise` will not complain
the Promise.prototype.then called on incompatible receiver.
We should also do this change on browser zone.js patch, but it will
be a big breaking change, because Promise.prototype.then will not work
with `fakeAsync` any longer.
|
@AndrewKushnir, thank you for the review, I have updated the code and also the git comment for the commit.
|
AndrewKushnir reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AndrewKushnir
changed the title
feat(zone.js): zone-node only patch Promise.prototype.then
fix(zone.js): zone-node only patch Promise.prototype.then
Feb 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Caretaker note: this CL contains an updated patch for g3.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR was merged into the repository by commit d1ac3aa.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
alxhub
alxhub approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|