build(types): ENG-04 add strict projects and legacy compiler checks

This commit is contained in:
Harvey Zhao committed 2026-09-10 21:21:39 +08:00
1 parent 09902b8b8c
commit 771482426f
22 files changed
+346 -49

No files matched your search

+2 -1
View File
@@ -6,7 +6,7 @@
1. 切换到 .node-version 指定的 Node,安装 Yarn 1.22.22;例如 `npm install --global yarn@1.22.22`,然后确认 `node --version` 和 `yarn --version`。npm 仅可用于安装 Yarn 工具及消费者兼容检查,不用于维护本仓库依赖锁。
2. 干净 checkout 执行 `yarn install --frozen-lockfile --non-interactive`,禁止 CI 自动更新锁或忽略安装脚本/engines。参见 [Yarn Classic install](https://classic.yarnpkg.com/en/docs/cli/install/)。
3. 执行 `yarn check:toolchain --strict`,核对实际 Node/Yarn、19 个固定开发工具和 22 个 workspace 的声明及传递依赖锁条目。普通检查允许满足最低工具要求的 Node,同时打印标准版本。
3. 执行 `yarn check:toolchain --strict`,核对实际 Node/Yarn、20 个固定开发工具和 22 个 workspace 的声明及传递依赖锁条目。普通检查允许满足最低工具要求的 Node,同时打印标准版本。
4. 执行 `yarn test:playback`、`yarn test:dash-control`、`yarn build all` 和 `yarn workspace artplayer-vitepress build`。ENG-02 已拆分只读 lint 与 lint:fix;PR/主线入口和独立 Pages 流程见 ci-setup.md。
私有根包最低 Node 为 ^20.19.0 || >=22.12.0,与原本使用的 Vite 7 一致。本轮验证 Node 24.21.0,其他版本矩阵由 CI-01 接续,不能宣称所有最低环境已经通过。
@@ -14,6 +14,7 @@
## 锁文件和依赖维护
- 根构建工具固定精确版本并放在 devDependencies;发布包的 dependencies/peer 范围保持原样。
- ENG-04 新增 typescript-compat(npm:typescript@4.3.5)作为旧编译器消费探针;源码继续使用 typescript 5.9.3。精确 npm alias 也由锁检查保护;实际覆盖与命令见 [类型检查说明](typechecking.md)。
- 添加根开发依赖使用 `yarn add --dev --exact --ignore-workspace-root-check <name>@<version>`,包级依赖使用 `yarn workspace <name> add ...`;运行依赖升级需要独立兼容证据。
- manifest 和 yarn.lock 同次提交;不提交 package-lock.json、bun.lock 或第二份安装锁。旧 npm 锁及验证报告保留于 ENG-01 Git 历史,原本地 Yarn 锁也已在忽略缓存中备份。
- 新增 @yarnpkg/lockfile 1.1.0 为显式开发依赖,供检查器使用 Yarn 官方锁解析器;不依赖 Lerna 偶然安装的传递依赖。只验证 registry 依赖图及完整性字段,实际下载完整性由 Yarn 安装验证;peer 兼容仍由消费者测试和安装报告验证。