Skip to content

Commit 4cdb416

Browse files
authored
deps: update next 14.2.4 + jest + MUI (chaynHQ#1017)
* update to next 13.5.6 * update to 14.2.4 * update next + mui + jest to latest
1 parent e68c1fb commit 4cdb416

27 files changed

+3437
-3987
lines changed

.github/workflows/build-and-test-prs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- name: Run linting
3434
run: yarn lint
3535

36+
- name: Run type checks
37+
run: yarn type-check
38+
3639
- name: Build app
3740
run: yarn build
3841
env:

.github/workflows/dependabot-pr-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
uses: actions/dependency-review-action@v4
2020
with:
2121
# fails when moderate vulnerabilities are deteched
22-
fail-on-severity: high
22+
fail-on-severity: moderate

components/common/Column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22

33
interface ColumnProps {
44
children: any;

components/common/Quote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { ISbRichtext } from '@storyblok/react';
33
import { richtextContentStyle } from '../../styles/common';
44

components/common/Row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { richtextContentStyle, rowStyle } from '../../styles/common';
33

44
interface RowProps {

components/storyblok/Placeholder.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Typography } from '@mui/material';
32

43
interface PlaceholderProps {
54
componentName: string;

components/storyblok/StoryblokAudio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { storyblokEditable } from '@storyblok/react';
33
import dynamic from 'next/dynamic';
44
import { richtextContentStyle } from '../../styles/common';

components/storyblok/StoryblokCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
22
import {
3+
Box,
34
Card,
45
CardActionArea,
56
CardActions,
@@ -9,7 +10,6 @@ import {
910
Link,
1011
Typography,
1112
} from '@mui/material';
12-
import { Box } from '@mui/system';
1313
import { ISbRichtext, storyblokEditable } from '@storyblok/react';
1414
import { useTranslations } from 'next-intl';
1515
import Image from 'next/image';

components/storyblok/StoryblokCarousel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import NavigateBeforeSharp from '@mui/icons-material/NavigateBeforeSharp';
22
import NavigateNext from '@mui/icons-material/NavigateNext';
3-
import { IconButton, useMediaQuery, useTheme } from '@mui/material';
4-
import { Box } from '@mui/system';
3+
import { Box, IconButton, useMediaQuery, useTheme } from '@mui/material';
54
import { SbBlokData, storyblokEditable } from '@storyblok/react';
65
import NukaCarousel from 'nuka-carousel';
76
import { columnStyle } from '../../styles/common';

components/storyblok/StoryblokImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { storyblokEditable } from '@storyblok/react';
33
import Image from 'next/image';
44
import { richtextContentStyle } from '../../styles/common';

components/storyblok/StoryblokQuote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { ISbRichtext, storyblokEditable } from '@storyblok/react';
33
import Image from 'next/image';
44
import Quote from '../common/Quote';

components/storyblok/StoryblokSpacer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { useTheme } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, useTheme } from '@mui/material';
32
import { storyblokEditable } from '@storyblok/react';
43
interface StoryblokSpacerProps {
54
_uid: string;

components/storyblok/StoryblokStatement.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Typography } from '@mui/material';
32
import { storyblokEditable } from '@storyblok/react';
43
import { richtextContentStyle } from '../../styles/common';
54

components/storyblok/StoryblokVideo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@mui/system';
1+
import { Box } from '@mui/material';
22
import { storyblokEditable } from '@storyblok/react';
33
import dynamic from 'next/dynamic';
44
import { YouTubeConfig } from 'react-player/youtube';

components/video/Video.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Box, Theme, debounce } from '@mui/material';
2-
import { SxProps } from '@mui/system';
1+
import { Box, SxProps, Theme, debounce } from '@mui/material';
32
import dynamic from 'next/dynamic';
43
import { Dispatch, SetStateAction, useRef, useState } from 'react';
54
import { OnProgressProps } from 'react-player/base';

guards/PartnerAdminGuard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Container, Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Container, Typography } from '@mui/material';
32
import Head from 'next/head';
43
import Image from 'next/image';
54
import { useTranslations } from 'use-intl';

guards/SuperAdminGuard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Container, Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Container, Typography } from '@mui/material';
32
import Head from 'next/head';
43
import Image from 'next/image';
54
import { useTranslations } from 'use-intl';

guards/TherapyAccessGuard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Container, Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Container, Typography } from '@mui/material';
32
import Head from 'next/head';
43
import Image from 'next/image';
54
import { useTranslations } from 'use-intl';

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// jest.config.js
22

