Repository navigation
feat: 发版基建——npm 包改名 tinyui-*,manifest 记产物路径,publish.yml - #11
Conversation
… 记产物路径,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>
There was a problem hiding this comment.
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.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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. Comment |
审查者指南本 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)
由 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
文件级变更
提示与命令与 Sourcery 交互
自定义使用体验访问你的控制面板,你可以:
获取帮助Original review guide in EnglishReviewer'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 loadingsequenceDiagram
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)
Sequence diagram for tag-triggered Maven publishingsequenceDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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>
背景
准备 tinyui 0.1.0 首发。npm scope
@tiny-ui自 2017 年起归他人(@tiny-ui/components),@tinyui也被占,裸tinyui触 npm 仿冒规则(与tiny-ui过近)。定为无 scope 的tinyui-core/tinyui-native/tinyui-cli。改动
files:模块名 → 产物路径(runtime/core、pages/home),KotlinBuildManifest.file(name)读;宿主定位.bin/.js.map不再各自复制"去前缀"逻辑(sample 已改,TrendingAI 的TinyUIHost随其 catalog bump 一起改)[0-9]+.[0-9]+.[0-9]+*触发,host 测试 + apiCheck →publishAndReleaseToMavenCentral→ GitHub Release;npm 由维护者本机发。ios.yml的 tag 模式从v*对齐到同一模式验证
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 版本发布做准备。
新功能:
Bug 修复:
tinyui-*名称。改进:
tinyui-core、tinyui-native和tinyui-cli。CI:
文档:
测试:
Original summary in English
Sourcery 摘要
为项目的 0.1.0 版本发布做好准备,包括使用可用的 npm 包名称、基于清单的构件发现以及发布自动化。
新功能:
Bug 修复:
增强功能:
CI:
部署:
文档:
测试:
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:
Bug Fixes:
Enhancements:
CI:
Deployment:
Documentation:
Tests: