Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/fix-type-assertions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@perstack/api-client": patch
"@perstack/anthropic-provider": patch
"@perstack/provider-core": patch
"@perstack/react": patch
---

Fixed prohibited 'as' type assertions by replacing them with proper type guards

139 changes: 114 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ permissions:
contents: read

env:
CI: 'true'
PNPM_VERSION: '10.10.0'
NODE_VERSION: '22'
CI: "true"
PNPM_VERSION: "10.10.0"
NODE_VERSION: "22"

jobs:
quality:
name: Lint / Format / Knip
lint:
name: Lint / Format
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
Expand All @@ -35,30 +35,133 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint & Format check
run: pnpm run format-and-lint

typecheck:
name: Type Check
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Type check
run: pnpm run typecheck

check-deps:
name: Check Dependencies
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check unused dependencies
run: pnpm run check-deps

validate-versions:
name: Validate Versions
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Validate version sync
run: pnpm run validate:versions

validate-changeset:
name: Validate Changeset
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Validate changesets
run: pnpm run validate:changeset
if: github.event_name == 'pull_request'

check-schema-diff:
name: Check Schema Diff
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check schema diff
run: pnpm run check:schema-diff
if: github.event_name == 'pull_request'

test:
name: Test
Expand All @@ -76,7 +179,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -112,7 +215,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -149,24 +252,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check changeset
run: pnpm changeset status --since=origin/main

ci-success:
name: CI Success
runs-on: ubuntu-24.04
needs: [quality, test, build]
if: always() && (github.event_name == 'push' || github.event.pull_request.draft == false)
steps:
- name: Check all job statuses
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
echo "::error::One or more CI jobs failed"
exit 1
fi
echo "✅ All CI checks passed!"
50 changes: 0 additions & 50 deletions .github/workflows/issue-bot.yml

This file was deleted.