mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor: move all miette usages to oxc_diagnostics
This commit is contained in:
parent
f039ad6007
commit
87b9978859
11 changed files with 18 additions and 22 deletions
5
Cargo.lock
generated
5
Cargo.lock
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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"] }
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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"] }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
///
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue