Skip to content

Commit aa0291e

Browse files
authored
fix: align react-dom with react so the app mounts (#18)
A Dependabot bump moved react to 19.2.8 while react-dom stayed on 19.2.7. React 19 refuses to render a mismatched pair: the published 1.4.3 build threw "Minified React error #527" at mount and showed a blank page. Nothing in the pipeline caught it. The unit tests never mount through react-dom, `tsc --noEmit` and `vite build` both succeed, and the published bundle byte-matched its source, so every existing check passed on a broken app. Align react-dom to 19.2.8 and add a test that compares the versions the bundle actually resolves, not the declared ranges. Verified by mutation: pinning react-dom back to 19.2.7 fails the new test. The rebuilt app renders with no console errors.
1 parent d24d109 commit aa0291e

3 files changed

Lines changed: 29 additions & 9 deletions

File tree

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chibihub",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"private": true,
55
"license": "0BSD",
66
"description": "A QDN app for Qortium: ChibiHub.",
@@ -19,7 +19,7 @@
1919
"@fontsource/lexend": "^5.2.11",
2020
"@vitejs/plugin-react": "^6.0.4",
2121
"react": "^19.2.8",
22-
"react-dom": "^19.2.7",
22+
"react-dom": "^19.2.8",
2323
"typescript": "^6.0.3",
2424
"vite": "^8.1.5"
2525
},

src/reactVersionAlignment.test.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { version as reactVersion } from 'react';
2+
import { version as reactDomVersion } from 'react-dom';
3+
import { describe, expect, it } from 'vitest';
4+
5+
/**
6+
* React 19 refuses to render when `react` and `react-dom` resolve to different
7+
* versions: it throws "Minified React error #527" at mount and the app shows a
8+
* blank page. Nothing else in this suite catches that — the unit tests never
9+
* mount through react-dom, and both `tsc` and `vite build` succeed.
10+
*
11+
* It happened for real: a Dependabot bump moved `react` to 19.2.8 while
12+
* `react-dom` stayed on 19.2.7, and the published app rendered nothing. These
13+
* are the versions the bundle actually resolves, not the declared ranges.
14+
*/
15+
describe('react and react-dom stay on the same version', () => {
16+
it('resolves both packages to one version', () => {
17+
expect(reactVersion).toBeTruthy();
18+
expect(reactDomVersion).toBe(reactVersion);
19+
});
20+
});

0 commit comments

Comments
 (0)