Skip to content

Commit 48455de

Browse files
authored
fix: react-app general updates (#19)
1 parent 6f3c28d commit 48455de

23 files changed

+1353
-747
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'*.tsx?':
2+
- eslint --fix
3+
- npx --yes prettier --write
4+
'*.{json,yaml,yml,md,html,css,scss}':
5+
- npx --yes prettier --write
6+
package*.json:
7+
- npx sort-package-json
8+
- npx --yes prettier --write

package-lock.json

Lines changed: 1253 additions & 656 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22
"name": "examples",
33
"version": "0.0.0-dev",
44
"description": "Examples repo",
5-
"main": "scripts/start.ts",
6-
"scripts": {
7-
"test": "npm run test --workspaces --if-present",
8-
"start": "tsx scripts/start.ts",
9-
"build": "npm run build --workspaces --if-present",
10-
"clean": "npx rimraf ./**/{build,coverage,dist,node_modules,out}"
11-
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/romcal/romcal-examples.git"
15-
},
165
"keywords": [
176
"examples",
187
"romcal",
@@ -21,6 +10,15 @@
2110
"iife",
2211
"rest-api"
2312
],
13+
"homepage": "https://github.com/romcal/romcal-examples#readme",
14+
"bugs": {
15+
"url": "https://github.com/romcal/romcal-examples/issues"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/romcal/romcal-examples.git"
20+
},
21+
"license": "MIT",
2422
"author": {
2523
"name": "Etienne Magnier",
2624
"email": "etienne.magnier@gmail.com",
@@ -38,24 +36,28 @@
3836
"url": "https://github.com/tukusejssirs"
3937
}
4038
],
41-
"license": "MIT",
42-
"bugs": {
43-
"url": "https://github.com/romcal/romcal-examples/issues"
44-
},
45-
"homepage": "https://github.com/romcal/romcal-examples#readme",
39+
"type": "module",
40+
"main": "scripts/start.ts",
4641
"workspaces": [
4742
"html-web-page",
4843
"react-app",
4944
"rest-api-with-fastify",
5045
"rest-api-with-express",
5146
"node-console"
5247
],
48+
"scripts": {
49+
"build": "npm run build --workspaces --if-present",
50+
"clean": "npx rimraf node_modules ./**/{build,coverage,dist,node_modules,out}",
51+
"prepare": "npx husky",
52+
"start": "tsx scripts/start.ts",
53+
"test": "npm run test --workspaces --if-present"
54+
},
5355
"devDependencies": {
54-
"@types/yargs": "^17.0.33",
56+
"@types/yargs": "^17.0.35",
5557
"cli-select": "^1.1.2",
56-
"tsx": "^4.19.4",
57-
"typescript": "^5.8.3",
58-
"yargs": "^17.7.2"
59-
},
60-
"type": "module"
58+
"husky": "^9.1.7",
59+
"tsx": "^4.20.6",
60+
"typescript": "^5.9.3",
61+
"yargs": "^18.0.0"
62+
}
6163
}

react-app/cypress.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { defineConfig } from 'cypress';
2-
import vitePreprocessor from 'cypress-vite';
2+
import { getVitePrebuilder } from 'cypress-vite';
33

44
const port = Number.parseInt(process.env.ROMCAL_APP_PORT ?? '3000', 10);
5+
const { vitePrebuild, vitePreprocessor } = getVitePrebuilder();
56

