From 19998a2552d00ab82b6593784cc8010e023ecadb Mon Sep 17 00:00:00 2001 From: jycouet Date: Tue, 7 Apr 2026 11:02:09 +0200 Subject: [PATCH 1/2] ci: verify API surface is up to date after build --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef4c6226e..78635b75c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,8 @@ jobs: cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm build + - name: Verify API surface is up to date + run: git diff --exit-code '**/api-surface*.md' || (echo "API surface is out of date. Run 'pnpm build' and commit the changes." && exit 1) - run: pnpm check test: runs-on: ${{ matrix.os }} From d4df8b01d5e23672648cf7a4e6f7d911a11e26e9 Mon Sep 17 00:00:00 2001 From: jycouet Date: Tue, 7 Apr 2026 11:02:48 +0200 Subject: [PATCH 2/2] chore: update API surface --- packages/sv-utils/api-surface.md | 3 +++ packages/sv/api-surface.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sv-utils/api-surface.md b/packages/sv-utils/api-surface.md index 21dfcbb01..f80fad301 100644 --- a/packages/sv-utils/api-surface.md +++ b/packages/sv-utils/api-surface.md @@ -639,6 +639,7 @@ declare function addFragment( content: string, options?: { mode?: 'append' | 'prepend'; + language?: 'ts' | 'js'; } ): void; type TransformFn = (content: string) => string; @@ -748,11 +749,13 @@ type Package = { keywords?: string[]; workspaces?: string[]; }; + declare function fileExists(cwd: string, filePath: string): boolean; declare function loadFile(cwd: string, filePath: string): string; declare function saveFile(cwd: string, filePath: string, content: string): void; + declare function loadPackageJson(cwd: string): { source: string; data: Package; diff --git a/packages/sv/api-surface.md b/packages/sv/api-surface.md index f83add881..a08e7098e 100644 --- a/packages/sv/api-surface.md +++ b/packages/sv/api-surface.md @@ -21,7 +21,7 @@ type FileType = { condition?: ConditionDefinition; content: (editor: FileEditor) => string; }; -/** @deprecated use `create({ cwd, ...options })` instead */ +/** @deprecated use `create({ cwd, ...options })` instead. */ declare function create(cwd: string, options: Omit): void; declare function create(options: Options): void; export {