Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0e38e6

Browse files
Copilotd10c
andauthored
Upgrade React to v19.2.3 (and fix type errors in useRef hooks) (#4237)
* Initial plan* Merge React 19 upgrade from dependabot branchCo-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Fix React 19 useRef type errors and eslint configCo-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Upgrade react-dom to 19.2.3 to match react versionCo-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Restore correct package versions (revert unintended downgrades from dependabot merge)Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Security fix: Update glob to 11.1.0 to address command injection vulnerabilityCo-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Upgrade React to 19.2.3 and fix useRef type errors- Upgrade react and react-dom from 18.3.1 to 19.2.3- Upgrade @types/react and @types/react-dom to 19.2.3 (matching versions)- Fix useRef hooks to include explicit initial values (React 19 requirement)- Update ref prop types to handle React 19's stricter null handling- Fix eslint config for reactHooks.configs compatibilityCo-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Fix eslint config: restore .flat accessor for reactHooks.configsThe previous change removed the .flat accessor which caused ESLint to usethe old eslintrc format config (with plugins as array of strings) insteadof the flat config format (with plugins as object). This led to CI failures.Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>* Use caret (^) prefix for React package versionsUpdated react, react-dom, @types/react, and @types/react-dom to use"^19.2.3" instead of "19.2.3" to match the convention used by otherdependencies in the project.Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>---------Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
1 parent44529e4 commita0e38e6

File tree

10 files changed

+47
-51
lines changed

10 files changed

+47
-51
lines changed

‎extensions/ql-vscode/package-lock.json‎

Lines changed: 30 additions & 38 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎extensions/ql-vscode/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,8 +2080,8 @@
20802080
"nanoid":"^5.0.7",
20812081
"p-queue":"^8.0.1",
20822082
"proper-lockfile":"^4.1.2",
2083-
"react":"^18.3.1",
2084-
"react-dom":"^18.3.1",
2083+
"react":"^19.2.3",
2084+
"react-dom":"^19.2.3",
20852085
"semver":"^7.6.2",
20862086
"source-map":"^0.7.6",
20872087
"source-map-support":"^0.5.21",
@@ -2135,8 +2135,8 @@
21352135
"@types/js-yaml":"^4.0.6",
21362136
"@types/node":"22.19.*",
21372137
"@types/proper-lockfile":"^4.1.4",
2138-
"@types/react":"^18.3.12",
2139-
"@types/react-dom":"^18.3.1",
2138+
"@types/react":"^19.2.3",
2139+
"@types/react-dom":"^19.2.3",
21402140
"@types/sarif":"^2.1.2",
21412141
"@types/semver":"^7.5.8",
21422142
"@types/stream-json":"^1.7.1",

‎extensions/ql-vscode/src/view/model-alerts/ModelAlertsResults.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const ModelAlertsResults = ({
7979
[modelAlerts.model],
8080
);
8181

82-
constref=useRef<HTMLElement>();
82+
constref=useRef<HTMLElement|undefined>(undefined);
8383

8484
useEffect(()=>{
8585
if(

‎extensions/ql-vscode/src/view/model-editor/MethodRow.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export type MethodRowProps = {
8585
exportconstMethodRow=(props:MethodRowProps)=>{
8686
const{ method, methodCanBeModeled, revealedMethodSignature}=props;
8787

88-
constref=useRef<HTMLElement>();
88+
constref=useRef<HTMLElement|undefined>(undefined);
8989

9090
useEffect(()=>{
9191
if(method.signature===revealedMethodSignature){

‎extensions/ql-vscode/src/view/results/AlertTablePathNodeRow.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface Props {
1818
pathIndex:number;
1919
resultIndex:number;
2020
selectedItem:undefined|ResultKey;
21-
selectedItemRef:React.RefObject<HTMLTableRowElement>;
21+
selectedItemRef:React.RefObject<HTMLTableRowElement|null>;
2222
databaseUri:string;
2323
sourceLocationPrefix:string;
2424
run?:Run;

‎extensions/ql-vscode/src/view/results/AlertTablePathRow.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface Props {
1919
resultIndex:number;
2020
currentPathExpanded:boolean;
2121
selectedItem:undefined|ResultKey;
22-
selectedItemRef:React.RefObject<HTMLTableRowElement>;
22+
selectedItemRef:React.RefObject<HTMLTableRowElement|null>;
2323
databaseUri:string;
2424
sourceLocationPrefix:string;
2525
run?:Run;

‎extensions/ql-vscode/src/view/results/AlertTableResultRow.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface Props {
2020
resultIndex:number;
2121
expanded:Set<string>;
2222
selectedItem:undefined|ResultKey;
23-
selectedItemRef:React.RefObject<HTMLTableRowElement>;
23+
selectedItemRef:React.RefObject<HTMLTableRowElement|null>;
2424
databaseUri:string;
2525
sourceLocationPrefix:string;
2626
run?:Run;

‎extensions/ql-vscode/src/view/results/__tests__/AlertTablePathRow.spec.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { createMockResults } from "../../../../test/factories/results/mockresult
55

66
describe(AlertTablePathRow.name,()=>{
77
constrender=(props?:Props)=>{
8-
constmockRef={current:null}asReact.RefObject<HTMLTableRowElement>;
8+
constmockRef={
9+
current:null,
10+
}asReact.RefObject<HTMLTableRowElement|null>;
911
constresults=createMockResults();
1012
constthreadFlow=results[0]?.codeFlows?.[0]?.threadFlows?.[0];
1113

‎extensions/ql-vscode/src/view/results/__tests__/AlertTableResultRow.spec.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { createMockResults } from "../../../../test/factories/results/mockresult
55

66
describe(AlertTableResultRow.name,()=>{
77
constrender=(props?:Props)=>{
8-
constmockRef={current:null}asReact.RefObject<HTMLTableRowElement>;
8+
constmockRef={
9+
current:null,
10+
}asReact.RefObject<HTMLTableRowElement|null>;
911
constresults=createMockResults();
1012

1113
reactRender(

‎extensions/ql-vscode/src/view/results/useScrollIntoView.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
importtype{RefObject}from"react";
22
import{useEffect}from"react";
33

4-
exportfunctionuseScrollIntoView<T>(
4+
exportfunctionuseScrollIntoView<T,EextendsHTMLElement=HTMLElement>(
55
selectedElement:T|undefined,
6-
selectedElementRef:RefObject<HTMLElement>,
6+
selectedElementRef:RefObject<E|null>,
77
){
88
useEffect(()=>{
99
constelement=selectedElementRef.current;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp