Repository navigation
Releases: reactnativecn/react-native-update-cli
Release list
v2.22.8
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 helpgoes 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-mapsruns 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 falseskips Metro's--reset-cachefor 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;
publishoverlaps 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 秒;离线命令(hdiff、parseApk等)启动时不再访问 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
English
Hermes delta-mode (-base-bytecode) pipeline speedups:
- The base compile and the
--verifyHermesBaseplain 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
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
v2.22.4
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
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
v2.22.1
Fix: the Hermes delta-mode verification (--verifyHermesBase) reported false mismatches when the base came from a different lineage (wider GetById/LoadConstString variants, moved switch jump tables) and needlessly fell back to a plain compile. No behavior change otherwise.
v2.22.0
Hermes delta mode (-base-bytecode)
bundlenow compiles Hermes bundles against the app's previous HBC (--hermesBase auto, default), keeping Hermes string IDs stable across versions: hot-update patches shrink 5–30×. Base comes from the server (GET /app/:id/hermesBase), is verified by sha256 and cached under.pushy/cache/<sha256>(500 MB / 20 files,--cacheMaxMb,PUSHY_CACHE_DIR).--hermesBase nonedisables it;--hermesBase <file.hbc|.ppk|.apk|.ipa>uses a local artifact (e.g. the store build) as base.--verifyHermesBase(default on) compares the delta build's disassembly with a plain compile and silently falls back on any mismatch — the feature can never block a release.- hermesc always runs with
-output-source-map: debug info is stripped from the bytecode (15–40% smaller, same as RN release builds); the Hermes .map stays in the intermediate directory. publish/uploadApk/uploadIpa/uploadAppreportbundleHash,bytecodeVersion,baseVersionId,baseHashand seed the local cache.- New command:
pushy cache [clean].
v2.21.2
feat(diff): record copiesCrc for every copied entry in package diffs (pdiff). Same-path copies now carry a content checksum so clients can verify path-matched files before copying; backward-compatible (existing clients only consult copiesCrc on path-lookup miss). Part of BUNDLEHASH_MIGRATION §4.2.1 runtime guarantee.