@wdio/cli 8.0.12 → 8.0.13

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,3 @@
1
- /// <reference types="node" />
2
- import cp from 'node:child_process';
3
1
  import type { Argv } from 'yargs';
4
2
  import type { RunCommandArguments } from '../types';
5
3
  export declare const command = "run <configPath>";
@@ -170,5 +168,5 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{}, "fr
170
168
  }>>;
171
169
  export declare function launchWithStdin(wdioConfPath: string, params: Partial<RunCommandArguments>): void;
172
170
  export declare function launch(wdioConfPath: string, params: Partial<RunCommandArguments>): Promise<void>;
173
- export declare function handler(argv: RunCommandArguments): Promise<void | cp.ChildProcess>;
171
+ export declare function handler(argv: RunCommandArguments): Promise<false | void>;
174
172
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,eAAO,MAAM,OAAO,qBAAqB,CAAA;AAEzC,eAAO,MAAM,IAAI,yEAAyE,CAAA;AAE1F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUlC,CAAA;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAczF;AAED,wBAAsB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,iBAgBtF;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,mCAmFtD"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,eAAO,MAAM,OAAO,qBAAqB,CAAA;AAEzC,eAAO,MAAM,IAAI,yEAAyE,CAAA;AAE1F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUlC,CAAA;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAczF;AAED,wBAAsB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,iBAgBtF;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,yBA8EtD"}
@@ -1,6 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import fs from 'node:fs/promises';
3
- import cp from 'node:child_process';
3
+ import { execa } from 'execa';
4
4
  import Launcher from '../launcher.js';
5
5
  import Watcher from '../watcher.js';
6
6
  import { missingConfigurationPrompt } from './config.js';
@@ -157,9 +157,9 @@ export async function handler(argv) {
157
157
  path.resolve(process.cwd(), params.autoCompileOpts?.tsNodeOpts?.project)) ||
158
158
  path.join(path.dirname(wdioConf), 'tsconfig.json'));
159
159
  const hasLocalTSConfig = await fs.access(localTSConfigPath).then(() => true, () => false);
160
- const tsProcess = cp.spawn(nodePath, process.argv.slice(1), {
160
+ const p = await execa(nodePath, process.argv.slice(1), {
161
+ reject: false,
161
162
  cwd: process.cwd(),
162
- detached: true,
163
163
  stdio: 'inherit',
164
164
  env: {
165
165
  ...process.env,
@@ -167,11 +167,7 @@ export async function handler(argv) {
167
167
  NODE_OPTIONS
168
168
  }
169
169
  });
170
- /**
171
- * ensure process is killed according to result of new process
172
- */
173
- tsProcess.on('close', (code) => process.exit(code || 0));
174
- return tsProcess;
170
+ return !process.env.VITEST_WORKER_ID && process.exit(p.exitCode);
175
171
  }
176
172
  /**
177
173
  * if `--watch` param is set, run launcher in watch mode
package/build/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
1
  import Launcher from './launcher.js';
3
- export declare const run: () => Promise<void | import("child_process").ChildProcess>;
2
+ export declare const run: () => Promise<false | void>;
4
3
  export default Launcher;
5
4
  export * from './types.js';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAOA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAqBpC,eAAO,MAAM,GAAG,4DA0Df,CAAA;AAED,eAAe,QAAQ,CAAA;AACvB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAqBpC,eAAO,MAAM,GAAG,6BA0Df,CAAA;AAED,eAAe,QAAQ,CAAA;AACvB,cAAc,YAAY,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/cli",
3
- "version": "8.0.12",
3
+ "version": "8.0.13",
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,17 +40,18 @@
40
40
  "@types/lodash.union": "^4.6.7",
41
41
  "@types/recursive-readdir": "^2.2.1",
42
42
  "@types/yargs": "^17.0.10",
43
- "@wdio/config": "8.0.11",
44
- "@wdio/globals": "8.0.12",
43
+ "@wdio/config": "8.0.13",
44
+ "@wdio/globals": "8.0.13",
45
45
  "@wdio/logger": "8.0.0",
46
46
  "@wdio/protocols": "8.0.0",
47
47
  "@wdio/types": "8.0.11",
48
- "@wdio/utils": "8.0.11",
48
+ "@wdio/utils": "8.0.13",
49
49
  "async-exit-hook": "^2.0.1",
50
50
  "chalk": "^5.0.1",
51
51
  "chokidar": "^3.5.3",
52
52
  "cli-spinners": "^2.6.1",
53
53
  "ejs": "^3.1.8",
54
+ "execa": "^6.1.0",
54
55
  "import-meta-resolve": "^2.1.0",
55
56
  "inquirer": "9.1.2",
56
57
  "lodash.flattendeep": "^4.4.0",
@@ -59,7 +60,7 @@
59
60
  "mkdirp": "^1.0.4",
60
61
  "read-pkg-up": "9.1.0",
61
62
  "recursive-readdir": "^2.2.2",
62
- "webdriverio": "8.0.12",
63
+ "webdriverio": "8.0.13",
63
64
  "yargs": "^17.5.1",
64
65
  "yarn-install": "^1.0.0"
65
66
  },
@@ -69,5 +70,5 @@
69
70
  "devDependencies": {
70
71
  "@types/node": "^18.0.0"
71
72
  },
72
- "gitHead": "2d97efe9eb605cb1858792e2ff8309f5ca77c60a"
73
+ "gitHead": "912db21d2cd4552a02b776ba74cae05440b076de"
73
74
  }