@vitest-agent/plugin 5.4.7 → 5.4.9

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.
Files changed (44) hide show
  1. package/bin/vitest-agent-mcp.js +1 -2
  2. package/bin/vitest-agent.js +1 -2
  3. package/index.d.ts +0 -48
  4. package/index.js +1 -2
  5. package/layers/ConfigValidationLive.js +1 -2
  6. package/layers/ConfigValidationTest.js +1 -2
  7. package/layers/CoverageAnalyzerLive.js +1 -2
  8. package/layers/CoverageAnalyzerTest.js +1 -2
  9. package/layers/ReporterLive.js +1 -2
  10. package/package.json +13 -13
  11. package/plugin.js +1 -2
  12. package/reporter.js +1 -2
  13. package/services/ConfigValidation.js +1 -2
  14. package/services/CoverageAnalyzer.js +1 -2
  15. package/utils/build-module-info.js +1 -2
  16. package/utils/build-reporter-kit.js +1 -2
  17. package/utils/capture-env.js +1 -2
  18. package/utils/capture-settings.js +1 -2
  19. package/utils/classify-helpers.js +1 -2
  20. package/utils/configuration-error.js +1 -2
  21. package/utils/discover-projects.js +1 -2
  22. package/utils/discover-strategy.js +1 -2
  23. package/utils/ensure-github-reporter.js +1 -2
  24. package/utils/find-test-files.js +1 -2
  25. package/utils/inject-tags.js +1 -2
  26. package/utils/is-benign-vite-source-map-warning.js +1 -2
  27. package/utils/is-partial-run.js +1 -2
  28. package/utils/is-test-shaped-package.js +1 -2
  29. package/utils/process-failure.js +1 -2
  30. package/utils/report-writer.js +1 -2
  31. package/utils/resolve-coverage-dir-isolation.js +1 -2
  32. package/utils/resolve-no-color.js +1 -2
  33. package/utils/resolve-thresholds.js +1 -2
  34. package/utils/route-rendered-output.js +1 -2
  35. package/utils/run-script-lock.js +1 -2
  36. package/utils/stray-output-capture.js +1 -2
  37. package/utils/stringify-failure-value.js +1 -2
  38. package/utils/strip-console-reporters.js +1 -2
  39. package/utils/tag-cache-key.js +1 -2
  40. package/utils/tag.js +1 -2
  41. package/utils/to-posix-path.js +1 -2
  42. package/utils/vitest-peer-version-mismatch-error.js +1 -2
  43. package/utils/walker-fs.js +1 -2
  44. package/version.js +2 -3
@@ -2,11 +2,10 @@
2
2
  import { CURRENT_PLUGIN_VERSION } from "../version.js";
3
3
  import { main } from "@vitest-agent/mcp/main";
4
4
 
5
- //#region src/bin/vitest-agent-mcp.ts
5
+ // src/bin/vitest-agent-mcp.ts
6
6
  main({ distribution: {
7
7
  name: "@vitest-agent/plugin",
8
8
  version: CURRENT_PLUGIN_VERSION
9
9
  } });
10
10
 
11
- //#endregion
12
11
  export { };
@@ -2,11 +2,10 @@
2
2
  import { CURRENT_PLUGIN_VERSION } from "../version.js";
3
3
  import { main } from "@vitest-agent/cli/main";
4
4
 
5
- //#region src/bin/vitest-agent.ts
5
+ // src/bin/vitest-agent.ts
6
6
  main({ distribution: {
7
7
  name: "@vitest-agent/plugin",
8
8
  version: CURRENT_PLUGIN_VERSION
9
9
  } });
10
10
 
11
- //#endregion
12
11
  export { };
package/index.d.ts CHANGED
@@ -6,7 +6,6 @@ import { TestProjectInlineConfiguration, TestTagDefinition } from "vitest/config
6
6
  import { ResolvedConfig, VitestPluginContext } from "vitest/node";
7
7
  import { WorkspacesSyncOptions } from "@effected/workspaces/node-sync";
8
8
  import { SourceMap } from "magic-string";
9
- //#region src/utils/tag.d.ts
10
9
  /**
11
10
  * Options for a `Tag`, mirroring `TestTagDefinition` minus the `name` field.
12
11
  * @public
@@ -30,8 +29,6 @@ export declare class Tag {
30
29
  */
31
30
  static make(name: string, options?: TagOptions): Tag;
32
31
  }
33
- //#endregion
34
- //#region src/utils/walker-fs.d.ts
35
32
  /**
36
33
  * The filesystem operations the discovery walkers need, supplied by the
37
34
  * caller. Node's built-ins satisfy it directly via {@link nodeWalkerFs}, which
@@ -109,8 +106,6 @@ interface WalkerEntryStat {
109
106
  * @public
110
107
  */
111
108
  export declare const nodeWalkerFs: WalkerFileSystem;
112
- //#endregion
113
- //#region src/utils/discover-strategy.d.ts
114
109
  /**
115
110
  * Resolved metadata about a discovered test module.
116
111
  * @public
@@ -234,8 +229,6 @@ export declare class DefaultDiscoverStrategy extends DiscoverStrategy {
234
229
  buildProject(input: DiscoverInput): Promise<TestProjectInlineConfiguration | null>;
235
230
  extend(options: DiscoverStrategyExtendOptions): DiscoverStrategy;
236
231
  }
237
- //#endregion
238
- //#region src/utils/discover-projects.d.ts
239
232
  /**
240
233
  * The resolved output of `discoverProjects` — projects and tag definitions ready for `defineConfig`.
241
234
  * @public
@@ -278,8 +271,6 @@ interface DiscoverProjectsOptions {
278
271
  * @public
279
272
  */
280
273
  export declare function discoverProjects(options?: DiscoverProjectsOptions): Promise<DiscoverProjectsResult>;
