Skip to content

Commit fca4aab

Browse files
authored
Merge pull request #163 from sgratzl/release/v4.4.2
Release v4.4.2
2 parents df4d831 + f2ae0c9 commit fca4aab

21 files changed

+3520
-7748
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 25 deletions
This file was deleted.

.yarn/releases/yarn-4.2.2.cjs

Lines changed: 0 additions & 894 deletions
This file was deleted.

.yarn/releases/yarn-4.5.0.cjs

Lines changed: 925 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
packageExtensions:
2-
eslint-module-utils@*:
3-
dependencies:
4-
eslint-import-resolver-node: "*"
5-
6-
yarnPath: .yarn/releases/yarn-4.2.2.cjs
1+
yarnPath: .yarn/releases/yarn-4.5.0.cjs

eslint.config.mjs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import prettier from 'eslint-plugin-prettier';
6+
7+
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
8+
plugins: { prettier },
9+
rules: {
10+
'@typescript-eslint/no-explicit-any': 'off',
11+
'max-classes-per-file': 'off',
12+
'no-underscore-dangle': 'off',
13+
'import/extensions': 'off',
14+
},
15+
});
16+
17+
// import path from "node:path";
18+
// import { fileURLToPath } from "node:url";
19+
// import js from "@eslint/js";
20+
// import { FlatCompat } from "@eslint/eslintrc";
21+
22+
// const __filename = fileURLToPath(import.meta.url);
23+
// const __dirname = path.dirname(__filename);
24+
// const compat = new FlatCompat({
25+
// baseDirectory: __dirname,
26+
// recommendedConfig: js.configs.recommended,
27+
// allConfig: js.configs.all
28+
// });
29+
30+
// export default [...fixupConfigRules(compat.extends(
31+
// "airbnb-typescript",
32+
// "react-app",
33+
// "plugin:prettier/recommended",
34+
// "prettier",
35+
// )), {
36+
// plugins: {
37+
// prettier: fixupPluginRules(prettier),
38+
// },
39+
40+
// languageOptions: {
41+
// ecmaVersion: 5,
42+
// sourceType: "script",
43+
44+
// parserOptions: {
45+
// project: "./tsconfig.eslint.json",
46+
// },
47+
// },
48+
49+
// settings: {
50+
// react: {
51+
// version: "99.99.99",
52+
// },
53+
// },
54+
55+
// rules: {
56+
// "@typescript-eslint/no-explicit-any": "off",
57+
// "max-classes-per-file": "off",
58+
// "no-underscore-dangle": "off",
59+
// "import/extensions": "off",
60+
// },
61+
// }];

