diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0131c43f..8c627ffd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -20,36 +20,26 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - - name: ⎔ Setup node - uses: actions/setup-node@v4 - with: - node-version: 24 - - - name: 📥 Install pnpm - uses: pnpm/action-setup@v3 + + - name: ⎔ Setup Bun + uses: oven-sh/setup-bun@v2 with: - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache + bun-version: "1.3.3" + + - name: 📦 Cache Bun dependencies + uses: actions/cache@v4 with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} restore-keys: | - ${{ runner.os }}-pnpm-store- - + ${{ runner.os }}-bun- + - name: Install dependencies - run: pnpm install --no-frozen-lockfile - + run: bun install + - name: Setup Biome uses: biomejs/setup-biome@v2 - + - name: Run Biome run: biome ci . @@ -60,30 +50,21 @@ jobs: - name: ⬇️ Checkout repo uses: actions/checkout@v4 - - name: ⎔ Setup node - uses: actions/setup-node@v4 - with: - node-version: 24 - - - name: 📥 Install pnpm - uses: pnpm/action-setup@v3 + - name: ⎔ Setup Bun + uses: oven-sh/setup-bun@v2 with: - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + bun-version: "1.3.3" - - uses: actions/cache@v4 - name: Setup pnpm cache + - name: 📦 Cache Bun dependencies + uses: actions/cache@v4 with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} restore-keys: | - ${{ runner.os }}-pnpm-store- + ${{ runner.os }}-bun- - name: Install dependencies - run: pnpm install --no-frozen-lockfile + run: bun install - name: 🔎 Type check - run: npm run typecheck --if-present + run: bun run typecheck diff --git a/.lefthook/pre-commit b/.lefthook/pre-commit index 710b2885..6a0d3069 100755 --- a/.lefthook/pre-commit +++ b/.lefthook/pre-commit @@ -16,6 +16,9 @@ call_lefthook() elif lefthook -h >/dev/null 2>&1 then lefthook "$@" + elif /Users/paul/Workspace/weaverse-project/weaverse/node_modules/lefthook-darwin-arm64/bin/lefthook -h >/dev/null 2>&1 + then + /Users/paul/Workspace/weaverse-project/weaverse/node_modules/lefthook-darwin-arm64/bin/lefthook "$@" else dir="$(git rev-parse --show-toplevel)" osArch=$(uname | tr '[:upper:]' '[:lower:]') @@ -32,7 +35,6 @@ call_lefthook() elif test -f "$dir/node_modules/lefthook/bin/index.js" then "$dir/node_modules/lefthook/bin/index.js" "$@" - elif go tool lefthook -h >/dev/null 2>&1 then go tool lefthook "$@" diff --git a/.lefthook/prepare-commit-msg b/.lefthook/prepare-commit-msg index 6efab23a..3b35c1c2 100755 --- a/.lefthook/prepare-commit-msg +++ b/.lefthook/prepare-commit-msg @@ -16,6 +16,9 @@ call_lefthook() elif lefthook -h >/dev/null 2>&1 then lefthook "$@" + elif /Users/paul/Workspace/weaverse-project/weaverse/node_modules/lefthook-darwin-arm64/bin/lefthook -h >/dev/null 2>&1 + then + /Users/paul/Workspace/weaverse-project/weaverse/node_modules/lefthook-darwin-arm64/bin/lefthook "$@" else dir="$(git rev-parse --show-toplevel)" osArch=$(uname | tr '[:upper:]' '[:lower:]') @@ -32,7 +35,6 @@ call_lefthook() elif test -f "$dir/node_modules/lefthook/bin/index.js" then "$dir/node_modules/lefthook/bin/index.js" "$@" - elif go tool lefthook -h >/dev/null 2>&1 then go tool lefthook "$@" diff --git a/.npmrc b/.npmrc index 541f0a65..134cba4a 100644 --- a/.npmrc +++ b/.npmrc @@ -1,6 +1 @@ @weaverse:registry=https://registry.npmjs.com -progress=false -node-linker=hoisted -enable-pre-post-scripts=true -package-manager-strict=false -link-workspace-packages=true diff --git a/CLAUDE.md b/CLAUDE.md index 5edd1016..8e9ee6fb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -This is the **Weaverse SDKs monorepo** - a collection of SDKs for integrating modern React/JamStack frameworks (Shopify Hydrogen, React Router, Next.js) with the Weaverse Headless CMS. The project uses pnpm for package management, Turbo for build orchestration, and Biome for code quality. +This is the **Weaverse SDKs monorepo** - a collection of SDKs for integrating modern React/JamStack frameworks (Shopify Hydrogen, React Router, Next.js) with the Weaverse Headless CMS. The project uses bun for package management, Turbo for build orchestration, and Biome for code quality. ## Essential Commands @@ -44,13 +44,13 @@ npm run changeset # Create a changeset for release ``` ### Package Management -**Important**: This project uses pnpm 10.15.0 for dependency installation (enforced), but npm for running scripts. +**Important**: This project uses bun 1.3.3 for dependency installation (enforced), but npm for running scripts. ```bash -pnpm install # Install dependencies (enforced via packageManager field) -npm run