New version of deno fmt can't parse code taht contains top level await.
Case1: eliminated

Case2: failed to parse
async function f() {
}
await f();
$ deno fmt *
Error formatting: tla.ts
Line 4, column 7: Expected ';', '}' or <eof>
Formatted 0 files in 884.48µs
cc @dsherret
Thanks! I opened an issue in swc and it should be easy to get this supported.
Any way we can transfer these issues to https://github.com/dsherret/dprint/issues?
Thanks! I opened an issue in swc and it should be easy to get this supported.
Anyway we can transfer these issues to https://github.com/dsherret/dprint/issues?
Looks like one can only transfer issues between repos you're collaborator in
@bartlomieju ok, not a big deal.
This is fixed in dprint 0.4.3 along with various other improvements and fixes (edit: Use 0.5.0 as it has even more improvements).
Next improvement will be getting the remainder of TS 3.8 features in: https://github.com/dsherret/dprint/milestone/1
I'd submit a quick PR with the fix, but I'm currently setting everything up so maybe later if no one else gets around to it in the meantime.
Most helpful comment
This is fixed in dprint
0.4.3along with various other improvements and fixes (edit: Use 0.5.0 as it has even more improvements).Next improvement will be getting the remainder of TS 3.8 features in: https://github.com/dsherret/dprint/milestone/1
I'd submit a quick PR with the fix, but I'm currently setting everything up so maybe later if no one else gets around to it in the meantime.