feat(FN-2611): merge fusion/fn-2611 (auto-resolved)
- feat(FN-2611): complete Step 4 — add changeset and docs - test(FN-2611): complete Step 2 — cover legacy alias cleanup payload - feat(FN-2611): complete Step 1 — normalize legacy experimental aliases
This commit is contained in:
@@ -126,16 +126,22 @@ function isExperimentalFeatureEnabled(features: Record<string, boolean>, key: st
|
||||
);
|
||||
}
|
||||
|
||||
function normalizeExperimentalFeaturesForSave(features?: Record<string, boolean>): Record<string, boolean> {
|
||||
function normalizeExperimentalFeaturesForSave(features?: Record<string, boolean>): Record<string, boolean | null> {
|
||||
if (!features) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const normalized: Record<string, boolean> = {};
|
||||
const normalized: Record<string, boolean | null> = {};
|
||||
for (const [key, enabled] of Object.entries(features)) {
|
||||
normalized[getCanonicalExperimentalFeatureKey(key)] = enabled;
|
||||
}
|
||||
|
||||
for (const [legacyKey, canonicalKey] of Object.entries(EXPERIMENTAL_FEATURE_LEGACY_ALIASES)) {
|
||||
if (normalized[canonicalKey] !== undefined && !(legacyKey in normalized)) {
|
||||
normalized[legacyKey] = null;
|
||||
}
|
||||
}
|
||||
|
||||
return normalized;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user