@kubb/plugin-react-query 5.8.0-canary.20261027T184247 → 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.js CHANGED
@@ -262,15 +262,23 @@ function resolveOperationTypeNames(node, resolver, options = {}) {
262
262
  return result;
263
263
  }
264
264
  // ../../internals/utils/src/casing.ts
265
+ const wordStart = /(?<=[a-z\d])(?=[A-Z])|(?<=[A-Z]{2})(?=[A-Z][a-z]{2})/;
266
+ /**
267
+ * Splits `text` into words on separators (whitespace, hyphens, underscores, dots, slashes, colons)
268
+ * and on {@link wordStart}. A segment without lowercase letters, such as `COOL` or `2D`, is one word,
269
+ * so snake case leaves a name that is already in it unchanged.
270
+ */
271
+ function words(text) {
272
+ return text.split(/[\s\-_./\\:]+/).filter(Boolean).flatMap((segment) => segment === segment.toUpperCase() ? segment : segment.split(wordStart));
273
+ }
265
274
  /**
266
275
  * Shared implementation for camelCase and PascalCase conversion.
267
- * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)
268
- * and capitalizes each word according to `pascal`.
276
+ * Capitalizes each word from {@link words} according to `pascal`.
269
277
  *
270
278
  * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.
271
279
  */
272
280
  function convert(text, pascal) {
273
- 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) => {
281
+ return words(text).flatMap((word) => word.split(/(?<=\d)(?=[a-z])|(?<=[A-Z])(?=[A-Z][a-z])/)).map((word, i) => {
274
282
  if (word.length > 1 && word === word.toUpperCase()) return word;
275
283
  return (i === 0 && !pascal ? word.charAt(0).toLowerCase() : word.charAt(0).toUpperCase()) + word.slice(1);
276
284
  }).join("").replace(/[^a-zA-Z0-9]/g, "");
@@ -521,7 +529,7 @@ var compatibility = {
521
529
  "node": ">=22.22"
522
530
  };
523
531
  // package.json
524
- var version = "5.8.0-canary.20261027T184247";
532
+ var version = "5.8.0-canary.20261027T202821";
525
533
  // ../../internals/client/src/resolveOperationTypes.ts
526
534
  /**
527
535
  * A `plugin-ts` shaped resolver whose operation type names point at the types `pluginZod({ inferred })`