Covered ranges were not merged and thus it appeared that some lines
might be uncovered. To fix this I used "v8-coverage" that takes care
of merging the ranges properly. With this change, coverage collected
from a file by multiple entrypoints is now correctly calculated.
I ended up forking https://github.com/demurgos/v8-coverage and adding
"cli/tools/coverage/merge.rs" and "cli/tools/coverage/range_tree.rs".
This commit changes "deno coverage" command not to type check.
Instead of relying on infrastructure for module loading in "deno run";
the code now directly reaches into cache for original and transpiled
sources. In case sources are not available the error is returned to the
user, suggesting to first run "deno test --coverage" command.
In the `transform` function to `TextEncoderStream`'s internal
`TransformStream`, if `chunk` is the empty string and
`this.#pendingHighSurrogate` is null, then `lastCodeUnit` will be NaN.
As it turns out, this does not cause a bug because the comparison to
check for lone surrogates turns out to be false for NaN, but to rely on
it makes the code brittle.
This commit rewrites "InspectorSession" to no longer implement "Future"
trait but instead implement "Stream" trait. "Stream" trait is implemented
by yielding a raw pointer to the "v8::inspector::V8InspectorSession" and
received message. In effect received messages are no longer dispatched
from within the future, but are explicitly dispatched by the caller.
This change should allow us to dispatch a message to the session when
another message is being dispatched, ie.
"V8InspectorSesssion::dispatch_protocol_message" is already on the
call stack.
GHA keeps redacting all occurrences of the word "deno" out of logs
because this is our wpt.fyi username. This is rather annoying, so I am
just hardcoding the username in the CI script.
This commit changes flow in inspector code to no longer require
"Runtime.runIfWaitingForDebugger" message to complete a handshake.
Even though clients like Chrome DevTools always send this message on startup,
it is against the protocol to require this message to start an inspector
session.
Instead "Runtime.runIfWaitingForDebugger" is required only when running with
"--inspect-brk" flag, which matches behavior of Node.js.
`CrossIsolateStore`, `ExtensionBuilder` and `InMemoryChannelResource`
are private types which are referred to by other public APIs, and so
don't show up as links in the rustdoc. This is especially confusing for
`ExtensionBuilder`, since there is nothing in the docs that explains how
to build an extension.
Exposing these three types doesn't add any new capabilities:
`ExtensionBuilder` can be created from `Extension::builder()`,
`SharedArrayBufferStore` and `CompiledWasmModuleStore` already enable
doing anything that `CrossIsolateStore` can do by itself, and
`InMemoryChannelResource` isn't constructable.