@hot-updater/core 0.29.8 → 0.30.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.
package/dist/index.cjs CHANGED
@@ -106,7 +106,7 @@ function getRolledOutNumericCohorts(bundleId, rolloutCohortCount) {
106
106
  function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
107
107
  const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
108
108
  const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
109
- if (normalizedTargetCohorts.length > 0) return normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort);
109
+ if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
110
110
  const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
111
111
  if (normalizedRolloutCount <= 0) return false;
112
112
  if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
package/dist/index.d.cts CHANGED
@@ -90,9 +90,10 @@ interface Bundle {
90
90
  */
91
91
  rolloutCohortCount?: number | null;
92
92
  /**
93
- * Target specific cohorts for this update.
94
- * If provided, only these cohorts will receive the update.
95
- * If empty/null, rolloutCohortCount-based rollout is used.
93
+ * Additional cohorts to include for this update.
94
+ * Matching cohorts receive the update even if they are outside the current
95
+ * numeric rollout.
96
+ * If empty/null, only rolloutCohortCount-based rollout is used.
96
97
  *
97
98
  * NOTE: This field is stored in database but should NOT be returned to
98
99
  * update-check clients for security reasons. Server uses it for rollout
@@ -120,7 +121,7 @@ interface UpdateInfo {
120
121
  */
121
122
  rolloutCohortCount?: number | null;
122
123
  /**
123
- * Target specific cohorts for this update.
124
+ * Additional cohorts included for this update.
124
125
  * Used internally for rollout decisions.
125
126
  */
126
127
  targetCohorts?: string[] | null;
package/dist/index.d.mts CHANGED
@@ -90,9 +90,10 @@ interface Bundle {
90
90
  */
91
91
  rolloutCohortCount?: number | null;
92
92
  /**
93
- * Target specific cohorts for this update.
94
- * If provided, only these cohorts will receive the update.
95
- * If empty/null, rolloutCohortCount-based rollout is used.
93
+ * Additional cohorts to include for this update.
94
+ * Matching cohorts receive the update even if they are outside the current
95
+ * numeric rollout.
96
+ * If empty/null, only rolloutCohortCount-based rollout is used.
96
97
  *
97
98
  * NOTE: This field is stored in database but should NOT be returned to
98
99
  * update-check clients for security reasons. Server uses it for rollout
@@ -120,7 +121,7 @@ interface UpdateInfo {
120
121
  */
121
122
  rolloutCohortCount?: number | null;
122
123
  /**
123
- * Target specific cohorts for this update.
124
+ * Additional cohorts included for this update.
124
125
  * Used internally for rollout decisions.
125
126
  */
126
127
  targetCohorts?: string[] | null;
package/dist/index.mjs CHANGED
@@ -105,7 +105,7 @@ function getRolledOutNumericCohorts(bundleId, rolloutCohortCount) {
105
105
  function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
106
106
  const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
107
107
  const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
108
- if (normalizedTargetCohorts.length > 0) return normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort);
108
+ if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
109
109
  const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
110
110
  if (normalizedRolloutCount <= 0) return false;
111
111
  if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/core",
3
- "version": "0.29.8",
3
+ "version": "0.30.1",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,