Skip to content

Commit 5cfec9e

Browse files
authored
Merge branch 'main' into main
2 parents 95e4155 + 7cd4dde commit 5cfec9e

File tree

55 files changed

+1906
-1788
lines changed

Some content is hidden

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

55 files changed

+1906
-1788
lines changed

.github/workflows/claude.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Claude Code
2+
on:
3+
issue_comment:
4+
types: [created, edited]
5+
pull_request_review_comment:
6+
types: [created, edited]
7+
jobs:
8+
claude:
9+
if: |
10+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && (github.event.comment.user.login == 'kevin-dp' || github.event.comment.user.login == 'KyleAMathews' || github.event.comment.user.login == 'samwillis')) ||
11+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && (github.event.comment.user.login == 'kevin-dp' || github.event.comment.user.login == 'KyleAMathews' || github.event.comment.user.login == 'samwillis'))
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
issues: write
17+
id-token: write
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # required for Claude Code
23+
- uses: anthropics/claude-code-action@v1
24+
with:
25+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
26+
# Responds to @claude mentions in comments

.github/workflows/docs-sync.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Sync Generated Docs
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: "0 2 * * *"
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
sync-docs:
17+
name: Generate and Sync Docs
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5.0.0
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Tools
26+
uses: tanstack/config/.github/setup@main
27+
28+
- name: Build Packages
29+
run: pnpm run build
30+
31+
- name: Generate Docs
32+
run: pnpm docs:generate
33+
34+
- name: Check for changes
35+
id: check_changes
36+
run: |
37+
if [ -n "$(git status --porcelain)" ]; then
38+
echo "has_changes=true" >> $GITHUB_OUTPUT
39+
echo "Changes detected in generated docs"
40+
else
41+
echo "has_changes=false" >> $GITHUB_OUTPUT
42+
echo "No changes in generated docs"
43+
fi
44+
45+
- name: Configure Git
46+
if: steps.check_changes.outputs.has_changes == 'true'
47+
run: |
48+
git config user.name "github-actions[bot]"
49+
git config user.email "github-actions[bot]@users.noreply.github.com"
50+
51+
- name: Commit and Push Changes
52+
if: steps.check_changes.outputs.has_changes == 'true'
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
BRANCH_NAME="docs/auto-generate"
57+
58+
# Check if branch exists remotely
59+
if git ls-remote --exit-code --heads origin $BRANCH_NAME; then
60+
echo "Branch exists, checking out and updating"
61+
git fetch origin $BRANCH_NAME
62+
git checkout $BRANCH_NAME
63+
git pull origin $BRANCH_NAME
64+
else
65+
echo "Creating new branch"
66+
git checkout -b $BRANCH_NAME
67+
fi
68+
69+
# Stage and commit changes
70+
git add docs/
71+
git commit -m "docs: regenerate API documentation
72+
73+
Auto-generated by daily docs sync workflow"
74+
75+
# Push changes
76+
git push origin $BRANCH_NAME
77+
78+
- name: Create or Update PR
79+
if: steps.check_changes.outputs.has_changes == 'true'
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
BRANCH_NAME="docs/auto-generate"
84+
85+
# Check if PR already exists
86+
existing_pr=$(gh pr list --head $BRANCH_NAME --json number --jq '.[0].number')
87+
88+
if [ -n "$existing_pr" ]; then
89+
echo "PR #$existing_pr already exists, it has been updated with the latest changes"
90+
gh pr comment $existing_pr --body "Updated with latest generated docs from scheduled workflow run."
91+
else
92+
echo "Creating new PR"
93+
gh pr create \
94+
--title "docs: sync generated API documentation" \
95+
--body "This PR was automatically created by the daily docs sync workflow.
96+
97+
The generated API documentation has been updated to reflect the latest changes in the codebase.
98+
99+
**Generated by**: [Docs Sync Workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
100+
101+
Please review and merge if the changes look correct." \
102+
--head $BRANCH_NAME \
103+
--base main
104+
fi

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup pnpm
1919
uses: pnpm/action-setup@v4
2020
with:
21-
version: 10.19.0
21+
version: 10.22.0
2222

2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4

.github/workflows/pr.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Tools
3030
uses: tanstack/config/.github/setup@main
3131
- name: Get base and head commits for `nx affected`
32-
uses: nrwl/nx-set-shas@v4.3.3
32+
uses: nrwl/nx-set-shas@v4.4.0
3333
with:
3434
main-branch-name: main
3535
- name: Run Checks
@@ -90,31 +90,3 @@ jobs:
9090
run: |
9191
cd examples/react/projects
9292
pnpm build
93-
check-docs:
94-
name: Check Generated Docs
95-
runs-on: ubuntu-latest
96-
steps:
97-
- name: Checkout
98-
uses: actions/checkout@v5.0.0
99-
- name: Setup Tools
100-
uses: tanstack/config/.github/setup@main
101-
- name: Build Packages
102-
run: pnpm run build
103-
- name: Generate Docs
104-
run: pnpm docs:generate
105-
- name: Check for changes
106-
run: |
107-
if [ -n "$(git status --porcelain)" ]; then
108-
echo "Error: Generated docs are out of sync!"
109-
echo ""
110-
echo "Please run the following commands locally and commit the changes:"
111-
echo " 1. pnpm install"
112-
echo " 2. pnpm build"
113-
echo " 3. pnpm docs:generate"
114-
echo " 4. git add docs/"
115-
echo " 5. git commit -m 'docs: regenerate API documentation'"
116-
echo ""
117-
echo "Files that need to be updated:"
118-
git status --short
119-
exit 1
120-
fi

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,34 @@ jobs:
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
- name: Generate Docs
45+
if: steps.changesets.outputs.published == 'true'
46+
run: pnpm docs:generate
47+
- name: Commit Generated Docs
48+
if: steps.changesets.outputs.published == 'true'
49+
run: |
50+
if [ -n "$(git status --porcelain)" ]; then
51+
git config user.name "github-actions[bot]"
52+
git config user.email "github-actions[bot]@users.noreply.github.com"
53+
54+
BRANCH="docs/auto-update-$(date +%s)"
55+
git checkout -b "$BRANCH"
56+
git add docs/
57+
git commit -m "docs: regenerate API documentation"
58+
git push origin "$BRANCH"
59+
60+
gh pr create \
61+
--title "docs: regenerate API documentation" \
62+
--body "Automated documentation update from release" \
63+
--base main \
64+
--head "$BRANCH"
65+
66+
gh pr merge "$BRANCH" --auto --squash
67+
else
68+
echo "No changes in generated docs"
69+
fi
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4472
- name: Comment on PRs about release
4573
if: steps.changesets.outputs.published == 'true'
4674
uses: tanstack/config/.github/comment-on-release@main

docs/reference/electric-db-collection/classes/ElectricDBCollectionError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: ElectricDBCollectionError
55

66
# Class: ElectricDBCollectionError
77

8-
Defined in: packages/electric-db-collection/src/errors.ts:4
8+
Defined in: [packages/electric-db-collection/src/errors.ts:4](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L4)
99

1010
## Extends
1111

@@ -26,7 +26,7 @@ Defined in: packages/electric-db-collection/src/errors.ts:4
2626
new ElectricDBCollectionError(message, collectionId?): ElectricDBCollectionError;
2727
```
2828
29-
Defined in: packages/electric-db-collection/src/errors.ts:5
29+
Defined in: [packages/electric-db-collection/src/errors.ts:5](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L5)
3030
3131
#### Parameters
3232

docs/reference/electric-db-collection/classes/ExpectedNumberInAwaitTxIdError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: ExpectedNumberInAwaitTxIdError
55

66
# Class: ExpectedNumberInAwaitTxIdError
77

8-
Defined in: packages/electric-db-collection/src/errors.ts:11
8+
Defined in: [packages/electric-db-collection/src/errors.ts:11](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L11)
99

1010
## Extends
1111

@@ -19,7 +19,7 @@ Defined in: packages/electric-db-collection/src/errors.ts:11
1919
new ExpectedNumberInAwaitTxIdError(txIdType, collectionId?): ExpectedNumberInAwaitTxIdError;
2020
```
2121
22-
Defined in: packages/electric-db-collection/src/errors.ts:12
22+
Defined in: [packages/electric-db-collection/src/errors.ts:12](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L12)
2323
2424
#### Parameters
2525

docs/reference/electric-db-collection/classes/StreamAbortedError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: StreamAbortedError
55

66
# Class: StreamAbortedError
77

8-
Defined in: packages/electric-db-collection/src/errors.ts:32
8+
Defined in: [packages/electric-db-collection/src/errors.ts:32](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L32)
99

1010
## Extends
1111

@@ -19,7 +19,7 @@ Defined in: packages/electric-db-collection/src/errors.ts:32
1919
new StreamAbortedError(collectionId?): StreamAbortedError;
2020
```
2121
22-
Defined in: packages/electric-db-collection/src/errors.ts:33
22+
Defined in: [packages/electric-db-collection/src/errors.ts:33](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L33)
2323
2424
#### Parameters
2525

docs/reference/electric-db-collection/classes/TimeoutWaitingForMatchError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: TimeoutWaitingForMatchError
55

66
# Class: TimeoutWaitingForMatchError
77

8-
Defined in: packages/electric-db-collection/src/errors.ts:25
8+
Defined in: [packages/electric-db-collection/src/errors.ts:25](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L25)
99

1010
## Extends
1111

@@ -19,7 +19,7 @@ Defined in: packages/electric-db-collection/src/errors.ts:25
1919
new TimeoutWaitingForMatchError(collectionId?): TimeoutWaitingForMatchError;
2020
```
2121
22-
Defined in: packages/electric-db-collection/src/errors.ts:26
22+
Defined in: [packages/electric-db-collection/src/errors.ts:26](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L26)
2323
2424
#### Parameters
2525

docs/reference/electric-db-collection/classes/TimeoutWaitingForTxIdError.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: TimeoutWaitingForTxIdError
55

66
# Class: TimeoutWaitingForTxIdError
77

8-
Defined in: packages/electric-db-collection/src/errors.ts:18
8+
Defined in: [packages/electric-db-collection/src/errors.ts:18](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L18)
99

1010
## Extends
1111

@@ -19,7 +19,7 @@ Defined in: packages/electric-db-collection/src/errors.ts:18
1919
new TimeoutWaitingForTxIdError(txId, collectionId?): TimeoutWaitingForTxIdError;
2020
```
2121
22-
Defined in: packages/electric-db-collection/src/errors.ts:19
22+
Defined in: [packages/electric-db-collection/src/errors.ts:19](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/errors.ts#L19)
2323
2424
#### Parameters
2525

0 commit comments

Comments
 (0)