Skip to content

Commit 6bc4f18

Browse files
committed
refactor: resolve isConnected naming conflict
Rename analyzer.isConnected to isGraphConnected to avoid conflict with graph-spec.isConnected (type guard for GraphSpec). Update validation/index to not re-export isConnected from helpers.
1 parent bcc881f commit 6bc4f18

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

packages/algorithms/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*/
44

55
// Graph property analysis (moved to @bibgraph/graph-gen)
6-
// export * from "./graph-spec-analyzer";
6+
// Re-export for backward compatibility
7+
export * from "@bibgraph/graph-gen";
78

89
// Core analysis algorithms
910
export * from "./analysis/scc";

packages/graph-gen/src/graph-spec-analyzer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,9 +2061,10 @@ export function isRegular(g: AnalyzerGraph): boolean {
20612061
}
20622062

20632063
/**
2064-
* Check if graph is connected.
2064+
* Check if graph is connected (runtime check for AnalyzerGraph).
2065+
* Note: Different from graph-spec.isConnected which is a type guard for GraphSpec.
20652066
*/
2066-
export function isConnected(g: AnalyzerGraph): boolean {
2067+
export function isGraphConnected(g: AnalyzerGraph): boolean {
20672068
return axisKindIs("connectivity", "connected")(g);
20682069
}
20692070

packages/graph-gen/src/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,17 @@
55
* and mathematical constraint validation.
66
*/
77

8-
// Placeholder exports - will be populated when moving code from algorithms package
9-
export {};
8+
// Graph specification types
9+
export * from "./graph-spec";
10+
11+
// Graph property analysis
12+
export * from "./graph-spec-analyzer";
13+
14+
// Mathematical constraint validation
15+
export * from "./graph-spec-constraints";
16+
17+
// Graph validation
18+
export * from "./validation/index";
19+
20+
// Test fixture generation
21+
export * from "./graph-generator";

packages/graph-gen/src/validation/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ export type { PropertyValidationResult, GraphValidationResult } from './types';
1010

1111
// Export helper functions
1212
export {
13-
isConnected,
1413
buildAdjacencyList,
1514
findComponentsForDensity,
1615
checkBipartiteWithBFS
1716
} from './helper-functions';
1817

18+
// Note: isConnected is not re-exported to avoid conflict with graph-spec.isConnected
19+
// Import directly from './helper-functions' if needed for runtime graph checking
20+
1921
// Export basic validators
2022
export {
2123
validateDirectionality,

0 commit comments

Comments
 (0)