diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48118df..60ed68c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,17 +20,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@v6 with: version: 10.33.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: 22 cache: pnpm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index adbeaf7..f97ff61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,17 +29,17 @@ jobs: if: ${{ vars.RECALL_RELEASES_ENABLED == 'true' }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@v6 with: version: 10.33.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: 22 cache: pnpm diff --git a/apps/web/src/app/changelog/page.tsx b/apps/web/src/app/changelog/page.tsx index 1553fb2..962a402 100644 --- a/apps/web/src/app/changelog/page.tsx +++ b/apps/web/src/app/changelog/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from 'next'; import { Container } from '@/components/ui/container'; import { renderSimpleMarkdown } from '@/lib/simple-markdown'; -import { readRepoMarkdown } from '@/lib/read-repo-markdown'; +import { readChangelogMarkdown } from '@/lib/read-repo-markdown'; export const metadata: Metadata = { title: 'Changelog', @@ -9,7 +9,7 @@ export const metadata: Metadata = { }; export default async function ChangelogPage() { - const markdown = await readRepoMarkdown('CHANGELOG.md'); + const markdown = await readChangelogMarkdown(); return ( diff --git a/apps/web/src/app/roadmap/page.tsx b/apps/web/src/app/roadmap/page.tsx index ce62d25..411f5a3 100644 --- a/apps/web/src/app/roadmap/page.tsx +++ b/apps/web/src/app/roadmap/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from 'next'; import { Container } from '@/components/ui/container'; import { renderSimpleMarkdown } from '@/lib/simple-markdown'; -import { readRepoMarkdown } from '@/lib/read-repo-markdown'; +import { readRoadmapMarkdown } from '@/lib/read-repo-markdown'; export const metadata: Metadata = { title: 'Roadmap', @@ -9,7 +9,7 @@ export const metadata: Metadata = { }; export default async function RoadmapPage() { - const markdown = await readRepoMarkdown('docs', 'roadmap.md'); + const markdown = await readRoadmapMarkdown(); return ( diff --git a/apps/web/src/lib/read-repo-markdown.ts b/apps/web/src/lib/read-repo-markdown.ts index c6faca4..0a64f2c 100644 --- a/apps/web/src/lib/read-repo-markdown.ts +++ b/apps/web/src/lib/read-repo-markdown.ts @@ -2,11 +2,23 @@ import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; /** - * Reads a Markdown file from the monorepo root (two levels up from + * Reads specific Markdown files from the monorepo root (two levels up from * apps/web) — used so pages like /changelog and /roadmap render the * repository's actual source-of-truth files instead of a duplicated copy. + * + * Each function below resolves a single, fully literal path rather than + * accepting caller-supplied segments: Turbopack's static file tracer can + * only prove which files a build needs when the `path.join(...)` arguments + * are literals it can evaluate at build time. A spread/variadic path (e.g. + * `join(process.cwd(), '..', '..', ...segments)`) can resolve to anything, + * so the tracer falls back to bundling the entire project as server output. + * A literal argument list per file keeps each read scoped to exactly the + * one file it needs. */ -export function readRepoMarkdown(...segments: string[]): Promise { - const path = join(process.cwd(), '..', '..', ...segments); - return readFile(path, 'utf8'); +export function readChangelogMarkdown(): Promise { + return readFile(join(process.cwd(), '..', '..', 'CHANGELOG.md'), 'utf8'); +} + +export function readRoadmapMarkdown(): Promise { + return readFile(join(process.cwd(), '..', '..', 'docs', 'roadmap.md'), 'utf8'); }