281
- //#endregion
282
- //#region src/utils/inject-tags.d.ts
283
274
  /**
284
275
  * Return value of the Vite `transform` hook — the rewritten source code and its source map.
285
276
  * @public
@@ -290,8 +281,6 @@ interface InjectTagsResult {
290
281
  /** Source map correlating transformed positions back to the original source. */
291
282
  map: SourceMap;
292
283
  }
293
- //#endregion
294
- //#region src/version.d.ts
295
284
  /**
296
285
  * The version of this package, inlined at build time from
297
286
  * `package.json#version` via the bundler's build-time `__PACKAGE_VERSION__` substitution.
@@ -302,8 +291,6 @@ interface InjectTagsResult {
302
291
  * @public
303
292
  */
304
293
  export declare const CURRENT_PLUGIN_VERSION: string;
305
- //#endregion
306
- //#region src/plugin.d.ts
307
294
  /**
308
295
  * Plugin options shape with the (function-typed) `reporter` factory added
309
296
  * on top of the schema-defined `AgentPluginOptions`. Schema can't
@@ -520,8 +507,6 @@ export declare namespace AgentPlugin {
520
507
  */
521
508
  function runScript(command: string): void;
522
509
  }
523
- //#endregion
524
- //#region src/reporter.d.ts
525
510
  /**
526
511
  * Constructor argument shape for {@link AgentReporter}.
527
512
  *
@@ -1178,8 +1163,6 @@ export declare class AgentReporter {
1178
1163
  */
1179
1164
  onTestRunEnd(testModules: ReadonlyArray<unknown>, unhandledErrors: ReadonlyArray<unknown>, reason: "passed" | "failed" | "interrupted"): Promise<void>;
1180
1165
  }
1181
- //#endregion
1182
- //#region src/utils/configuration-error.d.ts
1183
1166
  /**
1184
1167
  * A mistake in the user's own `AgentPlugin` configuration — a bad report
1185
1168
  * scope, an unsafe report filename — as opposed to an internal failure of
@@ -1195,8 +1178,6 @@ export declare class AgentReporter {
1195
1178
  export declare class ConfigurationError extends Error {
1196
1179
  readonly name = "ConfigurationError";
1197
1180
  }
1198
- //#endregion
1199
- //#region src/utils/classify-helpers.d.ts
1200
1181
  /**
1201
1182
  * Creates a ClassifyFn that maps filename suffix patterns to tag arrays.
1202
1183
  *
@@ -1232,8 +1213,6 @@ export declare function classifyByDirectory(dirMap: Record<string, ReadonlyArray
1232
1213
  * @public
1233
1214
  */
1234
1215
  export declare function combineClassifiers(...fns: ReadonlyArray<ClassifyFn>): ClassifyFn;
1235
- //#endregion
1236
- //#region src/utils/find-test-files.d.ts
1237
1216
  /**
1238
1217
  * Async file walker that returns matched absolute paths.
1239
1218
  *
@@ -1256,8 +1235,6 @@ export declare function combineClassifiers(...fns: ReadonlyArray<ClassifyFn>): C
1256
1235
  * @public
1257
1236
  */
1258
1237
  export declare function findTestFiles(dir: string, patterns: ReadonlyArray<string>, fs?: WalkerFileSystem): Promise<ReadonlyArray<string>>;
1259
- //#endregion
1260
- //#region src/services/CoverageAnalyzer.d.ts
1261
1238
  /**
1262
1239
  * Options passed to `CoverageAnalyzer.process` and `CoverageAnalyzer.processScoped`.
1263
1240
  *
@@ -1303,8 +1280,6 @@ declare const CoverageAnalyzer_base: Context.ServiceClass<CoverageAnalyzer, "vit
1303
1280
  * @public
1304
1281
  */
1305
1282
  export declare class CoverageAnalyzer extends CoverageAnalyzer_base {}
1306
- //#endregion
1307
- //#region src/layers/ReporterLive.d.ts
1308
1283
  /**
1309
1284
  * Composition layer for a single `AgentReporter` run: the engine's
1310
1285
  * `PlatformLive` (SQLite, migrations, Node platform services, logger and
@@ -1320,15 +1295,11 @@ export declare class CoverageAnalyzer extends CoverageAnalyzer_base {}
1320
1295
  * @public
1321
1296
  */
1322
1297
  export declare const ReporterLive: (options: PlatformOptions) => Layer.Layer<CoverageAnalyzer | PlatformServices, PlatformLiveError>;
1323
- //#endregion
1324
- //#region src/layers/CoverageAnalyzerLive.d.ts
1325
1298
  /**
1326
1299
  * Live implementation of the CoverageAnalyzer service backed by istanbul.
1327
1300
  * @public
1328
1301
  */
1329
1302
  export declare const CoverageAnalyzerLive: Layer.Layer<CoverageAnalyzer>;
1330
- //#endregion
1331
- //#region src/layers/CoverageAnalyzerTest.d.ts
1332
1303
  /**
1333
1304
  * Test-double layer factory for CoverageAnalyzer. Pass a pre-built `CoverageReport` to inject.
1334
1305
  * @public
@@ -1336,8 +1307,6 @@ export declare const CoverageAnalyzerLive: Layer.Layer<CoverageAnalyzer>;
1336
1307
  export declare const CoverageAnalyzerTest: {
1337
1308
  readonly layer: (data?: CoverageReport) => Layer.Layer<CoverageAnalyzer>;
1338
1309
  };
1339
- //#endregion
1340
- //#region src/services/ConfigValidation.d.ts
1341
1310
  /**
1342
1311
  * A validation error produced by the ConfigValidation service.
1343
1312
  * @public
@@ -1391,15 +1360,11 @@ declare const ConfigValidation_base: Context.ServiceClass<ConfigValidation, "vit
1391
1360
  * @public
1392
1361
  */
1393
1362
  export declare class ConfigValidation extends ConfigValidation_base {}
1394
- //#endregion
1395
- //#region src/layers/ConfigValidationLive.d.ts
1396
1363
  /**
1397
1364
  * Live implementation of the ConfigValidation service running the built-in rule registry.
1398
1365
  * @public
1399
1366
  */
1400
1367
  export declare const ConfigValidationLive: Layer.Layer<ConfigValidation>;
1401
- //#endregion
1402
- //#region src/layers/ConfigValidationTest.d.ts
1403
1368
  /**
1404
1369
  * Test-double layer factory for ConfigValidation. Pass a pre-built `ValidationResult` to inject.
1405
1370
  * @public
@@ -1407,8 +1372,6 @@ export declare const ConfigValidationLive: Layer.Layer<ConfigValidation>;
1407
1372
  export declare const ConfigValidationTest: {
1408
1373
  readonly layer: (override?: ValidationResult) => Layer.Layer<ConfigValidation>;
1409
1374
  };
1410
- //#endregion
1411
- //#region src/utils/capture-env.d.ts
1412
1375
  /**
1413
1376
  * Capture CI and GitHub Actions environment variables for persistence.
1414
1377
  * @param env - The process environment record to read from
@@ -1416,8 +1379,6 @@ export declare const ConfigValidationTest: {
1416
1379
  * @public
1417
1380
  */
1418
1381
  export declare function captureEnvVars(env: Record<string, string | undefined>): Record<string, string>;
1419
- //#endregion
1420
- //#region src/utils/capture-settings.d.ts
1421
1382
  /**
1422
1383
  * Extract a serializable settings snapshot from the resolved Vitest config.
1423
1384
  * @param config - The resolved Vitest config record
@@ -1433,8 +1394,6 @@ export declare function captureSettings(config: Record<string, unknown>, vitestV
1433
1394
  * @public
1434
1395
  */
1435
1396
  export declare function hashSettings(settings: Record<string, unknown>): string;
1436
- //#endregion
1437
- //#region src/utils/process-failure.d.ts
1438
1397
  /**
1439
1398
  * A single parsed stack frame as Vitest represents it.
1440
1399
  * @public
@@ -1480,8 +1439,6 @@ export declare const processFailure: (error: VitestErrorLike, options?: {
1480
1439
  frames: ReadonlyArray<StackFrameInput>;
1481
1440
  signatureHash: string | null;
1482
1441
  };
1483
- //#endregion
1484
- //#region src/utils/resolve-thresholds.d.ts
1485
1442
  /**
1486
1443
  * Loose record type matching Vitest's `coverage.thresholds` config input.
1487
1444
  * @public
@@ -1494,8 +1451,6 @@ type VitestThresholdsInput = Record<string, unknown>;
1494
1451
  * @public
1495
1452
  */
1496
1453
  export declare function resolveThresholds(input: VitestThresholdsInput | undefined): ResolvedThresholds;
1497
- //#endregion
1498
- //#region src/utils/strip-console-reporters.d.ts
1499
1454
  /**
1500
1455
  * Built-in Vitest reporters that write to the console (stdout).
1501
1456
  * These are the reporters suppressed when an agent takes over console output.
@@ -1525,8 +1480,6 @@ export declare const CONSOLE_REPORTERS: Set<string>;
1525
1480
  * @internal
1526
1481
  */
1527
1482
  export declare function stripConsoleReporters(reporters: unknown[]): unknown[];
1528
- //#endregion
1529
- //#region src/index.d.ts
1530
1483
  /** Preset map for coverage levels without per-file enforcement. Mirrors `AgentPlugin.COVERAGE_LEVELS`. @public */
1531
1484
  export declare const COVERAGE_LEVELS: Readonly<Record<import("@vitest-agent/sdk").CoverageLevelName, CoverageLevelPreset>>;
1532
1485
  /** Preset map for coverage levels with per-file enforcement. Mirrors `AgentPlugin.COVERAGE_LEVELS_PER_FILE`. @public */
@@ -1537,6 +1490,5 @@ export declare const COVERAGE_AUTOUPDATE: Readonly<{
1537
1490
  strict: (next: number, previous: number) => number;
1538
1491
  lenient: (next: number, previous: number) => number;
1539
1492
  }>;
1540
- //#endregion
1541
1493
  export { type AddProjectInput, type AgentPluginConstructorOptions, type AgentReporterConstructorOptions, type ClassifyContext, type ClassifyFn, type CoverageInput, CoverageLevel, type CoverageLevelName, type CoverageLevelPreset, type CoverageOptions, type DiscoverBuilder, type DiscoverInput, type PackageJson as DiscoverPackageJson, type DiscoverProjectsOptions, type DiscoverProjectsResult, type DiscoverResult, type DiscoverStrategyCreateOptions, type DiscoverStrategyExtendOptions, type InjectTagsResult, type ModuleInfo, type TagOptions, type ValidationError, type ValidationInfo, type ValidationInput, type ValidationResult, type ValidationWarning, type VitestErrorLike, type VitestStackFrameLike, type VitestThresholdsInput, type WalkerEntry, type WalkerEntryStat, type WalkerFileSystem, resolveCoverageInput, validateCoverageConfig };
1542
1494
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -22,7 +22,7 @@ import { CoverageAnalyzerTest } from "./layers/CoverageAnalyzerTest.js";
22
22
  import { ConfigValidationTest } from "./layers/ConfigValidationTest.js";
23
23
  import { CoverageLevel, resolveCoverageInput, validateCoverageConfig } from "@vitest-agent/sdk";
24
24
 
25
- //#region src/index.ts
25
+ // src/index.ts
26
26
  /** Preset map for coverage levels without per-file enforcement. Mirrors `AgentPlugin.COVERAGE_LEVELS`. @public */
27
27
  const COVERAGE_LEVELS = AgentPlugin.COVERAGE_LEVELS;
