@stripe/stripe-js 3.0.3 → 3.0.5

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.
Files changed (66) hide show
  1. package/README.md +10 -23
  2. package/dist/stripe.js +1 -1
  3. package/dist/stripe.mjs +1 -1
  4. package/package.json +4 -26
  5. package/{dist/pure.d.mts → pure/index.d.mts} +9536 -9567
  6. package/{dist/pure.d.ts → pure/index.d.ts} +9536 -9567
  7. package/{dist/pure.js → pure/index.js} +1 -1
  8. package/{dist/pure.mjs → pure/index.mjs} +1 -1
  9. package/types/.eslintrc.yml +0 -3
  10. package/types/api/bank-accounts.d.ts +0 -61
  11. package/types/api/cards.d.ts +0 -130
  12. package/types/api/financial-connections.d.ts +0 -232
  13. package/types/api/index.d.ts +0 -11
  14. package/types/api/orders.d.ts +0 -122
  15. package/types/api/payment-intents.d.ts +0 -330
  16. package/types/api/payment-methods.d.ts +0 -452
  17. package/types/api/setup-intents.d.ts +0 -184
  18. package/types/api/shared.d.ts +0 -125
  19. package/types/api/sources.d.ts +0 -1045
  20. package/types/api/tokens.d.ts +0 -639
  21. package/types/api/verification-sessions.d.ts +0 -9
  22. package/types/index.d.ts +0 -17
  23. package/types/pure.d.ts +0 -5
  24. package/types/stripe-js/checkout.d.ts +0 -153
  25. package/types/stripe-js/custom-checkout.d.ts +0 -220
  26. package/types/stripe-js/elements/address.d.ts +0 -261
  27. package/types/stripe-js/elements/affirm-message.d.ts +0 -65
  28. package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
  29. package/types/stripe-js/elements/apple-pay.d.ts +0 -156
  30. package/types/stripe-js/elements/au-bank-account.d.ts +0 -138
  31. package/types/stripe-js/elements/base.d.ts +0 -264
  32. package/types/stripe-js/elements/card-cvc.d.ts +0 -119
  33. package/types/stripe-js/elements/card-expiry.d.ts +0 -119
  34. package/types/stripe-js/elements/card-number.d.ts +0 -200
  35. package/types/stripe-js/elements/card.d.ts +0 -226
  36. package/types/stripe-js/elements/cart.d.ts +0 -224
  37. package/types/stripe-js/elements/eps-bank.d.ts +0 -140
  38. package/types/stripe-js/elements/express-checkout.d.ts +0 -446
  39. package/types/stripe-js/elements/fpx-bank.d.ts +0 -134
  40. package/types/stripe-js/elements/iban.d.ts +0 -135
  41. package/types/stripe-js/elements/ideal-bank.d.ts +0 -140
  42. package/types/stripe-js/elements/index.d.ts +0 -22
  43. package/types/stripe-js/elements/issuing/index.d.ts +0 -5
  44. package/types/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
  45. package/types/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
  46. package/types/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
  47. package/types/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
  48. package/types/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
  49. package/types/stripe-js/elements/link-authentication.d.ts +0 -158
  50. package/types/stripe-js/elements/p24-bank.d.ts +0 -140
  51. package/types/stripe-js/elements/payment-method-messaging.d.ts +0 -98
  52. package/types/stripe-js/elements/payment-request-button.d.ts +0 -151
  53. package/types/stripe-js/elements/payment.d.ts +0 -275
  54. package/types/stripe-js/elements/shipping-address.d.ts +0 -215
  55. package/types/stripe-js/elements-group.d.ts +0 -1129
  56. package/types/stripe-js/embedded-checkout.d.ts +0 -30
  57. package/types/stripe-js/ephemeral-keys.d.ts +0 -3
  58. package/types/stripe-js/financial-connections.d.ts +0 -19
  59. package/types/stripe-js/index.d.ts +0 -13
  60. package/types/stripe-js/orders.d.ts +0 -9
  61. package/types/stripe-js/payment-intents.d.ts +0 -1465
  62. package/types/stripe-js/payment-request.d.ts +0 -529
  63. package/types/stripe-js/setup-intents.d.ts +0 -250
  64. package/types/stripe-js/stripe.d.ts +0 -1472
  65. package/types/stripe-js/token-and-sources.d.ts +0 -110
  66. package/types/utils.d.ts +0 -2
package/README.md CHANGED
@@ -1,14 +1,7 @@
1
- # ⚠️ v3.0.x Notice
1
+ # Stripe.js as a CommonJS module or ES module
2
2
 
