Long-term solution[Break change] on improve loadProtoJSON #1199
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
To speed up the loadProtoJSON and addressed #1196, we have temperately solution use
hashobject(JSON.stringify(json))
.Because
hashobject
is work for both nodejs and browser( see package.json).For long-term ultimate goal is to reduce the dependency(i.e remove
hashobject
). To get rid ofhashobject
cause breaking change. Becausecrypto
is Node.js specific module. And to use in browser, we needwindow.crypto.subtle
. But thedigest
is asynchronies function return promise.Example in
https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/crypto/crypto.ts#L76-L81
Draft implementation PR in gax:
0ce1a4c
The text was updated successfully, but these errors were encountered: