vitest 0.0.97 → 0.0.101
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/LICENSE.md +1835 -0
- package/dist/_commonjsHelpers-bdec4bbd.js +7 -0
- package/dist/cli.js +13 -22
- package/dist/{constants-9cfa4d7b.js → constants-a1417084.js} +2 -2
- package/dist/entry.js +111 -18
- package/dist/error-d97062cd.js +4737 -0
- package/dist/{global-473089f7.js → global-5b58e48f.js} +7 -4
- package/dist/{index-e7a421bb.js → index-0c3a317d.js} +2 -1
- package/dist/{index-ca1a0bda.js → index-37755855.js} +2628 -151
- package/dist/{index-5cc247ff.js → index-825cb54c.js} +2 -3
- package/dist/{index-368448f4.js → index-f580d714.js} +1 -1
- package/dist/index.d.ts +32 -111
- package/dist/index.js +6 -2
- package/dist/{middleware-bf0f818d.js → middleware-05e03d95.js} +5 -2
- package/dist/node.js +11 -10
- package/dist/suite-4f3fb0b5.js +201 -0
- package/dist/{utils-70b78878.js → utils-c8e62373.js} +187 -3
- package/dist/utils.js +2 -1
- package/dist/worker.js +6 -4
- package/package.json +13 -12
- package/{bin/vitest.mjs → vitest.mjs} +3 -4
- package/LICENSE +0 -22
- package/dist/error-7405ce56.js +0 -1416
- package/dist/suite-b8c6cb53.js +0 -236
package/dist/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { e as ensurePackageInstalled, g as getNames,
|
|
1
|
+
export { e as ensurePackageInstalled, g as getNames, f as getSuites, q as getTasks, a as getTests, j as hasFailed, o as hasTests, m as interpretOnlyMode, n as noop, k as notNullish, p as partitionSuiteChildren, h as resolvePath, s as slash, t as toArray } from './utils-c8e62373.js';
|
|
2
2
|
import 'local-pkg';
|
|
3
3
|
import 'tty';
|
|
4
|
+
import 'path';
|
package/dist/worker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { s as slash, h as resolve, d as dirname$2 } from './utils-c8e62373.js';
|
|
2
2
|
import { n as nanoid } from './index-9e71c815.js';
|
|
3
|
-
import { c as distDir } from './constants-
|
|
3
|
+
import { c as distDir } from './constants-a1417084.js';
|
|
4
4
|
import { builtinModules, createRequire } from 'module';
|
|
5
5
|
import { pathToFileURL, fileURLToPath as fileURLToPath$2, URL as URL$1 } from 'url';
|
|
6
6
|
import vm from 'vm';
|
|
7
|
+
import path from 'path';
|
|
7
8
|
import fs, { promises, realpathSync, statSync, Stats } from 'fs';
|
|
8
9
|
import assert from 'assert';
|
|
9
10
|
import { format as format$2, inspect } from 'util';
|
|
10
|
-
import { s as slash } from './utils-70b78878.js';
|
|
11
11
|
import { s as send } from './rpc-7de86f29.js';
|
|
12
12
|
import 'tty';
|
|
13
13
|
import 'local-pkg';
|
|
@@ -9314,7 +9314,7 @@ ${[...callstack, dep].reverse().map((p) => `- ${p}`).join("\n")}`);
|
|
|
9314
9314
|
var _a, _b;
|
|
9315
9315
|
const id = normalizeId(rawId);
|
|
9316
9316
|
if (externalCache.get(id))
|
|
9317
|
-
return interpretedImport(id, options.interpretDefault);
|
|
9317
|
+
return interpretedImport(patchWindowsImportPath(id), options.interpretDefault);
|
|
9318
9318
|
const fsPath = toFilePath(id, root);
|
|
9319
9319
|
const importPath = patchWindowsImportPath(fsPath);
|
|
9320
9320
|
if (!externalCache.has(importPath))
|
|
@@ -9379,6 +9379,8 @@ function matchExternalizePattern(id, patterns) {
|
|
|
9379
9379
|
function patchWindowsImportPath(path) {
|
|
9380
9380
|
if (path.match(/^\w:\\/))
|
|
9381
9381
|
return `file:///${slash(path)}`;
|
|
9382
|
+
else if (path.match(/^\w:\//))
|
|
9383
|
+
return `file:///${path}`;
|
|
9382
9384
|
else
|
|
9383
9385
|
return path;
|
|
9384
9386
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
4
4
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -25,34 +25,32 @@
|
|
|
25
25
|
"import": "./dist/index.js",
|
|
26
26
|
"types": "./dist/index.d.ts"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"import": "./dist/node.js",
|
|
30
|
-
"types": "./dist/node.d.ts"
|
|
31
|
-
},
|
|
28
|
+
"./*": "./*",
|
|
32
29
|
"./global": {
|
|
33
30
|
"types": "./global.d.ts"
|
|
34
31
|
},
|
|
35
|
-
"
|
|
32
|
+
"./node": {
|
|
33
|
+
"import": "./dist/node.js",
|
|
34
|
+
"types": "./dist/node.d.ts"
|
|
35
|
+
}
|
|
36
36
|
},
|
|
37
37
|
"main": "./dist/index.js",
|
|
38
38
|
"module": "./dist/index.js",
|
|
39
39
|
"types": "./dist/index.d.ts",
|
|
40
40
|
"bin": {
|
|
41
|
-
"vitest": "./
|
|
41
|
+
"vitest": "./vitest.mjs"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|
|
45
45
|
"bin",
|
|
46
|
-
"*.d.ts"
|
|
46
|
+
"*.d.ts",
|
|
47
|
+
"*.mjs"
|
|
47
48
|
],
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@types/chai": "^4.3.0",
|
|
50
51
|
"@types/chai-subset": "^1.3.3",
|
|
51
52
|
"chai": "^4.3.4",
|
|
52
|
-
"chai-subset": "^1.6.0",
|
|
53
|
-
"fast-glob": "^3.2.7",
|
|
54
53
|
"local-pkg": "^0.4.0",
|
|
55
|
-
"source-map": "^0.7.3",
|
|
56
54
|
"tinypool": "^0.0.3",
|
|
57
55
|
"tinyspy": "^0.1.2"
|
|
58
56
|
},
|
|
@@ -66,8 +64,10 @@
|
|
|
66
64
|
"@types/prompts": "^2.4.0",
|
|
67
65
|
"c8": "^7.10.0",
|
|
68
66
|
"cac": "^6.7.12",
|
|
67
|
+
"chai-subset": "^1.6.0",
|
|
69
68
|
"cli-truncate": "^3.1.0",
|
|
70
69
|
"diff": "^5.0.0",
|
|
70
|
+
"fast-glob": "^3.2.7",
|
|
71
71
|
"find-up": "^6.2.0",
|
|
72
72
|
"flatted": "^3.2.4",
|
|
73
73
|
"happy-dom": "^2.25.0",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"pretty-format": "^27.4.2",
|
|
84
84
|
"prompts": "^2.4.2",
|
|
85
85
|
"rollup": "^2.61.1",
|
|
86
|
+
"source-map-js": "^1.0.1",
|
|
86
87
|
"strip-ansi": "^7.0.1",
|
|
87
88
|
"typescript": "^4.5.4"
|
|
88
89
|
},
|
|
@@ -104,7 +105,7 @@
|
|
|
104
105
|
}
|
|
105
106
|
},
|
|
106
107
|
"engines": {
|
|
107
|
-
"node": ">=
|
|
108
|
+
"node": ">=14.14.0"
|
|
108
109
|
},
|
|
109
110
|
"scripts": {
|
|
110
111
|
"build": "rimraf dist && rollup -c",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { fileURLToPath } from 'url'
|
|
4
|
-
import {
|
|
5
|
-
import { ensurePackageInstalled } from '../dist/utils.js'
|
|
4
|
+
import { ensurePackageInstalled, resolvePath } from './dist/utils.js'
|
|
6
5
|
|
|
7
6
|
const argv = process.argv.slice(2)
|
|
8
7
|
|
|
@@ -13,10 +12,10 @@ if (argv.includes('--coverage')) {
|
|
|
13
12
|
if (!await ensurePackageInstalled('c8'))
|
|
14
13
|
process.exit(1)
|
|
15
14
|
const filename = fileURLToPath(import.meta.url)
|
|
16
|
-
const entry =
|
|
15
|
+
const entry = resolvePath(filename, '../../dist/cli.js')
|
|
17
16
|
process.argv.splice(2, 0, process.argv[0], entry)
|
|
18
17
|
await import('c8/bin/c8.js')
|
|
19
18
|
}
|
|
20
19
|
else {
|
|
21
|
-
await import('
|
|
20
|
+
await import('./dist/cli.js')
|
|
22
21
|
}
|
package/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021-Present Anthony Fu <https://github.com/antfu>
|
|
4
|
-
Copyright (c) 2021-Present Matias Capeletto <https://github.com/patak-dev>
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|