Skip to content

Commit bcf11e5

Browse files
committed
update all packages
1 parent ad81325 commit bcf11e5

3 files changed

Lines changed: 66 additions & 118 deletions

File tree

config/eslintConfig.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
// @remove-on-eject-begin
2-
/**
3-
* Copyright (c) 2015-present, Facebook, Inc.
4-
*
5-
* This source code is licensed under the MIT license found in the
6-
* LICENSE file in the root directory of this source tree.
7-
*/
8-
// @remove-on-eject-end
9-
'use strict';
10-
11-
const path = require('path');
1+
const path = require('node:path');
122
const paths = require('./paths');
133
const modules = require('./modules');
144

@@ -26,6 +16,5 @@ module.exports = {
2616
cache: true,
2717
cacheLocation: path.resolve(paths.appNodeModules, '.cache/.eslintcache'),
2818
cwd: paths.appPath,
29-
resolvePluginsRelativeTo: __dirname,
3019
baseConfig,
3120
};

package.json

Lines changed: 47 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -13,106 +13,90 @@
1313
"bugs": {
1414
"url": "https://github.com/ReactUnity/scripts/issues"
1515
},
16-
"files": [
17-
"bin",
18-
"config",
19-
"lib",
20-
"scripts",
21-
"tsconfig.json"
22-
],
16+
"files": ["bin", "config", "lib", "scripts", "tsconfig.json"],
2317
"bin": {
2418
"react-unity-scripts": "./bin/react-unity-scripts.js"
2519
},
2620
"types": "./lib/types/main.d.ts",
2721
"typesVersions": {
2822
"*": {
29-
"main": [
30-
"./lib/types/main.d.ts"
31-
],
32-
"editor": [
33-
"./lib/types/editor.d.ts"
34-
],
35-
"tests": [
36-
"./lib/types/tests.d.ts"
37-
],
38-
"ugui": [
39-
"./lib/types/ugui.d.ts"
40-
],
41-
"uitoolkit": [
42-
"./lib/types/uitoolkit.d.ts"
43-
]
23+
"main": ["./lib/types/main.d.ts"],
24+
"editor": ["./lib/types/editor.d.ts"],
25+
"tests": ["./lib/types/tests.d.ts"],
26+
"ugui": ["./lib/types/ugui.d.ts"],
27+
"uitoolkit": ["./lib/types/uitoolkit.d.ts"]
4428
}
4529
},
4630
"tsconfig": "./tsconfig.json",
4731
"dependencies": {
48-
"@babel/core": "^7.24.5",
49-
"@babel/eslint-parser": "^7.24.5",
32+
"@babel/core": "^7.27.4",
33+
"@babel/eslint-parser": "^7.27.5",
5034
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
51-
"@babel/preset-react": "^7.24.1",
52-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.13",
35+
"@babel/preset-react": "^7.27.1",
36+
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.0",
5337
"@svgr/webpack": "^8.1.0",
54-
"@types/react": "^18.3.1",
55-
"@types/webpack-env": "^1.18.4",
56-
"@typescript-eslint/eslint-plugin": "^7.8.0",
57-
"@typescript-eslint/parser": "^7.8.0",
58-
"babel-jest": "^29.7.0",
59-
"babel-loader": "^9.1.3",
38+
"@types/react": "^19.1.8",
39+
"@types/webpack-env": "^1.18.8",
40+
"@typescript-eslint/eslint-plugin": "^8.35.0",
41+
"@typescript-eslint/parser": "^8.35.0",
42+
"babel-jest": "^30.0.2",
43+
"babel-loader": "^10.0.0",
6044
"babel-plugin-named-asset-import": "^0.3.8",
61-
"babel-preset-react-app": "^10.0.1",
62-
"bfj": "^8.0.0",
45+
"babel-preset-react-app": "^10.1.0",
46+
"bfj": "^9.1.2",
6347
"camelcase": "^8.0.0",
6448
"case-sensitive-paths-webpack-plugin": "^2.4.0",
6549
"confusing-browser-globals": "^1.0.11",
66-
"css-loader": "^7.1.1",
67-
"dotenv": "^16.4.5",
68-
"dotenv-expand": "^11.0.6",
69-
"eslint": "^8.57.0",
70-
"eslint-plugin-import": "^2.29.1",
71-
"eslint-plugin-jest": "^28.4.0",
72-
"eslint-plugin-react": "^7.34.1",
73-
"eslint-plugin-react-hooks": "^4.6.2",
74-
"eslint-plugin-testing-library": "^6.2.2",
75-
"eslint-webpack-plugin": "^4.1.0",
50+
"css-loader": "^7.1.2",
51+
"dotenv": "^16.5.0",
52+
"dotenv-expand": "^12.0.2",
53+
"eslint": "^9.29.0",
54+
"eslint-plugin-import": "^2.32.0",
55+
"eslint-plugin-jest": "^29.0.1",
56+
"eslint-plugin-react": "^7.37.5",
57+
"eslint-plugin-react-hooks": "^5.2.0",
58+
"eslint-plugin-testing-library": "^7.5.3",
59+
"eslint-webpack-plugin": "^5.0.2",
7660
"file-loader": "^6.2.0",
77-
"fork-ts-checker-webpack-plugin": "^9.0.2",
78-
"fs-extra": "^11.2.0",
61+
"fork-ts-checker-webpack-plugin": "^9.1.0",
62+
"fs-extra": "^11.3.0",
7963
"identity-obj-proxy": "^3.0.0",
80-
"jest": "^29.7.0",
81-
"jest-resolve": "^29.7.0",
82-
"jest-watch-typeahead": "^2.2.2",
83-
"mini-css-extract-plugin": "^2.9.0",
64+
"jest": "^30.0.3",
65+
"jest-resolve": "^30.0.2",
66+
"jest-watch-typeahead": "^3.0.1",
67+
"mini-css-extract-plugin": "^2.9.2",
8468
"null-loader": "^4.0.1",
85-
"postcss": "^8.4.38",
69+
"postcss": "^8.5.6",
8670
"postcss-loader": "^8.1.1",
8771
"prompts": "^2.4.2",
8872
"raw-loader": "^4.0.2",
8973
"react-app-polyfill": "^3.0.0",
9074
"react-dev-utils": "^12.0.1",
91-
"react-refresh": "^0.14.2",
92-
"resolve": "^1.22.8",
75+
"react-refresh": "^0.17.0",
76+
"resolve": "^1.22.10",
9377
"resolve-url-loader": "^5.0.0",
94-
"sass": "^1.76.0",
95-
"sass-loader": "^14.2.1",
96-
"semver": "^7.6.0",
78+
"sass": "^1.89.2",
79+
"sass-loader": "^16.0.5",
80+
"semver": "^7.7.2",
9781
"source-map-loader": "^5.0.0",
9882
"style-loader": "^4.0.0",
99-
"tailwindcss": "^3.4.3",
100-
"terser-webpack-plugin": "^5.3.10",
83+
"tailwindcss": "^4.1.10",
84+
"terser-webpack-plugin": "^5.3.14",
10185
"url-loader": "^4.1.1",
102-
"webpack": "^5.91.0",
103-
"webpack-dev-server": "^5.0.4",
104-
"webpack-manifest-plugin": "^5.0.0"
86+
"webpack": "^5.99.9",
87+
"webpack-dev-server": "^5.2.2",
88+
"webpack-manifest-plugin": "^5.0.1"
10589
},
10690
"devDependencies": {
107-
"typescript": "^5.4.5"
91+
"typescript": "^5.8.3"
10892
},
10993
"optionalDependencies": {
11094
"fsevents": "^2.3.3"
11195
},
11296
"peerDependencies": {
11397
"@reactunity/previewer": "*",
11498
"@reactunity/renderer": "^0.19.0",
115-
"react": "^18.0.0",
99+
"react": "^19.0.0",
116100
"typescript": ">=5"
117101
},
118102
"peerDependenciesMeta": {

scripts/start.js

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88
// @remove-on-eject-end
9-
'use strict';
109

1110
// Do this as the first thing so that any code reading it knows the right env.
1211
process.env.BABEL_ENV = 'development';
@@ -15,7 +14,7 @@ process.env.NODE_ENV = 'development';
1514
// Makes the script crash on unhandled rejections instead of silently
1615
// ignoring them. In the future, promise rejections that are not handled will
1716
// terminate the Node.js process with a non-zero exit code.
18-
process.on('unhandledRejection', err => {
17+
process.on('unhandledRejection', (err) => {
1918
throw err;
2019
});
2120

@@ -26,22 +25,17 @@ require('../config/env');
2625
const allowClearingConsole = !process.env.SKIP_CLEAR_CONSOLE;
2726
if (!allowClearingConsole) {
2827
require('react-dev-utils/clearConsole');
29-
const clearConsole = () => { };
28+
const clearConsole = () => {};
3029
require.cache[require.resolve('react-dev-utils/clearConsole')].exports = clearConsole;
3130
}
3231

33-
const fs = require('fs');
32+
const fs = require('node:fs');
3433
const chalk = require('react-dev-utils/chalk');
3534
const webpack = require('webpack');
3635
const WebpackDevServer = require('webpack-dev-server');
3736
const clearConsole = require('react-dev-utils/clearConsole');
3837
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
39-
const {
40-
choosePort,
41-
createCompiler,
42-
prepareProxy,
43-
prepareUrls,
44-
} = require('react-dev-utils/WebpackDevServerUtils');
38+
const { choosePort, createCompiler, prepareProxy, prepareUrls } = require('react-dev-utils/WebpackDevServerUtils');
4539
const semver = require('semver');
4640
const paths = require('../config/paths');
4741
const configFactory = require('../config/webpack.config');
@@ -58,23 +52,13 @@ if (!checkRequiredFiles([paths.appIndexJs])) {
5852
}
5953

6054
// Tools like Cloud9 rely on this.
61-
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
55+
const DEFAULT_PORT = Number.parseInt(process.env.PORT, 10) || 3000;
6256
const HOST = process.env.HOST || '0.0.0.0';
6357

6458
if (process.env.HOST) {
65-
console.log(
66-
chalk.cyan(
67-
`Attempting to bind to HOST environment variable: ${chalk.yellow(
68-
chalk.bold(process.env.HOST)
69-
)}`
70-
)
71-
);
72-
console.log(
73-
`If this was unintentional, check that you haven't mistakenly set it in your shell.`
74-
);
75-
console.log(
76-
`Learn more here: ${chalk.yellow('https://cra.link/advanced-config')}`
77-
);
59+
console.log(chalk.cyan(`Attempting to bind to HOST environment variable: ${chalk.yellow(chalk.bold(process.env.HOST))}`));
60+
console.log(`If this was unintentional, check that you haven't mistakenly set it in your shell.`);
61+
console.log(`Learn more here: ${chalk.yellow('https://cra.link/advanced-config')}`);
7862
console.log();
7963
}
8064

@@ -87,7 +71,7 @@ checkBrowsers(paths.appPath, isInteractive)
8771
// run on a different port. `choosePort()` Promise resolves to the next free port.
8872
return choosePort(HOST, DEFAULT_PORT);
8973
})
90-
.then(port => {
74+
.then((port) => {
9175
if (port == null) {
9276
// We have not found a port.
9377
return;
@@ -98,12 +82,7 @@ checkBrowsers(paths.appPath, isInteractive)
9882
const appName = require(paths.appPackageJson).name;
9983

10084
const useTypeScript = fs.existsSync(paths.appTsConfig);
101-
const urls = prepareUrls(
102-
protocol,
103-
HOST,
104-
port,
105-
paths.publicUrlOrPath.slice(0, -1)
106-
);
85+
const urls = prepareUrls(protocol, HOST, port, paths.publicUrlOrPath.slice(0, -1));
10786
// Create a webpack compiler that is configured with custom messages.
10887
const compiler = createCompiler({
10988
appName,
@@ -115,11 +94,7 @@ checkBrowsers(paths.appPath, isInteractive)
11594
});
11695
// Load proxy config
11796
const proxySetting = require(paths.appPackageJson).proxy;
118-
const proxyConfig = prepareProxy(
119-
proxySetting,
120-
paths.appPublic,
121-
paths.publicUrlOrPath
122-
);
97+
const proxyConfig = prepareProxy(proxySetting, paths.appPublic, paths.publicUrlOrPath);
12398
// Serve webpack assets generated by the compiler over a web server.
12499
const serverConfig = {
125100
...createDevServerConfig(proxyConfig, urls.lanUrlForConfig),
@@ -136,23 +111,23 @@ checkBrowsers(paths.appPath, isInteractive)
136111
console.log(chalk.cyan('Starting the development server...\n'));
137112
});
138113

139-
['SIGINT', 'SIGTERM'].forEach(function (sig) {
140-
process.on(sig, function () {
141-
devServer.close();
114+
['SIGINT', 'SIGTERM'].forEach((sig) => {
115+
process.on(sig, () => {
116+
devServer.close?.();
142117
process.exit();
143118
});
144119
});
145120

146121
if (process.env.CI !== 'true') {
147122
// Gracefully exit when stdin ends
148-
process.stdin.on('end', function () {
149-
devServer.close();
123+
process.stdin.on('end', () => {
124+
devServer.close?.();
150125
process.exit();
151126
});
152127
}
153128
})
154-
.catch(err => {
155-
if (err && err.message) {
129+
.catch((err) => {
130+
if (err?.message) {
156131
console.log(err.message);
157132
}
158133
process.exit(1);

0 commit comments

Comments
 (0)