Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: expose ProjectLayout as service #4851

Merged
merged 8 commits into from
Jan 8, 2025

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Jan 7, 2025

Summary

This PR builds upon #4846, but takes things one step further: It puts the ProjectLayout into its own crate (biome_project_layout) and exposes it as a service. ManifestServices still exists, but can now be extracted on-demand for the right file path. This approach should help with future maintainability, because it will make it easier to extract other information from the ProjectLayout, such as TsConfigJson.

I have also updated biome_analyze to work with Utf8Path instead of std::path::Path, since these paths are also used for service extraction now.

Functionally, nothing should have changed except for improved diagnostics with noUndeclaredDependencies.

Test Plan

CI should remain green.

I have also enabled noUndeclaredDependencies in our own biome.json so we get to dogfood the rule ourselves going forward (I even discovered one unlisted dependency in the benchmarks).

@arendjr arendjr requested a review from a team January 7, 2025 13:34
@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS L-Grit Language: GritQL labels Jan 7, 2025
@arendjr arendjr requested a review from a team January 7, 2025 13:44
Copy link

codspeed-hq bot commented Jan 7, 2025

CodSpeed Performance Report

Merging #4851 will not alter performance

Comparing arendjr:expose-project-layout-as-service (381192a) with next (01044aa)

Summary

✅ 97 untouched benchmarks

@github-actions github-actions bot added the A-CLI Area: CLI label Jan 7, 2025
@arendjr arendjr merged commit 2ae40a7 into biomejs:next Jan 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Linter Area: linter A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS L-Grit Language: GritQL L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant