Capture fakes.version instead of the current version string in baselines (#36518)

* Capture CURRENT.VERSION instead of the current version string in baselines

* Use fakes.version

* Move replacer into patchHostForBuildInfoReadWrite
This commit is contained in:
Wesley Wigham 2020-01-29 16:15:09 -08:00 committed by GitHub
parent 2fac535158
commit 140fee96d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -534,6 +534,8 @@ ${indentText}${text}`;
buildInfo.version = ts.version;
return ts.getBuildInfoText(buildInfo);
};
const originalWrite = sys.write;
sys.write = msg => originalWrite.call(sys, msg.replace(ts.version, version));
if (sys.writeFile) {
const originalWriteFile = sys.writeFile;

View File

@ -1,6 +1,6 @@
//// [/lib/initial-buildOutput.txt]
/lib/tsc
Version 3.8.0-dev
Version FakeTSVersion
Syntax: tsc [options] [file...]
Examples: tsc hello.ts