Conversation
* 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 * chore: sync package-lock.json with @tanstack/react-query addition * chore: switch from pnpm to npm, sync lockfile * chore: fix prettier formatting across all files
- usePaginatedQuery(queryDef, params, options) supports mode: 'offset' | 'cursor' - Offset mode: page/pageSize (default 20)/nextPage/prevPage/totalPages - Cursor mode: fetchNextPage/hasNextPage/nextCursor via useInfiniteQuery - Both expose data as flat T[] array, isLoading, isFetching, isError, error - Offset uses useQuery with page in queryKey; cursor uses useInfiniteQuery - getCursor option required for cursor mode - Typed overloads: full inference, no TanStack internals exposed - 15 tests, 100% coverage on usePaginatedQuery.ts, 95.62% overall Closes COMPT-41
* feat(COMPT-42): implement createMutation and typed cache helpers - createMutation(fn) returns MutationDefinition with mutationFn and useMutation shorthand - useMutation exposes mutate/mutateAsync/isPending/isError/error/data/reset - invalidateQueries(client, queryDef, params?) uses queryDef key — no raw strings - setQueryData typed updater — wrong shape is TypeScript compile error - All exported from src/index.ts via src/query/index.ts - 18 tests (10 mutation + 8 cache), 100% coverage on both src files, 95.94% overall Closes COMPT-42 * chore: fix prettier formatting * fix: suppress eslint no-unused-vars on intentionally unused mutation param
- createQuery.test.tsx: queryKey shape, queryFn call, useQuery loading/success/error/enabled/rerender - usePaginatedQuery.test.tsx: offset page navigation, data shape, cursor fetchNextPage/hasNextPage/nextCursor - createMutation.test.tsx: idle state, mutate, isPending, data, isError, reset, mutateAsync - cacheHelpers.test.tsx: invalidateQueries marks stale + refetch, setQueryData direct/updater/hook reflect All 84 tests pass, 97.35% stmt coverage (target: 85%)
- Moved all co-located tests (src/query/*.test.tsx, src/index.test.ts) into src/__tests__/ - Merged unique tests from co-located files: definition shape, stable key, TData inference, mode assertions, initialPage, mutationFn direct call - Deleted: src/query/createQuery.test.tsx, cacheHelpers.test.tsx, createMutation.test.tsx, usePaginatedQuery.test.tsx, src/index.test.ts - 51 tests, all passing, no test files outside src/__tests__/
- Rewrote README as an end-to-end usage guide for @ciscode/query-kit - createQuery: key builder, fetcher, useQuery shorthand, direct key/fn access - usePaginatedQuery: offset mode (nextPage/prevPage) and cursor mode (fetchNextPage/hasNextPage) - createMutation + invalidateQueries full lifecycle example - setQueryData typed updater example - API reference table covering all exports - Peer dep @tanstack/react-query >=5 clearly stated - Changeset: minor bump to v0.1.0 (initial public release)
* feat(COMPT-44): README guide + changeset for v0.1.0 - Rewrote README as an end-to-end usage guide for @ciscode/query-kit - createQuery: key builder, fetcher, useQuery shorthand, direct key/fn access - usePaginatedQuery: offset mode (nextPage/prevPage) and cursor mode (fetchNextPage/hasNextPage) - createMutation + invalidateQueries full lifecycle example - setQueryData typed updater example - API reference table covering all exports - Peer dep @tanstack/react-query >=5 clearly stated - Changeset: minor bump to v0.1.0 (initial public release) * fix(ci): correct sonar.tests path from 'test' to 'src/__tests__' Tests live in src/__tests__/, not test/. Also add sonar.exclusions and sonar.test.inclusions so source files and test files are correctly separated in SonarCloud analysis.
* feat(COMPT-44): README guide + changeset for v0.1.0 - Rewrote README as an end-to-end usage guide for @ciscode/query-kit - createQuery: key builder, fetcher, useQuery shorthand, direct key/fn access - usePaginatedQuery: offset mode (nextPage/prevPage) and cursor mode (fetchNextPage/hasNextPage) - createMutation + invalidateQueries full lifecycle example - setQueryData typed updater example - API reference table covering all exports - Peer dep @tanstack/react-query >=5 clearly stated - Changeset: minor bump to v0.1.0 (initial public release) * fix(ci): correct sonar.tests path from 'test' to 'src/__tests__' Tests live in src/__tests__/, not test/. Also add sonar.exclusions and sonar.test.inclusions so source files and test files are correctly separated in SonarCloud analysis. * 0.0.1
|
There was a problem hiding this comment.
Pull request overview
Resolves a merge conflict by updating the package version metadata.
Changes:
- Bump
@ciscode/query-kitversion from0.0.0to0.0.1inpackage.json - Sync the same version bump into
package-lock.json
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Updates the published package version field. |
| package-lock.json | Updates lockfile metadata to match the package version bump. |
| { | ||
| "name": "@ciscode/query-kit", | ||
| "version": "0.0.0", | ||
| "version": "0.0.1", |
There was a problem hiding this comment.
This repo’s documented release flow uses Changesets to manage package versions (see INSTRUCTIONS.md:151-156). Manually bumping package.json to 0.0.1 in a “merge conflict” PR can put the repo in a state that doesn’t match the existing changeset release plan (e.g., .changeset/v0-1-0-initial-release.md indicates a minor bump for the next release). Consider reverting this manual version change and letting pnpm run version-packages (changeset version) update it, or explicitly align the version with the intended release version.
| "version": "0.0.1", | |
| "version": "0.1.0", |



Summary
Why
Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpassesnpx changeset) if this affects consumersNotes