Skip to content

Commit 50f0033

Browse files
committed
Merge branch 'master' into glob2_merged
Conflicts: src/compiler/sys.ts src/harness/harnessLanguageService.ts tests/cases/unittests/cachingInServerLSHost.ts tests/cases/unittests/tsconfigParsing.ts
2 parents c340c88 + 6173696 commit 50f0033

229 files changed

Lines changed: 6273 additions & 3795 deletions

File tree

Some content is hidden

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

Jakefile.js

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -728,24 +728,40 @@ function runConsoleTests(defaultReporter, defaultSubsets) {
728728
subsetRegexes = subsets.map(function (sub) { return "^" + sub + ".*$"; });
729729
subsetRegexes.push("^(?!" + subsets.join("|") + ").*$");
730730
}
731+
var counter = subsetRegexes.length;
732+
var errorStatus;
731733
subsetRegexes.forEach(function (subsetRegex, i) {
732734
tests = subsetRegex ? ' -g "' + subsetRegex + '"' : '';
733735
var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
734736
console.log(cmd);
735-
function finish() {
737+
function finish(status) {
738+
counter--;
739+
// save first error status
740+
if (status !== undefined && errorStatus === undefined) {
741+
errorStatus = status;
742+
}
743+
736744
deleteTemporaryProjectOutput();
737-
complete();
745+
if (counter !== 0 || errorStatus === undefined) {
746+
// run linter when last worker is finished
747+
if (lintFlag && counter === 0) {
748+
var lint = jake.Task['lint'];
749+
lint.addListener('complete', function () {
750+
complete();
751+
});
752+
lint.invoke();
753+
}
754+
complete();
755+
}
756+
else {
757+
fail("Process exited with code " + status);
758+
}
738759
}
739760
exec(cmd, function () {
740-
if (lintFlag && i === 0) {
741-
var lint = jake.Task['lint'];
742-
lint.addListener('complete', function () {
743-
complete();
744-
});
745-
lint.invoke();
746-
}
747761
finish();
748-
}, finish);
762+
}, function(e, status) {
763+
finish(status);
764+
});
749765
});
750766
}
751767

@@ -964,36 +980,30 @@ function lintFileAsync(options, path, cb) {
964980
});
965981
}
966982

967-
var servicesLintTargets = [
968-
"navigateTo.ts",
969-
"navigationBar.ts",
970-
"outliningElementsCollector.ts",
971-
"patternMatcher.ts",
972-
"services.ts",
973-
"shims.ts",
974-
"jsTyping.ts"
975-
].map(function (s) {
976-
return path.join(servicesDirectory, s);
977-
});
978983
var lintTargets = compilerSources
979-
.concat(harnessCoreSources)
984+
.concat(harnessSources)
985+
// Other harness sources
986+
.concat(["instrumenter.ts"].map(function(f) { return path.join(harnessDirectory, f) }))
980987
.concat(serverCoreSources)
981988
.concat(tslintRulesFiles)
982-
.concat(servicesLintTargets);
989+
.concat(servicesSources);
990+
983991

984992
desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex");
985993
task("lint", ["build-rules"], function() {
986994
var lintOptions = getLinterOptions();
987995
var failed = 0;
988996
var fileMatcher = RegExp(process.env.f || process.env.file || process.env.files || "");
997+
var done = {};
989998
for (var i in lintTargets) {
990999
var target = lintTargets[i];
991-
if (fileMatcher.test(target)) {
1000+
if (!done[target] && fileMatcher.test(target)) {
9921001
var result = lintFile(lintOptions, target);
9931002
if (result.failureCount > 0) {
9941003
console.log(result.output);
9951004
failed += result.failureCount;
9961005
}
1006+
done[target] = true;
9971007
}
9981008
}
9991009
if (failed > 0) {

lib/lib.d.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

lib/lib.es5.d.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

lib/lib.es6.d.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -965,38 +965,22 @@ interface JSON {
965965
* If a member contains nested objects, the nested objects are transformed before the parent object is.
966966
*/
967967
parse(text: string, reviver?: (key: any, value: any) => any): any;
968-
/**
969-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
970-
* @param value A JavaScript value, usually an object or array, to be converted.
971-
*/
972-
stringify(value: any): string;
973-
/**
974-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
975-
* @param value A JavaScript value, usually an object or array, to be converted.
976-
* @param replacer A function that transforms the results.
977-
*/
978-
stringify(value: any, replacer: (key: string, value: any) => any): string;
979-
/**
980-
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
981-
* @param value A JavaScript value, usually an object or array, to be converted.
982-
* @param replacer Array that transforms the results.
983-
*/
984-
stringify(value: any, replacer: any[]): string;
985968
/**
986969
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
987970
* @param value A JavaScript value, usually an object or array, to be converted.
988971
* @param replacer A function that transforms the results.
989972
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
990973
*/
991-
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
974+
stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
992975
/**
993976
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
994977
* @param value A JavaScript value, usually an object or array, to be converted.
995-
* @param replacer Array that transforms the results.
978+
* @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified.
996979
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
997980
*/
998-
stringify(value: any, replacer: any[], space: string | number): string;
981+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
999982
}
983+
1000984
/**
1001985
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1002986
*/

0 commit comments

Comments
 (0)