-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix peerDependencies of chart.js version <3.0.0 #48
Fix peerDependencies of chart.js version <3.0.0 #48
Conversation
…ned in README.md Signed-off-by: Jackson Gross <jackson.gross@gmail.com>
@@ -49,6 +49,6 @@ | |||
"rollup-plugin-terser": "^7.0.2" | |||
}, | |||
"peerDependencies": { | |||
"chart.js": "^3.0.0" | |||
"chart.js": ">=2.8.0" |
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.
Why not exclude 4.x?
"chart.js": ">=2.8.0" | |
"chart.js": ">=2.8.0 < 4" |
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.
Why exclude? I think its a greater change this will work with 4.x than not. That translates directly to needing to do a new release of this adapter when 4.x is released.
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.
Just avoid unexpected breaking changes in chart.js 4.x. You can include 4.x in a next patch release 😁
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.
Yeah I agree with @kurkle, especially considering there isn't any version 4 released, and I haven't seen any plans to release a new major version as far as I know. I think it would be great to leave it as is to prevent the least amount of disruption 😄
@@ -29,7 +30,7 @@ | |||
"rollup-plugin-terser": "^7.0.2" | |||
}, | |||
"peerDependencies": { | |||
"chart.js": "^3.0.0" | |||
"chart.js": ">=2.8.0" |
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.
"chart.js": ">=2.8.0" | |
"chart.js": ">=2.8.0 <4" |
What?
peerDependencies
forchart.js
to>=2.8.0
inpackage.json
to match support mentioned in README.mdWhy?
There was a related issue that was closed which was actually a valid problem I ran into if a project is using npm 7+ and depends on
chart.js
>=2.8.0 and <3.0.0. The code is definitely supported, but the package resolution is broken due to how peerDependencies are resolved since npm 7.This change ensures that users can still install this package using older supported versions of chart.js.