Skip to content

Rust-native package map shared condition selection helper #451

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

Unify Rust-native package exports and package imports condition selection behind one shared helper for repo-local package maps. The helper should cover exact keys, pattern keys, and nested condition objects, and should make the effective condition set plus matched condition available for diagnostics.

The initial condition order for this helper is TypeScript/source-sufficiency-first for repo-local graph use: types, then import-kind/runtime condition, then node, then configured custom conditions when available, then default. This issue may introduce the helper and route existing exact/pattern/nested package map resolution through it; customConditions and import-kind refinement can land in the follow-up issues.

Acceptance criteria

  • Package exports exact keys use the shared condition selection helper.
  • Package exports pattern keys and nested condition objects use the same helper.
  • Package imports exact keys, pattern keys, and nested condition objects use the same helper.
  • Diagnostics/profile data can expose the effective condition set and matched condition for package map decisions.
  • Deterministic Rust fixtures cover exact, pattern, and nested condition selection for both exports and imports.
  • Existing no-node_modules behavior and fail-closed unsupported shape taxonomy are preserved.

Blocked by

None - can start immediately.

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