chore: close quality-gate coverage gaps (#1689) (#1766)
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Closes #1689. Typecheck cli/tui src, add a core/ format+lint gate, and gate core/json + core/client coverage. See PR #1766 for the full review history.
This commit is contained in:
parent
d76c4d5379
commit
373f346e5f
1 changed files with 2210 additions and 467 deletions
|
|
@ -1827,9 +1827,12 @@ export class InspectorClient extends InspectorClientEventTarget {
|
|||
// a future modern-family revision would negotiate a different string, and
|
||||
// the two must not disagree. The raw channel only runs on a connected modern
|
||||
// session, so this is always set; the constant is a defensive fallback.
|
||||
/* v8 ignore next -- fallback only if getProtocolVersion() is unset, which
|
||||
can't happen on the connected modern session this runs on. */
|
||||
const protocolVersion = this.getProtocolVersion() ?? MODERN_PROTOCOL_VERSION;
|
||||
/* v8 ignore start -- fallback only if getProtocolVersion() is unset, which
|
||||
can't happen on the connected modern session this runs on. Bracketed so
|
||||
the ignore is reflow-proof however prettier splits the statement. */
|
||||
const protocolVersion =
|
||||
this.getProtocolVersion() ?? MODERN_PROTOCOL_VERSION;
|
||||
/* v8 ignore stop */
|
||||
return {
|
||||
...params,
|
||||
_meta: {
|
||||
|
|
@ -1861,9 +1864,7 @@ export class InspectorClient extends InspectorClientEventTarget {
|
|||
...message,
|
||||
result: {
|
||||
resultType: "complete",
|
||||
content: [
|
||||
{ type: "text", text: `Modern task ${task.taskId} created` },
|
||||
],
|
||||
content: [{ type: "text", text: `Modern task ${task.taskId} created` }],
|
||||
_meta: { [MODERN_TASK_HANDLE_META]: task },
|
||||
},
|
||||
};
|
||||
|
|
@ -1906,7 +1907,9 @@ export class InspectorClient extends InspectorClientEventTarget {
|
|||
const raw = await new Promise<unknown>((resolve, reject) => {
|
||||
const timer = setTimeout(() => {
|
||||
this.pendingRawWireRequests.delete(id);
|
||||
reject(new Error(`Raw request "${method}" timed out after ${timeoutMs} ms`));
|
||||
reject(
|
||||
new Error(`Raw request "${method}" timed out after ${timeoutMs} ms`),
|
||||
);
|
||||
}, timeoutMs);
|
||||
this.pendingRawWireRequests.set(id, { resolve, reject, timer });
|
||||
transport.send(message).catch((err: unknown) => {
|
||||
|
|
@ -4443,7 +4446,10 @@ export class InspectorClient extends InspectorClientEventTarget {
|
|||
this.modernReconnectTimer = undefined;
|
||||
// Disconnect/unsubscribe may have raced the timer — bail if the reconnect
|
||||
// is no longer wanted.
|
||||
if (isTerminalStatus(this.status) || this.subscribedResources.size === 0) {
|
||||
if (
|
||||
isTerminalStatus(this.status) ||
|
||||
this.subscribedResources.size === 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this.refreshModernSubscription(true).catch(() =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue