diff --git a/.github/labeler.yml b/.github/labeler.yml index 6ba26f6e091e..02ec3c19f102 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -29,8 +29,8 @@ A-Parser: - crates/rome_js_syntax/** - crates/rome_json_parser/** - crates/rome_json_syntax/** - - crates/rome_css_parser/** - - crates/rome_css_syntax/** + - crates/biome_css_parser/** + - crates/biome_css_syntax/** A-Formatter: - crates/rome_formatter/** diff --git a/Cargo.lock b/Cargo.lock index a81fd93b980e..174f02e39b1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,6 +129,39 @@ dependencies = [ "serde", ] +[[package]] +name = "biome_css_factory" +version = "0.2.0" +dependencies = [ + "biome_css_syntax", + "rome_rowan", +] + +[[package]] +name = "biome_css_parser" +version = "0.1.0" +dependencies = [ + "biome_css_factory", + "biome_css_syntax", + "insta", + "quickcheck", + "quickcheck_macros", + "rome_console", + "rome_diagnostics", + "rome_js_unicode_table", + "rome_parser", + "rome_rowan", + "tests_macros", + "tracing", +] + +[[package]] +name = "biome_css_syntax" +version = "0.2.0" +dependencies = [ + "rome_rowan", +] + [[package]] name = "biome_lsp" version = "0.0.0" @@ -1902,39 +1935,6 @@ dependencies = [ "rome_rowan", ] -[[package]] -name = "rome_css_factory" -version = "0.2.0" -dependencies = [ - "rome_css_syntax", - "rome_rowan", -] - -[[package]] -name = "rome_css_parser" -version = "0.1.0" -dependencies = [ - "insta", - "quickcheck", - "quickcheck_macros", - "rome_console", - "rome_css_factory", - "rome_css_syntax", - "rome_diagnostics", - "rome_js_unicode_table", - "rome_parser", - "rome_rowan", - "tests_macros", - "tracing", -] - -[[package]] -name = "rome_css_syntax" -version = "0.2.0" -dependencies = [ - "rome_rowan", -] - [[package]] name = "rome_deserialize" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index fb9a2e43a910..2297a79f17f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,9 @@ inherits = "release" [workspace.dependencies] # Internal crates +biome_css_factory = { path = "./crates/biome_css_factory" } +biome_css_parser = { path = "./crates/biome_css_parser" } +biome_css_syntax = { path = "./crates/biome_css_syntax" } biome_lsp = { path = "./crates/biome_lsp" } biome_markup = { version = "0.0.1", path = "./crates/biome_markup" } biome_test_utils = { path = "./crates/biome_test_utils" } @@ -34,9 +37,6 @@ rome_aria_metadata = { path = "./crates/rome_aria_metadata" } rome_cli = { path = "./crates/rome_cli" } rome_console = { version = "0.0.1", path = "./crates/rome_console" } rome_control_flow = { path = "./crates/rome_control_flow" } -rome_css_factory = { path = "./crates/rome_css_factory" } -rome_css_parser = { path = "./crates/rome_css_parser" } -rome_css_syntax = { path = "./crates/rome_css_syntax" } rome_deserialize = { version = "0.2.0", path = "./crates/rome_deserialize" } rome_diagnostics = { version = "0.2.0", path = "./crates/rome_diagnostics" } rome_diagnostics_categories = { version = "0.2.0", path = "./crates/rome_diagnostics_categories" } diff --git a/crates/rome_css_factory/Cargo.toml b/crates/biome_css_factory/Cargo.toml similarity index 68% rename from crates/rome_css_factory/Cargo.toml rename to crates/biome_css_factory/Cargo.toml index 8b9b245a585a..95410cea36da 100644 --- a/crates/rome_css_factory/Cargo.toml +++ b/crates/biome_css_factory/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true license.workspace = true -name = "rome_css_factory" +name = "biome_css_factory" repository.workspace = true version = "0.2.0" @@ -10,5 +10,5 @@ version = "0.2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rome_css_syntax = { workspace = true } -rome_rowan = { workspace = true } +biome_css_syntax = { workspace = true } +rome_rowan = { workspace = true } diff --git a/crates/rome_css_factory/src/generated.rs b/crates/biome_css_factory/src/generated.rs similarity index 100% rename from crates/rome_css_factory/src/generated.rs rename to crates/biome_css_factory/src/generated.rs diff --git a/crates/rome_css_factory/src/generated/node_factory.rs b/crates/biome_css_factory/src/generated/node_factory.rs similarity index 99% rename from crates/rome_css_factory/src/generated/node_factory.rs rename to crates/biome_css_factory/src/generated/node_factory.rs index 1d2240bce38f..625048ec38cb 100644 --- a/crates/rome_css_factory/src/generated/node_factory.rs +++ b/crates/biome_css_factory/src/generated/node_factory.rs @@ -2,7 +2,7 @@ #![allow(clippy::redundant_closure)] #![allow(clippy::too_many_arguments)] -use rome_css_syntax::{ +use biome_css_syntax::{ CssSyntaxElement as SyntaxElement, CssSyntaxNode as SyntaxNode, CssSyntaxToken as SyntaxToken, *, }; diff --git a/crates/rome_css_factory/src/generated/syntax_factory.rs b/crates/biome_css_factory/src/generated/syntax_factory.rs similarity index 99% rename from crates/rome_css_factory/src/generated/syntax_factory.rs rename to crates/biome_css_factory/src/generated/syntax_factory.rs index bb174c5ddd9f..44cd0004b08d 100644 --- a/crates/rome_css_factory/src/generated/syntax_factory.rs +++ b/crates/biome_css_factory/src/generated/syntax_factory.rs @@ -1,6 +1,6 @@ //! Generated file, do not edit by hand, see `xtask/codegen` -use rome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, T, *}; +use biome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, T, *}; use rome_rowan::{AstNode, ParsedChildren, RawNodeSlots, RawSyntaxNode, SyntaxFactory, SyntaxKind}; #[derive(Debug)] pub struct CssSyntaxFactory; diff --git a/crates/rome_css_factory/src/lib.rs b/crates/biome_css_factory/src/lib.rs similarity index 78% rename from crates/rome_css_factory/src/lib.rs rename to crates/biome_css_factory/src/lib.rs index 16a8de7b5625..806b57588b22 100644 --- a/crates/rome_css_factory/src/lib.rs +++ b/crates/biome_css_factory/src/lib.rs @@ -1,12 +1,12 @@ pub use crate::generated::CssSyntaxFactory; -use rome_css_syntax::CssLanguage; +use biome_css_syntax::CssLanguage; use rome_rowan::TreeBuilder; mod generated; // Re-exported for tests #[doc(hidden)] -pub use rome_css_syntax as syntax; +pub use biome_css_syntax as syntax; pub type CssSyntaxTreeBuilder = TreeBuilder<'static, CssLanguage, CssSyntaxFactory>; diff --git a/crates/rome_css_parser/Cargo.toml b/crates/biome_css_parser/Cargo.toml similarity index 81% rename from crates/rome_css_parser/Cargo.toml rename to crates/biome_css_parser/Cargo.toml index b1a35d9a94af..5b3ef27a912d 100644 --- a/crates/rome_css_parser/Cargo.toml +++ b/crates/biome_css_parser/Cargo.toml @@ -2,18 +2,18 @@ authors.workspace = true categories = ["parser-implementations", "development-tools"] description = "An extremely fast CSS parser" -documentation = "https://docs.rs/rome_css_parser" +documentation = "https://docs.rs/biome_css_parser" edition.workspace = true homepage.workspace = true license.workspace = true -name = "rome_css_parser" +name = "biome_css_parser" repository.workspace = true version = "0.1.0" [dependencies] +biome_css_factory = { workspace = true } +biome_css_syntax = { workspace = true } rome_console = { workspace = true } -rome_css_factory = { workspace = true } -rome_css_syntax = { workspace = true } rome_diagnostics = { workspace = true } rome_js_unicode_table = { workspace = true } rome_parser = { workspace = true } diff --git a/crates/rome_css_parser/LICENSE b/crates/biome_css_parser/LICENSE similarity index 100% rename from crates/rome_css_parser/LICENSE rename to crates/biome_css_parser/LICENSE diff --git a/crates/rome_css_parser/README.md b/crates/biome_css_parser/README.md similarity index 78% rename from crates/rome_css_parser/README.md rename to crates/biome_css_parser/README.md index 6462ef4304d0..d7a19125cc1e 100644 --- a/crates/rome_css_parser/README.md +++ b/crates/biome_css_parser/README.md @@ -12,12 +12,11 @@ [discord-url]: https://discord.gg/BypW39g6Yc [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml -[cargo-badge]: https://badgen.net/crates/v/rome_css_parser?&color=green -[cargo-url]: https://crates.io/crates/rome_css_parser/ +[cargo-badge]: https://badgen.net/crates/v/biome_css_parser?&color=green +[cargo-url]: https://crates.io/crates/biome_css_parser/ -# `rome_css_parser` - -Biome's CSS parser implementation. Follow the [documentation](https://docs.rs/rome_css_parser/latest). +# `biome_css_parser` +Biome's CSS parser implementation. Follow the [documentation](https://docs.rs/biome_css_parser/latest). diff --git a/crates/rome_css_parser/ROME_LICENSE b/crates/biome_css_parser/ROME_LICENSE similarity index 100% rename from crates/rome_css_parser/ROME_LICENSE rename to crates/biome_css_parser/ROME_LICENSE diff --git a/crates/rome_css_parser/src/lexer/mod.rs b/crates/biome_css_parser/src/lexer/mod.rs similarity index 99% rename from crates/rome_css_parser/src/lexer/mod.rs rename to crates/biome_css_parser/src/lexer/mod.rs index 4db8d1c0f199..390240d702cd 100644 --- a/crates/rome_css_parser/src/lexer/mod.rs +++ b/crates/biome_css_parser/src/lexer/mod.rs @@ -3,7 +3,7 @@ mod tests; use crate::CssParserOptions; -use rome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, TextLen, TextRange, TextSize, T}; +use biome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, TextLen, TextRange, TextSize, T}; use rome_js_unicode_table::{is_id_continue, is_id_start, lookup_byte, Dispatch::*}; use rome_parser::diagnostic::ParseDiagnostic; use std::char::REPLACEMENT_CHARACTER; diff --git a/crates/rome_css_parser/src/lexer/tests.rs b/crates/biome_css_parser/src/lexer/tests.rs similarity index 99% rename from crates/rome_css_parser/src/lexer/tests.rs rename to crates/biome_css_parser/src/lexer/tests.rs index 3952323f804d..4a33f573b2ee 100644 --- a/crates/rome_css_parser/src/lexer/tests.rs +++ b/crates/biome_css_parser/src/lexer/tests.rs @@ -21,7 +21,7 @@ macro_rules! assert_lex { $( assert_eq!( tokens[idx].kind, - rome_css_syntax::CssSyntaxKind::$kind, + biome_css_syntax::CssSyntaxKind::$kind, "expected token kind {}, but found {:?}", stringify!($kind), tokens[idx].kind, diff --git a/crates/rome_css_parser/src/lib.rs b/crates/biome_css_parser/src/lib.rs similarity index 91% rename from crates/rome_css_parser/src/lib.rs rename to crates/biome_css_parser/src/lib.rs index 6a8d1c8b668c..e387e2df4b2e 100644 --- a/crates/rome_css_parser/src/lib.rs +++ b/crates/biome_css_parser/src/lib.rs @@ -3,9 +3,9 @@ use crate::parser::CssParser; use crate::syntax::parse_root; +use biome_css_factory::CssSyntaxFactory; +use biome_css_syntax::{CssLanguage, CssRoot, CssSyntaxNode}; pub use parser::CssParserOptions; -use rome_css_factory::CssSyntaxFactory; -use rome_css_syntax::{CssLanguage, CssRoot, CssSyntaxNode}; pub use rome_parser::prelude::*; use rome_parser::tree_sink::LosslessTreeSink; use rome_rowan::{AstNode, NodeCache}; @@ -60,13 +60,13 @@ impl CssParse { /// The syntax node represented by this Parse result /// /// ``` - /// # use rome_css_parser::parse_css; - /// # use rome_css_syntax::CssSyntaxKind; + /// # use biome_css_parser::parse_css; + /// # use biome_css_syntax::CssSyntaxKind; /// # use rome_rowan::{AstNode, AstNodeList, SyntaxError}; /// /// # fn main() -> Result<(), SyntaxError> { - /// use rome_css_syntax::CssSyntaxKind; - /// use rome_css_parser::CssParserOptions; + /// use biome_css_syntax::CssSyntaxKind; + /// use biome_css_parser::CssParserOptions; /// let parse = parse_css(r#""#, CssParserOptions::default()); /// /// let root_value = parse.tree().rules(); diff --git a/crates/rome_css_parser/src/parser.rs b/crates/biome_css_parser/src/parser.rs similarity index 97% rename from crates/rome_css_parser/src/parser.rs rename to crates/biome_css_parser/src/parser.rs index 36312aea023d..0e401f223eca 100644 --- a/crates/rome_css_parser/src/parser.rs +++ b/crates/biome_css_parser/src/parser.rs @@ -1,5 +1,5 @@ use crate::token_source::CssTokenSource; -use rome_css_syntax::CssSyntaxKind; +use biome_css_syntax::CssSyntaxKind; use rome_parser::diagnostic::merge_diagnostics; use rome_parser::event::Event; use rome_parser::prelude::*; diff --git a/crates/rome_css_parser/src/prelude.rs b/crates/biome_css_parser/src/prelude.rs similarity index 53% rename from crates/rome_css_parser/src/prelude.rs rename to crates/biome_css_parser/src/prelude.rs index bd22b87c8942..3b1db114957d 100644 --- a/crates/rome_css_parser/src/prelude.rs +++ b/crates/biome_css_parser/src/prelude.rs @@ -1,2 +1,2 @@ -pub use rome_css_syntax::T; +pub use biome_css_syntax::T; pub use rome_parser::prelude::*; diff --git a/crates/rome_css_parser/src/syntax.rs b/crates/biome_css_parser/src/syntax.rs similarity index 84% rename from crates/rome_css_parser/src/syntax.rs rename to crates/biome_css_parser/src/syntax.rs index 7f92f21444d6..0d6f8cf942f6 100644 --- a/crates/rome_css_parser/src/syntax.rs +++ b/crates/biome_css_parser/src/syntax.rs @@ -1,5 +1,5 @@ use crate::parser::CssParser; -use rome_css_syntax::CssSyntaxKind::*; +use biome_css_syntax::CssSyntaxKind::*; use rome_parser::Parser; pub(crate) fn parse_root(p: &mut CssParser) { diff --git a/crates/rome_css_parser/src/token_source.rs b/crates/biome_css_parser/src/token_source.rs similarity index 96% rename from crates/rome_css_parser/src/token_source.rs rename to crates/biome_css_parser/src/token_source.rs index 102b54811bb8..f800126112fd 100644 --- a/crates/rome_css_parser/src/token_source.rs +++ b/crates/biome_css_parser/src/token_source.rs @@ -1,7 +1,7 @@ use crate::lexer::{Lexer, Token}; use crate::CssParserOptions; -use rome_css_syntax::CssSyntaxKind::{EOF, TOMBSTONE}; -use rome_css_syntax::{CssSyntaxKind, TextRange}; +use biome_css_syntax::CssSyntaxKind::{EOF, TOMBSTONE}; +use biome_css_syntax::{CssSyntaxKind, TextRange}; use rome_parser::diagnostic::ParseDiagnostic; use rome_parser::prelude::TokenSource; use rome_parser::token_source::Trivia; diff --git a/crates/rome_css_parser/tests/css_test_suite/ok/empty.css b/crates/biome_css_parser/tests/css_test_suite/ok/empty.css similarity index 100% rename from crates/rome_css_parser/tests/css_test_suite/ok/empty.css rename to crates/biome_css_parser/tests/css_test_suite/ok/empty.css diff --git a/crates/rome_css_parser/tests/css_test_suite/ok/empty.css.snap b/crates/biome_css_parser/tests/css_test_suite/ok/empty.css.snap similarity index 81% rename from crates/rome_css_parser/tests/css_test_suite/ok/empty.css.snap rename to crates/biome_css_parser/tests/css_test_suite/ok/empty.css.snap index 35ced7bd9bc5..f389db1aa37e 100644 --- a/crates/rome_css_parser/tests/css_test_suite/ok/empty.css.snap +++ b/crates/biome_css_parser/tests/css_test_suite/ok/empty.css.snap @@ -1,5 +1,5 @@ --- -source: crates/rome_css_parser/tests/spec_test.rs +source: crates/biome_css_parser/tests/spec_test.rs expression: snapshot --- @@ -27,5 +27,3 @@ CssRoot { 1: EOF@0..0 "" [] [] ``` - - diff --git a/crates/rome_css_parser/tests/spec_test.rs b/crates/biome_css_parser/tests/spec_test.rs similarity index 98% rename from crates/rome_css_parser/tests/spec_test.rs rename to crates/biome_css_parser/tests/spec_test.rs index bf20f13e7ddb..869ded6573cb 100644 --- a/crates/rome_css_parser/tests/spec_test.rs +++ b/crates/biome_css_parser/tests/spec_test.rs @@ -1,6 +1,6 @@ +use biome_css_parser::{parse_css, CssParserOptions}; use rome_console::fmt::{Formatter, Termcolor}; use rome_console::markup; -use rome_css_parser::{parse_css, CssParserOptions}; use rome_diagnostics::display::PrintDiagnostic; use rome_diagnostics::termcolor; use rome_diagnostics::DiagnosticExt; diff --git a/crates/rome_css_parser/tests/spec_tests.rs b/crates/biome_css_parser/tests/spec_tests.rs similarity index 100% rename from crates/rome_css_parser/tests/spec_tests.rs rename to crates/biome_css_parser/tests/spec_tests.rs diff --git a/crates/rome_css_syntax/Cargo.toml b/crates/biome_css_syntax/Cargo.toml similarity index 74% rename from crates/rome_css_syntax/Cargo.toml rename to crates/biome_css_syntax/Cargo.toml index 699e9d3ea9c9..aa19ae136aa4 100644 --- a/crates/rome_css_syntax/Cargo.toml +++ b/crates/biome_css_syntax/Cargo.toml @@ -1,10 +1,10 @@ [package] authors.workspace = true -description = "SyntaxKind and common rowan definitions for rome_css_parser" -documentation = "https://docs.rs/rome_css_parser" +description = "SyntaxKind and common rowan definitions for biome_css_parser" +documentation = "https://docs.rs/biome_css_parser" edition.workspace = true license.workspace = true -name = "rome_css_syntax" +name = "biome_css_syntax" repository.workspace = true version = "0.2.0" diff --git a/crates/rome_css_syntax/src/generated.rs b/crates/biome_css_syntax/src/generated.rs similarity index 100% rename from crates/rome_css_syntax/src/generated.rs rename to crates/biome_css_syntax/src/generated.rs diff --git a/crates/rome_css_syntax/src/generated/kind.rs b/crates/biome_css_syntax/src/generated/kind.rs similarity index 100% rename from crates/rome_css_syntax/src/generated/kind.rs rename to crates/biome_css_syntax/src/generated/kind.rs diff --git a/crates/rome_css_syntax/src/generated/macros.rs b/crates/biome_css_syntax/src/generated/macros.rs similarity index 100% rename from crates/rome_css_syntax/src/generated/macros.rs rename to crates/biome_css_syntax/src/generated/macros.rs diff --git a/crates/rome_css_syntax/src/generated/nodes.rs b/crates/biome_css_syntax/src/generated/nodes.rs similarity index 100% rename from crates/rome_css_syntax/src/generated/nodes.rs rename to crates/biome_css_syntax/src/generated/nodes.rs diff --git a/crates/rome_css_syntax/src/generated/nodes_mut.rs b/crates/biome_css_syntax/src/generated/nodes_mut.rs similarity index 100% rename from crates/rome_css_syntax/src/generated/nodes_mut.rs rename to crates/biome_css_syntax/src/generated/nodes_mut.rs diff --git a/crates/rome_css_syntax/src/lib.rs b/crates/biome_css_syntax/src/lib.rs similarity index 100% rename from crates/rome_css_syntax/src/lib.rs rename to crates/biome_css_syntax/src/lib.rs diff --git a/crates/rome_css_syntax/src/syntax_node.rs b/crates/biome_css_syntax/src/syntax_node.rs similarity index 100% rename from crates/rome_css_syntax/src/syntax_node.rs rename to crates/biome_css_syntax/src/syntax_node.rs diff --git a/packages/@biomejs/js-api/README.md b/packages/@biomejs/js-api/README.md index 7b217f02cb8f..61e91971fd6f 100644 --- a/packages/@biomejs/js-api/README.md +++ b/packages/@biomejs/js-api/README.md @@ -46,7 +46,7 @@ console.log('Lint diagnostics: ', html); ## Philosophy -The project philosophy can be found on our [website](https://docs.rome.tools/internals/philosophy/). +The project philosophy can be found on our [website](https://biomejs.dev/internals/philosophy/). ## Community diff --git a/xtask/codegen/src/generate_syntax_factory.rs b/xtask/codegen/src/generate_syntax_factory.rs index b1cc5673f64c..7364ff1391c4 100644 --- a/xtask/codegen/src/generate_syntax_factory.rs +++ b/xtask/codegen/src/generate_syntax_factory.rs @@ -13,7 +13,7 @@ pub fn generate_syntax_factory(ast: &AstSrc, language_kind: LanguageKind) -> Res quote! { JsSyntaxFactory }, ), LanguageKind::Css => ( - quote! { rome_css_syntax }, + quote! { biome_css_syntax }, quote! { CssSyntaxKind }, quote! { CssSyntaxFactory }, ), diff --git a/xtask/codegen/src/lib.rs b/xtask/codegen/src/lib.rs index b6f84407f784..149de03196e9 100644 --- a/xtask/codegen/src/lib.rs +++ b/xtask/codegen/src/lib.rs @@ -144,7 +144,7 @@ impl LanguageKind { pub fn syntax_crate_name(&self) -> &'static str { match self { LanguageKind::Js => "rome_js_syntax", - LanguageKind::Css => "rome_css_syntax", + LanguageKind::Css => "biome_css_syntax", LanguageKind::Json => "rome_json_syntax", } } @@ -152,7 +152,7 @@ impl LanguageKind { pub fn factory_crate_name(&self) -> &'static str { match self { LanguageKind::Js => "rome_js_factory", - LanguageKind::Css => "rome_css_factory", + LanguageKind::Css => "biome_css_factory", LanguageKind::Json => "rome_json_factory", } }