@vitest-agent/plugin 5.2.0 → 5.2.1
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/package.json +6 -6
- package/reporter.js +7 -5
- package/utils/resolve-no-color.js +13 -0
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/plugin",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vitest plugin for the vitest-agent ecosystem: owns persistence, classification, baselines, trends, and dispatches rendering to a configurable reporter.",
|
|
6
6
|
"keywords": [
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"@effected/glob": "^0.10.0",
|
|
50
50
|
"@effected/walker": "^0.15.0",
|
|
51
51
|
"@effected/workspaces": "^0.31.0",
|
|
52
|
-
"@vitest-agent/cli": "4.0.
|
|
53
|
-
"@vitest-agent/engine": "0.
|
|
54
|
-
"@vitest-agent/mcp": "5.1.
|
|
55
|
-
"@vitest-agent/reporter": "4.0.
|
|
56
|
-
"@vitest-agent/sdk": "
|
|
52
|
+
"@vitest-agent/cli": "4.0.1",
|
|
53
|
+
"@vitest-agent/engine": "0.5.0",
|
|
54
|
+
"@vitest-agent/mcp": "5.1.7",
|
|
55
|
+
"@vitest-agent/reporter": "4.0.1",
|
|
56
|
+
"@vitest-agent/sdk": "6.0.0",
|
|
57
57
|
"effect": "^4.0.0",
|
|
58
58
|
"magic-string": "^1.4.2"
|
|
59
59
|
},
|
package/reporter.js
CHANGED
|
@@ -7,6 +7,7 @@ import { captureSettings, hashSettings } from "./utils/capture-settings.js";
|
|
|
7
7
|
import { isPartialRun } from "./utils/is-partial-run.js";
|
|
8
8
|
import { processFailure } from "./utils/process-failure.js";
|
|
9
9
|
import { assertReportCapable, createReportWriter } from "./utils/report-writer.js";
|
|
10
|
+
import { resolveNoColor } from "./utils/resolve-no-color.js";
|
|
10
11
|
import { routeRenderedOutput } from "./utils/route-rendered-output.js";
|
|
11
12
|
import { stringifyFailureValue } from "./utils/stringify-failure-value.js";
|
|
12
13
|
import { mkdirSync, statSync } from "node:fs";
|
|
@@ -564,16 +565,17 @@ var AgentReporter = class {
|
|
|
564
565
|
hasFailures: false,
|
|
565
566
|
belowTargets: false,
|
|
566
567
|
hasTargets: !!opts.coverageTargets
|
|
567
|
-
}, opts.detail)
|
|
568
|
+
}, opts.detail),
|
|
569
|
+
noColor: yield* resolveNoColor
|
|
568
570
|
};
|
|
569
571
|
});
|
|
570
|
-
const { env, executor, format, detail } = await Effect.runPromise(initProgram.pipe(Effect.provide(OutputPipelineLive(process.env)), Effect.provide(NodeServices.layer)));
|
|
572
|
+
const { env, executor, format, detail, noColor } = await Effect.runPromise(initProgram.pipe(Effect.provide(OutputPipelineLive(process.env)), Effect.provide(NodeServices.layer)));
|
|
571
573
|
const kit = buildReporterKit({
|
|
572
574
|
env,
|
|
573
575
|
executor,
|
|
574
576
|
format,
|
|
575
577
|
detail,
|
|
576
|
-
noColor
|
|
578
|
+
noColor,
|
|
577
579
|
consoleMode: opts.consoleMode ?? "passthrough",
|
|
578
580
|
mcp: opts.mcp ?? false,
|
|
579
581
|
githubActions: opts.githubActions,
|
|
@@ -1176,7 +1178,7 @@ var AgentReporter = class {
|
|
|
1176
1178
|
executor,
|
|
1177
1179
|
format,
|
|
1178
1180
|
detail,
|
|
1179
|
-
noColor:
|
|
1181
|
+
noColor: yield* resolveNoColor,
|
|
1180
1182
|
consoleMode: opts.consoleMode ?? "passthrough",
|
|
1181
1183
|
mcp: opts.mcp ?? false,
|
|
1182
1184
|
githubActions: opts.githubActions,
|
|
@@ -1728,7 +1730,7 @@ var AgentReporter = class {
|
|
|
1728
1730
|
executor,
|
|
1729
1731
|
format,
|
|
1730
1732
|
detail,
|
|
1731
|
-
noColor:
|
|
1733
|
+
noColor: yield* resolveNoColor,
|
|
1732
1734
|
consoleMode: opts.consoleMode ?? "passthrough",
|
|
1733
1735
|
mcp: opts.mcp ?? false,
|
|
1734
1736
|
githubActions: opts.githubActions,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TerminalEnv } from "@effected/env";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/resolve-no-color.ts
|
|
5
|
+
/**
|
|
6
|
+
* Whether the reporter should render without colour, decided by the kit's
|
|
7
|
+
* terminal rule rather than `NO_COLOR` alone: `FORCE_COLOR` beats `NO_COLOR`,
|
|
8
|
+
* and `NODE_DISABLE_COLORS`, `TERM=dumb` and a non-TTY stdout all disable it.
|
|
9
|
+
*/
|
|
10
|
+
const resolveNoColor = TerminalEnv.colorLevel("stdout").pipe(Effect.map((level) => level === "none"));
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { resolveNoColor };
|