Skip to content

fix(bds-tools): 恢复 scanDestOccupancy DRY 入口(修 ootb/release 构建) - #85

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-5f3bc334-24be-452b-86b5-91a5f307cdf3-8464
Jul 27, 2026
Merged

fix(bds-tools): 恢复 scanDestOccupancy DRY 入口(修 ootb/release 构建)#85
Tanya7z merged 2 commits into
mainfrom
cursor/bc-5f3bc334-24be-452b-86b5-91a5f307cdf3-8464

Conversation

@cursor

@cursor cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

main 合入 #80ootb / changeset-release 双挂:bds-toolstsc7 --emitDeclarationOnlyTS2304: Cannot find name 'uuid'|'version'|'name'

根因(BLOCKER · DRY)

#80 抽取 readPackDirOccupancy 后,与 #81(BOM 不再抛)合入冲突解决留下半成品:scanDestOccupancy 声明了 facts,循环体却仍写未声明的 uuid/version/namefacts 恒为 null(类型塌成 never)。

修复

  • scanDestOccupancy 恢复唯一入口:facts = readPackDirOccupancy(dir)(DRY)
  • 注释对齐当前 BOM 契约(不再声称 Utf8BomError 上抛)
  • 补单测:完整 + 残缺 header 占用扫描
  • changeset patch:@sfmc-bds/bds-tools
  • 顺带同步 chore(release): version packages (beta) #84package-lock.json 中 sdk/cli 的 0.2.0-beta.1(lock 仍停留 beta.0)

审查分级

级别 原则 说明
BLOCKER DRY 合入冲突破坏占用事实单入口,构建失败
MINOR LSP 过时 BOM 注释与 #81 契约不符(已改注释)

Test plan

  • npm run build --workspaces --if-present
  • node --test bds-tools/world-packs.test.mjs(15 pass)
  • node --test tools/changeset-release.test.mjs(12 pass)
  • node tools/build-publishable.mjs(8 workspaces ok)
  • CI ootb / changeset-release on this PR
Open in Web View Automation 

#80 合入与 #81 BOM 契约冲突解决时留下半成品:声明了 facts
却仍写未声明的 uuid/version/name,导致 ootb / changeset-release
在 tsc7 --dts 阶段 TS2304 挂掉。恢复 DRY 单入口,并补占用扫描单测;
顺带同步 #84 后 package-lock 中 sdk/cli 的 beta.1 版本。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 26, 2026
保留 #81 扫描不中断契约(try/catch),采用完整+残缺 header 覆盖;
同步 #84 后 package-lock 中 sdk/cli 的 0.2.0-beta.1。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 27, 2026 06:51
@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Tanya7z
Tanya7z merged commit 4ad267d into main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants