@stripe/connect-js 3.3.29 → 3.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -183,6 +183,9 @@ const initStripeConnect = (stripePromise, initParams) => {
183
183
  for (const method in methods) {
184
184
  element[method] = function (value) {
185
185
  stripeConnectInstance.then(() => {
186
+ if (!this[`${method}InternalOnly`]) {
187
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.30`);
188
+ }
186
189
  this[`${method}InternalOnly`](value);
187
190
  });
188
191
  };
@@ -235,7 +238,7 @@ const createWrapper = stripeConnect => {
235
238
  sdk: true,
236
239
  sdkOptions: {
237
240
  // This will be replaced by the npm package version when bundling
238
- sdkVersion: "3.3.29"
241
+ sdkVersion: "3.3.30"
239
242
  }
240
243
  })
241
244
  }));
package/dist/connect.js CHANGED
@@ -187,6 +187,9 @@ const initStripeConnect = (stripePromise, initParams) => {
187
187
  for (const method in methods) {
188
188
  element[method] = function (value) {
189
189
  stripeConnectInstance.then(() => {
190
+ if (!this[`${method}InternalOnly`]) {
191
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.30`);
192
+ }
190
193
  this[`${method}InternalOnly`](value);
191
194
  });
192
195
  };
@@ -239,7 +242,7 @@ const createWrapper = stripeConnect => {
239
242
  sdk: true,
240
243
  sdkOptions: {
241
244
  // This will be replaced by the npm package version when bundling
242
- sdkVersion: "3.3.29"
245
+ sdkVersion: "3.3.30"
243
246
  }
244
247
  })
245
248
  }));
package/dist/pure.esm.js CHANGED
@@ -183,6 +183,9 @@ const initStripeConnect = (stripePromise, initParams) => {
183
183
  for (const method in methods) {
184
184
  element[method] = function (value) {
185
185
  stripeConnectInstance.then(() => {
186
+ if (!this[`${method}InternalOnly`]) {
187
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.30`);
188
+ }
186
189
  this[`${method}InternalOnly`](value);
187
190
  });
188
191
  };
@@ -235,7 +238,7 @@ const createWrapper = stripeConnect => {
235
238
  sdk: true,
236
239
  sdkOptions: {
237
240
  // This will be replaced by the npm package version when bundling
238
- sdkVersion: "3.3.29"
241
+ sdkVersion: "3.3.30"
239
242
  }
240
243
  })
241
244
  }));
package/dist/pure.js CHANGED
@@ -187,6 +187,9 @@ const initStripeConnect = (stripePromise, initParams) => {
187
187
  for (const method in methods) {
188
188
  element[method] = function (value) {
189
189
  stripeConnectInstance.then(() => {
190
+ if (!this[`${method}InternalOnly`]) {
191
+ throw new Error(`Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: 3.3.30`);
192
+ }
190
193
  this[`${method}InternalOnly`](value);
191
194
  });
192
195
  };
@@ -239,7 +242,7 @@ const createWrapper = stripeConnect => {
239
242
  sdk: true,
240
243
  sdkOptions: {
241
244
  // This will be replaced by the npm package version when bundling
242
- sdkVersion: "3.3.29"
245
+ sdkVersion: "3.3.30"
243
246
  }
244
247
  })
245
248
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "3.3.29",
3
+ "version": "3.3.30",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
package/src/shared.ts CHANGED
@@ -208,6 +208,12 @@ export const initStripeConnect = (
208
208
  for (const method in methods) {
209
209
  (element as any)[method] = function (value: any) {
210
210
  stripeConnectInstance.then(() => {
211
+ if (!this[`${method}InternalOnly`]) {
212
+ throw new Error(
213
+ `Method ${method} is not available in the ${tagName} HTML element. Are you using a supported version of the "@stripe/connect-js" package? Using version: _NPM_PACKAGE_VERSION_`
214
+ );
215
+ }
216
+
211
217
  this[`${method}InternalOnly`](value);
212
218
  });
213
219
  };