Open
chore(npm): sync source and docs to the published @liu_wentao/cptf-* names #58
chore(npm): sync source and docs to the published @liu_wentao/cptf-* names #58
Open
liu_wentaoAdd on 26 days ago
liu_wentao
liu_wentaoCollaborators
26 days ago

Change Type

Change Description

Option A from the naming discussion: align the trunk's package references with the npm reality — the six packages are published as @liu_wentao/cptf-* (0.2.0), and the bare @cptf/* names can never exist on npm (the cptf org/scope is taken). Keeping dead names in source meant every publish required a sed-rename branch and permanent source/registry drift.

What changes (57 files):

  • package.json name/dependencies for all six packages -> @liu_wentao/cptf-framework, cptf-schema, cptf-benchmark, cptf-benchmark-rn, cptf-native-harmony, cptf-plugin-rn
  • All source imports (framework internal imports, benchmark collectors, plugin-rn probes, benchmark-rn components), root script filters, the lazy-scanner test fixture (must match the real package name), READMEs, BUILD docs and the spec/guide docs
  • Architecture svgs that reference the real @cptf/benchmark package
  • Version fields: 0.1.0 -> 0.2.0 (matches the registry version line)
  • nativeharmony oh-package name/version follow
  • CHANGELOG rename-sync entry under today's date

Intentionally unchanged:

  • CHANGELOG history lines (they record the @cptf/* names as they were at the time)
  • detox analysis docs + design-phase svgs whose @cptf/* names are unimplemented placeholders, not references to real packages

Effect: the publish branch no longer needs any renaming step — source and published artifacts are name-identical (zero diff). The published packages live at https://www.npmjs.com/package/@liu_wentao/cptf-framework (all six under the same scope).

Note for maintainers: the @liu_wentao scope is the current npm publishing identity (the cptf org name is unavailable on npm). When a permanent org scope is decided (e.g. @cpf-rn), this rename repeats once — the cptf- prefix on package names is designed to survive that migration unchanged.

Test Steps

Test reference: test case: full verification chain on the renamed graph

  1. pnpm install resolves the renamed graph
  2. schema build + framework build + pnpm typecheck — clean
  3. jest excluding the four upstream-known-broken suites (ws-rpc-client / android-native-driver / harmony-native-driver / ui-comparator, broken on the trunk itself since 3550729) — 271 suites / 6829 passed
  4. Zero @cptf/* six-package references remain outside CHANGELOG history and detox placeholder docs (grepped)
  5. prettier + cspell green over all 57 touched files (37 project-dictionary words added — the docs had never been spell-scanned before)

Test Status

Pre-merge Self-Check

likedislike
Merge blocked
openharmony_ci
openharmony_ciCollaborators
26 days ago Comments:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ciCollaborators
26 days ago Added label: dco检查成功
cpf-manager
cpf-manager26 days agoStart code review2
package.json
Outdated
@@ -15,3 +14,4 @@
14+ "test": "pnpm --filter @liu_wentao/cptf-framework test",
1515 "typecheck": "pnpm -r typecheck",
1616 "clean": "pnpm -r clean",
1717 "pack": "pnpm --filter \"@cptf/*\" run pack",
cpf-manager
cpf-manager26 days agoComments:

【AI-Review】【严重】【基础代码问题】【代码逻辑错误】
● 问题: 根 package.json 第 17 行 pack 脚本仍为 pnpm --filter "@cptf/*" run pack,而本 PR 已将六个包的 name 字段全部由 @cptf/* 改为 @liu_wentao/cptf-*(framework/schema/benchmark/benchmark-rn/native-harmony/plugin-rn,见 packages/*/package.json 与 packages/native-harmony/harmony/nativeharmony/oh-package.json5、packages/benchmark-rn/harmony/benchmarkrn/oh-package.json5)。pnpm 的包名 glob @cptf/* 要求包名以 @cptf/ 开头,而改名后所有包名前缀已是 @liu_wentao/,该过滤器匹配不到任何包。

● 影响: 执行 pnpm run pack 时 pnpm 因无包匹配而跳过所有子包的 pack 脚本,不产出任何 .tgz 产物(如 cptf-framework-0.2.0.tgz、cptf-benchmark-0.2.0.tgz、cptf-benchmark-rn-0.2.0.tgz)。这直接打断 packages/framework/BUILD.md 文档记录的发布打包流程(pnpm run pack → 生成 cptf-framework-{version}.tgz),与本 PR「源码与发布产物零 diff、发布分支不再需要 sed 改名」的目标矛盾——发布流水线在 pack 这一步即中断。同文件第 11–14 行的 build:framework/build:benchmark/dev:framework/test 已同步改为 @liu_wentao/cptf-*,唯独 pack 漏改。

● 建议: 将第 17 行过滤器改为 @liu_wentao/cptf-*,与同文件其余 --filter 脚本保持一致:
"pack": "pnpm --filter \"@liu_wentao/cptf-*\" run pack"

likedislike
System
System MessageSystem
26 days ago Comments:

changed this line on 3c7bc7cc view diff detail

liu_wentaoliu_wentaoCollaborators
26 days ago Force-pushed 1 commits:3c7bc7cc-chore(npm): sync source and docs to the published @liu_wentao/cptf-* names