28
28
  /** Preset map for coverage levels with per-file enforcement. Mirrors `AgentPlugin.COVERAGE_LEVELS_PER_FILE`. @public */
@@ -30,5 +30,4 @@ const COVERAGE_LEVELS_PER_FILE = AgentPlugin.COVERAGE_LEVELS_PER_FILE;
30
30
  /** Auto-update tolerance functions for `coverage.thresholds.autoUpdate`. Mirrors `AgentPlugin.COVERAGE_AUTOUPDATE`. @public */
31
31
  const COVERAGE_AUTOUPDATE = AgentPlugin.COVERAGE_AUTOUPDATE;
32
32
 
33
- //#endregion
34
33
  export { AgentPlugin, AgentReporter, CONSOLE_REPORTERS, COVERAGE_AUTOUPDATE, COVERAGE_LEVELS, COVERAGE_LEVELS_PER_FILE, CURRENT_PLUGIN_VERSION, ConfigValidation, ConfigValidationLive, ConfigValidationTest, ConfigurationError, CoverageAnalyzer, CoverageAnalyzerLive, CoverageAnalyzerTest, CoverageLevel, DefaultDiscoverStrategy, DiscoverStrategy, ReporterLive, Tag, captureEnvVars, captureSettings, classifyByDirectory, classifyByFilename, combineClassifiers, discoverProjects, findTestFiles, hashSettings, nodeWalkerFs, processFailure, resolveCoverageInput, resolveThresholds, stripConsoleReporters, validateCoverageConfig };
@@ -4,7 +4,7 @@ import { createRequire } from "node:module";
4
4
  import { validateCoverageTargetsShape } from "@vitest-agent/sdk";
5
5
  import { Effect, Layer } from "effect";
6
6
 
7
- //#region src/layers/ConfigValidationLive.ts
7
+ // src/layers/ConfigValidationLive.ts
8
8
  /**
9
9
  * Live implementation of the ConfigValidation service.
10
10
  *
@@ -171,5 +171,4 @@ function runAllRules(input) {
171
171
  */
172
172
  const ConfigValidationLive = Layer.succeed(ConfigValidation, { validate: (input) => Effect.sync(() => runAllRules(input)) });
173
173
 
174
- //#endregion
175
174
  export { ConfigValidationLive };
@@ -1,7 +1,7 @@
1
1
  import { ConfigValidation } from "../services/ConfigValidation.js";
2
2
  import { Effect, Layer } from "effect";
3
3
 
4
- //#region src/layers/ConfigValidationTest.ts
4
+ // src/layers/ConfigValidationTest.ts
5
5
  /**
6
6
  * Test-double layer factory for ConfigValidation. Pass a pre-built `ValidationResult` to inject.
7
7
  * @public
@@ -12,5 +12,4 @@ const ConfigValidationTest = { layer: (override) => Layer.succeed(ConfigValidati
12
12
  info: []
13
13
  }) }) };
14
14
 
15
- //#endregion
16
15
  export { ConfigValidationTest };
@@ -5,7 +5,7 @@ import { compressLines } from "@vitest-agent/sdk";
5
5
  import { Effect, Layer, Option, Result } from "effect";
6
6
  import { GlobPattern } from "@effected/glob";
7
7
 
8
- //#region src/layers/CoverageAnalyzerLive.ts
8
+ // src/layers/CoverageAnalyzerLive.ts
9
9
  /**
10
10
  * Check whether any metric in `stats` falls below its corresponding threshold.
11
11
  * Only metrics that are defined in `thresholds` are checked.
@@ -293,5 +293,4 @@ const CoverageAnalyzerLive = Layer.succeed(CoverageAnalyzer, {
293
293
  })
294
294
  });
295
295
 
296
- //#endregion
297
296
  export { CoverageAnalyzerLive };
@@ -1,7 +1,7 @@
1
1
  import { CoverageAnalyzer } from "../services/CoverageAnalyzer.js";
2
2
  import { Effect, Layer, Option } from "effect";
3
3
 
4
- //#region src/layers/CoverageAnalyzerTest.ts
4
+ // src/layers/CoverageAnalyzerTest.ts
5
5
  /**
6
6
  * Test-double layer factory for CoverageAnalyzer. Pass a pre-built `CoverageReport` to inject.
7
7
  * @public
@@ -11,5 +11,4 @@ const CoverageAnalyzerTest = { layer: (data) => Layer.succeed(CoverageAnalyzer,
11
11
  processScoped: () => Effect.succeed(data ? Option.some(data) : Option.none())
12
12
  }) };
13
13
 
14
- //#endregion
15
14
  export { CoverageAnalyzerTest };
@@ -2,7 +2,7 @@ import { CoverageAnalyzerLive } from "./CoverageAnalyzerLive.js";
2
2
  import { PlatformLive } from "@vitest-agent/engine";
3
3
  import { Layer } from "effect";
4
4
 
5
- //#region src/layers/ReporterLive.ts
5
+ // src/layers/ReporterLive.ts
6
6
  /**
7
7
  * Composition layer for a single `AgentReporter` run: the engine's
8
8
  * `PlatformLive` (SQLite, migrations, Node platform services, logger and
@@ -19,5 +19,4 @@ import { Layer } from "effect";
19
19
  */
20
20
  const ReporterLive = (options) => CoverageAnalyzerLive.pipe(Layer.provideMerge(PlatformLive(options)));
21
21
 
22
- //#endregion
23
22
  export { ReporterLive };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/plugin",
3
- "version": "5.4.7",
3
+ "version": "5.4.9",
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,18 +43,18 @@
43
43
  "vitest-agent-mcp": "bin/vitest-agent-mcp.js"
44
44
  },
