diff --git a/packages/fdr-sdk/src/navigation/versions/v1/converters/ApiReferenceNavigationConverter.ts b/packages/fdr-sdk/src/navigation/versions/v1/converters/ApiReferenceNavigationConverter.ts index bccc68cff3..1d476ed519 100644 --- a/packages/fdr-sdk/src/navigation/versions/v1/converters/ApiReferenceNavigationConverter.ts +++ b/packages/fdr-sdk/src/navigation/versions/v1/converters/ApiReferenceNavigationConverter.ts @@ -101,8 +101,7 @@ export class ApiReferenceNavigationConverter { overviewPageId, noindex, paginated: - this.paginated ?? - (this.apiSection.longScrolling === false ? true : undefined), + this.paginated ?? (!this.apiSection.longScrolling ? true : undefined), slug: slug.get(), icon: this.apiSection.icon, hidden: this.apiSection.hidden, @@ -116,6 +115,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } @@ -158,6 +158,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } @@ -183,6 +184,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, })); } @@ -205,6 +207,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, })); } @@ -271,7 +274,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}` ); @@ -307,6 +309,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; } ); @@ -385,6 +388,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }) ); @@ -392,7 +396,6 @@ export class ApiReferenceNavigationConverter { 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}` ); @@ -410,7 +413,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}` ); @@ -428,7 +430,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}` ); @@ -446,7 +447,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}` ); @@ -494,6 +494,7 @@ export class ApiReferenceNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }); }); }, @@ -537,7 +538,7 @@ export class ApiReferenceNavigationConverter { if ( existing == null || - toRet.indexOf(existing) === -1 || + !toRet.includes(existing) || existing.isResponseStream === child.isResponseStream ) { toRet.push(child); diff --git a/packages/fdr-sdk/src/navigation/versions/v1/converters/ChangelogConverter.ts b/packages/fdr-sdk/src/navigation/versions/v1/converters/ChangelogConverter.ts index 7bb4087b01..4eb01a7973 100644 --- a/packages/fdr-sdk/src/navigation/versions/v1/converters/ChangelogConverter.ts +++ b/packages/fdr-sdk/src/navigation/versions/v1/converters/ChangelogConverter.ts @@ -66,6 +66,7 @@ export class ChangelogNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } @@ -102,6 +103,7 @@ export class ChangelogNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }) ), @@ -129,6 +131,7 @@ export class ChangelogNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, })) ), "month", @@ -157,6 +160,7 @@ export class ChangelogNavigationConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } diff --git a/packages/fdr-sdk/src/navigation/versions/v1/converters/NavigationConfigConverter.ts b/packages/fdr-sdk/src/navigation/versions/v1/converters/NavigationConfigConverter.ts index 0c5d44f87c..0a8d79e8fb 100644 --- a/packages/fdr-sdk/src/navigation/versions/v1/converters/NavigationConfigConverter.ts +++ b/packages/fdr-sdk/src/navigation/versions/v1/converters/NavigationConfigConverter.ts @@ -92,15 +92,14 @@ export class NavigationConfigConverter { viewers: undefined, orphaned: undefined, roles: undefined, + featureFlags: undefined, }; // tag all children of hidden nodes as hidden FernNavigation.V1.traverseDF(toRet, (node, parents) => { if ( FernNavigation.V1.hasMetadata(node) && - parents.some( - (p) => FernNavigation.V1.hasMetadata(p) && p.hidden === true - ) + parents.some((p) => FernNavigation.V1.hasMetadata(p) && p.hidden) ) { node.hidden = true; } @@ -145,6 +144,7 @@ export class NavigationConfigConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; } ); @@ -193,6 +193,7 @@ export class NavigationConfigConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } else if (tab.type === "link") { @@ -215,7 +216,7 @@ export class NavigationConfigConverter { } else if (tab.type === "changelogV3") { return tab.node as unknown as FernNavigation.V1.ChangelogNode; } else { - assertNever(tab as never); + assertNever(tab); } }), }), @@ -252,11 +253,13 @@ export class NavigationConfigConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }), authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }); } @@ -318,6 +321,7 @@ export class NavigationConfigConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }), link: (link) => @@ -368,6 +372,7 @@ export class NavigationConfigConverter { authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, }; }), api: (apiSection) => { diff --git a/packages/fdr-sdk/src/navigation/versions/v1/converters/__test__/groupByTime.test.ts b/packages/fdr-sdk/src/navigation/versions/v1/converters/__test__/groupByTime.test.ts index c7062aa31d..bc702dd686 100644 --- a/packages/fdr-sdk/src/navigation/versions/v1/converters/__test__/groupByTime.test.ts +++ b/packages/fdr-sdk/src/navigation/versions/v1/converters/__test__/groupByTime.test.ts @@ -20,6 +20,7 @@ describe("Grouping Functions", () => { viewers: undefined, orphaned: undefined, noindex: undefined, + featureFlags: undefined, }, { id: FernNavigation.V1.NodeId("entry-2"), @@ -34,6 +35,7 @@ describe("Grouping Functions", () => { viewers: undefined, orphaned: undefined, noindex: undefined, + featureFlags: undefined, }, { id: FernNavigation.V1.NodeId("entry-3"), @@ -48,6 +50,7 @@ describe("Grouping Functions", () => { viewers: undefined, orphaned: undefined, noindex: undefined, + featureFlags: undefined, }, { id: FernNavigation.V1.NodeId("entry-4"), @@ -62,6 +65,7 @@ describe("Grouping Functions", () => { viewers: undefined, orphaned: undefined, noindex: undefined, + featureFlags: undefined, }, ]; diff --git a/packages/fdr-sdk/src/navigation/versions/v1/converters/toRootNode.ts b/packages/fdr-sdk/src/navigation/versions/v1/converters/toRootNode.ts index ddef66afca..23de59f5fa 100644 --- a/packages/fdr-sdk/src/navigation/versions/v1/converters/toRootNode.ts +++ b/packages/fdr-sdk/src/navigation/versions/v1/converters/toRootNode.ts @@ -69,6 +69,7 @@ export function toRootNode( authed: undefined, viewers: undefined, orphaned: undefined, + featureFlags: undefined, id: FernNavigation.V1.NodeId("root"), pointsTo: undefined, roles: undefined,