@truedat/lm 8.7.0 → 8.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/package.json +3 -3
  2. package/src/components/ConceptLinkForm.js +6 -6
  3. package/src/components/ConceptStructureLinkForm.js +1 -1
  4. package/src/components/ConceptSuggestionLinkForm.js +1 -1
  5. package/src/components/ImplementationLinks.js +4 -4
  6. package/src/components/ImplementationRelationForm.js +3 -3
  7. package/src/components/LinksPane.js +3 -3
  8. package/src/components/LinksSearch.js +1 -1
  9. package/src/components/QualityControlConcepts.js +1 -1
  10. package/src/components/QualityControlStructures.js +4 -2
  11. package/src/components/RelationGraph.js +20 -12
  12. package/src/components/RelationGraphDepth.js +22 -7
  13. package/src/components/RelationTagForm.js +2 -2
  14. package/src/components/RelationTagsLoader.js +1 -1
  15. package/src/components/RelationsLoader.js +1 -1
  16. package/src/components/StructureLinkForm.js +6 -6
  17. package/src/components/StructureLinks.js +3 -3
  18. package/src/components/StructureRelationForm.js +3 -3
  19. package/src/components/StructureSuggestionLinkForm.js +54 -50
  20. package/src/components/TagTypeDropdownSelector.js +4 -4
  21. package/src/components/__tests__/ConceptImplementationLink.spec.js +1 -1
  22. package/src/components/__tests__/ConceptLinkForm.spec.js +5 -5
  23. package/src/components/__tests__/ConceptSuggestionLinkForm.spec.js +7 -8
  24. package/src/components/__tests__/ConfirmDeleteRelation.spec.js +1 -1
  25. package/src/components/__tests__/ImplementationLinkRow.spec.js +1 -1
  26. package/src/components/__tests__/ImplementationLinks.spec.js +2 -2
  27. package/src/components/__tests__/ImplementationRelationForm.spec.js +8 -8
  28. package/src/components/__tests__/LinksPane.spec.js +28 -5
  29. package/src/components/__tests__/LinksSearch.spec.js +13 -13
  30. package/src/components/__tests__/QualityControlConcepts.spec.js +23 -23
  31. package/src/components/__tests__/QualityControlStructures.spec.js +15 -15
  32. package/src/components/__tests__/RelationRoutes.spec.js +3 -3
  33. package/src/components/__tests__/RelationRow.spec.js +4 -4
  34. package/src/components/__tests__/RelationTagForm.spec.js +7 -7
  35. package/src/components/__tests__/Relations.spec.js +1 -1
  36. package/src/components/__tests__/RelationsLoader.spec.js +1 -1
  37. package/src/components/__tests__/StructureLinkForm.spec.js +6 -6
  38. package/src/components/__tests__/StructureRelationForm.spec.js +9 -9
  39. package/src/components/__tests__/StructureSuggestionLinkForm.spec.js +87 -85
  40. package/src/hooks/useRelations.js +6 -5
  41. package/src/messages/en.js +2 -1
  42. package/src/messages/es.js +2 -1
  43. package/src/messages/index.js +1 -1
  44. package/src/reducers/__tests__/handlingRelation.spec.js +3 -3
  45. package/src/reducers/__tests__/relationRedirect.spec.js +8 -8
  46. package/src/reducers/__tests__/relationTags.spec.js +4 -4
  47. package/src/reducers/__tests__/relationTagsLoading.spec.js +2 -2
  48. package/src/reducers/__tests__/relations.spec.js +4 -4
  49. package/src/reducers/__tests__/relationsActions.spec.js +6 -6
  50. package/src/reducers/__tests__/relationsGraph.spec.js +21 -21
  51. package/src/reducers/__tests__/relationsGraphLoading.spec.js +2 -2
  52. package/src/reducers/__tests__/relationsLoading.spec.js +2 -2
  53. package/src/reducers/__tests__/selectedRelationTags.spec.js +5 -5
  54. package/src/reducers/relationTags.js +1 -1
  55. package/src/reducers/selectedRelationTags.js +1 -1
  56. package/src/routines.js +2 -2
  57. package/src/sagas/createRelation.js +1 -1
  58. package/src/sagas/createRelationTag.js +1 -1
  59. package/src/sagas/fetchRelations.js +1 -1
  60. package/src/sagas/updateRelationTag.js +1 -1
  61. package/src/selectors/getImplementationToConceptLinks.js +1 -1
  62. package/src/selectors/getStructureLinks.js +1 -1
  63. package/src/selectors/index.js +1 -1
  64. package/src/selectors/messages.js +3 -2
  65. package/src/services/__tests__/edgeColorPalette.spec.js +3 -5
  66. package/src/services/__tests__/relationGraphTraversal.spec.js +2 -2
  67. package/src/services/edgeColorPalette.js +6 -1
  68. package/src/services/relationGraphTraversal.js +14 -14
