Skip to content

Commit e2e42d5

Browse files
feat(COMPT-40): implement createQuery factory
- Add createQuery(keyFn, fetcher) returning QueryDefinition<TParams, TData> - TData and TParams fully inferred from fetcher signature, zero manual annotation - queryKey returns stable readonly tuple via keyFn - useQuery shorthand hook wraps useTanstackQuery with typed params - Export from src/index.ts - Add @tanstack/react-query as peerDependency (>=5) and devDependency - Add pnpm cssstyle override to fix Node.js v22 + jsdom@28 ESM compat issue - Fix duplicate import in vitest.config.ts - 9 tests, 100% coverage on createQuery.ts, 88.6% overall Closes COMPT-40
1 parent 5ac2347 commit e2e42d5

File tree

7 files changed

+6003
-2
lines changed

7 files changed

+6003
-2
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
"access": "public"
2828
},
2929
"peerDependencies": {
30+
"@tanstack/react-query": ">=5",
3031
"react": ">=18",
3132
"react-dom": ">=18"
3233
},
3334
"devDependencies": {
3435
"@changesets/cli": "^2.27.8",
3536
"@eslint/js": "^9.39.2",
37+
"@tanstack/react-query": "^5.96.2",
3638
"@testing-library/jest-dom": "^6.9.1",
3739
"@testing-library/react": "^16.3.2",
3840
"@testing-library/user-event": "^14.6.1",
@@ -84,5 +86,11 @@
8486
},
8587
"engines": {
8688
"node": ">=20"
87-
}
89+
},
90+
"pnpm": {
91+
"overrides": {
92+
"cssstyle": "6.0.1"
93+
}
94+
},
95+
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd"
8896
}

0 commit comments

Comments
 (0)