[release/7.0] [wasm] Catch error from loading "node:crypto" module#80249
[release/7.0] [wasm] Catch error from loading "node:crypto" module#80249carlossanlop merged 1 commit intodotnet:release/7.0from carlossanlop:backport/pr-78696-to-release/7.0
Conversation
* Catch error from loading node:crypto module. * Throw error with explanation when crypto module is not available. * Fix providing error throwing polyfill.
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsBackport of #78916 to release/7.0 Important: This is a resubmission of the previous backport PR submitted by @maraf that I accidentally closed instead of squash+merged. I was unable to reopen the PR because I had deleted the branch. This PR has already been approved by Tactics. Customer ImpactBased on node documentation, there might be a build of node without "node:crypto". In such a case the module import will throw an exception. In #78696 (backport #78766) we load "node:crypto" module during the runtime startup and in this PR we are catching such exception and rethrowing it only when user tries to use the API. It restores the behavior before #78696 when crypto API is not available. TestingManual RiskNone IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
|
Approved by Tactics (7.0.3). |
Backport of #78916 to release/7.0
Important: This is a resubmission of the previous backport PR submitted by @maraf that I accidentally closed instead of squash+merged. I was unable to reopen the PR because I had deleted the branch. This PR has already been approved by Tactics.
Customer Impact
Based on node documentation, there might be a build of node without "node:crypto". In such a case the module import will throw an exception. In #78696 (backport #78766) we load "node:crypto" module during the runtime startup and in this PR we are catching such exception and rethrowing it only when user tries to use the API.
It restores the behavior before #78696 when crypto API is not available.
It should be included in the same release as #78696 (backport #78766).
Testing
Manual
Risk
None
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.