-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
TypeScript Version: 2.0.0-beta
@zhengbli The following commit appears to have broken the getSourceFilePathInNewDir implementation in certain circumstances:
The use of getCanonicalFileName breaks the implementation if the common directory is a parent of the current directory.
For example, with these files:
C:/Users/Nicholas/example/a/a.ts
C:/Users/Nicholas/example/b/b.ts
The common directory is C:/Users/Nicholas/example.
If the current directory is C:/Users/Nicholas/example/b, for the a.ts source file:
cannonical source = ../a/a.ts
cannonical common = ..
So isSourceFileInCommonSourceDirectory will be true.
However, for the b.ts source file:
cannonical source = b.ts
cannonical common = ..
So isSourceFileInCommonSourceDirectory will be false - which will result in the absolute path to the source file - C:/Users/Nicholas/example/b/b.ts - being returned.
Specifically, this change to the implementation breaks my tsify-based builds.