Commit Graph
9 Commits
Author SHA1 Message Date
morluto 943ae604df refactor(reference): derive import lookup from reader inventory 2026-10-26 15:14:05 +08:00
morluto d5df7fd944 fix(reference): preserve source scope and loader authority
Share parser-owned package and runtime facts across dependency consumers.
Preserve uncertain loader requests and explicit wrapper bindings without
inventing unbound require authority in known modules. Cover selected source
grammar through the public MCP boundary and retain ambient/type dependencies.

Open each selected directory before loading its scoped policy, retaining
partial directory failures and cleanup ownership. Preserve explicit caller
negation precedence and source diagnostics across inventory projections.

Clarify how version comparison retains container provenance without claiming
semantic drift. Use independent unknown source inputs to keep candidate-limit
fixtures meaningful as conditional branch evaluation becomes more precise.

Fixes #6891
Fixes #6882
Fixes #6883
Fixes #6859
2026-10-24 06:24:55 +08:00
morluto 610966b836 fix(javascript): isolate package facts from host prototypes
Build frozen package field snapshots with a null prototype and restrict reference-source main lookup to own properties. Preserve declared null and empty values, index fallback, source identity and unavailable manifest evidence.

Compare inherited main and exports lookup with the native Node resolver, retain package observation coverage and verify CLI/MCP package workflows.
2026-10-23 21:57:14 +08:00
morluto 857a75baac fix: preserve unknown historical module resolution
Fixes #6679

Fixes #6678

Fixes #6612
2026-10-23 21:28:10 +08:00
Peter G b28f6c0953 fix(reference): retain inventories with empty module specifiers (#3497) 2026-10-22 03:57:38 +08:00
Abishek 8194695144 fix(reference): resolve extensionless imports to .mts and .cts files (#4223)
* fix(reference): resolve extensionless imports to .mts and .cts files

Include .mts and .cts extension probe slots in RESOLUTION_SUFFIXES so that relative imports and requires targeting ESM and CJS TypeScript files without an explicit extension resolve to internal relationships instead of remaining unresolved.

* test(reference): restore regression coverage for extensionless .mts and .cts imports

Restore tests covering extensionless imports, requires, and directory indexes to .mts and .cts files so that probe suffix omissions are caught by automated test regression.
2026-10-17 00:25:43 +08:00
c0d550b231 fix(reference): resolve runtime imports from their owning syntax
Distinguish call-form require from TypeScript import-equals before resolving
inventory paths. Probe CommonJS files before indexes and honor package main
without requiring an index. Retain selected manifest directory identities and
reuse the path lookup owner for canonical ambiguity.

Validated with source/reader tests and a public CLI fixture controlled by the
pinned Node loader. Windows no-follow reader behavior remains unverified.
Refs #3895, #3896, #3973, #4017.

Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
Co-authored-by: IssueHunter Worker <issuehunter@users.noreply.github.com>
2026-10-16 05:43:04 +08:00
morlutoandSaim Shafique ada133c256 fix(reference): retain unknown kind for unsupported source entries
Keep FIFO, socket and device entries unknown instead of projecting unsupported reader entries as ordinary files. Preserve real file read-failure identity.

Fixes #3218

Co-authored-by: Saim Shafique <msaimshafique4664@gmail.com>
2026-10-14 15:20:02 +08:00
morlutoandAurantium 03ffb2c13d fix(reference-source): recognize Kotlin files in imported inventories
Classify .kt and .kts at the source owner so imported entries and historical language summaries preserve Kotlin identity.

Validation: production inventory projection covers Kotlin, Gradle script, Java and backup-suffix controls.

Based on #3224.

Co-authored-by: Aurantium <280805072+Aurantium-47@users.noreply.github.com>
2026-10-14 13:58:15 +08:00