1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-07 06:46:59 -05:00
denoland-deno/cli/tests/integration
Nayeem Rahman b183737fc9 fix(core): preserve syntax error locations in dynamic imports (#18664)
Fixes #6259.

Adds the location for v8 syntax errors to the message (`message += " at
{location}"`) when rethrowing them for dynamic imports.

Discussing with @bartlomieju on discord I proposed just preserving v8's
error and not reconstructing it, allowing the standard stack trace to
just point to the syntax error instead of the dynamic import. But on
further thought this way has parity with SWC's syntax errors + has the
advantage of showing both the syntax error and dynamic import location.

```ts
// temp.js
await import("./temp2.js");

// temp2.js
function foo() {
  await Promise.resolve();
}

// Before:
// error: Uncaught (in promise) SyntaxError: Unexpected reserved word
// await import("./temp2.js");
// ^
//     at async file:///.../temp.js:1:1

// After:
// error: Uncaught (in promise) SyntaxError: Unexpected reserved word at file:///.../temp2.js:2:3
// await import("./temp2.js");
// ^
//     at async file:///.../temp.js:1:1
```
2023-04-12 15:52:08 +02:00
..
bench_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
bundle_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
cache_tests.rs fix(ext/cache): cache.put overwrites previous call (#18649) 2023-04-12 15:52:08 +02:00
cert_tests.rs fix(lsp): avoid calling client while holding lock (#18197) 2023-03-15 14:34:23 +00:00
check_tests.rs fix(check): ensure diagnostics caused by changes in other files get invalidated between runs (#18541) 2023-04-01 17:34:08 -04:00
compile_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
coverage_tests.rs fix(coverage): ignore files from npm registry (#18457) 2023-03-31 11:43:20 -06:00
doc_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
eval_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
flags_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
fmt_tests.rs chore(cli/tests): use test builder in more integration tests (#18031) 2023-03-13 09:40:46 -04:00
info_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
init_tests.rs chore(cli/tests): use test builder in more integration tests (#18031) 2023-03-13 09:40:46 -04:00
inspector_tests.rs feat(core): initialize SQLite off-main-thread (#18401) 2023-03-31 11:43:19 -06:00
install_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
js_unit_tests.rs refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally (#18568) 2023-04-12 15:44:04 +02:00
lint_tests.rs chore: test builders for integration tests (#17965) 2023-02-27 16:52:49 -04:00
lsp_tests.rs Revert "fix(cli): don't store blob and data urls in the module cache (#18261)" (#18572) 2023-04-12 15:44:00 +02:00
mod.rs refactor: move shared library tests to their own file (#18479) 2023-03-31 11:43:19 -06:00
node_compat_tests.rs tests: cleanup "node_compat_tests" (#18594) 2023-04-12 15:49:39 +02:00
node_unit_tests.rs test(ext/node): add tls_test (#17871) 2023-02-23 12:27:29 +09:00
npm_tests.rs fix(npm): reload an npm package's dependency's information when version not found (#18622) 2023-04-12 15:52:07 +02:00
repl_tests.rs fix(repl): disable language server document preloading in the repl (#18543) 2023-04-01 17:34:08 -04:00
run_tests.rs fix(core): preserve syntax error locations in dynamic imports (#18664) 2023-04-12 15:52:08 +02:00
shared_library_tests.rs refactor: move shared library tests to their own file (#18479) 2023-03-31 11:43:19 -06:00
task_tests.rs fix(lsp): include all diagnosable documents on initialize (#17979) 2023-03-31 11:43:20 -06:00
test_tests.rs fix(lsp): include all diagnosable documents on initialize (#17979) 2023-03-31 11:43:20 -06:00
upgrade_tests.rs chore: use rustfmt imports_granularity option (#17421) 2023-01-14 23:18:58 -05:00
vendor_tests.rs refactor: make resolver required (#17783) 2023-02-15 11:30:54 -05:00
watcher_tests.rs Revert "fix(cli): don't store blob and data urls in the module cache (#18261)" (#18572) 2023-04-12 15:44:00 +02:00
worker_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00