create-wdio 8.3.0 → 8.3.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.
@@ -61,3 +61,4 @@ export const DEV_FLAG = {
61
61
  yarn: '--dev',
62
62
  bun: '--dev'
63
63
  };
64
+ export const PMs = Object.keys(INSTALL_COMMAND);
package/build/index.js CHANGED
@@ -6,7 +6,7 @@ import { detect } from 'detect-package-manager';
6
6
  import { readPackageUp } from 'read-pkg-up';
7
7
  import { Command } from 'commander';
8
8
  import { runProgram, getPackageVersion } from './utils.js';
9
- import { ASCII_ROBOT, PROGRAM_TITLE, UNSUPPORTED_NODE_VERSION, DEFAULT_NPM_TAG, INSTALL_COMMAND, DEV_FLAG } from './constants.js';
9
+ import { ASCII_ROBOT, PROGRAM_TITLE, UNSUPPORTED_NODE_VERSION, DEFAULT_NPM_TAG, INSTALL_COMMAND, DEV_FLAG, PMs } from './constants.js';
10
10
  const WDIO_COMMAND = 'wdio';
11
11
  let projectDir;
12
12
  export async function run(operation = createWebdriverIO) {
@@ -56,7 +56,8 @@ export async function createWebdriverIO(opts) {
56
56
  * doesn't mark it as a Yarn project
57
57
  * @see https://github.com/egoist/detect-package-manager/issues/11
58
58
  */
59
- await runProgram('npm', ['install'], { cwd: root, stdio: 'ignore' });
59
+ const cmd = PMs.includes(process.argv0) ? process.argv0 : 'npm';
60
+ await runProgram(cmd, ['install'], { cwd: root, stdio: 'ignore' });
60
61
  }
61
62
  console.log(`\nInstalling ${chalk.bold('@wdio/cli')} to initialize project...`);
62
63
  const pm = await detect({ cwd: root });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-wdio",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "description": "Install and setup a WebdriverIO project with all its dependencies in a single run",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "license": "MIT",
package/vitest.config.ts CHANGED
@@ -16,7 +16,7 @@ export default defineConfig({
16
16
  exclude: ['**/build/**', '__mocks__', '**/*.test.ts'],
17
17
  lines: 97,
18
18
  functions: 80,
19
- branches: 72,
19
+ branches: 70,
20
20
  statements: 97
21
21
  }
22
22
  }