Skip to content

feat: 发版基建——npm 包改名 tinyui-*,manifest 记产物路径,publish.yml - #11

Merged
HarlonWang merged 2 commits into
mainfrom
feat/release-0.1.0
Sep 18, 2026
Merged

HarlonWang merged 2 commits into
mainfrom
feat/release-0.1.0

Conversation

@HarlonWang

@HarlonWang HarlonWang commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

背景

准备 tinyui 0.1.0 首发。npm scope @tiny-ui 自 2017 年起归他人(@tiny-ui/components),@tinyui 也被占,裸 tinyui 触 npm 仿冒规则(与 tiny-ui 过近)。定为无 scope 的 tinyui-core / tinyui-native / tinyui-cli。

改动

  • 改名:三个 npm 包与引擎里的运行时模块名同步改;docs / sample / 测试全部跟上;docs/README.md 命名表改为实际可用的包名
  • manifest 加 files:模块名 → 产物路径(runtime/core、pages/home),Kotlin BuildManifest.file(name) 读;宿主定位 .bin / .js.map 不再各自复制"去前缀"逻辑(sample 已改,TrendingAI 的 TinyUIHost 随其 catalog bump 一起改)
  • catalog quickjs-kmp 0.1.0 → 0.1.1(已发 Central)
  • 版本 npm 三包 0.1.0,与 Maven / git tag 同号
  • publish.yml:tag [0-9]+.[0-9]+.[0-9]+* 触发,host 测试 + apiCheck → publishAndReleaseToMavenCentral → GitHub Release;npm 由维护者本机发。ios.yml 的 tag 模式从 v* 对齐到同一模式
  • README 加「安装」节

验证

  • pnpm build && pnpm schema:check && pnpm typecheck && pnpm test:core 41 / native 4 / cli 23 全过
  • ./gradlew :compose:testAndroidHostTest :compose:apiCheck :sample:androidApp:assembleDebug 绿;apiDump 已更新(BuildManifest 构造器与 file())

🤖 Generated with Claude Code

Sourcery 摘要

通过采用可用的 npm 包名称、让构建产物可通过 manifest 发现,以及添加发布工作流支持,为 TinyUI 0.1.0 版本发布做准备。

新功能:

  • 添加发布自动化流程,用于验证主机和 API 表面、发布 Maven 产物,并为版本标签创建 GitHub Releases。
  • 在构建 manifest 中记录每个已构建模块的输出路径,以便主机端统一查找产物和 source map。
  • 编写安装文档,并为初始的 0.1.0 版本统一 package、Maven 和 Git 标签版本。

Bug 修复:

  • 更新 engine、CLI、示例、schemas、测试和文档中的 runtime module 与 package 引用,改用可用的无 scope tinyui-* 名称。

改进:

  • 将 npm 包及对应的 runtime module 标识符重命名为 tinyui-core、tinyui-native 和 tinyui-cli。
  • 将 quickjs-kmp 升级到 0.1.1,并使 iOS 和发布工作流与数字版本标签保持一致。

CI:

  • 添加由标签触发的 Maven 发布和 GitHub Release 自动化流程,包括主机测试和 API 检查。

文档:

  • 更新面向用户的包命名、安装指南以及针对新包名称的 runtime/build 文档。

测试:

  • 更新并扩展构建和主机测试,以验证重命名后的模块和 manifest 文件映射。
Original summary in English

Sourcery 摘要

为项目的 0.1.0 版本发布做好准备,包括使用可用的 npm 包名称、基于清单的构件发现以及发布自动化。

新功能:

  • 在清单中记录每个已构建模块的输出路径,以便主机端一致地发现构件和源映射文件。
  • 添加由标签触发的 Maven 发布、验证和 GitHub Release 自动化。
  • 为首次发布的 0.1.0 版本提供安装指南。

Bug 修复:

  • 将引擎、CLI、示例、架构、测试和文档中不可用的作用域 npm 包引用替换为受支持的包名称。

增强功能:

  • 将 npm 包和运行时模块标识符重命名为 tinyui-core、tinyui-native 和 tinyui-cli。
  • 将 npm、Maven 和 git 标签版本统一为 0.1.0,并将 quickjs-kmp 升级到 0.1.1。

CI:

  • 将 iOS 发布标签与数字版本标签统一,并添加发布验证和发布工作流。

部署:

  • 针对版本标签自动执行 Maven Central 发布和 GitHub Release 创建,同时保留本地 npm 发布。

文档:

  • 更新 0.1.0 版本的包命名、运行时/构建文档和安装说明。

测试:

  • 更新构建测试和主机测试,以覆盖重命名后的模块和清单文件映射。
