Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit bf24b97

Browse files
fix: bump minimum required Node.js version to install - fixes webdriverio/webdriverio#13853
1 parent c001d1d commit bf24b97

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tidelift: "npm/geckodriver"
2+
open_collective: webdriverio
3+
github: [christian-bromann,webdriverio]

src/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const PROGRAM_TITLE = `
5454
export const UNSUPPORTED_NODE_VERSION = (
5555
'⚠️ Unsupported Node.js Version Error ⚠️\n' +
5656
`You are using Node.js ${process.version} which is too old to be used with WebdriverIO.\n` +
57-
'Please update to Node.js v16 to continue.\n'
57+
'Please update to Node.js v20 to continue.\n'
5858
)
5959

6060
export const INSTALL_COMMAND: Record<PM, string> = {
@@ -69,14 +69,14 @@ export const EXECUTER: Record<PM, string> = {
6969
pnpm: 'pnpm',
7070
yarn: 'yarn',
7171
bun: 'bunx'
72-
} as const
72+
} as const
7373

7474
export const EXECUTE_COMMAND: Record<PM, string> = {
7575
npm: '',
7676
pnpm: 'exec',
7777
yarn: 'exec',
7878
bun: ''
79-
} as const
79+
} as const
8080

8181
export const DEV_FLAG: Record<PM, string> = {
8282
npm: '--save-dev',

tests/index.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ test('run', async () => {
6464
})
6565

6666
test('does not run if Node.js version is too low', async () => {
67+
const consoleLog = vi.spyOn(console, 'log')
6768
vi.mocked(semver.satisfies).mockReturnValue(false)
6869
const op = vi.fn().mockResolvedValue({})
6970
await run(op)
7071
expect(op).toBeCalledTimes(0)
72+
expect(consoleLog).toBeCalledWith(expect.stringContaining('Please update to Node.js v20 to continue.'))
7173
})
7274

7375
test('createWebdriverIO with Yarn', async () => {
@@ -125,7 +127,7 @@ test('createWebdriverIO with invalid agent should run npm commands', async () =>
125127
})
126128

127129
test('createWebdriverIO with no npm user agent should run npm commands', async () => {
128-
vi.stubEnv('npm_config_user_agent', undefined)
130+
vi.stubEnv('npm_config_user_agent', '')
129131
await createWebdriverIO({ npmTag: 'latest' } as ProgramOpts)
130132
expect(runProgram).toBeCalledWith(
131133
'npm',

0 commit comments

Comments
 (0)