Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add GitHub Action that tries to build all projects #17

Closed

Conversation

jamesscottbrown
Copy link

This adds a GitHub Action that attempts to build all projects.

This would highlight problems like the type errors that currently prevent the examples from running (e.g., Issue #15).

Copy link
Member

@thinkh thinkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the additional build workflow. I think it is a valuable contribution.

I ran yarn run build:all to test the command and I get a lot of errors in various apps.

❯ yarn run build:all
yarn run v1.22.19
$ nx run-many --target=build

    ✔  nx run core:build (3s)

    ✖  nx run dummy-testing-library:build:production
       Entrypoint main = runtime.b98317f5eaa0833d.esm.js main.c5f423aef97fd713.css main.e8bc3b390e4273e4.esm.js
       Entrypoint polyfills = runtime.b98317f5eaa0833d.esm.js polyfills.cd85454a8d874190.esm.js
       Entrypoint styles = runtime.b98317f5eaa0833d.esm.js styles.0cf6ea6a4c6a01ee.css
       chunk (runtime: runtime) main.c5f423aef97fd713.css, main.e8bc3b390e4273e4.esm.js (main) 401 KiB (javascript) 310 bytes (css/mini-extract) [initial] [rendered]
       chunk (runtime: runtime) polyfills.cd85454a8d874190.esm.js (polyfills) 545 KiB [initial] [rendered]
       chunk (runtime: runtime) styles.0cf6ea6a4c6a01ee.css (styles) 50 bytes (javascript) 182 bytes (css/mini-extract) [initial] [rendered]
       chunk (runtime: runtime) runtime.b98317f5eaa0833d.esm.js (runtime) 3.28 KiB [entry] [rendered]
       
       WARNING in ./src/app/App.tsx 10:14-32
       export 'Trrack' (imported as 'Trrack') was not found in '@trrack/core' (possible exports: ID, Registry, TrrackEvents, createAction, createRootNode, createStateNode, initializeProvenanceGraph, initializeTrrack, isRootNode, isStateNode)
       
       WARNING in ./src/app/App.tsx 19:12-23
       export 'Trrack' (imported as 'Trrack') was not found in '@trrack/core' (possible exports: ID, Registry, TrrackEvents, createAction, createRootNode, createStateNode, initializeProvenanceGraph, initializeTrrack, isRootNode, isStateNode)
       
       WARNING in ./src/app/App.tsx 31:19-41
       export 'ProvenanceGraph' (imported as 'ProvenanceGraph') was not found in '@trrack/core' (possible exports: ID, Registry, TrrackEvents, createAction, createRootNode, createStateNode, initializeProvenanceGraph, initializeTrrack, isRootNode, isStateNode)
       
       ERROR in ./apps/dummy-testing-library/src/app/App.tsx:4:10
       TS2305: Module '"@trrack/core"' has no exported member 'IProvenanceGraph'.
           2 | import { useElementSize } from '@mantine/hooks';
           3 | import { PayloadAction } from '@reduxjs/toolkit';
         > 4 | import { IProvenanceGraph, ProvenanceGraph, Trrack } from '@trrack/core';
             |          ^^^^^^^^^^^^^^^^
           5 | import test from 'node:test';
           6 | import { useCallback, useEffect, useMemo, useState } from 'react';
           7 |
       
       ERROR in ./apps/dummy-testing-library/src/app/App.tsx:4:28
       TS2305: Module '"@trrack/core"' has no exported member 'ProvenanceGraph'.
           2 | import { useElementSize } from '@mantine/hooks';
           3 | import { PayloadAction } from '@reduxjs/toolkit';
         > 4 | import { IProvenanceGraph, ProvenanceGraph, Trrack } from '@trrack/core';
             |                            ^^^^^^^^^^^^^^^
           5 | import test from 'node:test';
           6 | import { useCallback, useEffect, useMemo, useState } from 'react';
           7 |
       
       ERROR in ./apps/dummy-testing-library/src/app/App.tsx:4:45
       TS2305: Module '"@trrack/core"' has no exported member 'Trrack'.
           2 | import { useElementSize } from '@mantine/hooks';
           3 | import { PayloadAction } from '@reduxjs/toolkit';
         > 4 | import { IProvenanceGraph, ProvenanceGraph, Trrack } from '@trrack/core';
             |                                             ^^^^^^
           5 | import test from 'node:test';
           6 | import { useCallback, useEffect, useMemo, useState } from 'react';
           7 |
       
       ERROR in ./apps/dummy-testing-library/src/app/App.tsx:17:14
       TS7006: Parameter 'test' implicitly has an 'any' type.
           15 |     name: 'Test',
           16 |     reducers: {
         > 17 |       change(test, action: PayloadAction<string>) {
              |              ^^^^
           18 |         return action.payload;
           19 |       },
           20 |     },
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:1:10
       TS2305: Module '"@trrack/core"' has no exported member 'Graph'.
         > 1 | import { Graph, IActionNode, IProvenanceNode, IStateNode } from '@trrack/core';
             |          ^^^^^
           2 | import { useMemo } from 'react';
           3 |
           4 | import translate from '../utils/translate';
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:1:17
       TS2305: Module '"@trrack/core"' has no exported member 'IActionNode'.
         > 1 | import { Graph, IActionNode, IProvenanceNode, IStateNode } from '@trrack/core';
             |                 ^^^^^^^^^^^
           2 | import { useMemo } from 'react';
           3 |
           4 | import translate from '../utils/translate';
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:1:30
       TS2724: '"@trrack/core"' has no exported member named 'IProvenanceNode'. Did you mean 'ProvenanceNode'?
         > 1 | import { Graph, IActionNode, IProvenanceNode, IStateNode } from '@trrack/core';
             |                              ^^^^^^^^^^^^^^^
           2 | import { useMemo } from 'react';
           3 |
           4 | import translate from '../utils/translate';
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:1:47
       TS2724: '"@trrack/core"' has no exported member named 'IStateNode'. Did you mean 'StateNode'?
         > 1 | import { Graph, IActionNode, IProvenanceNode, IStateNode } from '@trrack/core';
             |                                               ^^^^^^^^^^
           2 | import { useMemo } from 'react';
           3 |
           4 | import translate from '../utils/translate';
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:15:8
       TS7006: Parameter 'node' implicitly has an 'any' type.
           13 |   return graph
           14 |     .nodesBy<IStateNode<any>>(
         > 15 |       (node) => (node as IProvenanceNode).type === 'State'
              |        ^^^^
           16 |     )
           17 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime())
           18 |     .map((node, idx) => ({ node, x: SPACING * idx, y: 0 }));
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:17:12
       TS7006: Parameter 'a' implicitly has an 'any' type.
           15 |       (node) => (node as IProvenanceNode).type === 'State'
           16 |     )
         > 17 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime())
              |            ^
           18 |     .map((node, idx) => ({ node, x: SPACING * idx, y: 0 }));
           19 | }
           20 |
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:17:15
       TS7006: Parameter 'b' implicitly has an 'any' type.
           15 |       (node) => (node as IProvenanceNode).type === 'State'
           16 |     )
         > 17 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime())
              |               ^
           18 |     .map((node, idx) => ({ node, x: SPACING * idx, y: 0 }));
           19 | }
           20 |
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:18:11
       TS7006: Parameter 'node' implicitly has an 'any' type.
           16 |     )
           17 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime())
         > 18 |     .map((node, idx) => ({ node, x: SPACING * idx, y: 0 }));
              |           ^^^^
           19 | }
           20 |
           21 | function useActionNodes(graph: Graph) {
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:18:17
       TS7006: Parameter 'idx' implicitly has an 'any' type.
           16 |     )
           17 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime())
         > 18 |     .map((node, idx) => ({ node, x: SPACING * idx, y: 0 }));
              |                 ^^^
           19 | }
           20 |
           21 | function useActionNodes(graph: Graph) {
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:24:8
       TS7006: Parameter 'node' implicitly has an 'any' type.
           22 |   const allActionNodes = graph
           23 |     .nodesBy<IActionNode<any>>(
         > 24 |       (node) => (node as IProvenanceNode).type === 'Action'
              |        ^^^^
           25 |     )
           26 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime());
           27 |
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:26:12
       TS7006: Parameter 'a' implicitly has an 'any' type.
           24 |       (node) => (node as IProvenanceNode).type === 'Action'
           25 |     )
         > 26 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime());
              |            ^
           27 |
           28 |   const actionNodes: Array<{
           29 |     node: IActionNode<any>;
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:26:15
       TS7006: Parameter 'b' implicitly has an 'any' type.
           24 |       (node) => (node as IProvenanceNode).type === 'Action'
           25 |     )
         > 26 |     .sort((a, b) => a.createdOn.getTime() - b.createdOn.getTime());
              |               ^
           27 |
           28 |   const actionNodes: Array<{
           29 |     node: IActionNode<any>;
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:40:14
       TS7006: Parameter 'node' implicitly has an 'any' type.
           38 |
           39 |   allActionNodes
         > 40 |     .filter((node) => !node.isInverse)
              |              ^^^^
           41 |     .forEach((node, idx) => {
           42 |       actionNodes.push({
           43 |         node,
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:41:15
       TS7006: Parameter 'node' implicitly has an 'any' type.
           39 |   allActionNodes
           40 |     .filter((node) => !node.isInverse)
         > 41 |     .forEach((node, idx) => {
              |               ^^^^
           42 |       actionNodes.push({
           43 |         node,
           44 |         x: SPACING / 2 + SPACING * idx,
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:41:21
       TS7006: Parameter 'idx' implicitly has an 'any' type.
           39 |   allActionNodes
           40 |     .filter((node) => !node.isInverse)
         > 41 |     .forEach((node, idx) => {
              |                     ^^^
           42 |       actionNodes.push({
           43 |         node,
           44 |         x: SPACING / 2 + SPACING * idx,
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:97:17
       TS2571: Object is of type 'unknown'.
            95 |     <g>
            96 |       {Array.from(graph.edges.values()).map((edge) => (
         >  97 |         <g key={edge.id}>
               |                 ^^^^
            98 |           {edge.type !== 'inverted_by' && edge.type !== 'inverts' ? (
            99 |             <line
           100 |               x1={getX(edge.from.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:98:12
       TS2571: Object is of type 'unknown'.
            96 |       {Array.from(graph.edges.values()).map((edge) => (
            97 |         <g key={edge.id}>
         >  98 |           {edge.type !== 'inverted_by' && edge.type !== 'inverts' ? (
               |            ^^^^
            99 |             <line
           100 |               x1={getX(edge.from.id)}
           101 |               y1={getY(edge.from.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:98:43
       TS2571: Object is of type 'unknown'.
            96 |       {Array.from(graph.edges.values()).map((edge) => (
            97 |         <g key={edge.id}>
         >  98 |           {edge.type !== 'inverted_by' && edge.type !== 'inverts' ? (
               |                                           ^^^^
            99 |             <line
           100 |               x1={getX(edge.from.id)}
           101 |               y1={getY(edge.from.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:100:24
       TS2571: Object is of type 'unknown'.
            98 |           {edge.type !== 'inverted_by' && edge.type !== 'inverts' ? (
            99 |             <line
         > 100 |               x1={getX(edge.from.id)}
               |                        ^^^^
           101 |               y1={getY(edge.from.id)}
           102 |               x2={getX(edge.to.id)}
           103 |               y2={getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:101:24
       TS2571: Object is of type 'unknown'.
            99 |             <line
           100 |               x1={getX(edge.from.id)}
         > 101 |               y1={getY(edge.from.id)}
               |                        ^^^^
           102 |               x2={getX(edge.to.id)}
           103 |               y2={getY(edge.to.id)}
           104 |               stroke="hsl(207, 51%, 83%)"
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:102:24
       TS2571: Object is of type 'unknown'.
           100 |               x1={getX(edge.from.id)}
           101 |               y1={getY(edge.from.id)}
         > 102 |               x2={getX(edge.to.id)}
               |                        ^^^^
           103 |               y2={getY(edge.to.id)}
           104 |               stroke="hsl(207, 51%, 83%)"
           105 |               strokeWidth="3px"
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:103:24
       TS2571: Object is of type 'unknown'.
           101 |               y1={getY(edge.from.id)}
           102 |               x2={getX(edge.to.id)}
         > 103 |               y2={getY(edge.to.id)}
               |                        ^^^^
           104 |               stroke="hsl(207, 51%, 83%)"
           105 |               strokeWidth="3px"
           106 |             />
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:107:15
       TS2571: Object is of type 'unknown'.
           105 |               strokeWidth="3px"
           106 |             />
         > 107 |           ) : edge.type === 'inverts' ? (
               |               ^^^^
           108 |             <path
           109 |               stroke="hsl(207, 51%, 83%)"
           110 |               strokeWidth="3px"
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:112:28
       TS2571: Object is of type 'unknown'.
           110 |               strokeWidth="3px"
           111 |               fill="none"
         > 112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
               |                            ^^^^
           113 |               C ${getX(edge.from.id) + 10} ${
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:112:50
       TS2571: Object is of type 'unknown'.
           110 |               strokeWidth="3px"
           111 |               fill="none"
         > 112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
               |                                                  ^^^^
           113 |               C ${getX(edge.from.id) + 10} ${
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:113:24
       TS2571: Object is of type 'unknown'.
           111 |               fill="none"
           112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
         > 113 |               C ${getX(edge.from.id) + 10} ${
               |                        ^^^^
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
           116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:114:22
       TS2571: Object is of type 'unknown'.
           112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           113 |               C ${getX(edge.from.id) + 10} ${
         > 114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                      ^^^^
           115 |               } ${getX(edge.from.id) + 10} ${
           116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           117 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:114:44
       TS2571: Object is of type 'unknown'.
           112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           113 |               C ${getX(edge.from.id) + 10} ${
         > 114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                            ^^^^
           115 |               } ${getX(edge.from.id) + 10} ${
           116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           117 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:114:63
       TS2571: Object is of type 'unknown'.
           112 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           113 |               C ${getX(edge.from.id) + 10} ${
         > 114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                                               ^^^^
           115 |               } ${getX(edge.from.id) + 10} ${
           116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           117 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:115:24
       TS2571: Object is of type 'unknown'.
           113 |               C ${getX(edge.from.id) + 10} ${
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
         > 115 |               } ${getX(edge.from.id) + 10} ${
               |                        ^^^^
           116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           117 |               }
           118 |
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:116:22
       TS2571: Object is of type 'unknown'.
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
         > 116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                      ^^^^
           117 |               }
           118 |
           119 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:116:44
       TS2571: Object is of type 'unknown'.
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
         > 116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                            ^^^^
           117 |               }
           118 |
           119 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:116:63
       TS2571: Object is of type 'unknown'.
           114 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           115 |               } ${getX(edge.from.id) + 10} ${
         > 116 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                                               ^^^^
           117 |               }
           118 |
           119 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:119:22
       TS2571: Object is of type 'unknown'.
           117 |               }
           118 |
         > 119 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
               |                      ^^^^
           120 |               `}
           121 |             />
           122 |           ) : (
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:119:42
       TS2571: Object is of type 'unknown'.
           117 |               }
           118 |
         > 119 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
               |                                          ^^^^
           120 |               `}
           121 |             />
           122 |           ) : (
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:127:28
       TS2571: Object is of type 'unknown'.
           125 |               strokeWidth="3px"
           126 |               fill="none"
         > 127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
               |                            ^^^^
           128 |               C ${getX(edge.from.id) - 10} ${
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:127:50
       TS2571: Object is of type 'unknown'.
           125 |               strokeWidth="3px"
           126 |               fill="none"
         > 127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
               |                                                  ^^^^
           128 |               C ${getX(edge.from.id) - 10} ${
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:128:24
       TS2571: Object is of type 'unknown'.
           126 |               fill="none"
           127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
         > 128 |               C ${getX(edge.from.id) - 10} ${
               |                        ^^^^
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
           131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:129:22
       TS2571: Object is of type 'unknown'.
           127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           128 |               C ${getX(edge.from.id) - 10} ${
         > 129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                      ^^^^
           130 |               } ${getX(edge.from.id) - 10} ${
           131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           132 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:129:44
       TS2571: Object is of type 'unknown'.
           127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           128 |               C ${getX(edge.from.id) - 10} ${
         > 129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                            ^^^^
           130 |               } ${getX(edge.from.id) - 10} ${
           131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           132 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:129:63
       TS2571: Object is of type 'unknown'.
           127 |               d={`M ${getX(edge.from.id)} ${getY(edge.from.id)}
           128 |               C ${getX(edge.from.id) - 10} ${
         > 129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                                               ^^^^
           130 |               } ${getX(edge.from.id) - 10} ${
           131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           132 |               }
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:130:24
       TS2571: Object is of type 'unknown'.
           128 |               C ${getX(edge.from.id) - 10} ${
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
         > 130 |               } ${getX(edge.from.id) - 10} ${
               |                        ^^^^
           131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           132 |               }
           133 |
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:131:22
       TS2571: Object is of type 'unknown'.
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
         > 131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                      ^^^^
           132 |               }
           133 |
           134 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:131:44
       TS2571: Object is of type 'unknown'.
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
         > 131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                            ^^^^
           132 |               }
           133 |
           134 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:131:63
       TS2571: Object is of type 'unknown'.
           129 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
           130 |               } ${getX(edge.from.id) - 10} ${
         > 131 |                 getY(edge.from.id) + (getY(edge.to.id) - getY(edge.from.id) / 2)
               |                                                               ^^^^
           132 |               }
           133 |
           134 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:134:22
       TS2571: Object is of type 'unknown'.
           132 |               }
           133 |
         > 134 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
               |                      ^^^^
           135 |               `}
           136 |             />
           137 |           )}
       
       ERROR in ./apps/dummy-testing-library/src/app/components/graphRender.tsx:134:42
       TS2571: Object is of type 'unknown'.
           132 |               }
           133 |
         > 134 |               ${getX(edge.to.id)} ${getY(edge.to.id)}
               |                                          ^^^^
           135 |               `}
           136 |             />
           137 |           )}
       
       webpack compiled with 51 errors and 3 warnings (ae98d9806526f91e)
       
        >  NX   ENOENT: no such file or directory, open 'dist/apps/dummy-testing-library/index.html'
       
          Pass --verbose to see the stacktrace.
       
    ✔  nx run react-trrack-example:build:production (11s)
    ✔  nx run rtk-trrack-example:build:production (10s)
    ✔  nx run redux:build (3s)

    ✖  nx run trrack-lineup-example:build:production
       Entrypoint main = runtime.03171ddf08ef4cf9.esm.js main.d98c94106cca73f3.esm.js
       Entrypoint polyfills = runtime.03171ddf08ef4cf9.esm.js polyfills.cd85454a8d874190.esm.js
       Entrypoint styles = runtime.03171ddf08ef4cf9.esm.js styles.b090f3b7316854a6.css
       chunk (runtime: runtime) main.d98c94106cca73f3.esm.js (main) 1.82 MiB [initial] [rendered]
       chunk (runtime: runtime) polyfills.cd85454a8d874190.esm.js (polyfills) 545 KiB [initial] [rendered]
       chunk (runtime: runtime) styles.b090f3b7316854a6.css (styles) 50 bytes (javascript) 251 bytes (css/mini-extract) [initial] [rendered]
       chunk (runtime: runtime) runtime.03171ddf08ef4cf9.esm.js (runtime) 3.32 KiB [entry] [rendered]
       
       ERROR in ./apps/trrack-lineup-example/src/app/lineup-manager.ts:81:25
       TS2345: Argument of type '(args: T) => Promise<unknown>' is not assignable to parameter of type 'TrrackActionFunction<string, string, any, T> | StateChangeFunction<T, T>'.
         Type '(args: T) => Promise<unknown>' is not assignable to type 'TrrackActionFunction<string, string, any, T>'.
           Property 'undo' is missing in type 'Promise<unknown>' but required in type '{ do?: { payload: T; type: string; }; undo: { payload: any; type: string; }; }'.
           79 |   ranking.on(suffixedEventType, handler);
           80 |
         > 81 |   registry.register(id, (args: T) => {
              |                         ^^^^^^^^^^^^^^
           82 |     ranking.on(suffixedEventType, null);
           83 |     executor(args);
           84 |     ranking.on(suffixedEventType, handler);
       
       ERROR in ./apps/trrack-lineup-example/src/app/lineup-manager.ts:186:42
       TS2345: Argument of type '(selections: number[]) => void' is not assignable to parameter of type 'TrrackActionFunction<string, string, any, number[]> | StateChangeFunction<number[], number[]>'.
         Type '(selections: number[]) => void' is not assignable to type 'TrrackActionFunction<string, string, any, number[]>'.
           Type 'void' is not assignable to type '{ do?: { payload: number[]; type: string; }; undo: { payload: any; type: string; }; }'.
           184 |   instance.on(LineUp.EVENT_SELECTION_CHANGED, selectionEventHandler);
           185 |
         > 186 |   registry.register(instanceSelectionId, (selections: number[]) => {
               |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
           187 |     instance.on(suffixedSelectionEvent, null);
           188 |     instance.setSelection(selections);
           189 |     instance.on(suffixedSelectionEvent, selectionEventHandler);
       
       ERROR in ./packages/core/src/provenance/trrack.ts:201:19
       TS2345: Argument of type 'unknown' is not assignable to parameter of type 'State'.
         'State' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.
           199 |                 const newState = (
           200 |                     action.func as ProduceWrappedStateChangeFunction<State>
         > 201 |                 )(originalState, act.payload);
               |                   ^^^^^^^^^^^^^
           202 |
           203 |                 this.record({
           204 |                     label,
       
       webpack compiled with 3 errors (0eb830470392e5ed)
       
        >  NX   ENOENT: no such file or directory, open 'dist/apps/trrack-lineup-example/index.html'
       
          Pass --verbose to see the stacktrace.
       

 ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build for 6 projects (15s)
 
    ✔    4/6 succeeded [0 read from cache]
 
    ✖    2/6 targets failed, including the following:
         - nx run dummy-testing-library:build:production
         - nx run trrack-lineup-example:build:production
 
   See Nx Cloud run details at https://cloud.nx.app/runs/2I9jDzpDkT

error Command failed with exit code 1.

Once this PR is merged the main branch fill fail until somebody resolves the errors listed above.

@kirangadhave should we merge this PR?

@thinkh thinkh added the enhancement New feature or request label Dec 12, 2022
@kirangadhave
Copy link
Member

Trrack uses the NX monorepo build system to figure out how to build the dependent packages. I will take a look at the error messages, and we can merge the PR

@kirangadhave
Copy link
Member

Sorry for the late update on this. I have been making some changes to the build and CI/CD setup for trrack.
I will be closing this PR since we don't need the functionality to build all the apps.

  • We have two GitHub actions that handle the building and releasing of packages. The build action runs on push to every branch except our release branches like main, next, alpha, beta, any maintenance branch, etc. It runs on pull requests to the release branches.
  • The release action is run only on release branches and includes the build action.
  • Both the action use the nx dependency graph to build only the affected projects and have caching setup for node_modules to speed up the Github actions.

I have a bigger PR coming soon which has some changes which along with the above-mentioned changes cover the objective of this PR. Some of the stuff included in the PR will be:

  • I will be removing the projects from the apps folder, they are now moved to code-sandbox and embedded in the trrack documentation website.
  • For the libraries, the building of a package should trigger build for all packages it depends on. e.g. building @trrack/redux should automatically build @trrack/core
  • Detailed how to contribute guide explaining the CI/CD process and how to make PRs to the trrackjs repository.

Thank you for the initial PR!

@kirangadhave kirangadhave removed their request for review March 11, 2023 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants