Skip to content

Commit b70508d

Browse files
committed
fix: upgrade swc
Closes #268 Closes #276
1 parent 621bafa commit b70508d

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ dprint-core = { version = "0.46.3", features = ["formatting"] }
2929
fnv = "1.0.7"
3030
serde = { version = "1.0.118", features = ["derive"] }
3131
serde_json = { version = "1.0", optional = true }
32-
swc_ast_view = { version = "0.35.0", package = "dprint-swc-ecma-ast-view" }
33-
swc_common = "0.12.0"
34-
swc_ecmascript = { version = "0.63.0", features = ["parser"] }
32+
swc_ast_view = { version = "0.36.0", package = "dprint-swc-ecma-ast-view" }
33+
swc_common = "0.12.2"
34+
swc_ecmascript = { version = "0.64.0", features = ["parser"] }
3535

3636
[dev-dependencies]
3737
debug-here = "0.2"

tests/specs/issues/issue0268.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
== should parse ==
2+
const x = {
3+
prop: isCorrect
4+
? fn => ({})
5+
: fn => true,
6+
};
7+
8+
[expect]
9+
const x = {
10+
prop: isCorrect
11+
? fn => ({})
12+
: fn => true,
13+
};
14+
15+
== should parse ==
16+
const wrappedApi: API<P> | undefined = api != null ? {
17+
process: async (params: Params): Promise<Response<P>> => {
18+
let response: Response<P>;
19+
return response;
20+
},
21+
} : undefined;
22+
23+
[expect]
24+
const wrappedApi: API<P> | undefined = api != null
25+
? {
26+
process: async (params: Params): Promise<Response<P>> => {
27+
let response: Response<P>;
28+
return response;
29+
},
30+
}
31+
: undefined;

tests/specs/issues/issue0276.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- test.jsx --
2+
== should not repeat jsx text that looks like comment ==
3+
export function install() {
4+
return (
5+
<Switch>
6+
// ...
7+
</Switch>
8+
);
9+
}
10+
11+
[expect]
12+
export function install() {
13+
return (
14+
<Switch>
15+
// ...
16+
</Switch>
17+
);
18+
}

0 commit comments

Comments
 (0)