vitest 0.12.8 → 0.13.0
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/{chunk-api-setup.9ccd19b5.js → chunk-api-setup.554e8dcb.js} +107 -51
- package/dist/{chunk-constants.3570739f.js → chunk-constants.d60bb984.js} +1 -1
- package/dist/{chunk-defaults.7d81a6ca.js → chunk-defaults.c11f632f.js} +1 -1
- package/dist/{chunk-install-pkg.fd8d1022.js → chunk-install-pkg.8a034cf6.js} +1 -1
- package/dist/{chunk-integrations-globals.23cc66c3.js → chunk-integrations-globals.f7036c09.js} +7 -7
- package/dist/{chunk-runtime-chain.5021a6b6.js → chunk-runtime-chain.db87de48.js} +21 -10
- package/dist/{chunk-runtime-mocker.d26f8110.js → chunk-runtime-mocker.8436db18.js} +3 -3
- package/dist/chunk-runtime-rpc.6e6614a9.js +15 -0
- package/dist/{chunk-utils-global.2fab7e5c.js → chunk-utils-global.b9f8edf8.js} +34 -2
- package/dist/{chunk-utils-timers.da6ac0a6.js → chunk-utils-source-map.ded50c88.js} +14 -11
- package/dist/{chunk-vite-node-externalize.fc385bba.js → chunk-vite-node-externalize.0094db73.js} +8740 -8741
- package/dist/{chunk-vite-node-utils.46e2a803.js → chunk-vite-node-utils.6856b365.js} +1 -1
- package/dist/cli.js +16 -16
- package/dist/entry.js +6 -6
- package/dist/index.d.ts +61 -10
- package/dist/index.js +4 -4
- package/dist/node.d.ts +56 -0
- package/dist/node.js +20 -20
- package/dist/{vendor-entry.ca05c118.js → vendor-entry.6072d652.js} +11 -11
- package/dist/{vendor-index.6c69a0a8.js → vendor-index.42fcc02c.js} +407 -407
- package/dist/worker.js +5 -5
- package/package.json +37 -37
- package/dist/chunk-runtime-rpc.47bae3f9.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { builtinModules, createRequire } from 'module';
|
|
2
2
|
import { pathToFileURL, fileURLToPath as fileURLToPath$2, URL as URL$1 } from 'url';
|
|
3
3
|
import vm from 'vm';
|
|
4
|
-
import {
|
|
4
|
+
import { m as isAbsolute$2, l as resolve, j as join$2, I as extname$2, d as dirname$2 } from './chunk-utils-global.b9f8edf8.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import fs, { realpathSync, statSync, Stats, promises, existsSync } from 'fs';
|
|
7
7
|
import assert from 'assert';
|
package/dist/cli.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { p as picocolors } from './chunk-utils-global.
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
2
|
+
import { p as picocolors } from './chunk-utils-global.b9f8edf8.js';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.0094db73.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'local-pkg';
|
|
6
6
|
import 'path';
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
7
|
+
import 'vite';
|
|
8
|
+
import 'url';
|
|
9
9
|
import 'process';
|
|
10
|
-
import './vendor-index.6c69a0a8.js';
|
|
11
|
-
import './vendor-_commonjsHelpers.addc3445.js';
|
|
12
10
|
import 'fs';
|
|
13
|
-
import '
|
|
14
|
-
import 'stream';
|
|
15
|
-
import 'util';
|
|
16
|
-
import 'url';
|
|
17
|
-
import 'os';
|
|
18
|
-
import 'vite';
|
|
19
|
-
import './chunk-constants.3570739f.js';
|
|
11
|
+
import './chunk-constants.d60bb984.js';
|
|
20
12
|
import 'readline';
|
|
21
|
-
import '
|
|
13
|
+
import 'os';
|
|
14
|
+
import 'util';
|
|
15
|
+
import 'stream';
|
|
16
|
+
import './vendor-_commonjsHelpers.addc3445.js';
|
|
17
|
+
import './chunk-vite-node-utils.6856b365.js';
|
|
22
18
|
import 'module';
|
|
23
19
|
import 'vm';
|
|
20
|
+
import 'assert';
|
|
24
21
|
import 'debug';
|
|
25
|
-
import './chunk-defaults.
|
|
22
|
+
import './chunk-defaults.c11f632f.js';
|
|
26
23
|
import 'worker_threads';
|
|
27
24
|
import 'tinypool';
|
|
28
25
|
import 'perf_hooks';
|
|
29
|
-
import './chunk-utils-
|
|
26
|
+
import './chunk-utils-source-map.ded50c88.js';
|
|
27
|
+
import './vendor-index.42fcc02c.js';
|
|
28
|
+
import 'child_process';
|
|
29
|
+
import 'buffer';
|
|
30
30
|
import './chunk-magic-string.41232190.js';
|
|
31
31
|
import './vendor-index.405e58ef.js';
|
|
32
32
|
|
package/dist/entry.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { r as run } from './vendor-entry.
|
|
1
|
+
export { r as run } from './vendor-entry.6072d652.js';
|
|
2
2
|
import 'fs';
|
|
3
|
-
import './chunk-utils-global.
|
|
3
|
+
import './chunk-utils-global.b9f8edf8.js';
|
|
4
4
|
import 'tty';
|
|
5
5
|
import 'local-pkg';
|
|
6
6
|
import 'path';
|
|
7
|
-
import './chunk-runtime-chain.
|
|
7
|
+
import './chunk-runtime-chain.db87de48.js';
|
|
8
8
|
import 'chai';
|
|
9
9
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
10
|
-
import './chunk-runtime-rpc.
|
|
11
|
-
import './chunk-utils-
|
|
10
|
+
import './chunk-runtime-rpc.6e6614a9.js';
|
|
11
|
+
import './chunk-utils-source-map.ded50c88.js';
|
|
12
12
|
import './chunk-integrations-spy.bee66426.js';
|
|
13
13
|
import 'tinyspy';
|
|
14
14
|
import 'util';
|
|
15
|
-
import './chunk-defaults.
|
|
15
|
+
import './chunk-defaults.c11f632f.js';
|
|
16
16
|
import 'module';
|
|
17
17
|
import 'url';
|
package/dist/index.d.ts
CHANGED
|
@@ -1265,6 +1265,53 @@ declare namespace jestMatcherUtils {
|
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
1268
|
+
/**
|
|
1269
|
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
1270
|
+
*
|
|
1271
|
+
* This source code is licensed under the MIT license found in the
|
|
1272
|
+
* LICENSE file in the root directory of this source tree.
|
|
1273
|
+
*/
|
|
1274
|
+
|
|
1275
|
+
interface SnapshotReturnOptions {
|
|
1276
|
+
actual: string;
|
|
1277
|
+
count: number;
|
|
1278
|
+
expected?: string;
|
|
1279
|
+
key: string;
|
|
1280
|
+
pass: boolean;
|
|
1281
|
+
}
|
|
1282
|
+
interface SaveStatus {
|
|
1283
|
+
deleted: boolean;
|
|
1284
|
+
saved: boolean;
|
|
1285
|
+
}
|
|
1286
|
+
declare class SnapshotState {
|
|
1287
|
+
testFilePath: string;
|
|
1288
|
+
snapshotPath: string;
|
|
1289
|
+
private _counters;
|
|
1290
|
+
private _dirty;
|
|
1291
|
+
private _updateSnapshot;
|
|
1292
|
+
private _snapshotData;
|
|
1293
|
+
private _initialData;
|
|
1294
|
+
private _inlineSnapshots;
|
|
1295
|
+
private _uncheckedKeys;
|
|
1296
|
+
private _snapshotFormat;
|
|
1297
|
+
added: number;
|
|
1298
|
+
expand: boolean;
|
|
1299
|
+
matched: number;
|
|
1300
|
+
unmatched: number;
|
|
1301
|
+
updated: number;
|
|
1302
|
+
constructor(testFilePath: string, snapshotPath: string, options: SnapshotStateOptions);
|
|
1303
|
+
markSnapshotsAsCheckedForTest(testName: string): void;
|
|
1304
|
+
private _getInlineSnapshotStack;
|
|
1305
|
+
private _addSnapshot;
|
|
1306
|
+
clear(): void;
|
|
1307
|
+
save(): Promise<SaveStatus>;
|
|
1308
|
+
getUncheckedCount(): number;
|
|
1309
|
+
getUncheckedKeys(): Array<string>;
|
|
1310
|
+
removeUncheckedKeys(): void;
|
|
1311
|
+
match({ testName, received, key, inlineSnapshot, isInline, error, }: SnapshotMatchOptions): SnapshotReturnOptions;
|
|
1312
|
+
pack(): Promise<SnapshotResult>;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1268
1315
|
declare type Tester = (a: any, b: any) => boolean | undefined;
|
|
1269
1316
|
interface MatcherState {
|
|
1270
1317
|
assertionCalls: number;
|
|
@@ -1279,6 +1326,7 @@ interface MatcherState {
|
|
|
1279
1326
|
isExpectingAssertionsError?: Error | null;
|
|
1280
1327
|
isNot: boolean;
|
|
1281
1328
|
promise: string;
|
|
1329
|
+
snapshotState: SnapshotState;
|
|
1282
1330
|
suppressedErrors: Array<Error>;
|
|
1283
1331
|
testPath?: string;
|
|
1284
1332
|
utils: typeof jestMatcherUtils & {
|
|
@@ -1400,16 +1448,13 @@ declare global {
|
|
|
1400
1448
|
|
|
1401
1449
|
declare type ArgumentsType<T> = T extends (...args: infer A) => any ? A : never;
|
|
1402
1450
|
declare type ReturnType$1<T> = T extends (...args: any) => infer R ? R : never;
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
* Call the remote function and wait for the result.
|
|
1406
|
-
*/
|
|
1407
|
-
(...args: ArgumentsType<T>): Promise<Awaited<ReturnType$1<T>>>;
|
|
1451
|
+
declare type PromisifyFn<T> = ReturnType$1<T> extends Promise<any> ? T : (...args: ArgumentsType<T>) => Promise<Awaited<ReturnType$1<T>>>;
|
|
1452
|
+
declare type BirpcFn<T> = PromisifyFn<T> & {
|
|
1408
1453
|
/**
|
|
1409
1454
|
* Send event without asking for response
|
|
1410
1455
|
*/
|
|
1411
1456
|
asEvent(...args: ArgumentsType<T>): void;
|
|
1412
|
-
}
|
|
1457
|
+
};
|
|
1413
1458
|
declare type BirpcReturn<RemoteFunctions> = {
|
|
1414
1459
|
[K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]>;
|
|
1415
1460
|
};
|
|
@@ -1530,10 +1575,10 @@ declare const test: TestAPI<{}>;
|
|
|
1530
1575
|
declare const describe: SuiteAPI<{}>;
|
|
1531
1576
|
declare const it: TestAPI<{}>;
|
|
1532
1577
|
|
|
1533
|
-
declare const beforeAll: (fn: SuiteHooks['beforeAll'][0], timeout?: number
|
|
1534
|
-
declare const afterAll: (fn: SuiteHooks['afterAll'][0], timeout?: number
|
|
1535
|
-
declare const beforeEach: (fn: SuiteHooks['beforeEach'][0], timeout?: number
|
|
1536
|
-
declare const afterEach: (fn: SuiteHooks['afterEach'][0], timeout?: number
|
|
1578
|
+
declare const beforeAll: (fn: SuiteHooks['beforeAll'][0], timeout?: number) => void;
|
|
1579
|
+
declare const afterAll: (fn: SuiteHooks['afterAll'][0], timeout?: number) => void;
|
|
1580
|
+
declare const beforeEach: (fn: SuiteHooks['beforeEach'][0], timeout?: number) => void;
|
|
1581
|
+
declare const afterEach: (fn: SuiteHooks['afterEach'][0], timeout?: number) => void;
|
|
1537
1582
|
|
|
1538
1583
|
/**
|
|
1539
1584
|
* A simple wrapper for converting callback style to promise
|
|
@@ -1651,6 +1696,12 @@ declare class VitestUtils {
|
|
|
1651
1696
|
*/
|
|
1652
1697
|
stubGlobal(name: string | symbol | number, value: any): this;
|
|
1653
1698
|
resetModules(): this;
|
|
1699
|
+
/**
|
|
1700
|
+
* Wait for all imports to load.
|
|
1701
|
+
* Useful, if you have a synchronous call that starts
|
|
1702
|
+
* importing a module, that you cannot wait otherwise.
|
|
1703
|
+
*/
|
|
1704
|
+
dynamicImportSettled(): Promise<void>;
|
|
1654
1705
|
}
|
|
1655
1706
|
declare const vitest: VitestUtils;
|
|
1656
1707
|
declare const vi: VitestUtils;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { c as afterAll, f as afterEach, b as beforeAll, e as beforeEach, g as createExpect, d as describe, h as expect, k as getRunningMode, a as isFirstRun, l as isWatchMode, i as it, r as runOnce, s as suite, t as test, j as vi, v as vitest, w as withCallback } from './chunk-runtime-chain.
|
|
1
|
+
export { c as afterAll, f as afterEach, b as beforeAll, e as beforeEach, g as createExpect, d as describe, h as expect, k as getRunningMode, a as isFirstRun, l as isWatchMode, i as it, r as runOnce, s as suite, t as test, j as vi, v as vitest, w as withCallback } from './chunk-runtime-chain.db87de48.js';
|
|
2
2
|
export { assert, default as chai, should } from 'chai';
|
|
3
3
|
import './vendor-_commonjsHelpers.addc3445.js';
|
|
4
|
-
import './chunk-runtime-rpc.
|
|
5
|
-
import './chunk-utils-global.
|
|
4
|
+
import './chunk-runtime-rpc.6e6614a9.js';
|
|
5
|
+
import './chunk-utils-global.b9f8edf8.js';
|
|
6
6
|
import 'tty';
|
|
7
7
|
import 'local-pkg';
|
|
8
8
|
import 'path';
|
|
9
9
|
import 'fs';
|
|
10
|
-
import './chunk-utils-
|
|
10
|
+
import './chunk-utils-source-map.ded50c88.js';
|
|
11
11
|
import './chunk-integrations-spy.bee66426.js';
|
|
12
12
|
import 'tinyspy';
|
|
13
13
|
import 'util';
|
package/dist/node.d.ts
CHANGED
|
@@ -646,6 +646,14 @@ interface SnapshotStateOptions {
|
|
|
646
646
|
snapshotFormat?: OptionsReceived;
|
|
647
647
|
resolveSnapshotPath?: (path: string, extension: string) => string;
|
|
648
648
|
}
|
|
649
|
+
interface SnapshotMatchOptions {
|
|
650
|
+
testName: string;
|
|
651
|
+
received: unknown;
|
|
652
|
+
key?: string;
|
|
653
|
+
inlineSnapshot?: string;
|
|
654
|
+
isInline: boolean;
|
|
655
|
+
error?: Error;
|
|
656
|
+
}
|
|
649
657
|
interface SnapshotResult {
|
|
650
658
|
filepath: string;
|
|
651
659
|
added: number;
|
|
@@ -1076,6 +1084,53 @@ declare namespace jestMatcherUtils {
|
|
|
1076
1084
|
};
|
|
1077
1085
|
}
|
|
1078
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
1089
|
+
*
|
|
1090
|
+
* This source code is licensed under the MIT license found in the
|
|
1091
|
+
* LICENSE file in the root directory of this source tree.
|
|
1092
|
+
*/
|
|
1093
|
+
|
|
1094
|
+
interface SnapshotReturnOptions {
|
|
1095
|
+
actual: string;
|
|
1096
|
+
count: number;
|
|
1097
|
+
expected?: string;
|
|
1098
|
+
key: string;
|
|
1099
|
+
pass: boolean;
|
|
1100
|
+
}
|
|
1101
|
+
interface SaveStatus {
|
|
1102
|
+
deleted: boolean;
|
|
1103
|
+
saved: boolean;
|
|
1104
|
+
}
|
|
1105
|
+
declare class SnapshotState {
|
|
1106
|
+
testFilePath: string;
|
|
1107
|
+
snapshotPath: string;
|
|
1108
|
+
private _counters;
|
|
1109
|
+
private _dirty;
|
|
1110
|
+
private _updateSnapshot;
|
|
1111
|
+
private _snapshotData;
|
|
1112
|
+
private _initialData;
|
|
1113
|
+
private _inlineSnapshots;
|
|
1114
|
+
private _uncheckedKeys;
|
|
1115
|
+
private _snapshotFormat;
|
|
1116
|
+
added: number;
|
|
1117
|
+
expand: boolean;
|
|
1118
|
+
matched: number;
|
|
1119
|
+
unmatched: number;
|
|
1120
|
+
updated: number;
|
|
1121
|
+
constructor(testFilePath: string, snapshotPath: string, options: SnapshotStateOptions);
|
|
1122
|
+
markSnapshotsAsCheckedForTest(testName: string): void;
|
|
1123
|
+
private _getInlineSnapshotStack;
|
|
1124
|
+
private _addSnapshot;
|
|
1125
|
+
clear(): void;
|
|
1126
|
+
save(): Promise<SaveStatus>;
|
|
1127
|
+
getUncheckedCount(): number;
|
|
1128
|
+
getUncheckedKeys(): Array<string>;
|
|
1129
|
+
removeUncheckedKeys(): void;
|
|
1130
|
+
match({ testName, received, key, inlineSnapshot, isInline, error, }: SnapshotMatchOptions): SnapshotReturnOptions;
|
|
1131
|
+
pack(): Promise<SnapshotResult>;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1079
1134
|
declare type Tester = (a: any, b: any) => boolean | undefined;
|
|
1080
1135
|
interface MatcherState {
|
|
1081
1136
|
assertionCalls: number;
|
|
@@ -1090,6 +1145,7 @@ interface MatcherState {
|
|
|
1090
1145
|
isExpectingAssertionsError?: Error | null;
|
|
1091
1146
|
isNot: boolean;
|
|
1092
1147
|
promise: string;
|
|
1148
|
+
snapshotState: SnapshotState;
|
|
1093
1149
|
suppressedErrors: Array<Error>;
|
|
1094
1150
|
testPath?: string;
|
|
1095
1151
|
utils: typeof jestMatcherUtils & {
|
package/dist/node.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.
|
|
2
|
-
export { V as VitestRunner } from './chunk-runtime-mocker.
|
|
3
|
-
import '
|
|
4
|
-
import 'path';
|
|
5
|
-
import 'child_process';
|
|
6
|
-
import 'process';
|
|
7
|
-
import './vendor-index.6c69a0a8.js';
|
|
8
|
-
import './vendor-_commonjsHelpers.addc3445.js';
|
|
9
|
-
import 'fs';
|
|
10
|
-
import 'assert';
|
|
11
|
-
import 'events';
|
|
12
|
-
import 'stream';
|
|
13
|
-
import 'util';
|
|
14
|
-
import 'url';
|
|
15
|
-
import 'os';
|
|
16
|
-
import './chunk-utils-global.2fab7e5c.js';
|
|
1
|
+
export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.0094db73.js';
|
|
2
|
+
export { V as VitestRunner } from './chunk-runtime-mocker.8436db18.js';
|
|
3
|
+
import './chunk-utils-global.b9f8edf8.js';
|
|
17
4
|
import 'tty';
|
|
18
5
|
import 'local-pkg';
|
|
6
|
+
import 'path';
|
|
19
7
|
import 'vite';
|
|
20
|
-
import '
|
|
8
|
+
import 'url';
|
|
9
|
+
import 'process';
|
|
10
|
+
import 'fs';
|
|
11
|
+
import './chunk-constants.d60bb984.js';
|
|
21
12
|
import 'readline';
|
|
22
|
-
import '
|
|
13
|
+
import 'os';
|
|
14
|
+
import 'util';
|
|
15
|
+
import 'stream';
|
|
16
|
+
import 'events';
|
|
17
|
+
import './vendor-_commonjsHelpers.addc3445.js';
|
|
18
|
+
import './chunk-vite-node-utils.6856b365.js';
|
|
23
19
|
import 'module';
|
|
24
20
|
import 'vm';
|
|
21
|
+
import 'assert';
|
|
25
22
|
import 'debug';
|
|
26
|
-
import './chunk-defaults.
|
|
23
|
+
import './chunk-defaults.c11f632f.js';
|
|
27
24
|
import 'worker_threads';
|
|
28
25
|
import 'tinypool';
|
|
29
26
|
import 'perf_hooks';
|
|
30
|
-
import './chunk-utils-
|
|
27
|
+
import './chunk-utils-source-map.ded50c88.js';
|
|
28
|
+
import './vendor-index.42fcc02c.js';
|
|
29
|
+
import 'child_process';
|
|
30
|
+
import 'buffer';
|
|
31
31
|
import './chunk-magic-string.41232190.js';
|
|
32
32
|
import './vendor-index.405e58ef.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import {
|
|
2
|
+
import { q as isNode, a as getWorkerState, f as safeClearTimeout, e as safeSetTimeout, t as toArray, N as clone, L as getType, o as relative, O as partitionSuiteChildren, P as hasTests, x as hasFailed, v as getFullName, r as resetModules } from './chunk-utils-global.b9f8edf8.js';
|
|
3
3
|
import { importModule } from 'local-pkg';
|
|
4
|
-
import { s as suite, t as test, d as describe, i as it, r as runOnce, a as isFirstRun, b as beforeAll, c as afterAll, e as beforeEach, f as afterEach, w as withCallback, g as createExpect, h as expect, v as vitest, j as vi, k as getRunningMode, l as isWatchMode, m as resetRunOnceCounter, R as RealDate, n as clearCollectorContext, o as defaultSuite, p as setHooks, q as getHooks, u as collectorContext, x as getSnapshotClient, y as setState, z as getFn, A as getState } from './chunk-runtime-chain.
|
|
4
|
+
import { s as suite, t as test, d as describe, i as it, r as runOnce, a as isFirstRun, b as beforeAll, c as afterAll, e as beforeEach, f as afterEach, w as withCallback, g as createExpect, h as expect, v as vitest, j as vi, k as getRunningMode, l as isWatchMode, m as resetRunOnceCounter, R as RealDate, n as clearCollectorContext, o as defaultSuite, p as setHooks, q as getHooks, u as collectorContext, x as getSnapshotClient, y as setState, z as getFn, A as getState } from './chunk-runtime-chain.db87de48.js';
|
|
5
5
|
import chai, { assert, should, util } from 'chai';
|
|
6
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
7
|
-
import {
|
|
8
|
-
import { t as takeCoverage } from './chunk-defaults.7d81a6ca.js';
|
|
6
|
+
import { r as rpc } from './chunk-runtime-rpc.6e6614a9.js';
|
|
7
|
+
import { t as takeCoverage } from './chunk-defaults.c11f632f.js';
|
|
9
8
|
import { format } from 'util';
|
|
9
|
+
import { s as stringify } from './chunk-utils-source-map.ded50c88.js';
|
|
10
10
|
|
|
11
11
|
var index = /*#__PURE__*/Object.freeze({
|
|
12
12
|
__proto__: null,
|
|
@@ -435,7 +435,7 @@ async function setupGlobalEnv(config) {
|
|
|
435
435
|
if (isNode)
|
|
436
436
|
await setupConsoleLogSpy();
|
|
437
437
|
if (config.globals)
|
|
438
|
-
(await import('./chunk-integrations-globals.
|
|
438
|
+
(await import('./chunk-integrations-globals.f7036c09.js')).registerApiGlobally();
|
|
439
439
|
}
|
|
440
440
|
function setupDefines(defines) {
|
|
441
441
|
for (const key in defines)
|
|
@@ -451,8 +451,8 @@ async function setupConsoleLogSpy() {
|
|
|
451
451
|
function schedule(taskId) {
|
|
452
452
|
const timer = timers.get(taskId);
|
|
453
453
|
const { stdoutTime, stderrTime } = timer;
|
|
454
|
-
|
|
455
|
-
timer.timer =
|
|
454
|
+
safeClearTimeout(timer.timer);
|
|
455
|
+
timer.timer = safeSetTimeout(() => {
|
|
456
456
|
if (stderrTime < stdoutTime) {
|
|
457
457
|
sendStderr(taskId);
|
|
458
458
|
sendStdout(taskId);
|
|
@@ -835,13 +835,13 @@ let updateTimer;
|
|
|
835
835
|
let previousUpdate;
|
|
836
836
|
function updateTask(task) {
|
|
837
837
|
packs.set(task.id, task.result);
|
|
838
|
-
|
|
839
|
-
updateTimer =
|
|
838
|
+
safeClearTimeout(updateTimer);
|
|
839
|
+
updateTimer = safeSetTimeout(() => {
|
|
840
840
|
previousUpdate = sendTasksUpdate();
|
|
841
841
|
}, 10);
|
|
842
842
|
}
|
|
843
843
|
async function sendTasksUpdate() {
|
|
844
|
-
|
|
844
|
+
safeClearTimeout(updateTimer);
|
|
845
845
|
await previousUpdate;
|
|
846
846
|
if (packs.size) {
|
|
847
847
|
const p = rpc().onTaskUpdate(Array.from(packs));
|