@kinora/vitest-reporter 0.3.0 → 0.4.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/dist/index.d.mts CHANGED
@@ -1,9 +1,6 @@
1
1
  import { AttachmentKind, CiMeta, GitMeta } from "@kinora/core";
2
2
  import { Reporter, TestModule, Vitest } from "vitest/node";
3
- //#region src/convert.d.ts
4
3
  type IncludeTests = 'browser' | 'all';
5
- //#endregion
6
- //#region src/index.d.ts
7
4
  export interface KinoraVitestReporterOptions {
8
5
  /** kinora server base URL. Defaults to env KINORA_URL, then the hosted cloud. Set for self-host. */
9
6
  url?: string;
@@ -41,5 +38,4 @@ export default class KinoraVitestReporter implements Reporter {
41
38
  onTestRunStart(): void;
42
39
  onTestRunEnd(modules: ReadonlyArray<TestModule>): Promise<void>;
43
40
  }
44
- //#endregion
45
41
  export {};
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import process from "node:process";
3
- import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, MAX_A11Y_NODES, MAX_A11Y_VIOLATIONS, STORY_ANNOTATION, axeViolations, createIngestClient, detectCiEnv, isUploadableAttachment, makeTestKey, resolveShardGroup, stripAnsi } from "@kinora/core";
4
- //#region src/convert.ts
3
+ import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, MAX_A11Y_NODES, MAX_A11Y_VIOLATIONS, STORY_ANNOTATION, axeViolations, createIngestClient, describeRetry, detectCiEnv, isUploadableAttachment, makeTestKey, resolveShardGroup, stripAnsi } from "@kinora/core";
4
+ // src/convert.ts
5
5
  function identity(test) {
6
6
  const file = test.module.relativeModuleId;
7
7
  const suites = [];
@@ -163,8 +163,7 @@ function toNormTests(modules, include = "browser") {
163
163
  skippedNodeTests
164
164
  };
165
165
  }
166
- //#endregion
167
- //#region src/index.ts
166
+ // src/index.ts
168
167
  function countsOf(tests) {
169
168
  const counts = {
170
169
  total: tests.length,
@@ -234,7 +233,8 @@ var KinoraVitestReporter = class {
234
233
  try {
235
234
  const client = createIngestClient({
236
235
  baseUrl: url,
237
- token
236
+ token,
237
+ onRetry: (info) => console.warn(`[kinora] ${describeRetry(info)}`)
238
238
  });
239
239
  const res = await client.uploadRun(payload);
240
240
  const kinds = this.options.uploadAttachments ?? DEFAULT_UPLOAD_ATTACHMENTS;
@@ -261,5 +261,4 @@ var KinoraVitestReporter = class {
261
261
  }
262
262
  }
263
263
  };
264
- //#endregion
265
264
  export { KinoraVitestReporter as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kinora/vitest-reporter",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "Vitest reporter that uploads browser-mode and Storybook test results to a kinora server",
6
6
  "author": "Joris Gallot",
7
7
  "license": "MIT",
@@ -37,12 +37,12 @@
37
37
  "vitest": ">=4.1.12"
38
38
  },
39
39
  "dependencies": {
40
- "@kinora/core": "0.13.0"
40
+ "@kinora/core": "0.14.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26.6.5",
44
44
  "@vitest/coverage-v8": "^5.0.5",
45
- "tsdown": "^0.23.1",
45
+ "tsdown": "^0.23.2",
46
46
  "typescript": "~6.0.3",
47
47
  "vitest": "^5.0.5"
48
48
  },