jest.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sgratzl/chartjs-chart-boxplot",
33
"description": "Chart.js module for charting boxplots and violin charts",
4-
"version": "4.4.1",
4+
"version": "4.4.2",
55
"publishConfig": {
66
"access": "public"
77
},
@@ -69,75 +69,63 @@
6969
"last 2 Firefox versions"
7070
],
7171
"dependencies": {
72-
"@sgratzl/boxplots": "^1.3.0"
72+
"@sgratzl/boxplots": "^1.3.2"
7373
},
7474
"devDependencies": {
7575
"@chiogen/rollup-plugin-terser": "^7.1.3",
76-
"@rollup/plugin-commonjs": "^26.0.1",
77-
"@rollup/plugin-node-resolve": "^15.2.3",
78-
"@rollup/plugin-replace": "^5.0.7",
79-
"@rollup/plugin-typescript": "^11.1.6",
80-
"@types/jest": "^29.5.12",
76+
"@eslint/js": "^9.11.1",
77+
"@rollup/plugin-commonjs": "^28.0.0",
78+
"@rollup/plugin-node-resolve": "^15.3.0",
79+
"@rollup/plugin-replace": "^6.0.1",
80+
"@rollup/plugin-typescript": "^12.1.0",
8181
"@types/jest-image-snapshot": "^6.4.0",
82-
"@types/node": "^20.14.2",
83-
"@typescript-eslint/eslint-plugin": "^7.12.0",
84-
"@typescript-eslint/parser": "^7.12.0",
85-
"@yarnpkg/sdks": "^3.1.2",
82+
"@types/node": "^22.7.4",
83+
"@yarnpkg/sdks": "^3.2.0",
8684
"canvas": "^2.11.2",
8785
"canvas-5-polyfill": "^0.1.5",
88-
"chart.js": "^4.4.3",
89-
"eslint": "^8.57.0",
90-
"eslint-config-airbnb-typescript": "^18.0.0",
91-
"eslint-config-prettier": "^9.1.0",
92-
"eslint-config-react-app": "^7.0.1",
93-
"eslint-plugin-flowtype": "^8.0.3",
94-
"eslint-plugin-import": "^2.29.1",
95-
"eslint-plugin-jsx-a11y": "^6.8.0",
96-
"eslint-plugin-prettier": "^5.1.3",
97-
"eslint-plugin-react": "^7.34.2",
98-
"eslint-plugin-react-hooks": "^4.6.2",
99-
"jest": "^29.7.0",
100-
"jest-environment-jsdom": "^29.7.0",
86+
"chart.js": "^4.4.4",
87+
"eslint": "^9.11.1",
88+
"eslint-plugin-prettier": "^5.2.1",
10189
"jest-image-snapshot": "^6.4.0",
102-
"prettier": "^3.3.1",
103-
"rimraf": "^5.0.7",
104-
"rollup": "^4.18.0",
90+
"jsdom": "^25.0.1",
91+
"prettier": "^3.3.3",
92+
"rimraf": "^6.0.1",
93+
"rollup": "^4.22.5",
10594
"rollup-plugin-cleanup": "^3.2.1",
10695
"rollup-plugin-dts": "^6.1.1",
107-
"ts-jest": "^29.1.4",
108-
"tslib": "^2.6.3",
109-
"typedoc": "^0.25.13",
110-
"typedoc-plugin-markdown": "^4.0.3",
111-
"typedoc-vitepress-theme": "^1.0.0",
112-
"typescript": "^5.4.5",
113-
"vitepress": "^1.2.3",
114-
"vue": "^3.4.27",
96+
"ts-jest": "^29.2.5",
97+
"tslib": "^2.7.0",
98+
"typedoc": "^0.26.7",
99+
"typedoc-plugin-markdown": "^4.2.8",
100+
"typedoc-vitepress-theme": "^1.0.1",
101+
"typescript": "^5.6.2",
102+
"typescript-eslint": "^8.7.0",
103+
"vite": "^5.4.8",
104+
"vitepress": "^1.3.4",
105+
"vitest": "^2.1.1",
106+
"vue": "^3.5.10",
115107
"vue-chartjs": "^5.3.1"
116108
},
117-
"resolutions": {
118-
"@typescript-eslint/eslint-plugin": "^7.2.0",
119-
"@typescript-eslint/parser": "^7.2.0"
120-
},
121109
"scripts": {
122110
"clean": "rimraf --glob build node_modules \"*.tgz\" \"*.tsbuildinfo\"",
123111
"compile": "tsc -b tsconfig.c.json",
124112
"start": "yarn run watch",
125113
"watch": "rollup -c -w",
126114
"build": "rollup -c",
127-
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit",
115+
"test": "vitest --passWithNoTests",
128116
"test:watch": "yarn run test --watch",
129117
"test:coverage": "yarn run test --coverage",
130118
"lint": "yarn run eslint && yarn run prettier",
131119
"fix": "yarn run eslint:fix && yarn run prettier:write",
132120
"prettier:write": "prettier \"*\" \"*/**\" --write",
133121
"prettier": "prettier \"*\" \"*/**\" --check",
134-
"eslint": "eslint src --ext .ts,.tsx --cache",
122+
"eslint": "eslint src --cache",
135123
"eslint:fix": "yarn run eslint --fix",
136124
"prepare": "yarn run build",
137125
"docs:api": "typedoc --options typedoc.json",
138126
"docs:dev": "vitepress dev docs",
139127
"docs:build": "yarn run docs:api && vitepress build docs",
140128
"docs:preview": "vitepress preview docs"
141129
},
142-
"packageManager": "yarn@4.2.2"
130+
"packageManager": "yarn@4.5.0"
143131
}

