Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(feature-flags): plumb feature flags to v1 #2030

Merged
merged 5 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions fern/apis/fdr/definition/navigation/v1/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

imports:
commons: ../../commons.yml
latest: ../latest/__package__.yml

types:
Slug:
Expand Down Expand Up @@ -325,6 +326,7 @@ types:
extends:
- WithNodeId
- WithPermissions
- latest.WithFeatureFlags
properties:
title: string
slug: Slug
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions packages/fdr-sdk/src/navigation/migrators/v1ToV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class FernNavigationV1ToLatest {
viewers: node.viewers,
orphaned: node.orphaned,
roles: node.roles,
featureFlags: undefined,
featureFlags: node.featureFlags,
};

return latest;
Expand Down Expand Up @@ -119,7 +119,7 @@ export class FernNavigationV1ToLatest {
pointsTo: node.pointsTo ? FernNavigation.Slug(node.pointsTo) : undefined,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand All @@ -146,7 +146,7 @@ export class FernNavigationV1ToLatest {
noindex: node.noindex,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -186,7 +186,7 @@ export class FernNavigationV1ToLatest {
pointsTo: node.pointsTo ? FernNavigation.Slug(node.pointsTo) : undefined,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -304,7 +304,7 @@ export class FernNavigationV1ToLatest {
subtitle: node.subtitle,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -363,7 +363,7 @@ export class FernNavigationV1ToLatest {
noindex: node.noindex,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -401,7 +401,7 @@ export class FernNavigationV1ToLatest {
noindex: node.noindex,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -447,7 +447,7 @@ export class FernNavigationV1ToLatest {
pointsTo: node.pointsTo ? FernNavigation.Slug(node.pointsTo) : undefined,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -480,7 +480,7 @@ export class FernNavigationV1ToLatest {
noindex: node.noindex,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand All @@ -504,7 +504,7 @@ export class FernNavigationV1ToLatest {
year: node.year,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand All @@ -528,7 +528,7 @@ export class FernNavigationV1ToLatest {
month: node.month,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand All @@ -554,7 +554,7 @@ export class FernNavigationV1ToLatest {
noindex: node.noindex,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -594,7 +594,7 @@ export class FernNavigationV1ToLatest {
availability: this.#availability(node.availability),
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -628,7 +628,7 @@ export class FernNavigationV1ToLatest {
isResponseStream: node.isResponseStream,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -673,7 +673,7 @@ export class FernNavigationV1ToLatest {
webSocketId: node.webSocketId,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down Expand Up @@ -705,7 +705,7 @@ export class FernNavigationV1ToLatest {
webhookId: node.webhookId,
viewers: node.viewers,
orphaned: node.orphaned,
featureFlags: undefined,
featureFlags: node.featureFlags,
};
return latest;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
});
}
Expand Down Expand Up @@ -158,6 +159,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
});
}
Expand All @@ -183,6 +185,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
}));
}

Expand All @@ -205,6 +208,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
}));
}

Expand Down Expand Up @@ -271,7 +275,6 @@ export class ApiReferenceNavigationConverter {
package_.subpackages.forEach((subpackageId) => {
const subpackage = this.api.subpackages[subpackageId];
if (subpackage == null) {
// eslint-disable-next-line no-console
console.error(
`Subpackage ${subpackageId} not found in ${this.apiDefinitionId}`
);
Expand Down Expand Up @@ -307,6 +310,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
}
);
Expand Down Expand Up @@ -385,14 +389,14 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
})
);
},
endpointId: (oldEndpointId) => {
const endpoint = endpoints.get(oldEndpointId.value);
if (endpoint == null) {
// eslint-disable-next-line no-console
console.error(
`Endpoint ${oldEndpointId.value} not found in ${targetSubpackageId}`
);
Expand All @@ -410,7 +414,6 @@ export class ApiReferenceNavigationConverter {
websocketId: (oldWebSocketId) => {
const webSocket = webSockets.get(oldWebSocketId.value);
if (webSocket == null) {
// eslint-disable-next-line no-console
console.error(
`WebSocket ${oldWebSocketId.value} not found in ${targetSubpackageId}`
);
Expand All @@ -428,7 +431,6 @@ export class ApiReferenceNavigationConverter {
webhookId: (oldWebhookId) => {
const webhook = webhooks.get(oldWebhookId.value);
if (webhook == null) {
// eslint-disable-next-line no-console
console.error(
`Webhook ${oldWebhookId.value} not found in ${targetSubpackageId}`
);
Expand All @@ -446,7 +448,6 @@ export class ApiReferenceNavigationConverter {
subpackage: ({ subpackageId, items, summaryPageId }) => {
const subpackage = this.api.subpackages[subpackageId];
if (subpackage == null) {
// eslint-disable-next-line no-console
console.error(
`Subpackage ${subpackageId} not found in ${targetSubpackageId}`
);
Expand Down Expand Up @@ -494,6 +495,7 @@ export class ApiReferenceNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
});
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class ChangelogNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
});
}
Expand Down Expand Up @@ -102,6 +103,7 @@ export class ChangelogNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
})
),
Expand Down Expand Up @@ -129,6 +131,7 @@ export class ChangelogNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
}))
),
"month",
Expand Down Expand Up @@ -157,6 +160,7 @@ export class ChangelogNavigationConverter {
authed: undefined,
viewers: undefined,
orphaned: undefined,
featureFlags: undefined,
};
});
}
Expand Down
Loading
Loading