Skip to content

Commit

Permalink
Update to react 19
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGustafsson committed Dec 14, 2024
1 parent ecadeab commit 322e29c
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 71 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"elkjs": "0.9.3",
"github-markdown-css": "5.8.1",
"marked": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-router-dom": "7.0.2"
},
"devDependencies": {
Expand All @@ -27,8 +27,8 @@
"@types/dompurify": "3.2.0",
"@types/eslint": "9.6.1",
"@types/node": "22.10.2",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.1",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.2",
"@typescript-eslint/parser": "8.18.0",
"@vitejs/plugin-react": "4.3.4",
"@vitest/coverage-v8": "2.1.8",
Expand Down
1 change: 1 addition & 0 deletions web/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type JSX } from 'react'
import { NavLink, Route, Routes, useLocation } from 'react-router-dom'

import { FluentArrowLeft24Regular } from './components/icons/fluent-arrow-left-24-regular'
Expand Down
2 changes: 1 addition & 1 deletion web/components/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HTMLAttributes } from 'react'
import { HTMLAttributes, type JSX } from 'react'

export type BadgeProps = {
label: string
Expand Down
2 changes: 1 addition & 1 deletion web/components/CustomGraphNode.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Handle, NodeProps, Position } from '@xyflow/react'
import { type ReactNode } from 'react'
import { type JSX, type ReactNode } from 'react'

