@hot-updater/react-native 1.0.0-rc.0 → 1.0.0-rc.1

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.
Files changed (39) hide show
  1. package/lib/commonjs/checkForUpdate.js +1 -1
  2. package/lib/commonjs/checkForUpdate.js.map +1 -1
  3. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js +1 -1
  4. package/lib/commonjs/checkForUpdate.releaseCatalog.spec.js.map +1 -1
  5. package/lib/commonjs/index.js +2 -2
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/index.spec.js +3 -3
  8. package/lib/commonjs/index.spec.js.map +1 -1
  9. package/lib/commonjs/native.js +8 -6
  10. package/lib/commonjs/native.js.map +1 -1
  11. package/lib/commonjs/sdkVersion.js +1 -1
  12. package/lib/module/checkForUpdate.js +2 -2
  13. package/lib/module/checkForUpdate.js.map +1 -1
  14. package/lib/module/checkForUpdate.releaseCatalog.spec.js +1 -1
  15. package/lib/module/checkForUpdate.releaseCatalog.spec.js.map +1 -1
  16. package/lib/module/index.js +3 -3
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/module/index.spec.js +3 -3
  19. package/lib/module/index.spec.js.map +1 -1
  20. package/lib/module/native.js +6 -4
  21. package/lib/module/native.js.map +1 -1
  22. package/lib/module/sdkVersion.js +1 -1
  23. package/lib/typescript/commonjs/index.d.ts +3 -3
  24. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  25. package/lib/typescript/commonjs/native.d.ts +5 -3
  26. package/lib/typescript/commonjs/native.d.ts.map +1 -1
  27. package/lib/typescript/commonjs/sdkVersion.d.ts +1 -1
  28. package/lib/typescript/module/index.d.ts +3 -3
  29. package/lib/typescript/module/index.d.ts.map +1 -1
  30. package/lib/typescript/module/native.d.ts +5 -3
  31. package/lib/typescript/module/native.d.ts.map +1 -1
  32. package/lib/typescript/module/sdkVersion.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/src/checkForUpdate.releaseCatalog.spec.ts +1 -1
  35. package/src/checkForUpdate.ts +2 -2
  36. package/src/index.spec.ts +3 -3
  37. package/src/index.ts +3 -3
  38. package/src/native.ts +6 -4
  39. package/src/sdkVersion.ts +1 -1
package/src/index.spec.ts CHANGED
@@ -30,7 +30,7 @@ const mocks = vi.hoisted(() => {
30
30
  getFingerprintHash: vi.fn(() => null),
31
31
  getInstallId: vi.fn(() => "install-id"),
32
32
  getManifest: vi.fn(() => null),
33
- getMinimumReleaseId: vi.fn(() => "min-bundle-id"),
33
+ getMinBundleId: vi.fn(() => "min-bundle-id"),
34
34
  getReleaseId: vi.fn(async () => null),
35
35
  init: vi.fn(),
36
36
  isChannelSwitched: vi.fn(() => false),
@@ -67,7 +67,7 @@ vi.mock("./native", () => ({
67
67
  getFingerprintHash: mocks.getFingerprintHash,
68
68
  getInstallId: mocks.getInstallId,
69
69
  getManifest: mocks.getManifest,
70
- getMinimumReleaseId: mocks.getMinimumReleaseId,
70
+ getMinBundleId: mocks.getMinBundleId,
71
71
  getReleaseId: mocks.getReleaseId,
72
72
  isChannelSwitched: mocks.isChannelSwitched,
73
73
  notifyAppReady: mocks.notifyAppReady,
@@ -283,7 +283,7 @@ describe("HotUpdater client initialization", () => {
283
283
  const HotUpdater = await importHotUpdater();
284
284
 
285
285
  expect(HotUpdater.getInstallId()).toBe("install-id");
286
- expect(HotUpdater.getMinimumReleaseId()).toBe("min-bundle-id");
286
+ expect(HotUpdater.getMinBundleId()).toBe("min-bundle-id");
287
287
  HotUpdater.setUser({ userId: "user-123", username: "alice" });
288
288
  expect(mocks.setUser).toHaveBeenCalledWith({
289
289
  userId: "user-123",
package/src/index.ts CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  getFingerprintHash,
19
19
  getInstallId,
20
20
  getManifest,
21
- getMinimumReleaseId,
21
+ getMinBundleId,
22
22
  getReleaseId,
23
23
  isChannelSwitched,
24
24
  notifyAppReady,
@@ -337,8 +337,8 @@ function createHotUpdaterClient() {
337
337
  */
338
338
  getBundleId,
339
339
 
340
- /** Preferred Release-catalog name for the build-time UUIDv7 floor. */
341
- getMinimumReleaseId,
340
+ /** Returns the minimum bundle ID based on the native app build time. */
341
+ getMinBundleId,
342
342
 
343
343
  /** Returns the active Release identity, or null for BUILTIN/legacy state. */
344
344
  getReleaseId,
package/src/native.ts CHANGED
@@ -215,7 +215,7 @@ const getNativeBundleId = (): string | null => {
215
215
  };
216
216
 
217
217
  const resolveBundleId = (bundleId: string | null): string => {
218
- return !bundleId || bundleId === NIL_UUID ? getMinimumReleaseId() : bundleId;
218
+ return !bundleId || bundleId === NIL_UUID ? getMinBundleId() : bundleId;
219
219
  };
220
220
 
221
221
  const getFreshBundleId = (): string => {
@@ -588,11 +588,13 @@ export function setReloadBehavior(
588
588
  }
589
589
 
590
590
  /**
591
- * Fetches the build-time minimum Release id.
591
+ * Fetches the minimum bundle id created from the native app build time.
592
592
  *
593
- * @returns {string} The minimum Release id.
593
+ * Release Catalog selection uses this value as its minimum Release id.
594
+ *
595
+ * @returns {string} The minimum bundle id.
594
596
  */
595
- export const getMinimumReleaseId = (): string => {
597
+ export const getMinBundleId = (): string => {
596
598
  const constants = HotUpdaterNative.getConstants();
597
599
  return constants.MIN_BUNDLE_ID;
598
600
  };
package/src/sdkVersion.ts CHANGED
@@ -1 +1 @@
1
- export const HOT_UPDATER_SDK_VERSION = "1.0.0-rc.0";
1
+ export const HOT_UPDATER_SDK_VERSION = "1.0.0-rc.1";