From ee6dd5945a3972c30cc4647238b899ac196663e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20G=C3=BCner?= Date: Sat, 9 Nov 2024 01:46:28 +0300 Subject: [PATCH] chore: type issue in crnl index (#681) ### Summary We had a type issue in the `create-react-native-library` index due to using `as const` with a conditional array. I merged this code without checking the CI since it was already failing. ### Test plan 1. Make sure `yarn typecheck` passes. --- packages/create-react-native-library/src/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/create-react-native-library/src/index.ts b/packages/create-react-native-library/src/index.ts index 0471c42a8..cb46ae46a 100644 --- a/packages/create-react-native-library/src/index.ts +++ b/packages/create-react-native-library/src/index.ts @@ -150,21 +150,24 @@ const EXAMPLE_CHOICES = ( title: 'Vanilla', value: 'vanilla', description: "provides access to app's native code", + disabled: false, }, - // The test app is disabled for now until proper - // Codegen spec shipping is implemented - process.env.CRNL_ENABLE_TEST_APP && { + { title: 'Test app', value: 'test-app', description: "app's native code is abstracted away", + // The test app is disabled for now until proper + // Codegen spec shipping is implemented + disabled: !process.env.CRNL_ENABLE_TEST_APP, }, { title: 'Expo', value: 'expo', description: 'managed expo project with web support', + disabled: false, }, ] as const -).filter(Boolean); +).filter((choice) => !choice.disabled); const NEWARCH_DESCRIPTION = 'requires new arch (experimental)'; const BACKCOMPAT_DESCRIPTION = 'supports new arch (experimental)';