chore: 迁移到 pnpm 并更新打包与测试文档

- 用 pnpm 替换 npm,锁定 pnpm@10.33.0,删除 package-lock.json 相关说明
- package.json 将渲染层依赖移入 devDependencies,减小 app.asar 体积
- 新增 electron:smoke 冒烟脚本与 icon 生成脚本
- win 平台设置 AppUserModelID,修复任务栏图标归组
- 清理 tsBuildInfoFile 输出路径至 node_modules/.tmp
- 更新测试断言以匹配画幅遮罩、取景器缩放与模型库外部资产行为
- README 与打包指南补充 pnpm、镜像与常见问题说明
This commit is contained in:
2026-09-16 20:03:57 +08:00
parent 2ad176be4e
commit b9fd289caf
27 changed files with 5538 additions and 8452 deletions

View File

@@ -193,7 +193,7 @@ it("clamps a camera keyframe time to duration", () => {
- [ ] **Step 2: 跑测试确认失败**
Run: `npm test -- src/editor/schema/timeline.test.ts`
Run: `pnpm test -- src/editor/schema/timeline.test.ts`
Expected: FAIL,报错找不到 `./timeline` 模块。
- [ ] **Step 3: 写实现 `timeline.ts`**
@@ -434,7 +434,7 @@ export function updateCameraKeyframeValue(timeline: Timeline, cameraId: string,
- [ ] **Step 4: 跑测试确认通过**
Run: `npm test -- src/editor/schema/timeline.test.ts`
Run: `pnpm test -- src/editor/schema/timeline.test.ts`
Expected: PASS(全部用例)。
- [ ] **Step 5: 提交(按约定跳过 git)**
@@ -620,7 +620,7 @@ it("replaceProject migrates a legacy v1 project into a v2 project with a timelin
- [ ] **Step 5: 跑测试确认通过**
Run: `npm test -- src/editor/store/directorStore.test.ts`
Run: `pnpm test -- src/editor/store/directorStore.test.ts`
Expected: PASS(含新增 migration 用例 + 既有用例不被破坏)。
- [ ] **Step 6: 提交(按约定跳过 git)**
@@ -740,7 +740,7 @@ it("setTimelineDuration updates the timeline duration", () => {
- [ ] **Step 3: 跑测试确认失败**
Run: `npm test -- src/editor/store/directorStore.test.ts`
Run: `pnpm test -- src/editor/store/directorStore.test.ts`
Expected: FAIL(actions 未定义)。
- [ ] **Step 4: 实现 actions**
@@ -850,7 +850,7 @@ Expected: FAIL(actions 未定义)。
- [ ] **Step 5: 跑测试确认通过**
Run: `npm test -- src/editor/store/directorStore.test.ts`
Run: `pnpm test -- src/editor/store/directorStore.test.ts`
Expected: PASS。
- [ ] **Step 6: 提交(按约定跳过 git)**
@@ -914,7 +914,7 @@ it("setDuration keeps a positive minimum", () => {
- [ ] **Step 2: 跑测试确认失败**
Run: `npm test -- src/editor/runtime/playbackStore.test.ts`
Run: `pnpm test -- src/editor/runtime/playbackStore.test.ts`
Expected: FAIL(找不到模块)。
- [ ] **Step 3: 写实现**
@@ -960,7 +960,7 @@ export const usePlaybackStore = create<PlaybackState>((set, get) => ({
- [ ] **Step 4: 跑测试确认通过**
Run: `npm test -- src/editor/runtime/playbackStore.test.ts`
Run: `pnpm test -- src/editor/runtime/playbackStore.test.ts`
Expected: PASS。
- [ ] **Step 5: 提交(按约定跳过 git)**
@@ -1091,7 +1091,7 @@ import { PlaybackFrameDriver } from "../runtime/PlaybackFrameDriver";
- [ ] **Step 5: 构建 + 类型检查**
Run: `npm run build`
Run: `pnpm run build`
Expected: 构建通过(tsc -b 无类型错误,vite build 成功)。
- [ ] **Step 6: 提交(按约定跳过 git)**
@@ -1195,7 +1195,7 @@ import { ActiveCameraPlaybackSync } from "../runtime/ActiveCameraPlaybackSync";
- [ ] **Step 4: 构建 + 类型检查**
Run: `npm run build`
Run: `pnpm run build`
Expected: 通过。
- [ ] **Step 5: 提交(按约定跳过 git)**
@@ -1300,7 +1300,7 @@ it("deletes a selected keyframe", () => {
- [ ] **Step 2: 跑测试确认失败**
Run: `npm test -- src/editor/panels/TimelinePanel.test.tsx`
Run: `pnpm test -- src/editor/panels/TimelinePanel.test.tsx`
Expected: FAIL(组件不存在)。
- [ ] **Step 3: 写实现 `TimelinePanel.tsx`**
@@ -1549,7 +1549,7 @@ export function TimelinePanel() {
- [ ] **Step 5: 跑测试确认通过**
Run: `npm test -- src/editor/panels/TimelinePanel.test.tsx`
Run: `pnpm test -- src/editor/panels/TimelinePanel.test.tsx`
Expected: PASS。
- [ ] **Step 6: 提交(按约定跳过 git)**
@@ -1592,15 +1592,15 @@ import { TimelinePanel } from "../../editor/panels/TimelinePanel";
- [ ] **Step 2: 全量测试**
Run: `npm test`
Run: `pnpm test`
Expected: PASS(含原有用例 + 新增用例)。原有 8 个失败用例(模型库面板/画幅命中区/个别姿势/样式断言)若仍失败,**保持原状不算回归**——记录一下新旧失败数即可。
- [ ] **Step 3: 生产构建**
Run: `npm run build`
Run: `pnpm run build`
Expected: 通过(tsc + vite build)。
- [ ] **Step 4: 手测清单(`npm run dev`,浏览器 `http://127.0.0.1:5173/`)**
- [ ] **Step 4: 手测清单(`pnpm run dev`,浏览器 `http://127.0.0.1:5173/`)**
**物体关键帧:**
1. 底部出现时间轴面板,显示「播放」按钮和 `0.0s / 5.0s`。