Skip to content

Commit ad57c2a

Browse files
committed
Upgrading React
1 parent 75fc0ab commit ad57c2a

11 files changed

Lines changed: 285 additions & 3911 deletions

File tree

apps/play/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@lagunovsky/redux-react-router": "^4.5.0",
2929
"@zxplay/emulator": "*",
3030
"@zxplay/i18n": "*",
31+
"@zxplay/ui": "*",
3132
"axios": "^1.12.2",
3233
"clsx": "^2.1.1",
3334
"file-dialog": "^0.0.8",
@@ -38,10 +39,10 @@
3839
"primeicons": "^6.0.1",
3940
"primereact": "^9.6.4",
4041
"query-string": "^9.3.1",
41-
"react": "^18.3.1",
42-
"react-dom": "^18.3.1",
42+
"react": "^19.1.1",
43+
"react-dom": "^19.1.1",
4344
"react-redux": "^9.2.0",
44-
"react-router-dom": "^6.30.1",
45+
"react-router-dom": "^7.9.3",
4546
"react-titled": "^2.1.0",
4647
"react-transition-group": "^4.4.5",
4748
"redux": "^5.0.1",
@@ -67,7 +68,7 @@
6768
"npm-watch": "^0.13.0",
6869
"process": "^0.11.10",
6970
"prop-types": "^15.8.1",
70-
"react-test-renderer": "^18.3.1",
71+
"react-test-renderer": "^19.1.1",
7172
"sass-loader": "^16.0.4",
7273
"style-loader": "^4.0.0",
7374
"svg-inline-loader": "^0.2.3",

apps/play/src/components/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "primeflex/primeflex.css";
99
import ErrorBoundary from "./ErrorBoundary";
1010
import RenderEmulator from "./RenderEmulator";
1111
import LoadingScreen from "./LoadingScreen";
12-
import LockScreen from "./LockScreen";
12+
import {LockScreen} from "@zxplay/ui";
1313
import Nav from "./Nav";
1414
import HomePage from "./HomePage";
1515
import MaxWidth from "./MaxWidth";

apps/play/webpack.config.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = (env, _) => {
6969
// emulator package is consumed from source, so transpile it here.
7070
loaders.push({
7171
test: /\.jsx?$/,
72-
include: /packages[/\\](emulator|i18n)/,
72+
include: /packages[/\\](emulator|i18n|ui)/,
7373
use: babelLoader
7474
});
7575
}
@@ -98,18 +98,7 @@ module.exports = (env, _) => {
9898
resolve: {
9999
extensions: ['.js', '.jsx'],
100100
alias: {
101-
fs: false,
102-
// Force single copies of React and React Router. apps/play
103-
// is on React 18 / react-router 6, but shares hoisted libs
104-
// (react-redux, @lagunovsky/redux-react-router) with
105-
// apps/web's React 19 / react-router 7 at the repo root.
106-
// Without these aliases both versions get bundled, breaking
107-
// hooks and the Router context ("useNavigate may be used
108-
// only in the context of a <Router>").
109-
react: path.resolve(__dirname, 'node_modules/react'),
110-
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
111-
'react-router': path.resolve(__dirname, 'node_modules/react-router'),
112-
'react-router-dom': path.resolve(__dirname, 'node_modules/react-router-dom')
101+
fs: false
113102
}
114103
}
115104
}

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@lagunovsky/redux-react-router": "^4.5.0",
3737
"@zxplay/emulator": "*",
3838
"@zxplay/i18n": "*",
39+
"@zxplay/ui": "*",
3940
"axios": "^1.12.2",
4041
"bas2tap": "^0.0.1-alpha.4",
4142
"clsx": "^2.1.1",

apps/web/src/components/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "primeflex/primeflex.css";
99
import ErrorBoundary from "./ErrorBoundary";
1010
import RenderEmulator from "./RenderEmulator";
1111
import LoadingScreen from "./LoadingScreen";
12-
import LockScreen from "./LockScreen";
12+
import { LockScreen } from "@zxplay/ui";
1313
import Nav from "./Nav";
1414
import HomePage from "./HomePage";
1515
import MaxWidth from "./MaxWidth";

apps/web/src/components/LockScreen.jsx

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

apps/web/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module.exports = (env, _) => {
9393
// emulator package is consumed from source, so transpile it here.
9494
loaders.push({
9595
test: /\.jsx?$/,
96-
include: /packages[/\\](emulator|i18n)/,
96+
include: /packages[/\\](emulator|i18n|ui)/,
9797
use: babelLoader
9898
});
9999
}

0 commit comments

Comments
 (0)