Skip to content

Commit f17e2c3

Browse files
committed
Rename from Graph2 to Graph
1 parent e56eac1 commit f17e2c3

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

packages/core-graph/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export {
66
type GraphSubscriberRecord,
77
type ReadableGraph,
88
type WritableGraph
9-
} from './private/Graph2';
9+
} from './private/Graph';
1010
export { SlantNodeSchema, type SlantNode } from './private/schemas/colorNode';
1111
export {
1212
DirectLineActivityNodeSchema,

packages/core-graph/src/private/Graph2.act.spec.ts renamed to packages/core-graph/src/private/Graph.act.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
33
import { assert, object } from 'valibot';
4-
import Graph from './Graph2';
4+
import Graph from './Graph';
55
import './schemas/private/expectExtendValibot';
66
import './schemas/private/expectIsFrozen';
77

packages/core-graph/src/private/Graph2.getState.spec.ts renamed to packages/core-graph/src/private/Graph.getState.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
3-
import Graph from './Graph2';
3+
import Graph from './Graph';
44
import './schemas/private/expectExtendValibot';
55
import './schemas/private/expectIsFrozen';
66

packages/core-graph/src/private/Graph2.middleware.spec.ts renamed to packages/core-graph/src/private/Graph.middleware.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
33
import { iteratorFilter, iteratorMap } from 'iter-fest';
44
import { fn } from 'jest-mock';
5-
import Graph from './Graph2';
5+
import Graph from './Graph';
66
import type { Identifier } from './schemas/Identifier';
77
import './schemas/private/expectExtendValibot';
88
import './schemas/private/expectIsFrozen';

packages/core-graph/src/private/Graph2.subscribe.spec.ts renamed to packages/core-graph/src/private/Graph.subscribe.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
33
import { fn } from 'jest-mock';
44
import { assert, map, string, unknown } from 'valibot';
5-
import Graph, { type GraphState } from './Graph2';
5+
import Graph, { type GraphState } from './Graph';
66
import './schemas/private/expectExtendValibot';
77
import './schemas/private/expectIsFrozen';
88

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type WritableGraph<TInput extends GraphNode, TOutput extends GraphNode> = {
3333
const requestSchema = pipe(
3434
map(IdentifierSchema, object({ '@id': IdentifierSchema })),
3535
check(
36-
// TODO: Iterator.every is since iOS 18.4, we still need to use ponyfill for now.
36+
// TODO: [P4] Iterator.every is since iOS 18.4, we still need to use ponyfill until we drop support of iOS 18.4.
3737
value => iteratorEvery(value.entries(), ([key, node]) => key === node['@id']),
3838
'Key returned in Map must match `@id` in value'
3939
)
@@ -49,7 +49,7 @@ const middlewareValidator: GraphMiddleware<any, any> = () => next => request =>
4949
return Object.freeze(result);
5050
};
5151

52-
class Graph2<TInput extends GraphNode, TOutput extends GraphNode = TInput> implements ReadableGraph<TInput, TOutput> {
52+
class Graph<TInput extends GraphNode, TOutput extends GraphNode = TInput> implements ReadableGraph<TInput, TOutput> {
5353
#busy = false;
5454
#middleware: GraphMiddleware<TInput, TOutput>;
5555
#state: GraphState<TOutput> = Object.freeze(new Map());
@@ -139,7 +139,7 @@ class Graph2<TInput extends GraphNode, TOutput extends GraphNode = TInput> imple
139139
}
140140
}
141141

142-
export default Graph2;
142+
export default Graph;
143143
export {
144144
type GraphMiddleware,
145145
type GraphNode,

packages/core-graph/src/private/Graph2.upsert.spec.ts renamed to packages/core-graph/src/private/Graph.upsert.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
3-
import Graph from './Graph2';
3+
import Graph from './Graph';
44
import './schemas/private/expectExtendValibot';
55
import './schemas/private/expectIsFrozen';
66
import type { Identifier } from './schemas/Identifier';

packages/core-graph/src/private/SlantGraph/SlantGraph.autoInversion.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from '@jest/globals';
22
import { scenario } from '@testduet/given-when-then';
33
import { fn } from 'jest-mock';
4-
import { GraphSubscriber } from '../Graph2';
4+
import { GraphSubscriber } from '../Graph';
55
import SlantGraph from './SlantGraph';
66

77
scenario('SlantGraph auto-inversion', bdd => {

packages/core-graph/src/private/SlantGraph/SlantGraph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Graph from '../Graph2';
1+
import Graph from '../Graph';
22
import { type SlantNode } from '../schemas/colorNode';
33
import type { Identifier } from '../schemas/Identifier';
44
import assertSlantNode from './private/assertSlantNode';

packages/core-graph/src/private/SlantGraph/private/assertSlantNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assert, type BaseSchema } from 'valibot';
2-
import { type GraphMiddleware } from '../../Graph2';
2+
import { type GraphMiddleware } from '../../Graph';
33
import { SlantNodeSchema, type SlantNode } from '../../schemas/colorNode';
44
import { DirectLineActivityNodeSchema } from '../../schemas/DirectLineActivityNode';
55
import isOfType from '../../schemas/isOfType';

0 commit comments

Comments
 (0)