Skip to content

Commit 118798a

Browse files
committed
web: Upgrade react types, remove some resolutions
1 parent 4e520ab commit 118798a

File tree

6 files changed

+196
-167
lines changed

6 files changed

+196
-167
lines changed

web/package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
"next": "^15.2.4",
6060
"next-useragent": "^2.8.0",
6161
"node-sql-parser": "^4.17.0",
62-
"react": "^19.0.0",
62+
"react": "^19.1.1",
6363
"react-ace": "^14.0.1",
6464
"react-copy-to-clipboard": "^5.1.0",
6565
"react-data-grid": "7.0.0-beta.44",
6666
"react-diff-viewer": "^3.1.1",
67-
"react-dom": "^19.0.0",
67+
"react-dom": "^19.1.1",
6868
"react-infinite-scroller": "^1.2.6",
6969
"react-timeago": "^8.0.0",
7070
"reactflow": "^11.11.4",
@@ -95,7 +95,7 @@
9595
"@types/node": "^22.5.2",
9696
"@types/react": "^19.0.10",
9797
"@types/react-copy-to-clipboard": "^5.0.6",
98-
"@types/react-dom": "^19.0.4",
98+
"@types/react-dom": "^19.1.7",
9999
"@types/react-infinite-scroller": "^1.2.3",
100100
"@types/react-timeago": "^4.1.4",
101101
"@types/url-parse": "^1",
@@ -129,8 +129,8 @@
129129
"postcss": "^8.4.49",
130130
"postcss-preset-env": "^10.2.4",
131131
"prettier": "^3.5.3",
132-
"react": "^19.0.0",
133-
"react-dom": "^19.0.0",
132+
"react": "^19.1.1",
133+
"react-dom": "^19.1.1",
134134
"react-select-event": "^5.5.1",
135135
"rimraf": "^6.0.1",
136136
"stylelint": "^16.15.0",
@@ -142,10 +142,8 @@
142142
"yalc": "^1.0.0-pre.53"
143143
},
144144
"resolutions": {
145-
"@babel/runtime": "7.26.10",
146-
"@types/react": "18.3.5",
145+
"@babel/runtime@npm:7.26.0": "7.26.10",
147146
"brace-expansion": "2.0.2",
148-
"tmp": "0.2.4",
149-
"webpack": "5.94.0"
147+
"tmp": "0.2.4"
150148
}
151149
}

web/renderer/components/util/KeyNav/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useFocus, useReactiveWidth } from "@dolthub/react-hooks";
2-
import { ReactHTML, ReactNode, createElement } from "react";
2+
import { ReactNode, createElement } from "react";
33

44
type Props = {
55
children: ReactNode;
66
id?: string;
77
className?: string;
8-
tag?: keyof ReactHTML;
8+
tag?: keyof JSX.IntrinsicElements;
99
onScroll?: () => void;
1010
mobileBreakpoint?: number;
1111
};
@@ -29,7 +29,7 @@ const KeyNav = ({
2929
</DesktopNav>
3030
);
3131
}
32-
return createElement(tag, { className, onScroll, id }, children);
32+
return createElement(tag as string, { className, onScroll, id }, children);
3333
};
3434

3535
export default KeyNav;
@@ -38,14 +38,14 @@ type DesktopProps = {
3838
children: ReactNode;
3939
id: string;
4040
className?: string;
41-
tag: keyof ReactHTML;
41+
tag: keyof JSX.IntrinsicElements;
4242
onScroll?: () => void;
4343
};
4444

4545
function DesktopNav({ children, id, className, tag, onScroll }: DesktopProps) {
4646
useFocus(id);
4747
return createElement(
48-
tag,
48+
tag as string,
4949
{ id, onScroll, className, tabIndex: -1 },
5050
children,
5151
);

web/renderer/components/util/NotDoltWrapper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function NotDoltWrapper(props: Props) {
3232
);
3333
}
3434
if (res.disableDoltFeature) {
35-
return React.cloneElement(props.children, { doltDisabled: true });
35+
return React.cloneElement(props.children, { doltDisabled: true } as any);
3636
}
3737
return <div />;
3838
}

web/renderer/react-types.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/// <reference types="react" />
2+
/// <reference types="react-dom" />
3+
4+
// Global JSX namespace for React 19 compatibility
5+
import * as React from 'react';
6+
7+
declare global {
8+
namespace JSX {
9+
interface Element extends React.ReactElement<any, any> { }
10+
interface ElementClass extends React.Component<any> {
11+
render(): React.ReactNode;
12+
}
13+
interface ElementAttributesProperty { props: {}; }
14+
interface ElementChildrenAttribute { children: {}; }
15+
interface IntrinsicAttributes extends React.Attributes { }
16+
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
17+
interface IntrinsicElements {
18+
[elemName: string]: any;
19+
}
20+
}
21+
}

web/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "jest.setup.ts"],
2+
"include": ["renderer/next-env.d.ts", "renderer/react-types.d.ts", "**/*.ts", "**/*.tsx", "jest.setup.ts"],
33
"compilerOptions": {
44
"downlevelIteration": true,
55
"incremental": true,
6-
"types": ["node"],
6+
"skipLibCheck": true,
7+
"types": ["node", "react", "react-dom"],
78
"baseUrl": ".",
89
"target": "es5",
910
"lib": ["dom", "dom.iterable", "esnext"],
1011
"allowJs": true,
11-
"skipLibCheck": true,
1212
"strict": true,
1313
"forceConsistentCasingInFileNames": true,
1414
"noEmit": true,

0 commit comments

Comments
 (0)