@vitest-agent/cli 4.0.3 → 4.0.4

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.
@@ -1,4 +1,4 @@
1
- import { Cancelled, Fmt, NotInteractive } from "@effected/cli";
1
+ import { Fmt } from "@effected/cli";
2
2
  import { Schema } from "effect";
3
3
 
4
4
  //#region src/lib/render-failure.ts
@@ -15,9 +15,10 @@ const ISSUE_URL = "https://github.com/spencerbeggs/vitest-agent/issues";
15
15
  /**
16
16
  * Failures the kit renders better than one `<Tag>: <message>` line: its own
17
17
  * `Cancelled` / `NotInteractive` fixed lines, and a `SchemaError` as a tree of
18
- * the rejected values.
18
+ * the rejected values. The kit says which are its own (`isCancelled` /
19
+ * `isNotInteractive`), whichever channel they arrived through.
19
20
  */
20
- const isKitRendered = (error) => error instanceof Cancelled || error instanceof NotInteractive || Schema.isSchemaError(error);
21
+ const isKitRendered = (error, details) => details.isCancelled || details.isNotInteractive || Schema.isSchemaError(error);
21
22
  /** One line of text we did not write, made safe to print: controls stripped, line breaks folded to spaces. */
22
23
  const oneLine = (text) => Fmt.sanitize(text).replace(/\s*[\r\n]+\s*/g, " ").trim();
23
24
  /**
@@ -35,7 +36,9 @@ const oneLine = (text) => Fmt.sanitize(text).replace(/\s*[\r\n]+\s*/g, " ").trim
35
36
  * line (`vitest-agent: cancelled; nothing written`), a `SchemaError` is a
36
37
  * tree, and a defect is its message plus a `stack` of the program's own
37
38
  * frames (`node_modules`, Node, and Effect frames hidden and counted), then
38
- * the issue link.
39
+ * the issue link. A `Cancelled` or `NotInteractive` is never a bug, so it
40
+ * never gets the issue link, even when it arrives as a defect (a cancel from
41
+ * `CliPrompt.fallback`).
39
42
  *
40
43
  * `ShowHelp` and runWith-rendered `UserError`s never reach here (the kit skips
41
44
  * them).
@@ -43,7 +46,8 @@ const oneLine = (text) => Fmt.sanitize(text).replace(/\s*[\r\n]+\s*/g, " ").trim
43
46
  * @internal
44
47
  */
45
48
  const renderFailure = (error, details) => {
46
- if (!details.isDefect && !isKitRendered(error)) {
49
+ const kitRendered = isKitRendered(error, details);
50
+ if (!details.isDefect && !kitRendered) {
47
51
  const message = oneLine(error instanceof Error ? error.message : typeof error === "string" ? error : "");
48
52
  return [`vitest-agent: ${oneLine(failureName(error))}${message ? `: ${message}` : ""}`];
49
53
  }
@@ -51,7 +55,7 @@ const renderFailure = (error, details) => {
51
55
  return [
52
56
  `vitest-agent: ${first}`,
53
57
  ...rest,
54
- ...details.isDefect ? [`Please report at ${ISSUE_URL}`] : []
58
+ ...details.isDefect && !kitRendered ? [`Please report at ${ISSUE_URL}`] : []
55
59
  ];
56
60
  };
57
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/cli",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "private": false,
5
5
  "description": "On-demand CLI for vitest-agent. Reads cached test data and reports status, overview, coverage, history, trends, and cache health.",
6
6
  "keywords": [
@@ -43,19 +43,19 @@
43
43
  "vitest-agent": "bin/vitest-agent.js"
44
44
  },
45
45
  "dependencies": {
46
- "@effect/platform-node": "^4.0.0",
47
- "@effect/sql-sqlite-node": "^4.0.0",
48
- "@effected/cli": "^0.12.0",
46
+ "@effect/platform-node": "^4.0.2",
47
+ "@effect/sql-sqlite-node": "^4.0.2",
48
+ "@effected/cli": "^0.15.0",
49
49
  "@effected/config-file": "^0.14.2",
50
- "@effected/engine": "^0.3.0",
50
+ "@effected/engine": "^0.4.0",
51
51
  "@effected/env": "^0.1.0",
52
52
  "@effected/glob": "^0.10.0",
53
53
  "@effected/walker": "^0.15.0",
54
- "@effected/workspaces": "^0.31.0",
55
- "@vitest-agent/engine": "0.6.1",
56
- "@vitest-agent/sdk": "6.1.0",
57
- "@vitest-agent/sidecar": "2.2.6",
58
- "effect": "^4.0.0"
54
+ "@effected/workspaces": "^0.32.0",
55
+ "@vitest-agent/engine": "1.0.0",
56
+ "@vitest-agent/sdk": "7.0.0",
57
+ "@vitest-agent/sidecar": "2.2.7",
58
+ "effect": "^4.0.2"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=24.11.0"
package/version.js CHANGED
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @public
9
9
  */
10
- const CURRENT_CLI_VERSION = "4.0.3";
10
+ const CURRENT_CLI_VERSION = "4.0.4";
11
11
 
12
12
  //#endregion
13
13
  export { CURRENT_CLI_VERSION };