Skip to content

Commit 2bcc3a0

Browse files
Merge pull request #273 from NHSDigital/react
Upgrade to React v19 alongside v18
2 parents 2d4cd4d + 629cc59 commit 2bcc3a0

File tree

38 files changed

+552
-4412
lines changed

38 files changed

+552
-4412
lines changed

.yarnrc.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,20 @@ nodeLinker: node-modules
33
npmRegistryServer: "https://registry.yarnpkg.com"
44

55
packageExtensions:
6-
"@storybook/addon-essentials@*":
6+
"@storybook/addon-docs@*":
77
peerDependencies:
8-
react: "*"
9-
react-dom: "*"
8+
"@types/react": "*"
9+
"@types/react-dom": "*"
1010

11-
"@storybook/addon-controls@*":
11+
"@storybook/addon-essentials@*":
1212
peerDependencies:
13-
react: "*"
14-
react-dom: "*"
13+
"@types/react": "*"
14+
"@types/react-dom": "*"
1515

16-
"@storybook/manager-api@*":
16+
"@storybook/core@*":
1717
peerDependencies:
18-
react: "*"
19-
react-dom: "*"
18+
storybook: "*"
2019

2120
"@storybook/react-vite@*":
2221
peerDependencies:
2322
typescript: "*"
24-
25-
"@storybook/cli@*":
26-
peerDependencies:
27-
react: "*"
28-
react-dom: "*"
29-
30-
"@storybook/core-server@*":
31-
peerDependencies:
32-
react: "*"
33-
react-dom: "*"
34-
35-
"storybook@*":
36-
peerDependencies:
37-
react: "*"
38-
react-dom: "*"

package.json

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,23 @@
7777
"@rollup/plugin-commonjs": "^28.0.6",
7878
"@rollup/plugin-node-resolve": "^16.0.1",
7979
"@rollup/plugin-typescript": "^12.1.4",
80-
"@storybook/addon-actions": "^8.0.5",
81-
"@storybook/addon-essentials": "^8.0.5",
82-
"@storybook/addon-links": "^8.0.5",
83-
"@storybook/blocks": "^8.0.5",
84-
"@storybook/manager-api": "^8.0.5",
85-
"@storybook/preview-api": "^8.0.5",
86-
"@storybook/react": "^8.0.5",
87-
"@storybook/react-vite": "^8.0.5",
88-
"@storybook/theming": "^8.0.5",
80+
"@storybook/addon-essentials": "^8.6.14",
81+
"@storybook/addon-links": "^8.6.14",
82+
"@storybook/blocks": "^8.6.14",
83+
"@storybook/manager-api": "^8.6.14",
84+
"@storybook/react": "^8.6.14",
85+
"@storybook/react-vite": "^8.6.14",
86+
"@storybook/theming": "^8.6.14",
87+
"@testing-library/dom": "^10.4.1",
8988
"@testing-library/jest-dom": "^6.9.1",
90-
"@testing-library/react": "^15.0.7",
89+
"@testing-library/react": "^16.3.0",
9190
"@types/eslint": "^9.6.1",
9291
"@types/jest": "^30.0.0",
9392
"@types/jest-axe": "^3.5.9",
9493
"@types/lodash": "^4.17.20",
9594
"@types/node": "^24.6.2",
96-
"@types/react": "^18.3.12",
97-
"@types/react-dom": "^18.3.1",
95+
"@types/react": "^19.2.2",
96+
"@types/react-dom": "^19.2.1",
9897
"babel-jest": "^30.2.0",
9998
"babel-plugin-module-resolver": "^5.0.2",
10099
"babel-plugin-replace-import-extension": "^1.1.5",
@@ -115,12 +114,12 @@
115114
"nhsuk-frontend": "^10.0.0",
116115
"outdent": "^0.8.0",
117116
"prettier": "^3.6.2",
118-
"react": "^18.2.0",
119-
"react-dom": "^18.2.0",
117+
"react": "^19.2.0",
118+
"react-dom": "^19.2.0",
120119
"rollup": "^4.52.4",
121120
"rollup-plugin-preserve-directives": "^0.4.0",
122121
"sass": "^1.53.0",
123-
"storybook": "^8.0.5",
122+
"storybook": "^8.6.14",
124123
"tslib": "^2.8.1",
125124
"typescript": "^5.9.3",
126125
"typescript-eslint": "^8.45.0",
@@ -130,8 +129,8 @@
130129
"peerDependencies": {
131130
"classnames": ">=2.5.0",
132131
"nhsuk-frontend": ">=10.0.0 <11.0.0",
133-
"react": ">=16.8.0",
134-
"react-dom": ">=16.8.0",
132+
"react": ">=18.2.0",
133+
"react-dom": ">=18.2.0",
135134
"tslib": ">=2.8.0"
136135
},
137136
"packageManager": "[email protected]"

src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import {
35
createContext,

src/components/content-presentation/table/Table.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import {
35
forwardRef,

src/components/content-presentation/table/TableContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { createContext, type ReactNode } from 'react';
24

35
export interface ITableContext {

src/components/content-presentation/table/TableSectionContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { createContext } from 'react';
24

35
export enum TableSection {

src/components/content-presentation/table/components/TableCell.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import { useContext, type ComponentPropsWithoutRef, type FC } from 'react';
35
import { TableContext, type ITableContext } from '../TableContext.js';

src/components/content-presentation/table/components/TableHead.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import { useContext, type ComponentPropsWithoutRef, type FC } from 'react';
35
import { TableContext, type ITableContext } from '../TableContext.js';

src/components/content-presentation/table/components/TableRow.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import {
35
Children,

src/components/content-presentation/tabs/Tabs.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import classNames from 'classnames';
24
import { type Tabs as TabsModule } from 'nhsuk-frontend';
35
import {

0 commit comments

Comments
 (0)