Skip to content

Commit 9922555

Browse files
Merge pull request #4 from ChristianScheub/copilot/update-react-and-router-dependencies
Upgrade to React 19 and React Router v7 with Significantly Reduced Security Vulnerabilities
2 parents 7734cda + bc59393 commit 9922555

File tree

14 files changed

+9054
-20921
lines changed

14 files changed

+9054
-20921
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 70 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -207,127 +207,95 @@ export interface RequestHeaders extends OutgoingHttpHeaders {
207207

208208
## Available Scripts
209209

210-
In the project directory, you can run:
210+
In the project directory you can run the following npm scripts (current scripts are taken from `package.json`):
211211

212-
### `npm start`
212+
### `npm run dev` or `npm start`
213213

214-
Runs the app in the development mode.\
215-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
214+
Starts the development server using Vite.
215+
Open http://localhost:5173 in your browser (Vite's default port) to view the app.
216+
The page reloads on changes and hot module replacement (HMR) is enabled.
216217

217-
The page will reload if you make edits.\
218-
You will also see any lint errors in the console.
219-
220-
### `npm test`
218+
### `npm run build`
221219

222-
Launches the test runner in the interactive watch mode.\
223-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
220+
Creates a production build using Vite and outputs optimized files to the `dist` folder.
224221

225-
### `npm test -- --coverage --watchAll`
222+
### `npm run preview`
226223

227-
Returns the complete test coverage rate in the form of a table for all files.
224+
Locally previews the production build (serves the `dist` output).
228225

226+
### `npm test`
229227

230-
### `npm run build`
228+
Runs the Jest test suite (configured to use `ts-jest` for TypeScript). This is the project's primary test command and runs tests in a single process.
231229

232-
Builds the app for production to the `build` folder.\
233-
It correctly bundles React in production mode and optimizes the build for the best performance.
230+
### `npm run test:vitest`
234231

235-
The build is minified and the filenames include the hashes.\
236-
Your app is ready to be deployed!
232+
An alias to run Vitest (optional). The project currently uses Jest by default but a Vitest configuration remains available as an alternative.
237233

238-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
234+
### `npm run electron-pack`
239235

240-
### `npm run eject`
236+
Builds an unpacked Electron application (developer-friendly output). This uses `electron-builder` with the `--dir` option.
241237

242-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
238+
### `npm run electron-dist`
243239

244-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
240+
Creates distributable packages for desktop platforms (platform-specific targets like `dmg`, `nsis`, etc.) via `electron-builder`.
245241

246-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
242+
Notes
243+
- Dev server: Vite serves on port 5173 by default. If you have a different port configured or a proxy, adjust accordingly.
244+
- Tests: run `npm test` for Jest. If you prefer Vitest, use the `test:vitest` script, but some tests rely on Jest semantics (e.g. jest.mock hoisting).
245+
- If you encounter engine or install warnings (EBADENGINE), consider using a stable Node LTS (18.x or 20.x) via nvm.
247246

248-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
249247

250248

251249
## Used NPM Modules
252250
According to the command npm list
253251
You can see the deeper NPM modules used and which of these are used in the licenses.json.
254252

255-
├── @babel/core@7.28.0
256-
257-
├── @babel/plugin-proposal-private-property-in-object@7.21.11
258-
259-
├── @babel/preset-env@7.28.0
260-
261-
├── @capacitor-community/electron@5.0.1
262-
263-
├── @capacitor/android@5.7.8
264-
265-
├── @capacitor/app@5.0.8
266-
267-
├── @capacitor/cli@5.7.8
268-
269-
├── @capacitor/core@5.7.8
270-
271-
├── @capacitor/device@5.0.8
272-
273-
├── @capacitor/filesystem@5.2.2
274-
275-
├── @capacitor/ios@5.7.8
276-
277-
├── @capacitor/share@5.0.8
278-
279-
├── @emotion/react@11.14.0
280-
281-
├── @emotion/styled@11.14.1
282-
283-
├── @mui/material@5.15.7
284-
285-
├── @testing-library/jest-dom@5.17.0
286-
287-
├── @testing-library/react@13.4.0
288-
289-
├── @testing-library/user-event@13.5.0
290-
291-
├── @types/crypto-js@4.2.2
292-
293-
├── @types/jest@27.5.2
294-
295-
├── @types/node@16.18.126
296-
297-
├── @types/react-dom@18.3.7
298-
299-
├── @types/react@18.3.23
300-
301-
├── babel-jest@29.7.0
302-
303-
├── bootstrap-icons@1.13.1
304-
305-
├── bootstrap@5.3.7
306-
307-
├── capacitor-native-biometric@4.2.2
308-
309-
├── crypto-js@4.2.0
310-
311-
├── electron-builder@24.13.3
312-
313-
├── i18next-browser-languagedetector@7.2.2
314-
315-
├── i18next@23.16.8
316-
317-
├── license-checker@25.0.1
318-
319-
├── react-bootstrap@2.10.10
320-
321-
├── react-dom@18.3.1
322-
323-
├── react-i18next@14.1.3
324-
325-
├── react-icons@4.12.0
326-
327-
├── react-router-dom@6.22.0
328-
329-
├── react-scripts@5.0.1
330-
331-
├── react@18.3.1
332-
333-
└── typescript@4.9.5
253+
<br /> ├── @babel/core@7.28.4
254+
<br /> ├── @babel/plugin-proposal-private-property-in-object@7.21.11
255+
<br /> ├── @babel/preset-env@7.28.3
256+
<br /> ├── @capacitor-community/electron@5.0.1
257+
<br /> ├── @capacitor/android@7.4.3
258+
<br /> ├── @capacitor/app@7.1.0
259+
<br /> ├── @capacitor/cli@7.4.3
260+
<br /> ├── @capacitor/core@7.4.3
261+
<br /> ├── @capacitor/device@7.0.2
262+
<br /> ├── @capacitor/filesystem@7.1.4
263+
<br /> ├── @capacitor/ios@7.4.3
264+
<br /> ├── @capacitor/share@7.0.2
265+
<br /> ├── @emotion/react@11.14.0
266+
<br /> ├── @emotion/styled@11.14.1
267+
<br /> ├── @mui/material@7.3.4
268+
<br /> ├── @testing-library/dom@10.4.1
269+
<br /> ├── @testing-library/jest-dom@6.9.1
270+
<br /> ├── @testing-library/react@16.3.0
271+
<br /> ├── @testing-library/user-event@14.6.1
272+
<br /> ├── @types/crypto-js@4.2.2
273+
<br /> ├── @types/jest@30.0.0
274+
<br /> ├── @types/node@24.7.2
275+
<br /> ├── @types/react-dom@19.2.2
276+
<br /> ├── @types/react@19.2.2
277+
<br /> ├── @vitejs/plugin-react@5.0.4
278+
<br /> ├── babel-jest@30.2.0
279+
<br /> ├── bootstrap-icons@1.13.1
280+
<br /> ├── bootstrap@5.3.8
281+
<br /> ├── capacitor-native-biometric@4.2.2
282+
<br /> ├── crypto-js@4.2.0
283+
<br /> ├── electron-builder@26.0.12
284+
<br /> ├── i18next-browser-languagedetector@8.2.0
285+
<br /> ├── i18next@25.6.0
286+
<br /> ├── identity-obj-proxy@3.0.0
287+
<br /> ├── jest-environment-jsdom@30.2.0
288+
<br /> ├── jest@30.2.0
289+
<br /> ├── jsdom@27.0.0
290+
<br /> ├── license-checker@25.0.1
291+
<br /> ├── react-bootstrap@2.10.10
292+
<br /> ├── react-dom@19.2.0
293+
<br /> ├── react-i18next@16.0.1
294+
<br /> ├── react-icons@5.5.0
295+
<br /> ├── react-router-dom@7.9.4
296+
<br /> ├── react-router@7.9.4
297+
<br /> ├── react@19.2.0
298+
<br /> ├── ts-jest@29.4.5
299+
<br /> ├── typescript@5.9.3
300+
<br /> ├── vite@7.1.9
301+
└── vitest@3.2.4

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Local Notes</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

jest.config.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
testEnvironment: 'jsdom',
3+
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
4+
transform: {
5+
'^.+\\.(ts|tsx)$': 'ts-jest'
6+
},
7+
moduleNameMapper: {
8+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy'
9+
}
10+
}

0 commit comments

Comments
 (0)