@vitest-agent/reporter 6.1.1 → 6.1.3
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/defaultReporter.js +2 -2
- package/fileLinks.js +2 -2
- package/githubLog.js +7 -6
- package/humanReport.js +1 -1
- package/index.d.ts +5 -5
- package/index.js +1 -1
- package/liveView.js +2 -2
- package/package.json +10 -10
- package/tsdoc-metadata.json +1 -1
package/defaultReporter.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveFileLink } from "./fileLinks.js";
|
|
2
|
-
import { summarizeProject } from "./projectSummary.js";
|
|
3
2
|
import { renderGithubLog, strayOutputOf, toDisplayPath } from "./githubLog.js";
|
|
4
3
|
import { LiveViewEnv, startLiveView } from "./liveView.js";
|
|
5
|
-
import {
|
|
4
|
+
import { summarizeProject } from "./projectSummary.js";
|
|
5
|
+
import { Doc, Fmt, Render, Status } from "@effected/cli-kit";
|
|
6
6
|
import { RUN_REPORT_FILE_SCHEMA_URL, formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
7
7
|
import { classifyOutcome, classifyRunShape, dispatch, formatSuggestedActionLines, reduceRenderStateAll, synthesizeFromAgentReport } from "@vitest-agent/ui";
|
|
8
8
|
import { Effect } from "effect";
|
package/fileLinks.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CliLinks } from "@effected/cli";
|
|
1
|
+
import { CliLinks } from "@effected/cli-kit";
|
|
2
2
|
import { Effect, Option } from "effect";
|
|
3
3
|
import { Audience, TerminalEnv } from "@effected/env";
|
|
4
4
|
|
|
5
5
|
// src/fileLinks.ts
|
|
6
6
|
/**
|
|
7
7
|
* The file-link writer the reporter's human renders draw paths through
|
|
8
|
-
* (issue #541): `@effected/cli`'s `CliLinks.linker` over the services the
|
|
8
|
+
* (issue #541): `@effected/cli-kit`'s `CliLinks.linker` over the services the
|
|
9
9
|
* reporter's environment carries.
|
|
10
10
|
*
|
|
11
11
|
* The kit decides everything about a link. `CliLinks` picks where a file
|
package/githubLog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { summarizeProject } from "./projectSummary.js";
|
|
2
|
-
import { Doc, Fmt, Render, Status } from "@effected/cli";
|
|
2
|
+
import { Doc, Fmt, Render, Status } from "@effected/cli-kit";
|
|
3
3
|
import { formatStrayOutputNote } from "@vitest-agent/sdk";
|
|
4
|
-
import { relative } from "node:path";
|
|
4
|
+
import { relative, sep } from "node:path";
|
|
5
5
|
|
|
6
6
|
// src/githubLog.ts
|
|
7
7
|
/**
|
|
@@ -15,7 +15,7 @@ import { relative } from "node:path";
|
|
|
15
15
|
* fields already on `ReporterRenderInput` / `ReporterKit` — no new
|
|
16
16
|
* plumbing. No ANSI escapes: GitHub renders raw log text.
|
|
17
17
|
*
|
|
18
|
-
* Built as an `@effected/cli` `Doc` (a top-level collapsible is a
|
|
18
|
+
* Built as an `@effected/cli-kit` `Doc` (a top-level collapsible is a
|
|
19
19
|
* `::group::`) and rendered with `Render.githubLog`, which also neutralizes
|
|
20
20
|
* any workflow command a project name or path could otherwise inject.
|
|
21
21
|
*
|
|
@@ -36,12 +36,13 @@ const strayOutputOf = (reports) => reports.find((report) => report.strayOutput !
|
|
|
36
36
|
/**
|
|
37
37
|
* Renders a coverage-target file path relative to `process.cwd()` for
|
|
38
38
|
* display. Falls back to the original string unchanged when the relative
|
|
39
|
-
* path is empty or escapes the root (starts with `..`
|
|
40
|
-
* printing a `../../..` chain.
|
|
39
|
+
* path is empty or escapes the root (is `..` or starts with a `..`
|
|
40
|
+
* segment) rather than printing a `../../..` chain. An in-tree name that
|
|
41
|
+
* merely begins with two dots (`..foo.ts`) stays relative.
|
|
41
42
|
*/
|
|
42
43
|
function toDisplayPath(file) {
|
|
43
44
|
const rel = relative(process.cwd(), file);
|
|
44
|
-
if (rel === "" || rel.startsWith(
|
|
45
|
+
if (rel === "" || rel === ".." || rel.startsWith(`..${sep}`)) return file;
|
|
45
46
|
return rel;
|
|
46
47
|
}
|
|
47
48
|
const NON_STABLE_CLASSIFICATIONS = [
|
package/humanReport.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveFileLink } from "./fileLinks.js";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { TerminalEnv } from "@effected/env";
|
|
4
|
-
import { CliUi, UiProvider } from "@effected/cli/ui";
|
|
4
|
+
import { CliUi, UiProvider } from "@effected/cli-kit/ui";
|
|
5
5
|
import { FileLinkProvider, dispatchInk } from "@vitest-agent/ui/ink";
|
|
6
6
|
import { renderToString } from "ink";
|
|
7
7
|
import { createElement } from "react";
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PubSub, Schema } from "effect";
|
|
2
|
-
import "@effected/cli";
|
|
2
|
+
import "@effected/cli-kit";
|
|
3
3
|
import "@effected/env";
|
|
4
4
|
/**
|
|
5
5
|
* Per-file coverage data including uncovered line ranges.
|
|
@@ -323,7 +323,7 @@ interface DispatchInputs {
|
|
|
323
323
|
/**
|
|
324
324
|
* Where a file link points: a path, with an optional line and column.
|
|
325
325
|
*
|
|
326
|
-
* The file half of `@effected/cli`'s `LinkTarget`, spelled structurally so
|
|
326
|
+
* The file half of `@effected/cli-kit`'s `LinkTarget`, spelled structurally so
|
|
327
327
|
* this platform-free contract names no kit type. A relative path resolves
|
|
328
328
|
* against the working directory the kit's `CliLinks` layer was built with.
|
|
329
329
|
* @public
|
|
@@ -347,7 +347,7 @@ interface CellOptions {
|
|
|
347
347
|
* Writes a file path as a link for the audience and terminal the output
|
|
348
348
|
* is for: the label wrapped in an OSC 8 hyperlink when the reader can
|
|
349
349
|
* follow it, the label unchanged otherwise. The kit decides both halves
|
|
350
|
-
* (`@effected/cli`'s `CliLinks.linker`, `Render.context("stdout").link`):
|
|
350
|
+
* (`@effected/cli-kit`'s `CliLinks.linker`, `Render.context("stdout").link`):
|
|
351
351
|
* `vscode://file/<path>:<line>:<col>` under VS Code, `file://` otherwise,
|
|
352
352
|
* never for an agent audience, and nothing on a terminal that cannot
|
|
353
353
|
* render hyperlinks (a pipe, tmux, GNU screen, `NO_COLOR`).
|
|
@@ -1003,7 +1003,7 @@ type Transport = typeof Transport.Type;
|
|
|
1003
1003
|
* `detail` is pre-resolved by the plugin (via `DetailResolver`) but
|
|
1004
1004
|
* reporters that want to override can ignore it. `noColor` is the resolved
|
|
1005
1005
|
* value of the `NO_COLOR` env var; reporters use it to gate ANSI escapes
|
|
1006
|
-
* (hyperlinks are the kit's decision: `@effected/cli`'s `CliLinks`).
|
|
1006
|
+
* (hyperlinks are the kit's decision: `@effected/cli-kit`'s `CliLinks`).
|
|
1007
1007
|
* @public
|
|
1008
1008
|
*/
|
|
1009
1009
|
interface ResolvedReporterConfig {
|
|
@@ -1090,7 +1090,7 @@ interface ResolvedReporterConfig {
|
|
|
1090
1090
|
* not import equivalents yourself"; they are pre-resolved with full context
|
|
1091
1091
|
* (environment, executor, NO_COLOR) so the reporter doesn't have to
|
|
1092
1092
|
* re-derive that state. File hyperlinks are not among them: the reporter
|
|
1093
|
-
* reads `@effected/cli`'s `CliLinks` from its own environment.
|
|
1093
|
+
* reads `@effected/cli-kit`'s `CliLinks` from its own environment.
|
|
1094
1094
|
*
|
|
1095
1095
|
* The shape is open to additions: future fields (e.g. `stdLogger`,
|
|
1096
1096
|
* `stdRuntime`) won't break existing reporters because the parameter is a
|
package/index.js
CHANGED
|
@@ -8,6 +8,6 @@ import { DefaultVitestAgentReporter, buildDispatchInputs, renderAgentStringForRe
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
const CURRENT_REPORTER_VERSION = "6.1.
|
|
11
|
+
const CURRENT_REPORTER_VERSION = "6.1.3";
|
|
12
12
|
|
|
13
13
|
export { CURRENT_REPORTER_VERSION, DefaultVitestAgentReporter, buildDispatchInputs, renderAgentStringForReport, renderHumanStringForReport };
|
package/liveView.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { plainFileLink, resolveFileLink } from "./fileLinks.js";
|
|
2
|
-
import { CliEnv, Doc } from "@effected/cli";
|
|
2
|
+
import { CliEnv, Doc } from "@effected/cli-kit";
|
|
3
3
|
import { initialRenderState } from "@vitest-agent/sdk";
|
|
4
4
|
import { SPINNER_FRAME_MS, reduceRenderState, renderAgent } from "@vitest-agent/ui";
|
|
5
5
|
import { Cause, Effect, Exit, Layer } from "effect";
|
|
6
6
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
7
|
-
import { CliUi } from "@effected/cli/ui";
|
|
7
|
+
import { CliUi } from "@effected/cli-kit/ui";
|
|
8
8
|
|
|
9
9
|
// src/liveView.ts
|
|
10
10
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/reporter",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Named VitestAgentReporterFactory implementations for the vitest-agent ecosystem.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@effect/platform-node": "
|
|
43
|
-
"@vitest-agent/sdk": "9.0.
|
|
44
|
-
"@vitest-agent/ui": "5.2.
|
|
45
|
-
"effect": "
|
|
42
|
+
"@effect/platform-node": "~4.1.2",
|
|
43
|
+
"@vitest-agent/sdk": "9.0.3",
|
|
44
|
+
"@vitest-agent/ui": "5.2.3",
|
|
45
|
+
"effect": "~4.1.2",
|
|
46
46
|
"ink": "^8.0.0",
|
|
47
47
|
"react": "^19.3.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@effected/cli": "^0.
|
|
51
|
-
"@effected/config-file": "^0.
|
|
52
|
-
"@effected/env": "^0.
|
|
53
|
-
"@effected/glob": "^0.
|
|
54
|
-
"@effected/walker": "^0.
|
|
50
|
+
"@effected/cli-kit": "^0.26.0",
|
|
51
|
+
"@effected/config-file": "^0.24.0",
|
|
52
|
+
"@effected/env": "^0.10.0",
|
|
53
|
+
"@effected/glob": "^0.18.0",
|
|
54
|
+
"@effected/walker": "^0.25.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@effected/config-file": {
|