Repository navigation
chore(dependabot): 用 scope 通配忽略宿主包 - #31
Merged
Merged
Conversation
`ignore` 的 `dependency-name` 支持 `*`(零或多个字符),把 12 条逐包条目收敛成 `@earendil-works/*` 与 `@deepseek-ai/*`。两个 scope 都是宿主提供包(见 docs/guides/dependencies.md 与 check:host-deps 的 scope 判定),新增包时不会再冒出 必须连带改源码的自动 PR。 现有忽略集合不变:pi-memory 的 3 个 devDependency(精确 1.5.0)与 dsh-memory 的 9 个 devDependency(cordis 4.1.0,其余 0.2.2-rc.1)仍全部被覆盖;docs/guides/dependencies.md 的「依赖自动更新」一节本来就写的是通配形式,本次让配置与文档一致。
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.
动机
.github/dependabot.yml的ignore逐条列出了 3 个@earendil-works/*与 9 个@deepseek-ai/*包。两个 scope 都是宿主提供包(pi 由宿主在运行时提供;dsh 包在dsh-memory只以import type出现在src/host-types.ts),且都精确钉死版本:升级必然连带改源码与测试,必须是一次独立变更,不能被自动 PR 代替决策。逐条枚举的代价是新增宿主包时容易漏写,漏写就会冒出一个必然红 CI 的 PR。
dependency-name支持*(匹配零或多个字符,见 GitHub「Dependabot options reference」的ignore/dependency-name),因此按 scope 收敛。变更
.github/dependabot.yml:ignore从 12 条逐包条目收敛为 2 条 scope 通配:@yandy0725/memory-core(workspace 内依赖)保持原样。等价性核对
pi-memorydevDependencies 恰为 3 个@earendil-works/*,均精确1.5.0;注释「三个 devDependency 精确钉死 1.5.0」仍成立。dsh-memorydevDependencies 恰为 9 个@deepseek-ai/*,cordis=4.1.0、其余 =0.2.2-rc.1(精确版本);注释「九个包…精确钉死」仍成立。scripts/check-host-deps.mjs本来就按@deepseek-ai/前缀识别宿主包、HOST_PROVIDED_PACKAGES也全是@earendil-works/*,整 scope 忽略与本仓约定一致。验证
yamlDocument 解析)。version: 2、两个updates条目的package-ecosystem/directory/schedule.interval齐备且取值合法,groups标识符与update-types合法,ignore条目仅含dependency-name。行为变化(刻意)
ignore对版本更新与安全更新同时生效。改动后凡属这两个 scope 的包都被忽略,包括未来新增的非宿主包——若真把某包当普通依赖引入,Dependabot 会静默不管,边界由npm run check:host-deps的宿主包约定守住。docs/guides/dependencies.md「依赖自动更新」一节已写为@earendil-works/*、@deepseek-ai/*,本次让配置与文档一致,无需改文档。