fix: push@72e24e7 SOLID 审查 — ootb npm install + registry/unzip 契约对齐#18
Closed
cursor[bot] wants to merge 2 commits into
Closed
fix: push@72e24e7 SOLID 审查 — ootb npm install + registry/unzip 契约对齐#18cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
ootb 在 Install root deps 因 package-lock 仍链接已删除的 modules/packages/* 而崩溃(extraneous)。同步 afk workspace, 并将 fetch-module 所需的 jszip 写入 devDependencies。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
- sfmc registry 与 fetch-module 共用 index.modules 解析契约(LSP/DRY) - unzip 归一化 Windows \\,避免 Linux 目录布局错乱(LSP) - catalog/check-modules 复用 folderFromEntryPath(DRY/Demeter) - 修复 module-commands dirSize 未 await 导致体积统计恒为 0 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Contributor
Author
There was a problem hiding this comment.
审查摘要(push e6525bb + 72e24e7)
结论:ootb 仍红;本 PR 已给可合并补丁。
BLOCKER
- DRY —
package-lock.json仍 link 已删 packages →npm installextraneous(run 29897268620) - LSP —
sfmc/src/registry.ts未解析{ modules: … },与fetch-module/ 真实 index.json 契约不一致 - LSP —
unzip未归一化\\,Linux 安装布局错乱
MAJOR
- DRY / Demeter — folder 解析重复且 check-modules 用脆弱
split('/')[2] - DIP — 动态
import('jszip')但未声明依赖
MINOR
dirSize未 await → 体积统计恒 0
本地验证:check-ootb 10/10、smoke-modules 通过。
#15/#16 基于旧 tools 树,已被本 PR supersede,建议关闭。
Sent by Cursor Automation: SFMC-Review
cursor Bot
pushed a commit
that referenced
this pull request
Jul 22, 2026
合并并行审查 #18 的补充:单一 parseRegistryIndex 源、fetch-module 显式依赖 jszip, 以及 module-commands dirSize 未 await 导致体积恒 0。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Member
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.


Summary
main push
e6525bb(fix tools)+72e24e7(lodash 挪入 deps)后 ootb 仍红(run 29897268620):Install root deps→Cannot read properties of undefined (reading 'extraneous')。本 PR 在最新 main 上直接给出可合并补丁(#15/#16 基于旧 tools/.js 树,已被 e6525bb ESM 重写 supersede,请优先合本 PR)。
根因与修复
package-lock.json仍link已删modules/packages/{daily-task,economy,…}afkworkspacesfmc/src/registry.ts把 index 当扁平 map;真实契约是{ modules: {…} }(fetch-module 已正确)parseRegistryIndex+ tools/registry-index.mjs对齐unzip未归一化 Windows\\\\→/后再 joinfolderFromEntry在 catalog 与 packages 重复;check-modules 用split('/')[2]folderFromEntryPathfetch-module动态import('jszip')但未声明依赖jszipdirSize未await walk→ 体积恒 0验证
npm install --no-audit --no-fund✅npm run build --workspaces --if-present✅node tools/check-ootb.mjs→ 10/10 ✅node tools/smoke-modules.mjs(含 feature-afk 启停翻转)✅不在本 PR