deno
e6c548d0 - fix(ext/node): implement displayErrors for vm scripts (#33942)

Commit
68 days ago
fix(ext/node): implement displayErrors for vm scripts (#33942) ## Summary - Implements the `displayErrors` option for vm scripts in `ext/node/ops/vm.rs` - When `displayErrors` is true (the default), decorates the thrown error's `stack` property with source location info — `filename:line\nsource_line\narrow\n\n` — prepended to the existing stack, matching Node.js behaviour - Adds `validateObject(options, "options")` to `vm.compileFunction` so the test's invalid-options assertions throw with the expected `ERR_INVALID_ARG_TYPE` message - Enables `parallel/test-vm-basic.js` in `tests/node_compat/config.jsonc` Closes denoland/orchid#3 Diff is fully self-contained: 51 lines in `ext/node/ops/vm.rs` + 1 line in `ext/node/polyfills/vm.js` + 1 line in `tests/node_compat/config.jsonc`. No follow-up needed; everything the enabled test requires is in this PR. Co-authored-by: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading