
The `fs.relative()` method assumed that the file-system is a single tree, which is not the case in Windows, where you can have multiple drives, e.g. `C:`, `D:` etc. This commit changes `fs.relative()` so that it no longer forces the result to be a `PathSegment` and then flows that refactoring through the rest of the compiler-cli (and ngcc). The main difference is that now, in some cases, we needed to check whether the result is "rooted", i.e an `AbsoluteFsPath`, rather than a `PathSegment`, before using it. Fixes #36777 PR Close #37959
14 lines
740 B
TypeScript
14 lines
740 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
export {NgtscCompilerHost} from './src/compiler_host';
|
|
export {absoluteFrom, absoluteFromSourceFile, basename, dirname, getFileSystem, isLocalRelativePath, isRoot, isRooted, join, relative, relativeFrom, resolve, setFileSystem, toRelativeImport} from './src/helpers';
|
|
export {LogicalFileSystem, LogicalProjectPath} from './src/logical';
|
|
export {NodeJSFileSystem} from './src/node_js_file_system';
|
|
export {AbsoluteFsPath, FileStats, FileSystem, PathSegment, PathString} from './src/types';
|
|
export {getSourceFileOrError} from './src/util';
|