Skip to content

v2.24.0

Choose a tag to compare

@sunnylqm sunnylqm released this 31 Aug 02:03
· 14 commits to master since this release
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 发布链路。