Skip to content

Commit

Permalink
[Closes #164] Updates dependencies (#165)
Browse files Browse the repository at this point in the history
* Ran npm audit fix

* Upgrade prisma to v6

* Bump node version

* Prisma v6 upgrade migration

* Update client dependencies

* Upgrade storybook

* Upgrade react-router

* Update server dependencies

* Fix seed command
  • Loading branch information
francisli authored Dec 6, 2024
1 parent fcb9069 commit f4eb21c
Show file tree
Hide file tree
Showing 38 changed files with 1,731 additions and 2,518 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
ci:
name: CI
runs-on: ubuntu-latest
container: node:20.16.0-bookworm
container: node:22.12.0-bookworm
services:
db:
image: postgres:15.5
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.16.0-bookworm
FROM node:22.12.0-bookworm

# Set an env variable for the location of the app files
ENV APP_HOME=/opt/node/app
Expand Down
4 changes: 0 additions & 4 deletions client/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,5 @@ const config = {
},

docs: {},

typescript: {
reactDocgen: 'react-docgen-typescript',
},
};
export default config;
15 changes: 14 additions & 1 deletion client/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { useEffect } from 'react';
import { addons } from '@storybook/preview-api';
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';
import { MantineProvider, useMantineColorScheme } from '@mantine/core';
import { MemoryRouter } from 'react-router';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { theme } from '../src/theme';
import { ContextProvider } from '../src/Context';

const channel = addons.getChannel();

Expand All @@ -19,16 +22,26 @@ const ColorSchemeWrapper = ({ children }) => {
return <>{children}</>;
};

const queryClient = new QueryClient({});

export const decorators = [
(renderStory) => <ColorSchemeWrapper>{renderStory()}</ColorSchemeWrapper>,
(renderStory) => (
<MantineProvider theme={theme}>{renderStory()}</MantineProvider>
),
(renderStory) => <ContextProvider>{renderStory()}</ContextProvider>,
(renderStory) => (
<MemoryRouter initialEntries={['/']}>{renderStory()}</MemoryRouter>
),
(renderStory) => (
<QueryClientProvider client={queryClient}>
{renderStory()}
</QueryClientProvider>
),
];

const preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
154 changes: 80 additions & 74 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,96 +15,102 @@
"test": ""
},
"dependencies": {
"@mantine/core": "^7.12.1",
"@mantine/dates": "^7.12.1",
"@mantine/form": "^7.12.1",
"@mantine/hooks": "^7.12.1",
"@mantine/notifications": "^7.12.1",
"@tabler/icons-react": "^3.12.0",
"@tanstack/react-query": "^5.51.23",
"@mantine/core": "^7.14.3",
"@mantine/dates": "^7.14.3",
"@mantine/form": "^7.14.3",
"@mantine/hooks": "^7.14.3",
"@mantine/notifications": "^7.14.3",
"@tabler/icons-react": "^3.24.0",
"@tanstack/react-query": "^5.62.2",
"dayjs": "^1.11.13",
"http-status-codes": "^2.3.0",
"inflection": "^3.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-imask": "^7.6.1",
"react-qrcode-logo": "^3.0.0",
"react-router-dom": "^6.26.0"
"react-router": "^7.0.2"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.6.1",
"@storybook/addon-essentials": "^8.3.1",
"@storybook/addon-interactions": "^8.3.1",
"@storybook/addon-links": "^8.3.1",
"@storybook/addon-mdx-gfm": "^8.3.1",
"@storybook/addon-onboarding": "^8.3.1",
"@storybook/blocks": "^8.3.1",
"@storybook/preview-api": "^8.3.1",
"@storybook/react": "^8.3.1",
"@storybook/react-vite": "^8.3.1",
"@storybook/test": "^8.3.1",
"@chromatic-com/storybook": "^3.2.2",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/addon-mdx-gfm": "^8.4.7",
"@storybook/addon-onboarding": "^8.4.7",
"@storybook/blocks": "^8.4.7",
"@storybook/preview-api": "^8.4.7",
"@storybook/react": "^8.4.7",
"@storybook/react-vite": "^8.4.7",
"@storybook/test": "^8.4.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"eslint": "^8.57.0",
"@vitejs/plugin-react-swc": "^3.7.2",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-jsdoc": "^50.6.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-storybook": "^0.8.0",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"prop-types": "^15.8.1",
"storybook": "^8.3.1",
"storybook": "^8.4.7",
"storybook-dark-mode": "^4.0.2",
"vite": "^5.4.0"
"vite": "^6.0.3"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.23.0",
"@esbuild/android-arm": "0.23.0",
"@esbuild/android-arm64": "0.23.0",
"@esbuild/android-x64": "0.23.0",
"@esbuild/darwin-arm64": "0.23.0",
"@esbuild/darwin-x64": "0.23.0",
"@esbuild/freebsd-arm64": "0.23.0",
"@esbuild/freebsd-x64": "0.23.0",
"@esbuild/linux-arm": "0.23.0",
"@esbuild/linux-arm64": "0.23.0",
"@esbuild/linux-ia32": "0.23.0",
"@esbuild/linux-loong64": "0.23.0",
"@esbuild/linux-mips64el": "0.23.0",
"@esbuild/linux-ppc64": "0.23.0",
"@esbuild/linux-riscv64": "0.23.0",
"@esbuild/linux-s390x": "0.23.0",
"@esbuild/linux-x64": "0.23.0",
"@esbuild/netbsd-x64": "0.23.0",
"@esbuild/openbsd-x64": "0.23.0",
"@esbuild/sunos-x64": "0.23.0",
"@esbuild/win32-arm64": "0.23.0",
"@esbuild/win32-ia32": "0.23.0",
"@esbuild/win32-x64": "0.23.0",
"@rollup/rollup-android-arm-eabi": "4.20.0",
"@rollup/rollup-android-arm64": "4.20.0",
"@rollup/rollup-darwin-arm64": "4.20.0",
"@rollup/rollup-darwin-x64": "4.20.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.20.0",
"@rollup/rollup-linux-arm64-gnu": "4.20.0",
"@rollup/rollup-linux-arm64-musl": "4.20.0",
"@rollup/rollup-linux-riscv64-gnu": "4.20.0",
"@rollup/rollup-linux-x64-gnu": "4.20.0",
"@rollup/rollup-linux-x64-musl": "4.20.0",
"@rollup/rollup-win32-arm64-msvc": "4.20.0",
"@rollup/rollup-win32-ia32-msvc": "4.20.0",
"@rollup/rollup-win32-x64-msvc": "4.20.0",
"@swc/core-darwin-arm64": "1.7.11",
"@swc/core-darwin-x64": "1.7.11",
"@swc/core-linux-arm-gnueabihf": "1.7.11",
"@swc/core-linux-arm64-gnu": "1.7.11",
"@swc/core-linux-arm64-musl": "1.7.11",
"@swc/core-linux-x64-gnu": "1.7.11",
"@swc/core-linux-x64-musl": "1.7.11",
"@swc/core-win32-arm64-msvc": "1.7.11",
"@swc/core-win32-ia32-msvc": "1.7.11",
"@swc/core-win32-x64-msvc": "1.7.11"
"@esbuild/aix-ppc64": "0.24.0",
"@esbuild/android-arm": "0.24.0",
"@esbuild/android-arm64": "0.24.0",
"@esbuild/android-x64": "0.24.0",
"@esbuild/darwin-arm64": "0.24.0",
"@esbuild/darwin-x64": "0.24.0",
"@esbuild/freebsd-arm64": "0.24.0",
"@esbuild/freebsd-x64": "0.24.0",
"@esbuild/linux-arm": "0.24.0",
"@esbuild/linux-arm64": "0.24.0",
"@esbuild/linux-ia32": "0.24.0",
"@esbuild/linux-loong64": "0.24.0",
"@esbuild/linux-mips64el": "0.24.0",
"@esbuild/linux-ppc64": "0.24.0",
"@esbuild/linux-riscv64": "0.24.0",
"@esbuild/linux-s390x": "0.24.0",
"@esbuild/linux-x64": "0.24.0",
"@esbuild/netbsd-x64": "0.24.0",
"@esbuild/openbsd-arm64": "0.24.0",
"@esbuild/openbsd-x64": "0.24.0",
"@esbuild/sunos-x64": "0.24.0",
"@esbuild/win32-arm64": "0.24.0",
"@esbuild/win32-ia32": "0.24.0",
"@esbuild/win32-x64": "0.24.0",
"@rollup/rollup-android-arm-eabi": "4.28.0",
"@rollup/rollup-android-arm64": "4.28.0",
"@rollup/rollup-darwin-arm64": "4.28.0",
"@rollup/rollup-darwin-x64": "4.28.0",
"@rollup/rollup-freebsd-arm64": "4.28.0",
"@rollup/rollup-freebsd-x64": "4.28.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.28.0",
"@rollup/rollup-linux-arm-musleabihf": "4.28.0",
"@rollup/rollup-linux-arm64-gnu": "4.28.0",
"@rollup/rollup-linux-arm64-musl": "4.28.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.28.0",
"@rollup/rollup-linux-riscv64-gnu": "4.28.0",
"@rollup/rollup-linux-s390x-gnu": "4.28.0",
"@rollup/rollup-linux-x64-gnu": "4.28.0",
"@rollup/rollup-linux-x64-musl": "4.28.0",
"@rollup/rollup-win32-arm64-msvc": "4.28.0",
"@rollup/rollup-win32-ia32-msvc": "4.28.0",
"@rollup/rollup-win32-x64-msvc": "4.28.0",
"@swc/core-darwin-arm64": "1.10.0",
"@swc/core-darwin-x64": "1.10.0",
"@swc/core-linux-arm-gnueabihf": "1.10.0",
"@swc/core-linux-arm64-gnu": "1.10.0",
"@swc/core-linux-arm64-musl": "1.10.0",
"@swc/core-linux-x64-gnu": "1.10.0",
"@swc/core-linux-x64-musl": "1.10.0",
"@swc/core-win32-arm64-msvc": "1.10.0",
"@swc/core-win32-ia32-msvc": "1.10.0",
"@swc/core-win32-x64-msvc": "1.10.0"
}
}
8 changes: 1 addition & 7 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React, { useContext, useEffect } from 'react';
import {
Outlet,
Routes,
Route,
useLocation,
useNavigate,
} from 'react-router-dom';
import { Outlet, Routes, Route, useLocation, useNavigate } from 'react-router';
import { Loader } from '@mantine/core';
import { useQuery } from '@tanstack/react-query';
import PropTypes from 'prop-types';
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Sidebar/SidebarNavSection.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import PropTypes from 'prop-types';
import { Group, Box, Text, UnstyledButton, Collapse } from '@mantine/core';

Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useAuthorization.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext, useState } from 'react';
import { useMutation } from '@tanstack/react-query';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';

