Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

chore: update dependencies and housekeeping #4640

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions Cargo.lock

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

37 changes: 21 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@ debug = true
inherits = "release"

[workspace.dependencies]
countme = "3.0.1"
dashmap = "5.4.0"
indexmap = "1.9.3"
rustc-hash = "1.1.0"
tracing = { version = "0.1.31", default-features = false, features = ["std"] }
# pinning to version 1.18 to avoid multiple versions of windows-sys as dependency
bitflags = "2.2.1"
bpaf = { version = "0.8.0", features = ["derive"] }
insta = "1.21.2"
lazy_static = "1.4.0"
quote = { version = "1.0.21" }
# Internal crates
rome_analyze = { path = "./crates/rome_analyze" }
rome_aria = { path = "./crates/rome_aria" }
rome_aria_metadata = { path = "./crates/rome_aria_metadata" }
Expand Down Expand Up @@ -69,19 +59,34 @@ rome_rowan = { version = "0.0.1", path = "./crates/rome_rowan"
rome_service = { path = "./crates/rome_service" }
rome_text_edit = { version = "0.0.1", path = "./crates/rome_text_edit" }
rome_text_size = { version = "0.0.1", path = "./crates/rome_text_size" }
schemars = { version = "0.8.10" }
smallvec = { version = "1.8.0", features = ["union", "const_new"] }
tests_macros = { path = "./crates/tests_macros" }
tokio = { version = "~1.18.5" }

# Crates needed in the workspace
bitflags = "2.3.1"
bpaf = { version = "0.8.0", features = ["derive"] }
countme = "3.0.1"
dashmap = "5.4.0"
indexmap = "1.9.3"
insta = "1.29.0"
lazy_static = "1.4.0"
quote = { version = "1.0.28" }
rustc-hash = "1.1.0"
schemars = { version = "0.8.12" }
serde = { version = "1.0.163", features = ["derive"], default-features = false }
serde_json = "1.0.96"
smallvec = { version = "1.10.0", features = ["union", "const_new"] }
tracing = { version = "0.1.37", default-features = false, features = ["std"] }
# pinning to version 1.18 to avoid multiple versions of windows-sys as dependency
tokio = { version = "~1.18.5" }


[profile.dev.package.rome_wasm]
debug = true
opt-level = 1
opt-level = "s"

[profile.test.package.rome_wasm]
debug = true
opt-level = 1
opt-level = "s"

[profile.release.package.rome_wasm]
debug = false
Expand Down
16 changes: 8 additions & 8 deletions crates/rome_analyze/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ version = "0.0.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bitflags.workspace = true
rome_console = { workspace = true }
rome_diagnostics = { workspace = true }
rome_rowan = { workspace = true }
rustc-hash = { workspace = true }
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.136", features = ["derive"] }
tracing = { workspace = true }
bitflags = { workspace = true }
rome_console = { workspace = true }
rome_diagnostics = { workspace = true }
rome_rowan = { workspace = true }
rustc-hash = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"] }
tracing = { workspace = true }


[features]
Expand Down
5 changes: 2 additions & 3 deletions crates/rome_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dashmap = { workspace = true }
hdrhistogram = { version = "7.5.0", default-features = false }
indexmap = { workspace = true }
lazy_static = { workspace = true }
pico-args = { version = "0.5.0", features = ["eq-separator"] }
rayon = "1.5.1"
rome_console = { workspace = true }
rome_deserialize = { workspace = true }
Expand All @@ -36,8 +35,8 @@ rome_rowan = { workspace = true }
rome_service = { workspace = true }
rome_text_edit = { workspace = true }
rome_text_size = { workspace = true }
serde = { version = "1.0.133", features = ["derive"] }
serde_json = { version = "1.0.74" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["io-std", "io-util", "net", "time", "rt", "sync", "rt-multi-thread", "macros"] }
tracing = { workspace = true }
tracing-appender = "0.2"
Expand Down
10 changes: 1 addition & 9 deletions crates/rome_cli/src/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rome_console::fmt::{Display, Formatter};
use rome_console::markup;
use rome_diagnostics::adapters::{BpafError, IoError, PicoArgsError};
use rome_diagnostics::adapters::{BpafError, IoError};
use rome_diagnostics::{
Advices, Category, Diagnostic, DiagnosticTags, Error, Location, LogCategory,
MessageAndDescription, Severity, Visit,
Expand Down Expand Up @@ -346,14 +346,6 @@ impl CliDiagnostic {
})
}

/// To throw when there's been an error while parsing an argument
pub fn parse_error(argument: impl Into<String>, source: pico_args::Error) -> Self {
Self::ParseError(ParseDiagnostic {
source: Some(Error::from(PicoArgsError::from(source))),
message: MessageAndDescription::from(argument.into()),
})
}

