From ef003563c0b91f820e359b8105e8582ec144c5d2 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Fri, 4 Sep 2026 15:45:23 +0800 Subject: [PATCH] chore: release 10.56.0 - proguard: keep `reload(java.lang.String)` with a wildcard return type on ReactHostImpl and every ReactHost implementation. RN's reload returns TaskInterface, so the `void reload(...)` rule from the audit matched nothing and an R8-minified new-architecture build renamed the method, making restartApp reject RESTART_FAILED. Found by the minified release build the audit asked for; every other JNI class, native method and reflection target was verified present in the R8 output. - check-packlist: accept npm 12's object-shaped `pack --json` output as well as the array older npm prints. - bump package.json and oh-package.json5 to 10.56.0. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_0149oHt3QpNA3XNocSBVFNCh --- android/proguard.pro | 9 ++++++++- harmony/pushy/oh-package.json5 | 2 +- package.json | 2 +- scripts/check-packlist.js | 6 +++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/android/proguard.pro b/android/proguard.pro index 3c0c3cb8..01f089c2 100644 --- a/android/proguard.pro +++ b/android/proguard.pro @@ -46,7 +46,14 @@ *** useDevSupport; *** mReactHostDelegate; *** reactHostDelegate; - void reload(java.lang.String); + *** reload(java.lang.String); +} +# reload(String) returns TaskInterface (not void) and is looked up on +# the runtime class of whatever ReactHost the app provides; the `***` return +# type is what makes the rule match — verified against an R8-minified +# RN 0.85 build, where `void reload(...)` silently kept nothing. +-keepclassmembers class * implements com.facebook.react.ReactHost { + *** reload(java.lang.String); } -keepclassmembers class * implements com.facebook.react.runtime.ReactHostDelegate { *** jsBundleLoader; diff --git a/harmony/pushy/oh-package.json5 b/harmony/pushy/oh-package.json5 index f8cff1bb..e69adbda 100644 --- a/harmony/pushy/oh-package.json5 +++ b/harmony/pushy/oh-package.json5 @@ -7,7 +7,7 @@ name: 'pushy', description: '', main: 'index.ets', - version: '10.55.1', + version: '10.56.0', dependencies: { '@rnoh/react-native-openharmony': '>=0.72.96', }, diff --git a/package.json b/package.json index 09306f3b..27c2a048 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "10.55.1", + "version": "10.56.0", "description": "react-native hot update", "main": "src/index", "types": "src/index.ts", diff --git a/scripts/check-packlist.js b/scripts/check-packlist.js index 34e25b66..4b06cada 100644 --- a/scripts/check-packlist.js +++ b/scripts/check-packlist.js @@ -67,7 +67,11 @@ const json = execFileSync( ['pack', '--dry-run', '--json', '--ignore-scripts'], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] } ); -const files = JSON.parse(json)[0].files.map((f) => f.path); +// npm <= 11 prints an array of packed tarballs; npm 12 prints an object +// keyed by package name. Accept both. +const parsed = JSON.parse(json); +const packed = Array.isArray(parsed) ? parsed[0] : Object.values(parsed)[0]; +const files = packed.files.map((f) => f.path); const set = new Set(files); const problems = [];