vitest 0.12.4 → 0.12.5
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 +72 -0
- package/dist/{chunk-api-setup.ed61899f.js → chunk-api-setup.62de6413.js} +4 -4
- package/dist/{chunk-constants.0567483c.js → chunk-constants.153353ee.js} +1 -1
- package/dist/{chunk-defaults.ecb46baf.js → chunk-defaults.374342ed.js} +1 -1
- package/dist/{chunk-install-pkg.73b84ae1.js → chunk-install-pkg.eb979c48.js} +11 -9
- package/dist/chunk-integrations-globals.4fea033a.js +25 -0
- package/dist/{chunk-runtime-chain.f8567c17.js → chunk-runtime-chain.eb563278.js} +7 -7
- package/dist/{chunk-runtime-mocker.acd615bd.js → chunk-runtime-mocker.efd6b7ac.js} +3 -3
- package/dist/{chunk-runtime-rpc.63398738.js → chunk-runtime-rpc.ef131645.js} +1 -1
- package/dist/{chunk-utils-global.a5a8641f.js → chunk-utils-global.03413604.js} +29 -9
- package/dist/{chunk-utils-timers.f25e8f44.js → chunk-utils-timers.a0f0fe66.js} +1 -1
- package/dist/{chunk-vite-node-externalize.cfbecaaf.js → chunk-vite-node-externalize.8560ca65.js} +20 -18
- package/dist/{chunk-vite-node-utils.1536f168.js → chunk-vite-node-utils.1064f66b.js} +1067 -3
- package/dist/cli.js +7 -8
- package/dist/entry.js +6 -10
- package/dist/index.js +4 -5
- package/dist/node.js +10 -11
- package/dist/{vendor-entry.d50b0f20.js → vendor-entry.5b810598.js} +21 -13
- package/dist/{vendor-index.40be925a.js → vendor-index.4e550a2c.js} +5 -5
- package/dist/worker.js +5 -5
- package/package.json +3 -3
- package/dist/chunk-integrations-globals.f3e83abb.js +0 -29
- package/dist/vendor-_commonjsHelpers.addc3445.js +0 -3
package/LICENSE.md
CHANGED
|
@@ -427,6 +427,33 @@ Repository: git@github.com:moxystudio/node-cross-spawn.git
|
|
|
427
427
|
|
|
428
428
|
---------------------------------------
|
|
429
429
|
|
|
430
|
+
## debug
|
|
431
|
+
License: MIT
|
|
432
|
+
By: Josh Junon, TJ Holowaychuk, Nathan Rajlich, Andrew Rhyne
|
|
433
|
+
Repository: git://github.com/debug-js/debug.git
|
|
434
|
+
|
|
435
|
+
> (The MIT License)
|
|
436
|
+
>
|
|
437
|
+
> Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
|
438
|
+
> Copyright (c) 2018-2021 Josh Junon
|
|
439
|
+
>
|
|
440
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
441
|
+
> and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
|
442
|
+
> including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
443
|
+
> and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
444
|
+
> subject to the following conditions:
|
|
445
|
+
>
|
|
446
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
447
|
+
> portions of the Software.
|
|
448
|
+
>
|
|
449
|
+
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
450
|
+
> LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
451
|
+
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
452
|
+
> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
453
|
+
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
454
|
+
|
|
455
|
+
---------------------------------------
|
|
456
|
+
|
|
430
457
|
## diff
|
|
431
458
|
License: BSD-3-Clause
|
|
432
459
|
Repository: git://github.com/kpdecker/jsdiff.git
|
|
@@ -1267,6 +1294,34 @@ Repository: unjs/mlly
|
|
|
1267
1294
|
|
|
1268
1295
|
---------------------------------------
|
|
1269
1296
|
|
|
1297
|
+
## ms
|
|
1298
|
+
License: MIT
|
|
1299
|
+
Repository: zeit/ms
|
|
1300
|
+
|
|
1301
|
+
> The MIT License (MIT)
|
|
1302
|
+
>
|
|
1303
|
+
> Copyright (c) 2016 Zeit, Inc.
|
|
1304
|
+
>
|
|
1305
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1306
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
1307
|
+
> in the Software without restriction, including without limitation the rights
|
|
1308
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1309
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
1310
|
+
> furnished to do so, subject to the following conditions:
|
|
1311
|
+
>
|
|
1312
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
1313
|
+
> copies or substantial portions of the Software.
|
|
1314
|
+
>
|
|
1315
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1316
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1317
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1318
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1319
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1320
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1321
|
+
> SOFTWARE.
|
|
1322
|
+
|
|
1323
|
+
---------------------------------------
|
|
1324
|
+
|
|
1270
1325
|
## natural-compare
|
|
1271
1326
|
License: MIT
|
|
1272
1327
|
By: Lauri Rooden
|
|
@@ -1892,6 +1947,23 @@ Repository: sindresorhus/strip-final-newline
|
|
|
1892
1947
|
|
|
1893
1948
|
---------------------------------------
|
|
1894
1949
|
|
|
1950
|
+
## supports-color
|
|
1951
|
+
License: MIT
|
|
1952
|
+
By: Sindre Sorhus
|
|
1953
|
+
Repository: chalk/supports-color
|
|
1954
|
+
|
|
1955
|
+
> MIT License
|
|
1956
|
+
>
|
|
1957
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
1958
|
+
>
|
|
1959
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
1960
|
+
>
|
|
1961
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
1962
|
+
>
|
|
1963
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1964
|
+
|
|
1965
|
+
---------------------------------------
|
|
1966
|
+
|
|
1895
1967
|
## to-regex-range
|
|
1896
1968
|
License: MIT
|
|
1897
1969
|
By: Jon Schlinkert, Rouven Weßling
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import {
|
|
2
|
+
import { b as createBirpc } from './chunk-vite-node-utils.1064f66b.js';
|
|
3
3
|
import require$$0$1 from 'stream';
|
|
4
4
|
import require$$0 from 'zlib';
|
|
5
5
|
import require$$3 from 'net';
|
|
@@ -9,11 +9,11 @@ import require$$2 from 'events';
|
|
|
9
9
|
import require$$1 from 'https';
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
11
|
import url from 'url';
|
|
12
|
-
import { A as API_PATH } from './chunk-constants.
|
|
13
|
-
import { r as interpretSourcePos, b as parseStacktrace } from './chunk-utils-timers.
|
|
12
|
+
import { A as API_PATH } from './chunk-constants.153353ee.js';
|
|
13
|
+
import { r as interpretSourcePos, b as parseStacktrace } from './chunk-utils-timers.a0f0fe66.js';
|
|
14
14
|
import 'module';
|
|
15
15
|
import 'vm';
|
|
16
|
-
import './chunk-utils-global.
|
|
16
|
+
import './chunk-utils-global.03413604.js';
|
|
17
17
|
import 'tty';
|
|
18
18
|
import 'local-pkg';
|
|
19
19
|
import 'path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import {
|
|
2
|
+
import { k as resolve } from './chunk-utils-global.03413604.js';
|
|
3
3
|
|
|
4
4
|
const distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
|
|
5
5
|
const defaultPort = 51204;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, promises } from 'fs';
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { pathToFileURL } from 'url';
|
|
4
|
-
import { t as toArray,
|
|
4
|
+
import { t as toArray, k as resolve } from './chunk-utils-global.03413604.js';
|
|
5
5
|
|
|
6
6
|
const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
|
|
7
7
|
const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**"];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import path$2 from 'path';
|
|
2
2
|
import fs$2 from 'fs';
|
|
3
|
-
import require$$
|
|
3
|
+
import require$$1 from 'util';
|
|
4
4
|
import childProcess$1 from 'child_process';
|
|
5
|
-
import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1, o as onetime$1 } from './vendor-index.
|
|
6
|
-
import require$$0
|
|
7
|
-
import './
|
|
5
|
+
import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1, o as onetime$1 } from './vendor-index.4e550a2c.js';
|
|
6
|
+
import require$$0 from 'os';
|
|
7
|
+
import './chunk-utils-global.03413604.js';
|
|
8
|
+
import 'tty';
|
|
9
|
+
import 'local-pkg';
|
|
8
10
|
import 'assert';
|
|
9
11
|
import 'events';
|
|
10
12
|
import 'buffer';
|
|
@@ -206,7 +208,7 @@ var pLocate_1 = pLocate$1;
|
|
|
206
208
|
|
|
207
209
|
const path$1 = path$2;
|
|
208
210
|
const fs$1 = fs$2;
|
|
209
|
-
const {promisify: promisify$1} = require$$
|
|
211
|
+
const {promisify: promisify$1} = require$$1;
|
|
210
212
|
const pLocate = pLocate_1;
|
|
211
213
|
|
|
212
214
|
const fsStat = promisify$1(fs$1.stat);
|
|
@@ -275,7 +277,7 @@ locatePath.exports.sync = (paths, options) => {
|
|
|
275
277
|
var pathExists = {exports: {}};
|
|
276
278
|
|
|
277
279
|
const fs = fs$2;
|
|
278
|
-
const {promisify} = require$$
|
|
280
|
+
const {promisify} = require$$1;
|
|
279
281
|
|
|
280
282
|
const pAccess = promisify(fs.access);
|
|
281
283
|
|
|
@@ -758,7 +760,7 @@ standard:"posix"};
|
|
|
758
760
|
const SIGRTMIN=34;
|
|
759
761
|
const SIGRTMAX=64;realtime.SIGRTMAX=SIGRTMAX;
|
|
760
762
|
|
|
761
|
-
Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0
|
|
763
|
+
Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0;
|
|
762
764
|
|
|
763
765
|
var _core=core;
|
|
764
766
|
var _realtime$1=realtime;
|
|
@@ -793,7 +795,7 @@ const number=supported?constantSignal:defaultNumber;
|
|
|
793
795
|
return {name,number,description,supported,action,forced,standard};
|
|
794
796
|
};
|
|
795
797
|
|
|
796
|
-
Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0
|
|
798
|
+
Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0;
|
|
797
799
|
|
|
798
800
|
var _signals=signals;
|
|
799
801
|
var _realtime=realtime;
|
|
@@ -1006,7 +1008,7 @@ stdio.exports.node = options => {
|
|
|
1006
1008
|
return [...stdio, 'ipc'];
|
|
1007
1009
|
};
|
|
1008
1010
|
|
|
1009
|
-
const os = require$$0
|
|
1011
|
+
const os = require$$0;
|
|
1010
1012
|
const onExit = signalExit.exports;
|
|
1011
1013
|
|
|
1012
1014
|
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { g as globalApis } from './chunk-constants.153353ee.js';
|
|
2
|
+
import { i as index } from './vendor-entry.5b810598.js';
|
|
3
|
+
import 'url';
|
|
4
|
+
import './chunk-utils-global.03413604.js';
|
|
5
|
+
import 'tty';
|
|
6
|
+
import 'local-pkg';
|
|
7
|
+
import 'path';
|
|
8
|
+
import 'fs';
|
|
9
|
+
import './chunk-runtime-chain.eb563278.js';
|
|
10
|
+
import 'chai';
|
|
11
|
+
import './chunk-runtime-rpc.ef131645.js';
|
|
12
|
+
import './chunk-utils-timers.a0f0fe66.js';
|
|
13
|
+
import './chunk-integrations-spy.bee66426.js';
|
|
14
|
+
import 'tinyspy';
|
|
15
|
+
import 'util';
|
|
16
|
+
import './chunk-defaults.374342ed.js';
|
|
17
|
+
import 'module';
|
|
18
|
+
|
|
19
|
+
function registerApiGlobally() {
|
|
20
|
+
globalApis.forEach((api) => {
|
|
21
|
+
globalThis[api] = index[api];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { registerApiGlobally };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import chai$1, { expect as expect$1, util } from 'chai';
|
|
2
|
-
import { c as commonjsGlobal } from './
|
|
3
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
4
|
-
import { i as isObject, j as join, d as dirname, g as getCallLastIndex, s as slash, a as getWorkerState, b as getNames, c as assertTypes, p as picocolors, n as noop, t as toArray, r as resetModules } from './chunk-utils-global.a5a8641f.js';
|
|
2
|
+
import { c as commonjsGlobal, i as isObject, j as join, d as dirname, g as getCallLastIndex, s as slash, a as getWorkerState, b as getNames, e as assertTypes, p as picocolors, n as noop, t as toArray, r as resetModules } from './chunk-utils-global.03413604.js';
|
|
3
|
+
import { r as rpc } from './chunk-runtime-rpc.ef131645.js';
|
|
5
4
|
import fs, { promises } from 'fs';
|
|
6
|
-
import { p as plugins_1, f as format_1, g as getOriginalPos, a as posToNumber, n as numberToPos, l as lineSplitRE, b as parseStacktrace, u as unifiedDiff, s as stringify, m as matcherUtils, c as setTimeout, d as clearTimeout } from './chunk-utils-timers.
|
|
5
|
+
import { p as plugins_1, f as format_1, g as getOriginalPos, a as posToNumber, n as numberToPos, l as lineSplitRE, b as parseStacktrace, u as unifiedDiff, s as stringify, m as matcherUtils, c as setTimeout, d as clearTimeout } from './chunk-utils-timers.a0f0fe66.js';
|
|
7
6
|
import { i as isMockFunction, s as spyOn, f as fn, a as spies } from './chunk-integrations-spy.bee66426.js';
|
|
8
|
-
import require$$
|
|
7
|
+
import require$$1, { format } from 'util';
|
|
9
8
|
|
|
10
9
|
var __defProp$5 = Object.defineProperty;
|
|
11
10
|
var __defProps$2 = Object.defineProperties;
|
|
@@ -1804,11 +1803,12 @@ function withTimeout(fn, timeout = getDefaultTestTimeout(), isHook = false) {
|
|
|
1804
1803
|
return fn;
|
|
1805
1804
|
return (...args) => {
|
|
1806
1805
|
return Promise.race([fn(...args), new Promise((resolve, reject) => {
|
|
1806
|
+
var _a;
|
|
1807
1807
|
const timer = setTimeout(() => {
|
|
1808
1808
|
clearTimeout(timer);
|
|
1809
1809
|
reject(new Error(makeTimeoutMsg(isHook, timeout)));
|
|
1810
1810
|
}, timeout);
|
|
1811
|
-
timer.unref();
|
|
1811
|
+
(_a = timer.unref) == null ? void 0 : _a.call(timer);
|
|
1812
1812
|
})]);
|
|
1813
1813
|
};
|
|
1814
1814
|
}
|
|
@@ -2916,7 +2916,7 @@ function withGlobal(_global) {
|
|
|
2916
2916
|
hrtimePresent && typeof _global.process.hrtime.bigint === "function";
|
|
2917
2917
|
const nextTickPresent =
|
|
2918
2918
|
_global.process && typeof _global.process.nextTick === "function";
|
|
2919
|
-
const utilPromisify = _global.process && require$$
|
|
2919
|
+
const utilPromisify = _global.process && require$$1.promisify;
|
|
2920
2920
|
const performancePresent =
|
|
2921
2921
|
_global.performance && typeof _global.performance.now === "function";
|
|
2922
2922
|
const hasPerformancePrototype =
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as normalizeRequestId, i as isNodeBuiltin, t as toFilePath, V as ViteNodeRunner } from './chunk-vite-node-utils.
|
|
1
|
+
import { n as normalizeRequestId, i as isNodeBuiltin, t as toFilePath, V as ViteNodeRunner } from './chunk-vite-node-utils.1064f66b.js';
|
|
2
2
|
import { normalizePath } from 'vite';
|
|
3
|
-
import { a as getWorkerState,
|
|
3
|
+
import { a as getWorkerState, E as isWindows, F as mergeSlashes, d as dirname, h as basename, k as resolve, G as getType, H as getAllProperties, s as slash } from './chunk-utils-global.03413604.js';
|
|
4
4
|
import { existsSync, readdirSync } from 'fs';
|
|
5
|
-
import { d as distDir } from './chunk-constants.
|
|
5
|
+
import { d as distDir } from './chunk-constants.153353ee.js';
|
|
6
6
|
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -2,6 +2,12 @@ import require$$0 from 'tty';
|
|
|
2
2
|
import { isPackageExists } from 'local-pkg';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
|
+
|
|
7
|
+
function getDefaultExportFromCjs (x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
var picocolors = {exports: {}};
|
|
6
12
|
|
|
7
13
|
let tty = require$$0;
|
|
@@ -250,16 +256,22 @@ function getWorkerState() {
|
|
|
250
256
|
return globalThis.__vitest_worker__;
|
|
251
257
|
}
|
|
252
258
|
|
|
259
|
+
function isFinalObj(obj) {
|
|
260
|
+
return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
|
|
261
|
+
}
|
|
262
|
+
function collectOwnProperties(obj, collector) {
|
|
263
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
264
|
+
const symbs = Object.getOwnPropertySymbols(obj);
|
|
265
|
+
props.forEach((prop) => collector.add(prop));
|
|
266
|
+
symbs.forEach((symb) => collector.add(symb));
|
|
267
|
+
}
|
|
253
268
|
function getAllProperties(obj) {
|
|
254
269
|
const allProps = /* @__PURE__ */ new Set();
|
|
255
270
|
let curr = obj;
|
|
256
271
|
do {
|
|
257
|
-
if (curr
|
|
272
|
+
if (isFinalObj(curr))
|
|
258
273
|
break;
|
|
259
|
-
|
|
260
|
-
const symbs = Object.getOwnPropertySymbols(curr);
|
|
261
|
-
props.forEach((prop) => allProps.add(prop));
|
|
262
|
-
symbs.forEach((symb) => allProps.add(symb));
|
|
274
|
+
collectOwnProperties(curr, allProps);
|
|
263
275
|
} while (curr = Object.getPrototypeOf(curr));
|
|
264
276
|
return Array.from(allProps);
|
|
265
277
|
}
|
|
@@ -277,6 +289,13 @@ const noop = () => {
|
|
|
277
289
|
function getType(value) {
|
|
278
290
|
return Object.prototype.toString.apply(value).slice(8, -1);
|
|
279
291
|
}
|
|
292
|
+
function getOwnProperties(obj) {
|
|
293
|
+
const ownProps = /* @__PURE__ */ new Set();
|
|
294
|
+
if (isFinalObj(obj))
|
|
295
|
+
return [];
|
|
296
|
+
collectOwnProperties(obj, ownProps);
|
|
297
|
+
return Array.from(ownProps);
|
|
298
|
+
}
|
|
280
299
|
function clone(val) {
|
|
281
300
|
let k, out, tmp;
|
|
282
301
|
if (Array.isArray(val)) {
|
|
@@ -287,7 +306,7 @@ function clone(val) {
|
|
|
287
306
|
}
|
|
288
307
|
if (Object.prototype.toString.call(val) === "[object Object]") {
|
|
289
308
|
out = Object.create(Object.getPrototypeOf(val));
|
|
290
|
-
const props =
|
|
309
|
+
const props = getOwnProperties(val);
|
|
291
310
|
for (const k2 of props) {
|
|
292
311
|
out[k2] = (tmp = val[k2]) && typeof tmp === "object" ? clone(tmp) : tmp;
|
|
293
312
|
}
|
|
@@ -372,7 +391,8 @@ function getNames(task) {
|
|
|
372
391
|
return names;
|
|
373
392
|
}
|
|
374
393
|
|
|
375
|
-
const
|
|
394
|
+
const isNode = typeof process !== "undefined" && typeof process.stdout !== "undefined";
|
|
395
|
+
const isWindows = isNode && process.platform === "win32";
|
|
376
396
|
function partitionSuiteChildren(suite) {
|
|
377
397
|
let tasksGroup = [];
|
|
378
398
|
const tasksGroups = [];
|
|
@@ -419,7 +439,7 @@ async function ensurePackageInstalled(dependency, promptInstall = !process.env.C
|
|
|
419
439
|
message: picocolors.exports.reset(`Do you want to install ${picocolors.exports.green(dependency)}?`)
|
|
420
440
|
});
|
|
421
441
|
if (install) {
|
|
422
|
-
await (await import('./chunk-install-pkg.
|
|
442
|
+
await (await import('./chunk-install-pkg.eb979c48.js')).installPackage(dependency, { dev: true });
|
|
423
443
|
process.stderr.write(picocolors.exports.yellow(`
|
|
424
444
|
Package ${dependency} installed, re-run the command to start.
|
|
425
445
|
`));
|
|
@@ -457,4 +477,4 @@ function getCallLastIndex(code) {
|
|
|
457
477
|
return null;
|
|
458
478
|
}
|
|
459
479
|
|
|
460
|
-
export {
|
|
480
|
+
export { ensurePackageInstalled as A, stdout as B, extname as C, getDefaultExportFromCjs as D, isWindows as E, mergeSlashes as F, getType as G, getAllProperties as H, isNode as I, clone as J, partitionSuiteChildren as K, hasTests as L, getWorkerState as a, getNames as b, commonjsGlobal as c, dirname as d, assertTypes as e, notNullish as f, getCallLastIndex as g, basename as h, isObject as i, join as j, resolve as k, isAbsolute as l, relative as m, noop as n, getTests as o, picocolors as p, getFullName as q, resetModules as r, slash as s, toArray as t, hasFailed as u, hasFailedSnapshot as v, getSuites as w, normalize as x, deepMerge as y, toNamespacedPath as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as slash,
|
|
1
|
+
import { s as slash, f as notNullish, p as picocolors } from './chunk-utils-global.03413604.js';
|
|
2
2
|
|
|
3
3
|
const setTimeout$1 = globalThis.setTimeout;
|
|
4
4
|
const setInterval = globalThis.setInterval;
|
package/dist/{chunk-vite-node-externalize.cfbecaaf.js → chunk-vite-node-externalize.8560ca65.js}
RENAMED
|
@@ -2,28 +2,27 @@ import { Buffer } from 'buffer';
|
|
|
2
2
|
import path$a from 'path';
|
|
3
3
|
import childProcess from 'child_process';
|
|
4
4
|
import process$1 from 'process';
|
|
5
|
-
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn, o as onetime$1 } from './vendor-index.
|
|
5
|
+
import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn, o as onetime$1 } from './vendor-index.4e550a2c.js';
|
|
6
6
|
import url, { fileURLToPath, pathToFileURL } from 'url';
|
|
7
7
|
import require$$0, { constants as constants$5, cpus, hostname } from 'os';
|
|
8
|
-
import { j as join,
|
|
8
|
+
import { c as commonjsGlobal, j as join, h as basename, d as dirname, k as resolve, p as picocolors, s as slash$2, l as isAbsolute, m as relative, o as getTests, q as getFullName, u as hasFailed, v as hasFailedSnapshot, w as getSuites, t as toArray, x as normalize, n as noop$1, y as deepMerge, z as toNamespacedPath, g as getCallLastIndex, f as notNullish, A as ensurePackageInstalled, B as stdout } from './chunk-utils-global.03413604.js';
|
|
9
9
|
import { createServer, mergeConfig } from 'vite';
|
|
10
10
|
import fs$8, { promises, existsSync, readFileSync } from 'fs';
|
|
11
|
-
import { d as distDir, a as defaultPort, c as configFiles } from './chunk-constants.
|
|
11
|
+
import { d as distDir, a as defaultPort, c as configFiles } from './chunk-constants.153353ee.js';
|
|
12
12
|
import readline from 'readline';
|
|
13
|
-
import require$$
|
|
14
|
-
import require$$0$
|
|
13
|
+
import require$$1 from 'util';
|
|
14
|
+
import require$$0$1 from 'stream';
|
|
15
15
|
import require$$2 from 'events';
|
|
16
|
-
import { c as
|
|
17
|
-
import {
|
|
18
|
-
import { c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage } from './chunk-defaults.ecb46baf.js';
|
|
16
|
+
import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, c as createDebug, t as toFilePath, w as withInlineSourcemap, b as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-utils.1064f66b.js';
|
|
17
|
+
import { c as configDefaults, r as resolveC8Options, a as cleanCoverage, b as reportCoverage } from './chunk-defaults.374342ed.js';
|
|
19
18
|
import { MessageChannel } from 'worker_threads';
|
|
20
19
|
import { Tinypool } from 'tinypool';
|
|
21
20
|
import { performance } from 'perf_hooks';
|
|
22
|
-
import { e as stripAnsi, h as stringWidth, i as ansiStyles, j as sliceAnsi, k as setInterval, o as clearInterval, q as cliTruncate, c as setTimeout$1, b as parseStacktrace, r as interpretSourcePos, s as stringify$5, u as unifiedDiff, a as posToNumber, l as lineSplitRE, d as clearTimeout$1 } from './chunk-utils-timers.
|
|
21
|
+
import { e as stripAnsi, h as stringWidth, i as ansiStyles, j as sliceAnsi, k as setInterval, o as clearInterval, q as cliTruncate, c as setTimeout$1, b as parseStacktrace, r as interpretSourcePos, s as stringify$5, u as unifiedDiff, a as posToNumber, l as lineSplitRE, d as clearTimeout$1 } from './chunk-utils-timers.a0f0fe66.js';
|
|
23
22
|
import MagicString from './chunk-magic-string.d5e0e473.js';
|
|
24
23
|
import { p as prompts } from './vendor-index.405e58ef.js';
|
|
25
24
|
|
|
26
|
-
var version = "0.12.
|
|
25
|
+
var version = "0.12.5";
|
|
27
26
|
|
|
28
27
|
function stripFinalNewline(input) {
|
|
29
28
|
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
|
|
@@ -2128,7 +2127,7 @@ var toRegexRange_1 = toRegexRange$1;
|
|
|
2128
2127
|
* Licensed under the MIT License.
|
|
2129
2128
|
*/
|
|
2130
2129
|
|
|
2131
|
-
const util$1 = require$$
|
|
2130
|
+
const util$1 = require$$1;
|
|
2132
2131
|
const toRegexRange = toRegexRange_1;
|
|
2133
2132
|
|
|
2134
2133
|
const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
@@ -5165,7 +5164,7 @@ var picomatch_1 = picomatch$1;
|
|
|
5165
5164
|
module.exports = picomatch_1;
|
|
5166
5165
|
} (picomatch$2));
|
|
5167
5166
|
|
|
5168
|
-
const util = require$$
|
|
5167
|
+
const util = require$$1;
|
|
5169
5168
|
const braces = braces_1;
|
|
5170
5169
|
const picomatch = picomatch$2.exports;
|
|
5171
5170
|
const utils$b = utils$f;
|
|
@@ -5809,7 +5808,7 @@ var stream$4 = {};
|
|
|
5809
5808
|
* Copyright (c) 2014-2020 Teambition
|
|
5810
5809
|
* Licensed under the MIT license.
|
|
5811
5810
|
*/
|
|
5812
|
-
const Stream = require$$0$
|
|
5811
|
+
const Stream = require$$0$1;
|
|
5813
5812
|
const PassThrough = Stream.PassThrough;
|
|
5814
5813
|
const slice = Array.prototype.slice;
|
|
5815
5814
|
|
|
@@ -7093,7 +7092,7 @@ function callSuccessCallback(callback, entries) {
|
|
|
7093
7092
|
var stream$1 = {};
|
|
7094
7093
|
|
|
7095
7094
|
Object.defineProperty(stream$1, "__esModule", { value: true });
|
|
7096
|
-
const stream_1$5 = require$$0$
|
|
7095
|
+
const stream_1$5 = require$$0$1;
|
|
7097
7096
|
const async_1$2 = async$2;
|
|
7098
7097
|
class StreamProvider {
|
|
7099
7098
|
constructor(_root, _settings) {
|
|
@@ -7301,7 +7300,7 @@ class Reader {
|
|
|
7301
7300
|
reader.default = Reader;
|
|
7302
7301
|
|
|
7303
7302
|
Object.defineProperty(stream$2, "__esModule", { value: true });
|
|
7304
|
-
const stream_1$3 = require$$0$
|
|
7303
|
+
const stream_1$3 = require$$0$1;
|
|
7305
7304
|
const fsStat$1 = out$3;
|
|
7306
7305
|
const fsWalk$1 = out$2;
|
|
7307
7306
|
const reader_1$1 = reader;
|
|
@@ -7699,7 +7698,7 @@ async$6.default = ProviderAsync;
|
|
|
7699
7698
|
var stream = {};
|
|
7700
7699
|
|
|
7701
7700
|
Object.defineProperty(stream, "__esModule", { value: true });
|
|
7702
|
-
const stream_1$1 = require$$0$
|
|
7701
|
+
const stream_1$1 = require$$0$1;
|
|
7703
7702
|
const stream_2 = stream$2;
|
|
7704
7703
|
const provider_1$1 = provider;
|
|
7705
7704
|
class ProviderStream extends provider_1$1.default {
|
|
@@ -8030,6 +8029,7 @@ var __spreadValues$5 = (a, b) => {
|
|
|
8030
8029
|
return a;
|
|
8031
8030
|
};
|
|
8032
8031
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
8032
|
+
const debugRequest = createDebug("vite-node:server:request");
|
|
8033
8033
|
const RealDate = Date;
|
|
8034
8034
|
class ViteNodeServer {
|
|
8035
8035
|
constructor(server, options = {}) {
|
|
@@ -8098,6 +8098,7 @@ class ViteNodeServer {
|
|
|
8098
8098
|
return result;
|
|
8099
8099
|
}
|
|
8100
8100
|
async _transformRequest(id) {
|
|
8101
|
+
debugRequest(id);
|
|
8101
8102
|
let result = null;
|
|
8102
8103
|
if (this.getTransformMode(id) === "web") {
|
|
8103
8104
|
result = await this.server.transformRequest(id);
|
|
@@ -8647,6 +8648,7 @@ ${picocolors.exports.inverse(picocolors.exports.bold(picocolors.exports.blue(" R
|
|
|
8647
8648
|
}
|
|
8648
8649
|
await this.ctx.printError(error);
|
|
8649
8650
|
errorDivider();
|
|
8651
|
+
await Promise.resolve();
|
|
8650
8652
|
}
|
|
8651
8653
|
}
|
|
8652
8654
|
registerUnhandledRejection() {
|
|
@@ -10115,7 +10117,7 @@ function handleImportOutsideModuleError(stack, ctx) {
|
|
|
10115
10117
|
name = name.split("/").slice(0, 2).join("/");
|
|
10116
10118
|
else
|
|
10117
10119
|
name = name.split("/")[0];
|
|
10118
|
-
ctx.
|
|
10120
|
+
ctx.error(picocolors.exports.yellow(`Module ${path} seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package ${picocolors.exports.bold(`"${name}"`)} asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
|
|
10119
10121
|
|
|
10120
10122
|
As a temporary workaround you can try to inline the package by updating your config:
|
|
10121
10123
|
|
|
@@ -10947,7 +10949,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest()) {
|
|
|
10947
10949
|
await ctx.setServer(options, server);
|
|
10948
10950
|
haveStarted = true;
|
|
10949
10951
|
if (options.api && options.watch)
|
|
10950
|
-
(await import('./chunk-api-setup.
|
|
10952
|
+
(await import('./chunk-api-setup.62de6413.js')).setup(ctx);
|
|
10951
10953
|
if (!options.watch)
|
|
10952
10954
|
await server.watcher.close();
|
|
10953
10955
|
}
|