Skip to content

Commit 08f92b8

Browse files
authored
Change CHART.JS dependency to version 4 (#808)
* Add element diagrams to the annotation types guide * Change CHART.JS dependency to version 4 * changes peerDeps * changes peerDep * fixes transpiller of webpack for doc * removes axis options no needed * apply review removing noDefaultScale fixtures for a unit test * acquiring a chart to test retrieveScaleID function
1 parent 8608f0a commit 08f92b8

20 files changed

+1681
-1912
lines changed

docs/.vuepress/config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ module.exports = {
7373
},
7474
}],
7575
],
76+
chainWebpack(config) {
77+
config.module
78+
.rule('chart.js')
79+
.include.add(path.resolve('node_modules/chart.js')).end()
80+
.use('babel-loader')
81+
.loader('babel-loader')
82+
.options({
83+
presets: ['@babel/preset-env']
84+
})
85+
.end();
86+
},
7687
markdown: {
7788
extendMarkdown: md => {
7889
md.use(require('markdown-it-include'), path.resolve(__dirname, '../'));

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = function(karma) {
6363
files: [
6464
{pattern: 'test/fixtures/**/*.js', included: false},
6565
{pattern: 'test/fixtures/**/*.png', included: false},
66-
{pattern: 'node_modules/chart.js/dist/chart.js'},
66+
{pattern: 'node_modules/chart.js/dist/chart.umd.js'},
6767
{pattern: 'src/index.js', watched: false},
6868
{pattern: 'test/index.js'},
6969
{pattern: 'test/specs/**/**.js'}

package-lock.json

Lines changed: 1605 additions & 1594 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "chartjs-plugin-annotation",
33
"homepage": "https://www.chartjs.org/chartjs-plugin-annotation/index",
44
"description": "Annotations for Chart.js",
5-
"version": "2.0.1",
5+
"version": "2.1.0",
66
"author": "Evert Timberg <[email protected]>",
77
"license": "MIT",
88
"main": "dist/chartjs-plugin-annotation.js",
@@ -33,14 +33,18 @@
3333
"test-types-integration": "mocha --full-trace test/integration/*-test.js"
3434
},
3535
"devDependencies": {
36-
"@rollup/plugin-json": "^4.1.0",
37-
"@rollup/plugin-node-resolve": "^13.0.0",
36+
"@babel/core": "^7.20.2",
37+
"@babel/preset-env": "^7.20.2",
38+
"@rollup/plugin-json": "^5.0.1",
39+
"@rollup/plugin-node-resolve": "^15.0.1",
40+
"@rollup/plugin-terser": "^0.1.0",
3841
"@simonbrunel/vuepress-plugin-versions": "^0.2.0",
3942
"@typescript-eslint/eslint-plugin": "^5.4.0",
4043
"@typescript-eslint/parser": "^5.4.0",
41-
"chart.js": "^3.7.0",
44+
"babel-loader": "^8.3.0",
45+
"chart.js": "^4.0.1",
4246
"chartjs-plugin-autocolors": "^0.0.5",
43-
"chartjs-test-utils": "^0.4.0",
47+
"chartjs-test-utils": "^0.5.0",
4448
"concurrently": "^7.0.0",
4549
"cross-env": "^7.0.3",
4650
"eslint": "^8.2.0",
@@ -53,25 +57,25 @@
5357
"karma-chrome-launcher": "^3.1.0",
5458
"karma-coverage": "^2.0.3",
5559
"karma-firefox-launcher": "^2.1.0",
56-
"karma-jasmine": "^4.0.1",
57-
"karma-jasmine-html-reporter": "^1.5.4",
60+
"karma-jasmine": "^5.1.0",
61+
"karma-jasmine-html-reporter": "^2.0.0",
5862
"karma-rollup-preprocessor": "^7.0.7",
5963
"markdown-it-include": "^2.0.0",
6064
"mocha": "^9.1.3",
6165
"pixelmatch": "^5.2.1",
62-
"rollup": "^2.45.2",
63-
"rollup-plugin-istanbul": "^3.0.0",
64-
"rollup-plugin-terser": "^7.0.2",
66+
"rollup": "^3.3.0",
67+
"rollup-plugin-istanbul": "^4.0.0",
6568
"typedoc": "^0.23.8",
6669
"typedoc-plugin-markdown": "^3.13.3",
6770
"typescript": "^4.2.4",
68-
"vuepress": "^1.8.2",
71+
"vuepress": "^1.9.7",
6972
"vuepress-plugin-flexsearch": "^0.3.0",
7073
"vuepress-plugin-redirect": "^1.2.5",
7174
"vuepress-plugin-typedoc": "^0.10.0",
72-
"vuepress-theme-chartjs": "^0.2.0"
75+
"vuepress-theme-chartjs": "^0.2.0",
76+
"webpack": "^4.46.0"
7377
},
7478
"peerDependencies": {
75-
"chart.js": "^3.7.0"
79+
"chart.js": ">=3.7.0"
7680
}
7781
}

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const json = require('@rollup/plugin-json');
22
const resolve = require('@rollup/plugin-node-resolve').default;
3-
const terser = require('rollup-plugin-terser').terser;
3+
const terser = require('@rollup/plugin-terser').default;
44
const {name, version, homepage, main, module: _module} = require('./package.json');
55

66
const banner = `/*!

test/fixtures/box/noDefaultScales.js

Lines changed: 0 additions & 53 deletions
This file was deleted.
-13.7 KB
Binary file not shown.

test/fixtures/ellipse/noDefaultScales.js

Lines changed: 0 additions & 53 deletions
This file was deleted.
-28.3 KB
Binary file not shown.

test/fixtures/label/clip-false.png

-168 Bytes
Loading

0 commit comments

Comments
 (0)