@midscene/test 1.15.0 → 1.15.1

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.
@@ -5,7 +5,6 @@ import { inspect } from "node:util";
5
5
  import { z } from "zod/v4";
6
6
  import { pathToFileURL } from "node:url";
7
7
  import { require as api_require } from "tsx/cjs/api";
8
- import { tsImport } from "tsx/esm/api";
9
8
  import { globSync } from "tinyglobby";
10
9
  import { JSON_SCHEMA, load } from "js-yaml";
11
10
  import { createHash, randomUUID } from "node:crypto";
@@ -22,7 +21,7 @@ var __webpack_modules__ = {
22
21
  },
23
22
  "./package.json" (module) {
24
23
  module.exports = {
25
- rE: "1.15.0"
24
+ rE: "1.15.1"
26
25
  };
27
26
  }
28
27
  };
@@ -490,10 +489,14 @@ async function loadTestProject(configPath) {
490
489
  const extension = assertSupportedConfig(absolutePath);
491
490
  let loaded;
492
491
  try {
493
- loaded = '.mjs' === extension ? await import(pathToFileURL(absolutePath).href) : await tsImport(pathToFileURL(absolutePath).href, {
494
- parentURL: pathToFileURL(`${(0, external_node_path_.dirname)(absolutePath)}${external_node_path_.sep}`).href,
495
- tsconfig: false
496
- });
492
+ if ('.mjs' === extension) loaded = await import(pathToFileURL(absolutePath).href);
493
+ else {
494
+ const { tsImport } = await import("tsx/esm/api");
495
+ loaded = await tsImport(pathToFileURL(absolutePath).href, {
496
+ parentURL: pathToFileURL(`${(0, external_node_path_.dirname)(absolutePath)}${external_node_path_.sep}`).href,
497
+ tsconfig: false
498
+ });
499
+ }
497
500
  } catch (error) {
498
501
  try {
499
502
  if ('.mjs' === extension || !canRetryWithCjsLoader(error)) throw error;