"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/angular_devkit/core/node/host.ts" between
angular-cli-12.0.3.tar.gz and angular-cli-12.0.4.tar.gz

About: Angular CLI is a command line interface for Angular.

host.ts  (angular-cli-12.0.3):host.ts  (angular-cli-12.0.4)
skipping to change at line 139 skipping to change at line 139
return observableFrom(fsPromises.rename(getSystemPath(from), getSystemPath(t o))); return observableFrom(fsPromises.rename(getSystemPath(from), getSystemPath(t o)));
} }
list(path: Path): Observable<PathFragment[]> { list(path: Path): Observable<PathFragment[]> {
return observableFrom(fsPromises.readdir(getSystemPath(path))).pipe( return observableFrom(fsPromises.readdir(getSystemPath(path))).pipe(
map((names) => names.map((name) => fragment(name))), map((names) => names.map((name) => fragment(name))),
); );
} }
exists(path: Path): Observable<boolean> { exists(path: Path): Observable<boolean> {
return observableFrom(exists(path)); return observableFrom(exists(getSystemPath(path)));
} }
isDirectory(path: Path): Observable<boolean> { isDirectory(path: Path): Observable<boolean> {
return this.stat(path).pipe(map((stat) => stat.isDirectory())); return this.stat(path).pipe(map((stat) => stat.isDirectory()));
} }
isFile(path: Path): Observable<boolean> { isFile(path: Path): Observable<boolean> {
return this.stat(path).pipe(map((stat) => stat.isFile())); return this.stat(path).pipe(map((stat) => stat.isFile()));
} }
// Some hosts may not support stat. // Some hosts may not support stat.
stat(path: Path): Observable<virtualFs.Stats<Stats>> { stat(path: Path): Observable<virtualFs.Stats<Stats>> {
return observableFrom(fsPromises.stat(getSystemPath(path))); return observableFrom(fsPromises.stat(getSystemPath(path)));
} }
// Some hosts may not support watching. // Some hosts may not support watching.
skipping to change at line 270 skipping to change at line 271
return new Observable((obs) => { return new Observable((obs) => {
obs.next(existsSync(getSystemPath(path))); obs.next(existsSync(getSystemPath(path)));
obs.complete(); obs.complete();
}); });
} }
isDirectory(path: Path): Observable<boolean> { isDirectory(path: Path): Observable<boolean> {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.stat(path)!.pipe(map((stat) => stat.isDirectory())); return this.stat(path)!.pipe(map((stat) => stat.isDirectory()));
} }
isFile(path: Path): Observable<boolean> { isFile(path: Path): Observable<boolean> {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.stat(path)!.pipe(map((stat) => stat.isFile())); return this.stat(path)!.pipe(map((stat) => stat.isFile()));
} }
// Some hosts may not support stat. // Some hosts may not support stat.
stat(path: Path): Observable<virtualFs.Stats<Stats>> { stat(path: Path): Observable<virtualFs.Stats<Stats>> {
return new Observable((obs) => { return new Observable((obs) => {
obs.next(statSync(getSystemPath(path))); obs.next(statSync(getSystemPath(path)));
obs.complete(); obs.complete();
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)