src/__tests__/createChart.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/// <reference types="jest" />
21
/// <reference types="node" />
32

3+
import { expect } from 'vitest';
44
import { Chart, ChartConfiguration, defaults, ChartType, DefaultDataPoint } from 'chart.js';
55
import { toMatchImageSnapshot, MatchImageSnapshotOptions } from 'jest-image-snapshot';
66
import 'canvas-5-polyfill';
@@ -12,7 +12,7 @@ function toBuffer(canvas: HTMLCanvasElement) {
1212
canvas.toBlob((b) => {
1313
const file = new FileReader();
1414
file.onload = () => resolve(Buffer.from(file.result as ArrayBuffer));
15-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15+
1616
file.readAsArrayBuffer(b!);
1717
});
1818
});
@@ -40,7 +40,7 @@ export default function createChart<
4040
canvas.height = height;
4141
Object.assign(defaults.font, { family: 'Courier New' });
4242
// defaults.color = 'transparent';
43-
// eslint-disable-next-line no-param-reassign
43+
4444
config.options = {
4545
responsive: false,
4646
animation: {
@@ -56,7 +56,7 @@ export default function createChart<
5656
},
5757
...(config.options || {}),
5858
} as any;
59-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
59+
6060
const ctx = canvas.getContext('2d')!;
6161

6262
const t = new Chart<TYPE, DATA, LABEL>(ctx, config);

src/controllers/BoxPlotController.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
LinearScale,
1010
LogarithmicScale,
1111
} from 'chart.js';
12+
import { describe, beforeAll, test } from 'vitest';
1213
import createChart from '../__tests__/createChart';
1314
import { BoxPlotController, BoxPlotDataPoint } from './BoxPlotController';
1415
import { Samples } from './__tests__/utils';

src/controllers/BoxPlotController.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ export class BoxPlotController extends StatsBase<IBoxPlot, Required<IBoxplotOpti
2424
/**
2525
* @hidden
2626
*/
27-
// eslint-disable-next-line class-methods-use-this
27+
2828
protected _parseStats(value: unknown, config: IBoxplotOptions): IBoxPlot | undefined {
2929
return asBoxPlotStats(value, config);
3030
}
3131

3232
/**
3333
* @hidden
3434
*/
35-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
35+
3636
protected _transformStats<T>(target: any, source: IBoxPlot, mapper: (v: number) => T): void {
3737
super._transformStats(target, source, mapper);
3838
for (const key of ['whiskerMin', 'whiskerMax']) {
39-
// eslint-disable-next-line no-param-reassign
4039
target[key] = mapper(source[key as 'whiskerMin' | 'whiskerMax']);
4140
}
4241
}
@@ -82,8 +81,7 @@ export interface BoxPlotControllerDatasetOptions
8281

8382
export type BoxPlotDataPoint = number[] | (Partial<IBoxPlot> & Pick<IBoxPlot, 'min' | 'max' | 'median' | 'q1' | 'q3'>);
8483

85-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
86-
export interface IBoxPlotChartOptions extends IBoxplotOptions {}
84+
export type IBoxPlotChartOptions = IBoxplotOptions;
8785

8886
declare module 'chart.js' {
8987
export interface ChartTypeRegistry {
@@ -92,7 +90,7 @@ declare module 'chart.js' {
9290
datasetOptions: BoxPlotControllerDatasetOptions;
9391
defaultDataPoint: BoxPlotDataPoint;
9492
scales: keyof CartesianScaleTypeRegistry;
95-
metaExtensions: {};
93+
metaExtensions: object;
9694
parsedDataType: IBoxPlot & ChartTypeRegistry['bar']['parsedDataType'];
9795
};
9896
}

0 commit comments

Comments
 (0)