33
module.exports = {
4-
preset: 'ts-jest',
4+
coverageProvider: 'v8',
5+
testEnvironment: 'jsdom',
56
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
67
moduleNameMapper: {
78
/* Handle CSS imports (with CSS modules)

next.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/** @type {import('next').NextConfig} */
2-
1+
/**
2+
* @type {import('next').NextConfig}
3+
*/
34
const runtimeCaching = require('next-pwa/cache');
45

56
const withPWA = require('next-pwa')({
@@ -37,9 +38,6 @@ module.exports = withBundleAnalyzer(
3738
defaultLocale: 'en',
3839
localeDetection: true,
3940
},
40-
experimental: {
41-
nextScriptWorkers: true,
42-
},
4341
async redirects() {
4442
return [
4543
{

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"resolutions": {
6-
"@types/react": "18.2.43",
6+
"@types/react": "^18.3.3",
77
"redux": "^5.0.0"
88
},
99
"scripts": {
@@ -13,6 +13,7 @@
1313
"https:proxy": "local-ssl-proxy --source 3010 --target 3000 --cert localhost.pem --key localhost-key.pem",
1414
"lint": "next lint",
1515
"lint:fix": "next lint --fix",
16+
"type-check": "tsc",
1617
"format": "prettier . --write",
1718
"test": "jest",
1819
"test:watch": "jest --watch",
@@ -24,12 +25,12 @@
2425
},
2526
"dependencies": {
2627
"@emotion/cache": "^11.11.0",
27-
"@emotion/react": "^11.11.1",
28+
"@emotion/react": "^11.11.4",
2829
"@emotion/server": "^11.11.0",
29-
"@emotion/styled": "^11.11.0",
30-
"@mui/icons-material": "^5.14.19",
31-
"@mui/lab": "^5.0.0-alpha.155",
32-
"@mui/material": "^5.14.20",
30+
"@emotion/styled": "^11.11.5",
31+
"@mui/icons-material": "^5.16.0",
32+
"@mui/lab": "^5.0.0-alpha.171",
33+
"@mui/material": "^5.16.0",
3334
"@newrelic/next": "^0.7.0",
3435
"@reduxjs/toolkit": "^2.2.5",
3536
"@storyblok/react": "^3.0.0",
@@ -39,16 +40,16 @@
3940
"gemoji": "^8.1.0",
4041
"js-cookie": "^3.0.1",
4142
"newrelic": "^11.8.0",
42-
"next": "13.5.1",
43-
"next-intl": "^2.20.0",
43+
"next": "^14.2.4",
44+
"next-intl": "^3.15.5",
4445
"next-pwa": "^5.6.0",
4546
"next-redux-wrapper": "^8.1.0",
4647
"nextjs-hotjar": "^1.2.0",
4748
"nuka-carousel": "^7.0.0",
4849
"phone": "^3.1.33",
49-
"react": "18.2.0",
50+
"react": "^18.3.1",
5051
"react-cookie-consent": "^8.0.1",
51-
"react-dom": "18.0.0",
52+
"react-dom": "^18.3.1",
5253
"react-international-phone": "^4.0.4",
5354
"react-player": "^2.13.0",
5455
"react-redux": "^9.1.2",
@@ -57,26 +58,25 @@
5758
"devDependencies": {
5859
"@builder.io/partytown": "^0.8.1",
5960
"@next/bundle-analyzer": "^14.0.4",
60-
"@testing-library/jest-dom": "^5.14.1",
61-
"@testing-library/react": "^12.1.2",
62-
"@types/jest": "^27.0.2",
61+
"@testing-library/jest-dom": "^6.4.6",
62+
"@testing-library/react": "^16.0.0",
63+
"@types/jest": "^29.5.12",
6364
"@types/js-cookie": "^3.0.2",
6465
"@types/newrelic": "^9.14.3",
65-
"@types/react": "18.2.43",
66-
"babel-jest": "^27.2.4",
66+
"@types/react": "18.3.3",
6767
"cypress": "^13.2.0",
6868
"dotenv": "^16.0.3",
6969
"eslint": "8.56.0",
70-
"eslint-config-next": "14.0.4",
70+
"eslint-config-next": "^14.2.4",
7171
"eslint-config-prettier": "^9.1.0",
7272
"husky": "^9.0.11",
7373
"identity-obj-proxy": "^3.0.0",
74-
"jest": "^27.2.4",
74+
"jest": "^29.7.0",
75+
"jest-environment-jsdom": "^29.7.0",
7576
"mailslurp-client": "^15.7.5",
7677
"pre-commit": "^1.2.2",
7778
"prettier": "^3.1.1",
78-
"react-test-renderer": "^17.0.2",
79-
"ts-jest": "^27.0.5",
79+
"ts-jest": "^29.2.0",
8080
"typescript": "5.3.3"
8181
}
8282
}

pages/404.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Button, Container, Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Button, Container, Typography } from '@mui/material';
32
import { GetStaticPropsContext, NextPage } from 'next';
43
import Head from 'next/head';
54
import Image from 'next/image';

pages/500.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Button, Container, Typography } from '@mui/material';
2-
import { Box } from '@mui/system';
1+
import { Box, Button, Container, Typography } from '@mui/material';
32
import { GetStaticPropsContext, NextPage } from 'next';
43
import Head from 'next/head';
54
import Image from 'next/image';

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
]
2222
},
2323
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
24-
"exclude": ["node_modules", "cypress"]
24+
"exclude": ["node_modules", "cypress", "./cypress.config.ts", "**/*.cy.tsx"]
2525
}

tsconfig.tsbuildinfo

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

utils/hasAccessToPage.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import hasAccessToPage from './hasAccessToPage';
66
const emptyPartnerAdmin: PartnerAdmin = {
77
partner: null,
88
id: null,
9+
active: null,
910
createdAt: null,
1011
updatedAt: null,
1112
};
1213
const partnerAdmin: PartnerAdmin = {
1314
partner: { name: 'Bumble' } as PartnerContent,
1415
id: null,
16+
active: null,
1517
createdAt: null,
1618
updatedAt: null,
1719
};

0 commit comments

Comments
 (0)