/// To throw when there's been an error while parsing an argument
pub fn parse_error_bpaf(source: bpaf::ParseFailure) -> Self {
Self::ParseError(ParseDiagnostic {
Expand Down
1 change: 0 additions & 1 deletion crates/rome_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//! to parse commands and arguments, redirect the execution of the commands and
//! execute the traversal of directory and files, based on the command that were passed.

pub use pico_args::Arguments;
use rome_console::{ColorMode, Console};
use rome_fs::OsFileSystem;
use rome_service::{App, DynRef, Workspace, WorkspaceRef};
Expand Down
4 changes: 2 additions & 2 deletions crates/rome_console/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ version = "0.0.1"
atty = "0.2.14"
rome_markup = { workspace = true }
rome_text_size = { workspace = true }
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.133", optional = true, features = ["derive"] }
schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true, features = ["derive"] }
termcolor = "1.1.2"
unicode-width = "0.1.9"

Expand Down
4 changes: 2 additions & 2 deletions crates/rome_deserialize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ rome_diagnostics = { workspace = true }
rome_json_parser = { workspace = true }
rome_json_syntax = { workspace = true }
rome_rowan = { workspace = true }
serde = "1.0.150"
serde_json = "1.0.89"
serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
9 changes: 4 additions & 5 deletions crates/rome_diagnostics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,22 @@ test = true

[dependencies]
backtrace = "0.3.66"
bitflags = "1.3.2"
bitflags = { workspace = true }
bpaf = { workspace = true }
pico-args = "0.5.0"
rome_console = { workspace = true, features = ["serde_markup"] }
rome_diagnostics_categories = { workspace = true, features = ["serde"] }
rome_diagnostics_macros = { workspace = true }
rome_rowan = { workspace = true }
rome_text_edit = { workspace = true }
rome_text_size = { workspace = true }
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.133", features = ["derive"] }
schemars = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"] }
termcolor = "1.1.2"
unicode-width = "0.1.9"

[features]
schema = ["schemars", "rome_text_edit/schemars", "rome_diagnostics_categories/schemars"]

[dev-dependencies]
serde_json = "1.0.74"
serde_json = { workspace = true }
trybuild = "1.0.80"
31 changes: 0 additions & 31 deletions crates/rome_diagnostics/src/adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,37 +71,6 @@ impl Diagnostic for IoError {
}
}

/// Implements [Diagnostic] over for [pico_args::Error].
#[derive(Debug)]
pub struct PicoArgsError {
error: pico_args::Error,
}

impl From<pico_args::Error> for PicoArgsError {
fn from(error: pico_args::Error) -> Self {
Self { error }
}
}

impl Diagnostic for PicoArgsError {
fn category(&self) -> Option<&'static Category> {
Some(category!("flags/invalid"))
}

fn tags(&self) -> DiagnosticTags {
DiagnosticTags::FIXABLE
}

fn description(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(fmt, "{}", self.error)
}

fn message(&self, fmt: &mut fmt::Formatter<'_>) -> io::Result<()> {
let error = self.error.to_string();
fmt.write_str(&error)
}
}

/// Implements [Diagnostic] over for [pico_args::Error].
#[derive(Debug)]
pub struct BpafError {
Expand Down
1 change: 1 addition & 0 deletions crates/rome_diagnostics/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub(super) enum DiagnosticTag {
}

bitflags! {
#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
pub struct DiagnosticTags: u8 {
/// This diagnostic has a fix suggestion.
const FIXABLE = 1 << DiagnosticTag::Fixable as u8;
Expand Down
4 changes: 2 additions & 2 deletions crates/rome_diagnostics_categories/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ repository.workspace = true
version = "0.0.1"

[dependencies]
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.136", optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }

[build-dependencies]
quote = "1.0.14"
4 changes: 2 additions & 2 deletions crates/rome_formatter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ rome_console = { workspace = true }
rome_diagnostics = { workspace = true }
rome_rowan = { workspace = true }
rustc-hash = { workspace = true }
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.136", features = ["derive"], optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"], optional = true }
tracing = { workspace = true }
unicode-width = "0.1.9"

Expand Down
2 changes: 1 addition & 1 deletion crates/rome_formatter_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rome_parser = { workspace = true }
rome_rowan = { workspace = true }
rome_service = { workspace = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_json = { workspace = true }
similar = "2.1.0"
similar-asserts = "1.2.0"

Expand Down
4 changes: 2 additions & 2 deletions crates/rome_fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ parking_lot = { version = "0.12.0", features = ["arc_lock"] }
rayon = "1.5.1"
rome_console = { workspace = true }
rome_diagnostics = { workspace = true }
schemars = { version = "0.8.10", optional = true }
serde = { version = "1.0.136", features = ["derive"], optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"], optional = true }
tracing = { workspace = true }

[features]
Expand Down
4 changes: 2 additions & 2 deletions crates/rome_js_analyze/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ rome_json_syntax = { workspace = true }
rome_rowan = { workspace = true }
rustc-hash = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = { version = "1.0.74" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
smallvec = { workspace = true }

[dev-dependencies]
Expand Down
Loading