Skip to content

Commit d0788c9

Browse files
authored
Update dev-dependencies
Co-authored-by: 강동윤 (Donny) <[email protected]> Closes GH-120.
1 parent d1dc072 commit d0788c9

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ log = ["dep:log"]
2626
[dependencies]
2727
log = { version = "0.4", optional = true }
2828
unicode-id = { version = "0.3", features = ["no_std"] }
29-
serde = { version = "1.0", features = ["derive"], optional = true }
29+
serde = { version = "1", features = ["derive"], optional = true }
3030

3131
[dev-dependencies]
3232
env_logger = "0.11"
3333
criterion = "0.5"
3434
pretty_assertions = "1"
35-
swc_core = { version = "0.93.0", features = [
35+
swc_core = { version = "0.100", features = [
3636
"ecma_ast",
3737
"ecma_visit",
3838
"ecma_parser",

tests/mdx_expression_text.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn mdx_expression_text_gnostic_core() -> Result<(), message::Message> {
6767
.err()
6868
.unwrap()
6969
.to_string(),
70-
"1:4: Could not parse expression with swc: Unexpected eof (mdx:swc)",
70+
"1:9: Could not parse expression with swc: Unexpected eof (mdx:swc)",
7171
"should crash on an incorrect line comment (1)"
7272
);
7373

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

tests/test_utils/swc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use markdown::{MdxExpressionKind, MdxSignal};
77
use std::rc::Rc;
88
use swc_core::common::{
99
comments::{Comment, SingleThreadedComments, SingleThreadedCommentsMap},
10-
source_map::Pos,
10+
source_map::SmallPos,
1111
BytePos, FileName, SourceFile, Span, Spanned,
1212
};
1313
use swc_core::ecma::ast::{EsVersion, Expr, Module, PropOrSpread};
1414
use swc_core::ecma::parser::{
15-
error::Error as SwcError, parse_file_as_expr, parse_file_as_module, EsConfig, Syntax,
15+
error::Error as SwcError, parse_file_as_expr, parse_file_as_module, EsSyntax, Syntax,
1616
};
1717
use swc_core::ecma::visit::VisitMutWith;
1818

@@ -268,16 +268,16 @@ fn create_config(source: String) -> (SourceFile, Syntax, EsVersion) {
268268
(
269269
// File.
270270
SourceFile::new(
271-
FileName::Anon,
271+
FileName::Anon.into(),
272272
false,
273-
FileName::Anon,
273+
FileName::Anon.into(),
274274
source,
275275
BytePos::from_usize(1),
276276
),
277277
// Syntax.
278-
Syntax::Es(EsConfig {
278+
Syntax::Es(EsSyntax {
279279
jsx: true,
280-
..EsConfig::default()
280+
..EsSyntax::default()
281281
}),
282282
// Version.
283283
// To do: update once in a while (last checked: 2024-04-18).

tests/test_utils/swc_utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Lots of helpers for dealing with SWC, particularly from unist, and for
22
//! building its ES AST.
33
4-
use swc_core::common::{BytePos, Span, SyntaxContext, DUMMY_SP};
4+
use swc_core::common::{BytePos, Span, DUMMY_SP};
55
use swc_core::ecma::visit::{noop_visit_mut_type, VisitMut};
66

77
/// Visitor to fix SWC byte positions by removing a prefix.
@@ -33,6 +33,5 @@ pub fn create_span(lo: u32, hi: u32) -> Span {
3333
Span {
3434
lo: BytePos(lo),
3535
hi: BytePos(hi),
36-
ctxt: SyntaxContext::default(),
3736
}
3837
}

0 commit comments

Comments
 (0)