From e9b94954b719b4fbf57f0940e31f4552b77473e8 Mon Sep 17 00:00:00 2001 From: Samran Asif Date: Tue, 15 Sep 2026 12:59:21 +0500 Subject: [PATCH] chore(deps): react and react-dom to 19.3.0, together Dependabot proposed these as two pull requests -- `react` in one, `react-dom` in the other. React refuses to run when the two disagree: Error: Incompatible React versions: the "react" and "react-dom" packages must have the exact same version. so each pull request failed six frontend suites on its own, and neither could ever go green alone. They are the same upgrade and land as one commit, with `@types/react` and `@types/react-dom` moved to match. The entry chunk grew 29,273 B on this upgrade alone -- 214,558 to 243,831 -- with no source change, which put it over the 220,000 B budget. The structural half of `check-bundle.mjs` was checked first, because that is the failure the budget exists to catch: all six page groups are still separate chunks, so nothing leaked into the shell and the growth really is React. The budget moves to 260,000. The comment beside it argued against exactly that number, and was right to at the time: it assumed an un-split build weighed about 240 kB. The check derives that figure from the build rather than remembering it, and it is now 301,858 B, so 260,000 sits 42 kB below the point where this check would stop being able to tell a split build from an un-split one. The comment is rewritten rather than left contradicting the constant. --- web/package-lock.json | 44 ++++++++++++++++++------------------ web/package.json | 8 +++---- web/scripts/check-bundle.mjs | 24 ++++++++++++++------ 3 files changed, 43 insertions(+), 33 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 159e367..b610c9f 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -8,15 +8,15 @@ "name": "api-verity-lab-web", "version": "0.1.0", "dependencies": { - "react": "19.2.8", - "react-dom": "19.2.8" + "react": "19.3.0", + "react-dom": "19.3.0" }, "devDependencies": { "@eslint/js": "^10.0.1", "@testing-library/jest-dom": "^7.0.1", "@testing-library/react": "^16.3.3", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.7", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.1", "eslint": "^10.9.1", "jsdom": "^30.0.1", @@ -967,9 +967,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "19.2.18", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", - "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", "dev": true, "license": "MIT", "dependencies": { @@ -977,13 +977,13 @@ } }, "node_modules/@types/react-dom": { - "version": "19.2.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.7.tgz", - "integrity": "sha512-I8bPpDLcHBv1qiIiXDCy71Rt8eQDKJP0sMSWJphDdAcdqiJ1sGpZamavoEIRZmYzjia9LuEb2HlYdDpmoENpvQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", "dev": true, "license": "MIT", "peerDependencies": { - "@types/react": "^19.2.0" + "@types/react": "^19.3.0" } }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -2655,24 +2655,24 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", - "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", + "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", - "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", "license": "MIT", "dependencies": { - "scheduler": "^0.27.0" + "scheduler": "^0.28.0" }, "peerDependencies": { - "react": "^19.2.8" + "react": "^19.3.0" } }, "node_modules/react-is": { @@ -2755,9 +2755,9 @@ } }, "node_modules/scheduler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", "license": "MIT" }, "node_modules/semver": { diff --git a/web/package.json b/web/package.json index 36fa12f..49523ff 100644 --- a/web/package.json +++ b/web/package.json @@ -12,15 +12,15 @@ "check:bundle": "node scripts/check-bundle.mjs" }, "dependencies": { - "react": "19.2.8", - "react-dom": "19.2.8" + "react": "19.3.0", + "react-dom": "19.3.0" }, "devDependencies": { "@eslint/js": "^10.0.1", "@testing-library/jest-dom": "^7.0.1", "@testing-library/react": "^16.3.3", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.7", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.1", "eslint": "^10.9.1", "jsdom": "^30.0.1", diff --git a/web/scripts/check-bundle.mjs b/web/scripts/check-bundle.mjs index 9bac938..bf3633e 100644 --- a/web/scripts/check-bundle.mjs +++ b/web/scripts/check-bundle.mjs @@ -17,14 +17,24 @@ const GROUPS = ['overview', 'contract', 'testing', 'runtime', 'agents', 'team'] /* Headroom over the measured entry chunk: enough that ordinary feature work * does not trip it, tight enough that an un-split build does. * - * Raised once, from 210,000, when the agent-governance page group took the + * Raised from 210,000 to 220,000 when the agent-governance page group took the * entry to 205.7 kB and left 4 kB of room -- less than one feature. The plan - * that called for this raise proposed 260,000, and that number would have - * been a mistake: an un-split build of this app is around 240 kB, so a - * 260,000 budget would pass the exact failure the check exists to catch. The - * assertion below now derives that ceiling from the build itself rather than - * trusting either number. */ -const ENTRY_BUDGET_BYTES = 220_000 + * behind that raise proposed 260,000, and at the time that would have been a + * mistake: an un-split build then weighed about 240 kB, so a 260,000 budget + * would have passed the exact failure this check exists to catch. + * + * Raised again to 260,000 for React 19.3.0, which added 29,273 B to the entry + * on its own (214,558 -> 243,831 B) with no source change. The number that was + * wrong before is right now, and only because the app grew: the assertion + * below derives the un-split weight from the build rather than from memory, + * and it is 301,858 B. So 260,000 still sits 42 kB under the point where this + * check would stop being able to tell a split build from an un-split one, and + * leaves ~16 kB for ordinary work. + * + * That derived assertion is the one that matters. If a future raise pushes + * this constant up to meet it, the answer is not a bigger number -- it is that + * the shell has started carrying page code. */ +const ENTRY_BUDGET_BYTES = 260_000 let files try {