Skip to content

Commit 7ac361b

Browse files
committed
fix(migrations): properly resolve directory scan paths in ts ServerHost
Those are used in loading project files from a tsconfig include pattern like `"include": ["**/*"]` and caused candidate configured project to fail to reach sub-dirs/files, thus failing to associate with child script infos and be discarded. That in turn orphaned script infos or incorrectly assigned them to inferred projects.
1 parent 679148f commit 7ac361b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/igniteui-angular/migrations/common/ServerHost.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class ServerHost implements ts.server.ServerHost {
106106
// check directory contents in Tree (w/ relative paths)
107107
path = pathFs.relative(this.getCurrentDirectory(), path);
108108
// return directory contents w/ absolute paths for LS
109-
return this.host.getDir(path).subdirs.map(e => pathFs.resolve(e));
109+
return this.host.getDir(path).subdirs.map(e => pathFs.resolve(path, e));
110110
}
111111

112112
/**
@@ -116,7 +116,7 @@ export class ServerHost implements ts.server.ServerHost {
116116
// check directory contents in Tree (w/ relative paths)
117117
path = pathFs.relative(this.getCurrentDirectory(), path);
118118
// return directory contents w/ absolute paths for LS
119-
return this.host.getDir(path).subfiles.map(e => pathFs.resolve(e));
119+
return this.host.getDir(path).subfiles.map(e => pathFs.resolve(path, e));
120120
}
121121

122122
public require(initialPath: string, moduleName: string) {

0 commit comments

Comments
 (0)