@vitest-agent/plugin 2.0.10 → 2.0.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/plugin",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
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": [
@@ -41,11 +41,11 @@
41
41
  "dependencies": {
42
42
  "@effect/platform-node": "4.0.0-beta.101",
43
43
  "@effect/sql-sqlite-node": "4.0.0-beta.101",
44
- "@effected/workspaces": "^0.9.1",
45
- "@vitest-agent/cli": "2.0.10",
46
- "@vitest-agent/mcp": "2.0.10",
47
- "@vitest-agent/reporter": "2.0.10",
48
- "@vitest-agent/sdk": "2.0.10",
44
+ "@effected/workspaces": "^0.9.3",
45
+ "@vitest-agent/cli": "2.0.12",
46
+ "@vitest-agent/mcp": "2.0.12",
47
+ "@vitest-agent/reporter": "2.0.12",
48
+ "@vitest-agent/sdk": "2.0.12",
49
49
  "effect": "4.0.0-beta.101",
50
50
  "magic-string": "^1.1.0"
51
51
  },
package/plugin.js CHANGED
@@ -98,7 +98,7 @@ const aggregatedReporterByVitest = /* @__PURE__ */ new WeakSet();
98
98
  *
99
99
  * @public
100
100
  */
101
- const CURRENT_PLUGIN_VERSION = "2.0.10";
101
+ const CURRENT_PLUGIN_VERSION = "2.0.12";
102
102
  const TEST_FILE_SUFFIX_RE = /\.(?:test|spec)\.(?:ts|tsx|js|jsx)$/;
103
103
  const TEST_FILE_DIR_RE = /\/(?:src|__test__)\//;
104
104
  const isTestFile = (id) => TEST_FILE_SUFFIX_RE.test(id) && TEST_FILE_DIR_RE.test(id);
package/reporter.js CHANGED
@@ -900,7 +900,9 @@ var AgentReporter = class {
900
900
  const tracker = yield* HistoryTracker;
901
901
  const invocationId = randomUUID();
902
902
  const vitest = stashedVitest;
903
- const settings = captureSettings(vitest?.config ?? {}, vitest?.version ?? "unknown");
903
+ const vitestConfig = vitest?.config ?? {};
904
+ const vitestVersion = vitest?.version ?? "unknown";
905
+ const settings = captureSettings(vitestConfig, vitestVersion);
904
906
  const settingsHash = hashSettings(settings);
905
907
  const envVars = captureEnvVars(process.env);
906
908
  yield* store.writeSettings(settingsHash, settings, envVars);
@@ -31,7 +31,8 @@ async function computeDirSignature(dirPath) {
31
31
  const parts = [];
32
32
  for (const ent of entries) {
33
33
  if (!ent.isFile()) continue;
34
- const fullPath = join(ent.parentPath ?? dirPath, ent.name);
34
+ const parentPath = ent.parentPath ?? dirPath;
35
+ const fullPath = join(parentPath, ent.name);
35
36
  let mtimeMs;
36
37
  try {
37
38
  mtimeMs = (await stat(fullPath)).mtimeMs;
@@ -96,7 +97,8 @@ async function discoverProjects(options) {
96
97
  workspacePaths.add(normalize(pkg.path));
97
98
  }
98
99
  for (const entry of additionalEntries) {
99
- const normPath = normalize(isAbsolute(entry.path) ? entry.path : join(root, entry.path));
100
+ const absPath = isAbsolute(entry.path) ? entry.path : join(root, entry.path);
101
+ const normPath = normalize(absPath);
100
102
  if (workspaceNames.has(entry.name)) throw new Error(`[vitest-agent] .addProject() conflict: name "${entry.name}" already exists as a workspace package. Use a different name or omit the .addProject() call.`);
101
103
  if (workspacePaths.has(normPath)) throw new Error(`[vitest-agent] .addProject() conflict: resolved path "${normPath}" already exists as a workspace package path. Remove the .addProject() call or adjust the path.`);
102
104
  const relativePath = toPosixPath(relative(root, normPath));