67
export default defineConfig({
78
reporter: 'junit',
@@ -12,8 +13,9 @@ export default defineConfig({
1213
e2e: {
1314
supportFile: false,
1415
baseUrl: `http://localhost:${port}`,
15-
setupNodeEvents(on) {
16-
on('file:preprocessor', vitePreprocessor('./vite.config.ts'));
16+
setupNodeEvents(on, config) {
17+
on('before:run', (details) => vitePrebuild(details, config));
18+
on('file:preprocessor', vitePreprocessor);
1719
},
1820
env: {
1921
ROMCAL_APP_PORT: port,

react-app/eslint.config.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export default tseslint.config(
1313
eslint.configs.recommended,
1414
{
1515
ignores: ['dist/', 'build/'],
16+
settings: {
17+
react: {
18+
version: '19',
19+
},
20+
},
1621
},
1722
{
1823
files: ['**/*.{ts,tsx}'],
@@ -21,7 +26,8 @@ export default tseslint.config(
2126
tseslint.configs.recommended,
2227
jsxA11y.flatConfigs.recommended,
2328
react.configs.flat.recommended,
24-
reactHooks.configs['recommended-latest'],
29+
react.configs.flat['jsx-runtime'],
30+
reactHooks.configs.flat['recommended-latest'],
2531
pluginCypress.configs.recommended,
2632
eslintPluginPrettier
2733
);

react-app/package.json

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,34 @@
1010
"lint": "eslint .",
1111
"lint:fix": "npm run lint -- --fix",
1212
"serve": "NODE_NO_WARNINGS=1 vite",
13-
"serve:dev": "ESLINT_USE_FLAT_CONFIG=false VITE_DAY_VARIANT=developer npm run serve",
13+
"serve:dev": "VITE_DAY_VARIANT=developer npm run serve",
1414
"start": "NODE_NO_WARNINGS=1 npx http-server build -p ${ROMCAL_APP_PORT:-3000} -g -s",
1515
"test": "NODE_NO_WARNINGS=1 npx cypress run"
1616
},
17+
"overrides": {
18+
"@babel/plugin-proposal-class-properties": "@babel/plugin-transform-class-properties",
19+
"@babel/plugin-proposal-nullish-coalescing-operator": "@babel/plugin-transform-nullish-coalescing-operator",
20+
"@babel/plugin-proposal-numeric-separator": "@babel/plugin-transform-numeric-separator",
21+
"@babel/plugin-proposal-optional-chaining": "@babel/plugin-transform-optional-chaining",
22+
"@babel/plugin-proposal-private-methods": "@babel/plugin-transform-private-methods",
23+
"flux": {
24+
"react": "^18.0.0"
25+
},
26+
"html-entities": "^2.5.2"
27+
},
1728
"dependencies": {
1829
"@emotion/react": "^11.14.0",
19-
"@emotion/styled": "^11.14.0",
20-
"@microlink/react-json-view": "^1.26.2",
21-
"@mui/icons-material": "^7.1.0",
22-
"@mui/material": "^7.1.0",
23-
"@mui/utils": "^7.1.0",
30+
"@emotion/styled": "^11.14.1",
31+
"@microlink/react-json-view": "^1.27.0",
32+
"@mui/icons-material": "^7.3.5",
33+
"@mui/material": "^7.3.5",
34+
"@mui/utils": "^7.3.5",
2435
"@mui/x-date-pickers": "^7.28.3",
2536
"@romcal/calendar.africa": "3.0.0-dev.116",
2637
"@romcal/calendar.americas": "3.0.0-dev.116",
27-
"@romcal/calendar.asia": "3.0.0-dev.116",
2838
"@romcal/calendar.argentina": "3.0.0-dev.116",
39+
"@romcal/calendar.asia": "3.0.0-dev.116",
40+
"@romcal/calendar.asian-russia": "3.0.0-dev.116",
2941
"@romcal/calendar.australia": "3.0.0-dev.116",
3042
"@romcal/calendar.austria": "3.0.0-dev.116",
3143
"@romcal/calendar.belgium": "3.0.0-dev.116",
@@ -41,6 +53,7 @@
4153
"@romcal/calendar.denmark": "3.0.0-dev.116",
4254
"@romcal/calendar.england": "3.0.0-dev.116",
4355
"@romcal/calendar.europe": "3.0.0-dev.116",
56+
"@romcal/calendar.european-russia": "3.0.0-dev.116",
4457
"@romcal/calendar.finland": "3.0.0-dev.116",
4558
"@romcal/calendar.france": "3.0.0-dev.116",
4659
"@romcal/calendar.france.coutances": "3.0.0-dev.116",
@@ -74,8 +87,6 @@
7487
"@romcal/calendar.puerto-rico": "3.0.0-dev.116",
7588
"@romcal/calendar.romania": "3.0.0-dev.116",
7689
"@romcal/calendar.russia": "3.0.0-dev.116",
77-
"@romcal/calendar.asian-russia": "3.0.0-dev.116",
78-
"@romcal/calendar.european-russia": "3.0.0-dev.116",
7990
"@romcal/calendar.scotland": "3.0.0-dev.116",
8091
"@romcal/calendar.slovakia": "3.0.0-dev.116",
8192
"@romcal/calendar.slovenia": "3.0.0-dev.116",
@@ -89,56 +100,45 @@
89100
"@romcal/calendar.venezuela": "3.0.0-dev.116",
90101
"@romcal/calendar.vietnam": "3.0.0-dev.116",
91102
"@romcal/calendar.wales": "3.0.0-dev.116",
92-
"@tanstack/react-query": "^5.76.1",
103+
"@tanstack/react-query": "^5.90.9",
93104
"classnames": "^2.5.1",
94105
"date-fns": "^4.1.0",
95106
"flatted": "^3.3.3",
96107
"lodash": "^4.17.21",
97-
"nanoid": "^5.1.5",
98-
"react": "^18.3.1",
99-
"react-dom": "^18.3.1",
100-
"react-router-dom": "^6.26.2",
108+
"nanoid": "^5.1.6",
109+
"react": "^19.2.0",
110+
"react-dom": "^19.2.0",
111+
"react-router": "^7.9.6",
101112
"romcal": "3.0.0-dev.116"
102113
},
103114
"devDependencies": {
104115
"@babel/plugin-transform-class-properties": "^7.27.1",
105116
"@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1",
106117
"@babel/plugin-transform-numeric-separator": "^7.27.1",
107-
"@babel/plugin-transform-optional-chaining": "^7.27.1",
118+
"@babel/plugin-transform-optional-chaining": "^7.28.5",
108119
"@babel/plugin-transform-private-methods": "^7.27.1",
109-
"@types/lodash": "^4.17.17",
110-
"@types/node": "^22.15.20",
111-
"@types/react": "^18.3.8",
112-
"@types/react-dom": "^18.3.0",
113-
"@typescript-eslint/eslint-plugin": "^8.32.1",
114-
"@typescript-eslint/parser": "^8.32.1",
120+
"@types/lodash": "^4.17.20",
121+
"@types/node": "^24.10.1",
122+
"@types/react": "^19.2.5",
123+
"@types/react-dom": "^19.2.3",
124+
"@typescript-eslint/eslint-plugin": "^8.46.4",
125+
"@typescript-eslint/parser": "^8.46.4",
115126
"@vitejs/plugin-react": "^4.4.1",
116127
"cypress": "^15.6.0",
117-
"cypress-vite": "^1.6.0",
118-
"eslint": "^9.27.0",
119-
"eslint-config-prettier": "^9.1.0",
120-
"eslint-plugin-cypress": "^4.3.0",
121-
"eslint-plugin-import": "^2.31.0",
128+
"cypress-vite": "^1.8.0",
129+
"eslint": "^9.39.1",
130+
"eslint-config-prettier": "^10.1.8",
131+
"eslint-plugin-cypress": "^5.2.0",
132+
"eslint-plugin-import": "^2.32.0",
122133
"eslint-plugin-jsx-a11y": "^6.10.2",
123-
"eslint-plugin-prettier": "^5.4.0",
134+
"eslint-plugin-prettier": "^5.5.4",
124135
"eslint-plugin-react": "^7.37.5",
125-
"eslint-plugin-react-hooks": "^6.0.0",
126-
"prettier": "^3.5.3",
127-
"typescript": "^5.8.3",
128-
"typescript-eslint": "^8.32.1",
129-
"vite": "^6.3.5",
136+
"eslint-plugin-react-hooks": "^7.0.1",
137+
"prettier": "^3.6.2",
138+
"typescript": "^5.9.3",
139+
"typescript-eslint": "^8.46.4",
140+
"vite": "^7.2.2",
130141
"vite-plugin-eslint": "^1.8.1",
131142
"vite-tsconfig-paths": "^5.1.4"
132-
},
133-
"overrides": {
134-
"html-entities": "^2.5.2",
135-
"@babel/plugin-proposal-private-methods": "@babel/plugin-transform-private-methods",
136-
"@babel/plugin-proposal-nullish-coalescing-operator": "@babel/plugin-transform-nullish-coalescing-operator",
137-
"@babel/plugin-proposal-optional-chaining": "@babel/plugin-transform-optional-chaining",
138-
"@babel/plugin-proposal-numeric-separator": "@babel/plugin-transform-numeric-separator",
139-
"@babel/plugin-proposal-class-properties": "@babel/plugin-transform-class-properties",
140-
"flux": {
141-
"react": "^18.0.0"
142-
}
143143
}
144144
}

react-app/src/RomcalApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { type FC } from 'react';
1+
import { type FC } from 'react';
22
import { LocalizationProvider } from '@mui/x-date-pickers';
33
import { Container, createTheme, ThemeProvider } from '@mui/material';
44
import { styled } from '@mui/material/styles';
55
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
6-
import { Navigate, Route, Routes } from 'react-router-dom';
6+
import { Navigate, Route, Routes } from 'react-router';
77

88
import { Calendar } from './components/Calendar';
99
import { Header } from './components/Header';

react-app/src/components/AdditionalLineContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { unstable_capitalize as capitalize } from '@mui/utils';
32
import { styled } from '@mui/material/styles';
43
import type { BaseLiturgicalDay } from 'romcal';

react-app/src/components/Calendar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from 'react';
2-
31
import { CalendarContent } from './CalendarContent';
42
import { CalendarToolbar } from './CalendarToolbar';
53

0 commit comments

Comments
 (0)