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

feat: add biome_project #626

Merged
merged 10 commits into from
Nov 2, 2023
Merged

feat: add biome_project #626

merged 10 commits into from
Nov 2, 2023

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Oct 29, 2023

Summary

This PR adds the concept of project. A project is a generic concept and it's not necessarily tight to the package.json file. Here's a list of important information about a project:

  • is defined with a trait called Project, a project has an associated type called Manifest;
  • it has a manifest, defined using the trait Manifest, that defines the type of project; in a Node.js project, the file package.json is the manifest;

Then, there's a node_js_project folder where I created the NodeJsProject and PackageJson types, which implement the previous traits.

The APIs of said traits are still a WIP and not set on stone. This is because I still need to wire those manifest inside the workspace. I believe these APIs will change once we actually start using those manifests based on their needs.

The PR also adds a codegen job to retrieve the licenses available on the internet, and the PR also adds some tests for how the validation happens. This is a way to show the diagnostic, the where and the how are not set on stone and it's subject to change.

Another thing that I am unsure about if the linting of a manifest should occur in its own infra (this PR prepares said infra, using the analyze method), or if we should use the current analyzer.

This is outside of the scope of this PR.

I didn't add the process of the manifest in the CLI/LSP on purpose because this still needs to be defined, and we need to understand to how to process those manifests.

Test Plan

I added some tests

@ematipico ematipico temporarily deployed to Website deployment October 29, 2023 19:12 — with GitHub Actions Inactive
@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Tooling Area: internal tools A-LSP Area: language server protocol A-Diagnostic Area: diagnostocis labels Oct 29, 2023
@github-actions
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 49701 49701 0
Passed 48720 48720 0
Failed 981 981 0
Panics 0 0 0
Coverage 98.03% 98.03% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2036 2036 0
Failed 4286 4286 0
Panics 0 0 0
Coverage 32.20% 32.20% 0.00%

ts/babel

Test result main count This PR count Difference
Total 662 662 0
Passed 592 592 0
Failed 70 70 0
Panics 0 0 0
Coverage 89.43% 89.43% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17646 17646 0
Passed 13454 13454 0
Failed 4190 4190 0
Panics 2 2 0
Coverage 76.24% 76.24% 0.00%

@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 09:56 — with GitHub Actions Inactive
@github-actions github-actions bot added A-Linter Area: linter A-Parser Area: parser L-JSON Language: JSON and super languages and removed A-Core Area: core labels Oct 30, 2023
@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 10:02 — with GitHub Actions Inactive
@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 10:03 — with GitHub Actions Inactive
@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 10:08 — with GitHub Actions Inactive
@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 10:12 — with GitHub Actions Inactive
@ematipico ematipico marked this pull request as ready for review October 30, 2023 10:19
@ematipico ematipico changed the title feat: project feat: add biome_project Oct 30, 2023
@ematipico ematipico temporarily deployed to Website deployment October 30, 2023 10:39 — with GitHub Actions Inactive
@ematipico ematipico merged commit 1f5e239 into main Nov 2, 2023
@ematipico ematipico deleted the feat/home-project branch November 2, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-LSP Area: language server protocol A-Parser Area: parser A-Project Area: project A-Tooling Area: internal tools L-JSON Language: JSON and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant