@flakiness/vitest 1.9.0 → 1.9.1

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 (2) hide show
  1. package/lib/reporter.js +6 -3
  2. package/package.json +1 -1
package/lib/reporter.js CHANGED
@@ -16921,7 +16921,7 @@ import * as nodeUtil from "node:util";
16921
16921
  // package.json
16922
16922
  var package_default = {
16923
16923
  name: "@flakiness/vitest",
16924
- version: "1.9.0",
16924
+ version: "1.9.1",
16925
16925
  packageManager: "pnpm@11.5.0",
16926
16926
  description: "",
16927
16927
  main: "lib/reporter.js",
@@ -17147,9 +17147,12 @@ var ReporterImpl = class _ReporterImpl {
17147
17147
  stdio.push({
17148
17148
  text: entry.content,
17149
17149
  stream: entry.type === "stdout" ? FlakinessReport.STREAM_STDOUT : FlakinessReport.STREAM_STDERR,
17150
- dts: entry.time - ts
17150
+ // Older Vitest versions can report a stale timestamp when output
17151
+ // switches between stdout and stderr. Preserve the emitted order, but
17152
+ // never serialize an invalid negative DurationMS.
17153
+ dts: Math.max(0, entry.time - ts)
17151
17154
  });
17152
- ts = entry.time;
17155
+ ts = Math.max(ts, entry.time);
17153
17156
  }
17154
17157
  this._stdio.delete(testCase.id);
17155
17158
  const testFile = this._worktree.gitPath(testCase.module.moduleId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flakiness/vitest",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "",
5
5
  "main": "lib/reporter.js",
6
6
  "keywords": [],