Skip to content

Conversation

@angrychow
Copy link
Collaborator

What type of PR is this?

fix: self-reference detection and type alias dependency extraction (follow-up to #123)

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

PR #123 后续 feature

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

This is a follow-up to PR #123, which was merged prematurely.
This commit completes the remaining work.

zh(optional):

PR #123 忘记加 WIP 了,将剩下的 feature 补完。

angrychow and others added 12 commits November 6, 2025 19:07
… export check

Fixed an issue where arrow function default export detection was checking
the arrow function's symbol instead of the variable declaration's symbol.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed type dependency recognition for type aliases (especially union types) across all parsers by extracting symbols from TypeReference node's typeName child instead of the node itself.

Changes:
- DependencyUtils: capture union/intersection type aliases before recursing into members
- TypeParser: extract symbols from typeName for TypeReference nodes, handle ExpressionWithTypeArguments, put type alias dependencies in InlineStruct instead of Implements
- FunctionParser: extract symbols from TypeReference typeName for function parameter/return types
- VarParser: extract symbols from TypeReference typeName for variable/property type annotations
- Added comprehensive unit tests for all three parsers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…sistency

- Resolved version conflicts in package.json and index.ts (keep 0.0.22)
- Added function property parsing feature: arrow functions and function expressions in class properties are now added to Methods
- Fixed constructor naming: use assignSymbolName consistently to avoid duplicates between FunctionParser and TypeParser
- Updated tests to use correct constructor name format (ClassName.__constructor)
- All tests passing (33/33)
@angrychow angrychow changed the title fix: self-reference detection and type alias dependency extraction (follow-up to #123) [WIP] fix: self-reference detection and type alias dependency extraction (follow-up to #123) Dec 4, 2025
@Duslia Duslia merged commit fe2ea46 into cloudwego:main Dec 7, 2025
3 of 4 checks passed
@Duslia Duslia changed the title [WIP] fix: self-reference detection and type alias dependency extraction (follow-up to #123) fix: self-reference detection and type alias dependency extraction (follow-up to #123) Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants