Skip to content

Commit

Permalink
feat: upgrade swc 0.68 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Sep 29, 2021
1 parent 26d5790 commit 01c67b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ utils = ["swc_ecmascript/utils"]

[dependencies]
data-url = { version = "0.1.0", optional = true }
dprint-swc-ecma-ast-view = { version = "0.35.0", optional = true }
dprint-swc-ecma-ast-view = { version = "0.37.1", optional = true }
serde = { version = "1.0.130", features = ["derive"] }
swc_atoms = "0.2.7"
swc_bundler = { version = "0.58.0", optional = true }
swc_common = "0.12.0"
swc_ecmascript = { version = "0.63.1", features = ["parser"] }
swc_bundler = { version = "0.63.0", optional = true }
swc_common = "0.13.1"
swc_ecmascript = { version = "0.68.0", features = ["parser"] }
text_lines = { version = "0.3.0", features = ["serialization"] }
url = { version = "2.2.2", features = ["serde"], optional = true }

Expand Down
9 changes: 3 additions & 6 deletions src/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ pub fn get_es_config(jsx: bool) -> EsConfig {
fn_bind: false,
import_assertions: true,
static_blocks: true,
private_in_object: false,
}
}

Expand Down Expand Up @@ -381,7 +382,6 @@ mod test {
.expect("should parse");

parsed_source.with_view(|view| {
use crate::swc::utils::ident::IdentLike;
use crate::view::*;

let func_decl = view.children()[0]
Expand All @@ -399,12 +399,9 @@ mod test {
let call_expr_id = call_expr.callee.expect::<Ident>();

// these should be the same identifier
assert_eq!(func_decl.ident.inner.to_id(), call_expr_id.inner.to_id());
assert_eq!(func_decl.ident.to_id(), call_expr_id.to_id());
// but these shouldn't be
assert_ne!(
func_decl.ident.inner.to_id(),
func_decl_inner_expr.inner.to_id()
);
assert_ne!(func_decl.ident.to_id(), func_decl_inner_expr.to_id());
});
}
}

0 comments on commit 01c67b0

Please sign in to comment.