Skip to content

Commit d9a3a4a

Browse files
spaenlehpyphilia
andauthored
fix: update deps (#103)
* fix: update deps * refactor: update apps query client --------- Co-authored-by: kim <[email protected]>
1 parent 34e8507 commit d9a3a4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3519
-2556
lines changed

.husky/commit-msg

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
yarn commitlint --edit ${1}

.husky/post-checkout

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
yarn install

.husky/post-commit

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
git status

.husky/post-merge

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
yarn install

.husky/pre-commit

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
yarn pre-commit

.husky/pre-push

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
yarn pre-push

.prettierrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
"^[./]"
1313
],
1414
"importOrderSeparation": true,
15-
"importOrderSortSpecifiers": true
15+
"importOrderSortSpecifiers": true,
16+
"plugins": [
17+
"@trivago/prettier-plugin-sort-imports"
18+
]
1619
}

cypress/e2e/AnalyticsView.cy.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { Context, formatDate } from '@graasp/sdk';
2+
23
import {
3-
ANALYTICS_ROW_EQUATION_ID,
4-
ANALYTICS_ROW_RESULT_ID,
54
ANALYTICS_ROW_CREATED_AT_ID,
5+
ANALYTICS_ROW_EQUATION_ID,
66
ANALYTICS_ROW_MEMBER_ID,
7+
ANALYTICS_ROW_RESULT_ID,
78
buildAnalyticsRowId,
89
} from '@/config/selectors';
9-
import { appQueryParameters } from '../fixtures/queryParameters';
10+
1011
import { MOCK_APP_ACTIONS } from '../fixtures/mockActions';
12+
import { appQueryParameters } from '../fixtures/queryParameters';
1113

