Skip to content

清理冗余的 extension 级 TypeScript 配置 - #140

Merged
tt-a1i merged 3 commits into
openpi-dev:mainfrom
sunsunsun-java:codex/issue-131-remove-extension-tsconfigs
Aug 26, 2026
Merged

tt-a1i merged 3 commits into
openpi-dev:mainfrom
sunsunsun-java:codex/issue-131-remove-extension-tsconfigs

Conversation

@sunsunsun-java

Copy link
Copy Markdown
Contributor

变更说明

  • 删除现存的 15 个 extension-level tsconfig.json
  • 保持根目录 tsconfig.json 为所有 extension 的唯一 TypeScript 项目配置
  • 更新 README,明确单独类型检查使用根目录的 bun run typecheck
  • 更新 background-terminals 和 subagents 的设计文档,移除局部 TypeScript 项目约定
  • 保留 npm package 中的排除规则,防止未来误加的局部配置进入发布包

验证

  • bun run check 通过
  • bun run test 通过:Node 测试 900 项、Vitest 测试 30 项
  • 根 TypeScript 项目覆盖磁盘上的全部 239/239 个 extension .ts 文件
  • npm pack --dry-run --ignore-scripts --json 通过,发布内容不包含 extension-level tsconfig.json
  • 使用 VS Code 1.121.0 自带的 TypeScript 6.0.3 tsserver 验证:
    • 打开 extension 文件时正确识别根 tsconfig.json
    • 加载全部 239 个 TypeScript 文件,配置诊断为空
    • 跨 extension/shared import 的定义解析和跳转正常

兼容性

未文档化的 tsc -p extensions/<name> 局部检查方式将不再可用。编辑器项目会统一为根项目;实测冷加载约 1.7 秒,未发现解析或导航异常。

Closes #131

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体清理方向正确。当前 main 合并态下,根 TypeScript 项目覆盖全部 238 个 extension .ts 文件,bun run check、完整测试和 package dry-run 均通过,也没有发现脚本或 CI 依赖局部 tsconfig.json。

有一处文档遗漏请补上:extensions/subagents/docs/design-plan.md 约 515–518 行的 current-state Notes 仍写着 “extension-level TypeScript scope remains in tsconfig.json”。本 PR 合并后只剩根 tsconfig.json,这会与 README 和新合同直接冲突;请同步改成依赖及 TypeScript project scope 都由根配置拥有。

除此之外没有发现其他问题。

@sunsunsun-java
sunsunsun-java force-pushed the codex/issue-131-remove-extension-tsconfigs branch from 0b00b8d to 702b9d2 Compare August 25, 2026 10:39
@sunsunsun-java

Copy link
Copy Markdown
Contributor Author

已按 review 意见更新:

  • 修正 extensions/subagents/docs/design-plan.md 的旧描述,明确依赖由根 package.json、TypeScript project scope 由根 tsconfig.json 统一拥有
  • 分支已 rebase 到最新 upstream/main
  • bun run check 通过
  • bun run test 通过:Node 880 项、Vitest 30 项
  • 根 TypeScript 项目覆盖全部 238/238 个 extension .ts 文件
  • npm package dry-run 通过

对应提交:702b9d2

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这版我按 #131 的验收条件重新核过了,可以合并。

  • 删除 extension 级配置后,根 TypeScript 项目仍精确覆盖 extensions 下 236/236 个 .ts 文件,没有遗漏
  • 与当前 main 本地合并无冲突
  • bun run check 通过
  • bun run test 复跑后 873 个 Node 测试和 30 个 Vitest 测试全部通过;首次全量运行中有一条 watchdog 时序用例抖动,目标用例随后连续 4 次通过,确认与本 PR 无关
  • npm pack --dry-run 的发布清单中没有 extension 级 tsconfig

没有发现阻塞问题,Approved。

@tt-a1i
tt-a1i merged commit dd82010 into openpi-dev:main Aug 26, 2026
2 checks passed
@sunsunsun-java
sunsunsun-java deleted the codex/issue-131-remove-extension-tsconfigs branch August 26, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: 删除冗余的 extension-level tsconfig.json

2 participants