import Context from '../Context';

Expand Down
2 changes: 1 addition & 1 deletion client/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { BrowserRouter } from 'react-router';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { MantineProvider } from '@mantine/core';
import { Notifications } from '@mantine/notifications';
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/admin/pending-users/AdminPendingUsers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import React, { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { IconChevronLeft } from '@tabler/icons-react';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';

import classes from './adminPendingUsers.module.css';
import { UserDataTable } from '../../../components/UsersDataTable/UsersDataTable';
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/admin/users/AdminUsers.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router';
import { IconSearch } from '@tabler/icons-react';
import {
Badge,
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/auth/login/LoginForm.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import PropTypes from 'prop-types';
import {
TextInput,
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/auth/login/login.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { useLocation } from 'react-router';
import { StatusCodes } from 'http-status-codes';

import { useAuthorization } from '../../../hooks/useAuthorization';
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/auth/password-reset/passwordReset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Flex, LoadingOverlay } from '@mantine/core';
import { notifications } from '@mantine/notifications';
import { useQuery } from '@tanstack/react-query';
import React, { useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useNavigate, useParams } from 'react-router';

import classes from '../form.module.css';
import { PasswordResetForm } from './passwordResetForm';
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/auth/register/register.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useNavigate, useParams } from 'react-router';
import { Flex, Text, Title } from '@mantine/core';
import { notifications } from '@mantine/notifications';

Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/home.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Link } from 'react-router';
import {
Box,
Button,
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/notFound/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Container } from '@mantine/core';
import { useLocation } from 'react-router-dom';
import { Link } from 'react-router-dom';
import { useLocation } from 'react-router';
import { Link } from 'react-router';

/**
* Patient not found page component
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/patients/PatientTableRow.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';

import { Link } from 'react-router-dom';
import { Link } from 'react-router';

import { Table, Menu, ActionIcon } from '@mantine/core';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { useParams, useNavigate, useLocation } from 'react-router-dom';
import { useParams, useNavigate, useLocation } from 'react-router';
import { useQuery } from '@tanstack/react-query';
import { StatusCodes } from 'http-status-codes';
import { humanize } from 'inflection';
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/patients/register/PatientRegistration.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import { useParams } from 'react-router';
import { StatusCodes } from 'http-status-codes';
import { Flex, Button, Modal, Text, Container } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { useForm, isNotEmpty } from '@mantine/form';
import { notifications } from '@mantine/notifications';
import { useNavigate, useLocation } from 'react-router-dom';
import { useNavigate, useLocation } from 'react-router';
import { useQuery } from '@tanstack/react-query';
import LifelineAPI from '../LifelineAPI.js';
import PatientRegistrationAccordion from './PatientRegistrationAccordion';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,13 @@ export const Default = {
},
openedSection: 'patientData',
handleAccordionChange: () => {},
showCheck: false,
initialMedicalData: {
allergies: [],
medications: [],
conditions: [],
},
initialHospitalData: '',
initialPhysicianData: '',
},
};
2 changes: 1 addition & 1 deletion client/src/pages/verify/verify.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { LoadingOverlay } from '@mantine/core';
import { useQuery } from '@tanstack/react-query';
import { useNavigate, useParams } from 'react-router-dom';
import { useNavigate, useParams } from 'react-router';
import { notifications } from '@mantine/notifications';
/**
* Email Verification
Expand Down
2 changes: 1 addition & 1 deletion client/src/stories/AuthLayout/AuthLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Outlet } from 'react-router-dom';
import { Outlet } from 'react-router';
import { Image, Text, Title } from '@mantine/core';

import classes from './AuthLayout.module.css';
Expand Down
Loading

0 comments on commit f4eb21c

Please sign in to comment.