diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b03fe8..864d57f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,9 @@ on: required: true default: "main" +env: + PNPM_VERSION: 9.12.1 + jobs: setup: runs-on: ubuntu-latest @@ -21,8 +24,13 @@ jobs: with: ref: ${{ github.head_ref || github.event.inputs.branch }} - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -30,7 +38,7 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install test: runs-on: ubuntu-latest @@ -40,8 +48,13 @@ jobs: with: ref: ${{ github.head_ref || github.event.inputs.branch }} - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -49,10 +62,10 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Run tests - run: bun run test + run: pnpm run test lint: runs-on: ubuntu-latest @@ -62,8 +75,13 @@ jobs: with: ref: ${{ github.head_ref || github.event.inputs.branch }} - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -71,10 +89,10 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Run linter - run: bun run lint + run: pnpm run lint typecheck: runs-on: ubuntu-latest @@ -84,8 +102,13 @@ jobs: with: ref: ${{ github.head_ref || github.event.inputs.branch }} - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -93,10 +116,10 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Run typecheck - run: bun run typecheck + run: pnpm run typecheck build: runs-on: ubuntu-latest @@ -106,8 +129,13 @@ jobs: with: ref: ${{ github.head_ref || github.event.inputs.branch }} - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -115,9 +143,9 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Build run: | - bun run build - bunx publint + pnpm run build + pnpx publint diff --git a/.github/workflows/package-size.yml b/.github/workflows/package-size.yml index 1facce0..d87b205 100644 --- a/.github/workflows/package-size.yml +++ b/.github/workflows/package-size.yml @@ -7,6 +7,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + PNPM_VERSION: 9.12.1 + jobs: pkg-size-report: name: Package Size Report @@ -16,10 +19,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + + - uses: pnpm/action-setup@v4 with: - node-version: "20.x" + version: ${{ env.PNPM_VERSION }} - name: Set up Bun uses: oven-sh/setup-bun@v2 @@ -32,7 +38,7 @@ jobs: - name: Package size report uses: preactjs/compressed-size-action@v2 with: - install-script: "bun install" + install-script: "pnpm install" build-script: "build" pattern: "./dist/**/*.{js}" exclude: "{**/*.map,**/node_modules/**}" diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index d446263..32ba996 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -6,6 +6,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + PNPM_VERSION: 9.12.1 + jobs: pre-release: runs-on: ubuntu-latest @@ -14,13 +17,13 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - run: corepack enable - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version-file: package.json - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -28,9 +31,9 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Build - run: bun run build + run: pnpm run build - - run: bunx pkg-pr-new publish + - run: pnpx pkg-pr-new publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59d739c..b369e01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + PNPM_VERSION: 9.12.1 + jobs: release: name: Release @@ -18,13 +21,13 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version-file: package.json - - name: Set up Bun - uses: oven-sh/setup-bun@v2 + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Cache node_modules uses: ./.github/actions/cache-node-modules @@ -32,18 +35,18 @@ jobs: path: "**/node_modules" - name: Install dependencies - run: bun install + run: pnpm install - name: Build run: | - bun run build - bunx publint + pnpm run build + pnpx publint - name: Create Release Pull Request id: changesets uses: changesets/action@v1 with: - publish: bun run release + publish: pnpm run release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..8d7d91f --- /dev/null +++ b/.mise.toml @@ -0,0 +1,2 @@ +[tools] +pnpm = "9.12.1" diff --git a/package.json b/package.json index 66736ca..5736f15 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,6 @@ "dependencies": { "@hono/zod-validator": "^0.2.2", "zod": "^3.23.8" - } + }, + "packageManager": "pnpm@9.12.1" }