@@ -56,7 +56,7 @@ export class LWCWorkspaceContext extends BaseWorkspaceContext {
5656 for ( const pkg of config . packageDirectories ) {
5757 const pkgRoot = normalizePath ( path . join ( root , pkg . path ) ) ;
5858
59- const lwcFiles = ( await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/lwc/**' , pkgRoot ) ) ?? [ ] ;
59+ const lwcFiles = await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/lwc/**' , pkgRoot ) ;
6060 const lwcDirs = [
6161 ...new Set (
6262 lwcFiles
@@ -70,7 +70,7 @@ export class LWCWorkspaceContext extends BaseWorkspaceContext {
7070 ] ;
7171 roots . lwc . push ( ...lwcDirs ) ;
7272
73- const auraFiles = ( await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/aura/**' , pkgRoot ) ) ?? [ ] ;
73+ const auraFiles = await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/aura/**' , pkgRoot ) ;
7474 const auraDirs = [
7575 ...new Set (
7676 auraFiles
@@ -90,8 +90,10 @@ export class LWCWorkspaceContext extends BaseWorkspaceContext {
9090 case 'CORE_ALL' : {
9191 // optimization: discover LWC roots under project/modules/ via findFilesWithGlobAsync
9292 const workspaceRoot = normalizePath ( this . workspaceRoots [ 0 ] ) ;
93- const pathsUnderLwc =
94- ( await this . fileSystemAccessor . findFilesWithGlobAsync ( '*/modules/**/lwc/**' , workspaceRoot ) ) ?? [ ] ;
93+ const pathsUnderLwc = await this . fileSystemAccessor . findFilesWithGlobAsync (
94+ '*/modules/**/lwc/**' ,
95+ workspaceRoot
96+ ) ;
9597 const lwcRootDirs = [
9698 ...new Set (
9799 pathsUnderLwc
@@ -108,12 +110,11 @@ export class LWCWorkspaceContext extends BaseWorkspaceContext {
108110 }
109111 case 'CORE_PARTIAL' : {
110112 // optimization: discover LWC roots under modules/ via findFilesWithGlobAsync
111- const pathsUnderModulesLwc =
112- ( await Promise . all (
113- this . workspaceRoots . map ( ws =>
114- this . fileSystemAccessor . findFilesWithGlobAsync ( 'modules/**/lwc/**' , normalizePath ( ws ) )
115- )
116- ) ) ?? [ ] ;
113+ const pathsUnderModulesLwc = await Promise . all (
114+ this . workspaceRoots . map ( ws =>
115+ this . fileSystemAccessor . findFilesWithGlobAsync ( 'modules/**/lwc/**' , normalizePath ( ws ) )
116+ )
117+ ) ;
117118 const lwcRootDirs = [
118119 ...new Set (
119120 pathsUnderModulesLwc
@@ -135,7 +136,7 @@ export class LWCWorkspaceContext extends BaseWorkspaceContext {
135136 case 'UNKNOWN' : {
136137 // discover all LWC roots via findFilesWithGlobAsync (same dirs findNamespaceRoots would find)
137138 const workspaceRoot = normalizePath ( this . workspaceRoots [ 0 ] ) ;
138- const pathsUnderLwc = ( await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/lwc/**' , workspaceRoot ) ) ?? [ ] ;
139+ const pathsUnderLwc = await this . fileSystemAccessor . findFilesWithGlobAsync ( '**/lwc/**' , workspaceRoot ) ;
139140 const IGNORED_DIRS = new Set ( [ 'node_modules' , 'bin' , 'target' , 'jest-modules' , 'repository' , 'git' ] ) ;
140141 const lwcRootDirs = [
141142 ...new Set (
0 commit comments