@bravemobile/react-native-code-push 9.1.1 → 9.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CodePush.js +3 -3
- package/README.md +4 -4
- package/package.json +1 -1
package/CodePush.js
CHANGED
|
@@ -253,11 +253,11 @@ async function tryReportStatus(statusReport, retryOnAppResume) {
|
|
|
253
253
|
const label = statusReport.package.label;
|
|
254
254
|
if (statusReport.status === "DeploymentSucceeded") {
|
|
255
255
|
log(`Reporting CodePush update success (${label})`);
|
|
256
|
-
sharedCodePushOptions?.onUpdateSuccess(label);
|
|
256
|
+
sharedCodePushOptions?.onUpdateSuccess?.(label);
|
|
257
257
|
} else {
|
|
258
258
|
log(`Reporting CodePush update rollback (${label})`);
|
|
259
259
|
await NativeCodePush.setLatestRollbackInfo(statusReport.package.packageHash);
|
|
260
|
-
sharedCodePushOptions?.onUpdateRollback(label);
|
|
260
|
+
sharedCodePushOptions?.onUpdateRollback?.(label);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
@@ -564,7 +564,7 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
|
|
|
564
564
|
}
|
|
565
565
|
} catch (error) {
|
|
566
566
|
syncStatusChangeCallback(CodePush.SyncStatus.UNKNOWN_ERROR);
|
|
567
|
-
sharedCodePushOptions?.onSyncError(remotePackageLabel ?? 'unknown', error);
|
|
567
|
+
sharedCodePushOptions?.onSyncError?.(remotePackageLabel ?? 'unknown', error);
|
|
568
568
|
log(error.message);
|
|
569
569
|
throw error;
|
|
570
570
|
}
|
package/README.md
CHANGED
|
@@ -355,15 +355,15 @@ Release a CodePush update for a specific binary app version.
|
|
|
355
355
|
- Release a CodePush update `1.0.1` targeting the binary app version `1.0.0`.
|
|
356
356
|
|
|
357
357
|
```
|
|
358
|
-
npx code-push release --
|
|
358
|
+
npx code-push release --binary-version 1.0.0 --app-version 1.0.1 \
|
|
359
359
|
--platform ios --identifier staging --entry-file index.js \
|
|
360
360
|
--mandatory true
|
|
361
361
|
```
|
|
362
|
-
- `--
|
|
362
|
+
- `--binary-version`: The version of the binary app that the CodePush update is targeting.
|
|
363
363
|
- `--app-version`: The version of the CodePush update itself.
|
|
364
364
|
|
|
365
365
|
> [!IMPORTANT]
|
|
366
|
-
> `--app-version` should be greater than `--
|
|
366
|
+
> `--app-version` should be greater than `--binary-version` (SemVer comparison).
|
|
367
367
|
|
|
368
368
|
|
|
369
369
|
#### `update-history`
|
|
@@ -376,7 +376,7 @@ Update the release history for a specific CodePush update.
|
|
|
376
376
|
- Rollback the CodePush update `1.0.1` (targeting the binary app version `1.0.0`).
|
|
377
377
|
|
|
378
378
|
```
|
|
379
|
-
npx code-push update-history --
|
|
379
|
+
npx code-push update-history --binary-version 1.0.0 --app-version 1.0.1 \
|
|
380
380
|
--platform ios --identifier staging \
|
|
381
381
|
--enable false
|
|
382
382
|
```
|