@@ -22,25 +22,25 @@ describe("reducers: relations", () => {
22
22
 
23
23
  it("should handle the fetchRelations.TRIGGER action", () => {
24
24
  expect(relations(fooState, { type: fetchRelations.TRIGGER })).toEqual(
25
- initialState
25
+ initialState,
26
26
  );
27
27
  });
28
28
 
29
29
  it("should handle the fetchRelations.SUCCESS action", () => {
30
30
  expect(
31
- relations(fooState, { type: fetchRelations.SUCCESS, payload: { data } })
31
+ relations(fooState, { type: fetchRelations.SUCCESS, payload: { data } }),
32
32
  ).toEqual(data);
33
33
  });
34
34
 
35
35
  it("should handle the deleteRelation.SUCCESS action", () => {
36
36
  expect(
37
- relations(data, { type: deleteRelation.SUCCESS, meta: { id: "1" } })
37
+ relations(data, { type: deleteRelation.SUCCESS, meta: { id: "1" } }),
38
38
  ).toEqual([]);
39
39
  });
40
40
 
41
41
  it("should handle the clearRelations.TRIGGER action", () => {
42
42
  expect(relations(fooState, { type: clearRelations.TRIGGER })).toEqual(
43
- initialState
43
+ initialState,
44
44
  );
45
45
  });
46
46
  });
@@ -14,16 +14,16 @@ describe("reducers: relationsActions", () => {
14
14
  it("should handle the fetchRelations.TRIGGER action", () => {
15
15
  expect(
16
16
  relationsActions(fooState, {
17
- type: fetchRelations.TRIGGER
18
- })
17
+ type: fetchRelations.TRIGGER,
18
+ }),
19
19
  ).toEqual(initialState);
20
20
  });
21
21
 
22
22
  it("should handle the fetchRelations.REQUEST action", () => {
23
23
  expect(
24
24
  relationsActions(fooState, {
25
- type: fetchRelations.REQUEST
26
- })
25
+ type: fetchRelations.REQUEST,
26
+ }),
27
27
  ).toEqual(initialState);
28
28
  });
29
29
 
@@ -31,8 +31,8 @@ describe("reducers: relationsActions", () => {
31
31
  expect(
32
32
  relationsActions(fooState, {
33
33
  type: fetchRelations.SUCCESS,
34
- payload: { _actions }
35
- })
34
+ payload: { _actions },
35
+ }),
36
36
  ).toEqual(_actions);
37
37
  });
38
38
  });
@@ -6,16 +6,16 @@ const fooState = { foo: "bar" };
6
6
  const nodes = [
7
7
  {
8
8
  id: "business_concept:92",
9
- label: "My Awesome Concept"
9
+ label: "My Awesome Concept",
10
10
  },
11
11
  {
12
12
  id: "business_concept:5",
13
- label: "New Concept 4"
13
+ label: "New Concept 4",
14
14
  },
15
15
  {
16
16
  id: "business_concept:18",
17
- label: "Float Concept"
18
- }
17
+ label: "Float Concept",
18
+ },
19
19
  ];
20
20
 
21
21
  const edges = [
@@ -26,11 +26,11 @@ const edges = [
26
26
  id: 3,
27
27
  value: {
28
28
  target_type: "business_concept",
29
- type: "bc_padre"
30
- }
31
- }
29
+ type: "bc_padre",
30
+ },
31
+ },
32
32
  ],
33
- to: "business_concept:5"
33
+ to: "business_concept:5",
34
34
  },
35
35
  {
36
36
  from: "business_concept:5",
@@ -39,11 +39,11 @@ const edges = [
39
39
  id: 3,
40
40
  value: {
41
41
  target_type: "business_concept",
42
- type: "bc_padre"
43
- }
44
- }
42
+ type: "bc_padre",
43
+ },
44
+ },
45
45
  ],
46
- to: "business_concept:18"
46
+ to: "business_concept:18",
47
47
  },
