push
Introduce separate entry point for worker environments (#1660) * Separate stripe into worker and default entrypoints, needs tests for worker * Fix test, remove unused import * Actually require child_process * build * Convert tests to TypeScript, add browser field * Move more utils functions to nodeUtils * Use _utils defined on Stripe object * Add error messages to createNodeHttpClient and createNodeCryptoProvider * Move platform-specific utils to new PlatformFunctions classes, add tests * Abstract getUname to platform functions, set _platformFunctions on Webhooks * Make generic createCryptoProvider in Webhooks * Revert "Make generic createCryptoProvider in Webhooks" This reverts commit c8af4d530. * Remove stale file in lib * Create generic createHttpClient that creates FetchHttpClient by default in workers * Move getUname to PlatformFunctions (now returns a promise), and misc reviewer comments * Make generic createCryptoProvider in Webhooks * Removing this alias * Fix DefaultPlatformFunctions getUname, fix test * Add getMockPlatformFunctions test util, prefix _createCryptoProvider
520 of 595 branches covered (87.39%)
Branch coverage included in aggregate %.
209 of 209 new or added lines in 8 files covered. (100.0%)
1282 of 1344 relevant lines covered (95.39%)
378.62 hits per line