diff --git a/.github/workflows/test-app-e2e.yaml b/.github/workflows/test-app-e2e.yaml index 6c92a4c320f..7c4c349ecc7 100644 --- a/.github/workflows/test-app-e2e.yaml +++ b/.github/workflows/test-app-e2e.yaml @@ -31,13 +31,13 @@ jobs: os: [ubuntu-22.04, macos-11, windows-2022] group: [1, 2, 3] include: - - node-version: 16.x + - node-version: 18.x os: ubuntu-22.04 group: 1 - - node-version: 16.x + - node-version: 18.x os: ubuntu-22.04 group: 2 - - node-version: 16.x + - node-version: 18.x os: ubuntu-22.04 group: 3 steps: diff --git a/framework-plugins/svelte/tests/smoke-tests.spec.ts b/framework-plugins/svelte/tests/smoke-tests.spec.ts index 8b0b5af4b6b..199a94b73ae 100644 --- a/framework-plugins/svelte/tests/smoke-tests.spec.ts +++ b/framework-plugins/svelte/tests/smoke-tests.spec.ts @@ -12,27 +12,21 @@ test.describe.parallel("smoke tests", () => { ids: { svelte3: ["src/App.svelte:App"], svelte4: ["src/App.svelte:App"], - ...(parseInt(process.versions.node.split(".")[0]!) >= 16 - ? { - // SvelteKit requires Node 16. - // See https://github.com/sveltejs/kit/issues/2412 - "sveltekit-app": ["src/routes/+page.svelte:+page"], - "sveltekit-demo": [ - "src/routes/+page.svelte:+page", - "src/routes/Header.svelte:Header", - ], - "vite-storybook-js": [ - "src/stories/Button.stories.js:Primary", - "src/stories/Page.stories.js:LoggedOut", - "src/stories/Page.stories.js:LoggedIn", - ], - "vite-storybook-ts": [ - "src/stories/Button.stories.ts:Primary", - "src/stories/Page.stories.ts:LoggedOut", - "src/stories/Page.stories.ts:LoggedIn", - ], - } - : {}), + "sveltekit-app": ["src/routes/+page.svelte:+page"], + "sveltekit-demo": [ + "src/routes/+page.svelte:+page", + "src/routes/Header.svelte:Header", + ], + "vite-storybook-js": [ + "src/stories/Button.stories.js:Primary", + "src/stories/Page.stories.js:LoggedOut", + "src/stories/Page.stories.js:LoggedIn", + ], + "vite-storybook-ts": [ + "src/stories/Button.stories.ts:Primary", + "src/stories/Page.stories.ts:LoggedOut", + "src/stories/Page.stories.ts:LoggedIn", + ], }, }); }); diff --git a/integrations/cli/package.json b/integrations/cli/package.json index 0e73abfe2d1..1b591157d48 100644 --- a/integrations/cli/package.json +++ b/integrations/cli/package.json @@ -38,6 +38,6 @@ "typescript": "^5.3.3" }, "engines": { - "node": "^16.20.0 || ^18 || ^20" + "node": ">=18" } } diff --git a/integrations/intellij/src/main/kotlin/com/previewjs/intellij/plugin/services/PreviewJsSharedService.kt b/integrations/intellij/src/main/kotlin/com/previewjs/intellij/plugin/services/PreviewJsSharedService.kt index 7fffe797e61..23fb0fac314 100644 --- a/integrations/intellij/src/main/kotlin/com/previewjs/intellij/plugin/services/PreviewJsSharedService.kt +++ b/integrations/intellij/src/main/kotlin/com/previewjs/intellij/plugin/services/PreviewJsSharedService.kt @@ -241,10 +241,8 @@ ${e.stackTraceToString()}""", val matchResult = "v(\\d+)\\.(\\d+)".toRegex().find(nodeVersion) matchResult?.let { val majorVersion = matchResult.groups[1]!!.value.toInt() - val minorVersion = matchResult.groups[2]!!.value.toInt() - // Minimum version: 16.14.0. - if (majorVersion < 16 || majorVersion == 16 && minorVersion < 14) { - throw NodeVersionError("Preview.js needs NodeJS 16.14.0+ to run, but current version is: ${nodeVersion}\n\nPlease upgrade then restart your IDE.") + if (majorVersion < 18) { + throw NodeVersionError("Preview.js needs NodeJS 18+ to run, but current version is: ${nodeVersion}\n\nPlease upgrade then restart your IDE.") } } } diff --git a/integrations/vscode/src/start-daemon.ts b/integrations/vscode/src/start-daemon.ts index 7eb2a7d229c..535fdb41527 100644 --- a/integrations/vscode/src/start-daemon.ts +++ b/integrations/vscode/src/start-daemon.ts @@ -205,22 +205,20 @@ function checkNodeVersionResult(result: ExecaReturnValue): result.exitCode !== 0 ? ` with exit code ${result.exitCode}` : ""; return { kind: "invalid", - message: `Preview.js needs NodeJS 16.14.0+ but running \`node\` failed${withExitCode}.\n\nIs it installed? You may need to restart your IDE.\n`, + message: `Preview.js needs NodeJS 18+ but running \`node\` failed${withExitCode}.\n\nIs it installed? You may need to restart your IDE.\n`, }; } const nodeVersion = stripAnsi(result.stdout).split("\n").at(-1)!.trim(); const match = nodeVersion.match(/^v(\d+)\.(\d+).*$/); const invalidVersion = { kind: "invalid", - message: `Preview.js needs NodeJS 16.14.0+ to run.\n\nPlease upgrade then restart your IDE.`, + message: `Preview.js needs NodeJS 18+ to run.\n\nPlease upgrade then restart your IDE.`, } as const; if (!match) { return invalidVersion; } const majorVersion = parseInt(match[1]!, 10); - const minorVersion = parseInt(match[2]!, 10); - // Minimum version: 16.14.0. - if (majorVersion < 16 || (majorVersion === 16 && minorVersion < 14)) { + if (majorVersion < 18) { return invalidVersion; } diff --git a/screenshot/package.json b/screenshot/package.json index 2b24ccce995..fa6811f4d18 100644 --- a/screenshot/package.json +++ b/screenshot/package.json @@ -22,7 +22,7 @@ "e2e-test": "cd test-app && node generate-screenshots.js" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": ">=18" }, "dependencies": { "@previewjs/analyzer-api": "^0.1.5",