48
48
  {
49
49
  from: "business_concept:18",
@@ -52,12 +52,12 @@ const edges = [
52
52
  id: 3,
53
53
  value: {
54
54
  target_type: "business_concept",
55
- type: "bc_padre"
56
- }
57
- }
55
+ type: "bc_padre",
56
+ },
57
+ },
58
58
  ],
59
- to: "business_concept:5"
60
- }
59
+ to: "business_concept:5",
60
+ },
61
61
  ];
62
62
 
63
63
  describe("reducers: relationsGraph", () => {
@@ -69,13 +69,13 @@ describe("reducers: relationsGraph", () => {
69
69
 
70
70
  it("should handle the clearRelationsGraph.TRIGGER action", () => {
71
71
  expect(
72
- relationsGraph(fooState, { type: clearRelationsGraph.TRIGGER })
72
+ relationsGraph(fooState, { type: clearRelationsGraph.TRIGGER }),
73
73
  ).toEqual(initialState);
74
74
  });
75
75
 
76
76
  it("should handle the fetchRelationsGraph.FAILURE action", () => {
77
77
  expect(
78
- relationsGraph(fooState, { type: fetchRelationsGraph.FAILURE })
78
+ relationsGraph(fooState, { type: fetchRelationsGraph.FAILURE }),
79
79
  ).toEqual(initialState);
80
80
  });
81
81
 
@@ -85,8 +85,8 @@ describe("reducers: relationsGraph", () => {
85
85
  expect(
86
86
  relationsGraph(fooState, {
87
87
  type: fetchRelationsGraph.SUCCESS,
88
- payload: { data }
89
- })
88
+ payload: { data },
89
+ }),
90
90
  ).toEqual(data);
91
91
  });
92
92
 
@@ -12,13 +12,13 @@ describe("reducers: relationsGraphLoading", () => {
12
12
 
13
13
  it("should handle the fetchRelationsGraph.TRIGGER action", () => {
14
14
  expect(
15
- relationsGraphLoading(fooState, { type: fetchRelationsGraph.TRIGGER })
15
+ relationsGraphLoading(fooState, { type: fetchRelationsGraph.TRIGGER }),
16
16
  ).toEqual(true);
17
17
  });
18
18
 
19
19
  it("should handle the fetchRelationsGraph.FULFILL action", () => {
20
20
  expect(
21
- relationsGraphLoading(fooState, { type: fetchRelationsGraph.FULFILL })
21
+ relationsGraphLoading(fooState, { type: fetchRelationsGraph.FULFILL }),
22
22
  ).toEqual(initialState);
23
23
  });
24
24
  });
@@ -12,13 +12,13 @@ describe("reducers: relationsLoading", () => {
12
12
 
13
13
  it("should handle the fetchRelations.TRIGGER action", () => {
14
14
  expect(
15
- relationsLoading(fooState, { type: fetchRelations.TRIGGER })
15
+ relationsLoading(fooState, { type: fetchRelations.TRIGGER }),
16
16
  ).toEqual(true);
17
17
  });
18
18
 
19
19
  it("should handle the fetchRelations.FULFILL action", () => {
20
20
  expect(
21
- relationsLoading(fooState, { type: fetchRelations.FULFILL })
21
+ relationsLoading(fooState, { type: fetchRelations.FULFILL }),
22
22
  ).toEqual(initialState);
23
23
  });
24
24
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setSelectedRelationTags,
3
- clearSelectedRelationTags
3
+ clearSelectedRelationTags,
4
4
  } from "../../routines";
5
5
  import { selectedRelationTags } from "..";
6
6
 
@@ -16,8 +16,8 @@ describe("reducers: selectedRelationTags", () => {
16
16
  it("should handle the clearRelationTags.TRIGGER action", () => {
17
17
  expect(
18
18
  selectedRelationTags(fooState, {
19
- type: clearSelectedRelationTags.TRIGGER
20
- })
19
+ type: clearSelectedRelationTags.TRIGGER,
20
+ }),
21
21
  ).toEqual(initialState);
22
22
  });
23
23
 
@@ -25,8 +25,8 @@ describe("reducers: selectedRelationTags", () => {
25
25
  expect(
26
26
  selectedRelationTags(fooState, {
27
27
  type: setSelectedRelationTags.TRIGGER,
28
- payload: { selectedRelationTags: collection }
29
- })
28
+ payload: { selectedRelationTags: collection },
29
+ }),
30
30
  ).toEqual(collection);
31
31
  });
32
32
  });
