Repository navigation
fix: 修复维护 npm 工具链的托管锁文件生成 - #342
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔵 Needs a closer look
该修复依赖托管 Renovate/Mend 按当前 Node/npm 版本实际合并规则并重建 #341,静态审查和现有 CI 无法替代对锁一致性、产物及 required checks 终态的人工核验。
No open issues 🎉
What changed in this PR
该 PR 修复维护分支 npm 工具链更新无法生成配套锁文件的问题,通过在目标 Renovate 更新规则中启用普通安装,规避 npm 12.2.2 的 --package-lock-only EALLOWREMOTE 错误。
Changes:
- 为维护分支 npm 工具链规则设置
skipInstalls: false。 - 保持更新范围、全局
ignoreScripts: true及其他更新组行为不变。
| File | Description |
|---|---|
| .github/renovate.json | 为维护分支 npm 工具链更新启用普通依赖安装,以支持生成一致的 npm 锁文件。 |
Review effort: Lite
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.
摘要
修复维护 npm 工具链更新在托管端缺少配套锁文件的问题。真实 PR #341 更新两项 npm 声明到 12.2.2,但
npm install --package-lock-only报 EALLOWREMOTE,随后维护 CI 正确拒绝清单与锁不一致。变更原因
npm 12.2.2 在完整 ideal tree 检查 bundled dependencies 时,将 registry 自身 tarball 当作 remote 处理;准确 Node 24.22.0/npm 12.2.2 隔离复现与 Mend job
af5b9cae-0d6a-40ca-b33b-b7bd36b7c4c6一致。官方 npm/cli#9800 已记录 package-lock-only 路径,修复 #9818 当前尚未合并发布。主要改动
仅为现有准确维护 npm 工具组增加
skipInstalls: false,采用 Renovate 官方支持的安装模式,生成锁时运行普通安装。范围保持maintenance/legacy-runtime-e990eda、npm manager、根 package.json、npm 的 packageManager/devDependencies 两字段。关联事项
关联 #324、#341。正式目标 npm 12.2.2 来自实际 registry 与托管发现,不固定旧 major,也不手工填写 #341 的锁来替代托管事务。
验证结果
install --no-audit --ignore-scripts成功,90 项锁变化仅根/npm 子树,根声明与实际包版本均为 12.2.2。npm ci --ignore-scripts --no-audit --no-fund成功。影响分析
普通安装会在该组托管临时目录安装整个锁对应的依赖树,增加下载与磁盘工作。安装脚本仍禁用,npm 默认 allow-remote 限制保持;其他分组、默认分支行为、版本发现和原有限流保持。
发布与迁移
通过最终检查和审查后按中央协调窗口正常采用。随后对既有 #341 通过 Mend 原生重试/重建核查实际结果;人工请求来源单独记录。配置采用不等于 npm 托管事务通过。
回退方式
通过正常 PR 撤回这一属性,恢复原安装策略;原失败事务与检查记录保留。
AI 使用声明
本次由 AI 编程助手在已授权 R1 范围内实施与验证。服务部署、维护版本合并不属于本配置修正操作。
采用后实测结果(2026-11-11)
正常采用为
e6bf505bcb31c8f03ff81ff3852f32f43437bff4,与最终H同tree且签名有效。main Native 42996266360 与自然 Promotion 42998225306 均成功;双规则与受保护来源均为该提交,14条完整保护仅预期两处SHA变化。自动配置消费先复用了原341而未重建;随后09:49:59Z仅对原341发起一次Dashboard原生rebase。真实Mend job
e3c167e1-a3af-4d89-b28a-58c18e10266c使用普通npm install --no-audit --ignore-scripts成功生成锁,新H为74bb70c2366d6488ded5535c0f3df40bffbe9c9c。两声明与锁内两版本均12.2.2,90锁变化仅根/npm子树;required 42998689222 全部成功,1964pass/10skip,config/dist通过。新H按既有仅失败时发布策略未产生artifacts状态,不冒称该状态显式green;直接生成日志、锁差异与required提供成功证据。旧失败H及检查保留。配置修正与真实托管事务核查完成;#340/#341均未合并,服务未部署。本轮按用户要求完成记录并停止。