@kubb/plugin-react-query 5.8.0-canary.20261027T172409 → 5.8.0-canary.20261027T202821

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
@@ -289,15 +289,23 @@ function resolveOperationTypeNames(node, resolver, options = {}) {
289
289
  return result;
290
290
  }
291
291
  // ../../internals/utils/src/casing.ts
292
+ const wordStart = /(?<=[a-z\d])(?=[A-Z])|(?<=[A-Z]{2})(?=[A-Z][a-z]{2})/;
293
+ /**
294
+ * Splits `text` into words on separators (whitespace, hyphens, underscores, dots, slashes, colons)
295
+ * and on {@link wordStart}. A segment without lowercase letters, such as `COOL` or `2D`, is one word,
296
+ * so snake case leaves a name that is already in it unchanged.
297
+ */
298
+ function words(text) {
299
+ return text.split(/[\s\-_./\\:]+/).filter(Boolean).flatMap((segment) => segment === segment.toUpperCase() ? segment : segment.split(wordStart));
300
+ }
292
301
  /**
293
302
  * Shared implementation for camelCase and PascalCase conversion.
294
- * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)
295
- * and capitalizes each word according to `pascal`.
303
+ * Capitalizes each word from {@link words} according to `pascal`.
296
304
  *
297
305
  * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.
298
306
  */
299
307
  function convert(text, pascal) {
300
- return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
308
+ return words(text).flatMap((word) => word.split(/(?<=\d)(?=[a-z])|(?<=[A-Z])(?=[A-Z][a-z])/)).map((word, i) => {
301
309
  if (word.length > 1 && word === word.toUpperCase()) return word;
302
310
  return (i === 0 && !pascal ? word.charAt(0).toLowerCase() : word.charAt(0).toUpperCase()) + word.slice(1);
303
311
  }).join("").replace(/[^a-zA-Z0-9]/g, "");
@@ -548,7 +556,7 @@ var compatibility = {
548
556
  "node": ">=22.22"
549
557
  };
550
558
  // package.json
551
- var version = "5.8.0-canary.20261027T172409";
559
+ var version = "5.8.0-canary.20261027T202821";
552
560
  // ../../internals/client/src/resolveOperationTypes.ts
553
561
  /**
554
562
  * A `plugin-ts` shaped resolver whose operation type names point at the types `pluginZod({ inferred })`