@rstest/core 0.7.8 → 0.7.9
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 +294 -0
- package/dist/0~130.js +2 -2
- package/dist/0~1472.js +48 -0
- package/dist/0~1981.js +3 -0
- package/dist/0~2173.js +25 -10
- package/dist/0~2255.js +2 -2
- package/dist/0~3062.js +0 -5
- package/dist/0~3919.js +1 -1
- package/dist/0~4403.js +6 -5
- package/dist/0~4809.js +1 -1
- package/dist/0~5835.js +2 -2
- package/dist/0~62.js +1 -1
- package/dist/0~6588.js +3 -3
- package/dist/0~6923.js +2 -2
- package/dist/0~7583.js +9 -8
- package/dist/0~7882.js +1144 -0
- package/dist/0~8426.js +1 -2
- package/dist/0~89.js +24 -21
- package/dist/0~9348.js +953 -0
- package/dist/0~9634.js +58 -10
- package/dist/1157.js +12 -117
- package/dist/{7913.js → 1294.js} +51 -1745
- package/dist/2672.js +647 -0
- package/dist/3278.js +3 -450
- package/dist/4484.js +38 -0
- package/dist/487.js +1739 -0
- package/dist/4899.js +11 -0
- package/dist/5734.js +1 -1
- package/dist/{0~6151.js → 6151.js} +169 -13
- package/dist/{0~6973.js → 6973.js} +5 -5
- package/dist/721.js +9 -0
- package/dist/9131.js +554 -502
- package/dist/browser-runtime/2~907.js +1211 -0
- package/dist/browser-runtime/2~907.js.map +1 -0
- package/dist/browser-runtime/389.js +22071 -0
- package/dist/browser-runtime/389.js.LICENSE.txt +329 -0
- package/dist/browser-runtime/389.js.map +1 -0
- package/dist/browser-runtime/index.d.ts +2806 -0
- package/dist/browser-runtime/index.js +1 -0
- package/dist/browser-runtime/rslib-runtime.js +50 -0
- package/dist/browser-runtime/rslib-runtime.js.map +1 -0
- package/dist/browser.d.ts +3329 -0
- package/dist/browser.js +14 -0
- package/dist/globalSetupWorker.js +3 -2
- package/dist/index.d.ts +58 -1
- package/dist/index.js +2 -1
- package/dist/rslib-runtime.js +27 -0
- package/dist/rstestSuppressWarnings.cjs +9 -0
- package/dist/worker.d.ts +57 -1
- package/dist/worker.js +415 -1
- package/package.json +28 -13
- package/dist/0~8957.js +0 -149
- package/dist/554.js +0 -417
- package/dist/5693.js +0 -91
- /package/dist/{7913.js.LICENSE.txt → 1294.js.LICENSE.txt} +0 -0
- /package/dist/{0~6151.js.LICENSE.txt → 6151.js.LICENSE.txt} +0 -0
package/dist/0~8426.js
CHANGED
|
@@ -2,8 +2,7 @@ import 'module';
|
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import "./1157.js";
|
|
5
|
-
import "./
|
|
6
|
-
import { relative } from "./3278.js";
|
|
5
|
+
import { relative } from "./2672.js";
|
|
7
6
|
const picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js");
|
|
8
7
|
var picomatch_default = /*#__PURE__*/ __webpack_require__.n(picomatch);
|
|
9
8
|
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
package/dist/0~89.js
CHANGED
|
@@ -4,13 +4,13 @@ import { __webpack_require__ } from "./rslib-runtime.js";
|
|
|
4
4
|
import node_events from "node:events";
|
|
5
5
|
import { Tinypool } from "tinypool";
|
|
6
6
|
import node_inspector from "node:inspector";
|
|
7
|
-
import "./
|
|
8
|
-
import { node_process,
|
|
7
|
+
import { basename, needFlagExperimentalDetectModule, isDeno, dirname, castArray, resolve as pathe_M_eThtNZ_resolve, serializableConfig, ADDITIONAL_NODE_BUILTINS, bgColor, join } from "./2672.js";
|
|
8
|
+
import { node_process, posix, isDebug } from "./3278.js";
|
|
9
9
|
import { fileURLToPath } from "./6198.js";
|
|
10
10
|
import { node_v8, createBirpc } from "./3216.js";
|
|
11
|
-
import {
|
|
11
|
+
import { TEMP_RSTEST_OUTPUT_DIR, TEMP_RSTEST_OUTPUT_DIR_GLOB } from "./1157.js";
|
|
12
12
|
import { isBuiltin } from "./4881.js";
|
|
13
|
-
import {
|
|
13
|
+
import { rsbuild as __rspack_external__rsbuild_core_1b356efc } from "./4484.js";
|
|
14
14
|
const DefaultMaxHeapSize = 1073741824;
|
|
15
15
|
function memory_isMemorySufficient(options) {
|
|
16
16
|
const { memoryThreshold = 0.7, maxHeapSize = DefaultMaxHeapSize } = options || {};
|
|
@@ -67,8 +67,6 @@ const createForksPool = (poolOptions)=>{
|
|
|
67
67
|
isolateWorkers: isolate
|
|
68
68
|
};
|
|
69
69
|
const pool = new Tinypool(options);
|
|
70
|
-
const destroy = pool.destroy.bind(pool);
|
|
71
|
-
process.on('SIGTERM', destroy);
|
|
72
70
|
return {
|
|
73
71
|
name: 'forks',
|
|
74
72
|
runTest: async ({ options, rpcMethods })=>{
|
|
@@ -91,10 +89,7 @@ const createForksPool = (poolOptions)=>{
|
|
|
91
89
|
cleanup();
|
|
92
90
|
}
|
|
93
91
|
},
|
|
94
|
-
close: ()=>
|
|
95
|
-
process.off('SIGTERM', destroy);
|
|
96
|
-
return destroy();
|
|
97
|
-
}
|
|
92
|
+
close: ()=>pool.destroy()
|
|
98
93
|
};
|
|
99
94
|
};
|
|
100
95
|
const external_node_os_ = __webpack_require__("node:os");
|
|
@@ -156,6 +151,18 @@ const filterAssetsByEntry = async (entryInfo, getAssetFiles, getSourceMaps, setu
|
|
|
156
151
|
sourceMaps: neededSourceMaps
|
|
157
152
|
};
|
|
158
153
|
};
|
|
154
|
+
const getNodeExecArgv = ()=>{
|
|
155
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
156
|
+
const __dirname = dirname(__filename);
|
|
157
|
+
const suppressFile = join(__dirname, './rstestSuppressWarnings.cjs');
|
|
158
|
+
return [
|
|
159
|
+
'--experimental-vm-modules',
|
|
160
|
+
'--experimental-import-meta-resolve',
|
|
161
|
+
needFlagExperimentalDetectModule() ? '--experimental-detect-module' : void 0,
|
|
162
|
+
'--require',
|
|
163
|
+
suppressFile
|
|
164
|
+
].filter(Boolean);
|
|
165
|
+
};
|
|
159
166
|
const createPool = async ({ context, recommendWorkerCount = 1 / 0 })=>{
|
|
160
167
|
const execArgv = process.execArgv.filter((execArg)=>execArg.startsWith('--perf') || execArg.startsWith('--cpu-prof') || execArg.startsWith('--heap-prof') || execArg.startsWith('--diagnostic-dir'));
|
|
161
168
|
const numCpus = getNumCpus();
|
|
@@ -173,11 +180,8 @@ const createPool = async ({ context, recommendWorkerCount = 1 / 0 })=>{
|
|
|
173
180
|
execArgv: [
|
|
174
181
|
...poolOptions?.execArgv ?? [],
|
|
175
182
|
...execArgv,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
'--no-warnings',
|
|
179
|
-
needFlagExperimentalDetectModule() ? '--experimental-detect-module' : void 0
|
|
180
|
-
].filter(Boolean),
|
|
183
|
+
...isDeno ? [] : getNodeExecArgv()
|
|
184
|
+
],
|
|
181
185
|
env: {
|
|
182
186
|
...process.env,
|
|
183
187
|
NODE_ENV: 'test',
|
|
@@ -356,8 +360,6 @@ async function createSetupPool() {
|
|
|
356
360
|
}
|
|
357
361
|
};
|
|
358
362
|
const pool = new Tinypool(options);
|
|
359
|
-
const destroy = pool.destroy.bind(pool);
|
|
360
|
-
process.on('SIGTERM', destroy);
|
|
361
363
|
return pool;
|
|
362
364
|
}
|
|
363
365
|
async function runGlobalSetup({ globalSetupEntries, assetFiles, sourceMaps, interopDefault, outputModule }) {
|
|
@@ -677,7 +679,7 @@ const pluginInspect = ()=>enable ? {
|
|
|
677
679
|
});
|
|
678
680
|
}
|
|
679
681
|
} : null;
|
|
680
|
-
const external_node_fs_ = __webpack_require__("
|
|
682
|
+
const external_node_fs_ = __webpack_require__("fs");
|
|
681
683
|
const mockRuntime_dirname = external_node_path_["default"].dirname(fileURLToPath(import.meta.url));
|
|
682
684
|
class MockRuntimeRspackPlugin {
|
|
683
685
|
outputModule;
|
|
@@ -796,10 +798,11 @@ function parseInlineSourceMapStr(code) {
|
|
|
796
798
|
const isMultiCompiler = (compiler)=>'compilers' in compiler && Array.isArray(compiler.compilers);
|
|
797
799
|
const prepareRsbuild = async (context, globTestSourceEntries, setupFiles, globalSetupFiles)=>{
|
|
798
800
|
const { command, normalizedConfig: { isolate, dev = {}, coverage } } = context;
|
|
801
|
+
const projects = context.projects.filter((project)=>!project.normalizedConfig.browser.enabled);
|
|
799
802
|
const debugMode = isDebug();
|
|
800
|
-
|
|
803
|
+
__rspack_external__rsbuild_core_1b356efc.logger.level = debugMode ? 'verbose' : 'error';
|
|
801
804
|
const writeToDisk = dev.writeToDisk || debugMode;
|
|
802
|
-
const rsbuildInstance = await createRsbuild({
|
|
805
|
+
const rsbuildInstance = await (0, __rspack_external__rsbuild_core_1b356efc.createRsbuild)({
|
|
803
806
|
callerName: 'rstest',
|
|
804
807
|
config: {
|
|
805
808
|
root: context.rootPath,
|
|
@@ -815,7 +818,7 @@ const prepareRsbuild = async (context, globTestSourceEntries, setupFiles, global
|
|
|
815
818
|
hmr: false,
|
|
816
819
|
writeToDisk
|
|
817
820
|
},
|
|
818
|
-
environments: Object.fromEntries(
|
|
821
|
+
environments: Object.fromEntries(projects.map((project)=>[
|
|
819
822
|
project.environmentName,
|
|
820
823
|
{
|
|
821
824
|
plugins: project.normalizedConfig.plugins,
|