fix(zone.js): patch node for nested fs functions#45552
fix(zone.js): patch node for nested fs functions#45552lamweili wants to merge 2 commits intoangular:mainfrom
Conversation
997b529 to
b1905db
Compare
3413cf5 to
5da9b15
Compare
Closes angular#45546 It patches the nested functions `fs.realpath.native` and `fs.realpathSync.native` first, storing them in a temporary space, before patching the usual `fs` functions (which will cause the nested functions to be `undefined`). Lastly, it populates back the patched nested functions from the temporary space back to `fs`.
5da9b15 to
9a52aa1
Compare
|
@peteriman , thank you for the PR, could you add test case to make sure the method is patched correctly? |
|
Hi @JiaLiPassion, I would need some help on that and would need your advice. |
|
Converting this to draft since it doesn't seem to be ready for review, until the unit test issue is resolved |
|
@lamweili , sorry I didn't have time to review this one, I will check it this week. |
|
@JiaLiPassion, thanks. I have emailed you my questions on 8 April thereabouts previously. Have you gotten the time? |
|
@lamweili , sorry for the late response, I updated the source and also added test cases, please check the test cases and make it complete and run to make sure the test passed. Then Thank you. |
|
I'm closing old draft PRs coming from outside contributors. Feel free to ping if you'd like to keep it open. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Only direct
fsfunctions are patched byzone.js/node.After
zone.js/nodepatchesfsfunctions, nestedfsfunctions becomeundefined.fs.realpath.nativeisundefinedfs.realpathSync.nativeisundefinedIssue Number: #45546
What is the new behavior?
It patches the nested functions
fs.realpath.nativeandfs.realpathSync.nativefirst, storing them in a temporary space, before patching the usualfsfunctions (which will cause the nested functions to beundefined). Lastly, it populates back the patched nested functions from the temporary space back tofs.fs.realpath.nativeis patched byzone.js/nodeand is no longerundefinedfs.realpathSync.nativeis patched byzone.js/nodeand is no longerundefinedDoes this PR introduce a breaking change?
Other information
Fixes: #45546