You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @pkudinov — the extract.py change is correct and well-scoped: it handles exact subpath exports, conditional exports (source/import/require/types, source-first), and wildcard subpaths, and it's additive (export candidates are tried first, the package_dir / subpath fallback is preserved), so no regression risk to existing resolution.
The only blocker is a rebase: #1352 (npm/yarn workspaces) landed first, and both PRs added tests at the same anchor in tests/test_js_import_resolution.py, so this is now CONFLICTING. The conflict is only in the test file — extract.py auto-merges cleanly. Please rebase onto current v8 and keep both sets of tests (trivial concatenation); then CI can run and I'll merge.
Optional follow-up nit: also handle array-form export targets ("./x": ["./a.ts", "./b.ts"]), which currently return no candidates.
Rebased this PR onto current v8 and resolved the test-file conflict by keeping both the npm/yarn workspace coverage and the pnpm package-subpath export coverage.
I also included the optional array-form export target handling for entries like "./x": ["./a.ts", "./b.ts"].
Verification: uv run pytest -q passed with 2098 passed, 28 skipped.
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
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
exports./browser./server/queries/*Fixes #1308.
Verification
uv run pytest tests/test_js_import_resolution.py