stripe-node icon indicating copy to clipboard operation
stripe-node copied to clipboard

Add generateTestHeaderStringAsync function to Webhooks.ts

Open zelief opened this issue 1 year ago • 3 comments

Currently, generateTestHeaderString throws a CryptoProviderOnlySupportsAsyncError when executed in Bun and other non-Node environments. This presents a limitation for users attempting to utilize this function outside of Node.js.

This PR addresses this issue by adding generateTestHeaderStringAsync. With this, creating a test header string in non-Node environments becomes more seamless and straightforward.

zelief avatar Mar 22 '24 23:03 zelief

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 22 '24 23:03 CLAassistant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Mar 22 '24 23:03 CLAassistant

Hey @zelief

There is some duplicated code between generateTestHeaderString and generateTestHeaderStringAsync. Can you consider sharing code between the two to ensure they dont diverge in the future?

ramya-stripe avatar Apr 11 '24 18:04 ramya-stripe

Hey @zelief

There is some duplicated code between generateTestHeaderString and generateTestHeaderStringAsync. Can you consider sharing code between the two to ensure they dont diverge in the future?

Sure @ramya-stripe, I will update it. Thanks for the review!

zelief avatar Jul 06 '24 07:07 zelief

Updated @ramya-stripe, kindly check.

zelief avatar Jul 06 '24 08:07 zelief