Optimize sourcemap application more (#25425)

* Optimize sourcemap application more

* Remove test-only memory hog sourceMapDecodedMappings field

* Update for style, remove unused function that triggers warnings in node 10

* Avoid all raw buffer constructor calls

* Small TDZ fix
This commit is contained in:
Wesley Wigham
2018-07-05 15:12:10 -07:00
committed by GitHub
parent 065e695a28
commit 5b92678285
11 changed files with 36 additions and 49 deletions

View File

@@ -20,6 +20,7 @@ namespace Harness.Parallel.Host {
// tslint:disable-next-line:variable-name
const FailedTestReporter = require(path.resolve(__dirname, "../../scripts/failed-tests")) as typeof import("../../../scripts/failed-tests");
const perfdataFileNameFragment = ".parallelperf";
const perfData = readSavedPerfData(configOption);
const newTasks: Task[] = [];
let tasks: Task[] = [];
@@ -175,8 +176,6 @@ namespace Harness.Parallel.Host {
}
}
const perfdataFileNameFragment = ".parallelperf";
function perfdataFileName(target?: string) {
return `${perfdataFileNameFragment}${target ? `.${target}` : ""}.json`;
}

View File

@@ -2,7 +2,7 @@ namespace ts {
describe("convertToBase64", () => {
function runTest(input: string): void {
const actual = convertToBase64(input);
const expected = new Buffer(input).toString("base64");
const expected = (Buffer.from ? Buffer.from(input) : new Buffer(input)).toString("base64");
assert.equal(actual, expected, "Encoded string using convertToBase64 does not match buffer.toString('base64')");
}