@@ -14,7 +14,7 @@ const relationTags = (state = initialState, { type, payload }) => {
14
14
  return _.flow(
15
15
  _.propOr([], "data"),
16
16
  _.map(pickFields),
17
- _.sortBy(f => _.deburr(f.value.type))
17
+ _.sortBy((f) => _.deburr(f.value.type)),
18
18
  )(data);
19
19
  }
20
20
  case fetchRelationTags.FAILURE:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setSelectedRelationTags,
3
- clearSelectedRelationTags
3
+ clearSelectedRelationTags,
4
4
  } from "../routines";
5
5
 
6
6
  const initialState = [];
package/src/routines.js CHANGED
@@ -9,10 +9,10 @@ export const clearRelationTags = createRoutine("CLEAR_RELATION_TAGS");
9
9
  export const clearRelationsGraph = createRoutine("CLEAR_REALATIONS_GRAPH");
10
10
  export const createRelation = createRoutine("CREATE_RELATION");
11
11
  export const setSelectedRelationTags = createRoutine(
12
- "SET_SELECTED_RELATION_TAGS"
12
+ "SET_SELECTED_RELATION_TAGS",
13
13
  );
14
14
  export const clearSelectedRelationTags = createRoutine(
15
- "CLEAR_SELECTED_RELATION_TAGS"
15
+ "CLEAR_SELECTED_RELATION_TAGS",
16
16
  );
17
17
  export const clearStructures = createRoutine("CLEAR_STRUCTURES");
18
18
 
@@ -25,7 +25,7 @@ export function* createRelationSaga({ payload }) {
25
25
  apiJsonPost,
26
26
  API_RELATIONS,
27
27
  requestData,
28
- JSON_OPTS
28
+ JSON_OPTS,
29
29
  );
30
30
  yield put({ meta, ...createRelation.success(data) });
31
31
  } catch (error) {
@@ -8,7 +8,7 @@ export function* createRelationTagSaga({ payload }) {
8
8
  try {
9
9
  const { relationTag } = payload;
10
10
  const relationTagValue = _.pick(["type", "target_type", "expandable"])(
11
- relationTag
11
+ relationTag,
12
12
  );
13
13
 
14
14
  const redirectUrl = _.prop("redirectUrl")(payload);
@@ -16,7 +16,7 @@ export function* fetchRelationsSaga({ payload }) {
16
16
  apiJsonPost,
17
17
  API_RELATIONS_SEARCH,
18
18
  body,
19
- JSON_OPTS
19
+ JSON_OPTS,
20
20
  );
21
21
  yield put(fetchRelations.success(data));
22
22
  } catch (error) {
@@ -8,7 +8,7 @@ import { API_TAG } from "../api";
8
8
  export function* updateRelationTagSaga({ payload }) {
9
9
  try {
10
10
  const relationTagValue = _.pick(["type", "target_type", "expandable"])(
11
- payload.value
11
+ payload.value,
12
12
  );
13
13
 
14
14
  const url = compile(API_TAG)({ id: `${payload.id}` });
@@ -5,5 +5,5 @@ const getImplementationLinks = (state) => state.implementationLinks;
5
5
 
6
6
  export const getImplementationToConceptLinks = createSelector(
7
7
  getImplementationLinks,
8
- _.filter(_.propEq("resource_type", "concept"))
8
+ _.filter(_.propEq("resource_type", "concept")),
9
9
  );
@@ -5,5 +5,5 @@ const getStructureLinks = (state) => state.structureLinks;
5
5
 
6
6
  export const getStructureToConceptLinks = createSelector(
7
7
  getStructureLinks,
8
- _.filter(_.propEq("resource_type", "concept"))
8
+ _.filter(_.propEq("resource_type", "concept")),
9
9
  );
@@ -1,4 +1,4 @@
1
1
  export * from "./getStructureLinks";
2
2
  export * from "./getImplementationToConceptLinks";
3
3
  export * from "../services/relationGraphTraversal";
4
- export * from "./messages";
4
+ export * from "./messages";
@@ -16,7 +16,7 @@ export const getRelationErrorAlertMessage = (error, formatMessage) => {
16
16
  _.map(([field, messages]) => ({
17
17
  field,
18
18
  message: Array.isArray(messages) ? messages[0] : messages,
19
- }))
19
+ })),
20
20
  )(errors);
21
21
 
22
22
  const content = errorMessages
@@ -24,7 +24,7 @@ export const getRelationErrorAlertMessage = (error, formatMessage) => {
24
24
  formatMessage({
25
25
  id: `relations.create.failed.${message}`,
26
26
  defaultMessage: `${field}: ${message}`,
27
- })
27
+ }),
28
28
  )