3
- We are aware of an issue impacting builds for some TypeScript users in our
4
- package releases **v3.0.0**, **v3.0.1**, **v3.0.2** and recommend users to
5
- upgrade to our latest package release
6
- [**v3.0.3**](https://github.com/stripe/stripe-js/releases/tag/v3.0.3) which
7
- contains a fix.
8
-
9
- # Stripe.js ES Module
10
-
11
- Use [Stripe.js](https://stripe.com/docs/stripe-js) as an ES module.
3
+ This package allows [Stripe.js](https://stripe.com/docs/stripe-js) to be
4
+ imported as a CommonJS module or ES module.
12
5
 
13
6
  **Note**: To be
14
7
  [PCI compliant](https://stripe.com/docs/security/guide#validating-pci-compliance),
@@ -86,18 +79,6 @@ Note that we may release new [minor and patch](https://semver.org/) versions of
86
79
  `@stripe/stripe-js` with small but backwards-incompatible fixes to the type
87
80
  declarations. These changes will not affect Stripe.js itself.
88
81
 
89
- ### [`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution) support
90
-
91
- This package supports the following module resolution strategies:
92
-
93
- - `bundler`
94
- - `node16`
95
- - `nodenext`
96
-
97
- This package does not support `node10` or `node` strategies, which do not
98
- support ES6 modules. Using `node16` or `nodenext` is recommended as a
99
- replacement configuration.
100
-
101
82
  ## Ensuring Stripe.js is available everywhere
102
83
 
103
84
  To best leverage Stripe’s advanced fraud functionality, ensure that Stripe.js is
@@ -137,9 +118,12 @@ one. When you call `loadStripe`, it will use the existing script tag.
137
118
 
138
119
  If you would like to use `loadStripe` in your application, but defer loading the
139
120
  Stripe.js script until `loadStripe` is first called, use the alternative
140
- `@stripe/stripe-js/pure` import path:
121
+ `@stripe/stripe-js/pure` import module:
141
122
 
142
123
  ```js
124
+ // CommonJS module import
125
+ const {loadStripe} = require('@stripe/stripe-js/pure');
126
+ // ES module import
143
127
  import {loadStripe} from '@stripe/stripe-js/pure';
144
128
 
145
129
  // Stripe.js will not be loaded until `loadStripe` is called
@@ -153,6 +137,9 @@ If you would like to
153
137
  altogether, use `loadStripe.setLoadParameters`:
154
138
 
155
139
  ```js
140
+ // CommonJS module import
141
+ const {loadStripe} = require('@stripe/stripe-js/pure');
142
+ // ES module import
156
143
  import {loadStripe} from '@stripe/stripe-js/pure';
157
144
 
158
145
  loadStripe.setLoadParameters({advancedFraudSignals: false});
package/dist/stripe.js CHANGED
@@ -42,7 +42,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
42
42
 
43
43
  stripe._registerWrapper({
44
44
  name: 'stripe-js',
45
- version: "3.0.3",
45
+ version: "3.0.5",
46
46
  startTime: startTime
47
47
  });
48
48
  };
package/dist/stripe.mjs CHANGED
@@ -38,7 +38,7 @@ var registerWrapper = function registerWrapper(stripe, startTime) {
38
38
 
39
39
  stripe._registerWrapper({
40
40
  name: 'stripe-js',
41
- version: "3.0.3",
41
+ version: "3.0.5",
42
42
  startTime: startTime
43
43
  });
44
44
  };
package/package.json CHANGED
@@ -1,35 +1,13 @@
1
1
  {
2
2
  "name": "@stripe/stripe-js",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "Stripe.js loading utility",
5
5
  "repository": "github:stripe/stripe-js",
6
6
  "main": "dist/stripe.js",
7
7
  "module": "dist/stripe.mjs",
8
- "exports": {
9
- ".": {
10
- "import": {
11
- "types": "./dist/index.d.mts",
12
- "default": "./dist/stripe.mjs"
13
- },
14
- "require": {
15
- "types": "./dist/index.d.ts",
16
- "default": "./dist/stripe.js"
17
- }
18
- },
19
- "./pure": {
20
- "import": {
21
- "types": "./dist/pure.d.mts",
22
- "default": "./dist/pure.mjs"
23
- },
24
- "require": {
25
- "types": "./dist/pure.d.ts",
26
- "default": "./dist/pure.js"
27
- }
28
- }
29
- },
30
8
  "jsnext:main": "dist/stripe.mjs",
31
- "types": "types/index.d.ts",
32
- "typings": "types/index.d.ts",
9
+ "types": "dist/index.d.ts",
10
+ "typings": "dist/index.d.ts",
33
11
  "scripts": {
34
12
  "test": "yarn lint && yarn test:unit && yarn test:types && yarn typecheck",
35
13
  "test:unit": "jest",
@@ -53,7 +31,7 @@
53
31
  "files": [
54
32
  "dist",
55
33
  "src",
56
- "types"
34
+ "pure"
57
35
  ],
58
36
  "engines": {
59
37
  "node": ">=12.16"