From 4a905645bb863fee1bd04cc3d509a054b2b24107 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Tue, 4 Apr 2023 18:40:31 -0700 Subject: [PATCH] Remove circular reference in Stripe object --- src/stripe.core.ts | 5 ----- testProjects/mjs/index.js | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 5ba8f324a8..97c45dfbd8 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -63,11 +63,6 @@ export function createStripe( Stripe.HttpClientResponse = HttpClientResponse; Stripe.CryptoProvider = CryptoProvider; - // For backwards compatibiblity after moving to separate CJS and ESM entrypoints. - // To be removed in the next major version. - Stripe.Stripe = Stripe; - Stripe.default = Stripe; - function Stripe( this: StripeObject, key: string, diff --git a/testProjects/mjs/index.js b/testProjects/mjs/index.js index fd3bb046c1..6572b9dfda 100644 --- a/testProjects/mjs/index.js +++ b/testProjects/mjs/index.js @@ -41,9 +41,6 @@ assert(Stripe.StripeResource.MAX_BUFFERED_REQUEST_METRICS); assert(Stripe.webhooks); assert(Stripe.resources); -assert(Stripe.Stripe); -assert(Stripe.default); - const stripe = new Stripe(process.argv[2]); const defaultStripe = new DefaultStripe(process.argv[2]);