Releases: reactnativecn/react-native-update-cli
Releases · reactnativecn/react-native-update-cli
Release list
v2.28.0
English
Features
- Redact the Hermes base equivalence-check detail before it is reported at
version/create. Quoted string operands, function names and file paths coming from compiler stderr become stable tokens (str#<hash>/<length>,fn#<hash>,path#<hash>.<ext>); opcodes, registers, counts and literal kinds are kept, so a report is still triageable. The local console keeps printing the unredacted text. (#87) - Report
hermesBaseFingerprint: a grouping key computed from the redacted detail with registers, ids and offsets removed, so the same defect groups together across apps and builds. Servers that do not know the field ignore it. (#87)
Test tooling
- The fuzzer's dedup key is now the same fingerprint function the CLI reports, so a fuzz finding and the same defect seen in the field land in one group. (#87)
Validation and compatibility
- Passed all seven CI jobs, including the HBC 96 and HBC 98 compiler regressions, Node.js 18.17 runtime checks and the publish dry run.
- Update-package formats and the Node.js
>=18.17.0requirement are unchanged. The server protocol only gains one optional field.
Full changelog: v2.27.1...v2.28.0
中文
新功能
version/create上报 Hermes base 等价校验的 detail 前先脱敏:引号内的字符串操作数、函数名、编译器 stderr 带出的文件路径替换为稳定标记(str#<hash>/<长度>、fn#<hash>、path#<hash>.<扩展名>),保留 opcode、寄存器、计数和字面量类型,仅凭上报内容仍可排查。本地控制台照常输出原文。 (#87)- 新增上报
hermesBaseFingerprint:在脱敏后的 detail 上去掉寄存器、id 与偏移后计算的分组键,同一缺陷在不同应用、不同构建之间归为一组。不认识该字段的服务端会忽略它。 (#87)
测试工具
- fuzz 的去重键改用与上报相同的指纹函数,fuzz 发现的问题与线上同一缺陷落在同一组。 (#87)
验证与兼容性
- 通过全部七项 CI 任务,包括 HBC 96 和 HBC 98 编译器回归、Node.js 18.17 运行时检查和发布预演。
- 更新包格式与 Node.js
>=18.17.0要求不变;服务端协议只新增一个可选字段。
完整变更: v2.27.1...v2.28.0
v2.27.1
English
Fixes
- Fix false Hermes base rejections when
DefineOwnByIdchanges operand width and the pretty disassembly truncates property names, including non-ASCII names. Full property names remain checked by the binary/raw audit. (#85) - Compare
CacheNewObjectshapes by their ordered, fully decoded property keys instead of physical table indices. Registers and cache indices remain significant; undecodable references fail safely. (#85) - Use neutral account renewal notice prefixes in English and Chinese, without changing the message body or placeholders. (#85)
Test tooling
- Require all requested positive fuzz comparisons, zero compilation failures, and at least one effective planted difference before a run can succeed. Keep unsuccessful samples for diagnosis. (#85)
- Mutate actual JavaScript string tokens rather than quote-matching regex results, avoiding invalid source around escaped quotes. Reject missing, empty or invalid
--roundsvalues with exit code2before creating output or invoking the compiler. (#85)
Validation and compatibility
- The merged source commit passed all seven CI jobs, including HBC 96 and HBC 98 compiler regressions, 50 seeded fuzz rounds per compiler, Node.js 18.17 runtime checks, and the publish dry run. The compiler matrix uses
react-native@0.77.3,hermes-compiler@250829098.0.16andhermes-compiler@250829098.0.17. - Update-package formats, server protocols and the Node.js
>=18.17.0requirement are unchanged. Both verification passes and the plain-compilation fallback remain in place. The dedicatedCacheNewObjecttests use synthetic binary fixtures; broader unknown-opcode auditing remains a separate follow-up.
Full changelog: v2.27.0...v2.27.1
中文
修复
- 修复
DefineOwnById操作数宽度变化、pretty 反汇编截断属性名时错误拒绝正常 Hermes base 的问题,包括非 ASCII 属性名。完整属性名仍由二进制/raw 核对检查。 (#85) CacheNewObject按有序、完整解码的属性键比较 shape,不再直接比较物理表索引。寄存器和 cache 索引仍参与比较,无法解码的引用会安全失败。 (#85)- 英文和中文的账号续费提示使用中性通知前缀,不改变消息正文或占位符。 (#85)
测试工具
- fuzz 必须完成全部请求的正例比较、没有编译失败,并至少检查一个有效的植入差异,才能返回成功。保留未成功的样本用于诊断。 (#85)
- 按真实 JavaScript 字符串 token 进行变异,替代匹配引号的正则,避免在转义引号附近生成非法源码。
--rounds缺值、空值或非法值在创建输出或调用编译器前以退出码2拒绝。 (#85)
验证与兼容性
- 合并后的源码提交通过全部七项 CI 任务,包括 HBC 96 和 HBC 98 编译器回归、每种编译器 50 轮固定种子 fuzz、Node.js 18.17 运行时检查和发布预演。编译器矩阵使用
react-native@0.77.3、hermes-compiler@250829098.0.16和hermes-compiler@250829098.0.17。 - 更新包格式、服务端协议及 Node.js
>=18.17.0要求均未改变。保留两轮校验和普通编译回退。CacheNewObject专项测试使用合成二进制样本,更全面的未知 opcode 审计仍是独立的后续工作。
完整变更: v2.27.0...v2.27.1
v2.27.0
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
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
SwitchImmoffsets while retaining real targets, and resolve the string operand ofThrowIfHasRestrictedGlobalProperty. (#84) - Add
https://1.rnupdate.online/api,https://2.rnupdate.online/api,https://3.rnupdate.online/apiandhttps://4.rnupdate.online/apibefore 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.16andhermes-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
250829098compiler 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/api、https://2.rnupdate.online/api、https://3.rnupdate.online/api和https://4.rnupdate.online/api。原有两个端点仍作为备用,Cresc 端点不变。 (a79e3db)
验证与兼容性
- CI 覆盖真实 HBC96/HBC98 编译器(
react-native@0.77.3、hermes-compiler@250829098.0.16和hermes-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=30000、PUSHY_HERMES_VERIFY_TIMEOUT_MS=120000、PUSHY_HERMES_COMPILE_TIMEOUT_MS=300000。校验期限涵盖两轮 dump,编译期限也用于 source map 合成。 - 原始操作数核对会增加验证耗时和内存,但不会在正常成功路径增加第三次编译。HBC98 函数头解析已在
250829098编译器系列验证,不宣称兼容所有其他内部 HBC98 快照。
完整变更: v2.26.1...v2.26.2
v2.26.1
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, andNewObjectWithBuffer/NewObjectWithBufferAndParentare 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
NewObjectWithBufferAndParentis compared as a register instead of being mistaken for a buffer operand, and the instruction is no longer folded intoNewObjectWithBuffer.
Tooling
fuzz:hermes-baseno 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
English
Highlights
- Hermes base-bytecode equivalence check, reworked. With
--verifyHermesBase,compareHermesBytecodenow 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 asdump-failed, distinct fromdifferent. 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*WithBufferinstruction'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 fieldshermesBaseOutcome(used|rejected|dump-failed|none) andhermesBaseDetail(≤ 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上报校验结果。 新增可选字段hermesBaseOutcome(used|rejected|dump-failed|none)和hermesBaseDetail(≤ 500 字符),便于服务端统计拒绝率。未知时不传;旧版服务端会忽略。
修复
- 校验所需的普通编译失败时,现在会放弃 base,而不是发布未经校验的增量产物;普通编译会重新输出到正式产物。
工具
bun run fuzz:hermes-base:等价性校验的差分模糊测试(每十轮植入单个字面量改动,必须被检出)。文档见docs/hermes-base-verification.md。
v2.25.0
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 orPodfile.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, andNO_PROXYhandling. - 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
appKeybefore 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_PROXY、HTTPS_PROXY与NO_PROXY。 - 通过命令按需加载和单依赖版本查询,降低 CLI 启动开销。
稳定性与接口改进
- 非交互及非 TTY 环境会直接失败,不再无限等待输入,也不会先执行无意义的列表请求。
- 应用选择会拒绝格式错误的 ID、校验应用平台,并在写入配置前验证
appKey。 - 改进显式
appId/配置传递、Provider API、source map 选项、上传重试以及按工作目录隔离的依赖版本缓存。 - 改进错误诊断:隐藏签名 URL 与凭据,保留嵌套网络错误原因,并支持通过
RNU_DEBUG=1输出完整堆栈。 - 增加 Node.js 18.17 兼容性验证及覆盖安全边界和运行时行为的回归测试。
v2.24.2
v2.24.1
v2.24.0
English
Background auto-update
- Globally installed
pushyandcrescCLIs now updatereact-native-update-cliin 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,
npxexecutions, and CI environments are not modified. A completed update is reported once on the next CLI invocation.
Controls
- Set
RNU_AUTO_UPDATE=0orRNU_DISABLE_AUTO_UPDATE=1to disable background updates. - Set
RNU_AUTO_UPDATE_PACKAGE_MANAGER=npm|pnpm|yarn|bunto 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.
中文
后台自动更新
- 全局安装的
pushy和crescCLI 现在会在命令成功后,通过独立的后台进程更新react-native-update-cli。前台命令可正常退出,更新进程能在主进程退出后继续完成。 - 更新器会复用全局安装所属的包管理器(
npm、pnpm、Yarn Classic 或 Bun),以及现有的 registry 或镜像源、代理、认证、CA 配置和 npm 全局 prefix。 - registry 凭据不会被复制到命令行参数中;网络或 registry 故障也不会导致前台命令失败。
- 多个 CLI 进程之间会串行执行更新,支持过期锁恢复;安装超时为两分钟,网络失败后冷却六小时。
- 启动前会检测全局安装目录是否只读。更新器绝不调用
sudo,而是在后续 CLI 调用中输出准确的手动更新命令。 - 项目本地安装、
npx执行和 CI 环境不会被修改。后台更新完成后,会在下一次 CLI 调用时提示一次。
控制选项
- 设置
RNU_AUTO_UPDATE=0或RNU_DISABLE_AUTO_UPDATE=1可禁用后台更新。 - 设置
RNU_AUTO_UPDATE_PACKAGE_MANAGER=npm|pnpm|yarn|bun可覆盖包管理器自动识别结果。
维护
- 新增包管理器目录结构、独立后台进程、权限、锁、网络冷却、registry 和更新通知等测试覆盖。
- 统一采用中英双语发布说明,并保留现有的 GitHub Release 到 npm 发布链路。