@flakiness/vitest 1.4.0 → 1.6.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/README.md CHANGED
@@ -96,6 +96,8 @@ npx flakiness show ./flakiness-report
96
96
 
97
97
  ## Features
98
98
 
99
+ See [features.md](./features.md) for this reporter's status against the [Flakiness Report spec](https://github.com/flakiness/flakiness-report/blob/main/features.md).
100
+
99
101
  ### Test Location Tracking
100
102
 
101
103
  When `includeTaskLocation: true` is set in your Vitest config, the reporter records the exact file, line, and column for each test. This enables precise navigation from the Flakiness.io dashboard back to your source code.
@@ -163,7 +165,7 @@ The reporter accepts the following options:
163
165
 
164
166
  ### `title?: string`
165
167
 
166
- Optional human-readable report title. Typically used to name a CI run, matrix shard, or other execution group. Defaults to the `FLAKINESS_TITLE` environment variable, or auto-detects from the CI environment.
168
+ Optional human-readable report title. Typically used to name a CI run, matrix shard, or other execution group. Defaults to the `FLAKINESS_TITLE` environment variable, or empty otherwise.
167
169
 
168
170
  ```typescript
169
171
  reporters: [
package/lib/reporter.js CHANGED
@@ -116,6 +116,7 @@ class ReporterImpl {
116
116
  const fkTest = {
117
117
  attempts: [],
118
118
  title: testCase.name,
119
+ tags: testCase.tags?.length ? [...testCase.tags] : void 0,
119
120
  location: testCase.location ? {
120
121
  file: this._worktree.gitPath(testCase.module.moduleId),
121
122
  column: testCase.location.column,
@@ -181,6 +182,7 @@ class ReporterImpl {
181
182
  expectedStatus,
182
183
  // TODO: ideally, we can differentiate STDIO between attempts.
183
184
  // However, vitest doesn't let us do so easily.
185
+ // See https://github.com/vitest-dev/vitest/issues/10303
184
186
  // We slice these arrays just to be safe: if someone downstream from us
185
187
  // decides to push a new annotation, then they can do it per-attempt safely.
186
188
  stdio: stdio.slice(),
@@ -196,6 +198,7 @@ class ReporterImpl {
196
198
  expectedStatus,
197
199
  // TODO: ideally, we can differentiate STDIO between attempts.
198
200
  // However, vitest doesn't let us do so easily.
201
+ // See https://github.com/vitest-dev/vitest/issues/10303
199
202
  stdio,
200
203
  errors,
201
204
  annotations
@@ -321,9 +324,8 @@ class ReporterImpl {
321
324
  }
322
325
  }
323
326
  const duration = Date.now() - this._startTimestamp;
324
- const title = this._options.title ?? process.env.FLAKINESS_TITLE ?? CIUtils.runTitle();
325
327
  const report = ReportUtils.normalizeReport({
326
- title,
328
+ title: this._options.title ?? process.env.FLAKINESS_TITLE,
327
329
  url: CIUtils.runUrl(),
328
330
  flakinessProject: this._options.flakinessProject,
329
331
  category: "vitest",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flakiness/vitest",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "",
5
5
  "main": "lib/reporter.js",
6
6
  "keywords": [],
@@ -12,18 +12,18 @@
12
12
  },
13
13
  "type": "module",
14
14
  "devDependencies": {
15
- "@flakiness/vitest": "1.2.0",
15
+ "@flakiness/vitest": "1.5.0",
16
16
  "@types/node": "^25.3.3",
17
17
  "@vitest/utils": "^4.0.18",
18
18
  "esbuild": "^0.27.3",
19
19
  "kubik": "^0.24.0",
20
20
  "tsx": "^4.21.0",
21
21
  "typescript": "^5.9.3",
22
- "vitest": "^4.0.18"
22
+ "vitest": "^4.1.5"
23
23
  },
24
24
  "dependencies": {
25
25
  "@flakiness/flakiness-report": "^0.29.0",
26
- "@flakiness/sdk": "^2.5.0"
26
+ "@flakiness/sdk": "^2.6.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "kubik build.mts",
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../src/reporter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAY,UAAU,EAAe,gBAAgB,EAAa,MAAM,EAAE,MAAM,aAAa,CAAC;AAC3H,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,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