From fa5bcc0be8afa245571abbe6afb8b39a81829076 Mon Sep 17 00:00:00 2001 From: "Md. Touhidur Rahman" <46617994+touhidurrr@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:58:49 +0600 Subject: [PATCH 1/2] fix installer command for bun --- ark/docs/components/InstallationTabs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ark/docs/components/InstallationTabs.tsx b/ark/docs/components/InstallationTabs.tsx index 8a2b66764b..508c1230eb 100644 --- a/ark/docs/components/InstallationTabs.tsx +++ b/ark/docs/components/InstallationTabs.tsx @@ -11,7 +11,7 @@ type InstallationTabProps = { const InstallerTab = ({ name }: InstallationTabProps) => ( - {`${name} ${name === "yarn" ? "add" : "install"} arktype`} + {`${name} ${name in ["yarn", "bun"] ? "add" : "install"} arktype`} ) From 5cf129b399fe4c6214055702bfb11ef0cc48d18c Mon Sep 17 00:00:00 2001 From: "Md. Touhidur Rahman" <46617994+touhidurrr@users.noreply.github.com> Date: Mon, 15 Sep 2025 00:56:49 +0600 Subject: [PATCH 2/2] refactor installation tabs to use commands object --- ark/docs/components/InstallationTabs.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ark/docs/components/InstallationTabs.tsx b/ark/docs/components/InstallationTabs.tsx index 508c1230eb..89caa9378b 100644 --- a/ark/docs/components/InstallationTabs.tsx +++ b/ark/docs/components/InstallationTabs.tsx @@ -1,22 +1,25 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs" import { CodeBlock } from "./CodeBlock.tsx" -const installers = ["pnpm", "npm", "yarn", "bun"] as const satisfies string[] - -export type Installer = (typeof installers)[number] +const installerCommands = { + pnpm: "install", + npm: "install", + yarn: "add", + bun: "add" +} as const satisfies Record type InstallationTabProps = { - name: Installer + name: keyof typeof installerCommands } const InstallerTab = ({ name }: InstallationTabProps) => ( - {`${name} ${name in ["yarn", "bun"] ? "add" : "install"} arktype`} + {`${name} ${installerCommands[name]} arktype`} ) export const InstallationTabs = () => ( - +