Skip to content

Commit a96402d

Browse files
ci: fix v4 branch (#10048)
* Initial work * Fix Nx * Fix prettier and CSB * Disable TUI
1 parent 9047b8c commit a96402d

File tree

10 files changed

+12812
-10132
lines changed

10 files changed

+12812
-10132
lines changed

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{ "repo": "TanStack/query" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"baseBranch": "v4",
10+
"updateInternalDependencies": "patch",
11+
"fixed": [],
12+
"linked": [],
13+
"ignore": [],
14+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
15+
"onlyUpdatePeerDependentsWhenOutOfRange": true
16+
}
17+
}

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"/examples/vue/basic"
88
],
99
"packages": ["packages/**"],
10-
"node": "16"
10+
"node": "18"
1111
}

.github/workflows/ci.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: pr
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
45

56
concurrency:
67
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -17,39 +18,31 @@ jobs:
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Checkout
20-
uses: actions/checkout@v4.2.2
21+
uses: actions/checkout@v6.0.1
2122
with:
2223
fetch-depth: 0
2324
- name: Start Nx Agents
2425
run: npx nx-cloud start-ci-run
2526
- name: Setup Tools
2627
uses: tanstack/config/.github/setup@main
2728
- name: Get base and head commits for `nx affected`
28-
uses: nrwl/[email protected]
29+
uses: nrwl/[email protected]
30+
with:
31+
main-branch-name: v4
2932
- name: Run Tests
3033
run: pnpm run test:pr --parallel=3
3134
- name: Stop Agents
3235
run: npx nx-cloud stop-all-agents
33-
- name: Upload coverage to Codecov
34-
uses: codecov/codecov-action@v3
3536
format:
3637
name: Format
3738
runs-on: ubuntu-latest
3839
steps:
3940
- name: Checkout
40-
uses: actions/checkout@v4.2.2
41+
uses: actions/checkout@v6.0.1
4142
with:
4243
fetch-depth: 0
43-
- name: Setup pnpm
44-
uses: pnpm/[email protected]
45-
- name: Setup Node
46-
uses: actions/setup-node@v3
47-
with:
48-
node-version-file: .nvmrc
49-
cache: pnpm
50-
cache-dependency-path: pnpm-lock.yaml
51-
- name: Install dependencies
52-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
44+
- name: Setup Tools
45+
uses: tanstack/config/.github/setup@main
5346
- name: Run prettier
5447
run: pnpm run test:format
5548
test-react-version:
@@ -60,22 +53,15 @@ jobs:
6053
react-version: [17, 18]
6154
steps:
6255
- name: Checkout
63-
uses: actions/checkout@v4.2.2
56+
uses: actions/checkout@v6.0.1
6457
with:
6558
fetch-depth: 0
66-
ref: ${{ github.head_ref }}
67-
repository: ${{github.event.pull_request.head.repo.full_name}}
68-
- name: Setup pnpm
69-
uses: pnpm/[email protected]
70-
- uses: actions/setup-node@v3
59+
- name: Setup Tools
60+
uses: tanstack/config/.github/setup@main
61+
- name: Get base and head commits for `nx affected`
62+
uses: nrwl/[email protected]
7163
with:
72-
node-version-file: .nvmrc
73-
cache: pnpm
74-
cache-dependency-path: pnpm-lock.yaml
75-
- name: Install dependencies
76-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
77-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
78-
uses: nrwl/nx-set-shas@v2
64+
main-branch-name: v4
7965
- name: Run Tests for React ${{ matrix.react-version }}
8066
uses: nick-fields/[email protected]
8167
with:

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main, alpha, beta, rc, v4]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
NX_CLOUD_DISTRIBUTED_EXECUTION: false
13+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
14+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
15+
16+
jobs:
17+
release:
18+
name: Release
19+
if: github.repository_owner == 'TanStack'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/[email protected]
24+
with:
25+
fetch-depth: 0
26+
- name: Setup Tools
27+
uses: tanstack/config/.github/setup@main
28+
- name: Run Tests
29+
run: pnpm run test:ci
30+
- name: Run Changesets (version or publish)
31+
id: changesets
32+
uses: changesets/[email protected]
33+
with:
34+
version: pnpm run changeset:version
35+
publish: pnpm run changeset:publish
36+
commit: 'ci: Version Packages (v4)'
37+
title: 'ci: Version Packages (v4)'
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ package-lock.json
77
yarn.lock
88

