gcp-metadata
gcp-metadata copied to clipboard
refactor: `fastFailMetadataRequest` to use `Promise.any`
We can streamline fastFailMetadataRequest
by using Promise.any
in Node 15+ rather than Promise.race
:
https://github.com/googleapis/gcp-metadata/blob/92f258ca6a62160ed9b9bdedf15a2ae147f4f35c/src/index.ts#L179-L229
Hi @danielbankhead I would like to work on this
Thanks @Dhoni77; note that this will require us to Node 16 (next stable), which will not happen for some time.