Skip to content

Commit

Permalink
Change CHART.JS dependency to version 4 (#808)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
stockiNail authored Nov 17, 2022
1 parent 8608f0a commit 08f92b8
Show file tree
Hide file tree
Showing 20 changed files with 1,681 additions and 1,912 deletions.
11 changes: 11 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ module.exports = {
},
}],
],
chainWebpack(config) {
config.module
.rule('chart.js')
.include.add(path.resolve('node_modules/chart.js')).end()
.use('babel-loader')
.loader('babel-loader')
.options({
presets: ['@babel/preset-env']
})
.end();
},
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-include'), path.resolve(__dirname, '../'));
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = function(karma) {
files: [
{pattern: 'test/fixtures/**/*.js', included: false},
{pattern: 'test/fixtures/**/*.png', included: false},
{pattern: 'node_modules/chart.js/dist/chart.js'},
{pattern: 'node_modules/chart.js/dist/chart.umd.js'},
{pattern: 'src/index.js', watched: false},
{pattern: 'test/index.js'},
{pattern: 'test/specs/**/**.js'}
Expand Down
3,199 changes: 1,605 additions & 1,594 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "chartjs-plugin-annotation",
"homepage": "https://www.chartjs.org/chartjs-plugin-annotation/index",
"description": "Annotations for Chart.js",
"version": "2.0.1",
"version": "2.1.0",
"author": "Evert Timberg <[email protected]>",
"license": "MIT",
"main": "dist/chartjs-plugin-annotation.js",
Expand Down Expand Up @@ -33,14 +33,18 @@
"test-types-integration": "mocha --full-trace test/integration/*-test.js"
},
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@rollup/plugin-json": "^5.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@simonbrunel/vuepress-plugin-versions": "^0.2.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"chart.js": "^3.7.0",
"babel-loader": "^8.3.0",
"chart.js": "^4.0.1",
"chartjs-plugin-autocolors": "^0.0.5",
"chartjs-test-utils": "^0.4.0",
"chartjs-test-utils": "^0.5.0",
"concurrently": "^7.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.2.0",
Expand All @@ -53,25 +57,25 @@
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"karma-rollup-preprocessor": "^7.0.7",
"markdown-it-include": "^2.0.0",
"mocha": "^9.1.3",
"pixelmatch": "^5.2.1",
"rollup": "^2.45.2",
"rollup-plugin-istanbul": "^3.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup": "^3.3.0",
"rollup-plugin-istanbul": "^4.0.0",
"typedoc": "^0.23.8",
"typedoc-plugin-markdown": "^3.13.3",
"typescript": "^4.2.4",
"vuepress": "^1.8.2",
"vuepress": "^1.9.7",
"vuepress-plugin-flexsearch": "^0.3.0",
"vuepress-plugin-redirect": "^1.2.5",
"vuepress-plugin-typedoc": "^0.10.0",
"vuepress-theme-chartjs": "^0.2.0"
"vuepress-theme-chartjs": "^0.2.0",
"webpack": "^4.46.0"
},
"peerDependencies": {
"chart.js": "^3.7.0"
"chart.js": ">=3.7.0"
}
}
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const json = require('@rollup/plugin-json');
const resolve = require('@rollup/plugin-node-resolve').default;
const terser = require('rollup-plugin-terser').terser;
const terser = require('@rollup/plugin-terser').default;
const {name, version, homepage, main, module: _module} = require('./package.json');

const banner = `/*!
Expand Down
53 changes: 0 additions & 53 deletions test/fixtures/box/noDefaultScales.js

This file was deleted.

Binary file removed test/fixtures/box/noDefaultScales.png
Binary file not shown.
53 changes: 0 additions & 53 deletions test/fixtures/ellipse/noDefaultScales.js

This file was deleted.

Binary file removed test/fixtures/ellipse/noDefaultScales.png
Binary file not shown.
Binary file modified test/fixtures/label/clip-false.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 0 additions & 49 deletions test/fixtures/label/noDefaultScales.js

This file was deleted.

Binary file removed test/fixtures/label/noDefaultScales.png
Binary file not shown.
54 changes: 0 additions & 54 deletions test/fixtures/line/noDefaultScales.js

This file was deleted.

Binary file removed test/fixtures/line/noDefaultScales.png
Binary file not shown.
47 changes: 0 additions & 47 deletions test/fixtures/point/noDefaultScales.js

This file was deleted.

Binary file removed test/fixtures/point/noDefaultScales.png
Binary file not shown.
Loading

0 comments on commit 08f92b8

Please sign in to comment.