Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix TypeScript runtime .js import resolution#405

Draft
GYF0311 wants to merge 1 commit into
Egonex-AI:main from
GYF0311:fix/ts-js-import-resolution
Draft

Fix TypeScript runtime .js import resolution #405
GYF0311 wants to merge 1 commit into
Egonex-AI:main from
GYF0311:fix/ts-js-import-resolution

Conversation

@GYF0311

@GYF0311 GYF0311 commented Jun 6, 2026

Copy link
Copy Markdown

Summary

  • Resolve TypeScript NodeNext / ESM runtime .js, .jsx, .mjs, and .cjs import specifiers to source files when the exact runtime file does not exist.
  • Preserve exact runtime file matches first, so real .js files still win.
  • Add .mts / .cts source probes and a regression test for ./foo.js resolving to foo.ts.

Root Cause

The resolver previously appended source probes to the full import specifier. For example, ./commands/source.js would probe paths like commands/source.js.ts, miss the existing commands/source.ts, and drop the deterministic import edge.

Validation

  • pnpm --filter @understand-anything/core build
  • pnpm --filter @understand-anything/skill build
  • pnpm test — 16 test files, 201 tests passing
  • Verified a local TypeScript ESM fixture now produces deterministic internal import edges where it previously produced none.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /