-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade rollup out of the stone age #480
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
"version": "2.5.1", | ||
"description": "React components for Stripe.js and Stripe Elements", | ||
"main": "dist/react-stripe.js", | ||
"module": "dist/react-stripe.esm.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran When consuming this package there might be some ambiguity onto wether this file is ESM or Common JS (because it ends with .js). Changing the file extension to |
||
"jsnext:main": "dist/react-stripe.esm.js", | ||
"module": "dist/react-stripe.esm.mjs", | ||
"jsnext:main": "dist/react-stripe.esm.mjs", | ||
"browser:min": "dist/react-stripe.umd.min.js", | ||
"browser": "dist/react-stripe.umd.js", | ||
"types": "dist/react-stripe.d.ts", | ||
|
@@ -14,7 +14,7 @@ | |
"lint": "eslint --max-warnings=0 '{src,examples}/**/*.{ts,tsx,js}'", | ||
"lint:prettier": "prettier './**/*.js' './**/*.ts' './**/*.tsx' './**/*.css' './**/*.md' --list-different", | ||
"typecheck": "tsc", | ||
"build": "yarn run clean && yarn run rollup -c && yarn checkimport", | ||
"build": "yarn run clean && yarn run rollup -c --bundleConfigAsCjs && yarn checkimport", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the model version of rollup expects the rollup config to be in ESM (if using the .js) syntax. To not have a larger diff than needed - passing this flag loads a |
||
"checkimport": "scripts/check-imports", | ||
"clean": "rimraf dist", | ||
"prettier:fix": "prettier './**/*.js' './**/*.ts' './**/*.tsx' './**/*.css' './**/*.md' --write", | ||
|
@@ -61,6 +61,11 @@ | |
"@babel/core": "^7.7.2", | ||
"@babel/preset-env": "^7.7.1", | ||
"@babel/preset-react": "^7.7.0", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the older versions of rollup plugins were in the format |
||
"@rollup/plugin-commonjs": "^25.0.7", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@rollup/plugin-replace": "^5.0.5", | ||
"@rollup/plugin-terser": "^0.4.4", | ||
"@storybook/react": "^6.5.0-beta.8", | ||
"@stripe/stripe-js": "^2.2.0", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
|
@@ -71,7 +76,6 @@ | |
"@types/react-dom": "^18.0.0", | ||
"@typescript-eslint/eslint-plugin": "^2.18.0", | ||
"@typescript-eslint/parser": "^2.18.0", | ||
"@wessberg/rollup-plugin-ts": "^1.2.15", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The author of this plugin has published new versions of this plugin as |
||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^24.9.0", | ||
"babel-loader": "^8.0.6", | ||
|
@@ -92,15 +96,11 @@ | |
"react-dom": "18.1.0", | ||
"react-test-renderer": "^18.0.0", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^1.27.0", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "^5.1.2", | ||
"rollup": "^4.12.0", | ||
"rollup-plugin-ts": "^3.4.5", | ||
"ts-jest": "^25.1.0", | ||
"ts-loader": "^6.2.1", | ||
"typescript": "^3.7.5" | ||
"typescript": "^4.1.2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upgrading typescript here to match the typescript version in |
||
}, | ||
"resolutions": { | ||
"@types/react": "18.0.5" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modern versions of rollup do not support node < 18. Since Node.js v20 is available and LTS, we are upgrading the action runner to use Node v20