Skip to content

Commit 8402852

Browse files
⬆️ chore(deps): raise React to 19.2.8 and keep a single copy resolved
React Router 8 requires React >=19.2.7, so this lands the bump on its own ahead of that upgrade. packages/ui and packages/frontend declare a deliberately broad '>=18.0.0' React peer. With autoInstallPeers those resolve independently of the root dependency, so moving only the root left a second React installed beside it and every hook in the ui suite threw "Invalid hook call". Pin react and react-dom in the workspace overrides so one copy is shared; they now move in step with package.json. The matching @types/react bump rejects the `event.target as HTMLInputElement` casts in the two deployment target pickers: PMCheckbox spreads onChange onto Chakra's Root <label>, so the event is typed against the label even though it bubbles from the hidden input. Cast through unknown to keep the runtime behaviour untouched, with a comment recording why the cast is needed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 5c79b05 commit 8402852

5 files changed

Lines changed: 194 additions & 178 deletions

File tree

apps/frontend/src/domain/deployments/components/RemovePackageFromTargets/RemovePackageFromTargetsBody.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ export const RemovePackageFromTargetsBodyImpl: React.FC = () => {
133133
borderColor="border.tertiary"
134134
width="full"
135135
onChange={(event) => {
136-
const input = event.target as HTMLInputElement;
136+
// PMCheckbox spreads onChange onto Chakra's Root <label>, so the
137+
// event is typed against the label while it actually bubbles up
138+
// from the hidden <input> inside it.
139+
const input = event.target as unknown as HTMLInputElement;
137140
handleCheckboxChange(target.id, input.checked);
138141
}}
139142
_checked={{ bg: 'blue.900', borderColor: 'blue.500' }}

apps/frontend/src/domain/deployments/components/RunDistribution/RunDistributionBody.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ export const RunDistributionBodyImpl: React.FC = () => {
208208
borderColor={'border.tertiary'}
209209
width="full"
210210
onChange={(event) => {
211-
const input = event.target as HTMLInputElement;
211+
// PMCheckbox spreads onChange onto Chakra's Root <label>, so the
212+
// event is typed against the label while it actually bubbles up
213+
// from the hidden <input> inside it.
214+
const input = event.target as unknown as HTMLInputElement;
212215
handleCheckboxChange(target.id, input.checked);
213216
}}
214217
_checked={{ bg: 'blue.900', borderColor: 'blue.500' }}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"@types/jsonwebtoken": "^9.0.10",
6767
"@types/node": "20.19.9",
6868
"@types/nprogress": "^0.2.3",
69-
"@types/react": "19.0.0",
70-
"@types/react-dom": "19.0.0",
69+
"@types/react": "19.2.18",
70+
"@types/react-dom": "19.2.4",
7171
"@types/semver": "^7.7.1",
7272
"@types/slug": "^5.0.9",
7373
"@types/uuid": "^10.0.0",
@@ -180,8 +180,8 @@
180180
"open": "^11.0.0",
181181
"openai": "^6.9.0",
182182
"pg": "^8.16.3",
183-
"react": "19.0.0",
184-
"react-dom": "19.0.0",
183+
"react": "19.2.8",
184+
"react-dom": "19.2.8",
185185
"react-icons": "^5.5.0",
186186
"react-router": "7.18.2",
187187
"reflect-metadata": "^0.1.13",

0 commit comments

Comments
 (0)