Skip to content

Releases: reactnativecn/react-native-update-cli

v2.23.1

Choose a tag to compare

@sunnylqm sunnylqm released this 30 Aug 09:43
cc051c8

English

Fixes

  • One app per operation: bundle --appId <id> --name <v> now publishes to that app (it was silently ignored before), and publish --appId binds against the same app it created the version under instead of re-reading the selected app (#74).
  • An explicit --appId is checked against the command's platform (GET /app/:id) before any expensive work; an app of another platform, a foreign or a missing id fails immediately instead of after the build. Note: this adds one request, so bundle --appId no longer works fully offline.
  • createApp --config <file> selects the new app in that file; getSelectedApp/bundle honor --config consistently. The default stays update.json for both pushy and cresc.
  • A bundle-only run without a selected app still bundles (full bytecode, no Hermes base), but a malformed config is now reported right away instead of after the build.
  • Parse/mismatch errors name the config file actually read (or --appId) instead of a hard-coded update.json.

SDK

  • BundleOptions.appId / BundleOptions.config; provider.getSelectedApp(platform, config).

Chores

  • .gitignore ignores node_modules as a symlink too (#79); workflow actions bumped to latest majors.

中文

修复

  • 单次操作只针对一个应用:bundle --appId <id> --name <v> 现在会发布到指定应用(此前该参数会被静默忽略);publish --appId 也会绑定到创建版本时使用的同一个应用,不再重新读取当前选中的应用(#74)。
  • 在开始耗时操作前,会先通过 GET /app/:id 检查显式传入的 --appId 是否与命令平台匹配;平台不同、属于其他账户或不存在的应用 ID 会立即失败,而不是等构建完成后才报错。注意:这会增加一次请求,因此 bundle --appId 不再能完全离线运行。
  • createApp --config <file> 会在该配置文件中选中新应用;getSelectedAppbundle 现在也会一致地遵循 --config。pushy 与 cresc 的默认配置文件仍为 update.json
  • 未选择应用时,仅执行 bundle 的流程仍可正常打包(生成完整字节码,不使用 Hermes base);但配置文件格式错误现在会立即报告,而不是在构建结束后才报错。
  • 解析错误和应用不匹配错误现在会指出实际读取的配置文件(或 --appId),不再固定写成 update.json

SDK

  • 新增 BundleOptions.appId / BundleOptions.configprovider.getSelectedApp(platform, config)

杂项

  • .gitignore 现在也会忽略符号链接形式的 node_modules#79);工作流 actions 升级到最新主版本。

v2.23.0

Choose a tag to compare

@sunnylqm sunnylqm released this 30 Aug 03:26
df02eaf

English

Source maps are archived with published versions (bundle --sourcemap is on by default; use publish --sourcemap <file> to provide one). The new pushy symbolicate command maps crash stacks, including Hermes frames, back to source through the archived map, and the provider API adds symbolicate(). Servers without source-map archiving support degrade gracefully to a warning.

中文

发布版本现在会归档 source map(bundle --sourcemap 默认开启;可通过 publish --sourcemap <file> 提供 source map)。新增的 pushy symbolicate 命令可使用已归档的 source map 将崩溃堆栈(包括 Hermes 栈帧)还原到源码位置,provider API 同时新增 symbolicate()。服务端不支持 source map 归档时会降级为警告,不会中断发布。

v2.22.9

Choose a tag to compare

@sunnylqm sunnylqm released this 26 Aug 10:32
3f304ab

English

  • Native package upload (pushy package upload / publish --package): the slim package is now built by copying the bundle and asset entries byte-for-byte from the APK / IPA / APP instead of re-deflating each of them, so it is bound by disk I/O rather than CPU. Archives that would need ZIP64 keep the previous repack path.
  • Dropped the semver dependency (version comparisons use compare-versions).

中文

  • 原生包上传(pushy package upload / publish --package):精简包现在会从 APK / IPA / APP 中逐字节复制 bundle 和资源条目,不再逐个重新进行 deflate 压缩,因此性能瓶颈从 CPU 转为磁盘 I/O。需要 ZIP64 的归档仍使用原有的重新打包路径。
  • 移除 semver 依赖,版本比较改用 compare-versions

v2.22.8

Choose a tag to compare

@sunnylqm sunnylqm released this 26 Aug 08:15
8e9cc2b

English

Performance and robustness batch across the CLI:

Startup

  • The npm "newer version" check no longer blocks every command: 1-day cache, background request, hint printed after the command. pushy help goes from ~0.5 s to ~0.09 s; offline commands (hdiff, parseApk, …) no longer ping the API endpoints or resolve dependency versions at startup.

Bundle / Hermes delta mode

  • hermes-base-error.log (full hermesc output of a failed base attempt) is written next to the intermediate directory — it used to be packed into the PPK.
  • Base selection starts only after Metro is spawned; the JS bundle is no longer copied twice; the packager map is renamed instead of copied; compose-source-maps runs asynchronously while the disassembly check runs.
  • A failed verification compile keeps the base compile (reported separately) instead of dropping it and compiling a third time. A base still downloading when Metro finishes is waited for at most 60 s (PUSHY_HERMES_BASE_WAIT_MS).
  • A base whose content differs from the server-recorded hash is rejected immediately instead of triggering two full archive downloads; cache hits for legacy/native-package bases verify the HBC version; downloads and Range requests have timeouts; stale cache staging files are cleaned.
  • New --resetCache false skips Metro's --reset-cache for much faster repeated bundles.
  • ZIP payload deflate level 9 → 6 (≈4× less CPU for 0.6% larger PPK).

Diff

  • Moved-file detection requires equal size in addition to equal CRC32 (a CRC collision could ship the wrong file).
  • A failing diff no longer leaves a truncated patch file or an open handle behind.
  • The streaming diff transforms Hermes bytecode on disk section by section; no full bundle is held in memory.

Network

  • Uploads have a size-scaled timeout and one retry on transient errors; publish overlaps the upload with hashing and git.
  • Range reads of remote archives use less memory, skip re-fetching cached bytes, send If-Range, and always prefetch the central directory in one request.

中文

本版本集中提升了 CLI 的性能与健壮性:

启动

  • npm 新版本检查不再阻塞每条命令:结果缓存一天、请求在后台执行,并在命令结束后显示提示。pushy help 从约 0.5 秒缩短至约 0.09 秒;离线命令(hdiffparseApk 等)启动时不再访问 API 端点或解析依赖版本。

Bundle / Hermes 增量模式

  • hermes-base-error.log(base 尝试失败时 hermesc 的完整输出)现在写在中间目录旁边;此前它会被打进 PPK。
  • base 选择在 Metro 启动后才开始;JS bundle 不再复制两次;packager map 改为重命名而非复制;反汇编检查运行时会异步执行 compose-source-maps
  • 验证 编译失败时会保留 base 编译结果(并单独报告),不再丢弃它后进行第三次编译。Metro 完成时如果 base 仍在下载,最多等待 60 秒(PUSHY_HERMES_BASE_WAIT_MS)。
  • base 内容与服务端记录的哈希不一致时会立即拒绝,不再触发两次完整归档下载;旧版或原生包 base 命中缓存时会验证 HBC 版本;下载与 Range 请求均增加超时;陈旧的缓存暂存文件会被清理。
  • 新增 --resetCache false,可跳过 Metro 的 --reset-cache,显著加快重复 bundle。
  • ZIP payload 的 deflate 级别从 9 调整为 6(PPK 体积仅增加 0.6%,CPU 消耗约降低 4 倍)。

差分

  • 移动文件检测除 CRC32 相同外还要求文件大小相同,避免 CRC 冲突导致下发错误文件。
  • 差分失败后不再遗留被截断的补丁文件或未关闭的文件句柄。
  • 流式差分会在磁盘上分段转换 Hermes 字节码,无需在内存中保留完整 bundle。

网络

  • 上传超时会按文件大小动态调整,并在瞬时错误时重试一次;publish 会让上传与哈希计算、git 操作并行进行。
  • 远程归档的 Range 读取占用更少内存、不会重复获取已缓存字节、会发送 If-Range,并始终通过一次请求预取 central directory。

v2.22.7

Choose a tag to compare

@sunnylqm sunnylqm released this 24 Aug 15:59
c93c907

English

Hermes delta-mode (-base-bytecode) pipeline speedups:

  • The base compile and the --verifyHermesBase plain compile now run concurrently, and a rejected base reuses the plain output instead of compiling a third time.
  • The base lookup and download run while Metro bundles instead of after it.
  • Base downloads over HTTP Range need fewer requests (tail aligned with yauzl, central-directory prefetch for large APK/IPA files, header + bundle in one request), and native packages uploaded by this version can be fetched with a single Range request (requires the matching server release).
  • Cheaper disassembly comparison, single SHA-256 per bundle, cached hermesc HBC-version probe.

中文

Hermes 增量模式(-base-bytecode)流水线提速:

  • base 编译和 --verifyHermesBase 普通编译现在会并发执行;base 被拒绝时会复用普通编译产物,不再进行第三次编译。
  • base 查找和下载改为与 Metro bundle 并行执行,不再等 bundle 完成后才开始。
  • 通过 HTTP Range 下载 base 所需的请求数更少(尾部与 yauzl 对齐;为大型 APK/IPA 预取 central directory;通过一次请求获取 header 与 bundle);由本版本上传的原生包可通过单次 Range 请求获取(需要配套的服务端版本)。
  • 降低反汇编比较开销;每个 bundle 只计算一次 SHA-256;缓存 hermesc 的 HBC 版本探测结果。

v2.22.6

Choose a tag to compare

@sunnylqm sunnylqm released this 24 Aug 15:20
966d109

Hermes base downloads now fetch only the bundle instead of the whole base package: a single HTTP Range request when the server knows where the bundle sits inside the ppk (reported at publish time), otherwise the zip central directory plus the bundle entry over Range (ppk / apk / ipa), falling back to the full download when the storage ignores Range or verification fails. Publishing reports the bundle location alongside the existing Hermes chain metadata.

v2.22.5

Choose a tag to compare

@sunnylqm sunnylqm released this 24 Aug 01:33
88598a9

Surface the real hermesc error when a Hermes base compile fails: diagnostics are now filtered so errors are no longer buried under minified-bundle warning echoes, and the full compiler output is written to /hermes-base-error.log.

v2.22.4

Choose a tag to compare

@github-actions github-actions released this 23 Aug 07:44
ef375f3

Fix Hermes base equivalence verification for UIntSwitchImm jump-table offsets. Tighten StringSwitchImm/UIntSwitchImm normalization so semantic operands remain checked, with regression coverage for IDs, labels, ranges, and malformed switch shapes.

v2.22.3

Choose a tag to compare

@sunnylqm sunnylqm released this 22 Aug 02:43
f372289

Fix: publish no longer sends JSON null for the Hermes chain metadata (baseVersionId / baseHash / bytecodeVersion) when no base was used — servers rejected that with "Expected baseHash string". Fields are now omitted, which every server version accepts.

v2.22.2

Choose a tag to compare

@sunnylqm sunnylqm released this 22 Aug 02:24

Fix Hermes delta-base discovery for apps that have an uploaded native package but no published hot-update version. The CLI now downloads and extracts APK, IPA, or Harmony APP base artifacts returned by the server.