29
29
  .join(", ");
30
30
 
@@ -37,6 +37,7 @@ export const getRelationErrorAlertMessage = (error, formatMessage) => {
37
37
  }
38
38
 
39
39
  const errorMessage =
40
+ // eslint-disable-next-line no-undef
40
41
  data?.error?.message || data?.error || "An error occurred";
41
42
 
42
43
  return {
@@ -8,7 +8,7 @@ import {
8
8
  describe("buildColorMap", () => {
9
9
  it("returns the empty edge color for empty edges", () => {
10
10
  expect(buildColorMap([])).toEqual(
11
- new Map([[EMPTY_EDGE_TYPE, EMPTY_EDGE_COLOR]])
11
+ new Map([[EMPTY_EDGE_TYPE, EMPTY_EDGE_COLOR]]),
12
12
  );
13
13
  });
14
14
 
@@ -48,9 +48,7 @@ describe("buildColorMap", () => {
48
48
  });
49
49
 
50
50
  it("skips tags with missing value.type", () => {
51
- const edges = [
52
- { tags: [{ value: {} }, { value: { type: "Contains" } }] },
53
- ];
51
+ const edges = [{ tags: [{ value: {} }, { value: { type: "Contains" } }] }];
54
52
  const map = buildColorMap(edges);
55
53
  expect(map.size).toBe(2);
56
54
  expect(map.get(EMPTY_EDGE_TYPE)).toBe(EMPTY_EDGE_COLOR);
@@ -61,7 +59,7 @@ describe("buildColorMap", () => {
61
59
  const edges = [{ tags: undefined }, { tags: [] }];
62
60
  expect(() => buildColorMap(edges)).not.toThrow();
63
61
  expect(buildColorMap(edges)).toEqual(
64
- new Map([[EMPTY_EDGE_TYPE, EMPTY_EDGE_COLOR]])
62
+ new Map([[EMPTY_EDGE_TYPE, EMPTY_EDGE_COLOR]]),
65
63
  );
66
64
  });
67
65
  });
@@ -249,7 +249,7 @@ describe("relationGraphTraversal", () => {
249
249
  relationsGraph,
250
250
  currentId,
251
251
  2,
252
- traversalTags
252
+ traversalTags,
253
253
  );
254
254
  const { nodes: outputNodes, edges: outputEdges } = limitedGraph;
255
255
 
@@ -273,7 +273,7 @@ describe("relationGraphTraversal", () => {
273
273
  relationsGraph,
274
274
  currentId,
275
275
  1,
276
- traversalTags
276
+ traversalTags,
277
277
  );
278
278
  const { nodes: outputNodes, edges: outputEdges } = limitedGraph;
279
279
  const outputNodeIds = new Set(_.map((node) => node.id, outputNodes));
@@ -12,13 +12,18 @@ export const EMPTY_EDGE_TYPE = "_empty";
12
12
 
13
13
  export const buildColorMap = (edges = []) => {
14
14
  const map = new Map([[EMPTY_EDGE_TYPE, EMPTY_EDGE_COLOR]]);
15
+ // eslint-disable-next-line fp/no-let
15
16
  let paletteIndex = 0;
16
17
 
17
18
  edges.forEach(({ tags = [] }) => {
18
19
  (tags || []).forEach(({ value }) => {
19
20
  const type = value?.type;
20
21
  if (type && !map.has(type)) {
21
- map.set(type, EDGE_COLOR_PALETTE[paletteIndex % EDGE_COLOR_PALETTE.length]);
22
+ map.set(
23
+ type,
24
+ EDGE_COLOR_PALETTE[paletteIndex % EDGE_COLOR_PALETTE.length],
25
+ );
26
+ // eslint-disable-next-line fp/no-mutation
22
27
  paletteIndex += 1;
23
28
  }
24
29
  });
@@ -18,7 +18,7 @@ export const findMaxDepth = lruMemoize(
18
18
  const start = currentIdToNode(graph, currentId);
19
19
  return bfsMaxDepth(graph, start, traversalTags);
20
20
  },
21
- { maxSize: 10, equalityCheck }
21
+ { maxSize: 10, equalityCheck },
22
22
  );
23
23
 
24
24
  export const pruneGraph = lruMemoize(
@@ -32,7 +32,7 @@ export const pruneGraph = lruMemoize(
32
32
  start,
33
33
  {},
34
34
  depth < maxDepth ? depth : maxDepth,
35
- traversalTags
35
+ traversalTags,
36
36
  );
37
37
  return {
38
38
  nodes,
@@ -49,7 +49,7 @@ export const pruneGraph = lruMemoize(
49
49
  return graph;
50
50
  }
51
51
  },
52
- { maxSize: 10, equalityCheck }
52
+ { maxSize: 10, equalityCheck },
53
53
  );
54
54
 
55
55
  export const anyTraversalTags = (traversalTagIds, tags) => {
@@ -66,22 +66,22 @@ const findNeighbours = (relationsGraph, start, traversalTags) => {
66
66
  _.filter(
67
67
  (edge) =>
68
68
  edge.target_id === start.id &&
69
- anyTraversalTags(traversalTags, edge.tags)
69
+ anyTraversalTags(traversalTags, edge.tags),
70
70
  ),
71
- _.flatMap((edge) => _.find({ id: edge.source_id }, relationsGraph.nodes))
71
+ _.flatMap((edge) => _.find({ id: edge.source_id }, relationsGraph.nodes)),
72
72
  );
73
73
  const outNeighbours = _.flow(
74
74
  _.filter(
75
75
  (edge) =>
76
76
  edge.source_id === start.id &&
77
- anyTraversalTags(traversalTags, edge.tags)
77
+ anyTraversalTags(traversalTags, edge.tags),
78
78
  ),
79
- _.flatMap((edge) => _.find({ id: edge.target_id }, relationsGraph.nodes))
79
+ _.flatMap((edge) => _.find({ id: edge.target_id }, relationsGraph.nodes)),
80
80
  );
81
81
 
82
82
  return _.flow(
83
83
  (edges) => [...inNeighbours(edges), ...outNeighbours(edges)],
84
- _.uniq
84
+ _.uniq,
85
85
  )(relationsGraph.edges);
86
86
  };
87
87
 
@@ -92,7 +92,7 @@ export const filterEdges = (relationsGraph, nodes, traversalTags) => {
92
92
  nodeIds.includes(edge.source_id) &&
93
93
  nodeIds.includes(edge.target_id) &&
94
94
  anyTraversalTags(traversalTags, edge.tags),
95
- relationsGraph.edges
95
+ relationsGraph.edges,
96
96
  );
97
97
  return edges;
98
98
  };
@@ -100,7 +100,7 @@ export const filterEdges = (relationsGraph, nodes, traversalTags) => {
100
100
  export const graphDistinctTags = ({ edges }) =>
101
101
  _.flow(
102
102
  _.flatMap((edge) => edge?.tags),
103
- _.uniqBy((tag) => tag?.id)
103
+ _.uniqBy((tag) => tag?.id),
104
104
  )(edges);
105
105
 
106
106
  export const dfs = (
@@ -108,7 +108,7 @@ export const dfs = (
108
108
  start,
109
109
  visited,
110
110
  maxDepth,
111
- traversalTags
111
+ traversalTags,
112
112
  ) => {
113
113
  // Depth range: [0, maxDepth]
114
114
  if (Object.keys(visited).includes(start.id) || maxDepth === -1) return {};
@@ -121,10 +121,10 @@ export const dfs = (
121
121
  neighbour,
122
122
  { ...visited, [start.id]: start },
123
123
  maxDepth - 1,
124
- traversalTags
124
+ traversalTags,
125
125
  ),
126
126
  }),
127
- { [start.id]: start }
127
+ { [start.id]: start },
128
128
  )(findNeighbours(relationsGraph, start, traversalTags));
129
129
  };
130
130
 
@@ -147,7 +147,7 @@ const bfsMaxDepth = (relationsGraph, start, traversalTags) => {
147
147
  for (let neighbour of findNeighbours(
148
148
  relationsGraph,
149
149
  current,
150
- traversalTags
150
+ traversalTags,
151
151
  )) {
152
152
  if (!(neighbour.id in nodesDistance)) {
153
153
  queue.push(neighbour);