45
45
  "dependencies": {
46
- "@effect/platform-node": "^4.0.5",
47
- "@effected/cli": "^0.19.0",
48
- "@effected/env": "^0.4.0",
49
- "@effected/glob": "^0.13.0",
50
- "@effected/walker": "^0.18.0",
51
- "@effected/workspaces": "^0.35.0",
52
- "@vitest-agent/cli": "4.0.11",
53
- "@vitest-agent/engine": "1.1.0",
54
- "@vitest-agent/mcp": "5.2.7",
55
- "@vitest-agent/reporter": "5.0.6",
56
- "@vitest-agent/sdk": "7.0.4",
57
- "effect": "^4.0.5",
46
+ "@effect/platform-node": "^4.0.6",
47
+ "@effected/cli": "^0.22.0",
48
+ "@effected/env": "^0.5.0",
49
+ "@effected/glob": "^0.14.0",
50
+ "@effected/walker": "^0.19.0",
51
+ "@effected/workspaces": "^0.38.0",
52
+ "@vitest-agent/cli": "4.0.13",
53
+ "@vitest-agent/engine": "1.1.2",
54
+ "@vitest-agent/mcp": "5.2.9",
55
+ "@vitest-agent/reporter": "5.0.8",
56
+ "@vitest-agent/sdk": "7.0.5",
57
+ "effect": "^4.0.6",
58
58
  "magic-string": "^1.4.3"
59
59
  },
