fix(frontend): 升级 Next→15.5.20 + React 19.2.7 修 RCE/补丁 + 版本下界守卫(CR-C1)

- next/eslint-config-next 15.1.3→15.5.20(backport 安全维护线),react/react-dom 19.0.0→19.2.7
- @types/react(-dom) →^19.2.0;pnpm audit --prod 无 next/react/react-dom 高危/严重告警
- 新增 lib/security/dependencyFloors 守卫 + 回归测试锁定安全下界
- 连带修 useDraftStream.test noUncheckedIndexedAccess(重锁失效增量缓存后暴露,对齐 useReviewStream 既有 ! 约定)
This commit is contained in:
Yaojia Wang
2026-07-08 11:04:55 +02:00
parent baa41d370b
commit f4c2c4e8ec
5 changed files with 390 additions and 280 deletions

View File

@@ -85,7 +85,7 @@ describe("useDraftStream", () => {
await result.current.start("p1", 2, " 写得热血一点 ");
});
const [, init] = fetchMock.mock.calls[0];
const [, init] = fetchMock.mock.calls[0]!;
expect(init.method).toBe("POST");
expect(init.headers["Content-Type"]).toBe("application/json");
expect(JSON.parse(init.body as string)).toEqual({ directive: "写得热血一点" });
@@ -99,7 +99,7 @@ describe("useDraftStream", () => {
await result.current.start("p1", 2, " ");
});
const [, init] = fetchMock.mock.calls[0];
const [, init] = fetchMock.mock.calls[0]!;
expect(init.body).toBeUndefined();
expect(init.headers["Content-Type"]).toBeUndefined();
});