+
Skip to content

Conversation

siketyan
Copy link
Member

Reverts #7158

It should check if the remapping is actually available based on tsconfig.json. Reverting it for now and I'll revamp the implementation later.

@siketyan siketyan requested a review from arendjr August 13, 2025 07:58
@siketyan siketyan self-assigned this Aug 13, 2025
Copy link

changeset-bot bot commented Aug 13, 2025

⚠️ No Changeset found

Latest commit: 071f27a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

Walkthrough

This PR removes the resolver’s extension-alias feature across code and tests. It deletes the default alias map in js_module_info/visitor.rs and removes passing extension_alias in ResolveOptions. In biome_resolver, it eliminates alias-based absolute/relative resolution, the ResolveOptions.extension_alias field, and the with_extension_alias constructor, relying solely on configured extensions. Corresponding tests validating alias behaviour are removed. A changeset entry describing the alias behaviour is deleted. No exported/public API is added; one public field and one method are removed.

Possibly related PRs

Suggested labels

A-Resolver

Suggested reviewers

  • arendjr
  • ematipico
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-7158-feat/resolve-extension-alias

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added A-Project Area: project A-Resolver Area: resolver labels Aug 13, 2025
Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I think you'll need to base it on the moduleResolution setting. If it's node16 or nodenext we should enable this, otherwise leave it disabled.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
crates/biome_resolver/src/lib.rs (1)

718-724: Doc nit: clarify where extensions are applied (not just “relative paths”)

extensions are used for absolute paths and directory defaults too. Tighten the wording.

Apply this diff to the ResolveOptions::extensions docs:

-    /// List of extensions to search for in relative paths.
+    /// List of extensions to search for when resolving files.
+    ///
+    /// Used for:
+    /// - Relative paths (e.g. ./foo -> ./foo.<ext>)
+    /// - Absolute paths (e.g. /abs/foo -> /abs/foo.<ext>)
+    /// - Default files in directories (e.g. ./dir -> ./dir/index.<ext>)
@@
-    /// Extensions are checked in the order given, meaning the first extension
-    /// in the list has the highest priority.
+    /// Extensions are checked in the order given; the first extension has the
+    /// highest priority.
@@
-    /// Extensions should be provided without leading dot.
+    /// Extensions should be provided without a leading dot.

Also, per repository guidelines, please run just format before landing to keep docs and code styled uniformly.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4dbd9f and 071f27a.

📒 Files selected for processing (4)
  • .changeset/petite-waves-love.md (0 hunks)
  • crates/biome_module_graph/src/js_module_info/visitor.rs (1 hunks)
  • crates/biome_resolver/src/lib.rs (3 hunks)
  • crates/biome_resolver/tests/spec_tests.rs (0 hunks)
💤 Files with no reviewable changes (2)
  • .changeset/petite-waves-love.md
  • crates/biome_resolver/tests/spec_tests.rs
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{rs,toml}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Format code (Rust + TOML) using just format

Format Rust and TOML files before committing (use just f/just format).

Files:

  • crates/biome_module_graph/src/js_module_info/visitor.rs
  • crates/biome_resolver/src/lib.rs
crates/biome_*/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Core crates must be located in /crates/biome_*/

Files:

  • crates/biome_module_graph/src/js_module_info/visitor.rs
  • crates/biome_resolver/src/lib.rs
🧠 Learnings (2)
📚 Learning: 2025-08-11T11:50:12.081Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:50:12.081Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/collector.rs : Thin (module-level) inference may resolve qualifiers to local declarations or globals (TypeReference::Resolved), mark imported bindings as TypeReference::Import, and set unresolved to TypeReference::Unknown; it must not look beyond the current module

Applied to files:

  • crates/biome_module_graph/src/js_module_info/visitor.rs
📚 Learning: 2025-08-11T11:50:12.081Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:50:12.081Z
Learning: Applies to crates/biome_js_type_info/src/**/*.rs : Represent links between types using TypeReference (not Arc) to avoid cross-module retention and recursive structures; store type data in linear vectors

Applied to files:

  • crates/biome_module_graph/src/js_module_info/visitor.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Documentation
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Test Node.js API
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: autofix
🔇 Additional comments (3)
crates/biome_resolver/src/lib.rs (2)

43-45: Revert restores straightforward absolute-path resolution — looks good

Calling resolve_absolute_path directly here is consistent with removing alias support. No functional concerns.


109-115: Directly delegating relative paths to absolute resolution is appropriate post-revert

Joining base_dir and path, then normalising in resolve_absolute_path, keeps behaviour correct and simple.

crates/biome_module_graph/src/js_module_info/visitor.rs (1)

396-397: Whitespace-only tweak — all fine

Formatting change only; no behavioural impact.

Copy link

codspeed-hq bot commented Aug 13, 2025

CodSpeed Performance Report

Merging #7199 will not alter performance

Comparing revert-7158-feat/resolve-extension-alias (071f27a) with main (1a4279a)1

Summary

✅ 128 untouched benchmarks

Footnotes

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

@siketyan siketyan merged commit 62b7814 into main Aug 13, 2025
29 of 30 checks passed
@siketyan siketyan deleted the revert-7158-feat/resolve-extension-alias branch August 13, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Project Area: project A-Resolver Area: resolver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载