diff --git a/Cargo.lock b/Cargo.lock index 8aaa505d4..8f84e5bd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1500,7 +1500,6 @@ dependencies = [ "globset", "ignore", "log", - "miette", "oxc_allocator", "oxc_diagnostics", "oxc_linter", @@ -1526,7 +1525,6 @@ dependencies = [ "language-tags", "lazy_static", "memchr", - "miette", "mime_guess", "num-traits", "once_cell", @@ -1606,12 +1604,12 @@ name = "oxc_napi_parser" version = "0.0.0" dependencies = [ "flexbuffers", - "miette", "napi", "napi-build", "napi-derive", "oxc_allocator", "oxc_ast", + "oxc_diagnostics", "oxc_parser", "oxc_span", "serde", @@ -1692,7 +1690,6 @@ dependencies = [ "indexmap", "insta", "itertools 0.12.0", - "miette", "oxc_allocator", "oxc_ast", "oxc_diagnostics", diff --git a/crates/oxc_diagnostics/Cargo.toml b/crates/oxc_diagnostics/Cargo.toml index 8925f9bb2..f53fd0313 100644 --- a/crates/oxc_diagnostics/Cargo.toml +++ b/crates/oxc_diagnostics/Cargo.toml @@ -19,7 +19,7 @@ doctest = false [dependencies] thiserror = { workspace = true } -miette = { workspace = true } +miette = { workspace = true, features = ["fancy-no-backtrace"] } unicode-width = "0.1.11" owo-colors = { version = "3.5.0" } diff --git a/crates/oxc_language_server/Cargo.toml b/crates/oxc_language_server/Cargo.toml index 45a4b2ac8..5fa18694a 100644 --- a/crates/oxc_language_server/Cargo.toml +++ b/crates/oxc_language_server/Cargo.toml @@ -29,7 +29,6 @@ oxc_span = { workspace = true } dashmap = { workspace = true } futures = { workspace = true } ignore = { workspace = true, features = ["simd-accel"] } -miette = { workspace = true, features = ["fancy-no-backtrace"] } ropey = { workspace = true } tokio = { workspace = true, features = ["full"] } tower-lsp = { workspace = true, features = ["proposed"] } diff --git a/crates/oxc_linter/Cargo.toml b/crates/oxc_linter/Cargo.toml index 49799079e..8e1a099a0 100644 --- a/crates/oxc_linter/Cargo.toml +++ b/crates/oxc_linter/Cargo.toml @@ -52,8 +52,7 @@ memchr = "2.7.1" json-strip-comments = "1.0.1" [dev-dependencies] -miette = { workspace = true } -insta = { workspace = true } +insta = { workspace = true } [package.metadata.cargo-machete] ignored = ["once_cell"] diff --git a/crates/oxc_linter/src/fixer.rs b/crates/oxc_linter/src/fixer.rs index 04a293757..6a2bda2b9 100644 --- a/crates/oxc_linter/src/fixer.rs +++ b/crates/oxc_linter/src/fixer.rs @@ -116,8 +116,11 @@ impl<'a> Fixer<'a> { mod test { use std::borrow::Cow; - use miette::{self, Diagnostic}; - use oxc_diagnostics::{thiserror::Error, Error}; + use oxc_diagnostics::{ + miette::{self, Diagnostic}, + thiserror::Error, + Error, + }; use oxc_span::Span; use super::{Fix, FixResult, Fixer, Message}; diff --git a/crates/oxc_semantic/Cargo.toml b/crates/oxc_semantic/Cargo.toml index 53eb49a72..ad6dae437 100644 --- a/crates/oxc_semantic/Cargo.toml +++ b/crates/oxc_semantic/Cargo.toml @@ -41,7 +41,6 @@ bitflags = { workspace = true } indexmap = { workspace = true } insta = { workspace = true } itertools = { workspace = true } -miette = { workspace = true, features = ["fancy-no-backtrace"] } phf = { workspace = true, features = ["macros"] } pretty_assertions = "1.4.0" rustc-hash = { workspace = true } diff --git a/crates/oxc_semantic/tests/util/mod.rs b/crates/oxc_semantic/tests/util/mod.rs index b5e814596..be6142f5f 100644 --- a/crates/oxc_semantic/tests/util/mod.rs +++ b/crates/oxc_semantic/tests/util/mod.rs @@ -6,7 +6,6 @@ use std::{path::PathBuf, sync::Arc}; use itertools::Itertools; use oxc_allocator::Allocator; use oxc_diagnostics::{miette::NamedSource, Error}; -extern crate miette; use oxc_semantic::{print_basic_block, Semantic, SemanticBuilder}; use oxc_span::SourceType; diff --git a/crates/oxc_semantic/tests/util/symbol_tester.rs b/crates/oxc_semantic/tests/util/symbol_tester.rs index 17c319e2b..fc763c438 100644 --- a/crates/oxc_semantic/tests/util/symbol_tester.rs +++ b/crates/oxc_semantic/tests/util/symbol_tester.rs @@ -1,7 +1,6 @@ use std::rc::Rc; use oxc_diagnostics::{miette::miette, Error}; -extern crate miette; use oxc_semantic::{Reference, ScopeFlags, Semantic, SymbolFlags, SymbolId}; use oxc_span::Atom; diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index b257bd302..c0e500a1b 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -21,15 +21,15 @@ test = false doctest = false [dependencies] -oxc_allocator = { workspace = true } -oxc_parser = { workspace = true } -oxc_ast = { workspace = true, features = ["serde"] } -oxc_span = { workspace = true } +oxc_allocator = { workspace = true } +oxc_parser = { workspace = true } +oxc_ast = { workspace = true, features = ["serde"] } +oxc_span = { workspace = true } +oxc_diagnostics = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } flexbuffers = { version = "2.0.0" } -miette = { workspace = true, features = ["fancy-no-backtrace"] } tokio = { workspace = true } napi = { version = "2", features = ["serde-json", "async"] } diff --git a/napi/parser/src/lib.rs b/napi/parser/src/lib.rs index 9c02815ef..6ce1bcffd 100644 --- a/napi/parser/src/lib.rs +++ b/napi/parser/src/lib.rs @@ -3,14 +3,15 @@ use std::sync::Arc; use flexbuffers::FlexbufferSerializer; -use miette::NamedSource; use napi::bindgen_prelude::Buffer; use napi_derive::napi; +use serde::Serialize; + use oxc_allocator::Allocator; pub use oxc_ast::ast::Program; +use oxc_diagnostics::miette::NamedSource; use oxc_parser::{Parser, ParserReturn}; use oxc_span::SourceType; -use serde::Serialize; /// Babel Parser Options /// diff --git a/tasks/javascript_globals/Cargo.toml b/tasks/javascript_globals/Cargo.toml index 9e16d7c41..f9b4295af 100644 --- a/tasks/javascript_globals/Cargo.toml +++ b/tasks/javascript_globals/Cargo.toml @@ -15,7 +15,7 @@ test = false [dependencies] oxc_tasks_common = { workspace = true } -serde = { workspace = true, features = ["derive"] } -lazy_static = { workspace = true } +serde = { workspace = true, features = ["derive"] } +lazy_static = { workspace = true } handlebars = "5.0.0"