@bravemobile/react-native-code-push 9.1.0 → 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 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
 
@@ -472,7 +472,7 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
472
472
 
473
473
  syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE);
474
474
  const remotePackage = await checkForUpdate(handleBinaryVersionMismatchCallback);
475
- remotePackageLabel = remotePackage.label;
475
+ remotePackageLabel = remotePackage?.label;
476
476
 
477
477
  const doDownloadAndInstall = async () => {
478
478
  syncStatusChangeCallback(CodePush.SyncStatus.DOWNLOADING_PACKAGE);
@@ -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 --target-binary-version 1.0.0 --app-version 1.0.1 \
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
- - `--target-binary-version`: The version of the binary app that the CodePush update is targeting.
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 `--target-binary-version` (SemVer comparison).
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 --target-binary-version 1.0.0 --app-version 1.0.1 \
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
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bravemobile/react-native-code-push",
3
- "version": "9.1.0",
3
+ "version": "9.1.2",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",