250401.5 · 722f8ba63caba00d2764420db0d5362a528519e1
test: update test for lateset swc
reading declarations
@@ -16,7 +16,7 @@ export function isSwcError(error: unknown): error is SwcError { // Since swc throw an object, we need to wrap it in a proper error export function wrapAndReThrowSwcError(error: SwcError): never {- const errorHints = `${error.filename}:${error.startLine}${error.snippet}`;+ const errorHints = `${error.filename}:${error.startLine}\n${error.snippet}\n`; switch (error.code) { case "UnsupportedSyntax": { const unsupportedSyntaxError = new Error(error.message);
test/snapshots/transform.test.js.snapshot
@@ -2,7 +2,7 @@ exports[`should have proper error code 1`] = ` { "code": "UnsupportedSyntax", "message": "\`module\` keyword is not supported. Use \`namespace\` instead.",- "snippet": " \\n \\n module F { export type x = number }\\n ^^^^^^^^\\n \\n",+ "snippet": "module F { export type x = number }\\n^^^^^^^^\\n", "filename": "<anon>", "startLine": 1, "startColumn": 0,@@ -15,7 +15,7 @@ exports[`should have proper error code 2`] = ` { "code": "InvalidSyntax", "message": "'const' declarations must be initialized",- "snippet": " \\n \\n const foo;\\n ^^^\\n \\n",+ "snippet": "const foo;\\n ^^^\\n", "filename": "<anon>", "startLine": 1, "startColumn": 6,