create-wdio
Advanced tools
Comparing version 8.4.9 to 8.4.10
@@ -50,4 +50,4 @@ import { colorItBold, colorIt } from './utils.js'; | ||
export const UNSUPPORTED_NODE_VERSION = ('⚠️ Unsupported Node.js Version Error ⚠️\n' + | ||
`You are using Node.js ${process.version} which is to old to be used with WebdriverIO.\n` + | ||
'Please update to Node.js v16 to continue.\n'); | ||
`You are using Node.js ${process.version} which is too old to be used with WebdriverIO.\n` + | ||
'Please update to Node.js v20 to continue.\n'); | ||
export const INSTALL_COMMAND = { | ||
@@ -54,0 +54,0 @@ npm: 'install', |
@@ -42,2 +42,15 @@ import fs from 'node:fs/promises'; | ||
} | ||
/** | ||
* detects the package manager that was used | ||
* uses the environment variable `npm_config_user_agent` to detect the package manager | ||
* falls back to `npm` if no package manager could be detected | ||
*/ | ||
function detectPackageManager() { | ||
if (!process.env.npm_config_user_agent) { | ||
return 'npm'; | ||
} | ||
const detectedPM = process.env.npm_config_user_agent.split('/')[0].toLowerCase(); | ||
const matchedPM = PMs.find(pm => pm.toLowerCase() === detectedPM); | ||
return matchedPM || 'npm'; | ||
} | ||
export async function createWebdriverIO(opts) { | ||
@@ -49,9 +62,3 @@ const npmTag = opts.npmTag.startsWith('@') ? opts.npmTag : `@${opts.npmTag}`; | ||
*/ | ||
const pm = PMs.find((pm) => ( | ||
// for pnpm check "~/Library/pnpm/store/v3/..." | ||
// for NPM check "~/.npm/npx/..." | ||
// for Yarn check "~/.yarn/bin/create-wdio" | ||
// for Bun check "~/.bun/bin/create-wdio" | ||
process.argv[1].includes(`${path.sep}${pm}${path.sep}`) || | ||
process.argv[1].includes(`${path.sep}.${pm}${path.sep}`))) || 'npm'; | ||
const pm = detectPackageManager(); | ||
const hasPackageJson = await fs.access(path.resolve(root, 'package.json')).then(() => true).catch(() => false); | ||
@@ -58,0 +65,0 @@ if (!hasPackageJson) { |
{ | ||
"name": "create-wdio", | ||
"version": "8.4.9", | ||
"version": "8.4.10", | ||
"description": "Install and setup a WebdriverIO project with all its dependencies in a single run", | ||
@@ -28,3 +28,3 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"build": "run-s clean compile", | ||
"clean": "rimraf tsconfig.tsbuildinfo ./build ./coverage", | ||
"clean": "rm -rf tsconfig.tsbuildinfo ./build ./coverage", | ||
"compile": "tsc -p ./tsconfig.json", | ||
@@ -37,3 +37,3 @@ "release": "release-it --github.release", | ||
"test": "run-s build test:*", | ||
"test:eslint": "eslint -c ./.eslintrc.cjs ./src/**/*.ts ./tests/**/*.ts", | ||
"test:eslint": "eslint -c ./eslint.config.js ./src/**/*.ts ./tests/**/*.ts", | ||
"test:unit": "vitest run", | ||
@@ -44,14 +44,15 @@ "watch": "npm run compile -- --watch", | ||
"devDependencies": { | ||
"@eslint/js": "^9.13.0", | ||
"@types/cross-spawn": "^6.0.6", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/node": "^22.0.0", | ||
"@types/semver": "^7.5.8", | ||
"@typescript-eslint/eslint-plugin": "^8.1.0", | ||
"@typescript-eslint/parser": "^8.1.0", | ||
"@vitest/coverage-v8": "^2.0.5", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint": "^9.13.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-unicorn": "^56.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"release-it": "^17.6.0", | ||
"typescript": "^5.5.4", | ||
"typescript": "^5.6.3", | ||
"typescript-eslint": "^8.10.0", | ||
"vitest": "^2.0.5" | ||
@@ -58,0 +59,0 @@ }, |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
16722
14
10
280
2