1214
describe('Analytic view', () => {
1315
describe('check analytic table is rendered with the right data', () => {

cypress/e2e/Calculator.cy.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1+
import {
2+
ANGLE_UNITS,
3+
BUTTON_NAMES,
4+
KATEX_MINUS_SYMBOL,
5+
PI_SYMBOL,
6+
TIMES_SYMBOL,
7+
} from '../../src/config/constants';
8+
import { RESULT_ERROR_MESSAGE } from '../../src/config/messages';
19
import { RESULT_TEXT_NAME } from '../../src/config/selectors';
2-
import { appQueryParameters } from '../fixtures/queryParameters';
310
import {
4-
FIXTURES_COMPUTATIONS,
511
FIXTURES_BACKSPACE,
12+
FIXTURES_CHAINED_COMPUTATIONS,
13+
FIXTURES_COMPUTATIONS,
614
FIXTURES_ERROR_COMPUTATIONS,
715
FIXTURES_TYPO_ERROR_COMPUTATIONS,
8-
FIXTURES_CHAINED_COMPUTATIONS,
916
} from '../fixtures/computations';
17+
import { appQueryParameters } from '../fixtures/queryParameters';
1018
import {
11-
FIXTURES_SCIENTIFIC_COMPUTATIONS,
12-
FIXTURES_SCIENTIFIC_BACKSPACE,
19+
FIXTURES_CHAINED_SCIENTIFIC_COMPUTATIONS,
1320
FIXTURES_ERROR_SCIENTIFIC_COMPUTATIONS,
14-
FIXTURES_POSITIVE_INFINITY_SCIENTIFIC_COMPUTATIONS,
1521
FIXTURES_NEGATIVE_INFINITY_SCIENTIFIC_COMPUTATIONS,
22+
FIXTURES_POSITIVE_INFINITY_SCIENTIFIC_COMPUTATIONS,
23+
FIXTURES_SCIENTIFIC_BACKSPACE,
24+
FIXTURES_SCIENTIFIC_COMPUTATIONS,
1625
FIXTURES_TYPO_ERROR_SCIENTIFIC_COMPUTATIONS,
17-
FIXTURES_CHAINED_SCIENTIFIC_COMPUTATIONS,
1826
FIXTURES_UNCHAINED_SCIENTIFIC_COMPUTATIONS,
1927
} from '../fixtures/scientificComputations';
20-
import {
21-
ANGLE_UNITS,
22-
BUTTON_NAMES,
23-
KATEX_MINUS_SYMBOL,
24-
PI_SYMBOL,
25-
TIMES_SYMBOL,
26-
} from '../../src/config/constants';
27-
import { RESULT_ERROR_MESSAGE } from '../../src/config/messages';
2828

2929
describe('Calculator', () => {
3030
const resultSelector = `[data-cy="${RESULT_TEXT_NAME}"] .katex-html`;

cypress/e2e/Keyboard.cy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
BUTTON_NAMES,
33
DIVIDE_SYMBOL,
4-
TIMES_SYMBOL,
54
KATEX_MINUS_SYMBOL,
5+
TIMES_SYMBOL,
66
} from '../../src/config/constants';
77
import { RESULT_TEXT_NAME } from '../../src/config/selectors';
88
import { appQueryParameters } from '../fixtures/queryParameters';

cypress/fixtures/mockActions.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { CalculationTriggers } from '@/config/constants';
21
import { AppAction } from '@graasp/sdk';
2+
3+
import { CalculationTriggers } from '@/config/constants';
4+
5+
import { ActionData } from '../../src/types/table';
36
import { MEMBERS } from './members';
47
import { MOCK_APP_ITEM } from './mockItem';
5-
import { ActionData } from '../../src/types/table';
68

79
export const MOCK_ADD_CALC_ACTION: AppAction<ActionData> = {
810
id: '123456789',

cypress/fixtures/mockItem.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AppItemFactory } from '@graasp/sdk';
2+
23
import { MEMBERS } from './members';
34

45
export const MOCK_APP_ITEM = AppItemFactory({

cypress/fixtures/scientificComputations.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
BUTTON_NAMES,
3-
TIMES_SYMBOL,
43
DIVIDE_SYMBOL,
5-
PI_SYMBOL,
64
KATEX_MINUS_SYMBOL,
5+
PI_SYMBOL,
6+
TIMES_SYMBOL,
77
} from '../../src/config/constants';
88

99
export const FIXTURES_SCIENTIFIC_COMPUTATIONS = [

cypress/support/commands.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import {
33
ANGLE_UNIT_SWITCH_NAME,
44
SCIENTIFIC_MODE_SWITCH_NAME,
55
} from '../../src/config/selectors';
6-
import { LOAD_PAGE_PAUSE, CLICK_BUTTON_PAUSE } from '../constants';
6+
import { CLICK_BUTTON_PAUSE, LOAD_PAGE_PAUSE } from '../constants';
77
import { CURRENT_MEMBER, MEMBERS } from '../fixtures/members';
8-
98
import { MOCK_APP_ITEM } from '../fixtures/mockItem';
109

1110
Cypress.Commands.add('setUpApi', (database = {}, appContext = {}) => {

cypress/support/e2e.ts

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// You can read more here:
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
15-
1615
// Import commands.js using ES2015 syntax:
1716
import './commands';
1817

cypress/support/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// cypress/support/index.ts
2-
32
import { Database, LocalContext } from '@graasp/apps-query-client';
3+
44
import { ANGLE_UNITS } from 'config/constants';
55
import { ValueOf } from 'types/math';
66

package.json

+49-49
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@
1010
"type": "module",
1111
"license": "AGPL3.0-only",
1212
"dependencies": {
13-
"@emotion/react": "11.11.1",
14-
"@emotion/styled": "11.11.0",
15-
"@graasp/apps-query-client": "3.4.13",
16-
"@graasp/sdk": "4.0.1",
17-
"@graasp/ui": "4.8.1",
18-
"@mui/icons-material": "5.14.3",
13+
"@emotion/react": "11.13.0",
14+
"@emotion/styled": "11.13.0",
15+
"@graasp/apps-query-client": "3.5.1",
16+
"@graasp/sdk": "4.22.0",
17+
"@graasp/ui": "4.23.0",
18+
"@mui/icons-material": "5.16.4",
1919
"@mui/lab": "5.0.0-alpha.134",
20-
"@mui/material": "5.14.4",
20+
"@mui/material": "5.16.4",
2121
"@tanstack/react-query": "4.36.1",
2222
"@tanstack/react-query-devtools": "4.36.1",
23-
"date-fns": "3.3.1",
24-
"i18next": "22.5.1",
23+
"date-fns": "3.6.0",
24+
"i18next": "23.12.2",
2525
"interweave": "13.1.0",
26-
"katex": "0.16.7",
26+
"katex": "0.16.11",
2727
"lodash.isnan": "3.0.2",
2828
"lodash.isnumber": "3.0.3",
2929
"lodash.isobject": "3.0.2",
3030
"lodash.isstring": "4.0.1",
3131
"lodash.sortby": "4.7.0",
32-
"mathjs": "11.8.2",
32+
"mathjs": "13.0.3",
3333
"prop-types": "15.8.1",
34-
"qs": "6.11.2",
35-
"react": "18.2.0",
36-
"react-dom": "18.2.0",
37-
"react-i18next": "12.3.1",
38-
"react-router-dom": "6.12.1",
39-
"react-select": "5.7.3",
40-
"react-toastify": "9.1.3",
41-
"stylis": "4.3.1",
34+
"qs": "6.12.3",
35+
"react": "18.3.1",
36+
"react-dom": "18.3.1",
37+
"react-i18next": "15.0.0",
38+
"react-router-dom": "6.25.1",
39+
"react-select": "5.8.0",
40+
"react-toastify": "10.0.5",
41+
"stylis": "4.3.2",
4242
"stylis-plugin-rtl": "2.1.1"
4343
},
4444
"scripts": {
@@ -51,55 +51,55 @@
5151
"preview:test": "yarn vite preview --mode test",
5252
"pre-commit": "yarn prettier:check && yarn lint && yarn type-check",
5353
"pre-push": "yarn lint && yarn build",
54-
"hooks:install": "husky install",
55-
"hooks:uninstall": "husky uninstall",
54+
"hooks:install": "husky",
5655
"lint": "eslint .",
5756
"type-check": "tsc --noEmit && tsc --noEmit -p cypress/tsconfig.json",
57+
"check": "yarn prettier:check && yarn lint && yarn type-check",
5858
"prettier:check": "prettier --check {src,cypress}/**/*.{ts,tsx}",
5959
"prettier:write": "prettier --write {src,cypress}/**/*.{ts,tsx}",
6060
"test": "yarn build:test && concurrently -k -s first \"yarn preview:test\" \"yarn cypress:run\"",
6161
"cypress:run": "env-cmd -f ./.env.test cypress run --browser chrome",
6262
"report": "cat ./coverage/lcov.info | codacy-coverage",
6363
"cypress:open": "env-cmd -f ./.env.test cypress open",
64-
"cypress": "npm-run-all --parallel start cypress:open",
65-
"postinstall": "husky install"
64+
"cypress": "npm-run-all --parallel start cypress:open"
6665
},
6766
"devDependencies": {
68-
"@commitlint/cli": "17.6.5",
69-
"@commitlint/config-conventional": "17.6.5",
67+
"@commitlint/cli": "19.3.0",
68+
"@commitlint/config-conventional": "19.2.2",
69+
"@trivago/prettier-plugin-sort-imports": "4.3.0",
7070
"@types/katex": "0.16.7",
7171
"@types/lodash.isnan": "3.0.9",
7272
"@types/lodash.isnumber": "3.0.9",
7373
"@types/lodash.isobject": "3.0.9",
7474
"@types/lodash.isstring": "4.0.9",
75-
"@types/lodash.sortby": "^4",
76-
"@types/node": "20.11.30",
77-
"@types/react": "18.2.79",
78-
"@types/react-dom": "18.2.25",
79-
"@types/stylis": "^4",
80-
"@typescript-eslint/eslint-plugin": "5.60.1",
81-
"@typescript-eslint/parser": "5.60.1",
82-
"@vitejs/plugin-react": "4.2.1",
83-
"cypress": "13.6.6",
75+
"@types/lodash.sortby": "^4.7.9",
76+
"@types/node": "20.14.12",
77+
"@types/react": "18.3.3",
78+
"@types/react-dom": "18.3.0",
79+
"@types/stylis": "^4.2.6",
80+
"@typescript-eslint/eslint-plugin": "7.17.0",
81+
"@typescript-eslint/parser": "7.17.0",
82+
"@vitejs/plugin-react": "4.3.1",
83+
"cypress": "13.13.1",
8484
"env-cmd": "10.1.0",
85-
"eslint": "8.43.0",
85+
"eslint": "8.57.0",
8686
"eslint-config-airbnb": "19.0.4",
87-
"eslint-config-airbnb-typescript": "17.1.0",
88-
"eslint-config-prettier": "8.8.0",
87+
"eslint-config-airbnb-typescript": "18.0.0",
88+
"eslint-config-prettier": "8.10.0",
8989
"eslint-config-react-app": "7.0.1",
9090
"eslint-import-resolver-typescript": "3.6.1",
91-
"eslint-plugin-cypress": "2.15.1",
92-
"eslint-plugin-import": "2.27.5",
93-
"eslint-plugin-jsx-a11y": "6.7.1",
94-
"eslint-plugin-prettier": "5.1.3",
95-
"eslint-plugin-react": "7.32.2",
96-
"eslint-plugin-react-hooks": "4.6.0",
97-
"husky": "^8.0.3",
98-
"prettier": "3.2.5",
99-
"typescript": "5.1.6",
100-
"vite": "5.1.7",
101-
"vite-plugin-checker": "0.6.4",
102-
"vite-plugin-istanbul": "5.0.0"
91+
"eslint-plugin-cypress": "2.15.2",
92+
"eslint-plugin-import": "2.29.1",
93+
"eslint-plugin-jsx-a11y": "6.9.0",
94+
"eslint-plugin-prettier": "5.2.1",
95+
"eslint-plugin-react": "7.35.0",
96+
"eslint-plugin-react-hooks": "4.6.2",
97+
"husky": "^9.1.1",
98+
"prettier": "3.3.3",
99+
"typescript": "5.5.4",
100+
"vite": "5.3.4",
101+
"vite-plugin-checker": "0.7.2",
102+
"vite-plugin-istanbul": "6.0.2"
103103
},
104104
"browserslist": [
105105
">0.2%",

src/components/App.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import katex from 'katex';
2-
import 'katex/dist/katex.min.css';
31
import { useLocalContext } from '@graasp/apps-query-client';
42
import { Context } from '@graasp/sdk';
5-
import PlayerView from './views/PlayerView';
3+
4+
import katex from 'katex';
5+
import 'katex/dist/katex.min.css';
6+
67
import AnalyticsView from './views/AnalyticsView';
8+
import PlayerView from './views/PlayerView';
79

810
// bind katex to the window object
911
window.katex = katex;

src/components/FocusIndicator.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { Grid, Typography } from '@mui/material';
21
import { useTranslation } from 'react-i18next';
2+
33
import InfoIcon from '@mui/icons-material/Info';
4-
import { ENABLED_COLOR, DISABLED_COLOR } from '@/config/constants';
4+
import { Grid, Typography } from '@mui/material';
5+
6+
import { DISABLED_COLOR, ENABLED_COLOR } from '@/config/constants';
57

68
const FocusIndicator = ({ isFocused }: { isFocused: boolean }): JSX.Element => {
79
const { t } = useTranslation();

src/components/Root.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import { I18nextProvider } from 'react-i18next';
2-
import { ThemeProvider } from '@mui/material/styles';
32
import { ToastContainer } from 'react-toastify';
4-
import { Loader, theme } from '@graasp/ui';
53
import 'react-toastify/dist/ReactToastify.css';
4+
5+
import { ThemeProvider } from '@mui/material/styles';
6+
67
import {
78
GraaspContextDevTool,
89
WithLocalContext,
910
WithTokenContext,
1011
useObjectState,
1112
} from '@graasp/apps-query-client';
13+
import { Loader, theme } from '@graasp/ui';
14+
1215
import { QueryClientProvider, hooks, queryClient } from '@/config/queryClient';
1316
import { defaultMockContext, mockMembers } from '@/mocks/db';
17+
1418
import i18nConfig from '../config/i18n';
1519
import App from './App';
1620

src/components/ScientificSwitch.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { Switch, Grid, FormControlLabel } from '@mui/material';
21
import { useTranslation } from 'react-i18next';
2+
3+
import { FormControlLabel, Grid, Switch } from '@mui/material';
4+
35
import { SCIENTIFIC_MODE_SWITCH_NAME } from '../config/selectors';
46

57
interface Props {

0 commit comments

Comments
 (0)