Skip to content

Releases

v2.30.1

Choose a tag to compare

@sunnylqm sunnylqm released this 24 Nov 01:40
  • fix(bundle): harmony compiles Hermes by default again (regressed since 2.9; --no-hermes opts out)
  • fix(cli): print the CLI version once per command

v2.30.0

Choose a tag to compare

@sunnylqm sunnylqm released this 20 Nov 04:48

English

  • Uploads can now use every backup address the server offers (backupUrls), not only one. While the primary address answers within 150 ms it is used as before. Otherwise the primary and every backup are timed by TLS handshake, over IPv4 and IPv6 separately, and tried fastest first.
  • An upload sticks to the IP family that probed faster. Some edge networks answer IPv6 lookups with a far-away address while their IPv4 edge is close; from Singapore this cut the handshake to one upload address from about a second to under 10 ms.
  • A form upload that fails on the network, or is answered with 403, 410, 413 or 5xx, now moves on to the next address instead of failing the command. Presigned PUT uploads and the parts of a chunked upload stay on the address they were issued for.
  • Servers that send only backupUrl are handled as before.

中文

  • 上传现在可以使用服务端下发的全部备选地址(backupUrls),不再只有一个。主地址 150 ms 内能连上时照旧使用;否则对主地址和所有备选按 IPv4、IPv6 分别做 TLS 握手测速,从快到慢依次尝试。
  • 上传固定走测速更快的 IP 协议族。部分边缘网络的 IPv6 解析会给出很远的地址、而 IPv4 边缘就在附近;在新加坡实测,其中一个上传地址的握手从约 1 秒降到 10 ms 以内。
  • 表单上传遇到网络错误,或收到 403、410、413、5xx 时,会改用下一个地址,而不是直接失败。预签名 PUT 和分片上传仍只使用签发时的地址。
  • 只下发 backupUrl 的服务端,行为与之前相同。

Full changelog: v2.29.5...v2.30.0

v2.29.5

Choose a tag to compare

@sunnylqm sunnylqm released this 18 Nov 03:52

English

  • Network failures no longer stop at a bare fetch failed: the underlying cause (for example getaddrinfo ENOTFOUND …, UND_ERR_CONNECT_TIMEOUT, or a TLS certificate code) is now shown without setting RNU_DEBUG=1.
  • DNS failures, connect timeouts, socket errors and untrusted-root TLS errors (common behind HTTPS-inspecting proxies) now get the network troubleshooting tips, which also mention NODE_EXTRA_CA_CERTS.
  • When none of the API endpoints answers, the CLI now says the local network reaches none of them and suggests pinning a working one with RNU_API, instead of silently falling back to the first endpoint.

中文

  • 网络失败不再只显示 fetch failed:无需设置 RNU_DEBUG=1,即会附带底层原因(如 getaddrinfo ENOTFOUND …、UND_ERR_CONNECT_TIMEOUT 或 TLS 证书错误码)。
  • DNS 解析失败、连接超时、socket 错误以及根证书不受信任(常见于会替换 HTTPS 证书的代理)现在也会给出网络排查提示,并新增 NODE_EXTRA_CA_CERTS 的说明。
  • 所有 API 线路都探测失败时,CLI 会明确提示本机无法连接任何线路,并建议用 RNU_API 指定可用线路,而不是静默改用第一条线路。

Full changelog: v2.29.4...v2.29.5

v2.29.4

Choose a tag to compare

@sunnylqm sunnylqm released this 02 Nov 14:05
5ad966e

English

  • uploadApk and uploadAab now keep resources.arsc in the slim package they upload, deflated when the APK stores it uncompressed. It lets the server map a resource name and density to its path in the APK. It is not used as a diff origin.
  • The npm homepage now points to cresc.dev.

中文

  • uploadApk 和 uploadAab 上传的精简包现在会保留 resources.arsc;如果 APK 中是未压缩存储,则压缩后再保留。服务端可以据此把资源名和密度对应到它在 APK 中的路径。它不会作为差量来源使用。
  • npm 主页现已指向 cresc.dev。

v2.29.3

Choose a tag to compare

