Skip to content

Commit 80bd88e

Browse files
authored
feat: upgrade deno_ast to 0.22.0 (#463)
1 parent c841ac1 commit 80bd88e

File tree

4 files changed

+17
-44
lines changed

4 files changed

+17
-44
lines changed

Cargo.lock

Lines changed: 13 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tracing = ["dprint-core/tracing"]
2626

2727
[dependencies]
2828
anyhow = "1.0.64"
29-
deno_ast = { version = "0.21.0", features = ["view"] }
29+
deno_ast = { version = "0.22.0", features = ["view"] }
3030
dprint-core = { version = "0.60.0", features = ["formatting"] }
3131
rustc-hash = "1.1.0"
3232
serde = { version = "1.0.144", features = ["derive"] }

src/generation/generate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn gen_node_with_inner_gen<'a>(node: Node<'a>, context: &mut Context<'a>, inner_
202202
Node::Tpl(node) => gen_tpl(node, context),
203203
Node::TplElement(node) => gen_tpl_element(node, context),
204204
Node::TsAsExpr(node) => gen_as_expr(node, context),
205-
Node::TsSatisfactionExpr(node) => gen_satisfaction_expr(node, context),
205+
Node::TsSatisfiesExpr(node) => gen_satisfies_expr(node, context),
206206
Node::TsConstAssertion(node) => gen_const_assertion(node, context),
207207
Node::TsExprWithTypeArgs(node) => gen_expr_with_type_args(node, context),
208208
Node::TsNonNullExpr(node) => gen_non_null_expr(node, context),
@@ -1761,7 +1761,7 @@ fn gen_as_expr_like<'a>(node: AsExprLike<'a>, context: &mut Context<'a>) -> Prin
17611761
items
17621762
}
17631763

1764-
fn gen_satisfaction_expr<'a>(node: &'a TsSatisfactionExpr<'a>, context: &mut Context<'a>) -> PrintItems {
1764+
fn gen_satisfies_expr<'a>(node: &'a TsSatisfiesExpr<'a>, context: &mut Context<'a>) -> PrintItems {
17651765
let mut items = gen_node(node.expr.into(), context);
17661766
items.push_str(" satisfies");
17671767
items.push_signal(Signal::SpaceIfNotTrailing);

src/swc.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,7 @@ mod tests {
148148
r#"console.log("x", `duration ${d} not in range - ${min} ≥ ${d} && ${max} ≥ ${d}`),;"#,
149149
),
150150
concat!(
151-
// quite the diagnostic!
152-
"Line 2, column 81: Unexpected token `;`. Expected this, import, async, function, [ for array literal, ",
153-
"{ for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, ",
154-
"regexp, ` for template literal, (, or an identifier\n",
151+
"Line 2, column 81: Expression expected\n",
155152
"\n",
156153
" && ${max} ≥ ${d}`),;\n",
157154
" ~"

0 commit comments

Comments
 (0)