Original summary in English

Summary by Sourcery

Prepare the project for its 0.1.0 release with usable npm package names, manifest-based artifact discovery, and release automation.

New Features:

  • Record each built module’s output path in the manifest for consistent host-side artifact and source-map discovery.
  • Add tag-triggered Maven publishing, validation, and GitHub Release automation.
  • Provide installation guidance for the initial 0.1.0 release.

Bug Fixes:

  • Replace unavailable scoped npm package references throughout the engine, CLI, samples, schemas, tests, and documentation with the supported package names.

Enhancements:

  • Rename the npm packages and runtime module identifiers to tinyui-core, tinyui-native, and tinyui-cli.
  • Align npm, Maven, and git-tag versions at 0.1.0 and upgrade quickjs-kmp to 0.1.1.

CI:

  • Align iOS release tags with numeric version tags and add release validation and publishing workflow.

Deployment:

  • Automate Maven Central publishing and GitHub Release creation for version tags while retaining local npm publishing.

Documentation:

  • Update package naming, runtime/build documentation, and installation instructions for the 0.1.0 release.

Tests:

  • Update build and host tests to cover the renamed modules and manifest file mappings.

… 记产物路径,publish.yml

`@tiny-ui` scope 2017 年起归他人(`@tiny-ui/components`),`@tinyui` 也被占,裸 `tinyui` 触 npm 仿冒规则;
改为无 scope 的 `tinyui-*`,引擎里的运行时模块名同步改。运行时模块名与产物文件名(runtime/core、
runtime/native)不再靠去前缀推导,`manifest.json` 加 `files` 记每个模块的产物路径,Kotlin 侧
`BuildManifest.file(name)` 读,sample 与宿主不再各自复制映射。

- catalog quickjs-kmp 0.1.0 → 0.1.1(真机需要的字节码注册修复)
- npm 三包版本 0.1.0,与 Maven / git tag 同号
- publish.yml:tag 触发,跑 host 测试 + apiCheck 后发 Maven Central 并建 GitHub Release;ios.yml 的 tag 模式对齐
- README 加安装节;docs/README.md 命名表改为实际可用的包名

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @HarlonWang, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 10 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7d2de32c-bbad-461f-b385-d8ef07bdf5c1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown

审查者指南

本 PR 为 TinyUI 0.1.0 首发完成发布基建:统一三个 npm 包及引擎模块名为 tinyui-core/native/cli,manifest 新增模块产物路径并由 Kotlin 宿主统一读取,同时升级 quickjs-kmp、对齐版本 tag,并新增 Maven Central 自动发布与 GitHub Release workflow;npm 仍由维护者本机发布。

基于 manifest 加载产物的时序图

sequenceDiagram
    participant CLI as tinyui-cli
    participant Manifest as manifest.json
    participant Host as Kotlin host
    participant Engine as QuickJS engine

    CLI->>Manifest: build() writes files mapping
    Host->>Manifest: BuildManifest.parse(json)
    Host->>Manifest: file(module)
    Manifest-->>Host: runtime/core or pages/home
    Host->>Host: read .bin and .js.map
    Host->>Engine: registerModule(runtime bundle)
    Host->>Engine: runBytecode(page bundle)
Loading

由 tag 触发的 Maven 发布时序图

sequenceDiagram
    participant Maintainer as Maintainer
    participant GitHub as GitHub Actions
    participant QuickJS as quickjs-kmp
    participant Tests as Host tests and apiCheck
    participant Maven as Maven Central
    participant Release as GitHub Release

    Maintainer->>GitHub: push version tag
    GitHub->>QuickJS: buildHostTools and buildNativeHostJni
    GitHub->>Tests: run Gradle verification
    Tests-->>GitHub: checks pass
    GitHub->>Maven: publishAndReleaseToMavenCentral
    GitHub->>Release: gh release create
Loading

文件级变更

变更 详情 文件
将 npm 包名及引擎运行时模块名统一迁移到无 scope 的 tinyui-* 命名,并同步所有构建、类型、示例、测试和文档引用。
  • 三包版本统一为 0.1.0,更新 workspace 依赖、源码 import、JSX 类型入口和 schema 生成默认值。
  • Kotlin PageHost、测试及 manifest 相关模块注册/导入全部使用新模块名。
  • README、设计文档、sample 与生成链说明同步更新安装方式和命名表。
