Conversation
🦋 Changeset detectedLatest commit: 6d69b77 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
cc @marco-ippolito Does the snapshot look good? It's json messages separated by |
|
is it possible to include the filename too? |
CodSpeed Performance ReportMerging #10144 will degrade performances by 5.19%Comparing Summary
Benchmarks breakdown
|
|
I'll merge/publish once @marco-ippolito approves this PR |
| \`---- | ||
| ", | ||
| } | ||
| "{"code":"InvalidSyntax","message":"await isn't allowed in non-async function","snippet":"Promise","filename":"test.ts","line":1,"column":23} |
There was a problem hiding this comment.
snippet still doesnt look right.
There was a problem hiding this comment.
It's a separate issue (a bug of parser)
marco-ippolito
left a comment
There was a problem hiding this comment.
Is it also tested in transform mode?
marco-ippolito
left a comment
There was a problem hiding this comment.
The structure looks good to me, I think just the snippet needs to be improved
|
I think this was a breaking change since the error is emitted as a string, which is unexpected and slightly unconvinient const inputCode = "module F { export type x = number }";
try {
transformSync(inputCode, {
mode: "transform",
});
} catch (error) {
console.log("TYPEOF OF ERROR", typeof error);
assert.strictEqual(error.code, "UnsupportedSyntax");
} |
|
It was intentional and I wrote about it on the PR description. |
My bad I missed it, I opened an issue to discuss #10150 |
Description:
swc_fast_ts_strip.try_with_json_handlertoswc_error_reporters.@swc/wasm-typescriptnow throws a string separated by\n.Related issue: