Skip to content

Commit cdcc385

Browse files
committed
update: update packages to there latest versions
1 parent 1c677ad commit cdcc385

File tree

8 files changed

+111
-79
lines changed

8 files changed

+111
-79
lines changed

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,39 @@
1414
"serve": "cross-env NODE_ENV=production node ./dist/app/server"
1515
},
1616
"dependencies": {
17-
"@loadable/component": "^5.16.3",
18-
"dotenv": "^16.4.5",
19-
"express": "^4.19.2",
20-
"react": "^18.2.0",
21-
"react-dom": "^18.2.0",
22-
"react-helmet-async": "^2.0.4",
23-
"react-router-dom": "^6.22.3"
17+
"@loadable/component": "^5.16.4",
18+
"dotenv": "^16.4.7",
19+
"express": "^4.21.2",
20+
"react": "^19.0.0",
21+
"react-dom": "^19.0.0",
22+
"react-helmet-async": "^2.0.5",
23+
"react-router-dom": "^7.1.3"
2424
},
2525
"devDependencies": {
2626
"@types/compression": "^1.7.5",
27-
"@types/express": "^4.17.21",
27+
"@types/express": "^5.0.0",
2828
"@types/loadable__component": "^5.13.9",
29-
"@types/node": "^22.2.0",
30-
"@types/react": "^18.2.74",
31-
"@types/react-dom": "^18.2.24",
29+
"@types/node": "^22.10.10",
30+
"@types/react": "^19.0.8",
31+
"@types/react-dom": "^19.0.3",
3232
"@types/react-router-dom": "^5.3.3",
3333
"@types/serve-static": "^1.15.7",
34-
"@typescript-eslint/eslint-plugin": "^7.5.0",
35-
"@typescript-eslint/parser": "^7.5.0",
36-
"@vitejs/plugin-react": "^4.2.1",
37-
"compression": "^1.7.4",
34+
"@typescript-eslint/eslint-plugin": "^8.21.0",
35+
"@typescript-eslint/parser": "^8.21.0",
36+
"@vitejs/plugin-react": "^4.3.4",
37+
"compression": "^1.7.5",
3838
"cross-env": "^7.0.3",
39-
"eslint": "^8.57.0",
40-
"eslint-plugin-react-hooks": "^4.6.0",
41-
"eslint-plugin-react-refresh": "^0.4.6",
42-
"nodemon": "^3.1.0",
39+
"eslint": "^9.19.0",
40+
"eslint-plugin-react-hooks": "^5.1.0",
41+
"eslint-plugin-react-refresh": "^0.4.18",
42+
"nodemon": "^3.1.9",
4343
"rimraf": "^6.0.1",
44-
"sass": "^1.74.1",
45-
"serve-static": "^1.15.0",
44+
"sass": "^1.83.4",
45+
"serve-static": "^1.16.2",
4646
"ts-node": "^10.9.2",
47-
"tsx": "^4.7.2",
48-
"typescript": "^5.4.4",
49-
"vite": "^5.2.8"
47+
"tsx": "^4.19.2",
48+
"typescript": "^5.7.3",
49+
"vite": "^6.0.11"
5050
},
5151
"engines": {
5252
"node": ">=18",
@@ -70,5 +70,5 @@
7070
"SSR Web Application with TypeScript",
7171
"High-Performance SSR with Vite"
7272
],
73-
"packageManager": "pnpm@8.15.6+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f"
73+
"packageManager": "pnpm@9.15.4+sha256.9bee59c7313a216722c079c1e22160dea7f88df4e0c3450b1d7b01b882336c6a"
7474
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ $buttonBgLight: #f9f9f9;
77
$defaultTextLight: rgba(255, 255, 255, 0.87);
88
$defaultTextDark: #213547;
99

10-
$white: #ffffff;
10+
$white: #ffffff;

src/assets/styles/_mixins.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@use "Global" as global;
2+
3+
@mixin breakpoint($breakpoint) {
4+
@if $breakpoint ==sm {
5+
@media (max-width: 576px) {
6+
@content;
7+
}
8+
}
9+
10+
@else if $breakpoint ==md {
11+
@media (max-width: 768px) {
12+
@content;
13+
}
14+
}
15+
16+
@else if $breakpoint ==lg {
17+
@media (max-width: 992px) {
18+
@content;
19+
}
20+
}
21+
22+
@else if $breakpoint ==xl {
23+
@media (max-width: 1200px) {
24+
@content;
25+
}
26+
}
27+
@else if $breakpoint ==xxl {
28+
@media (min-width: 1200px) {
29+
@content;
30+
}
31+
}
32+
}
Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
import React, { useState } from "react";
2-
import { Helmet } from "react-helmet-async";
1+
import React, { useState } from 'react';
2+
import { Helmet } from 'react-helmet-async';
33

4-
const helmetContext = React.createContext({})
4+
const helmetContext = React.createContext({});
55

66
const HelmetProvider = (props: any) => {
7-
8-
const [title, setTitle] = useState("Hello")
9-
const [meta, setMeta] = useState([])
10-
const [link, setLink] = useState([])
11-
const [script, setScript] = useState([])
12-
const [style, setStyle] = useState<string | []>("")
7+
const [title, setTitle] = useState('Hello');
8+
const [meta, setMeta] = useState([]);
9+
const [link, setLink] = useState([]);
10+
const [script, setScript] = useState([]);
11+
const [style, setStyle] = useState<string | []>('');
1312

1413
return (
15-
<helmetContext.Provider value={{ title, setTitle, meta, setMeta, link, setLink, script, setScript, style, setStyle }}>
14+
<helmetContext.Provider
15+
value={{ title, setTitle, meta, setMeta, link, setLink, script, setScript, style, setStyle }}>
1616
<Helmet>
1717
{title && <title>{title}</title>}
1818
{meta && meta.map((m: any) => <meta {...m} />)}
1919
{link && link.map((l: any) => <link {...l} />)}
2020
{script && script.map((s: any) => <script {...s} />)}
21-
{style && (typeof style === 'string') && <style>{style}</style>}
21+
{style && typeof style === 'string' && <style>{style}</style>}
2222
{style && Array.isArray(style) && style.map((s: any) => <style>{s}</style>)}
2323
</Helmet>
2424

2525
{props.children}
2626
</helmetContext.Provider>
27-
)
28-
}
27+
);
28+
};
2929

30-
// eslint-disable-next-line react-refresh/only-export-components
31-
export { helmetContext }
30+
export { helmetContext };
3231
export default HelmetProvider;

src/entry-server.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type * as express from 'express'
22
import ReactDomServer from 'react-dom/server'
3-
import { StaticRouterProvider, createStaticHandler, createStaticRouter } from 'react-router-dom/server'
3+
import { StaticRouterProvider, createStaticHandler, createStaticRouter } from 'react-router-dom'
44
import { HelmetProvider } from 'react-helmet-async'
55
import App from './App';
66
import routes from '@core/routes';
@@ -75,4 +75,4 @@ const _export = {
7575
createFetchRequest
7676
}
7777

78-
export default _export
78+
export default _export

src/screens/Home/Home.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
padding: 2em;
3838
}
3939

40-
.read-the-docs {
40+
.readTheDocs {
4141
color: #888;
42-
}
42+
}

src/screens/Home/Home.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Home: React.FC<HomeProps> = (_props) => {
3737
Edit <code>src/App.tsx</code> and save to test HMR
3838
</p>
3939
</div>
40-
<p className="read-the-docs">
40+
<p className={styles.readTheDocs}>
4141
Click on the Vite and React logos to learn more
4242
</p>
4343
</>
@@ -48,4 +48,4 @@ interface HomeProps {
4848
[key: string]: any
4949
}
5050

51-
export default Home;
51+
export default Home;

vite.config.ts

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react'
3-
import path from 'path'
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
import path from 'path';
44

55
// https://vitejs.dev/config/
66
export default defineConfig({
7-
plugins: [
8-
react()
9-
],
10-
ssr: {
11-
noExternal: ['react-helmet-async'],
12-
},
13-
resolve: {
14-
alias: {
15-
'@assets': path.join(__dirname, './src/assets'),
16-
'@public': path.join(__dirname, './public'),
17-
'@core': path.join(__dirname, './src/core'),
18-
'@screens': path.join(__dirname, './src/screens'),
19-
'@components': path.join(__dirname, './src/components'),
20-
'@utils': path.join(__dirname, './src/utils'),
21-
'@hooks': path.join(__dirname, './src/hooks'),
22-
'@lib': path.join(__dirname, './src/lib'),
23-
'@types': path.join(__dirname, './src/types'),
24-
'@client': path.join(__dirname, './src'),
25-
'@server': path.join(__dirname, './server'),
26-
'@loaders': path.join(__dirname, './src/loaders'),
27-
}
28-
},
29-
css: {
30-
preprocessorOptions: {
31-
scss: {
32-
additionalData: `@import "./src/assets/styles/Global.scss";`,
33-
},
7+
plugins: [react()],
8+
ssr: {
9+
noExternal: ['react-helmet-async']
10+
},
11+
resolve: {
12+
alias: {
13+
'@assets': path.join(__dirname, './src/assets'),
14+
'@public': path.join(__dirname, './public'),
15+
'@core': path.join(__dirname, './src/core'),
16+
'@screens': path.join(__dirname, './src/screens'),
17+
'@components': path.join(__dirname, './src/components'),
18+
'@utils': path.join(__dirname, './src/utils'),
19+
'@hooks': path.join(__dirname, './src/hooks'),
20+
'@lib': path.join(__dirname, './src/lib'),
21+
'@types': path.join(__dirname, './src/types'),
22+
'@client': path.join(__dirname, './src'),
23+
'@server': path.join(__dirname, './server'),
24+
'@loaders': path.join(__dirname, './src/loaders')
25+
}
3426
},
35-
}
36-
})
27+
css: {
28+
preprocessorOptions: {
29+
scss: {
30+
additionalData: `
31+
@use "@assets/styles/_Global.scss" as *;
32+
@use "@assets/styles/_mixins.scss" as *;
33+
`
34+
}
35+
}
36+
}
37+
});

0 commit comments

Comments
 (0)