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。