Skip to content

fix(pack-update): 修复 ootb TS2353 + defaultBindingEnabled 契约(含 #62) - #63

Merged
Tanya7z merged 1 commit into
mainfrom
cursor/bc-ba59f16d-8548-4285-9e82-c35299430588-e665
Jul 24, 2026
Merged

fix(pack-update): 修复 ootb TS2353 + defaultBindingEnabled 契约(含 #62)#63
Tanya7z merged 1 commit into
mainfrom
cursor/bc-ba59f16d-8548-4285-9e82-c35299430588-e665

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

背景

main@b52e487(移除 SEA)合入时顺带加入 defaultBindingEnabled,但未写入 PackUpdateConfig 类型、也未接线绑定创建。ootb run 30091402964Build all workspaces 失败:

src/pack-update/config.ts(16,3): error TS2353: Object literal may only specify known properties, and 'defaultBindingEnabled' does not exist in type 'PackUpdateConfig'.

同时开放的 #62(顶层 match / provider 分派)与该变更在 pack-update.json / config.ts 冲突;本 PR 一并 rebase 合入,避免双轨。

审查(原则标注)

级别 原则 问题
BLOCKER LSP / 契约 DEFAULTS.defaultBindingEnabled 不在类型上 → CI 红
MAJOR LSP / DRY makeBindingFromHit 硬编码 enabled: true,与配置默认 false 及 i18n {enabled} 不一致
MAJOR OCP / DIP / Demeter match 仍挂在 providers.curseforge#62
MAJOR OCP / LSP createPackSourceProvider 忽略 binding.provider#62
MINOR DRY 删除无用 getProviderarchivePathstagingDir;清掉 SEA 拆除后残留的 jsonc-parser / @types/cli-progress

改动

  1. PackUpdateConfig.defaultBindingEnabled + 新建绑定走该默认;重绑保留原 enabled
  2. bindOk 传入 {enabled}(on/off)
  3. match 顶层化 + 兼容旧嵌套;createPackSourceProvider(cfg, id) exhaustive switch
  4. defaults / 文档同步;lockfile 清理

验证

  • npm run typecheck -w @sfmc-bds/cli
  • npm test -w @sfmc-bds/cli(12 pass)
  • npm test -w @sfmc-bds/bds-tools(21 pass)
  • 隔离 SFMC_ROOT:旧嵌套 match 提升 + defaultBindingEnabled 默认 false

说明

合入后可关闭 #62(内容已包含)。SEA 拆除本身审查通过,无额外代码残留(IS_SEA / build-sea / release.yml 已清)。

Open in Web View Automation 

ootb@b52e487 在 cli 声明发出阶段失败:DEFAULTS 写了 defaultBindingEnabled
但 PackUpdateConfig 未声明(TS2353)。同时补齐绑定写入接线,并合入
审查 #62 的 match 顶层化与按 binding.provider 分派。

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

cursor Bot commented Jul 24, 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 c9a58ea into main Jul 24, 2026
1 check passed
cursor Bot pushed a commit that referenced this pull request Jul 24, 2026
baff02a 合并 #63 与「修复更新相关内容」后,字段说明表同时保留了
顶层 match.* 与旧版裸 nameMinScore/stripFolderTags,以及两份
defaultBindingEnabled。收敛为单一权威描述。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
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