Skip to content

Commit 9aacf4a

Browse files
authored
Merge pull request #243 from sgratzl/release/v4.3.2
Release v4.3.2
2 parents 1c0e4c0 + 4e53704 commit 9aacf4a

22 files changed

+2912
-7089
lines changed

.eslintrc.cjs

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

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: 'github-actions'
5+
directory: '/'
6+
schedule:
7+
interval: 'monthly'
8+
target-branch: 'dev'
9+
labels:
10+
- 'dependencies'
11+
- 'chore'
12+
- package-ecosystem: 'npm'
13+
directory: '/'
14+
schedule:
15+
interval: 'monthly'
16+
target-branch: 'dev'
17+
labels:
18+
- 'dependencies'
19+
- 'chore'

.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: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chartjs-chart-geo",
33
"description": "Chart.js module for charting maps",
4-
"version": "4.3.1",
4+
"version": "4.3.2",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "[email protected]",
@@ -52,7 +52,7 @@
5252
"dependencies": {
5353
"@types/d3-geo": "^3.1.0",
5454
"@types/d3-scale-chromatic": "^3.0.3",
55-
"@types/topojson-client": "^3.1.4",
55+
"@types/topojson-client": "^3.1.5",
5656
"d3-array": "^3.2.4",
5757
"d3-color": "^3.1.0",
5858
"d3-geo": "^3.1.1",
@@ -62,77 +62,64 @@
6262
},
6363
"devDependencies": {
6464
"@chiogen/rollup-plugin-terser": "^7.1.3",
65-
"@rollup/plugin-commonjs": "^26.0.1",
66-
"@rollup/plugin-node-resolve": "^15.2.3",
67-
"@rollup/plugin-replace": "^5.0.7",
68-
"@rollup/plugin-typescript": "^11.1.6",
69-
"@types/jest": "^29.5.12",
65+
"@eslint/js": "^9.11.1",
66+
"@rollup/plugin-commonjs": "^28.0.0",
67+
"@rollup/plugin-node-resolve": "^15.3.0",
68+
"@rollup/plugin-replace": "^6.0.1",
69+
"@rollup/plugin-typescript": "^12.1.0",
7070
"@types/jest-image-snapshot": "^6.4.0",
71-
"@types/node": "^20.14.2",
72-
"@types/seedrandom": "^3.0.8",
73-
"@typescript-eslint/eslint-plugin": "^7.12.0",
74-
"@typescript-eslint/parser": "^7.12.0",
75-
"@yarnpkg/pnpify": "^4.1.0",
76-
"@yarnpkg/sdks": "^3.1.2",
71+
"@types/node": "^22.7.4",
72+
"@types/seedrandom": "^3",
73+
"@yarnpkg/sdks": "^3.2.0",
7774
"canvas": "^2.11.2",
7875
"canvas-5-polyfill": "^0.1.5",
79-
"chart.js": "^4.4.3",
76+
"chart.js": "^4.4.4",
8077
"chartjs-plugin-datalabels": "^2.2.0",
81-
"eslint": "^8.57.0",
82-
"eslint-config-airbnb-typescript": "^18.0.0",
83-
"eslint-config-prettier": "^9.1.0",
84-
"eslint-config-react-app": "^7.0.1",
85-
"eslint-plugin-flowtype": "^8.0.3",
86-
"eslint-plugin-import": "^2.29.1",
87-
"eslint-plugin-jsx-a11y": "^6.8.0",
88-
"eslint-plugin-prettier": "^5.1.3",
89-
"eslint-plugin-react": "^7.34.2",
90-
"eslint-plugin-react-hooks": "^4.6.2",
91-
"jest": "^29.7.0",
92-
"jest-environment-jsdom": "^29.7.0",
78+
"eslint": "^9.11.1",
79+
"eslint-plugin-prettier": "^5.2.1",
9380
"jest-image-snapshot": "^6.4.0",
94-
"prettier": "^3.3.1",
95-
"rimraf": "^5.0.7",
96-
"rollup": "^4.18.0",
81+
"jsdom": "^25.0.1",
82+
"prettier": "^3.3.3",
83+
"rimraf": "^6.0.1",
84+
"rollup": "^4.22.5",
9785
"rollup-plugin-cleanup": "^3.2.1",
9886
"rollup-plugin-dts": "^6.1.1",
9987
"seedrandom": "^3.0.5",
100-
"ts-jest": "^29.1.4",
101-
"tslib": "^2.6.3",
102-
"typedoc": "^0.25.13",
103-
"typedoc-plugin-markdown": "^4.0.3",
104-
"typedoc-vitepress-theme": "^1.0.0",
105-
"typescript": "^5.4.5",
88+
"ts-jest": "^29.2.5",
89+
"tslib": "^2.7.0",
90+
"typedoc": "^0.26.7",
91+
"typedoc-plugin-markdown": "^4.2.8",
92+
"typedoc-vitepress-theme": "^1.0.1",
93+
"typescript": "^5.6.2",
94+
"typescript-eslint": "^8.7.0",
10695
"us-atlas": "^3.0.1",
107-
"vitepress": "^1.2.3",
108-
"vue": "^3.4.27",
96+
"vite": "^5.4.8",
97+
"vitepress": "^1.3.4",
98+
"vitest": "^2.1.1",
99+
"vue": "^3.5.10",
109100
"vue-chartjs": "^5.3.1",
110101
"world-atlas": "^2.0.2"
111102
},
112-
"resolutions": {
113-
"@typescript-eslint/eslint-plugin": "^7.2.0",
114-
"@typescript-eslint/parser": "^7.2.0"
115-
},
116103
"scripts": {
117104
"clean": "rimraf --glob build node_modules \"*.tgz\" \"*.tsbuildinfo\"",
118105
"compile": "tsc -b tsconfig.c.json",
119106
"start": "yarn run watch",
120107
"watch": "rollup -c -w",
121108
"build": "rollup -c",
122-
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit",
109+
"test": "vitest --passWithNoTests",
123110
"test:watch": "yarn run test --watch",
124111
"test:coverage": "yarn run test --coverage",
125112
"lint": "yarn run eslint && yarn run prettier",
126113
"fix": "yarn run eslint:fix && yarn run prettier:write",
127114
"prettier:write": "prettier \"*\" \"*/**\" --write",
128115
"prettier": "prettier \"*\" \"*/**\" --check",
129-
"eslint": "eslint src --ext .ts,.tsx --cache",
116+
"eslint": "eslint src --cache",
130117
"eslint:fix": "yarn run eslint --fix",
131118
"prepare": "yarn run build",
132119
"docs:api": "typedoc --options typedoc.json",
133120
"docs:dev": "vitepress dev docs",
134121
"docs:build": "yarn run docs:api && vitepress build docs",
135122
"docs:preview": "vitepress preview docs"
136123
},
137-
"packageManager": "yarn@4.2.2"
124+
"packageManager": "yarn@4.5.0"
138125
}

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/BubbleMapController.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import createChart from '../__tests__/createChart';
1515
import { BubbleMapController } from './BubbleMapController';
1616
import data from './__tests__/data';
17-
17+
import { describe, beforeAll, test } from 'vitest';
1818
const require = createRequire(import.meta.url); // construct the require method
1919
const states10m = require('us-atlas/states-10m.json');
2020

0 commit comments

Comments
 (0)