diff --git a/Cargo.lock b/Cargo.lock index 98a71798ad50fd..2a6e81ab408f55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2403,8 +2403,7 @@ dependencies = [ [[package]] name = "deno_graph" version = "0.107.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06518571e56fef9ae4441b93445754f0b3c608404607b8143541ab672e589bf6" +source = "git+https://github.com/bartlomieju/deno_graph.git?branch=fix%2Fimprove-parse-error-display#dd86fcdcbeb31c46f71b501221434402c356dde1" dependencies = [ "async-trait", "boxed_error", diff --git a/Cargo.toml b/Cargo.toml index 394fc1d03f6bc8..3c79082d58b08c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -601,3 +601,6 @@ opt-level = 3 opt-level = 3 [profile.release.package.twox-hash] opt-level = 3 + +[patch.crates-io] +deno_graph = { git = "https://github.com/bartlomieju/deno_graph.git", branch = "fix/improve-parse-error-display" } diff --git a/tests/specs/run/error_syntax/error_syntax.js.out b/tests/specs/run/error_syntax/error_syntax.js.out index fa4d51686ccc05..cde17347849046 100644 --- a/tests/specs/run/error_syntax/error_syntax.js.out +++ b/tests/specs/run/error_syntax/error_syntax.js.out @@ -1,4 +1,5 @@ -error: The module's source code could not be parsed: Expected ',', got 'following' at [WILDCARD]/error_syntax.js:3:6 - - (the following is a syntax error ^^ ! ) - ~~~~~~~~~ +error: Expected ',', got 'following' + | +3 | (the following is a syntax error ^^ ! ) + | ~~~~~~~~~ + at [WILDCARD]/error_syntax.js:3:6 diff --git a/tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs.out b/tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs.out index fd0a8cff0e2478..fc395fc6daec70 100644 --- a/tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs.out +++ b/tests/specs/run/error_syntax_empty_trailing_line/error_syntax_empty_trailing_line.mjs.out @@ -1,4 +1,5 @@ -error: The module's source code could not be parsed: Expression expected at [WILDCARD]/error_syntax_empty_trailing_line.mjs:2:22 - - setTimeout(() => {}), - ~ +error: Expression expected + | +2 | setTimeout(() => {}), + | ~ + at [WILDCARD]/error_syntax_empty_trailing_line.mjs:2:22 diff --git a/tests/specs/run/swc_syntax_error/swc_syntax_error.ts.out b/tests/specs/run/swc_syntax_error/swc_syntax_error.ts.out index 81b0c1949f7e47..584f0131599cf9 100644 --- a/tests/specs/run/swc_syntax_error/swc_syntax_error.ts.out +++ b/tests/specs/run/swc_syntax_error/swc_syntax_error.ts.out @@ -1,4 +1,5 @@ -error: The module's source code could not be parsed: Unexpected token `}`. Expected an identifier, void, yield, null, await, break, a string literal, a numeric literal, true, false, `, -, import, this, typeof, {, [, ( at [WILDCARD]syntax_error.ts:4:1 - - } - ~ +error: Unexpected token `}`. Expected an identifier, void, yield, null, await, break, a string literal, a numeric literal, true, false, `, -, import, this, typeof, {, [, ( + | +4 | } + | ~ + at [WILDCARD]syntax_error.ts:4:1