Revert "fix(ivy): correct ngtsc path handling in Windows (#26703)"

This reverts commit d0037b22ef. The commit must be temporarily reverted because
there were unforeseen breakages in g3.
This commit is contained in:
Kara Erickson
2018-11-05 11:18:52 -08:00
parent d0037b22ef
commit 4e4bca6bbc
10 changed files with 15 additions and 18 deletions

View File

@ -15,7 +15,6 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//canonical-path",
"@ngdeps//typescript",
],
)

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import * as path from 'canonical-path';
import * as path from 'path';
import * as ts from 'typescript';
import {relativePathBetween} from '../../util/src/path';
@ -29,7 +29,8 @@ export class FactoryGenerator implements ShimGenerator {
getOriginalSourceOfShim(fileName: string): string|null { return this.map.get(fileName) || null; }
generate(original: ts.SourceFile, genFilePath: string): ts.SourceFile {
const relativePathToSource = './' + path.basename(original.fileName).replace(TS_DTS_SUFFIX, '');
const relativePathToSource =
'./' + path.posix.basename(original.fileName).replace(TS_DTS_SUFFIX, '');
// Collect a list of classes that need to have factory types emitted for them. This list is
// overly broad as at this point the ts.TypeChecker hasn't been created, and can't be used to
// semantically understand which decorated types are actually decorated with Angular decorators.