Repository navigation
fix(lang-ts): select package export conditions per import - #770
Merged
Merged
Conversation
Carry import kind through the 0.6.0 Plugin interface and keep 0.5.0 components loadable. Use the matching package condition for each TypeScript and JavaScript runtime import. Closes #759
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TypeScript and JavaScript resolve package exports using the kind of each runtime import.
Language and Metric plugins can use the 0.6.0 interface.
The host continues to load 0.5.0 plugins.
Closes #759
Tier
Tier 3 from
cargo xtask risk-tier --base origin/main.The change touches Plugin host and SDK paths and updates assertions for the new interface.
Task
Issue #759
Fail-first test
trace_selects_package_exports_by_runtime_import_kind.2910ef78, one test ran and failed withmain.mjs to packages/dual/e.mjs,left: Bool(false),right: true.016887b0, the same test ran once and passed.Checks
cargo xtask merged-resultandtarget/debug/codeint checkpassed.Safety proof
Existing components keep their 0.5.0 wire format and run in the same sandbox.
The 0.5.0 Language fixture returns an import edge with
Unknownand exercises resolution and scope analysis.The 0.5.0 Metric fixture measures the resolved imports supplied by a 0.6.0 Language plugin.
Three sandbox tests still reject components that request filesystem, clock, or socket capabilities.
Four adversarial reviewers exercised 67 CLI trace assertions and 14 host integration cases with no verified findings.
An Independent reviewer verified both legacy interfaces and the exact fail-first trace result on the earlier revision.
Independent verification passed on
4efb85ee, including both legacy interfaces, sandbox rejection, and the Python regression.Independent reviewers verified the cache-key change and the final merge separately, and reran both named regressions on
016887b0.Runtime evidence
PASS on
016887b0.The regression creates a tracked repository containing both export orderings.
It checks six actual
codeint tracecalls, including two targets reached from one specifier used by bothimport()andrequire().The test removes its temporary repository on exit.
An unchanged-source comparison identified three Metrics for the combined version update.
e.mjsinstead ofc.cjs.right.mjsinstead ofwrong.cjs.Gaps
The batch follow-up owns Metric version increments.
The final review confirmed that the last merge added only the current main changes.