Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 1, 2024
1 parent d1dc072 commit ce6541a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ log = ["dep:log"]
[dependencies]
log = { version = "0.4", optional = true }
unicode-id = { version = "0.3", features = ["no_std"] }
serde = { version = "1.0", features = ["derive"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }

[dev-dependencies]
env_logger = "0.11"
criterion = "0.5"
pretty_assertions = "1"
swc_core = { version = "0.93.0", features = [
swc_core = { version = "0.99", features = [
"ecma_ast",
"ecma_visit",
"ecma_parser",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_utils/swc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use markdown::{MdxExpressionKind, MdxSignal};
use std::rc::Rc;
use swc_core::common::{
comments::{Comment, SingleThreadedComments, SingleThreadedCommentsMap},
source_map::Pos,
source_map::SmallPos,
BytePos, FileName, SourceFile, Span, Spanned,
};
use swc_core::ecma::ast::{EsVersion, Expr, Module, PropOrSpread};
use swc_core::ecma::parser::{
error::Error as SwcError, parse_file_as_expr, parse_file_as_module, EsConfig, Syntax,
error::Error as SwcError, parse_file_as_expr, parse_file_as_module, EsSyntax, Syntax,
};
use swc_core::ecma::visit::VisitMutWith;

Expand Down Expand Up @@ -268,16 +268,16 @@ fn create_config(source: String) -> (SourceFile, Syntax, EsVersion) {
(
// File.
SourceFile::new(
FileName::Anon,
FileName::Anon.into(),
false,
FileName::Anon,
FileName::Anon.into(),
source,
BytePos::from_usize(1),
),
// Syntax.
Syntax::Es(EsConfig {
Syntax::Es(EsSyntax {
jsx: true,
..EsConfig::default()
..EsSyntax::default()
}),
// Version.
// To do: update once in a while (last checked: 2024-04-18).
Expand Down
3 changes: 1 addition & 2 deletions tests/test_utils/swc_utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Lots of helpers for dealing with SWC, particularly from unist, and for
//! building its ES AST.

use swc_core::common::{BytePos, Span, SyntaxContext, DUMMY_SP};
use swc_core::common::{BytePos, Span, DUMMY_SP};
use swc_core::ecma::visit::{noop_visit_mut_type, VisitMut};

/// Visitor to fix SWC byte positions by removing a prefix.
Expand Down Expand Up @@ -33,6 +33,5 @@ pub fn create_span(lo: u32, hi: u32) -> Span {
Span {
lo: BytePos(lo),
hi: BytePos(hi),
ctxt: SyntaxContext::default(),
}
}

0 comments on commit ce6541a

Please sign in to comment.