GitNexus/gitnexus/test/integration
Gergő Magyar 12be2025f1
feat(ts,js): TypeScript/JavaScript MethodExtractor config (#588)
* feat(ts,js): MethodExtractor config for TypeScript and JavaScript (#570)

Add per-language method extraction config following the established
JVM and C# patterns. Shared config base mirrors the field extractor's
typescript-javascript.ts pattern — TS-only node types are harmless
no-ops for JS.

Key features:
- isAbstract for abstract class methods and interface methods
- Parameter extraction with isOptional (?:, defaults) and isVariadic (...)
- Decorator extraction from preceding body-level siblings
- isAsync and isOverride detection
- Visibility via accessibility_modifier two-pass pattern
- Return type extraction unwrapping type_annotation

* test(ts,js): add override, getter/setter, destructured param tests

Address code review findings:
- Add override method detection test
- Add getter/setter extraction test
- Add destructured parameter with type annotation test
- Tighten constructor and private method assertions

* refactor(ts,js): address code review findings

- Replace O(M*N) decorator index scan with previousNamedSibling walk
- Remove dead findVisibility 'modifiers' fallback (TS uses
  accessibility_modifier, not a modifiers wrapper)
- Document call_signature/construct_signature as known gaps
- Document that TS constructors are method_definition nodes
- Remove unused findVisibility import

* fix(ts,js): type guard before cast, add generator/computed/overload tests

- Use type guard pattern (Set.has check before as-cast) in visibility
  extraction to ensure string is validated before narrowing
- Add generator method test (*items()) — confirms extraction works
- Add computed property name test ([Symbol.iterator]) — documents
  bracket-in-name behavior as intentional
- Add class-level method overload test — verifies overload signatures
  + implementation are all extracted

* fix(ts,js): detect #private methods as visibility 'private'

ES2022 private class methods (#name) use private_property_identifier
as their name node type. Detect this and return 'private' visibility
instead of the default 'public'.

* fix(ts,js): address review findings + close ingestion gaps

- hasKeyword/findVisibility: skip name field child to prevent false
  positives on soft-keyword method names (e.g. `abstract()`, `static()`)
- extractTsJsParameters: filter TS `this` parameter (compile-time only)
- extractMethodSignature: mirror `this`-param skip in fallback path
- tree-sitter queries: capture abstract_method_signature,
  method_signature, and private_property_identifier for TS; add
  private_property_identifier for JS
- Remove dead childForFieldName('name') fallbacks and typeFromAnnotation
  fallback
- Add 10+ unit tests, 4 integration tests through query pipeline

* test(ts): update HAS_METHOD count for interface method_signature capture

The new method_signature query now captures ILogger.log() as a Method
node with a HAS_METHOD edge, increasing the expected count from 4 to 5.

* fix(ts,js): address second review — async generator test, declare module gap

- Add async generator method test (async *values() → isAsync: true)
- Document declare module/global augmentation as known gap
2026-04-01 14:09:59 +01:00
..
resolvers feat(ts,js): TypeScript/JavaScript MethodExtractor config (#588) 2026-04-01 14:09:59 +01:00
api-impact-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
augmentation.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
class-impact-all-languages.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
cli-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
cross-file-binding.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
csv-pipeline.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
enrichment.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
expo-routes.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
filesystem-walker.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
has-method.test.ts feat(ts,js): TypeScript/JavaScript MethodExtractor config (#588) 2026-04-01 14:09:59 +01:00
hooks-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
ignore-and-skip-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
java-class-impact.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
lbug-core-adapter.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
lbug-lock-retry.test.ts fix(lbug): retry on DB lock with session-safe cleanup (#325) 2026-03-22 18:21:21 +09:00
lbug-pool-stability.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
lbug-pool.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
local-backend-calltool.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
local-backend.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
orm-dataflow.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
parsing.test.ts feat: configure eslint with unused import removal (#564) 2026-03-28 15:28:09 +00:00
pipeline.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
query-compilation.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
search-core.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
search-pool.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
server-analyze.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
setup-skills.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
shape-check-regression.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
skills-e2e.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
staleness-and-stability.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
tree-sitter-languages.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
worker-pool.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00