export function CustomGraphNode(
node: NodeProps & {
Expand Down
1 change: 1 addition & 0 deletions web/components/HTML.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import DOMPurify from 'dompurify'
import { type JSX } from 'react'

export function HTML({ children }: React.PropsWithChildren<{}>): JSX.Element {
if (typeof children !== 'string') {
Expand Down
2 changes: 2 additions & 0 deletions web/components/ImageCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { type JSX } from 'react'

import { TagsByName } from '../tags'
import { formatRelativeTimeTo } from '../time'
import { Badge } from './Badge'
Expand Down
2 changes: 1 addition & 1 deletion web/components/InfoTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren } from 'react'
import { type JSX, PropsWithChildren } from 'react'

import { FluentInfo16Regular } from './icons/fluent-info-16-regular'

Expand Down
2 changes: 1 addition & 1 deletion web/components/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DOMPurify from 'dompurify'
import { marked } from 'marked'
import { useMemo } from 'react'
import { type JSX, useMemo } from 'react'

export function Markdown({
children,
Expand Down
2 changes: 1 addition & 1 deletion web/components/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, SelectHTMLAttributes } from 'react'
import { type JSX, PropsWithChildren, SelectHTMLAttributes } from 'react'

export function Select({
children,
Expand Down
2 changes: 1 addition & 1 deletion web/components/TagSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, useRef, useState } from 'react'
import { type JSX, PropsWithChildren, useRef, useState } from 'react'

import { Tag } from '../tags'
import { Badge } from './Badge'
Expand Down
2 changes: 1 addition & 1 deletion web/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react'
import { type JSX, useEffect } from 'react'
import { NavLink, useNavigate, useSearchParams } from 'react-router-dom'

import { useImages, usePagination, useTags } from '../api'
Expand Down
2 changes: 1 addition & 1 deletion web/pages/ImagePage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Controls, ReactFlow } from '@xyflow/react'
import '@xyflow/react/dist/base.css'
import { ReactNode } from 'react'
import { type JSX, ReactNode } from 'react'
import { Navigate, useSearchParams } from 'react-router-dom'

import {
Expand Down
85 changes: 26 additions & 59 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1264,23 +1264,16 @@ __metadata:
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.14
resolution: "@types/prop-types@npm:15.7.14"
checksum: 10c0/1ec775160bfab90b67a782d735952158c7e702ca4502968aa82565bd8e452c2de8601c8dfe349733073c31179116cf7340710160d3836aa8a1ef76d1532893b1
languageName: node
linkType: hard

"@types/react-dom@npm:18.3.1":
version: 18.3.1
resolution: "@types/react-dom@npm:18.3.1"
dependencies:
"@types/react": "npm:*"
checksum: 10c0/8b416551c60bb6bd8ec10e198c957910cfb271bc3922463040b0d57cf4739cdcd24b13224f8d68f10318926e1ec3cd69af0af79f0291b599a992f8c80d47f1eb
"@types/react-dom@npm:19.0.2":
version: 19.0.2
resolution: "@types/react-dom@npm:19.0.2"
peerDependencies:
"@types/react": ^19.0.0
checksum: 10c0/3d0c7b78dbe8df64ea769f30af990a5950173a8321c745fe11094d765423f7964c3519dca6e7cd36b4be6521c8efc690bdd3b79b327b229dd1e9d5a8bad677dd
languageName: node
linkType: hard

"@types/react@npm:*":
"@types/react@npm:19.0.1":
version: 19.0.1
resolution: "@types/react@npm:19.0.1"
dependencies:
Expand All @@ -1289,16 +1282,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:18.3.1":
version: 18.3.1
resolution: "@types/react@npm:18.3.1"
dependencies:
"@types/prop-types": "npm:*"
csstype: "npm:^3.0.2"
checksum: 10c0/18d856c12a4ec93f3cda2d58ef3d77a9480818afd3af895f812896fb82cfca1f35a692ab1add4ce826a4eb58a071624c7d1c8c6c4ccfb81c100d2916dc607614
languageName: node
linkType: hard

"@types/trusted-types@npm:^2.0.7":
version: 2.0.7
resolution: "@types/trusted-types@npm:2.0.7"
Expand Down Expand Up @@ -2007,8 +1990,8 @@ __metadata:
"@types/dompurify": "npm:3.2.0"
"@types/eslint": "npm:9.6.1"
"@types/node": "npm:22.10.2"
"@types/react": "npm:18.3.1"
"@types/react-dom": "npm:18.3.1"
"@types/react": "npm:19.0.1"
"@types/react-dom": "npm:19.0.2"
"@typescript-eslint/parser": "npm:8.18.0"
"@vitejs/plugin-react": "npm:4.3.4"
"@vitest/coverage-v8": "npm:2.1.8"
Expand All @@ -2026,8 +2009,8 @@ __metadata:
marked: "npm:15.0.3"
postcss: "npm:8.4.49"
prettier: "npm:3.4.2"
react: "npm:18.3.1"
react-dom: "npm:18.3.1"
react: "npm:19.0.0"
react-dom: "npm:19.0.0"
react-router-dom: "npm:7.0.2"
tailwindcss: "npm:3.4.16"
typescript: "npm:5.7.2"
Expand Down Expand Up @@ -3108,7 +3091,7 @@ __metadata:
languageName: node
linkType: hard

"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0":
"js-tokens@npm:^4.0.0":
version: 4.0.0
resolution: "js-tokens@npm:4.0.0"
checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed
Expand Down Expand Up @@ -3242,17 +3225,6 @@ __metadata:
languageName: node
linkType: hard

"loose-envify@npm:^1.1.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
dependencies:
js-tokens: "npm:^3.0.0 || ^4.0.0"
bin:
loose-envify: cli.js
checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e
languageName: node
linkType: hard

"loupe@npm:^3.1.0":
version: 3.1.1
resolution: "loupe@npm:3.1.1"
Expand Down Expand Up @@ -3861,15 +3833,14 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:18.3.1":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
"react-dom@npm:19.0.0":
version: 19.0.0
resolution: "react-dom@npm:19.0.0"
dependencies:
loose-envify: "npm:^1.1.0"
scheduler: "npm:^0.23.2"
scheduler: "npm:^0.25.0"
peerDependencies:
react: ^18.3.1
checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
react: ^19.0.0
checksum: 10c0/a36ce7ab507b237ae2759c984cdaad4af4096d8199fb65b3815c16825e5cfeb7293da790a3fc2184b52bfba7ba3ff31c058c01947aff6fd1a3701632aabaa6a9
languageName: node
linkType: hard

Expand Down Expand Up @@ -3910,12 +3881,10 @@ __metadata:
languageName: node
linkType: hard

"react@npm:18.3.1":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
"react@npm:19.0.0":
version: 19.0.0
resolution: "react@npm:19.0.0"
checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471
languageName: node
linkType: hard

Expand Down Expand Up @@ -4135,12 +4104,10 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.2":
version: 0.23.2
resolution: "scheduler@npm:0.23.2"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78
"scheduler@npm:^0.25.0":
version: 0.25.0
resolution: "scheduler@npm:0.25.0"
checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe
languageName: node
linkType: hard

Expand Down

0 comments on commit 322e29c

Please sign in to comment.