File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ async function loadFrameworkInfo(keyedDir, directoryName) {
65
65
return result ;
66
66
}
67
67
68
+ function isFrameworkDir ( keyedDir , directoryName ) {
69
+ const frameworkPath = path . resolve ( frameworkDirectory , keyedDir , directoryName ) ;
70
+ const packageJSONPath = path . resolve ( frameworkPath , "package.json" ) ;
71
+ const packageLockJSONPath = path . resolve ( frameworkPath , "package-lock.json" ) ;
72
+ const exists = fs . existsSync ( packageJSONPath ) && fs . existsSync ( packageLockJSONPath ) ;
73
+ return exists ;
74
+ }
75
+
68
76
async function loadFrameworkVersionInformation ( filterForFramework ) {
69
77
// let matchesDirectoryArg = (directoryName) =>
70
78
// frameworkArgument.length == 0 || frameworkArgument.some((arg: string) => arg == directoryName);
@@ -76,8 +84,10 @@ async function loadFrameworkVersionInformation(filterForFramework) {
76
84
for ( let directory of directories ) {
77
85
let pathInFrameworksDir = keyedType + "/" + directory ;
78
86
if ( ! filterForFramework || filterForFramework === pathInFrameworksDir ) {
79
- let fi = loadFrameworkInfo ( keyedType , directory ) ;
80
- resultsProm . push ( fi ) ;
87
+ if ( isFrameworkDir ( keyedType , directory ) ) {
88
+ let fi = loadFrameworkInfo ( keyedType , directory ) ;
89
+ resultsProm . push ( fi ) ;
90
+ }
81
91
}
82
92
}
83
93
}
You can’t perform that action at this time.
0 commit comments