ci: 接入 check-links 与 pangu 检查,z 迁移至 astro/zod - #48
Merged
Merged
Conversation
两个脚本此前只存在于仓库中、从未被任何 CI 步骤调用,站内死链与中英空格完全依赖人工记得执行。check-links 尤其具备完整的退出码语义与 --json 输出,本就是为 CI 设计的。 - Check internal links 排在 build 之后:脚本只读 dist/ 做文件系统真值判断,不做服务器端路由猜测;已有断链按 KNOWN_PREEXISTING_DEAD 登记为非阻塞,其余一律 BLOCKING 直接挂掉 PR。 - Check CJK-Latin spacing 只读 src/ 与 content/,不依赖产物。 cyber.mdx 第 282、289 行有 3 处中英未加空格,此前就在 main 上;新检查接入后会立即挂 CI,故在同一次提交内修掉。
astro:content 对 z 的 re-export 已标记 deprecated 并计划移除(见 astro 包的类型声明)。改用官方 ./zod 入口后,本文件贡献的 13 条 ts(6385) 弃用 hint 全部消除,构建产物 55 页不变。
.playwright/(22 张调试截图,约 5MB)与 .mimosa/(79 个运行时审计 ledger,约 0.5MB)此前未被忽略,一次 git add -A 就会把 5MB 截图提交进仓库。
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep GitHub App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



背景
对仓库做了一次状态盘点,发现三处可以低成本收口的问题,本 PR 一并处理。
改动
1. CI 接入两个已有检查(
3d63f3f)scripts/check-links.mjs与scripts/check-pangu.mjs此前从未被任何 CI 步骤调用 —— 站内死链与中英空格完全依赖人工记得执行。check-links尤其具备完整的退出码语义与--json输出,本就是为 CI 设计的。新增两个 step(排在
pnpm build之后):dist/做文件系统真值判断,不做服务器端路由猜测。已有断链按KNOWN_PREEXISTING_DEAD登记为非阻塞,其余一律BLOCKING直接挂掉 PR。src/与content/,不依赖产物。同一次提交里修掉了
cyber.mdx第 282、289 行的 3 处中英未加空格 —— 这些违规此前就在main上,新检查接入后会立即挂 CI。2.
z迁移到官方入口(b22db08)astro:content对z的 re-export 已标记 deprecated 并计划移除。改用astro/zod后,本文件贡献的 13 条ts(6385)弃用 hint 全部消除,构建产物 55 页不变。3. gitignore 忽略本地工具产物(
e017038).playwright/(22 张调试截图,约 5MB)与.mimosa/(79 个运行时审计 ledger,约 0.5MB)此前未被忽略,一次git add -A就会把 5MB 截图提交进仓库。本地验证
pnpm buildpnpm checkpnpm lintpnpm pangucheck-links说明
check-links.mjs:71未使用参数ts(6133),改动前就存在,与本次无关,非阻塞,故未一并处理。