Skip to content

Commit f0eedd3

Browse files
committed
Merge branch 'master' into jsx-element-realtypes
2 parents cec5c8d + 3127962 commit f0eedd3

File tree

560 files changed

+267184
-29609
lines changed

Some content is hidden

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

560 files changed

+267184
-29609
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
Thank you for submitting a pull request!
33
44
Here's a checklist you might find useful.
5-
* [ ] There is an associated issue that is labeled
6-
'Bug' or 'help wanted' or is in the Community milestone
5+
* [ ] There is an associated issue that is labeled 'Bug' or 'help wanted'
76
* [ ] Code is up-to-date with the `master` branch
87
* [ ] You've successfully run `gulp runtests` locally
9-
* [ ] You've signed the CLA
108
* [ ] There are new or updated unit tests validating the change
119
1210
Refer to CONTRIBUTING.MD for more details.

.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: 11 additions & 92 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");
17-
const { exec, readJson, needsUpdate, getDiffTool, getDirSize, flatten, rm } = require("./scripts/build/utils");
18-
const { runConsoleTests, cleanTestDirs, writeTestConfigFile, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require("./scripts/build/tests");
16+
const { exec, readJson, needsUpdate, getDiffTool, getDirSize, rm } = require("./scripts/build/utils");
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

@@ -114,18 +113,8 @@ const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagno
114113
const preBuild = cmdLineOptions.lkg ? lkgPreBuild : localPreBuild;
115114

116115
const buildServices = (() => {
117-
// flatten the services project
118-
const flattenServicesConfig = async () => flatten("src/services/tsconfig.json", "built/local/typescriptServices.tsconfig.json", {
119-
compilerOptions: {
120-
"removeComments": false,
121-
"stripInternal": true,
122-
"declarationMap": false,
123-
"outFile": "typescriptServices.out.js"
124-
}
125-
});
126-
127116
// build typescriptServices.out.js
128-
const buildTypescriptServicesOut = () => buildProject("built/local/typescriptServices.tsconfig.json", cmdLineOptions);
117+
const buildTypescriptServicesOut = () => buildProject("src/typescriptServices/tsconfig.json", cmdLineOptions);
129118

130119
// create typescriptServices.js
131120
const createTypescriptServicesJs = () => src("built/local/typescriptServices.out.js")
@@ -167,13 +156,13 @@ const buildServices = (() => {
167156
.pipe(dest("built/local"));
168157

169158
return series(
170-
flattenServicesConfig,
171159
buildTypescriptServicesOut,
172160
createTypescriptServicesJs,
173161
createTypescriptServicesDts,
174162
createTypescriptJs,
175163
createTypescriptDts,
176-
createTypescriptStandaloneDts);
164+
createTypescriptStandaloneDts,
165+
);
177166
})();
178167
task("services", series(preBuild, buildServices));
179168
task("services").description = "Builds the language service";
@@ -186,13 +175,13 @@ const cleanServices = async () => {
186175
await cleanProject("built/local/typescriptServices.tsconfig.json");
187176
}
188177
await del([
189-
"built/local/typescriptServices.tsconfig.json",
190178
"built/local/typescriptServices.out.js",
191179
"built/local/typescriptServices.out.d.ts",
180+
"built/local/typescriptServices.out.tsbuildinfo",
192181
"built/local/typescriptServices.js",
193182
"built/local/typescript.js",
194183
"built/local/typescript.d.ts",
195-
"built/local/typescript_standalone.d.ts",
184+
"built/local/typescript_standalone.d.ts"
196185
]);
197186
};
198187
cleanTasks.push(cleanServices);
@@ -248,20 +237,8 @@ task("watch-min").flags = {
248237
}
249238

250239
const buildLssl = (() => {
251-
// flatten the server project
252-
const flattenTsServerProject = async () => flatten("src/tsserver/tsconfig.json", "built/local/tsserverlibrary.tsconfig.json", {
253-
exclude: ["src/tsserver/server.ts"],
254-
compilerOptions: {
255-
"removeComments": false,
256-
"stripInternal": true,
257-
"declaration": true,
258-
"declarationMap": false,
259-
"outFile": "tsserverlibrary.out.js"
260-
}
261-
});
262-
263240
// build tsserverlibrary.out.js
264-
const buildServerLibraryOut = () => buildProject("built/local/tsserverlibrary.tsconfig.json", cmdLineOptions);
241+
const buildServerLibraryOut = () => buildProject("src/tsserverlibrary/tsconfig.json", cmdLineOptions);
265242

266243
// create tsserverlibrary.js
267244
const createServerLibraryJs = () => src("built/local/tsserverlibrary.out.js")
@@ -282,10 +259,10 @@ const buildLssl = (() => {
282259
.pipe(dest("built/local"));
283260

284261
return series(
285-
flattenTsServerProject,
286262
buildServerLibraryOut,
287263
createServerLibraryJs,
288-
createServerLibraryDts);
264+
createServerLibraryDts,
265+
);
289266
})();
290267
task("lssl", series(preBuild, buildLssl));
291268
task("lssl").description = "Builds language service server library";
@@ -298,9 +275,9 @@ const cleanLssl = async () => {
298275
await cleanProject("built/local/tsserverlibrary.tsconfig.json");
299276
}
300277
await del([
301-
"built/local/tsserverlibrary.tsconfig.json",
302278
"built/local/tsserverlibrary.out.js",
303279
"built/local/tsserverlibrary.out.d.ts",
280+
"built/local/tsserverlibrary.out.tsbuildinfo",
304281
"built/local/tsserverlibrary.js",
305282
"built/local/tsserverlibrary.d.ts",
306283
]);
@@ -454,44 +431,6 @@ task("runtests-parallel").flags = {
454431
" --built": "Compile using the built version of the compiler.",
455432
};
456433

457-
const buildWebTestServer = () => buildProject("tests/webTestServer.tsconfig.json");
458-
const cleanWebTestServer = () => cleanProject("tests/webTestServer.tsconfig.json");
459-
cleanTasks.push(cleanWebTestServer);
460-
461-
const browserifyTests = () => src(["built/local/run.js"], { base: "built/local" })
462-
.pipe(newer("built/local/bundle.js"))
463-
.pipe(sourcemaps.init({ loadMaps: true }))
464-
.pipe(browserify())
465-
.pipe(rename("bundle.js"))
466-
.pipe(sourcemaps.write(".", /**@type {*}*/({ includeContent: false, destPath: "built/local" })))
467-
.pipe(dest("built/local"));
468-
469-
const runtestsBrowser = async () => {
470-
await cleanTestDirs();
471-
const { tests, runners, light } = cmdLineOptions;
472-
const testConfigFile = "test.config";
473-
await del([testConfigFile]);
474-
if (tests || runners || light) {
475-
writeTestConfigFile(tests, runners, light);
476-
}
477-
const args = ["tests/webTestServer.js"];
478-
if (cmdLineOptions.browser) {
479-
args.push(cmdLineOptions.browser);
480-
}
481-
if (tests) {
482-
args.push(JSON.stringify(tests));
483-
}
484-
await exec(process.execPath, args);
485-
};
486-
487-
task("runtests-browser", series(preBuild, parallel(buildTests, buildServices, buildLssl, buildWebTestServer), browserifyTests, runtestsBrowser));
488-
task("runtests-browser").description = "Runs the tests using the built run.js file like 'gulp runtests'.";
489-
task("runtests-browser").flags = {
490-
"-t --tests=<regex>": "pattern for tests to run",
491-
"-b --browser=<browser>": "Either 'IE' or 'chrome'",
492-
" --built": "Compile using the built version of the compiler.",
493-
};
494-
495434
task("diff", () => exec(getDiffTool(), [refBaseline, localBaseline], { ignoreExitCode: true }));
496435
task("diff").description = "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable";
497436

@@ -515,26 +454,6 @@ task("baseline-accept").description = "Makes the most recent test results the ne
515454
task("baseline-accept-rwc", () => baselineAccept(localRwcBaseline, refRwcBaseline));
516455
task("baseline-accept-rwc").description = "Makes the most recent rwc test results the new baseline, overwriting the old baseline";
517456

518-
// TODO(rbuckton): Determine if 'webhost' is still in use.
519-
const buildWebHost = () => buildProject("tests/webhost/webtsc.tsconfig.json");
520-
task("webhost", series(lkgPreBuild, buildWebHost));
521-
task("webhost").description = "Builds the tsc web host";
522-
523-
const cleanWebHost = () => cleanProject("tests/webhost/webtsc.tsconfig.json");
524-
cleanTasks.push(cleanWebHost);
525-
task("clean-webhost", cleanWebHost);
526-
task("clean-webhost").description = "Cleans the outputs of the tsc web host";
527-
528-
// TODO(rbuckton): Determine if 'perftsc' is still in use.
529-
const buildPerfTsc = () => buildProject("tests/perftsc.tsconfig.json");
530-
task("perftsc", series(lkgPreBuild, buildPerfTsc));
531-
task("perftsc").description = "Builds augmented version of the compiler for perf tests";
532-
533-
const cleanPerfTsc = () => cleanProject("tests/perftsc.tsconfig.json");
534-
cleanTasks.push(cleanPerfTsc);
535-
task("clean-perftsc", cleanPerfTsc);
536-
task("clean-perftsc").description = "Cleans the outputs of the perftsc project";
537-
538457
const buildLoggedIO = async () => {
539458
mkdirp.sync("built/local/temp");
540459
await exec(process.execPath, ["lib/tsc", "--types", "--target", "es5", "--lib", "es5", "--outdir", "built/local/temp", "src/harness/loggedIO.ts"]);

0 commit comments

Comments
 (0)