Skip to content

Commit 884e9f4

Browse files
committed
Merge branch 'master' into fixAsyncReturnTypeCheck
2 parents 5f401da + 49be2e2 commit 884e9f4

File tree

1,333 files changed

+143830
-110744
lines changed

Some content is hidden

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

1,333 files changed

+143830
-110744
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ tests/cases/**/*.js.map
4141
scripts/debug.bat
4242
scripts/run.bat
4343
scripts/word2md.js
44+
scripts/buildProtocol.js
4445
scripts/ior.js
46+
scripts/buildProtocol.js
4547
scripts/*.js.map
4648
scripts/typings/
4749
coverage/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ matrix:
1515
branches:
1616
only:
1717
- master
18-
- release-2.0
18+
- release-2.1
1919

2020
install:
2121
- npm uninstall typescript

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,3 @@ jake baseline-accept
183183
```
184184

185185
to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines.
186-
187-
**Note** that `baseline-accept` should only be run after a full test run! Accepting baselines after running a subset of tests will delete baseline files for the tests that didn't run.

Jakefile.js

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ var compilerSources = [
7070
"visitor.ts",
7171
"transformers/destructuring.ts",
7272
"transformers/ts.ts",
73-
"transformers/module/es6.ts",
74-
"transformers/module/system.ts",
75-
"transformers/module/module.ts",
7673
"transformers/jsx.ts",
77-
"transformers/es7.ts",
74+
"transformers/es2017.ts",
75+
"transformers/es2016.ts",
76+
"transformers/es2015.ts",
7877
"transformers/generators.ts",
79-
"transformers/es6.ts",
78+
"transformers/es5.ts",
79+
"transformers/module/es2015.ts",
80+
"transformers/module/system.ts",
81+
"transformers/module/module.ts",
8082
"transformer.ts",
8183
"sourcemap.ts",
8284
"comments.ts",
@@ -104,13 +106,15 @@ var servicesSources = [
104106
"visitor.ts",
105107
"transformers/destructuring.ts",
106108
"transformers/ts.ts",
107-
"transformers/module/es6.ts",
108-
"transformers/module/system.ts",
109-
"transformers/module/module.ts",
110109
"transformers/jsx.ts",
111-
"transformers/es7.ts",
110+
"transformers/es2017.ts",
111+
"transformers/es2016.ts",
112+
"transformers/es2015.ts",
112113
"transformers/generators.ts",
113-
"transformers/es6.ts",
114+
"transformers/es5.ts",
115+
"transformers/module/es2015.ts",
116+
"transformers/module/system.ts",
117+
"transformers/module/module.ts",
114118
"transformer.ts",
115119
"sourcemap.ts",
116120
"comments.ts",
@@ -174,7 +178,7 @@ var serverCoreSources = [
174178
"lsHost.ts",
175179
"project.ts",
176180
"editorServices.ts",
177-
"protocol.d.ts",
181+
"protocol.ts",
178182
"session.ts",
179183
"server.ts"
180184
].map(function (f) {
@@ -198,14 +202,13 @@ var typingsInstallerSources = [
198202
var serverSources = serverCoreSources.concat(servicesSources);
199203

200204
var languageServiceLibrarySources = [
201-
"protocol.d.ts",
205+
"protocol.ts",
202206
"utilities.ts",
203207
"scriptVersionCache.ts",
204208
"scriptInfo.ts",
205209
"lsHost.ts",
206210
"project.ts",
207211
"editorServices.ts",
208-
"protocol.d.ts",
209212
"session.ts",
210213

211214
].map(function (f) {
@@ -259,15 +262,14 @@ var harnessSources = harnessCoreSources.concat([
259262
].map(function (f) {
260263
return path.join(unittestsDirectory, f);
261264
})).concat([
262-
"protocol.d.ts",
265+
"protocol.ts",
263266
"utilities.ts",
264267
"scriptVersionCache.ts",
265268
"scriptInfo.ts",
266269
"lsHost.ts",
267270
"project.ts",
268271
"typingsCache.ts",
269272
"editorServices.ts",
270-
"protocol.d.ts",
271273
"session.ts",
272274
].map(function (f) {
273275
return path.join(serverDirectory, f);
@@ -355,6 +357,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
355357
if (!fs.existsSync(sourceFiles[i])) {
356358
fail(sourceFiles[i] + " does not exist!");
357359
}
360+
fs.appendFileSync(temp, "\n\n");
358361
fs.appendFileSync(temp, fs.readFileSync(sourceFiles[i]));
359362
}
360363
// Move the file to the final destination
@@ -445,6 +448,8 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
445448
options += " --stripInternal";
446449
}
447450

451+
options += " --target es5 --noUnusedLocals --noUnusedParameters";
452+
448453
var cmd = host + " " + compilerPath + " " + options + " ";
449454
cmd = cmd + sources.join(" ");
450455
console.log(cmd + "\n");
@@ -518,6 +523,40 @@ compileFile(processDiagnosticMessagesJs,
518523
[],
519524
/*useBuiltCompiler*/ false);
520525

