Skip to content

Commit

Permalink
Update swc_core
Browse files Browse the repository at this point in the history
Closes GH-63.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
kdy1 authored Feb 6, 2025
1 parent c0ea7d4 commit cd40f62
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ swc_core = { features = [
"ecma_codegen",
"ecma_parser",
"ecma_visit",
], version = "12" }
], version = "13" }
rustc-hash = "2"

[dev-dependencies]
pretty_assertions = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/hast_util_to_swc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::swc_utils::{
};
use core::str;
use markdown::{Location, MdxExpressionKind};
use swc_core::alloc::collections::FxHashSet;
use rustc_hash::FxHashSet;
use swc_core::common::Span;
use swc_core::ecma::ast::{
Expr, ExprStmt, JSXAttr, JSXAttrOrSpread, JSXAttrValue, JSXClosingElement, JSXClosingFragment,
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! * [`compile()`][]
//! — turn MDX into JavaScript
#![deny(clippy::pedantic)]
#![allow(clippy::implicit_hasher)]
#![allow(clippy::must_use_candidate)]
#![allow(clippy::too_many_lines)]
#![allow(clippy::struct_excessive_bools)]
Expand Down Expand Up @@ -38,7 +39,8 @@ use markdown::{
message::{self, Message},
to_mdast, Constructs, Location, ParseOptions,
};
use swc_core::{alloc::collections::FxHashSet, common::Span};
use rustc_hash::FxHashSet;
use swc_core::common::Span;

pub use crate::configuration::{MdxConstructs, MdxParseOptions, Options};
pub use crate::mdast_util_to_hast::mdast_util_to_hast;
Expand Down
2 changes: 1 addition & 1 deletion src/mdx_plugin_recma_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ mod tests {
use crate::swc_utils::create_bool_expression;
use markdown::{to_mdast, ParseOptions};
use pretty_assertions::assert_eq;
use swc_core::alloc::collections::FxHashSet;
use rustc_hash::FxHashSet;
use swc_core::ecma::ast::{
EmptyStmt, ExportDefaultDecl, ExprStmt, JSXClosingFragment, JSXFragment,
JSXOpeningFragment, JSXText, Module, TsInterfaceBody, TsInterfaceDecl, WhileStmt,
Expand Down
3 changes: 2 additions & 1 deletion src/mdx_plugin_recma_jsx_rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::swc_utils::{
jsx_member_to_parts, position_to_string, span_to_position,
};
use markdown::{unist::Position, Location};
use swc_core::alloc::collections::FxHashSet;
use rustc_hash::FxHashSet;
use swc_core::common::SyntaxContext;
use swc_core::common::{util::take::Take, Span, DUMMY_SP};
use swc_core::ecma::ast::{
Expand Down Expand Up @@ -1017,6 +1017,7 @@ mod tests {
use crate::swc_utils::create_jsx_name_from_str;
use markdown::{to_mdast, Location, ParseOptions};
use pretty_assertions::assert_eq;
use rustc_hash::FxHashSet;
use swc_core::ecma::ast::{Invalid, JSXOpeningElement, Module};

fn compile(
Expand Down

0 comments on commit cd40f62

Please sign in to comment.