Skip to content

Commit 66e0857

Browse files
deps: bump the react-deps group across 1 directory with 3 updates (#518)
* deps: bump the react-deps group across 1 directory with 3 updates Bumps the react-deps group with 3 updates in the / directory: [react](https://github.com/facebook/react/tree/HEAD/packages/react), [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom). Updates `react` from 18.3.1 to 19.0.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react) Updates `@types/react` from 18.3.14 to 19.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Updates `react-dom` from 18.3.1 to 19.0.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react-dom) Updates `@types/react` from 18.3.14 to 19.0.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: react dependency-type: direct:production update-type: version-update:semver-major dependency-group: react-deps - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-major dependency-group: react-deps - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-major dependency-group: react-deps - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-major dependency-group: react-deps ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix react types after dep update * chore: package-lock.json update after reset * chore: fix package-lock.json --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Russell Dempsey <[email protected]>
1 parent d72a0a7 commit 66e0857

19 files changed

+451
-457
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"ipfs-css": "^1.4.0",
6464
"libp2p": "^2.3.1",
6565
"multiformats": "^13.3.1",
66-
"react": "^18.3.0",
67-
"react-dom": "^18.3.1",
66+
"react": "^19.0.0",
67+
"react-dom": "^19.0.0",
6868
"tachyons": "^4.12.0"
6969
},
7070
"devDependencies": {
@@ -73,7 +73,7 @@
7373
"@babel/preset-react": "^7.25.9",
7474
"@babel/preset-typescript": "^7.26.0",
7575
"@playwright/test": "^1.48.2",
76-
"@types/react": "^18.3.0",
76+
"@types/react": "^19.0.1",
7777
"aegir": "^45.0.8",
7878
"cross-env": "^7.0.3",
7979
"esbuild": "^0.24.0",

src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { RouteContext } from './context/router-context.jsx'
33
import { checkSubdomainSupport } from './lib/check-subdomain-support.js'
44
import './app.css'
55

6-
function App (): JSX.Element {
6+
function App (): React.ReactElement {
77
const { currentRoute } = React.useContext(RouteContext)
88

99
useEffect(() => {

src/components/About.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react'
1+
import React, { type ReactElement } from 'react'
22

3-
export default function About (): JSX.Element {
3+
export default function About (): ReactElement {
44
return (
55
<aside className='mw7 lb-snow center w-100 lh-copy pa2 e2e-section-about'>
66
<h1 className='pa0 f3 ma0 mb4 teal tc'>About the IPFS Gateway and Service Worker</h1>

src/components/Form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react'
1+
import React, { type ReactElement } from 'react'
22

3-
export default ({ handleSubmit, requestPath, setRequestPath }): JSX.Element => (
3+
export default ({ handleSubmit, requestPath, setRequestPath }): ReactElement => (
44
<form id='add-file' onSubmit={handleSubmit}>
55
<label htmlFor='inputContent' className='f5 ma0 pb2 teal fw4 db'>CID, Content Path, or URL</label>
66
<input

src/components/collapsible.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react'
1+
import React, { useState, type ReactElement } from 'react'
22

33
export interface CollapsibleProps {
44
children: React.ReactNode
@@ -7,7 +7,7 @@ export interface CollapsibleProps {
77
collapsed: boolean
88
}
99

10-
export function Collapsible ({ children, collapsedLabel, expandedLabel, collapsed }: CollapsibleProps): JSX.Element {
10+
export function Collapsible ({ children, collapsedLabel, expandedLabel, collapsed }: CollapsibleProps): ReactElement {
1111
const [cId] = useState(Math.random().toString(36).substring(7))
1212
const [isCollapsed, setCollapsed] = useState(collapsed)
1313

src/components/input-validator.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { CID } from 'multiformats/cid'
2-
import React from 'react'
2+
import React, { type ReactElement } from 'react'
33
import { nativeProtocolRegex, pathRegex, subdomainRegex, type IpfsUriParts } from '../lib/regex.js'
44

5-
function FormatHelp (): React.JSX.Element {
5+
function FormatHelp (): ReactElement {
66
return (
77
<>
88
<p>Invalid address, correct it and try again. For reference, accepted formats are:</p>
@@ -27,8 +27,8 @@ function FormatHelp (): React.JSX.Element {
2727
)
2828
}
2929

30-
function ValidationMessage ({ cidOrPeerIdOrDnslink, requestPath, protocol, children }): React.JSX.Element {
31-
let errorElement: React.JSX.Element | null = null
30+
function ValidationMessage ({ cidOrPeerIdOrDnslink, requestPath, protocol, children }): ReactElement {
31+
let errorElement: ReactElement | null = null
3232
if (requestPath == null || requestPath === '') {
3333
errorElement = <span><big className="f3"></big> Enter a valid IPFS/IPNS content path.</span>
3434
} else if (protocol !== 'ipfs' && protocol !== 'ipns') {
@@ -73,7 +73,7 @@ const parseInput = (uri: string): Partial<IpfsUriParts> => {
7373
return {}
7474
}
7575

76-
export default function InputValidator ({ requestPath }: { requestPath: string }): React.JSX.Element {
76+
export default function InputValidator ({ requestPath }: { requestPath: string }): ReactElement {
7777
const { protocol, cidOrPeerIdOrDnslink, path } = parseInput(requestPath)
7878
const swPath = `/${protocol}/${cidOrPeerIdOrDnslink}${path ?? ''}`
7979

src/components/sw-ready-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React, { useContext, useMemo } from 'react'
22
import { ServiceWorkerContext } from '../context/service-worker-context.jsx'
3-
type ButtonProps = JSX.IntrinsicElements['button']
3+
type ButtonProps = React.JSX.IntrinsicElements['button']
44

55
interface ServiceWorkerReadyButtonProps extends ButtonProps {
66
label: string
77
waitingLabel?: string
88
}
99

10-
export const ServiceWorkerReadyButton = ({ className, label, waitingLabel, ...props }: ServiceWorkerReadyButtonProps): JSX.Element => {
10+
export const ServiceWorkerReadyButton: React.FC<ServiceWorkerReadyButtonProps> = ({ className, label, waitingLabel, ...props }) => {
1111
const { isServiceWorkerRegistered } = useContext(ServiceWorkerContext)
1212

1313
const buttonClasses = new Set(['button-reset', 'pv3', 'tc', 'bn', 'white', 'cursor-disabled', 'bg-gray'])

src/components/textarea-input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback, useEffect, useState } from 'react'
1+
import React, { useCallback, useEffect, useState, type ReactElement } from 'react'
22
import { InputDescription } from './input-description.js'
33
import { InputLabel } from './input-label.js'
44

@@ -13,7 +13,7 @@ export interface InputProps extends Omit<React.DetailedHTMLProps<React.HTMLAttri
1313
onChange(value: string): void
1414
}
1515

16-
export default ({ resetKey, onChange, label, placeholder, validationFn, value, description, preSaveFormat, ...props }: InputProps): JSX.Element => {
16+
export default ({ resetKey, onChange, label, placeholder, validationFn, value, description, preSaveFormat, ...props }: InputProps): ReactElement => {
1717
const [internalValue, setInternalValue] = useState(value)
1818
const [error, setError] = useState<null | Error>(null)
1919

src/context/config-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { createContext, useCallback, useEffect, useState } from 'react'
1+
import React, { createContext, useCallback, useEffect, useState, type ReactElement } from 'react'
22
import { defaultDebug, defaultDnsJsonResolvers, defaultEnableGatewayProviders, defaultEnableRecursiveGateways, defaultEnableWebTransport, defaultEnableWss, defaultGateways, defaultRouters, defaultSupportsSubdomains, getConfig, resetConfig, type ConfigDb } from '../lib/config-db.js'
33
import { getUiComponentLogger } from '../lib/logger.js'
44
import type { ComponentLogger } from '@libp2p/logger'
@@ -24,7 +24,7 @@ export const ConfigContext = createContext<ConfigContextType>({
2424
_supportsSubdomains: defaultSupportsSubdomains
2525
})
2626

27-
export const ConfigProvider = ({ children }: { children: JSX.Element[] | JSX.Element, expanded?: boolean }): JSX.Element => {
27+
export const ConfigProvider: React.FC<{ children: ReactElement[] | ReactElement, expanded?: boolean }> = ({ children }) => {
2828
const [gateways, setGateways] = useState<string[]>(defaultGateways)
2929
const [routers, setRouters] = useState<string[]>(defaultRouters)
3030
const [dnsJsonResolvers, setDnsJsonResolvers] = useState<Record<string, string>>(defaultDnsJsonResolvers)

0 commit comments

Comments
 (0)