Skip to content

Commit 990b199

Browse files
committed
Merge branch 'master' into incrementalBuildInfo
2 parents fbfd349 + d59e51b commit 990b199

File tree

117 files changed

+4728
-5649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+4728
-5649
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ node_js:
55
- '10'
66
- '8'
77

8-
sudo: false
9-
108
env:
119
- workerCount=3 timeout=600000
1210

Gulpfile.js

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ const merge2 = require("merge2");
1212
const mkdirp = require("mkdirp");
1313
const { src, dest, task, parallel, series, watch } = require("gulp");
1414
const { append, transform } = require("gulp-insert");
15-
const { browserify } = require("./scripts/build/browserify");
1615
const { prependFile } = require("./scripts/build/prepend");
1716
const { exec, readJson, needsUpdate, getDiffTool, getDirSize, rm } = require("./scripts/build/utils");
18-
const { runConsoleTests, cleanTestDirs, writeTestConfigFile, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require("./scripts/build/tests");
17+
const { runConsoleTests, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require("./scripts/build/tests");
1918
const { buildProject, cleanProject, watchProject } = require("./scripts/build/projects");
2019
const cmdLineOptions = require("./scripts/build/options");
2120

@@ -432,44 +431,6 @@ task("runtests-parallel").flags = {
432431
" --built": "Compile using the built version of the compiler.",
433432
};
434433

435-
const buildWebTestServer = () => buildProject("tests/webTestServer.tsconfig.json");
436-
const cleanWebTestServer = () => cleanProject("tests/webTestServer.tsconfig.json");
437-
cleanTasks.push(cleanWebTestServer);
438-
439-
const browserifyTests = () => src(["built/local/run.js"], { base: "built/local" })
440-
.pipe(newer("built/local/bundle.js"))
441-
.pipe(sourcemaps.init({ loadMaps: true }))
442-
.pipe(browserify())
443-
.pipe(rename("bundle.js"))
444-
.pipe(sourcemaps.write(".", /**@type {*}*/({ includeContent: false, destPath: "built/local" })))
445-
.pipe(dest("built/local"));
446-
447-
const runtestsBrowser = async () => {
448-
await cleanTestDirs();
449-
const { tests, runners, light } = cmdLineOptions;
450-
const testConfigFile = "test.config";
451-
await del([testConfigFile]);
452-
if (tests || runners || light) {
453-
writeTestConfigFile(tests, runners, light);
454-
}
455-
const args = ["tests/webTestServer.js"];
456-
if (cmdLineOptions.browser) {
457-
args.push(cmdLineOptions.browser);
458-
}
459-
if (tests) {
460-
args.push(JSON.stringify(tests));
461-
}
462-
await exec(process.execPath, args);
463-
};
464-
465-
task("runtests-browser", series(preBuild, parallel(buildTests, buildServices, buildLssl, buildWebTestServer), browserifyTests, runtestsBrowser));
466-
task("runtests-browser").description = "Runs the tests using the built run.js file like 'gulp runtests'.";
467-
task("runtests-browser").flags = {
468-
"-t --tests=<regex>": "pattern for tests to run",
469-
"-b --browser=<browser>": "Either 'IE' or 'chrome'",
470-
" --built": "Compile using the built version of the compiler.",
471-
};
472-
473434
task("diff", () => exec(getDiffTool(), [refBaseline, localBaseline], { ignoreExitCode: true }));
474435
task("diff").description = "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable";
475436

@@ -503,16 +464,6 @@ cleanTasks.push(cleanWebHost);
503464
task("clean-webhost", cleanWebHost);
504465
task("clean-webhost").description = "Cleans the outputs of the tsc web host";
505466

506-
// TODO(rbuckton): Determine if 'perftsc' is still in use.
507-
const buildPerfTsc = () => buildProject("tests/perftsc.tsconfig.json");
508-
task("perftsc", series(lkgPreBuild, buildPerfTsc));
509-
task("perftsc").description = "Builds augmented version of the compiler for perf tests";
510-
511-
const cleanPerfTsc = () => cleanProject("tests/perftsc.tsconfig.json");
512-
cleanTasks.push(cleanPerfTsc);
513-
task("clean-perftsc", cleanPerfTsc);
514-
task("clean-perftsc").description = "Cleans the outputs of the perftsc project";
515-
516467
const buildLoggedIO = async () => {
517468
mkdirp.sync("built/local/temp");
518469
await exec(process.execPath, ["lib/tsc", "--types", "--target", "es5", "--lib", "es5", "--outdir", "built/local/temp", "src/harness/loggedIO.ts"]);

scripts/browserify-optional.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

scripts/build/browserify.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

scripts/build/sourcemaps.js

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,4 @@
11
// @ts-check
2-
/// <reference path="../types/ambient.d.ts" />
3-
4-
const path = require("path");
5-
const convertMap = require("convert-source-map");
6-
const applySourceMap = require("vinyl-sourcemaps-apply");
7-
const through2 = require("through2");
8-
9-
/**
10-
* @param {import("vinyl")} input
11-
* @param {string | Buffer} contents
12-
* @param {string | RawSourceMap} [sourceMap]
13-
*/
14-
function replaceContents(input, contents, sourceMap) {
15-
const output = input.clone();
16-
output.contents = typeof contents === "string" ? Buffer.from(contents, "utf8") : contents;
17-
if (input.sourceMap) {
18-
output.sourceMap = typeof input.sourceMap === "string" ? /**@type {RawSourceMap}*/(JSON.parse(input.sourceMap)) : input.sourceMap;
19-
if (typeof sourceMap === "string") {
20-
sourceMap = /** @type {RawSourceMap} */(JSON.parse(sourceMap));
21-
}
22-
else if (sourceMap === undefined) {
23-
const stringContents = typeof contents === "string" ? contents : contents.toString("utf8");
24-
const newSourceMapConverter = convertMap.fromSource(stringContents);
25-
if (newSourceMapConverter) {
26-
sourceMap = /** @type {RawSourceMap} */(newSourceMapConverter.toObject());
27-
output.contents = new Buffer(convertMap.removeMapFileComments(stringContents), "utf8");
28-
}
29-
}
30-
if (sourceMap) {
31-
const cwd = input.cwd || process.cwd();
32-
const base = input.base || cwd;
33-
const sourceRoot = output.sourceMap.sourceRoot;
34-
makeAbsoluteSourceMap(cwd, base, output.sourceMap);
35-
makeAbsoluteSourceMap(cwd, base, /** @type {RawSourceMap} */(sourceMap));
36-
applySourceMap(output, sourceMap);
37-
makeRelativeSourceMap(cwd, base, sourceRoot, output.sourceMap);
38-
}
39-
else {
40-
output.sourceMap = undefined;
41-
}
42-
}
43-
return output;
44-
}
45-
exports.replaceContents = replaceContents;
46-
47-
function removeSourceMaps() {
48-
return through2.obj((/**@type {import("vinyl")}*/file, _, cb) => {
49-
if (file.isBuffer()) {
50-
file.contents = Buffer.from(convertMap.removeMapFileComments(file.contents.toString("utf8")), "utf8");
51-
if (file.sourceMap) {
52-
file.sourceMap = undefined;
53-
}
54-
}
55-
cb(null, file);
56-
});
57-
}
58-
exports.removeSourceMaps = removeSourceMaps;
59-
60-
/**
61-
* @param {string | undefined} cwd
62-
* @param {string | undefined} base
63-
* @param {RawSourceMap} sourceMap
64-
*
65-
* @typedef {object} RawSourceMap
66-
* @property {string} version
67-
* @property {string} file
68-
* @property {string} [sourceRoot]
69-
* @property {string[]} sources
70-
* @property {string[]} [sourcesContent]
71-
* @property {string} mappings
72-
* @property {string[]} [names]
73-
*/
74-
function makeAbsoluteSourceMap(cwd = process.cwd(), base = "", sourceMap) {
75-
const sourceRoot = sourceMap.sourceRoot || "";
76-
const resolvedBase = path.resolve(cwd, base);
77-
const resolvedSourceRoot = path.resolve(resolvedBase, sourceRoot);
78-
sourceMap.file = path.resolve(resolvedBase, sourceMap.file).replace(/\\/g, "/");
79-
sourceMap.sources = sourceMap.sources.map(source => path.resolve(resolvedSourceRoot, source).replace(/\\/g, "/"));
80-
sourceMap.sourceRoot = "";
81-
}
82-
exports.makeAbsoluteSourceMap = makeAbsoluteSourceMap;
83-
84-
/**
85-
* @param {string | undefined} cwd
86-
* @param {string | undefined} base
87-
* @param {string} sourceRoot
88-
* @param {RawSourceMap} sourceMap
89-
*/
90-
function makeRelativeSourceMap(cwd = process.cwd(), base = "", sourceRoot, sourceMap) {
91-
makeAbsoluteSourceMap(cwd, base, sourceMap);
92-
const resolvedBase = path.resolve(cwd, base);
93-
const resolvedSourceRoot = path.resolve(resolvedBase, sourceRoot);
94-
sourceMap.file = path.relative(resolvedBase, sourceMap.file).replace(/\\/g, "/");
95-
sourceMap.sources = sourceMap.sources.map(source => path.relative(resolvedSourceRoot, source).replace(/\\/g, "/"));
96-
sourceMap.sourceRoot = sourceRoot;
97-
}
98-
exports.makeRelativeSourceMap = makeRelativeSourceMap;
99-
1002
/**
1013
* @param {string} message
1024
* @returns {never}

scripts/createBenchmark.ts

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)