@rstest/core 0.7.2 → 0.7.3
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/0~122.js +7 -3
- package/dist/0~151.js +197 -58
- package/dist/0~173.js +27 -27
- package/dist/0~403.js +7 -7
- package/dist/0~583.js +1 -1
- package/dist/0~588.js +5 -5
- package/dist/0~634.js +19 -17
- package/dist/0~835.js +3 -3
- package/dist/0~919.js +5 -5
- package/dist/0~923.js +3 -3
- package/dist/131.js +55 -137
- package/dist/554.js +88 -84
- package/dist/672.js +91 -0
- package/dist/946.js +14 -8
- package/dist/index.d.ts +114 -5
- package/dist/mockRuntimeCode.js +1 -0
- package/dist/worker.d.ts +34 -7
- package/package.json +2 -2
package/dist/0~173.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { getTestEntries, getSetupFiles, isTTY, clearScreen
|
|
4
|
+
import { getTestEntries, getSetupFiles, logger_logger, isTTY, clearScreen } from "./946.js";
|
|
5
5
|
import { createCoverageProvider } from "./734.js";
|
|
6
6
|
import { prepareRsbuild, createPool, createRsbuildServer } from "./0~122.js";
|
|
7
7
|
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -134,7 +134,7 @@ async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFaile
|
|
|
134
134
|
clearCurrentInputLine();
|
|
135
135
|
let message = ` ${picocolors_default().bold(picocolors_default().blue('Shortcuts:'))}\n`;
|
|
136
136
|
for (const shortcut of shortcuts)message += ` ${shortcut.description}\n`;
|
|
137
|
-
|
|
137
|
+
logger_logger.log(message);
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
process.stdin.on('keypress', handleKeypress);
|
|
@@ -193,7 +193,7 @@ async function runTests(context) {
|
|
|
193
193
|
recommendWorkerCount
|
|
194
194
|
});
|
|
195
195
|
const coverageProvider = coverage.enabled ? await createCoverageProvider(coverage, context.rootPath) : null;
|
|
196
|
-
if (coverageProvider)
|
|
196
|
+
if (coverageProvider) logger_logger.log(` ${picocolors_default().gray('Coverage enabled with')} %s\n`, picocolors_default().yellow(coverage.provider));
|
|
197
197
|
const run = async ({ fileFilters, mode = 'all', buildStart = Date.now() } = {})=>{
|
|
198
198
|
let testStart;
|
|
199
199
|
const currentEntries = [];
|
|
@@ -208,10 +208,10 @@ async function runTests(context) {
|
|
|
208
208
|
currentDeletedEntries.push(...deletedEntries);
|
|
209
209
|
let finalEntries = entries;
|
|
210
210
|
if ('on-demand' === mode) {
|
|
211
|
-
if (0 === affectedEntries.length)
|
|
212
|
-
else
|
|
211
|
+
if (0 === affectedEntries.length) logger_logger.debug(picocolors_default().yellow(`No test files need re-run in project(${p.environmentName}).`));
|
|
212
|
+
else logger_logger.debug(picocolors_default().yellow(`Test files to re-run in project(${p.environmentName}):\n`) + affectedEntries.map((e)=>e.testPath).join('\n') + '\n');
|
|
213
213
|
finalEntries = affectedEntries;
|
|
214
|
-
} else
|
|
214
|
+
} else logger_logger.debug(picocolors_default().yellow(fileFilters?.length ? `Run filtered tests in project(${p.environmentName}).\n` : `Run all tests in project(${p.environmentName}).\n`));
|
|
215
215
|
currentEntries.push(...finalEntries);
|
|
216
216
|
const { results, testResults } = await pool.runTests({
|
|
217
217
|
entries: finalEntries,
|
|
@@ -239,22 +239,22 @@ async function runTests(context) {
|
|
|
239
239
|
const testResults = returns.flatMap((r)=>r.testResults);
|
|
240
240
|
context.updateReporterResultState(results, testResults, currentDeletedEntries);
|
|
241
241
|
if (0 === results.length) {
|
|
242
|
-
if ('watch' === command) if ('on-demand' === mode)
|
|
243
|
-
else
|
|
242
|
+
if ('watch' === command) if ('on-demand' === mode) logger_logger.log(picocolors_default().yellow('No test files need re-run.'));
|
|
243
|
+
else logger_logger.log(picocolors_default().yellow('No test files found.'));
|
|
244
244
|
else {
|
|
245
245
|
const code = context.normalizedConfig.passWithNoTests ? 0 : 1;
|
|
246
|
-
|
|
246
|
+
logger_logger.log(picocolors_default()[code ? 'red' : 'yellow'](`No test files found, exiting with code ${code}.`));
|
|
247
247
|
process.exitCode = code;
|
|
248
248
|
}
|
|
249
249
|
if ('all' === mode) {
|
|
250
|
-
if (context.fileFilters?.length)
|
|
250
|
+
if (context.fileFilters?.length) logger_logger.log(picocolors_default().gray('filter: '), context.fileFilters.join(picocolors_default().gray(', ')));
|
|
251
251
|
context.projects.forEach((p)=>{
|
|
252
252
|
if (context.projects.length > 1) {
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
logger_logger.log('');
|
|
254
|
+
logger_logger.log(picocolors_default().gray('project:'), p.name);
|
|
255
255
|
}
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
logger_logger.log(picocolors_default().gray('include:'), p.normalizedConfig.include.join(picocolors_default().gray(', ')));
|
|
257
|
+
logger_logger.log(picocolors_default().gray('exclude:'), p.normalizedConfig.exclude.patterns.join(picocolors_default().gray(', ')));
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -282,15 +282,15 @@ async function runTests(context) {
|
|
|
282
282
|
}
|
|
283
283
|
if (isFailure) {
|
|
284
284
|
const bail = context.normalizedConfig.bail;
|
|
285
|
-
if (bail && context.stateManager.getCountOfFailedTests() >= bail)
|
|
285
|
+
if (bail && context.stateManager.getCountOfFailedTests() >= bail) logger_logger.log(picocolors_default().yellow(`Test run aborted due to reaching the bail limit of ${bail} failed test(s).`));
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
288
|
if ('watch' === command) {
|
|
289
289
|
const enableCliShortcuts = isCliShortcutsEnabled();
|
|
290
290
|
const afterTestsWatchRun = ()=>{
|
|
291
|
-
|
|
292
|
-
if (enableCliShortcuts) if (snapshotManager.summary.unmatched)
|
|
293
|
-
else
|
|
291
|
+
logger_logger.log(picocolors_default().green(' Waiting for file changes...'));
|
|
292
|
+
if (enableCliShortcuts) if (snapshotManager.summary.unmatched) logger_logger.log(` ${picocolors_default().dim('press')} ${picocolors_default().yellow(picocolors_default().bold('u'))} ${picocolors_default().dim('to update snapshot')}${picocolors_default().dim(', press')} ${picocolors_default().bold('h')} ${picocolors_default().dim('to show help')}\n`);
|
|
293
|
+
else logger_logger.log(` ${picocolors_default().dim('press')} ${picocolors_default().bold('h')} ${picocolors_default().dim('to show help')}${picocolors_default().dim(', press')} ${picocolors_default().bold('q')} ${picocolors_default().dim('to quit')}\n`);
|
|
294
294
|
};
|
|
295
295
|
const { onBeforeRestart } = await import("./0~588.js").then((mod)=>({
|
|
296
296
|
onBeforeRestart: mod.onBeforeRestart
|
|
@@ -330,20 +330,20 @@ async function runTests(context) {
|
|
|
330
330
|
runWithTestNamePattern: async (pattern)=>{
|
|
331
331
|
clearScreen();
|
|
332
332
|
context.normalizedConfig.testNamePattern = pattern;
|
|
333
|
-
if (pattern)
|
|
334
|
-
else
|
|
333
|
+
if (pattern) logger_logger.log(`\n${picocolors_default().dim('Applied testNamePattern:')} ${picocolors_default().bold(pattern)}\n`);
|
|
334
|
+
else logger_logger.log(`\n${picocolors_default().dim('Cleared testNamePattern filter')}\n`);
|
|
335
335
|
snapshotManager.clear();
|
|
336
336
|
await run();
|
|
337
337
|
afterTestsWatchRun();
|
|
338
338
|
},
|
|
339
339
|
runWithFileFilters: async (filters)=>{
|
|
340
340
|
clearScreen();
|
|
341
|
-
if (filters && filters.length > 0)
|
|
342
|
-
else
|
|
341
|
+
if (filters && filters.length > 0) logger_logger.log(`\n${picocolors_default().dim('Applied file filters:')} ${picocolors_default().bold(filters.join(', '))}\n`);
|
|
342
|
+
else logger_logger.log(`\n${picocolors_default().dim('Cleared file filters')}\n`);
|
|
343
343
|
snapshotManager.clear();
|
|
344
344
|
context.fileFilters = filters;
|
|
345
345
|
const entries = await Promise.all(projects.map(async (p)=>globTestSourceEntries(p.environmentName))).then((entries)=>entries.reduce((acc, entry)=>acc.concat(...Object.values(entry)), []));
|
|
346
|
-
if (!entries.length) return void
|
|
346
|
+
if (!entries.length) return void logger_logger.log(filters ? picocolors_default().yellow(`\nNo matching test files to run with current file filters: ${filters.join(',')}\n`) : picocolors_default().yellow('\nNo matching test files to run.\n'));
|
|
347
347
|
await run({
|
|
348
348
|
fileFilters: entries
|
|
349
349
|
});
|
|
@@ -351,7 +351,7 @@ async function runTests(context) {
|
|
|
351
351
|
},
|
|
352
352
|
runFailedTests: async ()=>{
|
|
353
353
|
const failedTests = context.reporterResults.results.filter((result)=>'fail' === result.status).map((r)=>r.testPath);
|
|
354
|
-
if (!failedTests.length) return void
|
|
354
|
+
if (!failedTests.length) return void logger_logger.log(picocolors_default().yellow('\nNo failed tests were found that needed to be rerun.'));
|
|
355
355
|
clearScreen();
|
|
356
356
|
snapshotManager.clear();
|
|
357
357
|
await run({
|
|
@@ -361,7 +361,7 @@ async function runTests(context) {
|
|
|
361
361
|
afterTestsWatchRun();
|
|
362
362
|
},
|
|
363
363
|
updateSnapshot: async ()=>{
|
|
364
|
-
if (!snapshotManager.summary.unmatched) return void
|
|
364
|
+
if (!snapshotManager.summary.unmatched) return void logger_logger.log(picocolors_default().yellow('\nNo snapshots were found that needed to be updated.'));
|
|
365
365
|
const failedTests = context.reporterResults.results.filter((result)=>result.snapshotResult?.unmatched).map((r)=>r.testPath);
|
|
366
366
|
clearScreen();
|
|
367
367
|
const originalUpdateSnapshot = snapshotManager.options.updateSnapshot;
|
|
@@ -381,9 +381,9 @@ async function runTests(context) {
|
|
|
381
381
|
} else {
|
|
382
382
|
let isTeardown = false;
|
|
383
383
|
const unExpectedExit = (code)=>{
|
|
384
|
-
if (isTeardown)
|
|
384
|
+
if (isTeardown) logger_logger.log(picocolors_default().yellow(`Rstest exited unexpectedly with code ${code}, this is likely caused by test environment teardown.`));
|
|
385
385
|
else {
|
|
386
|
-
|
|
386
|
+
logger_logger.log(picocolors_default().red(`Rstest exited unexpectedly with code ${code}, terminating test run.`));
|
|
387
387
|
process.exitCode = 1;
|
|
388
388
|
}
|
|
389
389
|
};
|
package/dist/0~403.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import { isDynamicPattern, glob,
|
|
3
|
+
import { isDynamicPattern, glob, logger_logger, normalize } from "./946.js";
|
|
4
4
|
const getIncludedFiles = async (coverage, rootPath)=>{
|
|
5
5
|
const ignoredPatterns = coverage.exclude?.filter((item)=>isDynamicPattern(item) || item.startsWith(rootPath) || item.startsWith('./'));
|
|
6
6
|
const allFiles = await glob(coverage.include, {
|
|
@@ -27,7 +27,7 @@ async function generateCoverage(context, results, coverageProvider) {
|
|
|
27
27
|
let isTimeout = false;
|
|
28
28
|
const timeoutId = setTimeout(()=>{
|
|
29
29
|
isTimeout = true;
|
|
30
|
-
|
|
30
|
+
logger_logger.info('Generating coverage for untested files...');
|
|
31
31
|
}, 1000);
|
|
32
32
|
const allFiles = (await Promise.all(projects.map(async (p)=>{
|
|
33
33
|
const includedFiles = await getIncludedFiles(coverage, p.rootPath);
|
|
@@ -36,7 +36,7 @@ async function generateCoverage(context, results, coverageProvider) {
|
|
|
36
36
|
return includedFiles;
|
|
37
37
|
}))).flat();
|
|
38
38
|
clearTimeout(timeoutId);
|
|
39
|
-
if (isTimeout)
|
|
39
|
+
if (isTimeout) logger_logger.info('Coverage for untested files generated.');
|
|
40
40
|
finalCoverageMap.filter((file)=>allFiles.includes(normalize(file)));
|
|
41
41
|
}
|
|
42
42
|
await coverageProvider.generateReports(finalCoverageMap, coverage);
|
|
@@ -51,17 +51,17 @@ async function generateCoverage(context, results, coverageProvider) {
|
|
|
51
51
|
thresholds: coverage.thresholds
|
|
52
52
|
});
|
|
53
53
|
if (!thresholdResult.success) {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
logger_logger.log('');
|
|
55
|
+
logger_logger.log(thresholdResult.message);
|
|
56
56
|
process.exitCode = 1;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
} catch (error) {
|
|
60
|
-
|
|
60
|
+
logger_logger.error('Failed to generate coverage reports:', error);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
async function generateCoverageForUntestedFiles(environmentName, uncoveredFiles, coverageMap, coverageProvider) {
|
|
64
|
-
if (!coverageProvider.generateCoverageForUntestedFiles) return void
|
|
64
|
+
if (!coverageProvider.generateCoverageForUntestedFiles) return void logger_logger.warn('Current coverage provider does not support generating coverage for untested files.');
|
|
65
65
|
const coverages = await coverageProvider.generateCoverageForUntestedFiles({
|
|
66
66
|
environmentName,
|
|
67
67
|
files: uncoveredFiles
|
package/dist/0~583.js
CHANGED
|
@@ -6,7 +6,7 @@ import { lstat, open as promises_open, readdir, realpath as promises_realpath, s
|
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
7
|
import { readdir as promises_readdir, lstat as promises_lstat, promises_stat as promises_promises_stat, realpath as external_node_fs_promises_realpath } from "./946.js";
|
|
8
8
|
import { EventEmitter } from "./131.js";
|
|
9
|
-
const external_node_path_ = __webpack_require__("
|
|
9
|
+
const external_node_path_ = __webpack_require__("path");
|
|
10
10
|
const EntryTypes = {
|
|
11
11
|
FILE_TYPE: 'files',
|
|
12
12
|
DIR_TYPE: 'directories',
|
package/dist/0~588.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import {
|
|
4
|
+
import { logger_logger, isTTY } from "./946.js";
|
|
5
5
|
import { runRest } from "./131.js";
|
|
6
6
|
const GLOB_REGEX = /[*?{}[\]()!@+|]/;
|
|
7
7
|
const isGlob = (str)=>GLOB_REGEX.test(str);
|
|
@@ -27,7 +27,7 @@ async function createChokidar(pathOrGlobs, root, options) {
|
|
|
27
27
|
}
|
|
28
28
|
return chokidar.watch(Array.from(watchFiles), options);
|
|
29
29
|
}
|
|
30
|
-
const external_node_path_ = __webpack_require__("
|
|
30
|
+
const external_node_path_ = __webpack_require__("path");
|
|
31
31
|
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
32
32
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
33
33
|
let cleaners = [];
|
|
@@ -41,8 +41,8 @@ const beforeRestart = async ({ filePath, root, clear = true })=>{
|
|
|
41
41
|
if (clear) clearConsole();
|
|
42
42
|
if (filePath) {
|
|
43
43
|
const filename = external_node_path_["default"].relative(root, filePath);
|
|
44
|
-
|
|
45
|
-
} else
|
|
44
|
+
logger_logger.info(`restarting Rstest as ${picocolors_default().yellow(filename)} changed\n`);
|
|
45
|
+
} else logger_logger.info('restarting Rstest...\n');
|
|
46
46
|
for (const cleaner of cleaners)await cleaner();
|
|
47
47
|
cleaners = [];
|
|
48
48
|
};
|
|
@@ -82,7 +82,7 @@ async function watchFilesForRestart({ rstest, watchOptions, options, filters })
|
|
|
82
82
|
filePath
|
|
83
83
|
});
|
|
84
84
|
if (restarted) await watcher.close();
|
|
85
|
-
else
|
|
85
|
+
else logger_logger.error('Restart failed');
|
|
86
86
|
restarting = false;
|
|
87
87
|
};
|
|
88
88
|
watcher.on('add', onChange);
|
package/dist/0~634.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { getTestEntries, getSetupFiles, getTaskNameWithPrefix, prettyTestPath,
|
|
4
|
+
import { getTestEntries, getSetupFiles, getTaskNameWithPrefix, logger_logger, prettyTestPath, ROOT_SUITE_NAME, bgColor } from "./946.js";
|
|
5
5
|
import { prepareRsbuild, createPool, createRsbuildServer } from "./0~122.js";
|
|
6
6
|
const external_node_fs_ = __webpack_require__("node:fs");
|
|
7
|
-
const external_node_path_ = __webpack_require__("
|
|
7
|
+
const external_node_path_ = __webpack_require__("path");
|
|
8
8
|
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
9
9
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
10
10
|
const collectTests = async ({ context, globTestSourceEntries })=>{
|
|
@@ -78,7 +78,7 @@ const collectTestFiles = async ({ context, globTestSourceEntries })=>{
|
|
|
78
78
|
getSourceMap: async (_name)=>null
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
|
-
async function listTests(context, { filesOnly, json }) {
|
|
81
|
+
async function listTests(context, { filesOnly, json, printLocation, includeSuites }) {
|
|
82
82
|
const { rootPath } = context;
|
|
83
83
|
const testEntries = {};
|
|
84
84
|
const globTestSourceEntries = async (name)=>{
|
|
@@ -108,16 +108,14 @@ async function listTests(context, { filesOnly, json }) {
|
|
|
108
108
|
'skip',
|
|
109
109
|
'todo'
|
|
110
110
|
].includes(test.runMode)) return;
|
|
111
|
-
if ('case' === test.type
|
|
111
|
+
if ('case' === test.type || includeSuites && 'suite' === test.type && test.name !== ROOT_SUITE_NAME) tests.push({
|
|
112
112
|
file: test.testPath,
|
|
113
113
|
name: getTaskNameWithPrefix(test),
|
|
114
|
-
|
|
114
|
+
location: test.location,
|
|
115
|
+
type: test.type,
|
|
116
|
+
project: showProject ? test.project : void 0
|
|
115
117
|
});
|
|
116
|
-
|
|
117
|
-
file: test.testPath,
|
|
118
|
-
name: getTaskNameWithPrefix(test)
|
|
119
|
-
});
|
|
120
|
-
else for (const child of test.tests)traverseTests(child);
|
|
118
|
+
if ('suite' === test.type) for (const child of test.tests)traverseTests(child);
|
|
121
119
|
};
|
|
122
120
|
const hasError = list.some((file)=>file.errors?.length);
|
|
123
121
|
const showProject = context.projects.length > 1;
|
|
@@ -129,7 +127,7 @@ async function listTests(context, { filesOnly, json }) {
|
|
|
129
127
|
for (const file of list){
|
|
130
128
|
const relativePath = (0, external_node_path_.relative)(rootPath, file.testPath);
|
|
131
129
|
if (file.errors?.length) {
|
|
132
|
-
|
|
130
|
+
logger_logger.log(`${bgColor('bgRed', ' FAIL ')} ${relativePath}`);
|
|
133
131
|
for (const error of file.errors)await printError(error, async (name)=>{
|
|
134
132
|
const sourceMap = await getSourceMap(name);
|
|
135
133
|
return sourceMap ? JSON.parse(sourceMap) : null;
|
|
@@ -137,16 +135,18 @@ async function listTests(context, { filesOnly, json }) {
|
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
137
|
await close();
|
|
140
|
-
return;
|
|
138
|
+
return list;
|
|
141
139
|
}
|
|
142
140
|
for (const file of list){
|
|
143
141
|
if (filesOnly) {
|
|
144
142
|
if (showProject) tests.push({
|
|
145
143
|
file: file.testPath,
|
|
146
|
-
project: file.project
|
|
144
|
+
project: file.project,
|
|
145
|
+
type: 'file'
|
|
147
146
|
});
|
|
148
147
|
else tests.push({
|
|
149
|
-
file: file.testPath
|
|
148
|
+
file: file.testPath,
|
|
149
|
+
type: 'file'
|
|
150
150
|
});
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
@@ -160,11 +160,13 @@ async function listTests(context, { filesOnly, json }) {
|
|
|
160
160
|
recursive: true
|
|
161
161
|
});
|
|
162
162
|
(0, external_node_fs_.writeFileSync)(jsonPath, content);
|
|
163
|
-
} else
|
|
163
|
+
} else logger_logger.log(content);
|
|
164
164
|
} else for (const test of tests){
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
let shortPath = (0, external_node_path_.relative)(rootPath, test.file);
|
|
166
|
+
if (test.location && printLocation) shortPath = `${shortPath}:${test.location.line}:${test.location.column}`;
|
|
167
|
+
logger_logger.log(test.name ? `${picocolors_default().dim(`${shortPath} > `)}${test.name}` : prettyTestPath(shortPath));
|
|
167
168
|
}
|
|
168
169
|
await close();
|
|
170
|
+
return list;
|
|
169
171
|
}
|
|
170
172
|
export { listTests };
|
package/dist/0~835.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { posix, external_node_module_createRequire,
|
|
4
|
+
import { posix, external_node_module_createRequire, logger_logger } from "./946.js";
|
|
5
5
|
import { pathToFileURL } from "./404.js";
|
|
6
6
|
import { node_vm, asModule, shouldInterop, interopModule } from "./0~346.js";
|
|
7
|
-
const external_node_path_ = __webpack_require__("
|
|
7
|
+
const external_node_path_ = __webpack_require__("path");
|
|
8
8
|
const isRelativePath = (p)=>/^\.\.?\//.test(p);
|
|
9
9
|
const createRequire = (filename, distPath, rstestContext, assetFiles, interopDefault)=>{
|
|
10
10
|
const _require = (()=>{
|
|
@@ -28,7 +28,7 @@ const createRequire = (filename, distPath, rstestContext, assetFiles, interopDef
|
|
|
28
28
|
interopDefault
|
|
29
29
|
});
|
|
30
30
|
} catch (err) {
|
|
31
|
-
|
|
31
|
+
logger_logger.error(`load file ${joinedPath} failed:\n`, err instanceof Error ? err.message : err);
|
|
32
32
|
}
|
|
33
33
|
const resolved = _require.resolve(id);
|
|
34
34
|
return _require(resolved);
|
package/dist/0~919.js
CHANGED
|
@@ -3,7 +3,7 @@ import 'module';
|
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
4
|
import "./946.js";
|
|
5
5
|
__webpack_require__.add({
|
|
6
|
-
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js" (
|
|
6
|
+
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js" (__unused_rspack_module, exports) {
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
@@ -25,7 +25,7 @@ __webpack_require__.add({
|
|
|
25
25
|
return token;
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
|
-
"../../node_modules/.pnpm/@babel+code-frame@7.27.1/node_modules/@babel/code-frame/lib/index.js" (
|
|
28
|
+
"../../node_modules/.pnpm/@babel+code-frame@7.27.1/node_modules/@babel/code-frame/lib/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
29
29
|
var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
30
30
|
var jsTokens = __webpack_require__("../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js");
|
|
31
31
|
var helperValidatorIdentifier = __webpack_require__("../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js");
|
|
@@ -194,7 +194,7 @@ __webpack_require__.add({
|
|
|
194
194
|
}
|
|
195
195
|
exports.codeFrameColumns = codeFrameColumns;
|
|
196
196
|
},
|
|
197
|
-
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js" (
|
|
197
|
+
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js" (__unused_rspack_module, exports) {
|
|
198
198
|
Object.defineProperty(exports, "__esModule", {
|
|
199
199
|
value: true
|
|
200
200
|
});
|
|
@@ -1202,7 +1202,7 @@ __webpack_require__.add({
|
|
|
1202
1202
|
return !isFirst;
|
|
1203
1203
|
}
|
|
1204
1204
|
},
|
|
1205
|
-
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js" (
|
|
1205
|
+
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
1206
1206
|
Object.defineProperty(exports, "__esModule", {
|
|
1207
1207
|
value: true
|
|
1208
1208
|
});
|
|
@@ -1257,7 +1257,7 @@ __webpack_require__.add({
|
|
|
1257
1257
|
var _identifier = __webpack_require__("../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
|
|
1258
1258
|
var _keyword = __webpack_require__("../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js");
|
|
1259
1259
|
},
|
|
1260
|
-
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js" (
|
|
1260
|
+
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js" (__unused_rspack_module, exports) {
|
|
1261
1261
|
Object.defineProperty(exports, "__esModule", {
|
|
1262
1262
|
value: true
|
|
1263
1263
|
});
|
package/dist/0~923.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { posix,
|
|
4
|
+
import { posix, logger_logger } from "./946.js";
|
|
5
5
|
import { pathToFileURL } from "./404.js";
|
|
6
6
|
import { node_vm, interopModule, shouldInterop } from "./0~346.js";
|
|
7
|
-
const external_node_path_ = __webpack_require__("
|
|
7
|
+
const external_node_path_ = __webpack_require__("path");
|
|
8
8
|
var loadEsModule_EsmMode = /*#__PURE__*/ function(EsmMode) {
|
|
9
9
|
EsmMode[EsmMode["Unknown"] = 0] = "Unknown";
|
|
10
10
|
EsmMode[EsmMode["Evaluated"] = 1] = "Evaluated";
|
|
@@ -27,7 +27,7 @@ const defineRstestDynamicImport = ({ distPath, testPath, assetFiles, interopDefa
|
|
|
27
27
|
esmMode
|
|
28
28
|
});
|
|
29
29
|
} catch (err) {
|
|
30
|
-
|
|
30
|
+
logger_logger.error(`load file ${joinedPath} failed:\n`, err instanceof Error ? err.message : err);
|
|
31
31
|
}
|
|
32
32
|
const resolvedPath = (0, external_node_path_.isAbsolute)(specifier) ? pathToFileURL(specifier) : import.meta.resolve(specifier, pathToFileURL(testPath));
|
|
33
33
|
const modulePath = 'string' == typeof resolvedPath ? resolvedPath : resolvedPath.pathname;
|