@wdio/cli 9.23.0 → 9.23.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.
package/build/index.js CHANGED
@@ -845,18 +845,6 @@ var Launcher = class {
845
845
  validateConfig(TESTRUNNER_DEFAULTS, { ...config3, capabilities });
846
846
  await enableFileLogging(config3.outputDir);
847
847
  logger3.setLogLevelsConfig(config3.logLevels, config3.logLevel);
848
- const totalWorkerCnt = Array.isArray(capabilities) ? capabilities.map((c) => {
849
- if (this.isParallelMultiremote) {
850
- const keys = Object.keys(c);
851
- const caps2 = c[keys[0]].capabilities;
852
- return this.configParser.getSpecs(caps2["wdio:specs"], caps2["wdio:exclude"]).length;
853
- }
854
- const standaloneCaps = c;
855
- const cap = "alwaysMatch" in standaloneCaps ? standaloneCaps.alwaysMatch : standaloneCaps;
856
- return this.configParser.getSpecs(cap["wdio:specs"], cap["wdio:exclude"]).length;
857
- }).reduce((a, b) => a + b, 0) : 1;
858
- this.interface = new WDIOCLInterface(config3, totalWorkerCnt, this._isWatchMode);
859
- config3.runnerEnv.FORCE_COLOR = Number(this.interface.hasAnsiSupport).toString();
860
848
  const [runnerName, runnerOptions] = Array.isArray(config3.runner) ? config3.runner : [config3.runner, {}];
861
849
  const Runner = (await initializePlugin(runnerName, "runner")).default;
862
850
  this.runner = new Runner(runnerOptions, config3);
@@ -872,6 +860,18 @@ var Launcher = class {
872
860
  log3.info("Run onPrepare hook");
873
861
  await runLauncherHook(config3.onPrepare, config3, caps);
874
862
  await runServiceHook(this._launcher, "onPrepare", config3, caps);
863
+ const totalWorkerCnt = Array.isArray(capabilities) ? capabilities.map((c) => {
864
+ if (this.isParallelMultiremote) {
865
+ const keys = Object.keys(c);
866
+ const caps2 = c[keys[0]].capabilities;
867
+ return this.configParser.getSpecs(caps2["wdio:specs"], caps2["wdio:exclude"]).length;
868
+ }
869
+ const standaloneCaps = c;
870
+ const cap = "alwaysMatch" in standaloneCaps ? standaloneCaps.alwaysMatch : standaloneCaps;
871
+ return this.configParser.getSpecs(cap["wdio:specs"], cap["wdio:exclude"]).length;
872
+ }).reduce((a, b) => a + b, 0) : 1;
873
+ this.interface = new WDIOCLInterface(config3, totalWorkerCnt, this._isWatchMode);
874
+ config3.runnerEnv.FORCE_COLOR = Number(this.interface.hasAnsiSupport).toString();
875
875
  await Promise.all([
876
876
  setupDriver(config3, caps),
877
877
  setupBrowser(config3, caps)
@@ -892,7 +892,9 @@ var Launcher = class {
892
892
  exitCode = await this.#runOnCompleteHook(config3, caps, exitCode);
893
893
  }
894
894
  if (error) {
895
- this.interface.logHookError(error);
895
+ if (this.interface) {
896
+ this.interface.logHookError(error);
897
+ }
896
898
  throw error;
897
899
  }
898
900
  return exitCode;
@@ -924,7 +926,7 @@ var Launcher = class {
924
926
  */
925
927
  async #runOnCompleteHook(config3, caps, exitCode) {
926
928
  log3.info("Run onComplete hook");
927
- const onCompleteResults = await runOnCompleteHook(config3.onComplete, config3, caps, exitCode, this.interface.result);
929
+ const onCompleteResults = await runOnCompleteHook(config3.onComplete, config3, caps, exitCode, this.interface?.result || { finished: 0, passed: 0, retries: 0, failed: 0 });
928
930
  if (this._launcher) {
929
931
  await runServiceHook(this._launcher, "onComplete", exitCode, config3, caps);
930
932
  }
@@ -951,7 +953,7 @@ var Launcher = class {
951
953
  return resolve2(1);
952
954
  });
953
955
  }
954
- const specFileRetries = this._isWatchMode ? 0 : config3.specFileRetries;
956
+ const specFileRetries = this._isWatchMode ? 0 : -1;
955
957
  let cid = 0;
956
958
  if (this.isMultiremote && !this.isParallelMultiremote) {
957
959
  this._schedule.push({
@@ -1280,7 +1282,6 @@ import pickBy2 from "lodash.pickby";
1280
1282
  import flattenDeep from "lodash.flattendeep";
1281
1283
  import union from "lodash.union";
1282
1284
  import logger4 from "@wdio/logger";
1283
- import { FileSystemPathService } from "@wdio/config/node";
1284
1285
  var log4 = logger4("@wdio/cli:watch");
1285
1286
  var Watcher = class {
1286
1287
  constructor(_configFile, _args) {
@@ -1302,9 +1303,11 @@ var Watcher = class {
1302
1303
  chokidar.watch(flattenedSpecs, { ignoreInitial: true }).on("add", this.getFileListener()).on("change", this.getFileListener());
1303
1304
  const { filesToWatch } = this._launcher.configParser.getConfig();
1304
1305
  if (filesToWatch.length) {
1305
- const pathService = new FileSystemPathService();
1306
1306
  const rootDir = path.dirname(path.resolve(process.cwd(), this._configFile));
1307
- const globbedFilesToWatch = filesToWatch.map((file) => pathService.ensureAbsolutePath(file, rootDir));
1307
+ const globbedFilesToWatch = filesToWatch.map((file) => {
1308
+ const absolutePath = path.isAbsolute(file) ? path.normalize(file) : path.resolve(rootDir, file);
1309
+ return absolutePath;
1310
+ });
1308
1311
  chokidar.watch(globbedFilesToWatch, { ignoreInitial: true }).on("add", this.getFileListener(false)).on("change", this.getFileListener(false));
1309
1312
  }
1310
1313
  await this._launcher.run();
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEzD,OAAO,WAAW,MAAM,gBAAgB,CAAA;AAGxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAiBrD,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAA;CAClB;AAID,cAAM,QAAQ;;IAoBN,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,YAAY;IAnBjB,YAAY,EAAE,YAAY,CAAA;IAC1B,aAAa,UAAQ;IACrB,qBAAqB,UAAQ;IAC7B,MAAM,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAA;IAChC,SAAS,CAAC,EAAE,WA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AAED,eAAe,QAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../src/watcher.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAgB,OAAO,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKvE,MAAM,CAAC,OAAO,OAAO,OAAO;IAKpB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,KAAK;IALjB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAa;gBAGf,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAMpD,KAAK;IAsDX;;;;OAIG;IACH,eAAe,CAAE,UAAU,UAAO,IACtB,MAAM,MAAM;IAgCxB;;;;;OAKG;IACH,UAAU,CAAE,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU;IAqB7H;;;OAGG;IACH,GAAG,CAAE,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM;IAqC9C,OAAO;CAGV"}
1
+ {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../src/watcher.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAgB,OAAO,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKvE,MAAM,CAAC,OAAO,OAAO,OAAO;IAKpB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,KAAK;IALjB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAa;gBAGf,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAMpD,KAAK;IA0DX;;;;OAIG;IACH,eAAe,CAAC,UAAU,UAAO,IACrB,MAAM,MAAM;IAgCxB;;;;;OAKG;IACH,UAAU,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU;IAqB5H;;;OAGG;IACH,GAAG,CAAC,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM;IAqC7C,OAAO;CAGV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/cli",
3
- "version": "9.23.0",
3
+ "version": "9.23.1",
4
4
  "description": "WebdriverIO testrunner command line interface",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cli",
@@ -40,12 +40,12 @@
40
40
  "typeScriptVersion": "3.8.3",
41
41
  "dependencies": {
42
42
  "@vitest/snapshot": "^2.1.1",
43
- "@wdio/config": "9.23.0",
43
+ "@wdio/config": "9.23.1",
44
44
  "@wdio/globals": "9.23.0",
45
45
  "@wdio/logger": "9.18.0",
46
- "@wdio/protocols": "9.16.2",
47
- "@wdio/types": "9.20.0",
48
- "@wdio/utils": "9.23.0",
46
+ "@wdio/protocols": "9.23.1",
47
+ "@wdio/types": "9.23.1",
48
+ "@wdio/utils": "9.23.1",
49
49
  "async-exit-hook": "^2.0.1",
50
50
  "chalk": "^5.4.1",
51
51
  "chokidar": "^4.0.0",
@@ -57,7 +57,7 @@
57
57
  "lodash.union": "^4.6.0",
58
58
  "read-pkg-up": "^10.0.0",
59
59
  "tsx": "^4.7.2",
60
- "webdriverio": "9.23.0",
60
+ "webdriverio": "9.23.1",
61
61
  "yargs": "^17.7.2"
62
62
  },
63
63
  "devDependencies": {
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "5b35e4e2b94e3ac5247ec2bf27f2f5e41ef00372"
73
+ "gitHead": "19ac2c1dd86f3bdd967bc6c22c5bcdd78907b988"
74
74
  }