Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
Co-authored-by: 강동윤 (Donny) <[email protected]>

Closes GH-120.
  • Loading branch information
wooorm authored Aug 5, 2024
1 parent d1dc072 commit d0788c9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 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.100", features = [
"ecma_ast",
"ecma_visit",
"ecma_parser",
Expand Down
4 changes: 2 additions & 2 deletions tests/mdx_expression_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn mdx_expression_text_gnostic_core() -> Result<(), message::Message> {
.err()
.unwrap()
.to_string(),
"1:4: Could not parse expression with swc: Unexpected eof (mdx:swc)",
"1:9: Could not parse expression with swc: Unexpected eof (mdx:swc)",
"should crash on an incorrect line comment (1)"
);

Expand All @@ -76,7 +76,7 @@ fn mdx_expression_text_gnostic_core() -> Result<(), message::Message> {
.err()
.unwrap()
.to_string(),
"1:4: Could not parse expression with swc: Unexpected eof (mdx:swc)",
"1:13: Could not parse expression with swc: Unexpected eof (mdx:swc)",
"should crash on an incorrect line comment (2)"
);

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 d0788c9

Please sign in to comment.