Skip to content

Commit

Permalink
docs: v5.1 notes
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Dec 19, 2022
1 parent 1eb1ba7 commit 252a00f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Supports Chart.js v4.

[![npm version](https://badge.fury.io/js/vue-chartjs.svg)](https://badge.fury.io/js/vue-chartjs)
[![codecov](https://codecov.io/gh/apertureless/vue-chartjs/branch/master/graph/badge.svg)](https://codecov.io/gh/apertureless/vue-chartjs)
[![Build Status](https://img.shields.io/github/workflow/status/apertureless/vue-chartjs/CI.svg)](https://github.com/apertureless/vue-chartjs/actions)
[![Build Status](https://img.shields.io/github/actions/workflow/status/apertureless/vue-chartjs/ci.yml?branch=main)](https://github.com/apertureless/vue-chartjs/actions)
[![Package Quality](http://npm.packagequality.com/shield/vue-chartjs.svg)](http://packagequality.com/#?package=vue-chartjs)
[![npm](https://img.shields.io/npm/dm/vue-chartjs.svg)](https://www.npmjs.com/package/vue-chartjs)
[![Gitter chat](https://img.shields.io/gitter/room/TechnologyAdvice/Stardust.svg)](https://gitter.im/vue-chartjs/Lobby)
Expand Down
7 changes: 7 additions & 0 deletions website/src/migration-guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ With v5, this library introduces a number of breaking changes

### ESM

#### v5.0

Chart.js v4 and vue-chartjs v5 are [ESM-only packages](https://nodejs.org/api/esm.html). To use them in your project, it also should be ESM:

```json
Expand All @@ -15,6 +17,11 @@ Chart.js v4 and vue-chartjs v5 are [ESM-only packages](https://nodejs.org/api/es

If you are experiencing this problem with Jest, you should follow [this doc](https://jestjs.io/docs/ecmascript-modules) to enable ESM support. Or, we can recommend you migrate to [Vitest](https://vitest.dev/). Vitest has ESM support out of the box and [has almost the same API as Jest](https://vitest.dev/guide/migration.html#migrating-from-jest). [Here is our example of migration](https://github.com/reactchartjs/react-chartjs-2/commit/7f3ec96101d21e43cae8cbfe5e09a46a17cff1ef).


#### v5.1

Chart.js v4.1 and vue-chartjs v5.1 have restored the CommonJS support.

### API changes

- `chartData` props were renamed to `data`
Expand Down

0 comments on commit 252a00f

Please sign in to comment.