Skip to content

fix(resolver): resolution of namespace members#9904

Merged
ematipico merged 2 commits intomainfrom
fix/members-resolutino
Apr 10, 2026
Merged

fix(resolver): resolution of namespace members#9904
ematipico merged 2 commits intomainfrom
fix/members-resolutino

Conversation

@ematipico
Copy link
Copy Markdown
Member

Summary

Closes #9626

There were two problems:

  • The resolution of the members was gated by the infer_types, and since in 2.4.0 we broke down the project domain and type domain, this surfaced and started to fail
  • Members weren't correctly resolved using the scopes we have

Implemented with the help of an AI agent

Test Plan

Added a regression test

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: f3f4831

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the A-Project Area: project label Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 56596a23-296d-466d-b27a-5fae3b938cc5

📥 Commits

Reviewing files that changed from the base of the PR and between 109d018 and f3f4831.

📒 Files selected for processing (1)
  • crates/biome_module_graph/src/js_module_info/collector.rs

Walkthrough

The changes ensure namespace/module members are always populated when finalising the JS module graph (even if type inference is disabled) by adding a dedicated populate_namespace_and_module_members() pass and introducing collect_namespace_exports_for_binding() as a fallback to gather child bindings for export =/namespace-style declarations. Export collection now tracks whether default-assignment members were found and falls back to namespace binding scanning when needed. A regression test validates discovery of named exports from @types/react without enabling type inference.

Suggested labels

A-Linter, L-JavaScript

Suggested reviewers

  • dyc3
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: fixing namespace member resolution in the resolver, which is the core issue addressed by the PR.
Description check ✅ Passed The description clearly explains the two root causes, references the linked issue, and mentions the regression test added.
Linked Issues check ✅ Passed The PR addresses issue #9626 by fixing namespace member resolution and ensuring named exports from packages using export = pattern are correctly resolved.
Out of Scope Changes check ✅ Passed All changes are focused on fixing namespace member resolution logic, test coverage, and a changeset entry—no extraneous modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/members-resolutino

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 10, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 252 skipped benchmarks1


Comparing fix/members-resolutino (f3f4831) with main (a2933bf)2

Open in CodSpeed

Footnotes

  1. 252 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (362b638) during the generation of this report, so a2933bf was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@ematipico ematipico requested review from a team April 10, 2026 11:00
@ematipico ematipico merged commit e7775a5 into main Apr 10, 2026
16 checks passed
@ematipico ematipico deleted the fix/members-resolutino branch April 10, 2026 19:59
@github-actions github-actions Bot mentioned this pull request Apr 10, 2026
beeman added a commit to samui-build/samui-wallet that referenced this pull request Apr 20, 2026
Update the Biome schema and disable the project-domain checks
that started failing this repo under 2.4.12.

The main blocker is noUnresolvedImports. Biome's docs explicitly say
TypeScript users probably don't want this rule:
https://biomejs.dev/linter/rules/no-unresolved-imports/

Related upstream regression and fix:
biomejs/biome#9626
biomejs/biome#9904

Also disable the remaining existing findings surfaced by this bump:
useHookAtTopLevel, noArrayIndexKey, and noImportCycles.

Include the lint:fix export-order changes required for the i18n job
to stay clean.
beeman added a commit to samui-build/samui-wallet that referenced this pull request Apr 20, 2026
Update the Biome schema and disable the project-domain checks
that started failing this repo under 2.4.12.

The main blocker is noUnresolvedImports. Biome's docs explicitly say
TypeScript users probably don't want this rule:
https://biomejs.dev/linter/rules/no-unresolved-imports/

Related upstream regression and fix:
biomejs/biome#9626
biomejs/biome#9904

Also disable the remaining existing findings surfaced by this bump:
useHookAtTopLevel, noArrayIndexKey, and noImportCycles.

Include the lint:fix export-order changes required for the i18n job
to stay clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Project Area: project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

noUnresolvedImports: cannot resolve named exports from packages using export = in @types definitions (@types/react, @types/lodash)

2 participants