Skip to content

Commit ef07efe

Browse files
committed
Merge branch 'master' into infer-object-type-from-string-literal-to-keyof-T
2 parents abdfbaa + b8fbf88 commit ef07efe

File tree

977 files changed

+45525
-25732
lines changed

Some content is hidden

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

977 files changed

+45525
-25732
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ internal/
5959
.idea
6060
yarn.lock
6161
.parallelperf.*
62+
tests/cases/user/*/package-lock.json
63+
tests/cases/user/*/node_modules/
64+
tests/cases/user/*/**/*.js
65+
tests/cases/user/*/**/*.js.map
66+
tests/cases/user/*/**/*.d.ts
67+
!tests/cases/user/zone.js/
68+
!tests/cases/user/bignumber.js/
69+
!tests/cases/user/discord.js/

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: node_js
22

33
node_js:
44
- 'stable'
5+
- '8'
56
- '6'
6-
- '4'
77

88
sudo: false
99

@@ -17,6 +17,7 @@ branches:
1717
only:
1818
- master
1919
- release-2.5
20+
- release-2.6
2021

2122
install:
2223
- npm uninstall typescript --no-save

Gulpfile.ts

Lines changed: 86 additions & 79 deletions
Large diffs are not rendered by default.

Jakefile.js

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ var harnessCoreSources = [
105105
"projectsRunner.ts",
106106
"loggedIO.ts",
107107
"rwcRunner.ts",
108+
"externalCompileRunner.ts",
108109
"test262Runner.ts",
109110
"./parallel/shared.ts",
110111
"./parallel/host.ts",
@@ -154,6 +155,7 @@ var harnessSources = harnessCoreSources.concat([
154155
"symbolWalker.ts",
155156
"languageService.ts",
156157
"publicApi.ts",
158+
"hostNewLineSupport.ts",
157159
].map(function (f) {
158160
return path.join(unittestsDirectory, f);
159161
})).concat([
@@ -195,7 +197,8 @@ var es2017LibrarySource = [
195197
"es2017.object.d.ts",
196198
"es2017.sharedmemory.d.ts",
197199
"es2017.string.d.ts",
198-
"es2017.intl.d.ts"
200+
"es2017.intl.d.ts",
201+
"es2017.typedarrays.d.ts",
199202
];
200203

201204
var es2017LibrarySourceMap = es2017LibrarySource.map(function (source) {
@@ -238,6 +241,23 @@ var libraryTargets = librarySourceMap.map(function (f) {
238241
return path.join(builtLocalDirectory, f.target);
239242
});
240243

244+
/**
245+
* .lcg file is what localization team uses to know what messages to localize.
246+
* The file is always generated in 'enu\diagnosticMessages.generated.json.lcg'
247+
*/
248+
var generatedLCGFile = path.join(builtLocalDirectory, "enu", "diagnosticMessages.generated.json.lcg");
249+
250+
/**
251+
* The localization target produces the two following transformations:
252+
* 1. 'src\loc\lcl\<locale>\diagnosticMessages.generated.json.lcl' => 'built\local\<locale>\diagnosticMessages.generated.json'
253+
* convert localized resources into a .json file the compiler can understand
254+
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
255+
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
256+
*/
257+
var localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"].map(function (f) {
258+
return path.join(builtLocalDirectory, f);
259+
}).concat(path.dirname(generatedLCGFile));
260+
241261
// Prepends the contents of prefixFile to destinationFile
242262
function prependFile(prefixFile, destinationFile) {
243263
if (!fs.existsSync(prefixFile)) {
@@ -443,7 +463,6 @@ compileFile(generateLocalizedDiagnosticMessagesJs,
443463
/*useBuiltCompiler*/ false, { noOutFile: true, types: ["node", "xml2js"] });
444464

445465
// Localize diagnostics
446-
var generatedLCGFile = path.join(builtLocalDirectory, "enu", "diagnosticMessages.generated.json.lcg");
447466
file(generatedLCGFile, [generateLocalizedDiagnosticMessagesJs, diagnosticInfoMapTs, generatedDiagnosticMessagesJSON], function () {
448467
var cmd = host + " " + generateLocalizedDiagnosticMessagesJs + " " + lclDirectory + " " + builtLocalDirectory + " " + generatedDiagnosticMessagesJSON;
449468
console.log(cmd);
@@ -712,7 +731,10 @@ compileFile(word2mdJs,
712731
[word2mdTs],
713732
[word2mdTs],
714733
[],
715-
/*useBuiltCompiler*/ false);
734+
/*useBuiltCompiler*/ false,
735+
{
736+
lib: "scripthost,es5"
737+
});
716738

717739
// The generated spec.md; built for the 'generate-spec' task
718740
file(specMd, [word2mdJs, specWord], function () {
@@ -735,8 +757,7 @@ desc("Makes a new LKG out of the built js files");
735757
task("LKG", ["clean", "release", "local"].concat(libraryTargets), function () {
736758
var expectedFiles = [tscFile, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, cancellationTokenFile, typingsInstallerFile, buildProtocolDts, watchGuardFile].
737759
concat(libraryTargets).
738-
concat(fs.readdirSync(lclDirectory).map(function (d) { return path.join(builtLocalDirectory, d) })).
739-
concat(path.dirname(generatedLCGFile));
760+
concat(localizationTargets);
740761
var missingFiles = expectedFiles.filter(function (f) {
741762
return !fs.existsSync(f);
742763
});
@@ -827,8 +848,9 @@ function cleanTestDirs() {
827848
}
828849

829850
// used to pass data from jake command line directly to run.js
830-
function writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit, colors) {
851+
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors) {
831852
var testConfigContents = JSON.stringify({
853+
runners: runners ? runners.split(",") : undefined,
832854
test: tests ? [tests] : undefined,
833855
light: light,
834856
workerCount: workerCount,
@@ -854,8 +876,9 @@ function runConsoleTests(defaultReporter, runInParallel) {
854876
var debug = process.env.debug || process.env["debug-brk"] || process.env.d;
855877
var inspect = process.env.inspect || process.env["inspect-brk"] || process.env.i;
856878
var testTimeout = process.env.timeout || defaultTestTimeout;
879+
var runners = process.env.runners || process.env.runner || process.env.ru;
857880
var tests = process.env.test || process.env.tests || process.env.t;
858-
var light = process.env.light || false;
881+
var light = process.env.light === undefined || process.env.light !== "false";
859882
var stackTraceLimit = process.env.stackTraceLimit;
860883
var testConfigFile = 'test.config';
861884
if (fs.existsSync(testConfigFile)) {
@@ -875,8 +898,8 @@ function runConsoleTests(defaultReporter, runInParallel) {
875898
workerCount = process.env.workerCount || process.env.p || os.cpus().length;
876899
}
877900

878-
if (tests || light || taskConfigsFolder) {
879-
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit, colors);
901+
if (tests || runners || light || taskConfigsFolder) {
902+
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors);
880903
}
881904

882905
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -1011,14 +1034,15 @@ task("runtests-browser", ["browserify", nodeServerOutFile], function () {
10111034
cleanTestDirs();
10121035
host = "node";
10131036
var browser = process.env.browser || process.env.b || (os.platform() === "linux" ? "chrome" : "IE");
1037+
var runners = process.env.runners || process.env.runner || process.env.ru;
10141038
var tests = process.env.test || process.env.tests || process.env.t;
10151039
var light = process.env.light || false;
10161040
var testConfigFile = 'test.config';
10171041
if (fs.existsSync(testConfigFile)) {
10181042
fs.unlinkSync(testConfigFile);
10191043
}
1020-
if (tests || light) {
1021-
writeTestConfigFile(tests, light);
1044+
if (tests || runners || light) {
1045+
writeTestConfigFile(tests, runners, light);
10221046
}
10231047

10241048
tests = tests ? tests : '';
@@ -1266,7 +1290,7 @@ task("lint", ["build-rules"], () => {
12661290
const fileMatcher = process.env.f || process.env.file || process.env.files;
12671291
const files = fileMatcher
12681292
? `src/**/${fileMatcher}`
1269-
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
1293+
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude 'src/lib/*.d.ts'";
12701294
const cmd = `node node_modules/tslint/bin/tslint ${files} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
12711295
console.log("Linting: " + cmd);
12721296
jake.exec([cmd], { interactive: true }, () => {

issue_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->
44

55
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
6-
**TypeScript Version:** 2.6.0-dev.201xxxxx
6+
**TypeScript Version:** 2.7.0-dev.201xxxxx
77

88
**Code**
99

netci.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import jobs.generation.Utilities;
55
def project = GithubProject
66
def branch = GithubBranchName
77

8-
def nodeVersions = ['stable', '6', '4']
8+
def nodeVersions = ['stable', '8', '6']
99

1010
nodeVersions.each { nodeVer ->
1111

0 commit comments

Comments
 (0)