Skip to content

Commit 9faafef

Browse files
authored
Merge branch 'main' into report-mutation-callback-errors-async
2 parents 7556f45 + 84564f1 commit 9faafef

659 files changed

Lines changed: 16778 additions & 10680 deletions

File tree

Some content is hidden

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

.changeset/config.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/[email protected].1/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/[email protected].2/schema.json",
33
"changelog": [
44
"@svitejs/changesets-changelog-github-compact",
55
{ "repo": "TanStack/query" }
@@ -9,5 +9,9 @@
99
"baseBranch": "main",
1010
"updateInternalDependencies": "patch",
1111
"fixed": [],
12-
"linked": []
12+
"linked": [],
13+
"ignore": [],
14+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
15+
"onlyUpdatePeerDependentsWhenOutOfRange": true
16+
}
1317
}

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Feature Requests & Questions
3+
- name: 🤔 Feature Requests & Questions
44
url: https://github.com/TanStack/query/discussions
55
about: Please ask and answer questions here.
6-
- name: Community Chat
6+
- name: 💬 Community Chat
77
url: https://discord.gg/mQd7egN
8-
about: A dedicated discord server hosted by Tanner Linsley
8+
about: A dedicated discord server hosted by TanStack
9+
- name: 🦋 TanStack Bluesky
10+
url: https://bsky.app/profile/tanstack.com
11+
about: Stay up to date with new releases of our libraries

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## ✅ Checklist
66

77
- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/query/blob/main/CONTRIBUTING.md).
8-
- [ ] I have tested this code locally with `pnpm test:pr`.
8+
- [ ] I have tested this code locally with `pnpm run test:pr`.
99

1010
## 🚀 Release Impact
1111

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v5.0.0
21+
uses: actions/checkout@v6.0.1
2222
with:
2323
fetch-depth: 0
2424
- name: Setup Tools
2525
uses: tanstack/config/.github/setup@main
2626
- name: Fix formatting
27-
run: pnpm run prettier:write
27+
run: pnpm run format
2828
- name: Apply fixes
2929
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
3030
with:

.github/workflows/pr.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: PR
22

33
on:
44
pull_request:
5-
push:
6-
branches: ['svelte-5-adapter']
75

86
concurrency:
97
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -22,21 +20,19 @@ jobs:
2220
runs-on: ubuntu-latest
2321
steps:
2422
- name: Checkout
25-
uses: actions/checkout@v5.0.0
23+
uses: actions/checkout@v6.0.1
2624
with:
2725
fetch-depth: 0
2826
- name: Start Nx Agents
2927
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
3028
- name: Setup Tools
3129
uses: tanstack/config/.github/setup@main
3230
- name: Get base and head commits for `nx affected`
33-
uses: nrwl/nx-set-shas@v4.3.3
31+
uses: nrwl/nx-set-shas@v4.4.0
3432
with:
3533
main-branch-name: main
3634
- name: Run Checks
37-
run: pnpm run test:pr --parallel=3
38-
- name: Verify Links
39-
run: pnpm run verify-links
35+
run: pnpm run test:pr
4036
- name: Stop Nx Agents
4137
if: ${{ always() }}
4238
run: npx nx-cloud stop-all-agents
@@ -51,7 +47,7 @@ jobs:
5147
runs-on: ubuntu-latest
5248
steps:
5349
- name: Checkout
54-
uses: actions/checkout@v5.0.0
50+
uses: actions/checkout@v6.0.1
5551
with:
5652
fetch-depth: 0
5753
- name: Setup Tools
@@ -64,13 +60,21 @@ jobs:
6460
id: determine-sha
6561
run: |
6662
echo "COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
67-
- name: Preview Bundle Size
68-
uses: marocchino/sticky-pull-request-comment@fd19551a2a7c0d29677c63257f86d8ef8bb24b48
63+
- name: Size Limit
64+
uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d
6965
with:
70-
message: |
71-
Sizes for commit ${{ env.COMMIT_SHA }}:
72-
| Branch | Bundle Size |
73-
|--------|--------|
74-
| Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
75-
| This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
76-
continue-on-error: true
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
skip_step: install
68+
build_script: build:all
69+
provenance:
70+
name: Provenance
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Checkout
74+
uses: actions/[email protected]
75+
with:
76+
fetch-depth: 0
77+
- name: Check Provenance
78+
uses: danielroe/[email protected]
79+
with:
80+
fail-on-downgrade: true

.github/workflows/release.yml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Release
33
on:
44
push:
55
branches: [main, alpha, beta, rc, v4]
6+
repository_dispatch:
7+
types: [release]
68