packages/core/package.json
packages/native/package.json
packages/cli/package.json
packages/cli/src/bin.ts
packages/cli/src/build.ts
packages/cli/src/schema/generate.ts
packages/core/src/internal.ts
packages/core/src/jsx-runtime.ts
packages/native/src/*.ts
sample/js/package.json
sample/js/src/pages/*.tsx
sample/js/tsconfig.json
schema/components/*.ts
schema/package.json
compose/src/commonMain/kotlin/wang/harlon/tinyui/PageHost.kt
compose/src/commonMain/kotlin/wang/harlon/tinyui/BuildManifest.kt
compose/src/*Test/**/*.kt
README.md
docs/*.md
docs/*.html
扩展构建 manifest 以记录模块到产物路径的映射,并让宿主通过统一 API 定位字节码和 source map。
  • CLI 在 manifest.files 中写入运行时和页面模块的无扩展产物路径。
  • BuildManifest 新增 files 字段及 file(module) 查询方法,并更新序列化解析与 API dump。
  • sample 和相关宿主逻辑移除按包名前缀推导路径的重复实现。
  • CLI 测试覆盖 files 映射及新运行时产物布局。
packages/cli/src/build.ts
packages/cli/test/build.test.ts
compose/src/commonMain/kotlin/wang/harlon/tinyui/BuildManifest.kt
compose/api/compose.klib.api
sample/shared/src/commonMain/kotlin/wang/harlon/tinyui/sample/App.kt
compose/src/androidHostTest/kotlin/wang/harlon/tinyui/BundleSmokeTest.kt
升级 quickjs-kmp 依赖以支持首发版本,并建立基于版本 tag 的 Maven 发布与 GitHub Release 流程。
  • catalog 将 quickjs-kmp 从 0.1.0 升级到 0.1.1。
  • 新增 publish workflow,在数字版本 tag 上执行 host 测试、apiCheck、Maven Central 发布和 GitHub Release 创建。
  • iOS workflow 的 tag 触发模式与发布流程统一。
  • npm 包明确保留为维护者本机发布,并在 README 提供安装说明。
gradle/libs.versions.toml
.github/workflows/publish.yml
.github/workflows/ios.yml
README.md

提示与命令

与 Sourcery 交互

  • 触发新的审查: 在 pull request 中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 根据审查评论生成 GitHub issue: 回复审查评论,请 Sourcery 根据该评论创建 issue。你也可以回复审查评论 @sourcery-ai issue,根据该评论创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title,随时(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文中任意位置写入 @sourcery-ai summary,即可在指定位置随时生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary,随时(重新)生成摘要。
  • 生成审查者指南: 在 pull request 中评论 @sourcery-ai guide,即可随时(重新)生成审查者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这个功能会很有用。
  • 忽略所有 Sourcery 审查: 在 pull request 中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审查。如果你想从头开始新的审查,这个功能尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义使用体验

访问你的控制面板,你可以:

  • 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审查者指南等。
  • 更改审查语言。
  • 添加、删除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English

Reviewer's Guide

本 PR 为 TinyUI 0.1.0 首发完成发布基建:统一三个 npm 包及引擎模块名为 tinyui-core/native/cli,manifest 新增模块产物路径并由 Kotlin 宿主统一读取,同时升级 quickjs-kmp、对齐版本 tag,并新增 Maven Central 自动发布与 GitHub Release workflow;npm 仍由维护者本机发布。

Sequence diagram for manifest-based artifact loading

sequenceDiagram
    participant CLI as tinyui-cli
    participant Manifest as manifest.json
    participant Host as Kotlin host
    participant Engine as QuickJS engine

    CLI->>Manifest: build() writes files mapping
    Host->>Manifest: BuildManifest.parse(json)
    Host->>Manifest: file(module)
    Manifest-->>Host: runtime/core or pages/home
    Host->>Host: read .bin and .js.map
    Host->>Engine: registerModule(runtime bundle)
    Host->>Engine: runBytecode(page bundle)
Loading

Sequence diagram for tag-triggered Maven publishing

sequenceDiagram
    participant Maintainer as Maintainer
    participant GitHub as GitHub Actions
    participant QuickJS as quickjs-kmp
    participant Tests as Host tests and apiCheck
    participant Maven as Maven Central
    participant Release as GitHub Release

    Maintainer->>GitHub: push version tag
    GitHub->>QuickJS: buildHostTools and buildNativeHostJni
    GitHub->>Tests: run Gradle verification
    Tests-->>GitHub: checks pass
    GitHub->>Maven: publishAndReleaseToMavenCentral
    GitHub->>Release: gh release create
Loading

File-Level Changes

Change Details Files
将 npm 包名及引擎运行时模块名统一迁移到无 scope 的 tinyui-* 命名,并同步所有构建、类型、示例、测试和文档引用。
  • 三包版本统一为 0.1.0,更新 workspace 依赖、源码 import、JSX 类型入口和 schema 生成默认值。
  • Kotlin PageHost、测试及 manifest 相关模块注册/导入全部使用新模块名。
  • README、设计文档、sample 与生成链说明同步更新安装方式和命名表。
packages/core/package.json
packages/native/package.json
packages/cli/package.json
packages/cli/src/bin.ts
packages/cli/src/build.ts
packages/cli/src/schema/generate.ts
packages/core/src/internal.ts
packages/core/src/jsx-runtime.ts
packages/native/src/*.ts
sample/js/package.json
sample/js/src/pages/*.tsx
sample/js/tsconfig.json
schema/components/*.ts
schema/package.json
compose/src/commonMain/kotlin/wang/harlon/tinyui/PageHost.kt
compose/src/commonMain/kotlin/wang/harlon/tinyui/BuildManifest.kt
compose/src/*Test/**/*.kt
README.md
docs/*.md
docs/*.html
扩展构建 manifest 以记录模块到产物路径的映射,并让宿主通过统一 API 定位字节码和 source map。
  • CLI 在 manifest.files 中写入运行时和页面模块的无扩展产物路径。
  • BuildManifest 新增 files 字段及 file(module) 查询方法,并更新序列化解析与 API dump。
  • sample 和相关宿主逻辑移除按包名前缀推导路径的重复实现。
  • CLI 测试覆盖 files 映射及新运行时产物布局。
packages/cli/src/build.ts
packages/cli/test/build.test.ts
compose/src/commonMain/kotlin/wang/harlon/tinyui/BuildManifest.kt
compose/api/compose.klib.api
sample/shared/src/commonMain/kotlin/wang/harlon/tinyui/sample/App.kt
compose/src/androidHostTest/kotlin/wang/harlon/tinyui/BundleSmokeTest.kt
升级 quickjs-kmp 依赖以支持首发版本,并建立基于版本 tag 的 Maven 发布与 GitHub Release 流程。
  • catalog 将 quickjs-kmp 从 0.1.0 升级到 0.1.1。
  • 新增 publish workflow,在数字版本 tag 上执行 host 测试、apiCheck、Maven Central 发布和 GitHub Release 创建。
  • iOS workflow 的 tag 触发模式与发布流程统一。
  • npm 包明确保留为维护者本机发布,并在 README 提供安装说明。
gradle/libs.versions.toml
.github/workflows/publish.yml
.github/workflows/ios.yml
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeseerbot codeseerbot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeSeer 审查

结论:不批准(本轮 1 条严重或建议级意见;1 个文件未审查)

摘要

本次改动完成了 npm 包名及运行时模块名的迁移,并在构建 manifest 中加入模块到产物路径的映射,同时新增 Maven 发布工作流。主要风险是版本元数据和 manifest 路径的使用尚未完全对齐:已发布包暴露的版本号仍是旧值,sample 对字节码路径仍保留硬编码。

其他意见

不在改动行上,无法挂为行内评论:

  • packages/native/src/index.ts:1 [建议] tinyui-native 的 package.json 已发布为 0.1.0,但运行时导出的 VERSION 仍为 0.0.0。业务代码读取该常量会得到与实际安装包不一致的版本,且文档将 VERSION 定义为包版本。请将其同步为 0.1.0,并确保后续发版由统一版本源生成或校验。
  • sample/shared/src/commonMain/kotlin/wang/harlon/tinyui/sample/App.kt:77 [细节] 这里及后续页面加载仍硬编码 runtime/core、runtime/native、pages/todos 的字节码路径,没有使用刚加入的 manifest.file(name)。这与构建链文档中“宿主用 BuildManifest.file(name) 定位 .bin 和 .js.map”的约定不一致;一旦 CLI 调整任一产物路径,map 能正常加载但字节码加载会失败。请用对应模块名调用 manifest.file(...) 后再拼接 .bin。

跳过的文件

  • pnpm-lock.yaml:lock 文件

整个 PR 至 e3f1565 · gpt-5.6-terra

…ifest.file()

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@codeseerbot codeseerbot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeSeer 审查

结论:批准

摘要

本次增量将 core 与 native 的运行时 VERSION 更新为 0.1.0,并新增测试确保其与各自 package.json 一致。sample 改为通过 BuildManifest.file(name) 读取运行时、页面产物及 source map 路径,避免继续依赖旧的硬编码路径。结合给出的代码,未发现本次增量引入的明确问题。

增量 e3f1565..1f70710 · gpt-5.6-terra

@HarlonWang
HarlonWang merged commit 154b3db into main Sep 18, 2026
4 checks passed
@HarlonWang
HarlonWang deleted the feat/release-0.1.0 branch September 18, 2026 04:19
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