Skip to content
Open
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
8 changes: 4 additions & 4 deletions scripts/generate-work-dag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Usage: npx tsx scripts/generate-work-dag.ts
*/

import WarpGraph, { GitGraphAdapter } from '@git-stunts/git-warp';
import { WarpCore, GitGraphAdapter } from '@git-stunts/git-warp';
import Plumbing from '@git-stunts/plumbing';
import { execSync } from 'node:child_process';
import { mkdirSync, writeFileSync } from 'node:fs';
Expand Down Expand Up @@ -97,15 +97,15 @@ interface DotOptions {
// ---------------------------------------------------------------------------

async function loadGraph(): Promise<{
graph: InstanceType<typeof WarpGraph>;
graph: InstanceType<typeof WarpCore>;
tasks: Map<string, TaskNode>;
campaigns: Map<string, string>;
sorted: string[];
}> {
const plumbing = await Plumbing.createDefault({ cwd: runtime.repoPath });
const persistence = new GitGraphAdapter({ plumbing });

const graph = await WarpGraph.open({
const graph = await WarpCore.open({
persistence,
graphName: runtime.graphName,
writerId: WRITER_ID,
Expand Down Expand Up @@ -363,7 +363,7 @@ function buildAnalysisInputs(
// ---------------------------------------------------------------------------

async function generateWorkMd(
graph: InstanceType<typeof WarpGraph>,
graph: InstanceType<typeof WarpCore>,
tasks: Map<string, TaskNode>,
summaries: TaskSummary[],
edges: DepEdge[],
Expand Down
9 changes: 8 additions & 1 deletion test/unit/RepositoryHygiene.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync } from 'node:fs';
import { existsSync, readFileSync } from 'node:fs';
import { describe, expect, it } from 'vitest';

const forbiddenRootFiles = [
Expand All @@ -19,4 +19,11 @@ describe('repository hygiene', () => {

expect(present).toEqual([]);
});

it('keeps the work DAG generator on the current git-warp core name', () => {
const source = readFileSync('scripts/generate-work-dag.ts', 'utf8');

expect(source).toContain('WarpCore');
expect(source).not.toContain('WarpGraph');
});
});
Loading