Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/changelog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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',
description: 'Release notes for the recall-context npm package.',
};

export default async function ChangelogPage() {
const markdown = await readRepoMarkdown('CHANGELOG.md');
const markdown = await readChangelogMarkdown();

return (
<Container className="py-16 sm:py-20">
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/roadmap/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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',
description: 'What is in scope, deferred, and planned for Recall.',
};

export default async function RoadmapPage() {
const markdown = await readRepoMarkdown('docs', 'roadmap.md');
const markdown = await readRoadmapMarkdown();

return (
<Container className="py-16 sm:py-20">
Expand Down
20 changes: 16 additions & 4 deletions apps/web/src/lib/read-repo-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
const path = join(process.cwd(), '..', '..', ...segments);
return readFile(path, 'utf8');
export function readChangelogMarkdown(): Promise<string> {
return readFile(join(process.cwd(), '..', '..', 'CHANGELOG.md'), 'utf8');
}

export function readRoadmapMarkdown(): Promise<string> {
return readFile(join(process.cwd(), '..', '..', 'docs', 'roadmap.md'), 'utf8');
}