Skip to content

Rust-native package map import-kind aware condition set #453

Description

@jununfly

This was generated by AI during triage.

Parent

  • Roadmap plan: docs/plans/2026-06-22-rust-native-typescript-module-resolution-roadmap.md
  • Package map condition plan: docs/plans/2026-06-22-rust-native-package-map-condition-set-completion.md
  • Roadmap node: 1-4-3. condition set handling for repo-local source

What to build

Use reliable Rust-extracted import reference information to distinguish ESM import/export-from from CommonJS require() when selecting repo-local package map conditions. ESM import/export-from should use the import runtime condition. CommonJS require() should use the require runtime condition. Unknown import kinds should default to import and remain explainable in diagnostics.

This issue should not become a broad extractor rewrite. It should use existing extractable reference shape where reliable and avoid guessing for ambiguous shapes.

Acceptance criteria

  • ESM static import and export-from package map references select the import runtime condition.
  • CommonJS require() package map references select the require runtime condition where the Rust extraction path can reliably identify them.
  • Unknown import references default to import and remain visible/explainable in diagnostics.
  • Deterministic Rust fixtures cover ESM import, export-from, CJS require, and unknown/default behavior.
  • Existing package exports / imports, patterns, nested conditions, and customConditions behavior remains intact.
  • No broad import extractor rewrite or node_modules graph expansion is introduced.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions