@wdio/config 9.23.2 → 9.24.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.
@@ -1,5 +1,6 @@
1
1
  import type { ModuleImportService } from '../types.js';
2
2
  export default class RequireLibrary implements ModuleImportService {
3
+ #private;
3
4
  import<T>(module: string): Promise<T>;
4
5
  }
5
6
  //# sourceMappingURL=RequireLibrary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequireLibrary.d.ts","sourceRoot":"","sources":["../../src/node/RequireLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,mBAAmB;IAC9D,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAGxC"}
1
+ {"version":3,"file":"RequireLibrary.d.ts","sourceRoot":"","sources":["../../src/node/RequireLibrary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,mBAAmB;;IAG9D,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAgBxC"}
@@ -10,9 +10,16 @@ import path from "node:path";
10
10
  import { sync as globSync } from "glob";
11
11
 
12
12
  // src/node/RequireLibrary.ts
13
+ import createJITI from "jiti";
13
14
  var RequireLibrary = class {
15
+ #jiti = createJITI(import.meta.url);
14
16
  import(module) {
15
- return import(module);
17
+ return import(module).catch((err) => {
18
+ if (err instanceof Error && err.message.includes("does not provide an export named")) {
19
+ return this.#jiti(module);
20
+ }
21
+ throw err;
22
+ });
16
23
  }
17
24
  };
18
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/config",
3
- "version": "9.23.2",
3
+ "version": "9.24.0",
4
4
  "description": "A helper utility to parse and validate WebdriverIO options",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-config",
@@ -37,11 +37,12 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@wdio/logger": "9.18.0",
40
- "@wdio/types": "9.23.2",
41
- "@wdio/utils": "9.23.2",
40
+ "@wdio/types": "9.24.0",
41
+ "@wdio/utils": "9.24.0",
42
42
  "deepmerge-ts": "^7.0.3",
43
43
  "glob": "^10.2.2",
44
- "import-meta-resolve": "^4.0.0"
44
+ "import-meta-resolve": "^4.0.0",
45
+ "jiti": "^2.6.1"
45
46
  },
46
47
  "publishConfig": {
47
48
  "access": "public"
@@ -49,5 +50,5 @@
49
50
  "devDependencies": {
50
51
  "minimatch": "^9.0.0"
51
52
  },
52
- "gitHead": "3447f2744e52b367ad1164ff6a920924d830e4ee"
53
+ "gitHead": "504e648c88b9660ec70fa8247c25e46369768fd9"
53
54
  }