@kubb/plugin-swr 5.9.1 → 5.9.3

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.
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var compatibility = {
35
35
  "node": ">=22.22"
36
36
  };
37
37
  // package.json
38
- var version = "5.9.1";
38
+ var version = "5.9.3";
39
39
  // ../../internals/client/src/resolveClient.ts
40
40
  /**
41
41
  * Resolves which client plugin a consumer (react-query, vue-query, swr, mcp) should call for an
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var compatibility = {
9
9
  "node": ">=22.22"
10
10
  };
11
11
  // package.json
12
- var version = "5.9.1";
12
+ var version = "5.9.3";
13
13
  // ../../internals/client/src/resolveClient.ts
14
14
  /**
15
15
  * Resolves which client plugin a consumer (react-query, vue-query, swr, mcp) should call for an
@@ -14,6 +14,8 @@ const { data, error, isLoading } = useGetPetById({ path: { petId: 1 } })
14
14
 
15
15
  The examples set [`integerType: 'number'`](https://kubb.dev/extensions/kubb-labs/adapter-oas/options#integertype) on the adapter, so an `int64` id such as `petId` is a `number`. With the default it is a `bigint` and the call takes `1n`.
16
16
 
17
+ Path keys keep the names from the spec, so a `{pet-id}` placeholder is passed as `path: { 'pet-id': 1 }`. Set [`pathParamsCasing: 'camelcase'`](https://kubb.dev/extensions/kubb-labs/adapter-oas/options#pathparamscasing) on the adapter (`@kubb/adapter-oas` 5.20.0 or later) to pass `path: { petId: 1 }` instead, the name MSW handlers and query keys already use. The HTTP request stays the same.
18
+
17
19
  The second argument takes `query` (any `SWRConfiguration`), `client` (request config for this call, such as `baseURL`), and the Kubb options `shouldFetch` and `immutable`, covered in [Skip requests until ready](#skip-requests-until-ready) and [Fetch immutable data](#fetch-immutable-data):
18
20
 
19
21
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-swr",
3
- "version": "5.9.1",
3
+ "version": "5.9.3",
4
4
  "description": "Generate type-safe SWR hooks with Kubb. Covers useSWR and useSWRMutation with full TypeScript support.",
5
5
  "keywords": [
6
6
  "code-generation",
@@ -79,16 +79,16 @@
79
79
  "registry": "https://registry.npmjs.org/"
80
80
  },
81
81
  "dependencies": {
82
- "@kubb/kit": "^5.18.8",
83
- "@kubb/plugin-ts": "^5.5.1",
84
- "@kubb/renderer-jsx": "^5.18.8"
82
+ "@kubb/kit": "^5.20.1",
83
+ "@kubb/plugin-ts": "^5.5.3",
84
+ "@kubb/renderer-jsx": "^5.20.1"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@internals/client": "0.0.0",
88
88
  "@internals/shared": "0.0.0",
89
89
  "@internals/tanstack-query": "0.0.0",
90
90
  "@internals/utils": "0.0.0",
91
- "@kubb/plugin-client": "6.0.1",
91
+ "@kubb/plugin-client": "6.0.3",
92
92
  "swr": "^2.5.1"
93
93
  },
94
94
  "peerDependencies": {