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
5 changes: 3 additions & 2 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Generate DTS
shell: bash
run: npm run generate:dts
run: npx tsx workflow/generate-dts.ts

- name: Run unit tests
id: unit-tests
Expand All @@ -54,6 +54,8 @@ jobs:
- name: Check DTS API compatibility
if: github.event_name == 'pull_request'
shell: bash
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
BASE_REF="origin/${{ github.base_ref }}"
SNAP_FILE="tests/__snapshots__/dts-snapshot.test.ts.snap"
Expand All @@ -66,7 +68,6 @@ jobs:

# Check if snapshot file changed compared to base branch
if git diff --name-only "$BASE_REF"...HEAD | grep -q "$SNAP_FILE"; then
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ "$PR_TITLE" != *"[break]"* ]]; then
echo "::error::DTS API breaking change detected! The snapshot file changed but the PR title does not contain [break]."
echo "::error::If this change is intentional, add [break] to your PR title."
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"check:e2e-coverage": "tsx e2e/scripts/check-coverage.ts",
"check:e2e-coverage:report": "tsx e2e/scripts/check-coverage.ts --save",
"generate:mcp-types": "node --max-old-space-size=4096 node_modules/tsx/dist/cli.mjs e2e/scripts/generate-mcp-types.ts",
"generate:dts": "tsx workflow/generate-dts.ts & npx jest tests/dts-snapshot.test.ts -u",
"generate:dts": "tsx workflow/generate-dts.ts && npx jest tests/dts-snapshot.test.ts -u",
"install:engine": "cd ./packages/engine && npm i",
"compiler": "FORCE_UPDATE=true npm i",
"compiler:engine": "node --max-old-space-size=8192 workflow/compiler-engine.js --force",
Expand Down
Loading