Skip to content

fix(affected): resolve .js imports to .ts files for TypeScript ESM pattern (closes #189)#193

Merged
Wolfvin merged 1 commit into
mainfrom
fix/issue-189-js-to-ts-extension-resolve
Jul 4, 2026
Merged

fix(affected): resolve .js imports to .ts files for TypeScript ESM pattern (closes #189)#193
Wolfvin merged 1 commit into
mainfrom
fix/issue-189-js-to-ts-extension-resolve

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Root cause: TypeScript projects import using .js extension (e.g. import x from './foo.js') but actual file on disk is .ts. _resolve_relative_import tried exact path match and failed silently — reverse_graph was incomplete, BFS found 0 dependents.

Fix: after all extension attempts fail, check if import ends with .js/.mjs/.cjs, strip it, retry with .ts/.tsx/.d.ts extensions.

Verified: get_affected_files('auth/google-auth-cache.ts') now returns affected_count: 12 (was 0).

@Wolfvin Wolfvin merged commit 2f3e4c8 into main Jul 4, 2026
@Wolfvin Wolfvin deleted the fix/issue-189-js-to-ts-extension-resolve branch July 4, 2026 01:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant