From 8b3c7e72f1f6124416785fe4dd74cd55d2f7748d Mon Sep 17 00:00:00 2001 From: BrickheadJohnny Date: Tue, 26 Nov 2024 15:05:47 +0100 Subject: [PATCH 1/3] feat(GuildCard): display member count and role count --- src/app/(dashboard)/explorer/components/GuildCard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(dashboard)/explorer/components/GuildCard.tsx b/src/app/(dashboard)/explorer/components/GuildCard.tsx index 7c9ba80f0c..bc19365ba9 100644 --- a/src/app/(dashboard)/explorer/components/GuildCard.tsx +++ b/src/app/(dashboard)/explorer/components/GuildCard.tsx @@ -38,11 +38,11 @@ export const GuildCard: FunctionComponent<{ guild: Guild }> = ({ guild }) => { {new Intl.NumberFormat("en", { notation: "compact", - }).format(12345)} + }).format(guild.memberCount)} - 5 groups + {`${guild.roleCount} roles`} From b185823d0cc5a0158909834abdf70b2c420f406a Mon Sep 17 00:00:00 2001 From: BrickheadJohnny Date: Tue, 26 Nov 2024 15:07:02 +0100 Subject: [PATCH 2/3] fix: ImageUrlSchema --- .../create-guild/components/CreateGuildFormProvider.tsx | 1 + src/lib/schemas/common.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx b/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx index b1cc73d122..9ffac2ab90 100644 --- a/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx +++ b/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx @@ -10,6 +10,7 @@ const defaultValues = { imageUrl: "", urlName: "test", contact: "", + description: "", } satisfies CreateGuildForm; const CreateGuildFormProvider = ({ children }: PropsWithChildren) => { diff --git a/src/lib/schemas/common.ts b/src/lib/schemas/common.ts index 36ce381d31..43f6779f29 100644 --- a/src/lib/schemas/common.ts +++ b/src/lib/schemas/common.ts @@ -4,7 +4,7 @@ export const NameSchema = z .string() .max(255, "Maximum name length is 255 characters"); -export const ImageUrlSchema = z.string().url().max(255); +export const ImageUrlSchema = z.literal("").or(z.string().url().max(255)); export const LogicSchema = z.enum(["AND", "OR", "ANY_OF"]); From ee2f727b1eeab10b59adfbaf14198a3440f5396e Mon Sep 17 00:00:00 2001 From: BrickheadJohnny <92519134+BrickheadJohnny@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:18:43 +0100 Subject: [PATCH 3/3] feat: use Bun in the `code-check` GitHub Action (#1568) --- .github/workflows/code-check.yml | 10 ++++------ .husky/pre-commit | 4 ++-- README.md | 6 +++--- package.json | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index c8c04ba4a5..3b66aa7dda 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -19,11 +19,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 + - name: Set up Bun + uses: oven-sh/setup-bun@v2 - name: Install dependencies - run: npm install + run: bun install - name: Run TypeScript compiler - run: npm run type-check + run: bun run type-check diff --git a/.husky/pre-commit b/.husky/pre-commit index b7c038d4ce..2142df55d3 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged -npm run type-check -- --incremental true +bunx lint-staged +bun run type-check -- --incremental true diff --git a/README.md b/README.md index 3ad085d788..1997db2a30 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ Open source interface for Guild.xyz -- a tool for platformless membership manage ### Running the interface locally -1. `npm i` -2. `npm run dev` +1. `bun i` +2. `bun run dev` 3. If you don't have the secret environment variables, copy the `.env.example` as `.env.local`. Open [http://localhost:3000](http://localhost:3000) in your browser to see the result. @@ -45,7 +45,7 @@ Open [http://localhost:3000](http://localhost:3000) in your browser to see the r ### Getting secret environment variables (for core team members): 1. Get added to the team on Vercel -1. `npm i vercel@latest -g` +1. `bun i vercel@latest -g` 1. `vercel link` 1. `vercel env pull .env.local` diff --git a/package.json b/package.json index 3c91e981bc..564104f712 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "next build", "start": "next start", "type-check": "tsc --pretty --noEmit --incremental false", - "write-check": "npx @biomejs/biome check --write --unsafe .", + "write-check": "bunx @biomejs/biome check --write --unsafe .", "storybook": "storybook dev -p 6006 --no-open", "build-storybook": "storybook build" },