Skip to content

Commit f3e2004

Browse files
committed
Update deps: in-range bumps + React 19 and TypeScript 6
- In-range: astro 5.16->5.18.2, tailwindcss 3.4.18->3.4.19, tailwind-merge 3.4->3.6 - Majors: react/react-dom 18->19, typescript 5->6, add @types/react(-dom) 19. Keep @astrojs/react 4 (already supports React 19), Astro 5 and Tailwind 3 unchanged. - React 19 type fixes: useRef<number|undefined>(undefined) in the animation islands (useRef now requires an arg); ReactElement in AnimatedTerminal instead of the removed global JSX namespace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 592ba3e commit f3e2004

8 files changed

Lines changed: 83 additions & 96 deletions

File tree

package-lock.json

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

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
"@astrojs/react": "^4.4.2",
1313
"@astrojs/tailwind": "^6.0.2",
1414
"astro": "^5.16.4",
15-
"react": "^18.3.1",
16-
"react-dom": "^18.3.1",
15+
"react": "^19.2.7",
16+
"react-dom": "^19.2.7",
1717
"tailwindcss": "^3.4.18"
1818
},
1919
"devDependencies": {
20+
"@types/react": "^19.2.16",
21+
"@types/react-dom": "^19.2.3",
2022
"class-variance-authority": "^0.7.1",
2123
"clsx": "^2.1.1",
2224
"tailwind-merge": "^3.4.0",
2325
"tw-animate-css": "^1.4.0",
24-
"typescript": "^5.3.3"
26+
"typescript": "^6.0.3"
2527
}
2628
}

src/components/AnimatedTerminal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useState, useMemo, useRef } from "react";
1+
import { useEffect, useState, useMemo, useRef, type ReactElement } from "react";
22

33
type TerminalExample = {
44
name: string;
@@ -361,7 +361,7 @@ export default function AnimatedTerminal({ version }: AnimatedTerminalProps) {
361361
/**
362362
* Highlight Python syntax in a line of code
363363
*/
364-
const highlightPython = (text: string): JSX.Element[] => {
364+
const highlightPython = (text: string): ReactElement[] => {
365365
if (!text.trim()) {
366366
return [<span key="empty">{text || "\u00A0"}</span>];
367367
}

src/components/ChristmasLights.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface Sparkle {
1212

1313
export default function ChristmasSparkles() {
1414
const canvasRef = useRef<HTMLCanvasElement>(null);
15-
const animationFrameRef = useRef<number>();
15+
const animationFrameRef = useRef<number | undefined>(undefined);
1616
const sparklesRef = useRef<Sparkle[]>([]);
1717
const isVisibleRef = useRef(true);
1818

src/components/OceanWaves.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Bubble {
1111

1212
export default function OceanWaves() {
1313
const canvasRef = useRef<HTMLCanvasElement>(null);
14-
const animationFrameRef = useRef<number>();
14+
const animationFrameRef = useRef<number | undefined>(undefined);
1515
const bubblesRef = useRef<Bubble[]>([]);
1616
const waveOffsetRef = useRef(0);
1717
const sectionDividersRef = useRef<Array<{ y: number; inverted: boolean }>>([]);

src/components/SnowEffect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface Accumulation {
2525

2626
export default function SnowEffect() {
2727
const canvasRef = useRef<HTMLCanvasElement>(null);
28-
const animationFrameRef = useRef<number>();
28+
const animationFrameRef = useRef<number | undefined>(undefined);
2929
const snowflakesRef = useRef<Snowflake[]>([]);
3030
const windRef = useRef(0);
3131
const accumulationsRef = useRef<Map<HTMLElement, Accumulation>>(new Map());

src/components/SunBackground.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function SunBackground() {
4646
const canvasRef = useRef<HTMLCanvasElement>(null);
4747
const glRef = useRef<WebGLRenderingContext | null>(null);
4848
const programRef = useRef<WebGLProgram | null>(null);
49-
const animationFrameRef = useRef<number>();
49+
const animationFrameRef = useRef<number | undefined>(undefined);
5050
const timeRef = useRef(0);
5151
const isVisibleRef = useRef(true);
5252
const [showSun, setShowSun] = useState(false);

src/components/VelvetSilkBackground.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function VelvetSilkBackground() {
44
const canvasRef = useRef<HTMLCanvasElement>(null);
55
const glRef = useRef<WebGLRenderingContext | null>(null);
66
const programRef = useRef<WebGLProgram | null>(null);
7-
const animationFrameRef = useRef<number>();
7+
const animationFrameRef = useRef<number | undefined>(undefined);
88
const timeRef = useRef(0);
99
const isVisibleRef = useRef(true);
1010
const [showSilk, setShowSilk] = useState(false);

0 commit comments

Comments
 (0)