79
concurrency:
810
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -14,6 +16,7 @@ env:
1416
permissions:
1517
contents: write
1618
id-token: write
19+
pull-requests: write
1720

1821
jobs:
1922
release:
@@ -22,35 +25,56 @@ jobs:
2225
runs-on: ubuntu-latest
2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@v5.0.0
28+
uses: actions/checkout@v6.0.1
2629
with:
2730
fetch-depth: 0
2831
- name: Start Nx Agents
2932
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
3033
- name: Setup Tools
3134
uses: tanstack/config/.github/setup@main
3235
- name: Run Tests
33-
run: pnpm run test:ci --parallel=3
36+
run: pnpm run test:ci
3437
- name: Stop Nx Agents
3538
if: ${{ always() }}
3639
run: npx nx-cloud stop-all-agents
37-
- name: Version Packages
38-
run: pnpm run changeset:version
39-
- name: Commit version files
40-
run: |
41-
git config --global user.name 'Tanner Linsley'
42-
git config --global user.email '[email protected]' git add -A
43-
git commit -m "ci: Version Packages"
44-
git push
40+
# - name: Check for Changesets marked as major
41+
# id: major
42+
# run: |
43+
# echo "found=false" >> $GITHUB_OUTPUT
44+
# regex="(major)"
45+
# shopt -s nullglob
46+
# for file in .changeset/*.md; do
47+
# if [[ $(cat $file) =~ $regex ]]; then
48+
# echo "found=true" >> $GITHUB_OUTPUT
49+
# fi
50+
# done
51+
- name: Run Changesets (version or publish)
52+
id: changesets
53+
uses: changesets/[email protected]
54+
with:
55+
version: pnpm run changeset:version
56+
publish: pnpm run changeset:publish
57+
commit: 'ci: Version Packages'
58+
title: 'ci: Version Packages'
4559
env:
4660
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
- name: Publish Packages
48-
run: pnpm run changeset:publish
49-
env:
50-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
# - name: Auto-merge Changesets PR
62+
# if: steps.changesets.outputs.hasChangesets == 'true' && steps.major.outputs.found == 'false'
63+
# run: |
64+
# gh pr merge --squash "$PR_NUMBER"
65+
# gh api --method POST /repos/$REPO/dispatches -f 'event_type=release'
66+
# env:
67+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
# REPO: ${{ github.repository }}
69+
# PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
5170
- name: Upload coverage to Codecov
5271
uses: codecov/[email protected]
5372
with:
5473
directory: packages
5574
env:
5675
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
76+
- name: Comment on PRs about release
77+
if: steps.changesets.outputs.published == 'true'
78+
uses: tanstack/config/.github/comment-on-release@main
79+
with:
80+
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
distribute-on:
22
small-changeset: 3 linux-medium-js
3-
medium-changeset: 6 linux-medium-js
4-
large-changeset: 10 linux-medium-js
3+
medium-changeset: 4 linux-medium-js
4+
large-changeset: 5 linux-medium-js

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
**/coverage
66
**/dist
77
**/query-codemods/**/__testfixtures__
8+
.changeset/*.md
89
pnpm-lock.yaml
910
packages/**/tsup.config.bundled*.mjs
1011
**/tsconfig.vitest-temp.json
12+
docs/framework/*/reference

.size-limit.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{
3+
"name": "react full",
4+
"path": "packages/react-query/build/modern/index.js",
5+
"limit": "12.10 kB",
6+
"ignore": ["react", "react-dom"]
7+
},
8+
{
9+
"name": "react minimal",
10+
"path": "packages/react-query/build/modern/index.js",
11+
"limit": "9.11 kB",
12+
"import": "{ useQuery, QueryClient, QueryClientProvider }",
13+
"ignore": ["react", "react-dom"]
14+
}
15+
]

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af27
133133

134134
#### Note on standalone execution
135135

136-
If you want to run an example without installing dependencies for the whole repo, just follow instructions from the example's README.md file. It will be then run against the latest TanStack Query release.
136+
If you want to run an example without installing dependencies for the whole repo, just follow the instructions from the example's README.md file. It will then be run against the latest TanStack Query release.
137137
138138
## Online one-click setup
139139
140-
You can use Gitpod (An Online Open Source VS Code like IDE which is free for Open Source) for developing online. With a single click it will start a workspace and automatically:
140+
You can use Gitpod (An Online open-source VS Code-like IDE that is free for Open Source) for developing online. With a single click it will start a workspace and automatically:
141141
142142
- clone the `TanStack/query` repo.
143143
- install all the dependencies in `/` and `/docs`.

0 commit comments

Comments
 (0)