vitest 0.20.1 → 0.20.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.d.ts +5 -0
- package/dist/{chunk-vite-node-externalize.fce5b934.mjs → chunk-vite-node-externalize.45323563.mjs} +8 -7
- package/dist/cli.mjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/loader.mjs +2 -1
- package/dist/node.d.ts +5 -0
- package/dist/node.mjs +1 -1
- package/package.json +3 -3
package/dist/browser.d.ts
CHANGED
|
@@ -1136,6 +1136,11 @@ interface InlineConfig {
|
|
|
1136
1136
|
* @default false
|
|
1137
1137
|
*/
|
|
1138
1138
|
fallbackCJS?: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Use experimental Node loader to resolve imports inside node_modules using Vite resolve algorithm.
|
|
1141
|
+
* @default true
|
|
1142
|
+
*/
|
|
1143
|
+
registerNodeLoader?: boolean;
|
|
1139
1144
|
};
|
|
1140
1145
|
/**
|
|
1141
1146
|
* Base directory to scan for the test files
|
package/dist/{chunk-vite-node-externalize.fce5b934.mjs → chunk-vite-node-externalize.45323563.mjs}
RENAMED
|
@@ -26,7 +26,7 @@ import MagicString from './chunk-magic-string.efe26975.mjs';
|
|
|
26
26
|
import require$$0$2 from 'readline';
|
|
27
27
|
import { p as prompts } from './vendor-index.de788b6a.mjs';
|
|
28
28
|
|
|
29
|
-
var version$1 = "0.20.
|
|
29
|
+
var version$1 = "0.20.2";
|
|
30
30
|
|
|
31
31
|
class EndError extends Error {
|
|
32
32
|
constructor(value) {
|
|
@@ -7014,13 +7014,13 @@ function createPool(ctx) {
|
|
|
7014
7014
|
useAtomics: false,
|
|
7015
7015
|
maxThreads,
|
|
7016
7016
|
minThreads,
|
|
7017
|
-
execArgv: [
|
|
7017
|
+
execArgv: ctx.config.deps.registerNodeLoader ? [
|
|
7018
7018
|
"--require",
|
|
7019
7019
|
suppressLoaderWarningsPath,
|
|
7020
7020
|
"--experimental-loader",
|
|
7021
7021
|
loaderPath,
|
|
7022
7022
|
...conditions || []
|
|
7023
|
-
]
|
|
7023
|
+
] : []
|
|
7024
7024
|
};
|
|
7025
7025
|
if (ctx.config.isolate) {
|
|
7026
7026
|
options.isolateWorkers = true;
|
|
@@ -8530,7 +8530,7 @@ function resolveApiConfig(options) {
|
|
|
8530
8530
|
return api;
|
|
8531
8531
|
}
|
|
8532
8532
|
function resolveConfig(options, viteConfig) {
|
|
8533
|
-
var _a, _b, _c, _d;
|
|
8533
|
+
var _a, _b, _c, _d, _e;
|
|
8534
8534
|
if (options.dom) {
|
|
8535
8535
|
if (((_a = viteConfig.test) == null ? void 0 : _a.environment) != null && viteConfig.test.environment !== "happy-dom") {
|
|
8536
8536
|
console.warn(picocolors.exports.yellow(`${picocolors.exports.inverse(picocolors.exports.yellow(" Vitest "))} Your config.test.environment ("${viteConfig.test.environment}") conflicts with --dom flag ("happy-dom"), ignoring "${viteConfig.test.environment}"`));
|
|
@@ -8567,6 +8567,7 @@ function resolveConfig(options, viteConfig) {
|
|
|
8567
8567
|
resolved.deps.inline.push(...extraInlineDeps);
|
|
8568
8568
|
}
|
|
8569
8569
|
}
|
|
8570
|
+
(_c = resolved.deps).registerNodeLoader ?? (_c.registerNodeLoader = true);
|
|
8570
8571
|
resolved.testNamePattern = resolved.testNamePattern ? resolved.testNamePattern instanceof RegExp ? resolved.testNamePattern : new RegExp(resolved.testNamePattern) : void 0;
|
|
8571
8572
|
const CI = !!process.env.CI;
|
|
8572
8573
|
const UPDATE_SNAPSHOT = resolved.update || process.env.UPDATE_SNAPSHOT;
|
|
@@ -8595,11 +8596,11 @@ function resolveConfig(options, viteConfig) {
|
|
|
8595
8596
|
resolved.passWithNoTests ?? (resolved.passWithNoTests = true);
|
|
8596
8597
|
resolved.css ?? (resolved.css = {});
|
|
8597
8598
|
if (typeof resolved.css === "object")
|
|
8598
|
-
(
|
|
8599
|
+
(_d = resolved.css).include ?? (_d.include = [/\.module\./]);
|
|
8599
8600
|
resolved.cache ?? (resolved.cache = { dir: "" });
|
|
8600
8601
|
if (resolved.cache)
|
|
8601
8602
|
resolved.cache.dir = VitestCache.resolveCacheDir(resolved.root, resolved.cache.dir);
|
|
8602
|
-
if (!((
|
|
8603
|
+
if (!((_e = resolved.sequence) == null ? void 0 : _e.sequencer)) {
|
|
8603
8604
|
resolved.sequence ?? (resolved.sequence = {});
|
|
8604
8605
|
resolved.sequence.sequencer = resolved.sequence.shuffle ? RandomSequencer : BaseSequencer;
|
|
8605
8606
|
}
|
|
@@ -9092,7 +9093,7 @@ createLogUpdate(process$1.stdout);
|
|
|
9092
9093
|
|
|
9093
9094
|
createLogUpdate(process$1.stderr);
|
|
9094
9095
|
|
|
9095
|
-
var version = "0.20.
|
|
9096
|
+
var version = "0.20.2";
|
|
9096
9097
|
|
|
9097
9098
|
function fileFromParsedStack(stack) {
|
|
9098
9099
|
var _a, _b;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { p as picocolors } from './chunk-mock-date.9160e13b.mjs';
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.45323563.mjs';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
package/dist/index.d.ts
CHANGED
|
@@ -1136,6 +1136,11 @@ interface InlineConfig {
|
|
|
1136
1136
|
* @default false
|
|
1137
1137
|
*/
|
|
1138
1138
|
fallbackCJS?: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Use experimental Node loader to resolve imports inside node_modules using Vite resolve algorithm.
|
|
1141
|
+
* @default true
|
|
1142
|
+
*/
|
|
1143
|
+
registerNodeLoader?: boolean;
|
|
1139
1144
|
};
|
|
1140
1145
|
/**
|
|
1141
1146
|
* Base directory to scan for the test files
|
package/dist/loader.mjs
CHANGED
|
@@ -22,7 +22,8 @@ const resolve = async (url, context, next) => {
|
|
|
22
22
|
const resolved = await resolver(id, importer);
|
|
23
23
|
if (resolved) {
|
|
24
24
|
return {
|
|
25
|
-
url: pathToFileURL(resolved.id).toString()
|
|
25
|
+
url: pathToFileURL(resolved.id).toString(),
|
|
26
|
+
shortCircuit: true
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
}
|
package/dist/node.d.ts
CHANGED
|
@@ -903,6 +903,11 @@ interface InlineConfig {
|
|
|
903
903
|
* @default false
|
|
904
904
|
*/
|
|
905
905
|
fallbackCJS?: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* Use experimental Node loader to resolve imports inside node_modules using Vite resolve algorithm.
|
|
908
|
+
* @default true
|
|
909
|
+
*/
|
|
910
|
+
registerNodeLoader?: boolean;
|
|
906
911
|
};
|
|
907
912
|
/**
|
|
908
913
|
* Base directory to scan for the test files
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.45323563.mjs';
|
|
2
2
|
export { V as VitestRunner } from './chunk-runtime-mocker.0a8f7c5e.mjs';
|
|
3
3
|
import './chunk-mock-date.9160e13b.mjs';
|
|
4
4
|
import 'path';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@types/natural-compare": "^1.4.1",
|
|
111
111
|
"@types/prompts": "^2.4.0",
|
|
112
112
|
"@types/sinonjs__fake-timers": "^8.1.2",
|
|
113
|
-
"@vitest/ui": "0.20.
|
|
113
|
+
"@vitest/ui": "0.20.2",
|
|
114
114
|
"birpc": "^0.2.3",
|
|
115
115
|
"c8": "^7.11.3",
|
|
116
116
|
"cac": "^6.7.12",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"source-map-js": "^1.0.2",
|
|
139
139
|
"strip-ansi": "^7.0.1",
|
|
140
140
|
"typescript": "^4.7.4",
|
|
141
|
-
"vite-node": "0.20.
|
|
141
|
+
"vite-node": "0.20.2",
|
|
142
142
|
"ws": "^8.8.1"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|