stripe / react-stripe-js

React components for Stripe.js and Stripe Elements
https://stripe.com/docs/stripe-js/react
MIT License
1.7k stars 259 forks source link

upgrade rollup out of the stone age #480

Closed madhav-stripe closed 4 months ago

madhav-stripe commented 4 months ago

Summary & motivation

In this PR we are upgrading rollup and our build configurations to the most recent / modern versions of the libraries. I will do my best to explain what has been upgraded. I've added comments inline to where the changes have been made

image
st-madhav1:react-stripe-js madhav$ npx publint
@stripe/react-stripe-js lint results:
Suggestions:
1. The package does not specify the type field. Environments may incorrectly identify a CJS file as ESM in the future. Consider adding "type": "commonjs".
2. pkg.module is used to output ESM, but pkg.exports is not defined. As NodeJS doesn't read pkg.module, the ESM output may be skipped. Consider adding pkg.exports to export the ESM output. pkg.module can usually be removed alongside too. (This will be a breaking change)
3. pkg["jsnext:main"] is deprecated. pkg.module should be used instead.

API review

Copy [this template] or link to an API review issue.

[this template]: https://github.com/stripe/react-stripe-js/tree/master/.github/API_REVIEW.md

Testing & documentation

madhav-stripe commented 4 months ago

r? @cbala-stripe @fruchtose-stripe @danwang-stripe