Skip to content

Commit 864f488

Browse files
committed
build(motion): 装上 gsap 与 @gsap/react
本批唯一一次依赖变更(R2.1 授权):gsap@3.15.0 + @gsap/react@2.1.2(零传递依赖, peer = gsap ^3.12.5 + react >=17,许可 Standard "no charge" license)。 同提交带 G8 改判(必要连带):装包即让 manualChunks.test.ts:272 变红(该行设计如此 —— 实测 1 failed | 108 passed),按它自带的正解把「此刻没有 gsap」改判为「恰是这两个」; 劈开会产出一个测试必红的中间提交(DISPATCH-TEMPLATE §三 通则)。该文件净增行数 = 0。
1 parent b508c5e commit 864f488

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

‎app/package-lock.json‎

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

‎app/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
},
1313
"dependencies": {
1414
"@codemirror/lang-markdown": "^6.5.2",
15+
"@gsap/react": "^2.1.2",
1516
"@tauri-apps/api": "^2",
1617
"@tauri-apps/plugin-dialog": "^2.7.2",
1718
"@types/katex": "^0.16.8",
1819
"@xyflow/react": "^12.11.3",
1920
"codemirror": "^6.0.2",
21+
"gsap": "^3.15.0",
2022
"katex": "^0.18.4",
2123
"react": "^19.1.0",
2224
"react-dom": "^19.1.0",

‎app/src/build/manualChunks.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,16 @@ describe("批 6 预留:GSAP 必须落进独立 chunk(本批不安装 GSAP)
260260
expect(gsap).not.toBe(vendorGroupOf("/r/node_modules/react/index.js"));
261261
});
262262

263-
it("槽位在表里,且 package.json 此刻没有 gsap(两半必须同时成立)", () => {
263+
it("槽位在表里,且 package.json 已装 gsap(两半必须同时成立)", () => {
264264
// 只查 package.json ⇒ 槽位被删也通过;只查表 ⇒ 批 6 装了依赖却没人复核产物也通过。
265265
// devDependencies 也查:本段问的是「gsap 装了没有」,不是「它进不进浏览器产物」。
266266
const pkg = JSON.parse(readFileSync(join(HERE, "..", "..", "package.json"), "utf8")) as {
267267
dependencies?: Record<string, string>;
268268
devDependencies?: Record<string, string>;
269269
};
270270
const all = { ...(pkg.dependencies ?? {}), ...(pkg.devDependencies ?? {}) };
271-
// 批 6 装上后这条会红 ⇒ 去构建一次,核对 vendor-gsap chunk 独立生成且只经 import() 到达。
272-
expect(Object.keys(all).filter((d) => d === "gsap" || d === "@gsap/react")).toEqual([]);
271+
// 批 6 已装上(本行由批 6 按上面那句正解改判):判据从「此刻没有」变成「恰是这两个」。
272+
expect(Object.keys(all).filter((d) => d === "gsap" || d === "@gsap/react").sort()).toEqual(["@gsap/react", "gsap"]);
273273
expect(vendorGroupOf("/r/node_modules/gsap/index.js")).toBe("vendor-gsap");
274274
});
275275

0 commit comments

Comments
 (0)