@vitest-agent/ui 6.0.7 → 6.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/counts.js +1 -1
- package/dispatcher/cells/single-file-pass.js +1 -1
- package/dispatcher/cells/single-file-threshold.js +1 -1
- package/dispatcher/cells/single-project-pass.js +1 -1
- package/dispatcher/dispatch.js +1 -1
- package/dispatcher/helpers.js +1 -1
- package/index.d.ts +12 -0
- package/index.js +2 -2
- package/ink/CountColumns.js +1 -1
- package/ink/CoverageBlock.js +1 -1
- package/ink/FailureSection.js +2 -2
- package/ink/FailuresSection.js +2 -2
- package/ink/FileLink.js +1 -1
- package/ink/ModuleHeader.js +1 -1
- package/ink/ProjectRow.js +3 -3
- package/ink/StatusIcon.js +1 -1
- package/ink/StreamApp.js +4 -4
- package/ink/TagColumns.js +1 -1
- package/ink/TestRow.js +1 -1
- package/ink/TrendLine.js +1 -1
- package/ink/dispatch-ink.js +2 -2
- package/ink/ink-helpers.js +1 -1
- package/package.json +3 -3
- package/render-agent.js +2 -2
- package/synthesize.js +4 -3
package/counts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Fmt } from "@effected/cli-kit";
|
|
1
2
|
import { buildFooter } from "../footer.js";
|
|
2
3
|
import { formatDisplayDuration } from "../../format-duration.js";
|
|
3
4
|
import { soleModulePath } from "../helpers.js";
|
|
4
|
-
import { Fmt } from "@effected/cli-kit";
|
|
5
5
|
|
|
6
6
|
// src/dispatcher/cells/single-file-pass.ts
|
|
7
7
|
const renderAgent = (inputs) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Fmt } from "@effected/cli-kit";
|
|
1
2
|
import { buildFooter } from "../footer.js";
|
|
2
3
|
import { formatDisplayDuration } from "../../format-duration.js";
|
|
3
4
|
import { formatCoverageSummaryLines, soleModulePath } from "../helpers.js";
|
|
4
|
-
import { Fmt } from "@effected/cli-kit";
|
|
5
5
|
|
|
6
6
|
// src/dispatcher/cells/single-file-threshold.ts
|
|
7
7
|
const renderAgent = (inputs) => {
|
package/dispatcher/dispatch.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatConsoleLeaksNote, formatScopedCoverageNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
1
2
|
import { renderSingleFileFail } from "./cells/single-file-fail.js";
|
|
2
3
|
import { renderSingleFilePass } from "./cells/single-file-pass.js";
|
|
3
4
|
import { renderSingleFileThreshold } from "./cells/single-file-threshold.js";
|
|
@@ -11,7 +12,6 @@ import { renderWorkspaceFail } from "./cells/workspace-fail.js";
|
|
|
11
12
|
import { renderWorkspacePass } from "./cells/workspace-pass.js";
|
|
12
13
|
import { renderWorkspaceThreshold } from "./cells/workspace-threshold.js";
|
|
13
14
|
import { formatSuggestedActionLines } from "./helpers.js";
|
|
14
|
-
import { formatConsoleLeaksNote, formatScopedCoverageNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
15
15
|
|
|
16
16
|
// src/dispatcher/dispatch.ts
|
|
17
17
|
/**
|
package/dispatcher/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Doc, Fmt, Render } from "@effected/cli-kit";
|
|
1
2
|
import { formatTotalsLine } from "../counts.js";
|
|
2
3
|
import { formatDisplayDuration } from "../format-duration.js";
|
|
3
4
|
import { statusGlyph } from "../theme.js";
|
|
4
|
-
import { Doc, Fmt, Render } from "@effected/cli-kit";
|
|
5
5
|
|
|
6
6
|
// src/dispatcher/helpers.ts
|
|
7
7
|
/**
|
package/index.d.ts
CHANGED
|
@@ -1132,6 +1132,14 @@ interface VitestTestDiagnostic {
|
|
|
1132
1132
|
duration: number;
|
|
1133
1133
|
flaky: boolean;
|
|
1134
1134
|
slow: boolean;
|
|
1135
|
+
/**
|
|
1136
|
+
* Retries used by the test (Vitest 5.1+). A retry is counted only after a
|
|
1137
|
+
* failed attempt, but the count accumulates across repeats, so it can be
|
|
1138
|
+
* non-zero when the final repeat passed.
|
|
1139
|
+
*/
|
|
1140
|
+
retryCount?: number;
|
|
1141
|
+
/** Repeats run by the test (Vitest 5.1+). */
|
|
1142
|
+
repeatCount?: number;
|
|
1135
1143
|
}
|
|
1136
1144
|
/**
|
|
1137
1145
|
* Duck-typed Vitest TestCase from the Reporter v2 API.
|
|
@@ -1151,6 +1159,10 @@ interface VitestTestCase {
|
|
|
1151
1159
|
/** Parent suite or module. Optional in the duck-type so unit-test fixtures don't have to fabricate a stub; always present in real Vitest TestCase instances. */
|
|
1152
1160
|
parent?: VitestTestSuite | VitestTestModule;
|
|
1153
1161
|
result(): VitestTestResult | undefined;
|
|
1162
|
+
/** Per-attempt results, one per retry and repeat (Vitest 5.1+). */
|
|
1163
|
+
attempts?(): ReadonlyArray<{
|
|
1164
|
+
errors?: ReadonlyArray<VitestTestError> | undefined;
|
|
1165
|
+
}>;
|
|
1154
1166
|
diagnostic(): VitestTestDiagnostic | undefined;
|
|
1155
1167
|
}
|
|
1156
1168
|
/**
|
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SuggestedActionRecord, TestRecord, initialRenderState } from "@vitest-agent/sdk";
|
|
1
2
|
import { classifyOutcome, classifyRunShape } from "./dispatcher/classify.js";
|
|
2
3
|
import { dispatch, dispatcherTable } from "./dispatcher/dispatch.js";
|
|
3
4
|
import { buildFooter, dominantClassification } from "./dispatcher/footer.js";
|
|
@@ -8,7 +9,6 @@ import { renderAgent } from "./render-agent.js";
|
|
|
8
9
|
import { SPINNER_FRAMES, SPINNER_FRAME_MS, spinnerFrame } from "./spinner.js";
|
|
9
10
|
import { SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, synthesizeFromAgentReport, synthesizeRunEvents } from "./synthesize.js";
|
|
10
11
|
import { VitestAgentStatus, VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "./theme.js";
|
|
11
|
-
import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SuggestedActionRecord, TestRecord, initialRenderState } from "@vitest-agent/sdk";
|
|
12
12
|
|
|
13
13
|
// src/index.ts
|
|
14
14
|
/**
|
|
@@ -18,6 +18,6 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
|
|
|
18
18
|
*
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
const CURRENT_UI_VERSION = "6.0.
|
|
21
|
+
const CURRENT_UI_VERSION = "6.0.8";
|
|
22
22
|
|
|
23
23
|
export { ActionSeverity, CURRENT_UI_VERSION, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, SuggestedActionRecord, TestRecord, VitestAgentStatus, VitestAgentTokens, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatcherTable, dominantClassification, formatDisplayDuration, formatSuggestedActionLines, initialRenderState, inkStyle, reduceRenderState, reduceRenderStateAll, renderAgent, spinnerFrame, statusGlyph, statusInkStyle, synthesizeFromAgentReport, synthesizeRunEvents };
|
package/ink/CountColumns.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
|
|
2
1
|
import { Fmt } from "@effected/cli-kit";
|
|
3
2
|
import { Styled, useGlyphs } from "@effected/cli-kit/ui";
|
|
4
3
|
import { Text } from "ink";
|
|
4
|
+
import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
|
|
5
5
|
import { jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/CountColumns.tsx
|
package/ink/CoverageBlock.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useFileLink } from "./FileLink.js";
|
|
2
1
|
import { Fmt } from "@effected/cli-kit";
|
|
3
2
|
import { useStyle } from "@effected/cli-kit/ui";
|
|
4
3
|
import { Box, Text } from "ink";
|
|
4
|
+
import { useFileLink } from "./FileLink.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/CoverageBlock.tsx
|
package/ink/FailureSection.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { statusGlyph, statusToken } from "../theme.js";
|
|
2
|
-
import { useFileLink } from "./FileLink.js";
|
|
3
1
|
import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
|
|
4
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { statusGlyph, statusToken } from "../theme.js";
|
|
4
|
+
import { useFileLink } from "./FileLink.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/FailureSection.tsx
|
package/ink/FailuresSection.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
|
|
2
|
-
import { useFileLink } from "./FileLink.js";
|
|
3
1
|
import { Styled, useGlyphs } from "@effected/cli-kit/ui";
|
|
4
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
|
|
4
|
+
import { useFileLink } from "./FileLink.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/FailuresSection.tsx
|
package/ink/FileLink.js
CHANGED
package/ink/ModuleHeader.js
CHANGED
package/ink/ProjectRow.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { Fmt } from "@effected/cli-kit";
|
|
2
|
+
import { Styled } from "@effected/cli-kit/ui";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
1
4
|
import { formatDisplayDuration } from "../format-duration.js";
|
|
2
5
|
import { statusToken } from "../theme.js";
|
|
3
6
|
import { CountColumns, DURATION_CELL_WIDTH } from "./CountColumns.js";
|
|
4
7
|
import { StatusIcon } from "./StatusIcon.js";
|
|
5
8
|
import { TagColumns } from "./TagColumns.js";
|
|
6
|
-
import { Fmt } from "@effected/cli-kit";
|
|
7
|
-
import { Styled } from "@effected/cli-kit/ui";
|
|
8
|
-
import { Box, Text } from "ink";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
// src/ink/ProjectRow.tsx
|
package/ink/StatusIcon.js
CHANGED
package/ink/StreamApp.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { Fmt } from "@effected/cli-kit";
|
|
2
|
+
import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
|
|
3
|
+
import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
4
|
+
import { Box, Text } from "ink";
|
|
1
5
|
import { classifyRunShape } from "../dispatcher/classify.js";
|
|
2
6
|
import { formatDisplayDuration } from "../format-duration.js";
|
|
3
7
|
import { spinnerFrame } from "../spinner.js";
|
|
@@ -9,10 +13,6 @@ import { StatusIcon } from "./StatusIcon.js";
|
|
|
9
13
|
import { TagColumns, tagUnion } from "./TagColumns.js";
|
|
10
14
|
import { TestRow } from "./TestRow.js";
|
|
11
15
|
import { TrendLine } from "./TrendLine.js";
|
|
12
|
-
import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
13
|
-
import { Fmt } from "@effected/cli-kit";
|
|
14
|
-
import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
|
|
15
|
-
import { Box, Text } from "ink";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
|
|
18
18
|
// src/ink/StreamApp.tsx
|
package/ink/TagColumns.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VitestAgentTokens } from "../theme.js";
|
|
2
1
|
import { Fmt } from "@effected/cli-kit";
|
|
3
2
|
import { Styled } from "@effected/cli-kit/ui";
|
|
4
3
|
import { Text } from "ink";
|
|
4
|
+
import { VitestAgentTokens } from "../theme.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/TagColumns.tsx
|
package/ink/TestRow.js
CHANGED
package/ink/TrendLine.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VitestAgentTokens } from "../theme.js";
|
|
2
1
|
import { Fmt } from "@effected/cli-kit";
|
|
3
2
|
import { Styled } from "@effected/cli-kit/ui";
|
|
4
3
|
import { Text } from "ink";
|
|
4
|
+
import { VitestAgentTokens } from "../theme.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/ink/TrendLine.tsx
|
package/ink/dispatch-ink.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { consoleLeaksNoteFor, dispatcherTable, scopedCoverageNoteFor, strayOutputNoteFor, suggestedActionsNoteFor } from "../dispatcher/dispatch.js";
|
|
2
|
-
import { renderAgentStringAsInk } from "./ink-helpers.js";
|
|
3
1
|
import { Box, Text } from "ink";
|
|
4
2
|
import { createElement } from "react";
|
|
3
|
+
import { consoleLeaksNoteFor, dispatcherTable, scopedCoverageNoteFor, strayOutputNoteFor, suggestedActionsNoteFor } from "../dispatcher/dispatch.js";
|
|
4
|
+
import { renderAgentStringAsInk } from "./ink-helpers.js";
|
|
5
5
|
|
|
6
6
|
// src/ink/dispatch-ink.ts
|
|
7
7
|
/** The Ink half of a cell whose live view is its agent string, painted. */
|
package/ink/ink-helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { statusGlyph, statusToken } from "../theme.js";
|
|
2
1
|
import { Styled } from "@effected/cli-kit/ui";
|
|
3
2
|
import { Box, Text } from "ink";
|
|
3
|
+
import { statusGlyph, statusToken } from "../theme.js";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
// src/ink/ink-helpers.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared event-sourced renderer for vitest-agent. React Ink view for humans, plain-string view for agents, both fed by the same reducer over a RunEvent stream.",
|
|
6
6
|
"keywords": [
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"./package.json": "./package.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@vitest-agent/sdk": "9.0
|
|
48
|
-
"effect": "4.1.
|
|
47
|
+
"@vitest-agent/sdk": "9.1.0",
|
|
48
|
+
"effect": "4.1.5"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@effected/cli-kit": "^0.30.0",
|
package/render-agent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Fmt } from "@effected/cli-kit";
|
|
2
|
+
import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
1
3
|
import { formatTotalsLine } from "./counts.js";
|
|
2
4
|
import { formatFailure as formatFailure$1, formatGlobShortfallLines, formatSuggestedActionLines } from "./dispatcher/helpers.js";
|
|
3
|
-
import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
4
|
-
import { Fmt } from "@effected/cli-kit";
|
|
5
5
|
|
|
6
6
|
// src/render-agent.ts
|
|
7
7
|
/**
|
package/synthesize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isTimeoutError } from "@vitest-agent/sdk";
|
|
1
|
+
import { finalAttemptErrors, isTimeoutError } from "@vitest-agent/sdk";
|
|
2
2
|
|
|
3
3
|
// src/synthesize.ts
|
|
4
4
|
/**
|
|
@@ -112,8 +112,9 @@ const synthesizeRunEvents = (modules, options = {}) => {
|
|
|
112
112
|
testName: test.name,
|
|
113
113
|
suitePath
|
|
114
114
|
});
|
|
115
|
-
const
|
|
116
|
-
const
|
|
115
|
+
const finalErrors = finalAttemptErrors(test);
|
|
116
|
+
const error = mapTestError(finalErrors);
|
|
117
|
+
const firstErrorMsg = finalErrors?.[0]?.message;
|
|
117
118
|
const timedOut = status === "failed" && firstErrorMsg !== void 0 && isTimeoutError({ message: firstErrorMsg });
|
|
118
119
|
if (timedOut) moduleTimeout++;
|
|
119
120
|
events.push({
|