Skip to content

Commit

Permalink
chore: rename rome_aria to biome_aria #88
Browse files Browse the repository at this point in the history
  • Loading branch information
kyu08 committed Sep 7, 2023
1 parent de8d546 commit 88ccaaa
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 29 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inherits = "release"
# Internal crates
biome_flags = { path = "./crates/biome_flags" }
rome_analyze = { path = "./crates/rome_analyze" }
rome_aria = { path = "./crates/rome_aria" }
biome_aria = { path = "./crates/biome_aria" }
biome_aria_metadata = { path = "./crates/biome_aria_metadata" }
rome_cli = { path = "./crates/rome_cli" }
rome_console = { version = "0.0.1", path = "./crates/rome_console" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors.workspace = true
edition.workspace = true
license.workspace = true
name = "rome_aria"
name = "biome_aria"
repository.workspace = true
version = "0.0.0"

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions crates/rome_aria/src/lib.rs → crates/biome_aria/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub use roles::AriaRoles;
/// ## Examples
///
/// ```
/// use rome_aria::is_aria_property_valid;
/// use biome_aria::is_aria_property_valid;
///
/// assert!(!is_aria_property_valid("aria-blabla"));
/// assert!(is_aria_property_valid("aria-checked"));
Expand All @@ -29,7 +29,7 @@ pub fn is_aria_property_valid(property: &str) -> bool {
/// ## Examples
///
/// ```
/// use rome_aria::is_aria_property_type_valid;
/// use biome_aria::is_aria_property_type_valid;
///
/// assert!(is_aria_property_type_valid("string"));
/// assert!(!is_aria_property_type_valid("bogus"));
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ pub trait AriaPropertyDefinition: Debug {
/// ## Examples
///
/// ```
/// use rome_aria::AriaProperties;
/// use biome_aria::AriaProperties;
///
/// let aria_properties = AriaProperties::default();
///
Expand Down
15 changes: 9 additions & 6 deletions crates/rome_aria/src/roles.rs → crates/biome_aria/src/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub trait AriaRoleDefinition: Debug {
/// ## Examples
///
/// ```
/// use rome_aria::AriaRoles;
/// use biome_aria::AriaRoles;
/// let roles = AriaRoles::default();
///
/// let checkbox_role = roles.get_role("checkbox").unwrap();
Expand All @@ -33,7 +33,7 @@ pub trait AriaRoleDefinition: Debug {
///
/// ```
///
/// use rome_aria::AriaRoles;
/// use biome_aria::AriaRoles;
/// let roles = AriaRoles::default();
///
/// let checkbox_role = roles.get_role("checkbox").unwrap();
Expand Down Expand Up @@ -812,7 +812,7 @@ impl<'a> AriaRoles {
/// ## Examples
///
/// ```
/// use rome_aria::AriaRoles;
/// use biome_aria::AriaRoles;
/// let roles = AriaRoles::default();
///
///
Expand Down Expand Up @@ -1165,20 +1165,23 @@ mod test {
let implicit_role = aria_roles
.get_implicit_role("button", &HashMap::new())
.unwrap();
assert_eq!(implicit_role.type_name(), "rome_aria::roles::ButtonRole");
assert_eq!(implicit_role.type_name(), "biome_aria::roles::ButtonRole");

// <input type="search">
let mut attributes = HashMap::new();
attributes.insert("type".to_string(), vec!["search".to_string()]);
let implicit_role = aria_roles.get_implicit_role("input", &attributes).unwrap();
assert_eq!(implicit_role.type_name(), "rome_aria::roles::SearchboxRole");
assert_eq!(
implicit_role.type_name(),
"biome_aria::roles::SearchboxRole"
);

// <select name="animals" multiple size="4">
let mut attributes = HashMap::new();
attributes.insert("name".to_string(), vec!["animals".to_string()]);
attributes.insert("multiple".to_string(), vec!["".to_string()]);
attributes.insert("size".to_string(), vec!["4".to_string()]);
let implicit_role = aria_roles.get_implicit_role("select", &attributes).unwrap();
assert_eq!(implicit_role.type_name(), "rome_aria::roles::ListBoxRole");
assert_eq!(implicit_role.type_name(), "biome_aria::roles::ListBoxRole");
}
}
2 changes: 1 addition & 1 deletion crates/rome_js_analyze/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lazy_static = { workspace = true }
natord = "1.0.9"
roaring = "0.10.1"
rome_analyze = { workspace = true }
rome_aria = { workspace = true }
biome_aria = { workspace = true }
rome_console = { workspace = true }
rome_control_flow = { workspace = true }
rome_deserialize = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::aria_services::Aria;
use biome_aria::AriaRoles;
use rome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic};
use rome_aria::AriaRoles;
use rome_console::markup;
use rome_js_syntax::{
jsx_ext::AnyJsxElement, AnyJsxAttributeValue, JsNumberLiteralExpression,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{aria_services::Aria, JsRuleAction};
use biome_aria::{roles::AriaRoleDefinition, AriaRoles};
use rome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic};
use rome_aria::{roles::AriaRoleDefinition, AriaRoles};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::aria_services::Aria;
use biome_aria::AriaPropertyTypeEnum;
use rome_analyze::context::RuleContext;
use rome_analyze::{declare_rule, Rule, RuleDiagnostic};
use rome_aria::AriaPropertyTypeEnum;
use rome_console::markup;
use rome_js_syntax::{JsSyntaxToken, JsxAttribute, TextRange};
use rome_rowan::AstNode;
Expand Down
6 changes: 3 additions & 3 deletions crates/rome_js_analyze/src/aria_services.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use biome_aria::iso::{countries, is_valid_country, is_valid_language, languages};
use biome_aria::{AriaProperties, AriaRoles};
use rome_analyze::{
AddVisitor, FromServices, MissingServicesDiagnostic, Phase, Phases, QueryKey, Queryable,
RuleKey, ServiceBag, SyntaxVisitor,
};
use rome_aria::iso::{countries, is_valid_country, is_valid_language, languages};
use rome_aria::{AriaProperties, AriaRoles};
use rome_js_syntax::{AnyJsRoot, AnyJsxAttribute, JsLanguage, JsSyntaxNode, JsxAttributeList};
use rome_rowan::AstNode;
use std::collections::HashMap;
Expand Down Expand Up @@ -74,7 +74,7 @@ impl AriaServices {
#[cfg(test)]
mod tests {
use crate::aria_services::AriaServices;
use rome_aria::{AriaProperties, AriaRoles};
use biome_aria::{AriaProperties, AriaRoles};
use rome_js_factory::make::{
ident, jsx_attribute, jsx_attribute_initializer_clause, jsx_attribute_list, jsx_name,
jsx_string, jsx_string_literal, token,
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_js_analyze/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::suppression_action::apply_suppression_comment;
use biome_aria::{AriaProperties, AriaRoles};
use rome_analyze::{
AnalysisFilter, Analyzer, AnalyzerContext, AnalyzerOptions, AnalyzerSignal, ControlFlow,
InspectMatcher, LanguageRoot, MatchQueryParams, MetadataRegistry, RuleAction, RuleRegistry,
SuppressionKind,
};
use rome_aria::{AriaProperties, AriaRoles};
use rome_diagnostics::{category, Diagnostic, Error as DiagnosticError};
use rome_js_syntax::suppression::SuppressionDiagnostic;
use rome_js_syntax::{suppression::parse_suppression_comment, JsFileSource, JsLanguage};
Expand Down
2 changes: 1 addition & 1 deletion xtask/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ walkdir = "2.3.2"
xtask = { path = '../', version = "0.0" }

rome_analyze = { path = "../../crates/rome_analyze", optional = true }
rome_aria = { path = "../../crates/rome_aria", optional = true }
biome_aria = { path = "../../crates/biome_aria", optional = true }
rome_cli = { workspace = true, optional = true }
rome_diagnostics = { path = "../../crates/rome_diagnostics", optional = true }
rome_js_analyze = { path = "../../crates/rome_js_analyze", optional = true }
Expand Down

0 comments on commit 88ccaaa

Please sign in to comment.