Skip to content

Commit f273a70

Browse files
Upgrade deps (#7)
* upgrade to react 19 * upgrade eslint * upgrade typescript * upgrade vite * upgrade cloudeflare workers * upgrade hono * upgrade zod * upgrade jsdom * upgrade testing-library * upgrade react-query * upgrade sentry/react * upgrade prettier * upgrade playwright * upgrade wrangler * upgrade tailwind * fix server api * upgrade postcss * bump ver
1 parent 0f966ed commit f273a70

23 files changed

+5249
-166
lines changed

.eslintrc.cjs

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

client/.eslintignore

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

client/.eslintrc.cjs

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

client/eslint.config.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* eslint-env node */
2+
import globals from 'globals';
3+
import path from 'path';
4+
import { fileURLToPath } from 'url';
5+
import rootConfig from '../eslint.config.js';
6+
import tsEslintParser from '@typescript-eslint/parser';
7+
import reactHooks from 'eslint-plugin-react-hooks';
8+
import reactRefresh from 'eslint-plugin-react-refresh';
9+
10+
// mimic CommonJS variables -- not needed if using CommonJS
11+
const __filename = fileURLToPath(import.meta.url);
12+
const __dirname = path.dirname(__filename);
13+
14+
export default [
15+
...rootConfig,
16+
{
17+
// Note: there should be no other properties in this object
18+
ignores: ['src/server-types.d.ts', 'eslint.config.js', 'postcss.config.js'],
19+
},
20+
{
21+
languageOptions: {
22+
ecmaVersion: 2022,
23+
sourceType: 'module',
24+
globals: { ...globals.browser },
25+
parser: tsEslintParser,
26+
parserOptions: {
27+
project: './tsconfig.eslint.json',
28+
tsconfigRootDir: __dirname,
29+
},
30+
},
31+
plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh },
32+
rules: {
33+
'react-refresh/only-export-components': [
34+
'warn',
35+
{ allowConstantExport: true },
36+
],
37+
'no-restricted-imports': [
38+
'error',
39+
{
40+
paths: [
41+
{
42+
name: '@sentry/react',
43+
message: '@sentry/react should only be lazy imported',
44+
},
45+
],
46+
},
47+
],
48+
},
49+
},
50+
];

client/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@
1616
"typecheck": "pnpm exec tsc --build"
1717
},
1818
"dependencies": {
19-
"@sentry/react": "^8.25.0",
20-
"@sentry/vite-plugin": "^2.22.0",
21-
"@tanstack/react-query": "^5.50.1",
19+
"@sentry/react": "^9.16.1",
20+
"@sentry/vite-plugin": "^3.4.0",
21+
"@tanstack/react-query": "^5.75.5",
2222
"classnames": "^2.5.1",
23-
"react": "^18.3.1",
24-
"react-dom": "^18.3.1"
23+
"react": "^19.1.0",
24+
"react-dom": "^19.1.0"
2525
},
2626
"devDependencies": {
27-
"@testing-library/jest-dom": "^6.4.6",
28-
"@testing-library/react": "^16.0.0",
29-
"@types/react": "^18.3.3",
30-
"@types/react-dom": "^18.3.0",
31-
"@vitejs/plugin-react-swc": "^3.7.0",
32-
"autoprefixer": "^10.4.19",
33-
"eslint-plugin-react-hooks": "^4.6.2",
34-
"eslint-plugin-react-refresh": "^0.4.7",
35-
"jsdom": "^24.1.0",
36-
"postcss": "^8.4.39",
37-
"tailwindcss": "^3.4.4",
38-
"vite": "^5.3.2",
39-
"vitest": "^2.0.2"
27+
"@tailwindcss/postcss": "^4.1.5",
28+
"@testing-library/jest-dom": "^6.6.3",
29+
"@testing-library/react": "^16.3.0",
30+
"@types/react": "^19.1.3",
31+
"@types/react-dom": "^19.1.3",
32+
"@vitejs/plugin-react-swc": "^3.9.0",
33+
"eslint-plugin-react-hooks": "^5.2.0",
34+
"eslint-plugin-react-refresh": "^0.4.20",
35+
"jsdom": "^26.1.0",
36+
"postcss": "^8.5.3",
37+
"tailwindcss": "^4.1.5",
38+
"vite": "^6.3.5",
39+
"vitest": "^3.1.3"
4040
}
4141
}

client/postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
3+
'@tailwindcss/postcss': {},
54
},
65
};

client/src/components/ui.modal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,18 @@ export const Modal = ({
5252
return (
5353
<div
5454
className={classNames(
55-
'fixed inset-0 bg-black bg-opacity-70 flex justify-center items-center z-50',
56-
isOpen ? 'animate-fadeIn' : 'animate-fadeOut',
55+
'fixed inset-0 bg-black/70 flex justify-center items-center',
56+
isOpen ? 'animate-(--animate-fade-in)' : 'animate-(--animate-fade-out)',
5757
)}
5858
onClick={onClose}
5959
onAnimationEnd={handleAnimationEnd}
6060
>
6161
<div
6262
className={classNames(
63-
'rounded-lg p-6 m-4',
64-
isOpen ? 'animate-scaleIn' : 'animate-scaleOut',
63+
'relative rounded-lg p-6 m-4',
64+
isOpen
65+
? 'animate-(--animate-scale-in)'
66+
: 'animate-(--animate-scale-out)',
6567
className ?? '',
6668
)}
6769
onClick={(e) => e.stopPropagation()}

client/src/example.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const useServerOkQuery = () => {
2121
if (!res.ok) {
2222
throw res;
2323
}
24-
return res.json();
24+
return res.text();
2525
})
2626
.catch((error) => {
2727
captureException(error);
28-
return null;
28+
throw error;
2929
});
3030
},
3131
});

client/src/index.css

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,68 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@theme {
4+
--animate-fade-in: fadeIn 0.3s ease-out forwards;
5+
--animate-fade-out: fadeOut 0.3s ease-out forwards;
6+
--animate-scale-in: scaleIn 0.3s ease-out forwards;
7+
--animate-scale-out: scaleOut 0.3s ease-out forwards;
8+
9+
--font-sans: Ubuntu, sans-serif;
10+
11+
@keyframes fadeIn {
12+
0% {
13+
opacity: 0;
14+
}
15+
100% {
16+
opacity: 1;
17+
}
18+
}
19+
@keyframes fadeOut {
20+
0% {
21+
opacity: 1;
22+
}
23+
100% {
24+
opacity: 0;
25+
}
26+
}
27+
@keyframes scaleIn {
28+
0% {
29+
transform: scale(0.95);
30+
opacity: 0;
31+
}
32+
100% {
33+
transform: scale(1);
34+
opacity: 1;
35+
}
36+
}
37+
@keyframes scaleOut {
38+
0% {
39+
transform: scale(1);
40+
opacity: 1;
41+
}
42+
100% {
43+
transform: scale(0.95);
44+
opacity: 0;
45+
}
46+
}
47+
}
48+
49+
/*
50+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
51+
so we've added these compatibility styles to make sure everything still
52+
looks the same as it did with Tailwind CSS v3.
53+
54+
If we ever want to remove these styles, we need to add an explicit border
55+
color utility to any element that depends on these defaults.
56+
*/
57+
@layer base {
58+
*,
59+
::after,
60+
::before,
61+
::backdrop,
62+
::file-selector-button {
63+
border-color: var(--color-gray-200, currentcolor);
64+
}
65+
}
466

567
@layer base {
668
html {

client/tailwind.config.ts

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

0 commit comments

Comments
 (0)