@sunnylqm sunnylqm released this 14 Oct 02:40
ca5816e
  • parseApk / parseIpa / parseApp / parseAab now print JSON and omit the raw bundle bytes, so the bundleHash content fingerprint is clean to read (#100).

v2.29.2

Choose a tag to compare

@sunnylqm sunnylqm released this 12 Oct 07:54
b86803b

English

Fixes

  • bundle no longer hangs when the .ppk cannot be written: a full disk, a read-only directory, or an output path that is a directory left packing waiting forever. It now fails with the write error and removes the partial file. (#98)
  • No crash on a write error while building a patch or a slimmed native package: such an error could surface as an unhandled rejection and end the process before the partial file was cleaned up. It is now reported normally and the partial file is removed. (#98)

Improvements

  • Fewer dependencies: cgbi-to-png and properties are removed. hermesEnabled in android/gradle.properties is read directly, with the same results for the usual forms (=/:/space separators, comments, last assignment wins). (#98)
  • Faster package commands: uploadApk / uploadIpa / parseApk / parseIpa read the archive once instead of twice. The APK/IPA reader now only parses the fields the CLI uses (version name, pushy_build_time meta-data), and the output is unchanged on real release APKs. (#98)
  • Cheaper version check: the background "newer version available" check only reads the registry's latest tag. It no longer resolves installed copies on every check. The cache location and format are unchanged. (#98)
  • Sentry upload runs sentry-cli sourcemaps upload --help once instead of twice to detect its capabilities. (#98)
  • Hermes base verification: internal cleanup with no behavior change. The diff-transform layout sent with patches is byte-identical for every HBC version. docs/hermes-base-verification.md now covers HBC v99. (#99)

Behavior notes

  • A corrupt HarmonyOS .app now reports the underlying zip error instead of "bundle not found", like .apk / .ipa already did.
  • selectApp with a malformed update.json now fails with the same "failed to parse update.json" error that other commands give.

About 2,700 lines of dead or duplicated code were removed in #98 and #99.

Full Changelog: v2.29.1...v2.29.2

中文

修复

  • .ppk 写不进去时,bundle 不再卡住:磁盘已满、目录只读,或输出路径本身是一个目录时,打包原先会一直等待。现在会直接报出写入错误,并删除写了一半的文件。(#98)
  • 生成补丁包或精简原生包时遇到写入错误,进程不再崩溃:这类错误原先可能变成未处理的 Promise 拒绝,在清理半成品文件之前就让进程退出。现在会正常报错,并删除半成品文件。(#98)

改进

  • 依赖更少:移除了 cgbi-to-png 和 properties。android/gradle.properties 中的 hermesEnabled 改为直接读取,常见写法(=/:/空格分隔、注释、以最后一次赋值为准)的结果与原来一致。(#98)
  • 原生包命令更快:uploadApk / uploadIpa / parseApk / parseIpa 对安装包只扫描一遍,原来要扫两遍。APK/IPA 解析现在只解析 CLI 用到的字段(版本名、pushy_build_time meta-data),在真实 release APK 上的输出不变。(#98)
  • 版本检查更轻:后台的“有新版本”检查只读取 registry 的 latest 标签,不再在每次检查时查找本地已安装的副本。缓存位置和格式不变。(#98)
  • Sentry 上传检测 sentry-cli 能力时,只运行一次 sentry-cli sourcemaps upload --help,原来要运行两次。(#98)
  • Hermes base 校验:内部清理,行为不变。随补丁下发的 diff-transform 布局对所有 HBC 版本逐字节一致。docs/hermes-base-verification.md 补充了 HBC v99 的内容。(#99)

行为说明

  • HarmonyOS .app 文件损坏时,现在会报出底层的 zip 错误,不再提示“找不到 bundle”。这与 .apk / .ipa 原有的行为一致。
  • update.json 格式错误时,selectApp 现在会报出与其它命令相同的“解析 update.json 失败”错误。

#98 和 #99 共删除了约 2,700 行无用或重复的代码。

完整变更:v2.29.1...v2.29.2

v2.29.1

Choose a tag to compare

@sunnylqm sunnylqm released this 12 Oct 03:50
2f68d62

Changes

  • Fewer dependencies: bytebuffer, fs-extra, node-fetch and form-data (and their transitive deps) are replaced by Node built-ins. (#97)
  • Uploads stream over node:http(s) with the same proxy support, Content-Length framing, retries and multipart format; a file that shrinks mid-upload now fails at once instead of waiting out the deadline.
  • APK parsing: resources.arsc is decoded ~5× faster.
  • Fix: app names from UTF-16 resource string pools (older aapt output) were garbled (M\0y\0A\0p\0p\0).
  • Fix: emptying the bundle output directory no longer treats an unreadable directory as already empty.

v2.29.0

Choose a tag to compare

@sunnylqm sunnylqm released this 04 Oct 12:31
4704131
  • feat(hermes): 支持 Hermes 字节码 HBC v99(hermes-compiler 260318099,RN 0.88):HBC 差分变换沿用晚期 v98 文件布局;--verifyHermesBase 等价校验支持 v99 函数头(去 NumCacheNewObject),遇 typed 模式 NewTypedObjectWithBuffer 按无法校验处理
  • ci: 真实编译器矩阵加入 [email protected]

v2.28.3

Choose a tag to compare

@sunnylqm sunnylqm released this 30 Sep 04:57
3ac05b5
  • feat(publish): 明文 JS bundle 发布时上报 bytecodeVersion 0(不再不报),服务端据此不再把它当作 Hermes 基础包反复下载检查
  • feat(package): 上传原生包时上报内嵌 bundle 的 bytecodeVersion(HBC 版本或 0),服务端退到原生包作基础时只选版本匹配或未知的包
  • 日志:服务端基础包为明文 JS 时显示 plain JS

v2.28.2

Choose a tag to compare

@sunnylqm sunnylqm released this 30 Sep 04:03
7e6ef3e
  • fix(hermes-base): Range 下载的超时取整。之前 bundle 超过 64 KB 时超时为小数,Node 的 AbortSignal.timeout() 报错,按需下载总是退回整包下载
  • feat(hermes-base): 服务端不知道基础包的 HBC 版本时,先读 bundle 前 128 字节;是普通 JS 或其他 HBC 版本就直接放弃,不再下载整个 bundle