@novacraft-engineering/pulsar-code-push 1.5.4 → 1.5.5

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.
@@ -570,11 +570,19 @@ static NSString *const LatestRollbackCountKey = @"count";
570
570
  } else {
571
571
  CPLog(@"Attempted to perform a rollback when there is no current update");
572
572
  }
573
- } else {
574
- // Write the current package's metadata to the "failed list"
575
- [self saveFailedUpdate:failedPackage];
573
+ // Nothing to roll back to. This happens when a pending update was
574
+ // recorded before a binary update: bundleURL clears the packages
575
+ // because the app version changed, but CODE_PUSH_PENDING_UPDATE lives
576
+ // in NSUserDefaults and survives. Reloading here re-enters this same
577
+ // path on the new bridge, so the app reload-loops on a blank screen
578
+ // until it is killed. Drop the stale flag and keep the loaded bundle.
579
+ [CodePush removePendingUpdate];
580
+ return;
576
581
  }
577
582
 
583
+ // Write the current package's metadata to the "failed list"
584
+ [self saveFailedUpdate:failedPackage];
585
+
578
586
  // Rollback to the previous version and de-register the new update
579
587
  [CodePushPackage rollbackPackage];
580
588
  [CodePush removePendingUpdate];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novacraft-engineering/pulsar-code-push",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Pulsar OTA client for React Native — over-the-air JavaScript updates. A CodePush-compatible client (RevoPush lineage) pointed at Pulsar.",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",