Closed Shawngbk closed 4 years ago
hi @southpolesteve May I know is there the current ETA for replacing the cypto-hash?
No ETA at this time. We are evaluating making our own crypto shim in #5023
Appreciate your help! Looking forward to the further steps.
This was resolved in 3.3.4
Hi @southpolesteve
Thanks for your help! Could you please look into the below issue?
When using an Angular app which use the @azure/cosmos and run it at Edge browser, it will hit the below error message. “SCRIPT1028: SCRIPT1028: Expected identifier, string or number” Clicking the error, I found the error throwed by the line 39. After search it, found this github link: https://github.com/sindresorhus/crypto-hash/blob/master/browser.js#L39 This code is part of the ‘crypto-hash.’
It seems that the ‘crypto-hash’ is required if use the @azure/cosmos.
I search again and found below link which indicating that Edge doesn’t support the Rest parameters (the syntax is ‘…options’) https://stackoverflow.com/questions/53628191/edge-script1028-expected-identifier-string-or-number
Then, the issue seems to be the dead-lock status. The Angular app use the @azure/cosmos. @azure/cosmos required the ‘crypto-hash’. ‘crypto-hash’ use the Rest parameters. However, the Edge doesn’t support such syntax.. Therefore, the above restriction let the Angular app cannot be used in the Edge browser.
This is a sample which you can simply repro the issue: https://github.com/jeffrey008/empty-angular
I fully know this might be a pure front-end issue or Edge issue. I still hope to consult from your side and see if there is any idea for resolving the issue.