60
60
  "peerDependencies": {
package/plugin.js CHANGED
@@ -27,7 +27,7 @@ import { EnvironmentDetector, EnvironmentDetectorLive, ExecutorResolver, Executo
27
27
  import { AgentConsoleMode, CiConsoleMode, CoverageLevel, HumanConsoleMode, SRC_DIR, TEST_DIR, formatFatalError, isTestFileName } from "@vitest-agent/sdk";
28
28
  import { Effect, Layer, Option } from "effect";
29
29
 
30
- //#region src/plugin.ts
30
+ // src/plugin.ts
31
31
  /**
32
32
  * Resolve which {@link ConsoleMode} value applies to the active executor.
33
33
  * Looks up `console.{executor}` in the user-supplied matrix, falls back to
@@ -457,5 +457,4 @@ function makeDiscoverBuilder(options) {
457
457
  _AgentPlugin.runScript = runScript;
458
458
  })(AgentPlugin || (AgentPlugin = {}));
459
459
 
460
- //#endregion
461
460
  export { AgentPlugin, CURRENT_PLUGIN_VERSION, makeDiscoverBuilder, readConsoleOverride, resolveConsoleMode };
package/reporter.js CHANGED
@@ -20,7 +20,7 @@ import { randomUUID } from "node:crypto";
20
20
  import * as NodeServices from "@effect/platform-node/NodeServices";
21
21
  import { DefaultVitestAgentReporter } from "@vitest-agent/reporter";
22
22
 
23
- //#region src/reporter.ts
23
+ // src/reporter.ts
24
24
  /**
25
25
  * Cache of in-flight `resolveDataPath` promises, keyed by `projectDir`.
26
26
  *
@@ -1800,5 +1800,4 @@ var AgentReporter = class {
1800
1800
  }
1801
1801
  };
1802
1802
 
1803
- //#endregion
1804
1803
  export { AgentReporter, toAnnotationInputs, toArtifactInputs };
@@ -1,11 +1,10 @@
1
1
  import { Context } from "effect";
2
2
 
3
- //#region src/services/ConfigValidation.ts
3
+ // src/services/ConfigValidation.ts
4
4
  /**
5
5
  * Effect service for validating Vitest + plugin coverage configuration.
6
6
  * @public
7
7
  */
8
8
  var ConfigValidation = class extends Context.Service()("vitest-agent/ConfigValidation") {};
9
9
 
10
- //#endregion
11
10
  export { ConfigValidation };
@@ -1,11 +1,10 @@
1
1
  import { Context } from "effect";
2
2
 
3
- //#region src/services/CoverageAnalyzer.ts
3
+ // src/services/CoverageAnalyzer.ts
4
4
  /**
5
5
  * Effect service for processing istanbul coverage maps into structured reports.
6
6
  * @public
7
7
  */
8
8
  var CoverageAnalyzer = class extends Context.Service()("vitest-agent/CoverageAnalyzer") {};
9
9
 
10
- //#endregion
11
10
  export { CoverageAnalyzer };
@@ -2,7 +2,7 @@ import { toPosixPath } from "./to-posix-path.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { basename, dirname, relative } from "node:path";
4
4
 
5
- //#region src/utils/build-module-info.ts
5
+ // src/utils/build-module-info.ts
6
6
  const nodeBuildModuleInfoFs = {
7
7
  exists: (path) => existsSync(path),
8
8
  readFile: (path) => readFileSync(path, "utf8")
@@ -68,5 +68,4 @@ const buildModuleInfo = (filePath, fs = nodeBuildModuleInfoFs) => {
68
68
  };
69
69
  };
70
70
 
71
- //#endregion
72
71
  export { buildModuleInfo };
@@ -1,6 +1,6 @@
1
1
  import { osc8 } from "@vitest-agent/sdk";
2
2
 
3
- //#region src/utils/build-reporter-kit.ts
3
+ // src/utils/build-reporter-kit.ts
4
4
  const buildReporterKit = (input) => {
5
5
  const consoleOutput = input.consoleMode === "silent" ? "silent" : "failures";
6
6
  const githubSummary = input.githubActions;
@@ -44,5 +44,4 @@ const normalizeReporters = (result) => {
44
44
  return Array.isArray(result) ? result : [result];
45
45
  };
46
46
 
47
- //#endregion
48
47
  export { buildReporterKit, normalizeReporters };
@@ -1,4 +1,4 @@
1
- //#region src/utils/capture-env.ts
1
+ // src/utils/capture-env.ts
2
2
  const ALWAYS_CAPTURE = [
3
3
  "CI",
4
4
  "NODE_ENV",
@@ -19,5 +19,4 @@ function captureEnvVars(env) {
19
19
  return result;
20
20
  }
21
21
 
22
- //#endregion
23
22
  export { captureEnvVars };
@@ -1,6 +1,6 @@
1
1
  import { createHash } from "node:crypto";
2
2
 
3
- //#region src/utils/capture-settings.ts
3
+ // src/utils/capture-settings.ts
4
4
  /**
5
5
  * Extract a serializable settings snapshot from the resolved Vitest config.
6
6
  * @param config - The resolved Vitest config record
@@ -50,5 +50,4 @@ function hashSettings(settings) {
50
50
  return createHash("sha256").update(json).digest("hex");
51
51
  }
52
52
 
53
- //#endregion
54
53
  export { captureSettings, hashSettings };
@@ -1,6 +1,6 @@
1
1
  import { toPosixPath } from "./to-posix-path.js";
2
2
 
3
- //#region src/utils/classify-helpers.ts
3
+ // src/utils/classify-helpers.ts
4
4
  /**
5
5
  * Creates a ClassifyFn that maps filename suffix patterns to tag arrays.
6
6
  *
@@ -68,5 +68,4 @@ function combineClassifiers(...fns) {
68
68
  };
69
69
  }
70
70
 
71
- //#endregion
72
71
  export { classifyByDirectory, classifyByFilename, combineClassifiers };
@@ -1,4 +1,4 @@
1
- //#region src/utils/configuration-error.ts
1
+ // src/utils/configuration-error.ts
2
2
  /**
3
3
  * A mistake in the user's own `AgentPlugin` configuration — a bad report
4
4
  * scope, an unsafe report filename — as opposed to an internal failure of
@@ -15,5 +15,4 @@ var ConfigurationError = class extends Error {
15
15
  name = "ConfigurationError";
16
16
  };
17
17
 
18
- //#endregion
19
18
  export { ConfigurationError };
@@ -7,7 +7,7 @@ import { NON_DISCOVERABLE_DIRS, SRC_DIR, TEST_DIR } from "@vitest-agent/sdk";
7
7
  import { findWorkspaceRootSync, getWorkspacePackagesSync } from "@effected/workspaces";
8
8
  import { nodeSyncOps } from "@effected/workspaces/node-sync";
9
9
 
10
- //#region src/utils/discover-projects.ts
10
+ // src/utils/discover-projects.ts
11
11
  const DISCOVERY_LAST_SCAN_SYMBOL = Symbol.for("vitest-agent:discovery:last-scan-at");
12
12
  const warnedDeclinedPackagePaths = /* @__PURE__ */ new Set();
13
13
  async function warnIfDeclinedPackageIsTestShaped(pkg, fs) {
@@ -166,5 +166,4 @@ async function discoverProjects(options) {
166
166
  return result;
167
167
  }
168
168
 
169
- //#endregion
170
169
  export { discoverProjects };
@@ -7,7 +7,7 @@ import { NON_DISCOVERABLE_DIRS, SRC_DIR, TEST_DIR, TEST_FILE_GLOB_SUFFIX, TEST_H
7
7
  import { Option } from "effect";
8
8
  import { configDefaults } from "vitest/config";
9
9
 
10
- //#region src/utils/discover-strategy.ts
10
+ // src/utils/discover-strategy.ts
11
11
  const SETUP_EXTS = [
12
12
  "ts",
13
13
  "tsx",
@@ -153,5 +153,4 @@ var DefaultDiscoverStrategy = class extends DiscoverStrategy {
153
153
  }
154
154
  };
155
155
 
156
- //#endregion
157
156
  export { DefaultDiscoverStrategy, DiscoverStrategy };
@@ -1,4 +1,4 @@
1
- //#region src/utils/ensure-github-reporter.ts
1
+ // src/utils/ensure-github-reporter.ts
2
2
  /**
3
3
  * Ensure a Vitest `reporters` array contains a `github-actions` entry with
4
4
  * its markdown job summary disabled.
@@ -47,5 +47,4 @@ function ensureGithubActionsReporter(reporters) {
47
47
  return [...reporters, ["github-actions", { jobSummary: { enabled: false } }]];
48
48
  }
49
49
 
50
- //#endregion
51
50
  export { ensureGithubActionsReporter };
@@ -3,7 +3,7 @@ import { nodeWalkerFs } from "./walker-fs.js";
3
3
  import { join, relative } from "node:path";
4
4
  import { NON_DISCOVERABLE_DIRS } from "@vitest-agent/sdk";
5
5
 
6
- //#region src/utils/find-test-files.ts
6
+ // src/utils/find-test-files.ts
7
7
  function globToRegex(pattern) {
8
8
  const alts = expandBraces(pattern).map(toRegexFragment);
9
9
  return new RegExp(`^(?:${alts.join("|")})$`);
@@ -96,5 +96,4 @@ async function walkDir(root, dir, matchers, results, fs) {
96
96
  }
97
97
  }
98
98
 
99
- //#endregion
100
99
  export { findTestFiles };
@@ -1,6 +1,6 @@
1
1
  import MagicString from "magic-string";
2
2
 
3
- //#region src/utils/inject-tags.ts
3
+ // src/utils/inject-tags.ts
4
4
  function tagsLiteral(tags) {
5
5
  return `[${tags.map((t) => JSON.stringify(t)).join(", ")}]`;
6
6
  }
@@ -34,5 +34,4 @@ function injectTags(source, tags) {
34
34
  };
35
35
  }
36
36
 
37
- //#endregion
38
37
  export { injectTags };
@@ -1,4 +1,4 @@
1
- //#region src/utils/is-benign-vite-source-map-warning.ts
1
+ // src/utils/is-benign-vite-source-map-warning.ts
2
2
  /**
3
3
  * Matches the benign Vite core warning emitted when a dependency's shipped
4
4
  * `.js` file references a `.js.map` sibling that was never published in the
@@ -17,5 +17,4 @@ function isBenignViteSourceMapWarning(message) {
17
17
  return /Failed to load source map/.test(message) && /ENOENT:.*\.js\.map/.test(message);
18
18
  }
19
19
 
20
- //#endregion
21
20
  export { isBenignViteSourceMapWarning };
@@ -1,4 +1,4 @@
1
- //#region src/utils/is-partial-run.ts
1
+ // src/utils/is-partial-run.ts
2
2
  /**
3
3
  * Stable comparison key for a `configOverride.testNamePattern` value: `""`
4
4
  * for `undefined`, otherwise `RegExp#toString()` (`/source/flags`) — two
@@ -89,5 +89,4 @@ function isPartialRun(input) {
89
89
  return false;
90
90
  }
91
91
 
92
- //#endregion
93
92
  export { hasCliScopeFilter, hasTestNameFilter, isPartialRun };
@@ -3,7 +3,7 @@ import { findTestFiles } from "./find-test-files.js";
3
3
  import { join } from "node:path";
4
4
  import { BATS_FILE_GLOB_SUFFIX, SRC_DIR, TEST_DIR, TEST_FILE_GLOB_SUFFIX } from "@vitest-agent/sdk";
5
5
 
6
- //#region src/utils/is-test-shaped-package.ts
6
+ // src/utils/is-test-shaped-package.ts
7
7
  /**
8
8
  * True when `pkgPath` looks like it was meant to hold tests, yet neither a
9
9
  * discoverable Vitest test file nor a Bats test file was found anywhere
@@ -50,5 +50,4 @@ async function isTestShapedPackage(pkgPath, fs = nodeWalkerFs) {
50
50
  return (await fs.statEntry(join(pkgPath, TEST_DIR)))?.isDirectory === true;
51
51
  }
52
52
 
53
- //#endregion
54
53
  export { isTestShapedPackage };
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
2
2
  import { computeFailureSignature } from "@vitest-agent/engine";
3
3
  import { findFunctionBoundary } from "@vitest-agent/sdk";
4
4
 
5
- //#region src/utils/process-failure.ts
5
+ // src/utils/process-failure.ts
6
6
  const FRAME_LINE_REGEX = /^\s*at\s+(?:([\w$.<>[\] ]+?)\s+)?\(?([^\n)]+):(\d+):(\d+)\)?\s*$/;
7
7
  const isFrameworkPath = (filePath) => filePath.includes("/node_modules/") || filePath.includes("vitest/dist") || filePath.includes("@vitest/") || filePath.startsWith("node:");
8
8
  const parseFramesFromStackString = (stack) => {
@@ -93,5 +93,4 @@ const processFailure = (error, options) => {
93
93
  };
94
94
  };
95
95
 
96
- //#endregion
97
96
  export { processFailure };
@@ -1,6 +1,6 @@
1
1
  import { ConfigurationError } from "./configuration-error.js";
2
2
 
3
- //#region src/utils/report-writer.ts
3
+ // src/utils/report-writer.ts
4
4
  /**
5
5
  * Lazily-created writer over Vitest 5's `createReport` scope directory.
6
6
  *
@@ -79,5 +79,4 @@ const createReportWriter = (vitest, scope) => {
79
79
  };
80
80
  };
81
81
 
82
- //#endregion
83
82
  export { assertFlatScope, assertReportCapable, createReportWriter };
@@ -1,4 +1,4 @@
1
- //#region src/utils/resolve-coverage-dir-isolation.ts
1
+ // src/utils/resolve-coverage-dir-isolation.ts
2
2
  /**
3
3
  * Values of `VITEST_AGENT_COVERAGE_DIR_ISOLATION` that opt out of the
4
4
  * per-process coverage directory rewrite.
@@ -40,5 +40,4 @@ function resolveCoverageDirIsolation(input) {
40
40
  return { kind: "isolate" };
41
41
  }
42
42
 
43
- //#endregion
44
43
  export { resolveCoverageDirIsolation };
@@ -1,7 +1,7 @@
1
1
  import { TerminalEnv } from "@effected/env";
2
2
  import { Effect } from "effect";
3
3
 
4
- //#region src/utils/resolve-no-color.ts
4
+ // src/utils/resolve-no-color.ts
5
5
  /**
6
6
  * Whether the reporter should render without colour, decided by the kit's
7
7
  * terminal rule rather than `NO_COLOR` alone: `FORCE_COLOR` beats `NO_COLOR`,
@@ -9,5 +9,4 @@ import { Effect } from "effect";
9
9
  */
10
10
  const resolveNoColor = TerminalEnv.colorLevel("stdout").pipe(Effect.map((level) => level === "none"));
11
11
 
12
- //#endregion
13
12
  export { resolveNoColor };
@@ -1,4 +1,4 @@
1
- //#region src/utils/resolve-thresholds.ts
1
+ // src/utils/resolve-thresholds.ts
2
2
  const METRIC_KEYS = /* @__PURE__ */ new Set([
3
3
  "lines",
4
4
  "functions",
@@ -73,5 +73,4 @@ function resolveThresholds(input) {
73
73
  };
74
74
  }
75
75
 
76
- //#endregion
77
76
  export { resolveThresholds };
@@ -1,7 +1,7 @@
1
1
  import { appendFileSync, mkdirSync } from "node:fs";
2
2
  import { dirname } from "node:path";
3
3
 
4
- //#region src/utils/route-rendered-output.ts
4
+ // src/utils/route-rendered-output.ts
5
5
  /**
6
6
  * Route a {@link RenderedOutput} entry to its declared target.
7
7
  *
@@ -53,5 +53,4 @@ const routeRenderedOutput = (output, options) => {
53
53
  }
54
54
  };
55
55
 
56
- //#endregion
57
56
  export { routeRenderedOutput };
@@ -3,7 +3,7 @@ import { homedir } from "node:os";
3
3
  import { join } from "node:path";
4
4
  import { createHash, randomBytes } from "node:crypto";
5
5
 
6
- //#region src/utils/run-script-lock.ts
6
+ // src/utils/run-script-lock.ts
7
7
  /**
8
8
  * File-based advisory lock backing `AgentPlugin.runScript` (issue #191,
9
9
  * sub-item B). Two concurrent `vitest` invocations in one checkout used
@@ -264,5 +264,4 @@ function markRunScriptDone(lock) {
264
264
  } catch {}
265
265
  }
266
266
 
267
- //#endregion
268
267
  export { DEFAULT_BUILT_RECENTLY_MS, DEFAULT_LOCK_STALE_MS, DEFAULT_LOCK_WAIT_TIMEOUT_MS, acquireRunScriptLock, markRunScriptDone, parseLockTimingOverride, releaseRunScriptLock, resolveRunScriptLockDir };
@@ -2,7 +2,7 @@ import { STRAY_OUTPUT_SOURCE, isEscapeOnly, makeStrayOutputRecorder } from "@vit
2
2
  import { Writable } from "node:stream";
3
3
  import { StringDecoder } from "node:string_decoder";
4
4
 
5
- //#region src/utils/stray-output-capture.ts
5
+ // src/utils/stray-output-capture.ts
6
6
  /**
7
7
  * Stray-output capture: a pass-through over Vitest's `Logger.outputStream` /
8
8
  * `errorStream`.
@@ -173,5 +173,4 @@ const installStrayOutputCapture = (logger, terminal) => {
173
173
  return capture;
174
174
  };
175
175
 
176
- //#endregion
177
176
  export { MAX_HELD_CHARS, installStrayOutputCapture, strayOutputCaptureOf };
@@ -1,4 +1,4 @@
1
- //#region src/utils/stringify-failure-value.ts
1
+ // src/utils/stringify-failure-value.ts
2
2
  /**
3
3
  * Converts a raw Vitest assertion value (`.expected` / `.actual`) into a
4
4
  * one-line string suitable for display in the stream renderer.
@@ -36,5 +36,4 @@ const stringifyFailureValue = (value) => {
36
36
  }
37
37
  };
38
38
 
39
- //#endregion
40
39
  export { stringifyFailureValue };
@@ -1,4 +1,4 @@
1
- //#region src/utils/strip-console-reporters.ts
1
+ // src/utils/strip-console-reporters.ts
2
2
  /**
3
3
  * Built-in Vitest reporters that write to the console (stdout).
4
4
  * These are the reporters suppressed when an agent takes over console output.
@@ -45,5 +45,4 @@ function stripConsoleReporters(reporters) {
45
45
  });
46
46
  }
47
47
 
48
- //#endregion
49
48
  export { CONSOLE_REPORTERS, stripConsoleReporters };
@@ -1,4 +1,4 @@
1
- //#region src/utils/tag-cache-key.ts
1
+ // src/utils/tag-cache-key.ts
2
2
  /**
3
3
  * Cache-key material for Vitest 5's `fsModuleCache`.
4
4
  *
@@ -26,5 +26,4 @@ function makeTagCacheKeyGenerator(classify) {
26
26
  };
27
27
  }
28
28
 
29
- //#endregion
30
29
  export { makeTagCacheKeyGenerator, tagCacheKey };
package/utils/tag.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/utils/tag.ts
1
+ // src/utils/tag.ts
2
2
  const RESERVED = /* @__PURE__ */ new Set([
3
3
  "and",
4
4
  "or",
@@ -38,5 +38,4 @@ var Tag = class Tag {
38
38
  }
39
39
  };
40
40
 
41
- //#endregion
42
41
  export { Tag };
@@ -1,4 +1,4 @@
1
- //#region src/utils/to-posix-path.ts
1
+ // src/utils/to-posix-path.ts
2
2
  /**
3
3
  * Normalize a filesystem path to forward-slash separators.
4
4
  *
@@ -31,5 +31,4 @@ function toPosixPath(p) {
31
31
  return p.indexOf("\\") === -1 ? p : p.split("\\").join("/");
32
32
  }
33
33
 
34
- //#endregion
35
34
  export { toPosixPath };
@@ -1,4 +1,4 @@
1
- //#region src/utils/vitest-peer-version-mismatch-error.ts
1
+ // src/utils/vitest-peer-version-mismatch-error.ts
2
2
  /**
3
3
  * Builds the message `configureVitest` throws as a {@link ConfigurationError}
4
4
  * when the Vitest 5-only `ctx.defineCacheKeyGenerator` field is absent — the
@@ -36,5 +36,4 @@ function readVitestVersion(vitest) {
36
36
  return typeof version === "string" ? version : void 0;
37
37
  }
38
38
 
39
- //#endregion
40
39
  export { readVitestVersion, vitestPeerVersionMismatchMessage };
@@ -1,6 +1,6 @@
1
1
  import { readdir, stat } from "node:fs/promises";
2
2
 
3
- //#region src/utils/walker-fs.ts
3
+ // src/utils/walker-fs.ts
4
4
  /**
5
5
  * {@link WalkerFileSystem} over `node:fs/promises` — the binding every
6
6
  * production call site uses, and the default when a walker is called without
@@ -23,5 +23,4 @@ const nodeWalkerFs = {
23
23
  }
24
24
  };
25
25
 
26
- //#endregion
27
26
  export { nodeWalkerFs };
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/version.ts
1
+ // src/version.ts
2
2
  /**
3
3
  * The version of this package, inlined at build time from
4
4
  * `package.json#version` via the bundler's build-time `__PACKAGE_VERSION__` substitution.
@@ -8,7 +8,6 @@
8
8
  *
9
9
  * @public
10
10
  */
11
- const CURRENT_PLUGIN_VERSION = "5.4.7";
11
+ const CURRENT_PLUGIN_VERSION = "5.4.9";
12
12
 
13
- //#endregion
14
13
  export { CURRENT_PLUGIN_VERSION };