Skip to content

Commit bb250df

Browse files
committed
Merge branch 'master' into disable-probing-for-nongeneric-instances
2 parents cd92006 + 0e858a6 commit bb250df

File tree

3 files changed

+34
-28
lines changed

3 files changed

+34
-28
lines changed

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ tests
1212
tslint.json
1313
Jakefile.js
1414
.editorconfig
15+
.failed-tests
16+
.git
17+
.git/
1518
.gitattributes
19+
.github/
1620
.gitmodules
1721
.settings/
1822
.travis.yml
@@ -23,6 +27,5 @@ Jakefile.js
2327
test.config
2428
package-lock.json
2529
yarn.lock
26-
.github/
2730
CONTRIBUTING.md
2831
TEST-results.xml

Gulpfile.js

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,34 @@ task("lint").flags = {
373373
" --f[iles]=<regex>": "pattern to match files to lint",
374374
};
375375

376+
const buildCancellationToken = () => buildProject("src/cancellationToken");
377+
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
378+
cleanTasks.push(cleanCancellationToken);
379+
380+
const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
381+
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
382+
cleanTasks.push(cleanTypingsInstaller);
383+
384+
const buildWatchGuard = () => buildProject("src/watchGuard");
385+
const cleanWatchGuard = () => cleanProject("src/watchGuard");
386+
cleanTasks.push(cleanWatchGuard);
387+
388+
const generateTypesMap = () => src("src/server/typesMap.json")
389+
.pipe(newer("built/local/typesMap.json"))
390+
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
391+
.pipe(dest("built/local"));
392+
task("generate-types-map", generateTypesMap);
393+
394+
const cleanTypesMap = () => del("built/local/typesMap.json");
395+
cleanTasks.push(cleanTypesMap);
396+
397+
const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap);
398+
task("other-outputs", series(preBuild, buildOtherOutputs));
399+
task("other-outputs").description = "Builds miscelaneous scripts and documents distributed with the LKG";
400+
376401
const buildFoldStart = async () => { if (fold.isTravis()) console.log(fold.start("build")); };
377402
const buildFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("build")); };
378-
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd));
403+
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs), buildFoldEnd));
379404
task("local").description = "Builds the full compiler and services";
380405
task("local").flags = {
381406
" --built": "Compile using the built version of the compiler."
@@ -551,28 +576,6 @@ const buildReleaseTsc = () => buildProject("src/tsc/tsconfig.release.json");
551576
const cleanReleaseTsc = () => cleanProject("src/tsc/tsconfig.release.json");
552577
cleanTasks.push(cleanReleaseTsc);
553578

554-
const buildCancellationToken = () => buildProject("src/cancellationToken");
555-
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
556-
cleanTasks.push(cleanCancellationToken);
557-
558-
const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
559-
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
560-
cleanTasks.push(cleanTypingsInstaller);
561-
562-
const buildWatchGuard = () => buildProject("src/watchGuard");
563-
const cleanWatchGuard = () => cleanProject("src/watchGuard");
564-
cleanTasks.push(cleanWatchGuard);
565-
566-
// TODO(rbuckton): This task isn't triggered by any other task. Is it still needed?
567-
const generateTypesMap = () => src("src/server/typesMap.json")
568-
.pipe(newer("built/local/typesMap.json"))
569-
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
570-
.pipe(dest("built/local"));
571-
task("generate-types-map", generateTypesMap);
572-
573-
const cleanTypesMap = () => del("built/local/typesMap.json");
574-
cleanTasks.push(cleanTypesMap);
575-
576579
const cleanBuilt = () => del("built");
577580

578581
const produceLKG = async () => {
@@ -602,7 +605,7 @@ const produceLKG = async () => {
602605
}
603606
};
604607

605-
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildCancellationToken, buildTypingsInstaller, buildWatchGuard, buildReleaseTsc), produceLKG));
608+
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs, buildReleaseTsc), produceLKG));
606609
task("LKG").description = "Makes a new LKG out of the built js files";
607610
task("LKG").flags = {
608611
" --built": "Compile using the built version of the compiler.",

scripts/build/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ function rm(dest, opts) {
340340
duplex.push(file);
341341
cb();
342342
}
343-
duplex.push(null); // signal end of read queue
344343
};
345344

346345
const duplex = new Duplex({
@@ -374,15 +373,16 @@ function rm(dest, opts) {
374373
pending.push(entry);
375374
},
376375
final(cb) {
376+
const endThenCb = () => (duplex.push(null), cb()); // signal end of read queue
377377
processDeleted();
378378
if (pending.length) {
379379
Promise
380380
.all(pending.map(entry => entry.promise))
381381
.then(() => processDeleted())
382-
.then(() => cb(), cb);
382+
.then(() => endThenCb(), endThenCb);
383383
return;
384384
}
385-
cb();
385+
endThenCb();
386386
},
387387
read() {
388388
}

0 commit comments

Comments
 (0)