Skip to content

fix(wf@d52f8b5): 登记 @sfmc-bds/tools 发包 + npm-publish 空 jobs 门控 - #27

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-b9af843a-ee75-4bd3-b7d2-2f95a9e82724-c12f
Jul 22, 2026
Merged

fix(wf@d52f8b5): 登记 @sfmc-bds/tools 发包 + npm-publish 空 jobs 门控#27
Tanya7z merged 2 commits into
mainfrom
cursor/bc-b9af843a-ee75-4bd3-b7d2-2f95a9e82724-c12f

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

背景

workflow npm-publish 在 tag @sfmc-bds/tools@v0.1.0(main@d52f8b5 publish dev tools)失败:

Unknown npm package tag: @sfmc-bds/tools
Known: @sfmc-bds/sdk, @sfmc-bds/cli, @sfmc-bds/db-server, @sfmc-bds/qq-bridge, @sfmc-bds/bds-tools

ootb 同 commit 已绿。

审查结论(DRY / OCP / DIP / LSP / Demeter)

级别 原则 处理
BLOCKER DRY 新增 @sfmc-bds/tools 未写入 NPM_PUBLISH_PACKAGES 权威表 本 PR 登记
BLOCKER DRY tools 未进 root workspaces,即便登记后 npm publish -w 仍会挂 本 PR 加入
BLOCKER OCP/CI inputs.tag required:true → 改 workflow 的 branch push 空 jobs 本 PR:required:false + ref_type==tag(吸收 #25 CI 部分)
MAJOR main: check-ootb.js 不存在;无 build 会让 publish 下一步失败 本 PR:.mjs + noop build;workflow build --if-present
MINOR DRY pack:verify 未含 tools 本 PR 对齐
未改 DIP paths.mjs 仍假定 monorepo 布局(ROOT=../..),npm 安装后需 SFMC_ROOT 留后续
未改 LSP db.tx recorder stub(#25 范围) 仍待设计

修复

  1. tools/lib/npm-publish-packages.mjs 增加 @sfmc-bds/tools
  2. root workspaces + pack:verify 纳入 tools;更新 lock
  3. tools/package.jsonmaincheck-ootb.mjsfileslib,noop build
  4. npm-publish.yml:空 jobs 门控 + build --if-present

验证

PUBLISH_TAG='@sfmc-bds/tools@v0.1.0' node tools/resolve-npm-publish-tag.mjs
# Version OK: @sfmc-bds/tools@0.1.0
npm pack -w @sfmc-bds/tools --dry-run  # 含 lib/*.mjs

合入后操作

关联

Open in Web View Automation 

cursoragent and others added 2 commits July 22, 2026 14:03
npm-publish 在 tag @sfmc-bds/tools@v0.1.0 上因清单未知包失败
(run 29926464473)。补登记、纳入 workspace,并修正 main/files/build。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
- inputs.tag 非 required + ref_type==tag,避免改 workflow 的 branch push 空 jobs
- build 使用 --if-present,兼容无编译步骤的纯 mjs 包

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

cursor Bot commented Jul 22, 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 871d1da into main Jul 22, 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