Skip to content

Commit 5ef7ba9

Browse files
authored
Merge pull request #613 from streamich/tree-dump
Setup `tree-dump` package
2 parents d7e1e91 + be44520 commit 5ef7ba9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+114
-123
lines changed

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@
127127
"@jsonjoy.com/util": "^1.1.0",
128128
"arg": "^5.0.2",
129129
"hyperdyperid": "^1.2.0",
130-
"sonic-forest": "^1.0.0",
131-
"thingies": "^2.0.0"
130+
"sonic-forest": "^1.0.2",
131+
"thingies": "^2.0.0",
132+
"tree-dump": "^1.0.0"
132133
},
133134
"devDependencies": {
134135
"@types/benchmark": "^2.1.5",
@@ -148,13 +149,6 @@
148149
"typescript": "^5.4.5"
149150
},
150151
"jest": {
151-
"verbose": true,
152-
"testEnvironmentOptions": {
153-
"url": "http://localhost/"
154-
},
155-
"setupFiles": [
156-
"<rootDir>/src/__tests__/setup.js"
157-
],
158152
"moduleFileExtensions": [
159153
"ts",
160154
"js"

src/__tests__/setup.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/json-crdt-extensions/cnt/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {delayed} from '../../json-crdt-patch/builder/DelayedValueBuilder';
22
import {ext} from '../../json-crdt/extensions';
33
import {ExtensionId} from '../constants';
4-
import {printTree} from '../../util/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import {NodeApi} from '../../json-crdt/model/api/nodes';
66
import type {ExtensionDefinition, ObjNode} from '../../json-crdt';
77
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
88
import type {ExtensionJsonNode, JsonNode} from '../../json-crdt';
9-
import type {Printable} from '../../util/print/types';
9+
import type {Printable} from 'tree-dump/lib/types';
1010
import type {ExtensionApi} from '../../json-crdt';
1111

1212
const name = 'cnt';

src/json-crdt-extensions/mval/ValueMv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {ArrNode} from '../../json-crdt/nodes/arr/ArrNode';
2-
import {printTree} from '../../util/print/printTree';
2+
import {printTree} from 'tree-dump/lib/printTree';
33
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
44
import type {ExtensionJsonNode, JsonNode} from '../../json-crdt';
5-
import type {Printable} from '../../util/print/types';
5+
import type {Printable} from 'tree-dump/lib/types';
66

77
export class ValueMv implements ExtensionJsonNode, Printable {
88
public readonly id: ITimestampStruct;

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

Lines changed: 2 additions & 2 deletions
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';
@@ -11,7 +11,7 @@ import {interval} from '../../json-crdt-patch/clock';
1111
import {CONST, updateNum} from '../../json-hash';
1212
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
1313
import type {Model} from '../../json-crdt/model';
14-
import type {Printable} from '../../util/print/types';
14+
import type {Printable} from 'tree-dump/lib/types';
1515
import type {StringChunk} from './util/types';
1616
import type {SliceType} from './types';
1717
import type {MarkerSlice} from './slice/MarkerSlice';

src/json-crdt-extensions/peritext/editor/Editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {PersistedSlice} from '../slice/PersistedSlice';
66
import {Chars} from '../constants';
77
import type {Range} from '../rga/Range';
88
import type {Peritext} from '../Peritext';
9-
import type {Printable} from '../../../util/print/types';
9+
import type {Printable} from 'tree-dump/lib/types';
1010
import type {Point} from '../rga/Point';
1111
import type {SliceType} from '../types';
1212
import type {MarkerSlice} from '../slice/MarkerSlice';

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: 3 additions & 3 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';
@@ -12,7 +12,7 @@ import {CONST, updateNum} from '../../../json-hash';
1212
import {MarkerSlice} from '../slice/MarkerSlice';
1313
import type {Peritext} from '../Peritext';
1414
import type {Stateful} from '../types';
15-
import type {Printable} from '../../../util/print/types';
15+
import type {Printable} from 'tree-dump/lib/types';
1616
import type {MutableSlice, Slice} from '../slice/types';
1717

1818
export class Overlay implements Printable, Stateful {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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';
7-
import type {Printable} from '../../../util/print/types';
7+
import type {Printable} from 'tree-dump/lib/types';
88
import type {Slice} from '../slice/types';
99

1010
/**

src/json-crdt-extensions/peritext/rga/Point.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {ChunkSlice} from '../util/ChunkSlice';
44
import {updateId} from '../../../json-crdt/hash';
55
import type {AbstractRga, Chunk} from '../../../json-crdt/nodes/rga';
66
import type {Stateful} from '../types';
7-
import type {Printable} from '../../../util/print/types';
7+
import type {Printable} from 'tree-dump/lib/types';
88

99
/**
1010
* A "point" in a rich-text Peritext document. It is a combination of a

0 commit comments

Comments
 (0)