vitest 0.28.1 → 0.28.2

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/browser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { startTests } from '@vitest/runner';
2
- export { s as setupCommonEnv } from './chunk-runtime-setup.d9302cfd.js';
2
+ export { s as setupCommonEnv } from './chunk-runtime-setup.28d2d580.js';
3
3
  export { s as setupSnapshotEnvironment } from './chunk-snapshot-env.6457638e.js';
4
4
  import '@vitest/utils';
5
5
  import './chunk-integrations-run-once.38756e30.js';
@@ -2,8 +2,8 @@ import require$$0 from 'fs';
2
2
  import k from 'path';
3
3
  import require$$0$1 from 'util';
4
4
  import require$$0$3 from 'child_process';
5
- import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.618ca5a1.js';
6
- import { o as onetime$1 } from './chunk-node-pkg.a7963c3f.js';
5
+ import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1 } from './vendor-index.91e19d50.js';
6
+ import { o as onetime$1 } from './chunk-node-pkg.e7e5686f.js';
7
7
  import require$$0$2 from 'os';
8
8
  import 'node:buffer';
9
9
  import 'node:path';
@@ -1,5 +1,5 @@
1
1
  import { g as globalApis } from './chunk-constants.797d3ebf.js';
2
- import { i as index } from './chunk-integrations-utils.f1f6f1ed.js';
2
+ import { i as index } from './chunk-integrations-utils.d6d30a11.js';
3
3
  import 'node:url';
4
4
  import 'pathe';
5
5
  import './chunk-utils-env.860d90c2.js';
@@ -1,5 +1,5 @@
1
1
  import { resolve } from 'pathe';
2
- import { e as execa } from './vendor-index.618ca5a1.js';
2
+ import { e as execa } from './vendor-index.91e19d50.js';
3
3
  import 'node:buffer';
4
4
  import 'node:path';
5
5
  import 'node:child_process';
@@ -21,7 +21,7 @@ import { ViteNodeRunner } from 'vite-node/client';
21
21
  import { ViteNodeServer } from 'vite-node/server';
22
22
  import { A as AggregateErrorPonyfill, c as relativePath, a as getCallLastIndex, d as removeUndefinedValues, e as isWindows } from './chunk-utils-global.442d1d33.js';
23
23
  import { writeFile, rm } from 'node:fs/promises';
24
- import { e as execa, s as signalExit } from './vendor-index.618ca5a1.js';
24
+ import { e as execa, s as signalExit } from './vendor-index.91e19d50.js';
25
25
  import { SourceMapConsumer } from 'source-map';
26
26
  import K, { createRequire } from 'module';
27
27
  import { parse } from 'acorn';
@@ -58,7 +58,7 @@ function _mergeNamespaces(n, m) {
58
58
  return Object.freeze(n);
59
59
  }
60
60
 
61
- var version$1 = "0.28.1";
61
+ var version$1 = "0.28.2";
62
62
 
63
63
  async function ensurePackageInstalled(dependency, root) {
64
64
  if (isPackageExists(dependency, { paths: [root] }))
@@ -76,7 +76,7 @@ async function ensurePackageInstalled(dependency, root) {
76
76
  message: c.reset(`Do you want to install ${c.green(dependency)}?`)
77
77
  });