99
# builds
10-
types
11-
*/**/build
12-
*/**/dist
13-
*/**/lib
14-
*/**/es
15-
artifacts
16-
.rpt2_cache
10+
build
1711
coverage
18-
*.tgz
12+
dist
13+
dist-ts
1914

2015
# misc
2116
.DS_Store
@@ -35,12 +30,22 @@ stats-hydration.json
3530
stats.json
3631
stats.html
3732
.vscode/settings.json
33+
.vscode/mcp.json
34+
.cursor/rules
35+
.github/instructions/nx.instructions.md
3836

3937
*.log
4038
*.tsbuildinfo
41-
.DS_Store
39+
.angular
4240
.cache
4341
.idea
4442
.nx/cache
4543
.nx/workspace-data
46-
nx-cloud.env
44+
.pnpm-store
45+
.svelte-kit
46+
.tsup
47+
.vinxi
48+
temp
49+
50+
vite.config.js.timestamp-*
51+
vite.config.ts.timestamp-*

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/build
44
**/coverage
55
**/dist
6+
**/dist-ts
67
**/codemods/**/__testfixtures__

nx.json

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,11 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3-
"affected": {
4-
"defaultBase": "main"
5-
},
6-
"tasksRunnerOptions": {
7-
"default": {
8-
"runner": "nx-cloud",
9-
"options": {
10-
"cacheableOperations": [
11-
"test:lib",
12-
"test:eslint",
13-
"test:types",
14-
"test:build",
15-
"build:types",
16-
"build",
17-
"rollup"
18-
],
19-
"parallel": 5,
20-
"accessToken": "ZDdkNDA4MGEtYjNmYi00MWI4LWE1N2QtYTdlNmYxMGJlZWM2fHJlYWQ="
21-
}
22-
}
23-
},
24-
"defaultBase": "main",
25-
"pluginsConfig": {
26-
"@nrwl/js": {
27-
"analyzeSourceFiles": false
28-
}
3+
"defaultBase": "v4",
4+
"nxCloudId": "6412c827e6da5d7b4a0b1fe3",
5+
"useInferencePlugins": false,
6+
"parallel": 5,
7+
"tui": {
8+
"enabled": false
299
},
3010
"namedInputs": {
3111
"globalBuildAffectingConfig": [
@@ -59,30 +39,41 @@
5939
"targetDefaults": {
6040
"test:lib": {
6141
"outputs": ["{projectRoot}/coverage"],
62-
"inputs": ["default", "^public"]
42+
"inputs": ["default", "^public"],
43+
"cache": true
6344
},
6445
"test:eslint": {
65-
"inputs": ["default", "^public"]
46+
"inputs": ["default", "^public"],
47+
"cache": true
6648
},
6749
"test:types": {
6850
"outputs": [
6951
"{projectRoot}/build/**/*.d.ts",
7052
"{projectRoot}/build/.tsbuildinfo"
7153
],
7254
"inputs": ["default", "^public"],
73-
"dependsOn": ["^test:types"]
55+
"dependsOn": ["^test:types"],
56+
"cache": true
7457
},
7558
"build:types": {
7659
"outputs": [
7760
"{projectRoot}/build/**/*.d.ts",
7861
"{projectRoot}/build/.tsbuildinfo"
7962
],
8063
"inputs": ["default", "^public"],
81-
"dependsOn": ["^build:types"]
64+
"dependsOn": ["^build:types"],
65+
"cache": true
8266
},
8367
"test:build": {
8468
"dependsOn": ["build"],
85-
"inputs": ["^public"]
69+
"inputs": ["^public"],
70+
"cache": true
71+
},
72+
"build": {
73+
"cache": true
74+
},
75+
"rollup": {
76+
"cache": true
8677
}
8778
}
8879
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "https://github.com/TanStack/query.git"
66
},
7-
"packageManager": "pnpm@8.5.1",
7+
"packageManager": "pnpm@9.5.0",
88
"scripts": {
99
"clean": "pnpm --filter \"./packages/**\" run clean",
1010
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
@@ -74,8 +74,7 @@
7474
"eslint-plugin-react-hooks": "^4.6.0",
7575
"expect-type": "^1.2.1",
7676
"jest": "^27.5.1",
77-
"nx": "16.7.4",
78-
"nx-cloud": "16.3.0",
77+
"nx": "22.3.3",
7978
"prettier": "^2.6.2",
8079
"prettier-plugin-svelte": "^2.9.0",
8180
"react": "^19.1.1",

0 commit comments

Comments
 (0)