diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..bee7de7 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,39 @@ +name: PR checks + +on: + pull_request: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Lint + run: bun run lint + + - name: Format check + run: bun run format:check + + - name: Build + run: bun run build + + - name: Build example + working-directory: example + run: | + bun install --frozen-lockfile + bun test . + + - name: Test + run: bun run test diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index ba91fe0..9167446 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -44,6 +44,4 @@ jobs: - name: Publish to npm if: steps.version_check.outputs.changed == 'true' - run: | - npm install -g npm@latest - npm publish --provenance --access public + run: npm publish --provenance --access public diff --git a/dashboard/src/lib/components/PromptModal.svelte b/dashboard/src/lib/components/PromptModal.svelte index 4b509d8..73687e1 100644 --- a/dashboard/src/lib/components/PromptModal.svelte +++ b/dashboard/src/lib/components/PromptModal.svelte @@ -186,8 +186,7 @@ class="tall" bind:value={content} placeholder="Enter your system prompt here..." - required - > + required>
@@ -217,8 +216,7 @@ class="medium" bind:value={evaluationCriteria} placeholder="Describe how to evaluate the quality of AI outputs. The judge will return a score (0-1) and a reason." - required - > + required> Issues found will be used for scoring.
{/if} diff --git a/package.json b/package.json index 16025df..20a6829 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "dev:backend": "bun --watch src/server.ts", "dev:dashboard": "cd dashboard && bun run dev", "format": "bun run prettier --write \"src/**/*.ts\" \"dashboard/src/**/*.{svelte,ts}\" \"*.json\"", + "format:check": "bun run prettier --check \"src/**/*.ts\" \"dashboard/src/**/*.{svelte,ts}\" \"*.json\"", "lint": "eslint src/**/*.ts", "lint:fix": "eslint src/**/*.ts --fix", "test": "NODE_ENV=test bun test src", diff --git a/tsconfig.json b/tsconfig.json index 83414fe..ce6afb8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2022", "module": "commonjs", - "lib": ["ES2020", "ES2022.Error"], + "lib": ["ES2022"], "outDir": "./dist", "rootDir": "./src", "strict": true,