File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,24 @@ parentDirs.forEach(curParentDir => {
39
39
dirs . push ( ...curDirs . map ( curDir => join ( curParentDir , curDir ) ) ) ;
40
40
} )
41
41
42
- dirs . forEach ( dir => {
42
+ // TODO(mattsoulanille): Packages are not sorted based on dependencies. There
43
+ // are a few ways to fix this:
44
+ // 1. Use only npm versions of packages, so they don't depend on each other.
45
+ // 2. Parse package.json and implement topological sort here.
46
+ // 3. Use something like Lerna or TurboRepo.
47
+ // The current approach is just to enforce order in a subset of the packages.
48
+ // It's not a scalabe approach.
49
+ const dependenciesInOrder = new Set ( [
50
+ 'tfjs-tflite-node' , 'coral-tflite-delegate' ] ) ;
51
+ const dirsSet = new Set ( dirs ) ;
52
+ for ( const dir of dirsSet ) {
53
+ if ( dependenciesInOrder . has ( dir ) ) {
54
+ dirsSet . delete ( dir ) ;
55
+ }
56
+ }
57
+ const sortedDirs = [ ...dirsSet , ...dependenciesInOrder ] ;
58
+
59
+ sortedDirs . forEach ( dir => {
43
60
shell . cd ( dir ) ;
44
61
45
62
if ( ! fs . existsSync ( './package.json' ) ) {
You can’t perform that action at this time.
0 commit comments