Skip to content

fix(one): 入库目录包名对齐 dsh-harness-one(修市场 npm 字段关联) - #96

Merged
chumingjun merged 1 commit into
mainfrom
fix/entry-package-name
Aug 30, 2026
Merged

chumingjun merged 1 commit into
mainfrom
fix/entry-package-name

Conversation

@chumingjun

Copy link
Copy Markdown
Owner

背景

awesome 清单 CI(probe-npm)从投稿条目子目录的 package.json 抓 name 作为市场 npm 字段,并校验该 npm 包的 repository 与条目 url 关联。

入库目录 dsh-plugins/dsh-ccpg-one/package.json 的 name 仍是停更老包 dsh-ccpg-one(npm 停在 0.4.1,repository 还是改名前的 harness-one)。保持现状的后果:

  1. 市场安装命令指向停更老包,用户装不到当前版本
  2. probe-npm 的 repository 匹配失败,npm 字段被判 null,条目降级为 GitHub-only

改动

  • dsh-plugins/dsh-ccpg-one/package.json:name/bin 改为 dsh-harness-one
  • bin/install.js:PKG 常量与提示文案同步
  • test/install.test.mjs:断言同步

目录名不动(git 路径与 awesome 条目 url 已对齐维护者要求);脚本全部按路径读该 package.json(version/sidebar 依赖),无按 name 的模块解析;assemble-one.sh 产物的 name 本就独立硬编码 dsh-harness-one。

验证

  • npm test 全量 48 套通过(含改后的 install 3 组)
  • sh dsh-plugins/build-web.sh 双构建通过
  • sh dsh-plugins/assemble-one.sh --check 装配校验通过

awesome 清单的 probe-npm 从条目子目录 package.json 抓 name 作为市场
npm 字段,并要求 npm 包的 repository 与仓库 url 双向关联。入库目录
dsh-ccpg-one 的 name 仍是停更老包 dsh-ccpg-one(npm 停在 0.4.1,
repository 还是改名前的 harness-one),抓取会得到错误关联:
- 装的将是停更老包而非 dsh-harness-one
- repository 匹配失败时 npm 字段直接判 null(GitHub-only 条目)

改入库目录 package.json name/bin 为 dsh-harness-one(脚本全部按路径
引用该文件读 version/依赖,无按 name 解析的运行时依赖;装配产物
name 本就独立硬编码 dsh-harness-one,不受影响)。install.js 的 PKG
常量与提示文案、install.test.mjs 断言同步。
@chumingjun
chumingjun merged commit e35387c into main Aug 30, 2026
1 check passed
@chumingjun
chumingjun deleted the fix/entry-package-name branch August 30, 2026 10:46
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.

1 participant