@vitest-agent/plugin 4.1.6 → 5.0.0
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/bin/vitest-agent-mcp.js +5 -1
- package/bin/vitest-agent.js +5 -1
- package/index.d.ts +12 -9
- package/index.js +2 -1
- package/package.json +6 -6
- package/plugin.js +1 -9
- package/version.js +14 -0
package/bin/vitest-agent-mcp.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { CURRENT_PLUGIN_VERSION } from "../version.js";
|
|
2
3
|
import { main } from "@vitest-agent/mcp/main";
|
|
3
4
|
|
|
4
5
|
//#region src/bin/vitest-agent-mcp.ts
|
|
5
|
-
main(
|
|
6
|
+
main({ distribution: {
|
|
7
|
+
name: "@vitest-agent/plugin",
|
|
8
|
+
version: CURRENT_PLUGIN_VERSION
|
|
9
|
+
} });
|
|
6
10
|
|
|
7
11
|
//#endregion
|
|
8
12
|
export { };
|
package/bin/vitest-agent.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { CURRENT_PLUGIN_VERSION } from "../version.js";
|
|
2
3
|
import { main } from "@vitest-agent/cli/main";
|
|
3
4
|
|
|
4
5
|
//#region src/bin/vitest-agent.ts
|
|
5
|
-
main(
|
|
6
|
+
main({ distribution: {
|
|
7
|
+
name: "@vitest-agent/plugin",
|
|
8
|
+
version: CURRENT_PLUGIN_VERSION
|
|
9
|
+
} });
|
|
6
10
|
|
|
7
11
|
//#endregion
|
|
8
12
|
export { };
|
package/index.d.ts
CHANGED
|
@@ -248,6 +248,18 @@ interface InjectTagsResult {
|
|
|
248
248
|
map: SourceMap;
|
|
249
249
|
}
|
|
250
250
|
//#endregion
|
|
251
|
+
//#region src/version.d.ts
|
|
252
|
+
/**
|
|
253
|
+
* The version of this package, inlined at build time from
|
|
254
|
+
* `package.json#version` via the bundler's build-time `__PACKAGE_VERSION__` substitution.
|
|
255
|
+
* Lives in its own module so the `vitest-agent` bin shim can thread the
|
|
256
|
+
* carrier's identity into `@vitest-agent/cli/main` without importing the
|
|
257
|
+
* plugin graph; `plugin.ts` re-exports it as the public symbol.
|
|
258
|
+
*
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
export declare const CURRENT_PLUGIN_VERSION: string;
|
|
262
|
+
//#endregion
|
|
251
263
|
//#region src/plugin.d.ts
|
|
252
264
|
/**
|
|
253
265
|
* Plugin options shape with the (function-typed) `reporter` factory added
|
|
@@ -289,15 +301,6 @@ interface AgentPluginConstructorOptions extends AgentPluginOptions {
|
|
|
289
301
|
*/
|
|
290
302
|
discoverStrategy?: DiscoverStrategy | false;
|
|
291
303
|
}
|
|
292
|
-
/**
|
|
293
|
-
* The version of this package, inlined at build time from
|
|
294
|
-
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
295
|
-
* Re-exported from the package barrel as the public symbol; defined here so
|
|
296
|
-
* consumers can introspect the running plugin version without a circular import.
|
|
297
|
-
*
|
|
298
|
-
* @public
|
|
299
|
-
*/
|
|
300
|
-
export declare const CURRENT_PLUGIN_VERSION: string;
|
|
301
304
|
/**
|
|
302
305
|
* Vitest plugin that injects `AgentReporter` into the reporter chain.
|
|
303
306
|
*
|
package/index.js
CHANGED
|
@@ -15,7 +15,8 @@ import { Tag } from "./utils/tag.js";
|
|
|
15
15
|
import { DefaultDiscoverStrategy, DiscoverStrategy } from "./utils/discover-strategy.js";
|
|
16
16
|
import { discoverProjects } from "./utils/discover-projects.js";
|
|
17
17
|
import { CONSOLE_REPORTERS, stripConsoleReporters } from "./utils/strip-console-reporters.js";
|
|
18
|
-
import {
|
|
18
|
+
import { CURRENT_PLUGIN_VERSION } from "./version.js";
|
|
19
|
+
import { AgentPlugin } from "./plugin.js";
|
|
19
20
|
import { classifyByDirectory, classifyByFilename, combineClassifiers } from "./utils/classify-helpers.js";
|
|
20
21
|
import { CoverageAnalyzerTest } from "./layers/CoverageAnalyzerTest.js";
|
|
21
22
|
import { ConfigValidationTest } from "./layers/ConfigValidationTest.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
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": [
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@effect/platform-node": "4.0.0-rc.117",
|
|
47
47
|
"@effected/glob": "^0.8.0",
|
|
48
|
-
"@effected/workspaces": "^0.
|
|
49
|
-
"@vitest-agent/cli": "3.
|
|
50
|
-
"@vitest-agent/engine": "0.2.
|
|
51
|
-
"@vitest-agent/mcp": "
|
|
48
|
+
"@effected/workspaces": "^0.27.0",
|
|
49
|
+
"@vitest-agent/cli": "3.2.0",
|
|
50
|
+
"@vitest-agent/engine": "0.2.7",
|
|
51
|
+
"@vitest-agent/mcp": "5.0.0",
|
|
52
52
|
"@vitest-agent/reporter": "3.1.2",
|
|
53
53
|
"@vitest-agent/sdk": "5.1.2",
|
|
54
54
|
"effect": "4.0.0-rc.117",
|
|
55
|
-
"magic-string": "^1.4.
|
|
55
|
+
"magic-string": "^1.4.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@vitest/coverage-istanbul": "^5.0.0",
|
package/plugin.js
CHANGED
|
@@ -15,6 +15,7 @@ import { DEFAULT_BUILT_RECENTLY_MS, DEFAULT_LOCK_STALE_MS, DEFAULT_LOCK_WAIT_TIM
|
|
|
15
15
|
import { stripConsoleReporters } from "./utils/strip-console-reporters.js";
|
|
16
16
|
import { makeTagCacheKeyGenerator } from "./utils/tag-cache-key.js";
|
|
17
17
|
import { readVitestVersion, vitestPeerVersionMismatchMessage } from "./utils/vitest-peer-version-mismatch-error.js";
|
|
18
|
+
import { CURRENT_PLUGIN_VERSION } from "./version.js";
|
|
18
19
|
import { execSync } from "node:child_process";
|
|
19
20
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
20
21
|
import { tmpdir } from "node:os";
|
|
@@ -139,15 +140,6 @@ const coverageDirDecidedByVitest = /* @__PURE__ */ new WeakSet();
|
|
|
139
140
|
* @internal
|
|
140
141
|
*/
|
|
141
142
|
const reportedConfigDiagnosticsByVitest = /* @__PURE__ */ new WeakMap();
|
|
142
|
-
/**
|
|
143
|
-
* The version of this package, inlined at build time from
|
|
144
|
-
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
145
|
-
* Re-exported from the package barrel as the public symbol; defined here so
|
|
146
|
-
* consumers can introspect the running plugin version without a circular import.
|
|
147
|
-
*
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
const CURRENT_PLUGIN_VERSION = "4.1.6";
|
|
151
143
|
const TEST_FILE_DIR_RE = new RegExp(`/(?:${SRC_DIR}|${TEST_DIR})/`);
|
|
152
144
|
const isTestFile = (id) => isTestFileName(id) && TEST_FILE_DIR_RE.test(id);
|
|
153
145
|
/**
|
package/version.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/version.ts
|
|
2
|
+
/**
|
|
3
|
+
* The version of this package, inlined at build time from
|
|
4
|
+
* `package.json#version` via the bundler's build-time `__PACKAGE_VERSION__` substitution.
|
|
5
|
+
* Lives in its own module so the `vitest-agent` bin shim can thread the
|
|
6
|
+
* carrier's identity into `@vitest-agent/cli/main` without importing the
|
|
7
|
+
* plugin graph; `plugin.ts` re-exports it as the public symbol.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
const CURRENT_PLUGIN_VERSION = "5.0.0";
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CURRENT_PLUGIN_VERSION };
|