diff --git a/package.json b/package.json index 17d0396..3db93a8 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,9 @@ "name": "gippidy", "version": "0.1.0", "private": true, + "engines": { + "node": "22.x" + }, "scripts": { "dev": "next dev", "build": "next build --turbo", @@ -27,4 +30,4 @@ "@types/react-dom": "^19", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/railpack.json b/railpack.json deleted file mode 100644 index 5ad079c..0000000 --- a/railpack.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "packages": { - "node": "22", - "pnpm": "10" - }, - "caches": { - "next": { - "directory": ".next/cache", - "type": "shared" - } - }, - "deploy": { - "startCmd": "pnpm start" - } -} diff --git a/tests/unit.test.ts b/tests/unit.test.ts index a5a2c69..d155bbf 100644 --- a/tests/unit.test.ts +++ b/tests/unit.test.ts @@ -845,6 +845,10 @@ test('dependency footprint stays deliberately small and SDK-free while using dir nextConfigSource.includes("optimizePackageImports: ['highlight.js']"), 'highlight.js imports should stay optimized for faster client bundles', ); + assert.ok( + pkg.engines?.node === '22.x', + 'package.json should pin the Node major version for deploys', + ); assert.ok( chatRouteSource.includes("fetch('https://api.openai.com/v1/responses'") && chatRouteSource.includes("fetch('https://api.openai.com/v1/chat/completions'") && @@ -852,12 +856,9 @@ test('dependency footprint stays deliberately small and SDK-free while using dir chatRouteSource.includes('https://generativelanguage.googleapis.com/v1beta/models/${model}:streamGenerateContent?key=${apiKey}&alt=sse'), 'provider calls should use the direct HTTP APIs instead of heavyweight SDKs', ); - const railpackConfig = readFileSync(join(import.meta.dirname, '../railpack.json'), 'utf8'); assert.ok( - railpackConfig.includes('"startCmd": "pnpm start"') && - !railpackConfig.includes('.next/standalone') && - !railpackConfig.includes('standalone/server.js'), - 'Railpack should use the normal app start command and should not depend on standalone build artifacts', + !existsSync(join(import.meta.dirname, '../railpack.json')), + 'the repo should no longer rely on a railpack.json file for deploy configuration', ); }); @@ -1287,7 +1288,7 @@ test('getOrCreateKey: same server JWK produces same key across two calls (cross- // ── CSS layout regression ──────────────────────────────────────────────────── -import { readFileSync } from 'node:fs'; +import { existsSync, readFileSync } from 'node:fs'; import { join } from 'node:path'; test('input-row uses align-items: flex-start so the > prompt icon stays at the top', () => {