fix: satisfy release project build

This commit is contained in:
lucaronin
2026-05-20 23:19:52 +02:00
parent c7c53cafa2
commit d5b2773436
2 changed files with 8 additions and 9 deletions

View File

@@ -155,10 +155,7 @@ fi
# ── 0. TypeScript + Vite build ──────────────────────────────────────────
echo ""
echo "📦 [0/5] TypeScript + Vite build..."
pnpm exec tsc --noEmit
# TypeScript is checked explicitly above; run Vite directly here to avoid
# paying for the package build script's duplicate `tsc -b` pass.
pnpm exec vite build
pnpm build
echo " ✅ Build OK"
# ── 1. Frontend coverage (≥70%) — includes all unit tests ───────────────

View File

@@ -8,8 +8,8 @@ interface AutoGitWorkInput {
remoteStatusForRepository: (path: string) => GitRemoteStatus | null
}
function hasPushableCommits(status: GitRemoteStatus | null | undefined): boolean {
return status?.hasRemote === true && status.ahead > 0
function pushableAhead(status: GitRemoteStatus | null | undefined): number | null {
return status?.hasRemote === true && status.ahead > 0 ? status.ahead : null
}
function modifiedFileSignature(file: ModifiedFile): string {
@@ -21,7 +21,8 @@ function pushableRepositorySignature(
remoteStatusForRepository: (path: string) => GitRemoteStatus | null,
): string | null {
const status = remoteStatusForRepository(path)
return hasPushableCommits(status) ? `${path}:${status.ahead}` : null
const ahead = pushableAhead(status)
return ahead === null ? null : `${path}:${ahead}`
}
function activeRemoteSignature({
@@ -29,9 +30,10 @@ function activeRemoteSignature({
activeVaultPath,
repositoryPaths,
}: Pick<AutoGitWorkInput, 'activeRemoteStatus' | 'activeVaultPath' | 'repositoryPaths'>): string | null {
if (!hasPushableCommits(activeRemoteStatus)) return null
const ahead = pushableAhead(activeRemoteStatus)
if (ahead === null) return null
if (repositoryPaths.includes(activeVaultPath)) return null
return `${activeVaultPath}:${activeRemoteStatus.ahead}`
return `${activeVaultPath}:${ahead}`
}
export function autoGitWorkSignature({