@vitest-agent/plugin 6.0.4 → 6.0.6
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/index.js +16 -16
- package/layers/CoverageAnalyzerLive.js +6 -4
- package/package.json +14 -15
- package/plugin.js +7 -7
- package/reporter.js +2 -2
- package/tsdoc-metadata.json +1 -1
- package/utils/discover-projects.js +2 -2
- package/utils/discover-strategy.js +1 -1
- package/utils/find-test-files.js +4 -1
- package/utils/stray-output-capture.js +1 -1
- package/version.js +1 -1
package/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
3
|
-
import { ConfigValidationLive } from "./layers/ConfigValidationLive.js";
|
|
4
|
-
import { CoverageAnalyzer } from "./services/CoverageAnalyzer.js";
|
|
5
|
-
import { CoverageAnalyzerLive } from "./layers/CoverageAnalyzerLive.js";
|
|
6
|
-
import { ReporterLive } from "./layers/ReporterLive.js";
|
|
7
|
-
import { captureEnvVars } from "./utils/capture-env.js";
|
|
8
|
-
import { captureSettings, hashSettings } from "./utils/capture-settings.js";
|
|
9
|
-
import { processFailure } from "./utils/process-failure.js";
|
|
10
|
-
import { ConfigurationError } from "./utils/configuration-error.js";
|
|
1
|
+
import { AgentPlugin } from "./plugin.js";
|
|
11
2
|
import { AgentReporter } from "./reporter.js";
|
|
12
|
-
import {
|
|
13
|
-
import { Tag } from "./utils/tag.js";
|
|
14
|
-
import { DefaultDiscoverStrategy, DiscoverStrategy } from "./utils/discover-strategy.js";
|
|
3
|
+
import { ConfigurationError } from "./utils/configuration-error.js";
|
|
15
4
|
import { applyProjectOverrides, discoverProjects } from "./utils/discover-projects.js";
|
|
16
|
-
import {
|
|
17
|
-
import { CURRENT_PLUGIN_VERSION } from "./version.js";
|
|
18
|
-
import { AgentPlugin } from "./plugin.js";
|
|
5
|
+
import { DefaultDiscoverStrategy, DiscoverStrategy } from "./utils/discover-strategy.js";
|
|
19
6
|
import { classifyByDirectory, classifyByFilename, combineClassifiers } from "./utils/classify-helpers.js";
|
|
7
|
+
import { findTestFiles } from "./utils/find-test-files.js";
|
|
8
|
+
import { ReporterLive } from "./layers/ReporterLive.js";
|
|
9
|
+
import { CoverageAnalyzerLive } from "./layers/CoverageAnalyzerLive.js";
|
|
20
10
|
import { CoverageAnalyzerTest } from "./layers/CoverageAnalyzerTest.js";
|
|
11
|
+
import { CoverageAnalyzer } from "./services/CoverageAnalyzer.js";
|
|
12
|
+
import { ConfigValidationLive } from "./layers/ConfigValidationLive.js";
|
|
21
13
|
import { ConfigValidationTest } from "./layers/ConfigValidationTest.js";
|
|
14
|
+
import { ConfigValidation } from "./services/ConfigValidation.js";
|
|
15
|
+
import { captureEnvVars } from "./utils/capture-env.js";
|
|
16
|
+
import { captureSettings, hashSettings } from "./utils/capture-settings.js";
|
|
17
|
+
import { CURRENT_PLUGIN_VERSION } from "./version.js";
|
|
18
|
+
import { processFailure } from "./utils/process-failure.js";
|
|
19
|
+
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
20
|
+
import { CONSOLE_REPORTERS, stripConsoleReporters } from "./utils/strip-console-reporters.js";
|
|
21
|
+
import { Tag } from "./utils/tag.js";
|
|
22
22
|
import { CoverageLevel, resolveCoverageInput, validateCoverageConfig } from "@vitest-agent/sdk";
|
|
23
23
|
|
|
24
24
|
// src/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CoverageAnalyzer } from "../services/CoverageAnalyzer.js";
|
|
2
2
|
import { toPosixPath } from "../utils/to-posix-path.js";
|
|
3
3
|
import { relative } from "node:path";
|
|
4
|
-
import { Fmt } from "@effected/cli";
|
|
4
|
+
import { Fmt } from "@effected/cli-kit";
|
|
5
5
|
import { Effect, Layer, Option, Result } from "effect";
|
|
6
6
|
import { GlobPattern } from "@effected/glob";
|
|
7
7
|
|
|
@@ -91,13 +91,15 @@ const globCache = /* @__PURE__ */ new Map();
|
|
|
91
91
|
* never cross a slash, brace groups expand, character classes and
|
|
92
92
|
* extglobs work, and dotfiles are not matched by wildcards (issue #381).
|
|
93
93
|
* `@effected/glob` is minimatch-based and agrees with picomatch on every
|
|
94
|
-
* shape a threshold key realistically takes
|
|
95
|
-
*
|
|
94
|
+
* shape a threshold key realistically takes; `extglobBang` gives a leading
|
|
95
|
+
* `!(` picomatch's reading, the extglob rather than whole-pattern negation.
|
|
96
|
+
* A pattern that fails to compile (guard trip on an absurd input) matches
|
|
97
|
+
* nothing.
|
|
96
98
|
*/
|
|
97
99
|
function matchGlob(filePath, pattern) {
|
|
98
100
|
let compiled = globCache.get(pattern);
|
|
99
101
|
if (compiled === void 0) {
|
|
100
|
-
const result = GlobPattern.compileResult(pattern);
|
|
102
|
+
const result = GlobPattern.compileResult(pattern, { extglobBang: true });
|
|
101
103
|
compiled = Result.isSuccess(result) ? result.success : null;
|
|
102
104
|
globCache.set(pattern, compiled);
|
|
103
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/plugin",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
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": [
|
|
@@ -43,20 +43,19 @@
|
|
|
43
43
|
"vitest-agent-mcp": "bin/vitest-agent-mcp.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/platform-node": "~4.1.
|
|
47
|
-
"@effected/cli": "^0.
|
|
48
|
-
"@effected/commands": "^0.
|
|
49
|
-
"@effected/
|
|
50
|
-
"@effected/
|
|
51
|
-
"@effected/
|
|
52
|
-
"@effected/
|
|
53
|
-
"@
|
|
54
|
-
"@vitest-agent/
|
|
55
|
-
"@vitest-agent/
|
|
56
|
-
"@vitest-agent/
|
|
57
|
-
"@vitest-agent/
|
|
58
|
-
"
|
|
59
|
-
"effect": "~4.1.1",
|
|
46
|
+
"@effect/platform-node": "~4.1.2",
|
|
47
|
+
"@effected/cli-kit": "^0.27.0",
|
|
48
|
+
"@effected/commands": "^0.20.0",
|
|
49
|
+
"@effected/env": "^0.11.0",
|
|
50
|
+
"@effected/glob": "^0.19.0",
|
|
51
|
+
"@effected/walker": "^0.25.1",
|
|
52
|
+
"@effected/workspaces": "^0.43.0",
|
|
53
|
+
"@vitest-agent/cli": "4.1.8",
|
|
54
|
+
"@vitest-agent/engine": "3.1.2",
|
|
55
|
+
"@vitest-agent/mcp": "6.1.2",
|
|
56
|
+
"@vitest-agent/reporter": "6.1.4",
|
|
57
|
+
"@vitest-agent/sdk": "9.0.3",
|
|
58
|
+
"effect": "~4.1.2",
|
|
60
59
|
"magic-string": "^1.4.5"
|
|
61
60
|
},
|
|
62
61
|
"peerDependencies": {
|
package/plugin.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ConfigValidation } from "./services/ConfigValidation.js";
|
|
2
|
-
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
3
1
|
import { ConfigValidationLive } from "./layers/ConfigValidationLive.js";
|
|
4
|
-
import { ConfigurationError } from "./utils/configuration-error.js";
|
|
5
|
-
import { assertFlatScope } from "./utils/report-writer.js";
|
|
6
|
-
import { installStrayOutputCapture } from "./utils/stray-output-capture.js";
|
|
7
2
|
import { AgentReporter } from "./reporter.js";
|
|
3
|
+
import { ConfigValidation } from "./services/ConfigValidation.js";
|
|
8
4
|
import { buildModuleInfo } from "./utils/build-module-info.js";
|
|
9
5
|
import { publishConfigSuggestedActions, suggestedActionsFromValidation } from "./utils/config-suggested-actions.js";
|
|
10
|
-
import {
|
|
6
|
+
import { ConfigurationError } from "./utils/configuration-error.js";
|
|
11
7
|
import { discoverProjects } from "./utils/discover-projects.js";
|
|
8
|
+
import { DefaultDiscoverStrategy } from "./utils/discover-strategy.js";
|
|
12
9
|
import { ensureGithubActionsReporter } from "./utils/ensure-github-reporter.js";
|
|
13
10
|
import { injectTags } from "./utils/inject-tags.js";
|
|
14
11
|
import { isBenignViteSourceMapWarning } from "./utils/is-benign-vite-source-map-warning.js";
|
|
12
|
+
import { assertFlatScope } from "./utils/report-writer.js";
|
|
15
13
|
import { resolveCoverageDirIsolation } from "./utils/resolve-coverage-dir-isolation.js";
|
|
16
14
|
import { PERSIST_ENV_VAR, resolvePersistence } from "./utils/resolve-persistence.js";
|
|
15
|
+
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
17
16
|
import { runScriptOptions, shellCommand } from "./utils/run-script-lock.js";
|
|
17
|
+
import { installStrayOutputCapture } from "./utils/stray-output-capture.js";
|
|
18
18
|
import { stripConsoleReporters } from "./utils/strip-console-reporters.js";
|
|
19
19
|
import { makeTagCacheKeyGenerator } from "./utils/tag-cache-key.js";
|
|
20
20
|
import { readVitestVersion, vitestPeerVersionMismatchMessage } from "./utils/vitest-peer-version-mismatch-error.js";
|
|
@@ -22,7 +22,7 @@ import { CURRENT_PLUGIN_VERSION } from "./version.js";
|
|
|
22
22
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
23
23
|
import { tmpdir } from "node:os";
|
|
24
24
|
import { join } from "node:path";
|
|
25
|
-
import { CliLog } from "@effected/cli";
|
|
25
|
+
import { CliLog } from "@effected/cli-kit";
|
|
26
26
|
import { RunOnce } from "@effected/commands";
|
|
27
27
|
import { nodeRunOnceHost } from "@effected/commands/node-sync";
|
|
28
28
|
import { Audience, EnvOverride } from "@effected/env";
|
package/reporter.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
2
|
-
import { CoverageAnalyzer } from "./services/CoverageAnalyzer.js";
|
|
3
1
|
import { CoverageAnalyzerLive } from "./layers/CoverageAnalyzerLive.js";
|
|
4
2
|
import { ReporterLive } from "./layers/ReporterLive.js";
|
|
3
|
+
import { CoverageAnalyzer } from "./services/CoverageAnalyzer.js";
|
|
5
4
|
import { buildReporterKit, normalizeReporters } from "./utils/build-reporter-kit.js";
|
|
6
5
|
import { captureEnvVars } from "./utils/capture-env.js";
|
|
7
6
|
import { captureSettings, hashSettings } from "./utils/capture-settings.js";
|
|
@@ -11,6 +10,7 @@ import { isPartialRun } from "./utils/is-partial-run.js";
|
|
|
11
10
|
import { processFailure } from "./utils/process-failure.js";
|
|
12
11
|
import { assertReportCapable, createReportWriter } from "./utils/report-writer.js";
|
|
13
12
|
import { resolveNoColor } from "./utils/resolve-no-color.js";
|
|
13
|
+
import { resolveThresholds } from "./utils/resolve-thresholds.js";
|
|
14
14
|
import { routeRenderedOutput } from "./utils/route-rendered-output.js";
|
|
15
15
|
import { publishRunDiagnostics } from "./utils/run-diagnostics.js";
|
|
16
16
|
import { runsInCi } from "./utils/runs-in-ci.js";
|
package/tsdoc-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toPosixPath } from "./to-posix-path.js";
|
|
2
|
-
import { directorySignature } from "./find-test-files.js";
|
|
3
1
|
import { DefaultDiscoverStrategy } from "./discover-strategy.js";
|
|
2
|
+
import { directorySignature } from "./find-test-files.js";
|
|
4
3
|
import { isTestShapedPackage } from "./is-test-shaped-package.js";
|
|
4
|
+
import { toPosixPath } from "./to-posix-path.js";
|
|
5
5
|
import { isAbsolute, join, normalize, relative } from "node:path";
|
|
6
6
|
import { SRC_DIR, TEST_DIR } from "@vitest-agent/sdk";
|
|
7
7
|
import { nodeWalkerSyncOps } from "@effected/walker/node-sync";
|
package/utils/find-test-files.js
CHANGED
|
@@ -6,7 +6,10 @@ import { nodeWalkerSyncOps } from "@effected/walker/node-sync";
|
|
|
6
6
|
import { descendEntriesSync, descendSync } from "@effected/walker";
|
|
7
7
|
|
|
8
8
|
// src/utils/find-test-files.ts
|
|
9
|
-
const GLOB_OPTIONS = {
|
|
9
|
+
const GLOB_OPTIONS = {
|
|
10
|
+
dot: true,
|
|
11
|
+
extglobBang: true
|
|
12
|
+
};
|
|
10
13
|
/** Every file, dot entries included: the pattern the signature walk expands. */
|
|
11
14
|
const EVERY_FILE = Result.getOrThrow(GlobPattern.compileResult("**", GLOB_OPTIONS));
|
|
12
15
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { STRAY_OUTPUT_SOURCE, makeStrayOutputRecorder } from "@vitest-agent/sdk";
|
|
2
|
-
import { CliUi } from "@effected/cli/ui";
|
|
2
|
+
import { CliUi } from "@effected/cli-kit/ui";
|
|
3
3
|
|
|
4
4
|
// src/utils/stray-output-capture.ts
|
|
5
5
|
const isCapture = (value) => typeof value === "object" && value !== null && "route" in value && "snapshot" in value;
|