Skip to content

Commit 83f1c7d

Browse files
committed
build: update dependencies
1 parent e2ae15d commit 83f1c7d

File tree

4 files changed

+875
-1738
lines changed

4 files changed

+875
-1738
lines changed

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-env node */
22

33
module.exports = {
4+
testEnvironment: 'jsdom',
45
preset: 'ts-jest',
56
testRegex: '((\\.|/)(test|spec))\\.tsx?$',
67
};

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"src/**/*.tsx"
5151
],
5252
"peerDependencies": {
53-
"chart.js": "^3.3.0"
53+
"chart.js": "^3.3.2"
5454
},
5555
"browserslist": [
5656
"Firefox ESR",
@@ -67,36 +67,36 @@
6767
"@rollup/plugin-typescript": "^8.2.1",
6868
"@types/jest": "^26.0.23",
6969
"@types/jest-image-snapshot": "^4.3.0",
70-
"@types/node": "^15.6.1",
71-
"@typescript-eslint/eslint-plugin": "^4.25.0",
72-
"@typescript-eslint/parser": "^4.25.0",
70+
"@types/node": "^15.12.1",
71+
"@typescript-eslint/eslint-plugin": "^4.26.0",
72+
"@typescript-eslint/parser": "^4.26.0",
7373
"@yarnpkg/pnpify": "^2.4.0",
7474
"canvas": "^2.8.0",
7575
"canvas-5-polyfill": "^0.1.5",
76-
"chart.js": "^3.3.0",
77-
"eslint": "^7.27.0",
76+
"chart.js": "^3.3.2",
77+
"eslint": "^7.28.0",
7878
"eslint-config-airbnb-typescript": "^12.3.1",
7979
"eslint-config-prettier": "^8.3.0",
8080
"eslint-config-react-app": "^6.0.0",
8181
"eslint-plugin-flowtype": "^5.7.2",
82-
"eslint-plugin-import": "^2.23.3",
82+
"eslint-plugin-import": "^2.23.4",
8383
"eslint-plugin-jsx-a11y": "^6.4.1",
8484
"eslint-plugin-prettier": "^3.4.0",
85-
"eslint-plugin-react": "^7.23.2",
85+
"eslint-plugin-react": "^7.24.0",
8686
"eslint-plugin-react-hooks": "^4.2.0",
87-
"jest": "^26.6.3",
87+
"jest": "^27.0.4",
8888
"jest-image-snapshot": "^4.5.0",
89-
"prettier": "^2.3.0",
89+
"prettier": "^2.3.1",
9090
"release-it": "^14.7.0",
9191
"rimraf": "^3.0.2",
92-
"rollup": "^2.50.1",
92+
"rollup": "^2.50.6",
9393
"rollup-plugin-cleanup": "^3.2.1",
9494
"rollup-plugin-dts": "^3.0.2",
9595
"rollup-plugin-terser": "^7.0.2",
96-
"ts-jest": "^26.5.6",
96+
"ts-jest": "^27.0.2",
9797
"tslib": "^2.2.0",
9898
"typedoc": "^0.20.36",
99-
"typescript": "~4.2.4"
99+
"typescript": "^4.3.2"
100100
},
101101
"scripts": {
102102
"clean": "rimraf build docs node_modules \"*.tgz\" \"*.tsbuildinfo\"",

src/controllers/StatsBase.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ export abstract class StatsBase<S extends IBaseStats, C extends Required<IBaseOp
6161

6262
// eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
6363
protected _transformStats<T>(target: any, source: S, mapper: (v: number) => T): void {
64-
for (const key of ['min', 'max', 'median', 'q3', 'q1', 'mean'] as const) {
65-
const v = source[key];
64+
for (const key of ['min', 'max', 'median', 'q3', 'q1', 'mean']) {
65+
const v = source[key as keyof IBaseStats];
6666
if (typeof v === 'number') {
6767
// eslint-disable-next-line no-param-reassign
6868
target[key] = mapper(v);
6969
}
7070
}
71-
for (const key of ['outliers', 'items'] as const) {
72-
if (Array.isArray(source[key])) {
71+
for (const key of ['outliers', 'items']) {
72+
if (Array.isArray(source[key as keyof IBaseStats])) {
7373
// eslint-disable-next-line no-param-reassign
74-
target[key] = source[key].map(mapper);
74+
target[key] = source[key as 'outliers' | 'items'].map(mapper);
7575
}
7676
}
7777
}

0 commit comments

Comments
 (0)