Skip to content
This repository was archived by the owner on Jul 13, 2024. It is now read-only.

Commit d89316c

Browse files
committed
Break circular dependency with Mode
1 parent ad51a10 commit d89316c

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

packages/gitgraph-core/src/gitgraph.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Branch, DELETED_BRANCH_NAME, createDeletedBranch } from "./branch";
22
import { Commit } from "./commit";
33
import { createGraphRows, GraphRows } from "./graph-rows";
4+
import { Mode } from "./mode";
45
import { BranchesOrder, CompareBranchesOrder } from "./branches-order";
56
import {
67
Template,
@@ -17,11 +18,7 @@ import {
1718
GitgraphBranchOptions,
1819
} from "./user-api/gitgraph-user-api";
1920

20-
export { Mode, GitgraphOptions, RenderedData, GitgraphCore };
21-
22-
enum Mode {
23-
Compact = "compact",
24-
}
21+
export { GitgraphOptions, RenderedData, GitgraphCore };
2522

2623
interface GitgraphOptions {
2724
template?: TemplateName | Template;

packages/gitgraph-core/src/graph-rows/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Mode } from "../gitgraph";
1+
import { Mode } from "../mode";
22
import { Commit } from "../commit";
33

44
import { CompactGraphRows } from "./compact";

packages/gitgraph-core/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export { GitgraphCore, GitgraphOptions, RenderedData, Mode } from "./gitgraph";
1+
export { GitgraphCore, GitgraphOptions, RenderedData } from "./gitgraph";
2+
export { Mode } from "./mode";
23
export {
34
GitgraphUserApi,
45
GitgraphCommitOptions,

packages/gitgraph-core/src/mode.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export { Mode };
2+
3+
enum Mode {
4+
Compact = "compact",
5+
}

packages/gitgraph-core/src/user-api/branch-user-api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { GitgraphCore, Mode } from "../gitgraph";
1+
import { GitgraphCore } from "../gitgraph";
2+
import { Mode } from "../mode";
23
import {
34
GitgraphCommitOptions,
45
GitgraphBranchOptions,

0 commit comments

Comments
 (0)