Skip to content

Commit 4f0604b

Browse files
committed
fix: update dependencies
fix: change enum to const
1 parent 20bbf89 commit 4f0604b

File tree

19 files changed

+3497
-2277
lines changed

19 files changed

+3497
-2277
lines changed

.github/workflows/cypress.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
cypress-run:
8-
concurrency: cypress-${{ github.head_ref || github.ref }}
8+
concurrency: cypress-${{ github.head_ref || github.ref }}
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
@@ -27,7 +27,7 @@ jobs:
2727
VITE_VERSION: cypress-tests
2828

2929
- name: Cypress Run
30-
uses: cypress-io/github-action@v5
30+
uses: cypress-io/github-action@v6
3131
env:
3232
VITE_PORT: 3000
3333
VITE_API_HOST: http://localhost:3636

.yarn/releases/yarn-4.2.2.cjs

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

.yarn/releases/yarn-4.6.0.cjs

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

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.2.2.cjs
7+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

cypress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import registerCodeCoverage from '@cypress/code-coverage/task';
1+
import registerCodeCoverage from '@cypress/code-coverage/task.js';
22
import { defineConfig } from 'cypress';
33

44
export default defineConfig({

cypress/e2e/builder/main.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BUILDER_VIEW_CY, buildDataCy } from '../../../src/config/selectors';
55
describe('Builder View', () => {
66
beforeEach(() => {
77
cy.setUpApi(
8-
{},
8+
{ appActions: [] },
99
{
1010
context: Context.Builder,
1111
permission: PermissionLevel.Admin,

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default [
2929
'**/.nyc_output',
3030
'**/.yarn',
3131
'**/commitlint.config.cjs',
32+
'cypress.config.ts',
3233
'eslint.config.mjs',
3334
],
3435
},

package.json

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,51 @@
55
"author": "Graasp",
66
"contributors": [
77
"Juan Carlos Farah",
8-
"Basile Spaenlehauer"
8+
"Basile Spaenlehauer",
9+
"Lina Ebeid"
910
],
1011
"homepage": ".",
1112
"type": "module",
1213
"dependencies": {
1314
"@codemirror/lang-javascript": "^6.2.2",
14-
"@emotion/react": "11.13.3",
15-
"@emotion/styled": "11.13.0",
16-
"@graasp/apps-query-client": "3.7.0",
17-
"@graasp/sdk": "^4.32.1",
15+
"@emotion/react": "11.14.0",
16+
"@emotion/styled": "11.14.0",
17+
"@graasp/apps-query-client": "3.7.3",
18+
"@graasp/sdk": "^5.5.0",
1819
"@graasp/stylis-plugin-rtl": "^2.2.0",
19-
"@graasp/ui": "5.3.0",
20-
"@mui/icons-material": "5.16.7",
21-
"@mui/lab": "5.0.0-alpha.170",
22-
"@mui/material": "5.16.7",
23-
"@sentry/react": "8.34.0",
20+
"@graasp/ui": "5.4.7",
21+
"@mui/icons-material": "6.3.1",
22+
"@mui/lab": "6.0.0-beta.22",
23+
"@mui/material": "6.3.1",
24+
"@sentry/react": "8.47.0",
2425
"@tanstack/react-query": "^4.36.1",
2526
"@tanstack/react-query-devtools": "^4.36.1",
26-
"@types/node": "20.16.11",
27-
"@types/react": "18.3.11",
28-
"@types/react-dom": "18.3.1",
27+
"@types/node": "22.10.5",
28+
"@types/react": "18.3.18",
29+
"@types/react-dom": "18.3.5",
2930
"@types/stopword": "^2.0.3",
30-
"@uiw/react-codemirror": "^4.23.5",
31+
"@uiw/react-codemirror": "^4.23.7",
3132
"date-fns": "^4.1.0",
3233
"file-saver": "^2.0.5",
33-
"i18next": "^23.16.0",
34+
"i18next": "^24.2.0",
3435
"lodash.countby": "^4.6.0",
3536
"lodash.flatten": "^4.4.0",
3637
"lodash.groupby": "^4.6.0",
37-
"lucide-react": "^0.452.0",
38-
"prism-react-renderer": "^2.4.0",
38+
"lucide-react": "^0.469.0",
39+
"prism-react-renderer": "^2.4.1",
3940
"react": "18.3.1",
4041
"react-dom": "18.3.1",
41-
"react-i18next": "^15.0.3",
42-
"react-markdown": "^9.0.1",
42+
"react-i18next": "^15.4.0",
43+
"react-markdown": "^9.0.3",
4344
"react-mde": "12.0.8",
44-
"react-router-dom": "^6.27.0",
45-
"react-toastify": "10.0.6",
45+
"react-router-dom": "^6.28.1",
46+
"react-toastify": "11.0.2",
4647
"react-wordcloud": "^1.2.7",
4748
"remark-breaks": "^4.0.0",
4849
"remark-gfm": "^4.0.0",
49-
"stopword": "^3.1.1",
50+
"stopword": "^3.1.4",
5051
"string-to-color": "^2.2.2",
51-
"typescript": "5.6.3"
52+
"typescript": "5.7.2"
5253
},
5354
"scripts": {
5455
"dev": "yarn vite",
@@ -73,49 +74,48 @@
7374
"cov:report": "open ./coverage/lcov-report/index.html"
7475
},
7576
"devDependencies": {
76-
"@commitlint/cli": "19.6.0",
77+
"@commitlint/cli": "19.6.1",
7778
"@commitlint/config-conventional": "19.6.0",
78-
"@cypress/code-coverage": "3.13.4",
79-
"@eslint/compat": "^1.2.0",
80-
"@eslint/eslintrc": "^3.1.0",
81-
"@eslint/js": "^9.12.0",
82-
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
79+
"@cypress/code-coverage": "3.13.9",
80+
"@eslint/compat": "^1.2.4",
81+
"@eslint/eslintrc": "^3.2.0",
82+
"@eslint/js": "^9.17.0",
83+
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
8384
"@types/file-saver": "^2.0.7",
8485
"@types/i18n": "0.13.12",
8586
"@types/lodash.countby": "^4.6.9",
8687
"@types/lodash.flatten": "^4.4.9",
8788
"@types/lodash.groupby": "^4.6.9",
8889
"@types/uuid": "10.0.0",
89-
"@typescript-eslint/eslint-plugin": "8.8.1",
90-
"@typescript-eslint/parser": "8.8.1",
91-
"@vitejs/plugin-react": "^4.3.2",
92-
"axios": "1.7.7",
93-
"concurrently": "9.0.1",
94-
"cypress": "13.15.0",
90+
"@typescript-eslint/eslint-plugin": "8.19.0",
91+
"@typescript-eslint/parser": "8.19.0",
92+
"@vitejs/plugin-react": "^4.3.4",
93+
"axios": "1.7.9",
94+
"concurrently": "9.1.2",
95+
"cypress": "13.17.0",
9596
"env-cmd": "10.1.0",
96-
"eslint": "^9.12.0",
97+
"eslint": "^9.17.0",
9798
"eslint-config-airbnb": "19.0.4",
9899
"eslint-config-airbnb-typescript": "^18.0.0",
99100
"eslint-config-prettier": "9.1.0",
100101
"eslint-config-react-app": "7.0.1",
101-
"eslint-import-resolver-typescript": "^3.6.3",
102-
"eslint-plugin-cypress": "4.0.0",
102+
"eslint-import-resolver-typescript": "^3.7.0",
103+
"eslint-plugin-cypress": "4.1.0",
103104
"eslint-plugin-import": "2.31.0",
104-
"eslint-plugin-jsx-a11y": "6.10.0",
105+
"eslint-plugin-jsx-a11y": "6.10.2",
105106
"eslint-plugin-prettier": "5.2.1",
106-
"eslint-plugin-react": "^7.37.1",
107-
"eslint-plugin-react-hooks": "5.0.0",
108-
"globals": "^15.11.0",
109-
"husky": "9.1.6",
110-
"miragejs": "^0.1.48",
111-
"nock": "^13.5.5",
107+
"eslint-plugin-react": "^7.37.3",
108+
"eslint-plugin-react-hooks": "5.1.0",
109+
"globals": "^15.14.0",
110+
"husky": "9.1.7",
111+
"nock": "^13.5.6",
112112
"nyc": "17.1.0",
113-
"prettier": "3.3.3",
114-
"uuid": "10.0.0",
115-
"vite": "^5.4.9",
113+
"prettier": "3.4.2",
114+
"uuid": "11.0.4",
115+
"vite": "^6.0.7",
116116
"vite-plugin-checker": "^0.8.0",
117117
"vite-plugin-istanbul": "^6.0.2",
118-
"vitest": "^2.1.3"
118+
"vitest": "^2.1.8"
119119
},
120120
"browserslist": {
121121
"production": [
@@ -138,11 +138,8 @@
138138
"src/**/*.d.ts"
139139
]
140140
},
141-
"packageManager": "yarn@4.2.2",
141+
"packageManager": "yarn@4.6.0",
142142
"msw": {
143143
"workerDirectory": "public"
144-
},
145-
"resolutions": {
146-
"@graasp/sdk": "github:graasp/graasp-sdk#member-type-const"
147144
}
148145
}

public/mockServiceWorker.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* - Please do NOT serve this file on production.
99
*/
1010

11-
const PACKAGE_VERSION = '2.4.8'
12-
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
11+
const PACKAGE_VERSION = '2.6.5'
12+
const INTEGRITY_CHECKSUM = 'ca7800994cc8bfb5eb961e037c877074'
1313
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1414
const activeClientIds = new Set()
1515

@@ -62,7 +62,12 @@ self.addEventListener('message', async function (event) {
6262

6363
sendToClient(client, {
6464
type: 'MOCKING_ENABLED',
65-
payload: true,
65+
payload: {
66+
client: {
67+
id: client.id,
68+
frameType: client.frameType,
69+
},
70+
},
6671
})
6772
break
6873
}
@@ -155,6 +160,10 @@ async function handleRequest(event, requestId) {
155160
async function resolveMainClient(event) {
156161
const client = await self.clients.get(event.clientId)
157162

163+
if (activeClientIds.has(event.clientId)) {
164+
return client
165+
}
166+
158167
if (client?.frameType === 'top-level') {
159168
return client
160169
}
@@ -183,12 +192,14 @@ async function getResponse(event, client, requestId) {
183192
const requestClone = request.clone()
184193

185194
function passthrough() {
186-
const headers = Object.fromEntries(requestClone.headers.entries())
187-
188-
// Remove internal MSW request header so the passthrough request
189-
// complies with any potential CORS preflight checks on the server.
190-
// Some servers forbid unknown request headers.
191-
delete headers['x-msw-intention']
195+
// Cast the request headers to a new Headers instance
196+
// so the headers can be manipulated with.
197+
const headers = new Headers(requestClone.headers)
198+
199+
// Remove the "accept" header value that marked this request as passthrough.
200+
// This prevents request alteration and also keeps it compliant with the
201+
// user-defined CORS policies.
202+
headers.delete('accept', 'msw/passthrough')
192203

193204
return fetch(requestClone, { headers })
194205
}

src/config/appSetting.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ export const SettingsKeys = {
88
export type ChatCompletionMessageRoles = 'system' | 'user' | 'assistant';
99

1010
// Chatbot Prompt Setting keys
11-
export enum ChatbotPromptSettingsKeys {
12-
InitialPrompt = 'initialPrompt',
13-
ChatbotCue = 'chatbotCue',
14-
ChatbotName = 'chatbotName',
15-
GptVersion = 'gptVersion',
16-
}
11+
export const ChatbotPromptSettingsKeys = {
12+
InitialPrompt: 'initialPrompt',
13+
ChatbotCue: 'chatbotCue',
14+
ChatbotName: 'chatbotName',
15+
GptVersion: 'gptVersion',
16+
} as const;
1717

1818
export type ChatbotPromptSettings = {
1919
[ChatbotPromptSettingsKeys.InitialPrompt]: ChatBotMessage[];
@@ -25,10 +25,10 @@ export type ChatbotPromptSettings = {
2525
};
2626

2727
// Chatbot Prompt Setting keys
28-
export enum GeneralSettingsKeys {
29-
MaxCommentLength = 'maxCommentLength',
30-
MaxThreadLength = 'maxThreadLength',
31-
}
28+
export const GeneralSettingsKeys = {
29+
MaxCommentLength: 'maxCommentLength',
30+
MaxThreadLength: 'maxThreadLength',
31+
} as const;
3232

3333
export type GeneralSettings = {
3434
[GeneralSettingsKeys.MaxCommentLength]: number;

0 commit comments

Comments
 (0)