@stripe/stripe-js
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -45,3 +45,3 @@ 'use strict'; | ||
name: 'stripe-js', | ||
version: "3.0.3", | ||
version: "3.0.4", | ||
startTime: startTime | ||
@@ -48,0 +48,0 @@ }); |
{ | ||
"name": "@stripe/stripe-js", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Stripe.js loading utility", | ||
@@ -8,27 +8,5 @@ "repository": "github:stripe/stripe-js", | ||
"module": "dist/stripe.mjs", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/stripe.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/stripe.js" | ||
} | ||
}, | ||
"./pure": { | ||
"import": { | ||
"types": "./dist/pure.d.mts", | ||
"default": "./dist/pure.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/pure.d.ts", | ||
"default": "./dist/pure.js" | ||
} | ||
} | ||
}, | ||
"jsnext:main": "dist/stripe.mjs", | ||
"types": "types/index.d.ts", | ||
"typings": "types/index.d.ts", | ||
"types": "dist/index.d.ts", | ||
"typings": "dist/index.d.ts", | ||
"scripts": { | ||
@@ -57,3 +35,3 @@ "test": "yarn lint && yarn test:unit && yarn test:types && yarn typecheck", | ||
"src", | ||
"types" | ||
"pure" | ||
], | ||
@@ -60,0 +38,0 @@ "engines": { |
@@ -1,13 +0,6 @@ | ||
# ⚠️ v3.0.x Notice | ||
# Stripe.js as a CommonJS module or ES module | ||
We are aware of an issue impacting builds for some TypeScript users in our | ||
package releases **v3.0.0**, **v3.0.1**, **v3.0.2** and recommend users to | ||
upgrade to our latest package release | ||
[**v3.0.3**](https://github.com/stripe/stripe-js/releases/tag/v3.0.3) which | ||
contains a fix. | ||
This package allows [Stripe.js](https://stripe.com/docs/stripe-js) to be | ||
imported as a CommonJS module or ES module. | ||
# Stripe.js ES Module | ||
Use [Stripe.js](https://stripe.com/docs/stripe-js) as an ES module. | ||
**Note**: To be | ||
@@ -89,14 +82,2 @@ [PCI compliant](https://stripe.com/docs/security/guide#validating-pci-compliance), | ||
### [`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution) support | ||
This package supports the following module resolution strategies: | ||
- `bundler` | ||
- `node16` | ||
- `nodenext` | ||
This package does not support `node10` or `node` strategies, which do not | ||
support ES6 modules. Using `node16` or `nodenext` is recommended as a | ||
replacement configuration. | ||
## Ensuring Stripe.js is available everywhere | ||
@@ -141,5 +122,8 @@ | ||
Stripe.js script until `loadStripe` is first called, use the alternative | ||
`@stripe/stripe-js/pure` import path: | ||
`@stripe/stripe-js/pure` import module: | ||
```js | ||
// CommonJS module import | ||
const {loadStripe} = require('@stripe/stripe-js/pure'); | ||
// ES module import | ||
import {loadStripe} from '@stripe/stripe-js/pure'; | ||
@@ -158,2 +142,5 @@ | ||
```js | ||
// CommonJS module import | ||
const {loadStripe} = require('@stripe/stripe-js/pure'); | ||
// ES module import | ||
import {loadStripe} from '@stripe/stripe-js/pure'; | ||
@@ -160,0 +147,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1643684
17
22915
157
1