Skip to content

Commit

Permalink
fix(deps): upgrade graasp deps
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this template is compatible with versions
of @graasp/sdk >1.1.** and @graasp/apps-query-client > 2.**

also upgrade other deps
  • Loading branch information
swouf committed Jul 18, 2023
1 parent 1f654d1 commit d7adee0
Show file tree
Hide file tree
Showing 7 changed files with 2,642 additions and 1,634 deletions.
68 changes: 34 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@
],
"homepage": ".",
"dependencies": {
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
"@graasp/apps-query-client": "github:graasp/graasp-apps-query-client#77-move-to-vite-for-bundling",
"@graasp/sdk": "0.11.0",
"@graasp/ui": "2.4.1",
"@mui/icons-material": "5.11.16",
"@mui/lab": "5.0.0-alpha.84",
"@mui/material": "5.11.14",
"@sentry/browser": "7.44.2",
"@sentry/react": "7.44.2",
"@sentry/tracing": "7.44.2",
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query-devtools": "^4.28.0",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@graasp/apps-query-client": "2.0.1",
"@graasp/sdk": "1.1.2",
"@graasp/ui": "3.2.4",
"@mui/icons-material": "5.14.0",
"@mui/lab": "5.0.0-alpha.136",
"@mui/material": "5.14.0",
"@sentry/browser": "7.59.2",
"@sentry/react": "7.59.2",
"@sentry/tracing": "7.59.2",
"@tanstack/react-query": "^4.29.25",
"@tanstack/react-query-devtools": "^4.29.25",
"@types/node": "17.0.45",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"i18next": "22.4.13",
"immutable": "4.3.0",
"qs": "6.11.1",
"@types/react": "18.2.15",
"@types/react-dom": "18.2.7",
"i18next": "22.5.1",
"immutable": "4.3.1",
"qs": "6.11.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "12.2.0",
"react-toastify": "9.1.2",
"react-i18next": "12.3.1",
"react-toastify": "9.1.3",
"typescript": "4.9.5"
},
"scripts": {
Expand All @@ -53,37 +53,37 @@
"cov:report": "open ./coverage/lcov-report/index.html"
},
"devDependencies": {
"@commitlint/cli": "17.6.1",
"@commitlint/config-conventional": "17.6.1",
"@cypress/code-coverage": "3.10.4",
"@commitlint/cli": "17.6.6",
"@commitlint/config-conventional": "17.6.6",
"@cypress/code-coverage": "3.11.0",
"@trivago/prettier-plugin-sort-imports": "4.1.1",
"@types/i18n": "0.13.6",
"@types/uuid": "9.0.1",
"@typescript-eslint/eslint-plugin": "5.56.0",
"@typescript-eslint/parser": "5.56.0",
"@types/uuid": "9.0.2",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@vitejs/plugin-react": "^3.1.0",
"concurrently": "7.6.0",
"cypress": "12.8.1",
"concurrently": "8.2.0",
"cypress": "12.17.1",
"env-cmd": "10.1.0",
"eslint": "8.36.0",
"eslint": "8.45.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "8.8.0",
"eslint-config-react-app": "7.0.1",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-cypress": "2.12.1",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-cypress": "2.13.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"nyc": "15.1.0",
"prettier": "2.8.6",
"prettier": "2.8.8",
"pretty-quick": "3.1.3",
"uuid": "9.0.0",
"vite": "^4.2.1",
"vite": "^4.4.4",
"vite-plugin-checker": "^0.5.6",
"vite-plugin-istanbul": "^4.0.1"
"vite-plugin-istanbul": "^4.1.0"
},
"browserslist": {
"production": [
Expand Down
23 changes: 21 additions & 2 deletions src/mocks/db.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { Database, LocalContext, Member } from '@graasp/apps-query-client';
import type { Database, LocalContext } from '@graasp/apps-query-client';
import { Member, PermissionLevel } from '@graasp/sdk';

import { API_HOST } from '@/config/env';

export const mockContext: LocalContext = {
apiHost: API_HOST,
permission: 'admin',
permission: PermissionLevel.Admin,
context: 'player',
itemId: '1234-1234-123456-8123-123456',
memberId: 'mock-member-id',
Expand All @@ -16,12 +17,18 @@ export const mockMembers: Member[] = [
name: 'current-member',
email: '',
extra: {},
type: 'individual',
createdAt: new Date('1996-09-08T19:00:00'),
updatedAt: new Date(),
},
{
id: 'mock-member-id-2',
name: 'mock-member-2',
email: '',
extra: {},
type: 'individual',
createdAt: new Date('1995-02-02T15:00:00'),
updatedAt: new Date(),
},
];

Expand All @@ -33,6 +40,18 @@ const buildDatabase = (
appActions: [],
members: members ?? mockMembers,
appSettings: [],
items: [
{
id: mockContext.itemId,
name: 'app-starter-ts-vite',
description: null,
path: '',
settings: {},
creator: mockMembers[0],
createdAt: new Date(),
updatedAt: new Date(),
},
],
});

export default buildDatabase;
7 changes: 4 additions & 3 deletions src/modules/context/AppDataContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { createContext, useMemo } from 'react';

import { AppData } from '@graasp/apps-query-client';
import { AppData } from '@graasp/sdk';
import { AppDataRecord } from '@graasp/sdk/frontend';

import { List } from 'immutable';

Expand All @@ -27,7 +28,7 @@ export type AppDataContextType = {
postAppDataAsync: (payload: PostAppDataType) => Promise<AppData> | undefined;
patchAppData: (payload: PatchAppDataType) => void;
deleteAppData: (payload: DeleteAppDataType) => void;
appData: List<AppData>;
appData: List<AppDataRecord>;
};

const defaultContextValue = {
Expand Down Expand Up @@ -69,7 +70,7 @@ export const AppDataProvider = ({ children }: Props): JSX.Element => {
postAppData,
postAppDataAsync,
deleteAppData,
appData: appData.data || List<AppData>([]),
appData: appData.data || List<AppDataRecord>([]),
}),
[patchAppData, postAppData, postAppDataAsync, deleteAppData, appData.data],
);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/context/MembersContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC, ReactElement, createContext, useMemo } from 'react';

import { Member } from '@graasp/apps-query-client';
import { Member } from '@graasp/sdk';

import { List } from 'immutable';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/context/SettingsContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, ReactElement, createContext, useContext } from 'react';

import { AppSetting } from '@graasp/apps-query-client';
import { AppSetting } from '@graasp/sdk';

import { MUTATION_KEYS, hooks, useMutation } from '../../config/queryClient';
import Loader from '../common/Loader';
Expand Down
6 changes: 3 additions & 3 deletions src/modules/main/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ const App = (): JSX.Element => {

const renderContent = (): JSX.Element => {
switch (context.context) {
case Context.BUILDER:
case Context.Builder:
return <BuilderView />;

case Context.ANALYTICS:
case Context.Analytics:
return <AnalyticsView />;

case Context.PLAYER:
case Context.Player:
default:
return <PlayerView />;
}
Expand Down
Loading

0 comments on commit d7adee0

Please sign in to comment.