Skip to content

Commit 2830d11

Browse files
authored
Merge branch 'alpha' into feature/queryOptions
2 parents 9551006 + eff7f03 commit 2830d11

39 files changed

Lines changed: 341 additions & 81 deletions

File tree

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: pr
22
on: [pull_request]
33
env:
4-
NX_DAEMON: 'false'
4+
NX_DAEMON: false
5+
NX_VERBOSE_LOGGING: true
6+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
57
jobs:
68
test:
79
name: 'Test'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ node_modules
4343
.cache
4444
dist
4545
.idea
46+
47+
nx-cloud.env

docs/react/guides/paginated-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This experience is not optimal and unfortunately is how many tools today insist
2424

2525
Consider the following example where we would ideally want to increment a pageIndex (or cursor) for a query. If we were to use `useQuery`, **it would still technically work fine**, but the UI would jump in and out of the `success` and `pending` states as different queries are created and destroyed for each page or cursor. By setting `placeholderData` to `(previousData) => previousData` or `keepPreviousData` function exported from TanStack Query, we get a few new things:
2626

27-
- **The data from the last successful fetch available while new data is being requested, even though the query key has changed**.
27+
- **The data from the last successful fetch is available while new data is being requested, even though the query key has changed**.
2828
- When the new data arrives, the previous `data` is seamlessly swapped to show the new data.
2929
- `isPlaceholderData` is made available to know what data the query is currently providing you
3030

docs/react/reference/useQueries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ The `useQueries` hook accepts an options object with a **queries** key whose val
2525
2626
**Returns**
2727

28-
The `useQueries` hook returns an array with all the query results.
28+
The `useQueries` hook returns an array with all the query results. The order returned is the same as the input order.

nx.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"tasksRunnerOptions": {
33
"default": {
4-
"runner": "nx/tasks-runners/default",
4+
"runner": "@nrwl/nx-cloud",
55
"options": {
66
"cacheableOperations": [
77
"test:lib",
88
"test:eslint",
99
"test:types",
1010
"build:types",
11-
"test:format",
12-
"test:build",
13-
"build"
14-
]
11+
"build",
12+
"rollup"
13+
],
14+
"accessToken": "ZDdkNDA4MGEtYjNmYi00MWI4LWE1N2QtYTdlNmYxMGJlZWM2fHJlYWQ="
1515
}
1616
}
1717
},
@@ -52,12 +52,18 @@
5252
"inputs": ["default", "^public"]
5353
},
5454
"test:types": {
55-
"outputs": ["{projectRoot}/build"],
55+
"outputs": [
56+
"{projectRoot}/build/**/*.d.ts",
57+
"{projectRoot}/build/.tsbuildinfo"
58+
],
5659
"inputs": ["default", "^public"],
5760
"dependsOn": ["^test:types"]
5861
},
5962
"build:types": {
60-
"outputs": ["{projectRoot}/build"],
63+
"outputs": [
64+
"{projectRoot}/build/**/*.d.ts",
65+
"{projectRoot}/build/.tsbuildinfo"
66+
],
6167
"inputs": ["default", "^public"],
6268
"dependsOn": ["^build:types"]
6369
},

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"test": "pnpm run test:ci",
99
"test:ci": "nx run-many --targets=test:lib,test:types,test:eslint,test:format --parallel=5",
1010
"test:eslint": "nx run-many --target=test:eslint --parallel=5",
11-
"test:format": "nx test:format root",
11+
"test:format": "pnpm run prettier --check",
1212
"test:lib": "nx run-many --target=test:lib --parallel=5",
1313
"test:lib:dev": "pnpm --filter \"./packages/**\" run test:lib:dev",
14-
"test:build": "nx test:build root",
14+
"test:build": "nx run-many --target=test:build --projects=root",
1515
"test:types": "nx run-many --target=test:types --parallel=5",
16-
"build": "nx build root",
16+
"build": "nx run-many --target=build --projects=root",
1717
"build:types": "nx run-many --target=build:types --parallel=5",
1818
"watch": "concurrently --kill-others \"rollup --config rollup.config.js -w\" \"pnpm run build:types --watch\"",
1919
"dev": "pnpm run watch",
@@ -36,6 +36,7 @@
3636
"@babel/preset-typescript": "^7.18.6",
3737
"@commitlint/parse": "^17.4.2",
3838
"@faker-js/faker": "^7.6.0",
39+
"@nrwl/nx-cloud": "^15.3.1",
3940
"@rollup/plugin-babel": "^6.0.3",
4041
"@rollup/plugin-commonjs": "24.0.1",
4142
"@rollup/plugin-node-resolve": "^15.0.1",
@@ -87,6 +88,7 @@
8788
"react-dom": "^18.2.0",
8889
"rimraf": "^4.1.2",
8990
"rollup": "^3.15.0",
91+
"rollup-plugin-preserve-directives": "0.1.0",
9092
"rollup-plugin-size": "^0.2.2",
9193
"rollup-plugin-terser": "^7.0.2",
9294
"rollup-plugin-visualizer": "^5.9.0",
@@ -106,5 +108,10 @@
106108
"path": "packages/*/build/umd/*.production.js"
107109
}
108110
]
111+
},
112+
"pnpm": {
113+
"patchedDependencies": {
114+
115+
}
109116
}
110117
}

packages/eslint-plugin-query/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"composite": true,
55
"rootDir": "./src",
66
"outDir": "./build/lib",
7-
"tsBuildInfoFile": "./build/.tsbuildinfo"
7+
"tsBuildInfoFile": "./build/.tsbuildinfo",
8+
"types": ["vitest/globals"]
89
},
910
"include": ["src"]
1011
}

packages/query-async-storage-persister/tsconfig.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"composite": true,
55
"rootDir": "./src",
66
"outDir": "./build/lib",
7-
"tsBuildInfoFile": "./build/.tsbuildinfo"
7+
"tsBuildInfoFile": "./build/.tsbuildinfo",
8+
"types": ["vitest/globals"]
89
},
910
"include": ["src"],
10-
"references": [
11-
{ "path": "../query-persist-client-core" }
12-
]
11+
"references": [{ "path": "../query-persist-client-core" }]
1312
}

packages/query-core/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"composite": true,
55
"rootDir": "./src",
66
"outDir": "./build/lib",
7-
"tsBuildInfoFile": "./build/.tsbuildinfo"
7+
"tsBuildInfoFile": "./build/.tsbuildinfo",
8+
"types": ["vitest/globals"]
89
},
910
"include": ["src"]
1011
}

packages/query-persist-client-core/tsconfig.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"composite": true,
55
"rootDir": "./src",
66
"outDir": "./build/lib",
7-
"tsBuildInfoFile": "./build/.tsbuildinfo"
7+
"tsBuildInfoFile": "./build/.tsbuildinfo",
8+
"types": ["vitest/globals"]
89
},
910
"include": ["src"],
10-
"references": [
11-
{ "path": "../query-core" }
12-
]
11+
"references": [{ "path": "../query-core" }]
1312
}

0 commit comments

Comments
 (0)