chartjs / chartjs-adapter-date-fns

date-fns adapter for Chart.js
MIT License
100 stars 35 forks source link

Fix peerDependencies of chart.js version <3.0.0 #48

Closed jacksongross closed 2 years ago

jacksongross commented 2 years ago

What?

Requires Chart.js 2.8.0 or later and date-fns 2.0.0 or later.

Why?

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.