@7nohe/openapi-react-query-codegen 3.0.2 โ†’ 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -10
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/%407nohe%2Fopenapi-react-query-codegen.svg)](https://badge.fury.io/js/%407nohe%2Fopenapi-react-query-codegen)
6
6
 
7
- ๐Ÿ“– **[Documentation](https://openapi-react-query-codegen.vercel.app)** ยท [Migrating to v3](https://openapi-react-query-codegen.vercel.app/guides/migrating-to-v3/)
7
+ ๐Ÿ“– **[Documentation](https://openapi-react-query-codegen.vercel.app)** ยท [Migrating to v3](https://openapi-react-query-codegen.vercel.app/guides/migrating-to-v3/) ยท [Coming from openapi-react-query](https://openapi-react-query-codegen.vercel.app/guides/migrating-from-openapi-react-query/)
8
8
 
9
9
  ## Features
10
10
 
@@ -35,18 +35,20 @@ See the [documentation](https://openapi-react-query-codegen.vercel.app) for CLI
35
35
 
36
36
  ## How it compares
37
37
 
38
- | | This library | @hey-api tanstack-query plugin | Orval |
39
- |---|---|---|---|
40
- | `queryOptions` / `infiniteQueryOptions` factories (TanStack v5 pattern) | โœ… | โœ… | โŒ |
41
- | Ready-to-use hooks (`useQuery` / suspense / infinite variants) | โœ… | โŒ (options only) | โœ… |
42
- | SSR helpers (`prefetchQuery` / `prefetchInfiniteQuery` / `ensureQueryData`) | โœ… | โŒ | Partial (`usePrefetch`) |
43
- | Hierarchical query keys for granular invalidation | โœ… | โœ… (tags) | Partial |
44
- | Stable release line | โœ… SemVer | pre-1.0, frequent breaking changes | โœ… |
45
- | MSW mock generation | โŒ (out of scope) | โŒ | โœ… |
46
- | Vue / Solid / Svelte / Angular | โŒ React-focused | โœ… | โœ… |
38
+ | | This library | @hey-api tanstack-query plugin | Orval | openapi-react-query |
39
+ |---|---|---|---|---|
40
+ | `queryOptions` / `infiniteQueryOptions` factories (TanStack v5 pattern) | โœ… | โœ… | โŒ | โœ… (`$api.queryOptions`) |
41
+ | Ready-to-use hooks (`useQuery` / suspense / infinite variants) | โœ… generated per operation | โŒ (options only) | โœ… | โœ… runtime wrapper (method + path strings) |
42
+ | SSR helpers (`prefetchQuery` / `prefetchInfiniteQuery` / `ensureQueryData`) | โœ… | โŒ | Partial (`usePrefetch`) | Not provided (use `queryOptions`) |
43
+ | Hierarchical query keys for granular invalidation | โœ… | โœ… (tags) | Partial | Not documented |
44
+ | Stable release line | โœ… SemVer | pre-1.0, frequent breaking changes | โœ… | โš ๏ธ upstream openapi-typescript is in [maintenance mode](https://github.com/openapi-ts/openapi-typescript/issues/2874) |
45
+ | MSW mock generation | โŒ (out of scope) | โŒ | โœ… | โŒ |
46
+ | Vue / Solid / Svelte / Angular | โŒ React-focused | โœ… | โœ… | โŒ |
47
47
 
48
48
  **Scope**: this library is deliberately React-focused and does not generate API mocks โ€” use Orval if MSW mocks are your priority, or hey-api's own plugin if you need non-React frameworks.
49
49
 
50
+ **Coming from openapi-typescript / openapi-fetch / openapi-react-query?** See the [migration guide](https://openapi-react-query-codegen.vercel.app/guides/migrating-from-openapi-react-query/).
51
+
50
52
  ## Stability policy
51
53
 
52
54
  This library builds on [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts), which is pre-1.0 and moves fast. We **pin the exact hey-api version** and absorb its breaking changes for you: hey-api upgrades land here only after our full snapshot-test suite passes, and are released as minor versions. Your generated API surface follows SemVer โ€” breaking output changes only happen in major versions, with a migration guide.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7nohe/openapi-react-query-codegen",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "description": "OpenAPI React Query Codegen",
5
5
  "bin": {
6
6
  "openapi-rq": "dist/cli.mjs"
@@ -47,14 +47,14 @@
47
47
  "@types/cross-spawn": "^6.0.6",
48
48
  "@types/node": "^22.20.1",
49
49
  "@types/semver": "^7.7.1",
50
- "@vitest/coverage-v8": "^4.1.10",
50
+ "@vitest/coverage-v8": "^4.1.12",
51
51
  "commander": "^15.0.0",
52
52
  "lefthook": "^2.1.10",
53
53
  "rimraf": "^6.1.3",
54
54
  "ts-morph": "^28.0.0",
55
55
  "typescript": "^6.0.3",
56
- "vite": "^7",
57
- "vitest": "^4.1.10"
56
+ "vite": "^7.3.7",
57
+ "vitest": "^4.1.12"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@tanstack/react-query": "^5.0.0",