1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 13:59:01 -05:00
denoland-deno/cli
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
..
args fix(npm): reload an npm package's dependency's information when version not found (#18622) 2023-04-12 15:52:07 +02:00
bench chore(cli/bench): add ws echo bench (#18595) 2023-04-12 15:49:39 +02:00
cache fix(lsp): include all diagnosable documents on initialize (#17979) 2023-03-31 11:43:20 -06:00
js fix(test): don't swallow sanitizer errors with permissions (#18550) 2023-04-01 17:34:09 -04:00
lsp refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
napi 1.32.3 (#18558) 2023-04-01 18:51:46 -04:00
node refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
npm fix(npm): do not "npm install" when npm specifier happens to match package.json entry (#18660) 2023-04-12 15:52:08 +02:00
ops Reland "perf(core): preserve ops between snapshots (#18080)" (#18272) 2023-03-18 18:30:04 -04:00
schemas feat: embed import map in the config file (#17478) 2023-01-25 21:13:40 +01:00
tests fix(core): preserve syntax error locations in dynamic imports (#18664) 2023-04-12 15:52:08 +02:00
tools refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
tsc refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
util fix(npm): do not "npm install" when npm specifier happens to match package.json entry (#18660) 2023-04-12 15:52:08 +02:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs refactor: remove "ext/flash" (#18578) 2023-04-12 15:44:07 +02:00
Cargo.toml fix(npm): reload an npm package's dependency's information when version not found (#18622) 2023-04-12 15:52:07 +02:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs 1.32.2 (#18533) 2023-03-31 14:01:12 -06:00
emit.rs perf(core) Reduce script name and script code copies (#18298) 2023-03-21 22:33:12 +00:00
errors.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
file_fetcher.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
graph_util.rs fix(npm): do not "npm install" when npm specifier happens to match package.json entry (#18660) 2023-04-12 15:52:08 +02:00
http_util.rs refactor: remove usages of map_or / map_or_else (#18212) 2023-03-15 17:46:36 -04:00
js.rs refactor(core): Improve ergonomics of managing ASCII strings (#18498) 2023-04-12 15:49:39 +02:00
main.rs chore: upgrade clap to v4 (#17333) 2023-03-31 11:43:18 -06:00
module_loader.rs refactor(core): Improve ergonomics of managing ASCII strings (#18498) 2023-04-12 15:49:39 +02:00
proc_state.rs fix(npm): do not "npm install" when npm specifier happens to match package.json entry (#18660) 2023-04-12 15:52:08 +02:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs fix(npm): do not "npm install" when npm specifier happens to match package.json entry (#18660) 2023-04-12 15:52:08 +02:00
standalone.rs refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-31 11:43:18 -06:00
worker.rs refactor(npm): use deno_npm and deno_semver (#18602) 2023-04-12 15:52:03 +02:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.