@arcteninc/core 0.0.149 → 0.0.150

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcteninc/core",
3
- "version": "0.0.149",
3
+ "version": "0.0.150",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
File without changes
File without changes
@@ -455,39 +455,28 @@ export function filterLikelyTools(exports: DiscoveredExport[]): DiscoveredExport
455
455
  return false;
456
456
  }
457
457
 
458
- // Skip common utility function patterns
458
+ // Skip specific React/utility patterns (NOT general prefixes like create/get)
459
459
  const name = exp.name.toLowerCase();
460
- const utilityPatterns = [
461
- 'use', // hooks: useState, useEffect, etc.
462
- 'create', // createContext, createStore, etc.
463
- 'with', // HOCs: withRouter, withAuth, etc.
464
- 'is', // type guards: isArray, isObject, etc.
465
- 'has', // hasOwnProperty, etc.
466
- 'get', // getters that just return state
467
- 'set', // setters
468
- 'to', // toJSON, toString, etc.
469
- 'from', // fromJSON, fromString, etc.
470
- 'parse', // parsers
471
- 'format', // formatters
472
- 'validate', // validators
473
- 'assert', // assertions
474
- 'throw', // error throwers
475
- 'log', // loggers
476
- 'debug', // debuggers
477
- 'trace', // tracers
478
- 'warn', // warners
479
- 'error', // error handlers
480
- 'handle', // handlers (too generic)
481
- 'on', // event handlers
482
- 'emit', // event emitters
483
- 'dispatch', // dispatchers
484
- 'subscribe', // subscribers
485
- 'unsubscribe', // unsubscribers
460
+
461
+ // Exact patterns to skip (React hooks, contexts, HOCs)
462
+ const skipExactPatterns = [
463
+ /^use[A-Z]/, // React hooks: useState, useEffect, useCallback
464
+ /^with[A-Z]/, // HOCs: withRouter, withAuth
465
+ /^create(context|store|reducer|slice|action|selector|ref|portal)$/i, // React utilities
466
+ /^is[A-Z][a-z]*$/, // Short type guards: isArray, isNull (but not isValidEmail)
467
+ /^has(own|prototype)/i, // hasOwnProperty, hasPrototype
468
+ /^to(string|json|array|number|boolean)$/i, // Converters
469
+ /^from(string|json|array|entries)$/i, // Converters
470
+ /^(parse|stringify)(json|int|float)?$/i, // Parsers
471
+ /^(assert|throw|log|debug|trace|warn|error|console)/i, // Logging/errors
472
+ /^(emit|dispatch|subscribe|unsubscribe)$/i, // Event system
473
+ /^on[A-Z]/, // Event handlers: onClick, onChange
474
+ /^handle[A-Z]/, // Event handlers: handleClick, handleSubmit
475
+ /^_/, // Private functions
486
476
  ];
487
477
 
488
- // Skip if starts with common utility prefixes
489
- for (const pattern of utilityPatterns) {
490
- if (name.startsWith(pattern) && name !== pattern) {
478
+ for (const pattern of skipExactPatterns) {
479
+ if (pattern.test(exp.name)) {
491
480
  return false;
492
481
  }
493
482
  }
@@ -497,11 +486,6 @@ export function filterLikelyTools(exports: DiscoveredExport[]): DiscoveredExport
497
486
  return false;
498
487
  }
499
488
 
500
- // Skip private-looking functions
501
- if (exp.name.startsWith('_')) {
502
- return false;
503
- }
504
-
505
489
  return true;
506
490
  });
507
491
  }