Skip to content

Commit 84241a3

Browse files
authored
Merge branch 'main' into patch-1
2 parents d35a68f + f1844a2 commit 84241a3

File tree

302 files changed

+31354
-7222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

302 files changed

+31354
-7222
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
33
"changelog": [
44
"@svitejs/changesets-changelog-github-compact",
55
{ "repo": "TanStack/devtools" }

.github/workflows/autofix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v6.0.1
21+
uses: actions/checkout@v6.0.2
2222
- name: Setup Tools
23-
uses: tanstack/config/.github/setup@main
23+
uses: TanStack/config/.github/setup@main
2424
- name: Fix formatting
25-
run: pnpm prettier:write
25+
run: pnpm format
2626
# - name: Regenerate docs
2727
# run: pnpm docs:generate
2828
- name: Apply fixes

.github/workflows/check-skills.yml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# check-skills.yml — Drop this into your library repo's .github/workflows/
2+
#
3+
# Checks for stale intent skills after a release and opens a review PR
4+
# if any skills need attention. The PR body includes a prompt you can
5+
# paste into Claude Code, Cursor, or any coding agent to update them.
6+
#
7+
# Triggers: new release published, or manual workflow_dispatch.
8+
#
9+
# Template variables (replaced by `intent setup`):
10+
# @tanstack/devtools — e.g. @tanstack/query
11+
12+
name: Check Skills
13+
14+
on:
15+
release:
16+
types: [published]
17+
workflow_dispatch: {}
18+
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
23+
jobs:
24+
check:
25+
name: Check for stale skills
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
38+
- name: Install intent
39+
run: npm install -g @tanstack/intent
40+
41+
- name: Check staleness
42+
id: stale
43+
run: |
44+
OUTPUT=$(npx @tanstack/intent stale --json 2>&1) || true
45+
echo "$OUTPUT"
46+
47+
# Check if any skills need review
48+
NEEDS_REVIEW=$(echo "$OUTPUT" | node -e "
49+
const input = require('fs').readFileSync('/dev/stdin','utf8');
50+
try {
51+
const reports = JSON.parse(input);
52+
const stale = reports.flatMap(r =>
53+
r.skills.filter(s => s.needsReview).map(s => ({ library: r.library, skill: s.name, reasons: s.reasons }))
54+
);
55+
if (stale.length > 0) {
56+
console.log(JSON.stringify(stale));
57+
}
58+
} catch {}
59+
")
60+
61+
if [ -z "$NEEDS_REVIEW" ]; then
62+
echo "has_stale=false" >> "$GITHUB_OUTPUT"
63+
else
64+
echo "has_stale=true" >> "$GITHUB_OUTPUT"
65+
# Escape for multiline GH output
66+
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
67+
echo "stale_json<<$EOF" >> "$GITHUB_OUTPUT"
68+
echo "$NEEDS_REVIEW" >> "$GITHUB_OUTPUT"
69+
echo "$EOF" >> "$GITHUB_OUTPUT"
70+
fi
71+
72+
- name: Build summary
73+
if: steps.stale.outputs.has_stale == 'true'
74+
id: summary
75+
run: |
76+
node -e "
77+
const stale = JSON.parse(process.env.STALE_JSON);
78+
const lines = stale.map(s =>
79+
'- **' + s.skill + '** (' + s.library + '): ' + s.reasons.join(', ')
80+
);
81+
const summary = lines.join('\n');
82+
83+
const prompt = [
84+
'Review and update the following stale intent skills for @tanstack/devtools:',
85+
'',
86+
...stale.map(s => '- ' + s.skill + ': ' + s.reasons.join(', ')),
87+
'',
88+
'For each stale skill:',
89+
'1. Read the current SKILL.md file',
90+
'2. Check what changed in the library since the skill was last updated',
91+
'3. Update the skill content to reflect current APIs and behavior',
92+
'4. Run \`npx @tanstack/intent validate\` to verify the updated skill',
93+
].join('\n');
94+
95+
// Write outputs
96+
const fs = require('fs');
97+
const env = fs.readFileSync(process.env.GITHUB_OUTPUT, 'utf8');
98+
const eof = require('crypto').randomBytes(15).toString('base64');
99+
fs.appendFileSync(process.env.GITHUB_OUTPUT,
100+
'summary<<' + eof + '\n' + summary + '\n' + eof + '\n' +
101+
'prompt<<' + eof + '\n' + prompt + '\n' + eof + '\n'
102+
);
103+
"
104+
env:
105+
STALE_JSON: ${{ steps.stale.outputs.stale_json }}
106+
107+
- name: Open review PR
108+
if: steps.stale.outputs.has_stale == 'true'
109+
env:
110+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
run: |
112+
VERSION="${{ github.event.release.tag_name || 'manual' }}"
113+
BRANCH="skills/review-${VERSION}"
114+
115+
git config user.name "github-actions[bot]"
116+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
117+
git checkout -b "$BRANCH"
118+
git commit --allow-empty -m "chore: review stale skills for ${VERSION}"
119+
git push origin "$BRANCH"
120+
121+
gh pr create \
122+
--title "Review stale skills (${VERSION})" \
123+
--body "$(cat <<'PREOF'
124+
## Stale Skills Detected
125+
126+
The following skills may need updates after the latest release:
127+
128+
${{ steps.summary.outputs.summary }}
129+
130+
---
131+
132+
### Update Prompt
133+
134+
Paste this into your coding agent (Claude Code, Cursor, etc.):
135+
136+
~~~
137+
${{ steps.summary.outputs.prompt }}
138+
~~~
139+
140+
PREOF
141+
)" \
142+
--head "$BRANCH" \
143+
--base main
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# notify-intent.yml — Drop this into your library repo's .github/workflows/
2+
#
3+
# Fires a repository_dispatch event to TanStack/intent whenever docs or
4+
# source files change on merge to main. This triggers the skill staleness
5+
# check workflow in the intent repo.
6+
#
7+
# Requirements:
8+
# - A fine-grained PAT with contents:write on TanStack/intent stored
9+
# as the INTENT_NOTIFY_TOKEN repository secret.
10+
#
11+
# Template variables (replaced by `intent setup`):
12+
# @tanstack/devtools
13+
# docs/**
14+
# packages/*/src/**
15+
16+
name: Notify Intent
17+
18+
on:
19+
push:
20+
branches: [main]
21+
paths:
22+
- 'docs/**'
23+
- 'packages/*/src/**'
24+
25+
jobs:
26+
notify:
27+
name: Notify TanStack Intent
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 2
34+
35+
- name: Collect changed files
36+
id: changes
37+
run: |
38+
FILES=$(git diff --name-only HEAD~1 HEAD | jq -R -s -c 'split("\n") | map(select(length > 0))')
39+
echo "files=$FILES" >> "$GITHUB_OUTPUT"
40+
41+
- name: Dispatch to intent repo
42+
uses: peter-evans/repository-dispatch@v3
43+
with:
44+
token: ${{ secrets.INTENT_NOTIFY_TOKEN }}
45+
repository: TanStack/intent
46+
event-type: skill-check
47+
client-payload: |
48+
{
49+
"package": "@tanstack/devtools",
50+
"sha": "${{ github.sha }}",
51+
"changed_files": ${{ steps.changes.outputs.files }}
52+
}

.github/workflows/pr.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: PR
22

33
on:
44
pull_request:
5-
paths-ignore:
6-
- 'docs/**'
7-
- 'media/**'
8-
- '**/*.md'
95

106
concurrency:
117
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -16,18 +12,19 @@ env:
1612

1713
permissions:
1814
contents: read
15+
pull-requests: write
1916

2017
jobs:
2118
test:
2219
name: Test
2320
runs-on: ubuntu-latest
2421
steps:
2522
- name: Checkout
26-
uses: actions/checkout@v6.0.1
23+
uses: actions/checkout@v6.0.2
2724
with:
2825
fetch-depth: 0
2926
- name: Setup Tools
30-
uses: tanstack/config/.github/setup@main
27+
uses: TanStack/config/.github/setup@main
3128
- name: Get base and head commits for `nx affected`
3229
uses: nrwl/nx-set-shas@v4.4.0
3330
with:
@@ -39,11 +36,9 @@ jobs:
3936
runs-on: ubuntu-latest
4037
steps:
4138
- name: Checkout
42-
uses: actions/checkout@v6.0.1
43-
with:
44-
fetch-depth: 0
39+
uses: actions/checkout@v6.0.2
4540
- name: Setup Tools
46-
uses: tanstack/config/.github/setup@main
41+
uses: TanStack/config/.github/setup@main
4742
- name: Build Packages
4843
run: pnpm run build:all
4944
- name: Publish Previews
@@ -53,10 +48,18 @@ jobs:
5348
runs-on: ubuntu-latest
5449
steps:
5550
- name: Checkout
56-
uses: actions/checkout@v6.0.1
57-
with:
58-
fetch-depth: 0
51+
uses: actions/checkout@v6.0.2
5952
- name: Check Provenance
6053
uses: danielroe/provenance-action@v0.1.1
6154
with:
6255
fail-on-downgrade: true
56+
version-preview:
57+
name: Version Preview
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v6.0.2
62+
- name: Setup Tools
63+
uses: TanStack/config/.github/setup@main
64+
- name: Changeset Preview
65+
uses: TanStack/config/.github/changeset-preview@main

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,23 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v6.0.1
26+
uses: actions/checkout@v6.0.2
2727
with:
2828
fetch-depth: 0
2929
- name: Setup Tools
30-
uses: tanstack/config/.github/setup@main
30+
uses: TanStack/config/.github/setup@main
3131
- name: Run Tests
3232
run: pnpm run test:ci
3333
- name: Run Changesets (version or publish)
34-
uses: changesets/action@v1.5.3
34+
id: changesets
35+
uses: changesets/action@v1.7.0
3536
with:
3637
version: pnpm run changeset:version
3738
publish: pnpm run changeset:publish
3839
commit: 'ci: Version Packages'
3940
title: 'ci: Version Packages'
40-
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
- name: Comment on PRs about release
42+
if: steps.changesets.outputs.published == 'true'
43+
uses: TanStack/config/.github/comment-on-release@main
44+
with:
45+
published-packages: ${{ steps.changesets.outputs.publishedPackages }}

.github/workflows/triage-agent.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Issue Triage Agent
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
triage:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Triage issue with Warp Agent
16+
uses: warpdotdev/warp-agent-action@v1
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
warp_api_key: ${{ secrets.WARP_API_KEY }}
21+
profile: ${{ vars.WARP_AGENT_PROFILE || '' }}
22+
prompt: |
23+
Triage GitHub issue #${{ github.event.issue.number }} in ${{ github.repository }}.
24+
25+
## Instructions
26+
1. Read the bug report template at `.github/ISSUE_TEMPLATE/bug-report.yml` to understand required fields
27+
2. Use `gh issue view ${{ github.event.issue.number }}` to read the issue
28+
3. Evaluate if all required fields have meaningful content (not placeholders)
29+
4. If the issue is missing information or has inadequate details:
30+
- Use `gh issue comment ${{ github.event.issue.number }}` to post a friendly comment explaining what's missing
31+
5. If the issue is complete and actionable, do nothing

0 commit comments

Comments
 (0)