Skip to content

Releases: reactnativecn/react-native-update-cli

v2.27.0

Choose a tag to compare

@sunnylqm sunnylqm released this 17 Sep 04:53
e096219

English

  • Automatically display the current account, plan, and expiration date when the working directory contains login credentials.
  • Show cached account information immediately and refresh it in a detached background process, without delaying commands or CLI exit. Cache entries are isolated by working directory, brand, and credentials.
  • Warn Pushy paid users when their plan expires in less than 30 days, with a renewal link. Cresc subscriptions do not receive renewal reminders.
  • Advance cached server time when calculating remaining validity; background lookup failures preserve the last successful cache.

中文

  • 工作目录存在登录凭证时,自动展示当前账号、套餐等级和有效期。
  • 优先展示本地缓存,通过独立后台进程刷新,不阻塞命令执行或 CLI 退出;缓存按工作目录、品牌和凭证隔离。
  • Pushy 付费套餐剩余不足 30 天时,显示黄色加粗续费提醒及续费链接;Cresc 自动续费套餐不提醒。
  • 根据缓存后的时间推移重新计算剩余有效期;后台查询失败时保留上次成功的缓存。

v2.26.2

Choose a tag to compare

@github-actions github-actions released this 12 Sep 14:46
12aba20

English

Fixes and improvements

  • Harden Hermes base verification with a second raw-operand audit backed by HBC bytes. Preserve quoted whitespace, full strings, function references, branch/switch destinations, exact double bits, literals and runtime metadata. Unverifiable output falls back to a plain compile. (#84)
  • Accept valid zero-length Static Hermes functions while retaining non-empty-function truncation checks. Close debug-output streams after timeout, cancellation or compiler startup failure to prevent hangs with PUSHY_HERMES_BASE_DEBUG=1. (#84)
  • Handle speculative source-map rejections immediately, reuse successful plain output after failed base compilation or verification, and add configurable subprocess deadlines. Normalize classic SwitchImm offsets while retaining real targets, and resolve the string operand of ThrowIfHasRestrictedGlobalProperty. (#84)
  • Add https://1.rnupdate.online/api, https://2.rnupdate.online/api, https://3.rnupdate.online/api and https://4.rnupdate.online/api before the existing Pushy default endpoints. Both previous endpoints remain as fallbacks; Cresc endpoints are unchanged. (a79e3db)

Validation and compatibility

  • CI covers real HBC96/HBC98 compilers (react-native@0.77.3, hermes-compiler@250829098.0.16 and hermes-compiler@250829098.0.17), pinned real Metro bundle self-comparison and base/plain comparison, seeded differential fuzzing, isolated asynchronous-error regressions, exhaustive UTF-16 spacing checks, and Node.js 18.17 debug-output cleanup. The merged release commit passed CI before publication.
  • No update-package format or server-protocol migration is required. --hermesBase auto, default verification and plain fallback remain available. Node.js 18.17 remains the minimum supported runtime.
  • Default deadlines: PUSHY_HERMES_PROBE_TIMEOUT_MS=30000, PUSHY_HERMES_VERIFY_TIMEOUT_MS=120000, PUSHY_HERMES_COMPILE_TIMEOUT_MS=300000. Verification covers both dump passes; the compile deadline also covers source-map composition.
  • The raw audit adds verification time and memory, but no third compile on the successful path. HBC98 function-header parsing is validated against the 250829098 compiler family; compatibility with every other internal HBC98 snapshot is not claimed.

Full changelog: v2.26.1...v2.26.2

中文

修复与改进

  • 增强 Hermes base 校验,增加基于 HBC 二进制的原始操作数核对。保留引号内空白、完整字符串、函数引用、分支/switch 目的地、浮点数精确位值、字面量和运行时元数据。无法验证的产物回退到普通编译。 (#84)
  • 允许合法的零长度 Static Hermes 函数,同时继续检查非空函数是否被截断。超时、取消或编译器启动失败时结束调试输出流,避免 PUSHY_HERMES_BASE_DEBUG=1 下挂死。 (#84)
  • 立即处理预先启动的 source map 合成任务的拒绝;base 编译或校验失败时复用已成功的普通编译产物,并增加可配置的子进程期限。归一化经典 SwitchImm 偏移但仍核对真实目的地,补齐 ThrowIfHasRestrictedGlobalProperty 的字符串操作数解析。 (#84)
  • 在已有 Pushy 默认端点前新增 https://1.rnupdate.online/apihttps://2.rnupdate.online/apihttps://3.rnupdate.online/apihttps://4.rnupdate.online/api。原有两个端点仍作为备用,Cresc 端点不变。 (a79e3db)

验证与兼容性

  • CI 覆盖真实 HBC96/HBC98 编译器(react-native@0.77.3hermes-compiler@250829098.0.16hermes-compiler@250829098.0.17)、固定版本真实 Metro bundle 自比及 base/plain 比较、带种子的差分模糊测试、独立进程异步错误回归、完整 UTF-16 码元范围的空白处理检查,以及 Node.js 18.17 调试输出清理。合并后的发布提交已在发布前通过 CI。
  • 无需迁移更新包格式或服务端协议。保留 --hermesBase auto、默认开启的校验和普通编译回退。最低支持运行时仍为 Node.js 18.17。
  • 默认期限:PUSHY_HERMES_PROBE_TIMEOUT_MS=30000PUSHY_HERMES_VERIFY_TIMEOUT_MS=120000PUSHY_HERMES_COMPILE_TIMEOUT_MS=300000。校验期限涵盖两轮 dump,编译期限也用于 source map 合成。
  • 原始操作数核对会增加验证耗时和内存,但不会在正常成功路径增加第三次编译。HBC98 函数头解析已在 250829098 编译器系列验证,不宣称兼容所有其他内部 HBC98 快照。

完整变更: v2.26.1...v2.26.2

v2.26.1

Choose a tag to compare

@sunnylqm sunnylqm released this 11 Sep 09:03
88b2e66

English

Improvements

  • Hermes base equivalence check now decodes HBC v98 literals per instruction. Builds with hermes-compiler (React Native 0.87+) previously fell back to comparing the dumped literal buffers as a whole, which the buffer builder's overlapping literals make unreliable — good delta builds could be rejected and shipped as a plain compile. The v98 layout (shared literal value buffer, object key buffer, object shape table) is now read from the binary, and NewObjectWithBuffer / NewObjectWithBufferAndParent are compared through the shape table. In differential fuzzing on RN 0.87's hermesc, false rejections dropped from 259 in 300 rounds to 0 in 800, with every planted difference still caught.

Fixes

  • The parent register of NewObjectWithBufferAndParent is compared as a register instead of being mistaken for a buffer operand, and the instruction is no longer folded into NewObjectWithBuffer.

Tooling

  • fuzz:hermes-base no longer reports a planted change as missed when the optimizer removed that code (Static Hermes constant-folds much more than classic hermesc).

中文

改进

  • Hermes base 等价性校验支持 HBC v98 按指令解码字面量。 使用 hermes-compiler(React Native 0.87+)的构建此前会回退为整段比较 dump 出的字面量缓冲区,而缓冲区构建器会重叠存放字面量,导致正常的增量构建可能被误拒、改发普通编译产物。现在从二进制读取 v98 布局(共享的字面量值缓冲区、对象键缓冲区、对象 shape 表),NewObjectWithBuffer / NewObjectWithBufferAndParent 通过 shape 表比较。基于 RN 0.87 hermesc 的差分模糊测试中,误拒从 300 轮 259 次降为 800 轮 0 次,植入的差异仍全部检出。

修复

  • NewObjectWithBufferAndParent 的父对象寄存器按寄存器比较,不再被误当作缓冲区操作数;该指令也不再与 NewObjectWithBuffer 混为一谈。

工具

  • fuzz:hermes-base 在植入的改动被优化器消除时(Static Hermes 的常量折叠比经典 hermesc 激进得多)不再误报为漏检。

v2.26.0

Choose a tag to compare

@sunnylqm sunnylqm released this 11 Sep 08:24

English

Highlights

  • Hermes base-bytecode equivalence check, reworked. With --verifyHermesBase, compareHermesBytecode now reads each disassembly as a structure: string ids are resolved through each side's own table, functions are compared one at a time (a desync no longer cascades), and a dump that exits non-zero or ends early is reported as dump-failed, distinct from different. Rejections now name the function, instruction and first differing entry.
  • Literals compared per instruction. For HBC v87–96, the Array/Object Key/Object Value buffers are decoded from the binary at each New*WithBuffer instruction's offset, so the builder's overlapping/deduplicated literals no longer cause false rejections of good delta builds. Other bytecode versions (e.g. HBC v98) fall back to whole-buffer comparison.
  • Outcome reported at version/create. New optional fields hermesBaseOutcome (used | rejected | dump-failed | none) and hermesBaseDetail (≤ 500 chars) let the server track rejection rates. Keys are omitted when unknown; older servers ignore them.

Fixes

  • When the verification's plain compile fails, the base is now dropped instead of shipping an unverified delta; the plain compile is re-run into the real output.

Tooling

  • bun run fuzz:hermes-base — seeded differential fuzzer for the equivalence check (planted one-literal changes must still be caught). Docs: docs/hermes-base-verification.md.

中文

主要更新

  • 重写 Hermes base 字节码等价性校验。 开启 --verifyHermesBase 时,compareHermesBytecode 按结构解析反汇编:字符串 id 通过各自的字符串表解析,函数逐个比较(不再因错位级联误判),dump 进程非零退出或提前结束会报告为 dump-failed,与 different 区分。拒绝时会给出函数、指令和第一处差异。
  • 字面量按指令逐条比较。 对 HBC v87–96,从二进制中按每条 New*WithBuffer 指令的偏移解码 Array/Object Key/Object Value 缓冲区,不再因 buffer 构建器的重叠/去重而误拒正常的增量构建。其他字节码版本(如 HBC v98)回退为整体 buffer 比较。
  • version/create 上报校验结果。 新增可选字段 hermesBaseOutcomeused | rejected | dump-failed | none)和 hermesBaseDetail(≤ 500 字符),便于服务端统计拒绝率。未知时不传;旧版服务端会忽略。

修复

  • 校验所需的普通编译失败时,现在会放弃 base,而不是发布未经校验的增量产物;普通编译会重新输出到正式产物。

工具

  • bun run fuzz:hermes-base:等价性校验的差分模糊测试(每十轮植入单个字面量改动,必须被检出)。文档见 docs/hermes-base-verification.md

v2.25.0

Choose a tag to compare

@github-actions github-actions released this 03 Sep 02:39
516be8d

English

Highlights

  • Hardened Hermes detection across Android, iOS, Expo, and CI environments. Android now follows gradle.properties, legacy Gradle configuration, and React Native defaults in the correct order; iOS respects explicit Hermes/JSC settings, ignores commented-out Podfile options, and falls back safely to installed pods or Podfile.lock.
  • Protected intermediate-directory cleanup by canonicalizing the target and refusing filesystem, home, project, temporary, VCS, and symbolic-link redirected locations.
  • Added proxy-aware networking for API calls, uploads, registry checks, and remote archive range requests, including HTTP_PROXY, HTTPS_PROXY, and NO_PROXY handling.
  • Reduced CLI startup overhead through lazy command loading and targeted dependency-version lookup.

Reliability and API improvements

  • Non-interactive and non-TTY executions now fail fast instead of prompting indefinitely or performing unnecessary list requests.
  • App selection now rejects malformed IDs, verifies platform ownership, and validates appKey before persisting configuration.
  • Improved explicit appId/configuration propagation, Provider APIs, source-map option handling, upload retry behavior, and cwd-aware dependency caching.
  • Improved diagnostics while redacting signed URLs and credentials, preserving nested network failure causes, and supporting detailed stacks through RNU_DEBUG=1.
  • Added Node.js 18.17 compatibility checks and broad regression coverage for the new safety and runtime behavior.

中文

主要更新

  • 强化 Android、iOS、Expo 与 CI 环境下的 Hermes 检测。Android 按 gradle.properties、旧版 Gradle 配置和 React Native 默认值的正确优先级判断;iOS 尊重显式 Hermes/JSC 配置,忽略 Podfile 中被注释的设置,并安全回退到已安装 Pods 或 Podfile.lock
  • 强化中间目录清理安全边界:对目标路径进行规范化,阻止清空文件系统根目录、用户目录、项目目录、临时目录根、版本控制目录及符号链接重定向位置。
  • API 请求、上传、registry 检查和远程归档 Range 请求现已支持代理,并正确处理 HTTP_PROXYHTTPS_PROXYNO_PROXY
  • 通过命令按需加载和单依赖版本查询,降低 CLI 启动开销。

稳定性与接口改进

  • 非交互及非 TTY 环境会直接失败,不再无限等待输入,也不会先执行无意义的列表请求。
  • 应用选择会拒绝格式错误的 ID、校验应用平台,并在写入配置前验证 appKey
  • 改进显式 appId/配置传递、Provider API、source map 选项、上传重试以及按工作目录隔离的依赖版本缓存。
  • 改进错误诊断:隐藏签名 URL 与凭据,保留嵌套网络错误原因,并支持通过 RNU_DEBUG=1 输出完整堆栈。
  • 增加 Node.js 18.17 兼容性验证及覆盖安全边界和运行时行为的回归测试。

v2.24.2

Choose a tag to compare

@sunnylqm sunnylqm released this 31 Aug 10:55
31201ef

feat(sourcemap): 归档前 gzip 压缩,publish 上传体积再降约 70%(瘦身后 3.1MB → 0.94MB);读取端按 magic bytes 兼容旧的明文归档,pushy symbolicate 两种都能读。需配合 pushy-go >= 2026.8.31-f7b6a1f8(已上线)。

v2.24.1

Choose a tag to compare

@sunnylqm sunnylqm released this 31 Aug 10:28
7be4c90
  • fix(sourcemap): RN >= 0.87 下 compose-source-maps 因 exports 映射解析失败、hermes sourcemap 合成被静默跳过的问题(归档的 map 与字节码错位)
  • feat(sourcemap): publish 归档 sourcemap 前自动瘦身——项目内绝对路径转相对、剥离 node_modules 的 sourcesContent(帧定位不受影响,实测 9.2MB → 3.1MB)

v2.24.0

Choose a tag to compare

@sunnylqm sunnylqm released this 31 Aug 02:03
6a1685b

English

Background auto-update

  • Globally installed pushy and cresc CLIs now update react-native-update-cli in a detached background worker after a successful command. The foreground command exits normally, and the update can finish after its process exits.
  • The updater reuses the package manager that owns the global installation (npm, pnpm, Yarn Classic, or Bun), along with the configured registry or mirror, proxy, authentication, CA settings, and npm global prefix.
  • Registry credentials are never copied into command-line arguments. Network and registry failures never fail the foreground command.
  • Updates are serialized across concurrent CLI processes, use stale-lock recovery, and have a two-minute installation timeout plus a six-hour cooldown after network failures.
  • Read-only global installation directories are detected before starting. The updater never invokes sudo; a later CLI invocation prints the exact manual update command instead.
  • Project-local installations, npx executions, and CI environments are not modified. A completed update is reported once on the next CLI invocation.

Controls

  • Set RNU_AUTO_UPDATE=0 or RNU_DISABLE_AUTO_UPDATE=1 to disable background updates.
  • Set RNU_AUTO_UPDATE_PACKAGE_MANAGER=npm|pnpm|yarn|bun to override package-manager detection.

Maintenance

  • Added coverage for package-manager layouts, detached-worker behavior, permissions, locks, network cooldowns, registries, and update notifications.
  • Standardized bilingual release notes while retaining the existing GitHub Release to npm publishing path.

中文

后台自动更新

  • 全局安装的 pushycresc CLI 现在会在命令成功后,通过独立的后台进程更新 react-native-update-cli。前台命令可正常退出,更新进程能在主进程退出后继续完成。
  • 更新器会复用全局安装所属的包管理器(npmpnpm、Yarn Classic 或 Bun),以及现有的 registry 或镜像源、代理、认证、CA 配置和 npm 全局 prefix。
  • registry 凭据不会被复制到命令行参数中;网络或 registry 故障也不会导致前台命令失败。
  • 多个 CLI 进程之间会串行执行更新,支持过期锁恢复;安装超时为两分钟,网络失败后冷却六小时。
  • 启动前会检测全局安装目录是否只读。更新器绝不调用 sudo,而是在后续 CLI 调用中输出准确的手动更新命令。
  • 项目本地安装、npx 执行和 CI 环境不会被修改。后台更新完成后,会在下一次 CLI 调用时提示一次。

控制选项

  • 设置 RNU_AUTO_UPDATE=0RNU_DISABLE_AUTO_UPDATE=1 可禁用后台更新。
  • 设置 RNU_AUTO_UPDATE_PACKAGE_MANAGER=npm|pnpm|yarn|bun 可覆盖包管理器自动识别结果。

维护

  • 新增包管理器目录结构、独立后台进程、权限、锁、网络冷却、registry 和更新通知等测试覆盖。
  • 统一采用中英双语发布说明,并保留现有的 GitHub Release 到 npm 发布链路。

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 归档时会降级为警告,不会中断发布。