@kubb/plugin-swr 5.4.0-canary.20261014T114046 → 5.4.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.
package/dist/index.cjs CHANGED
@@ -342,7 +342,7 @@ var compatibility = {
342
342
  };
343
343
  //#endregion
344
344
  //#region package.json
345
- var version = "5.4.0-canary.20261014T114046";
345
+ var version = "5.4.0";
346
346
  //#endregion
347
347
  //#region ../../internals/client/src/resolveClient.ts
348
348
  /**
@@ -619,13 +619,14 @@ function buildCallResultBody(call, options = {}) {
619
619
  }
620
620
  /**
621
621
  * Applies the shared query defaults during plugin setup: `false` disables query generation, and an
622
- * object merges over `methods: ['GET']` and the plugin's runtime `importPath`.
622
+ * object merges over `methods: ['GET', 'QUERY']` and the plugin's runtime `importPath`. QUERY
623
+ * (RFC 10008) is a safe, idempotent read that carries its input in the body, so it is a query too.
623
624
  */
624
625
  function resolveQueryConfig(query, options) {
625
626
  if (query === false) return false;
626
627
  return {
627
628
  importPath: options.importPath,
628
- methods: ["GET"],
629
+ methods: ["GET", "QUERY"],
629
630
  ...query
630
631
  };
631
632
  }
@@ -777,7 +778,7 @@ const queryKeyTransformer = ({ node, variant }) => {
777
778
  if (isInfinite) urlFields.push("infinite: true");
778
779
  const result = [`{ ${urlFields.join(", ")} }`];
779
780
  if (query.length > 0) result.push("...(query ? [query] : [])");
780
- if (node.requestBody?.content?.[0]?.schema) result.push("...(body ? [body] : [])");
781
+ if (node.requestBody?.content?.[0]?.schema) result.push("...(body !== undefined ? [body] : [])");
781
782
  return result;
782
783
  };
783
784
  function QueryKey({ name, node, tsResolver, typeName, transformer, variant = "query" }) {