Skip to content

Commit b75c48e

Browse files
committed
refactor: 💡 import tree utils from tree-dump instead of sonic-forest
1 parent 9775094 commit b75c48e

File tree

11 files changed

+38
-38
lines changed

11 files changed

+38
-38
lines changed

src/json-crdt-extensions/peritext/Peritext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {printTree} from 'sonic-forest/lib/print/printTree';
1+
import {printTree} from 'tree-dump/lib/printTree';
22
import {Anchor} from './rga/constants';
33
import {Point} from './rga/Point';
44
import {Range} from './rga/Range';

src/json-crdt-extensions/peritext/overlay/MarkerOverlayPoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {Anchor} from '../rga/constants';
44
import type {AbstractRga} from '../../../json-crdt/nodes/rga';
55
import type {ITimestampStruct} from '../../../json-crdt-patch/clock';
66
import type {MarkerSlice} from '../slice/MarkerSlice';
7-
import {printTree} from 'sonic-forest/lib/print/printTree';
7+
import {printTree} from 'tree-dump/lib/printTree';
88

99
export class MarkerOverlayPoint extends OverlayPoint {
1010
/**

src/json-crdt-extensions/peritext/overlay/Overlay.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {printTree} from 'sonic-forest/lib/print/printTree';
2-
import {printBinary} from 'sonic-forest/lib/print/printBinary';
1+
import {printTree} from 'tree-dump/lib/printTree';
2+
import {printBinary} from 'tree-dump/lib/printBinary';
33
import {first, insertLeft, insertRight, next, prev, remove} from 'sonic-forest/lib/util';
44
import {splay} from 'sonic-forest/lib/splay/util';
55
import {Anchor} from '../rga/constants';

src/json-crdt-extensions/peritext/overlay/OverlayPoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Point} from '../rga/Point';
22
import {compare} from '../../../json-crdt-patch/clock';
33
import {OverlayRef, OverlayRefSliceEnd, OverlayRefSliceStart} from './refs';
4-
import {printTree} from 'sonic-forest/lib/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import type {MarkerSlice} from '../slice/MarkerSlice';
66
import type {HeadlessNode} from 'sonic-forest/lib/types';
77
import type {Printable} from '../../../util/print/types';

src/json-type-value/ObjectValue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {Value} from './Value';
22
import {toText} from '../json-type/typescript/toText';
33
import {TypeSystem} from '../json-type/system/TypeSystem';
4-
import {printTree} from 'sonic-forest/lib/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import type {ResolveType} from '../json-type';
66
import type * as classes from '../json-type/type';
77
import type * as ts from '../json-type/typescript/types';
88
import type {TypeBuilder} from '../json-type/type/TypeBuilder';
9-
import type {Printable} from 'sonic-forest/lib/print/types';
9+
import type {Printable} from 'tree-dump/lib/types';
1010

1111
export type UnObjectType<T> = T extends classes.ObjectType<infer U> ? U : never;
1212
export type UnObjectValue<T> = T extends ObjectValue<infer U> ? U : never;

src/json-type/system/__tests__/TypeSystem.spec.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ describe('.toString()', () => {
1717
},
1818
});
1919
expect(system.toString()).toMatchInlineSnapshot(`
20-
"TypeSystem
21-
├─ aliases
22-
│ ├─ User0
23-
│ │ └─ obj
24-
│ │ ├─ "id":
25-
│ │ │ └─ str
26-
│ │ └─ "address"?:
27-
│ │ └─ ref → [Address]
28-
│ ├─ User1
29-
│ │ └─ ref → [User0]
30-
│ ├─ User
31-
│ │ └─ ref → [User1]
32-
│ ├─ Address0
33-
│ │ └─ obj
34-
│ │ ├─ "id":
35-
│ │ │ └─ str
36-
│ │ └─ "user"?:
37-
│ │ └─ ref → [User]
38-
│ ├─ Address1
39-
│ │ └─ ref → [Address0]
40-
│ └─ Address
41-
│ └─ ref → [Address1]
42-
43-
└─ validators
44-
└─ "empty-string""
45-
`);
20+
"TypeSystem
21+
├─ aliases
22+
│ ├─ User0
23+
│ │ └─ obj
24+
│ │ ├─ "id":
25+
│ │ │ └─ str
26+
│ │ └─ "address"?:
27+
│ │ └─ ref → [Address]
28+
│ ├─ User1
29+
│ │ └─ ref → [User0]
30+
│ ├─ User
31+
│ │ └─ ref → [User1]
32+
│ ├─ Address0
33+
│ │ └─ obj
34+
│ │ ├─ "id":
35+
│ │ │ └─ str
36+
│ │ └─ "user"?:
37+
│ │ └─ ref → [User]
38+
│ ├─ Address1
39+
│ │ └─ ref → [Address0]
40+
│ └─ Address
41+
│ └─ ref → [Address1]
42+
43+
└─ validators
44+
└─ "empty-string""
45+
`);
4646
});
4747
});

src/json-type/type/classes/OrType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as schema from '../../schema';
2-
import {printTree} from 'sonic-forest/lib/print/printTree';
2+
import {printTree} from 'tree-dump/lib/printTree';
33
import {validateTType} from '../../schema/validate';
44
import {ValidatorCodegenContext} from '../../codegen/validator/ValidatorCodegenContext';
55
import {ValidationPath} from '../../codegen/validator/types';

src/json-type/type/classes/TupleType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as schema from '../../schema';
2-
import {printTree} from 'sonic-forest/lib/print/printTree';
2+
import {printTree} from 'tree-dump/lib/printTree';
33
import {validateTType} from '../../schema/validate';
44
import {ValidatorCodegenContext} from '../../codegen/validator/ValidatorCodegenContext';
55
import {ValidationPath} from '../../codegen/validator/types';

src/util/print/printBinary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from 'sonic-forest/lib/print/printBinary';
1+
export * from 'tree-dump/lib/printBinary';

src/util/print/printTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from 'sonic-forest/lib/print/printTree';
1+
export * from 'tree-dump/lib/printTree';

0 commit comments

Comments
 (0)