File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
repo-scripts/size-analysis Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -867,19 +867,35 @@ export async function buildJsonReport(
867
867
name : moduleName ,
868
868
symbols : [ ]
869
869
} ;
870
-
871
870
for ( const exp of publicApi . classes ) {
872
- result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
871
+ try {
872
+ result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
873
+ } catch ( e ) {
874
+ console . log ( e ) ;
875
+ }
873
876
}
877
+
874
878
for ( const exp of publicApi . functions ) {
875
- result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
879
+ try {
880
+ result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
881
+ } catch ( e ) {
882
+ console . log ( e ) ;
883
+ }
876
884
}
877
885
for ( const exp of publicApi . variables ) {
878
- result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
886
+ try {
887
+ result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
888
+ } catch ( e ) {
889
+ console . log ( e ) ;
890
+ }
879
891
}
880
892
881
893
for ( const exp of publicApi . enums ) {
882
- result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
894
+ try {
895
+ result . symbols . push ( await extractDependenciesAndSize ( exp , jsFile , map ) ) ;
896
+ } catch ( e ) {
897
+ console . log ( e ) ;
898
+ }
883
899
}
884
900
return result ;
885
901
}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import {
27
27
import glob from 'glob' ;
28
28
import * as fs from 'fs' ;
29
29
30
- const projectRoot = dirname ( resolve ( __dirname , '../package.json' ) ) ;
30
+ const projectRoot = dirname ( resolve ( __dirname , '../../ package.json' ) ) ;
31
31
/**
32
32
* Support Command Line Options
33
33
* -- inputModule (optional) : can be left unspecified which results in running analysis on all exp modules.
You can’t perform that action at this time.
0 commit comments