526+
var buildProtocolTs = path.join(scriptsDirectory, "buildProtocol.ts");
527+
var buildProtocolJs = path.join(scriptsDirectory, "buildProtocol.js");
528+
var buildProtocolDts = path.join(builtLocalDirectory, "protocol.d.ts");
529+
var typescriptServicesDts = path.join(builtLocalDirectory, "typescriptServices.d.ts");
530+
531+
file(buildProtocolTs);
532+
533+
compileFile(buildProtocolJs,
534+
[buildProtocolTs],
535+
[buildProtocolTs],
536+
[],
537+
/*useBuiltCompiler*/ false,
538+
{noOutFile: true});
539+
540+
file(buildProtocolDts, [buildProtocolTs, buildProtocolJs, typescriptServicesDts], function() {
541+
542+
var protocolTs = path.join(serverDirectory, "protocol.ts");
543+
544+
var cmd = host + " " + buildProtocolJs + " "+ protocolTs + " " + typescriptServicesDts + " " + buildProtocolDts;
545+
console.log(cmd);
546+
var ex = jake.createExec([cmd]);
547+
// Add listeners for output and error
548+
ex.addListener("stdout", function (output) {
549+
process.stdout.write(output);
550+
});
551+
ex.addListener("stderr", function (error) {
552+
process.stderr.write(error);
553+
});
554+
ex.addListener("cmdEnd", function () {
555+
complete();
556+
});
557+
ex.run();
558+
}, { async: true })
559+
521560
// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
522561
file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () {
523562
var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson;
@@ -655,6 +694,8 @@ compileFile(
655694
inlineSourceMap: true
656695
});
657696

697+
file(typescriptServicesDts, [servicesFile]);
698+
658699
var cancellationTokenFile = path.join(builtLocalDirectory, "cancellationToken.js");
659700
compileFile(cancellationTokenFile, cancellationTokenSources, [builtLocalDirectory].concat(cancellationTokenSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { outDir: builtLocalDirectory, noOutFile: true });
660701

@@ -689,7 +730,7 @@ task("build-fold-end", [], function () {
689730

690731
// Local target to build the compiler and services
691732
desc("Builds the full compiler and services");
692-
task("local", ["build-fold-start", "generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, builtGeneratedDiagnosticMessagesJSON, "lssl", "build-fold-end"]);
733+
task("local", ["build-fold-start", "generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, buildProtocolDts, builtGeneratedDiagnosticMessagesJSON, "lssl", "build-fold-end"]);
693734

694735
// Local target to build only tsc.js
695736
desc("Builds only the compiler");
@@ -745,7 +786,7 @@ task("generate-spec", [specMd]);
745786
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
746787
desc("Makes a new LKG out of the built js files");
747788
task("LKG", ["clean", "release", "local"].concat(libraryTargets), function () {
748-
var expectedFiles = [tscFile, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, cancellationTokenFile, typingsInstallerFile].concat(libraryTargets);
789+
var expectedFiles = [tscFile, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, cancellationTokenFile, typingsInstallerFile, buildProtocolDts].concat(libraryTargets);
749790
var missingFiles = expectedFiles.filter(function (f) {
750791
return !fs.existsSync(f);
751792
});

issue_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
33
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->
44

5-
**TypeScript Version:** 1.8.0 / nightly (2.0.0-dev.201xxxxx)
5+
**TypeScript Version:** 2.0.3 / nightly (2.1.0-dev.201xxxxx)
66

77
**Code**
88

jenkins.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Set up NVM
4+
export NVM_DIR="/home/dotnet-bot/.nvm"
5+
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
6+
7+
nvm install $1
8+
9+
npm uninstall typescript
10+
npm uninstall tslint
11+
npm install
12+
npm update
13+
npm test

lib/cancellationToken.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)