78
78
  if (install) {
79
- await (await import('./chunk-install-pkg.e816b731.js')).installPackage(dependency, { dev: true });
79
+ await (await import('./chunk-install-pkg.b62df426.js')).installPackage(dependency, { dev: true });
80
80
  process.stderr.write(c.yellow(`
81
81
  Package ${dependency} installed, re-run the command to start.
82
82
  `));
@@ -4029,8 +4029,9 @@ ${BADGE}${TRIGGER} ${c.blue(`x${rerun}`)}
4029
4029
  if (!this.shouldLog(log))
4030
4030
  return;
4031
4031
  const task = log.taskId ? this.ctx.state.idMap.get(log.taskId) : void 0;
4032
- this.ctx.logger.log(c.gray(log.type + c.dim(` | ${task ? getFullName(task, c.dim(" > ")) : "unknown test"}`)));
4033
- process[log.type].write(`${log.content}
4032
+ const header = c.gray(log.type + c.dim(` | ${task ? getFullName(task, c.dim(" > ")) : "unknown test"}`));
4033
+ process[log.type].write(`${header}
4034
+ ${log.content}
4034
4035
  `);
4035
4036
  }
4036
4037
  shouldLog(log) {
@@ -7164,7 +7165,7 @@ createLogUpdate(process$1.stdout);
7164
7165
 
7165
7166
  createLogUpdate(process$1.stderr);
7166
7167
 
7167
- var version = "0.28.1";
7168
+ var version = "0.28.2";
7168
7169
 
7169
7170
  async function printError(error, ctx, options = {}) {
7170
7171
  const { showCodeFrame = true, fullStack = false, type } = options;
@@ -7667,7 +7668,7 @@ class Vitest {
7667
7668
  }
7668
7669
  async filterTestsBySource(tests) {
7669
7670
  if (this.config.changed && !this.config.related) {
7670
- const { VitestGit } = await import('./chunk-node-git.d9ad64ab.js');
7671
+ const { VitestGit } = await import('./chunk-node-git.6e0efefe.js');
7671
7672
  const vitestGit = new VitestGit(this.config.root);
7672
7673
  const related2 = await vitestGit.findChangedFiles({
7673
7674
  changedSince: this.config.changed
@@ -10,7 +10,7 @@ async function setupCommonEnv(config) {
10
10
  globalSetup = true;
11
11
  setSafeTimers();
12
12
  if (config.globals)
13
- (await import('./chunk-integrations-globals.0d5f50f0.js')).registerApiGlobally();
13
+ (await import('./chunk-integrations-globals.1a781ae7.js')).registerApiGlobally();
14
14
  }
15
15
  function setupDefines(defines) {
16
16
  for (const key in defines)
@@ -1,6 +1,6 @@
1
1
  import { fileURLToPath } from 'url';
2
2
  import c from 'picocolors';
3
- import { e as execa } from './vendor-index.618ca5a1.js';
3
+ import { e as execa } from './vendor-index.91e19d50.js';
4
4
  import { E as EXIT_CODE_RESTART } from './chunk-constants.797d3ebf.js';
5
5
  import 'node:buffer';
6
6
  import 'node:path';
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { normalize } from 'pathe';
2
2
  import cac from 'cac';
3
3
  import c from 'picocolors';
4
- import { v as version, s as startVitest, d as divider } from './chunk-node-pkg.a7963c3f.js';
4
+ import { v as version, s as startVitest, d as divider } from './chunk-node-pkg.e7e5686f.js';
5
5
  import './chunk-constants.797d3ebf.js';
6
6
  import 'node:url';
7
7
  import './chunk-utils-env.860d90c2.js';
@@ -27,7 +27,7 @@ import './chunk-utils-global.442d1d33.js';
27
27
  import '@vitest/runner/utils';
28
28
  import '@vitest/utils';
29
29
  import 'node:fs/promises';
30
- import './vendor-index.618ca5a1.js';
30
+ import './vendor-index.91e19d50.js';
31
31
  import 'node:buffer';
32
32
  import 'node:child_process';
33
33
  import 'child_process';
package/dist/entry.js CHANGED
@@ -8,10 +8,10 @@ import { createRequire } from 'node:module';
8
8
  import c from 'picocolors';
9
9
  import { installSourcemapsSupport } from 'vite-node/source-map';
10
10
  import { setColors, getSafeTimers } from '@vitest/utils';
11
- import { i as index } from './chunk-integrations-utils.f1f6f1ed.js';
11
+ import { i as index } from './chunk-integrations-utils.d6d30a11.js';
12
12
  import { s as setupSnapshotEnvironment } from './chunk-snapshot-env.6457638e.js';
13
13
  import { r as rpc } from './chunk-runtime-rpc.9c0386cc.js';
14
- import { s as setupCommonEnv } from './chunk-runtime-setup.d9302cfd.js';
14
+ import { s as setupCommonEnv } from './chunk-runtime-setup.28d2d580.js';
15
15
  import { V as VitestTestRunner, N as NodeBenchmarkRunner } from './runners-chunk.js';
16
16
  import 'local-pkg';
17
17
  import 'util';
@@ -99,12 +99,10 @@ async function setupConsoleLogSpy() {
99
99
  if (!buffer)
100
100
  return;
101
101
  const content = buffer.map((i) => String(i)).join("");
102
- if (!content.trim())
103
- return;
104
102
  const timer = timers.get(taskId);
105
103
  rpc().onUserConsoleLog({
106
104
  type: "stdout",
107
- content,
105
+ content: content || "<empty line>",
108
106
  taskId,
109
107
  time: timer.stdoutTime || RealDate.now(),
110
108
  size: buffer.length
@@ -117,12 +115,10 @@ async function setupConsoleLogSpy() {
117
115
  if (!buffer)
118
116
  return;
119
117
  const content = buffer.map((i) => String(i)).join("");
120
- if (!content.trim())
121
- return;
122
118
  const timer = timers.get(taskId);
123
119
  rpc().onUserConsoleLog({
124
120
  type: "stderr",
125
- content,
121
+ content: content || "<empty line>",
126
122
  taskId,
127
123
  time: timer.stderrTime || RealDate.now(),
128
124
  size: buffer.length
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
2
2
  export { b as bench, c as createExpect, g as expect, a as vi, v as vitest } from './chunk-utils-import.9911c99d.js';
3
3
  export { i as isFirstRun, r as runOnce } from './chunk-integrations-run-once.38756e30.js';
4
- import { d as dist } from './chunk-integrations-utils.f1f6f1ed.js';
5
- export { b as assertType, g as getRunningMode, a as isWatchMode } from './chunk-integrations-utils.f1f6f1ed.js';
4
+ import { d as dist } from './chunk-integrations-utils.d6d30a11.js';
5
+ export { b as assertType, g as getRunningMode, a as isWatchMode } from './chunk-integrations-utils.d6d30a11.js';
6
6
  import * as chai from 'chai';
7
7
  export { chai };
8
8
  export { assert, should } from 'chai';
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-node-pkg.a7963c3f.js';
1
+ export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-node-pkg.e7e5686f.js';
2
2
  export { V as VitestRunner } from './chunk-runtime-mocker.03017e8c.js';
3
3
  import 'pathe';
4
4
  import './chunk-constants.797d3ebf.js';
@@ -27,7 +27,7 @@ import './chunk-utils-global.442d1d33.js';
27
27
  import '@vitest/runner/utils';
28
28
  import '@vitest/utils';
29
29
  import 'node:fs/promises';
30
- import './vendor-index.618ca5a1.js';
30
+ import './vendor-index.91e19d50.js';
31
31
  import 'node:buffer';
32
32
  import 'node:child_process';
33
33
  import 'child_process';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "0.28.1",
4
+ "version": "0.28.2",
5
5
  "description": "A blazing fast unit test framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -128,11 +128,11 @@
128
128
  "tinyspy": "^1.0.2",
129
129
  "vite": "^3.0.0 || ^4.0.0",
130
130
  "why-is-node-running": "^2.2.2",
131
- "@vitest/expect": "0.28.1",
132
- "@vitest/runner": "0.28.1",
133
- "@vitest/spy": "0.28.1",
134
- "vite-node": "0.28.1",
135
- "@vitest/utils": "0.28.1"
131
+ "@vitest/runner": "0.28.2",
132
+ "@vitest/spy": "0.28.2",
133
+ "@vitest/expect": "0.28.2",
134
+ "@vitest/utils": "0.28.2",
135
+ "vite-node": "0.28.2"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@antfu/install-pkg": "^0.1.1",