Skip to content

Commit f0458f4

Browse files
committed
Merge branch 'master' into fixTypeResolutionInTypeSerialization
2 parents b620cac + 085f0df commit f0458f4

694 files changed

Lines changed: 15704 additions & 8825 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.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ tests/baselines/reference/projectOutput/*
2525
tests/baselines/local/projectOutput/*
2626
tests/services/baselines/prototyping/local/*
2727
tests/services/browser/typescriptServices.js
28+
scripts/configureNightly.js
2829
scripts/processDiagnosticMessages.d.ts
2930
scripts/processDiagnosticMessages.js
3031
scripts/importDefinitelyTypedTests.js

AUTHORS.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
TypeScript is authored by:
2+
3+
* Adam Freidin
4+
* Ahmad Farid
5+
* Anders Hejlsberg
6+
* Arnav Singh
7+
* Arthur Ozga
8+
* Basarat Ali Syed
9+
* Ben Duffield
10+
* Bill Ticehurst
11+
* Bryan Forbes
12+
* Caitlin Potter
13+
* Chris Bubernak
14+
* Colby Russell
15+
* Colin Snover
16+
* Cyrus Najmabadi
17+
* Dan Quirk
18+
* Daniel Rosenwasser
19+
* David Li
20+
* Dick van den Brink
21+
* Dirk Bäumer
22+
* Frank Wallis
23+
* Gabriel Isenberg
24+
* Gilad Peleg
25+
* Guillaume Salles
26+
* Harald Niesche
27+
* Ingvar Stepanyan
28+
* Ivo Gabe de Wolff
29+
* James Whitney
30+
* Jason Freeman
31+
* Jason Ramsay
32+
* Jed Mao
33+
* Johannes Rieken
34+
* Jonathan Bond-Caron
35+
* Jonathan Park
36+
* Jonathan Turner
37+
* Josh Kalderimis
38+
* Kagami Sascha Rosylight
39+
* Keith Mashinter
40+
* Kenji Imamula
41+
* Lorant Pinter
42+
* Masahiro Wakame
43+
* Max Deepfield
44+
* Micah Zoltu
45+
* Mohamed Hegazy
46+
* Oleg Mihailik
47+
* Oleksandr Chekhovskyi
48+
* Paul van Brenk
49+
* Pedro Maltez
50+
* Philip Bulley
51+
* piloopin
52+
* Ron Buckton
53+
* Ryan Cavanaugh
54+
* Sheetal Nandi
55+
* Shengping Zhong
56+
* Shyyko Serhiy
57+
* Simon Hürlimann
58+
* Solal Pirelli
59+
* Stan Thomas
60+
* Steve Lucco
61+
* Tien Hoanhtien
62+
* Tingan Ho
63+
* togru
64+
* Tomas Grubliauskas
65+
* TruongSinh Tran-Nguyen
66+
* Vladimir Matveev
67+
* Wesley Wigham
68+
* Yui Tanglertsampan
69+
* Zev Spitz
70+
* Zhengbo Li

Jakefile.js

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var docDirectory = "doc/";
1717

1818
var builtDirectory = "built/";
1919
var builtLocalDirectory = "built/local/";
20-
var LKGDirectory = "bin/";
20+
var LKGDirectory = "lib/";
2121

2222
var copyright = "CopyrightNotice.txt";
2323
var thirdParty = "ThirdPartyNoticeText.txt";
@@ -138,6 +138,7 @@ var harnessSources = harnessCoreSources.concat([
138138
"services/documentRegistry.ts",
139139
"services/preProcessFile.ts",
140140
"services/patternMatcher.ts",
141+
"session.ts",
141142
"versionCache.ts",
142143
"convertToBase64.ts",
143144
"transpile.ts"
@@ -217,7 +218,7 @@ var compilerFilename = "tsc.js";
217218
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
218219
file(outFile, prereqs, function() {
219220
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
220-
var options = "--module commonjs -noImplicitAny";
221+
var options = "--module commonjs --noImplicitAny --noEmitOnError";
221222

222223
// Keep comments when specifically requested
223224
// or when in debug mode.
@@ -313,7 +314,7 @@ var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnostic
313314
var diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json");
314315
var diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts");
315316

316-
file(processDiagnosticMessagesTs)
317+
file(processDiagnosticMessagesTs);
317318

318319
// processDiagnosticMessages script
319320
compileFile(processDiagnosticMessagesJs,
@@ -338,11 +339,49 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
338339
complete();
339340
});
340341
ex.run();
341-
}, {async: true})
342+
}, {async: true});
342343

343344
desc("Generates a diagnostic file in TypeScript based on an input JSON file");
344-
task("generate-diagnostics", [diagnosticInfoMapTs])
345+
task("generate-diagnostics", [diagnosticInfoMapTs]);
346+
345347

348+
// Publish nightly
349+
var configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
350+
var configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
351+
var packageJson = "package.json";
352+
var programTs = path.join(compilerDirectory, "program.ts");
353+
354+
file(configureNightlyTs);
355+
356+
compileFile(/*outfile*/configureNightlyJs,
357+
/*sources*/ [configureNightlyTs],
358+
/*prereqs*/ [configureNightlyTs],
359+
/*prefixes*/ [],
360+
/*useBuiltCompiler*/ false,
361+
/*noOutFile*/ false,
362+
/*generateDeclarations*/ false,
363+
/*outDir*/ undefined,
364+
/*preserveConstEnums*/ undefined,
365+
/*keepComments*/ false,
366+
/*noResolve*/ false,
367+
/*stripInternal*/ false);
368+
369+
task("setDebugMode", function() {
370+
useDebugMode = true;
371+
});
372+
373+
task("configure-nightly", [configureNightlyJs], function() {
374+
var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs;
375+
console.log(cmd);
376+
exec(cmd);
377+
}, { async: true });
378+
379+
desc("Configure, build, test, and publish the nightly release.");
380+
task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "runtests"], function () {
381+
var cmd = "npm publish --tag next";
382+
console.log(cmd);
383+
exec(cmd);
384+
});
346385

347386
// Local target to build the compiler and services
348387
var tscFile = path.join(builtLocalDirectory, compilerFilename);
@@ -440,11 +479,11 @@ file(specMd, [word2mdJs, specWord], function () {
440479
child_process.exec(cmd, function () {
441480
complete();
442481
});
443-
}, {async: true})
482+
}, {async: true});
444483

445484

446485
desc("Generates a Markdown version of the Language Specification");
447-
task("generate-spec", [specMd])
486+
task("generate-spec", [specMd]);
448487

449488

450489
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
@@ -576,7 +615,7 @@ task("runtests", ["tests", builtLocalDirectory], function() {
576615
exec(cmd, deleteTemporaryProjectOutput);
577616
}, {async: true});
578617

579-
desc("Generates code coverage data via instanbul")
618+
desc("Generates code coverage data via instanbul");
580619
task("generate-code-coverage", ["tests", builtLocalDirectory], function () {
581620
var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run;
582621
console.log(cmd);
@@ -619,7 +658,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function(
619658
function getDiffTool() {
620659
var program = process.env['DIFF']
621660
if (!program) {
622-
fail("Add the 'DIFF' environment variable to the path of the program you want to use.")
661+
fail("Add the 'DIFF' environment variable to the path of the program you want to use.");
623662
}
624663
return program;
625664
}
@@ -628,14 +667,14 @@ function getDiffTool() {
628667
desc("Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable");
629668
task('diff', function () {
630669
var cmd = '"' + getDiffTool() + '" ' + refBaseline + ' ' + localBaseline;
631-
console.log(cmd)
670+
console.log(cmd);
632671
exec(cmd);
633672
}, {async: true});
634673

635674
desc("Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable");
636675
task('diff-rwc', function () {
637676
var cmd = '"' + getDiffTool() + '" ' + refRwcBaseline + ' ' + localRwcBaseline;
638-
console.log(cmd)
677+
console.log(cmd);
639678
exec(cmd);
640679
}, {async: true});
641680

@@ -736,9 +775,9 @@ task("lint", [], function() {
736775
function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }};
737776

738777
var lintTargets = compilerSources.concat(harnessCoreSources);
739-
for(var i in lintTargets) {
778+
for (var i in lintTargets) {
740779
var f = lintTargets[i];
741-
var cmd = 'tslint -f ' + f;
780+
var cmd = 'tslint -c tslint.json ' + f;
742781
exec(cmd, success(f), failure(f));
743782
}
744783
}, { async: true });

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88

99
[TypeScript](http://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](http://www.typescriptlang.org/Playground), and stay up to date via [our blog](http://blogs.msdn.com/typescript) and [twitter account](https://twitter.com/typescriptlang).
1010

11+
## Installing
12+
13+
For the latest stable version:
14+
15+
```
16+
npm install -g typescript
17+
```
18+
19+
For our nightly builds:
20+
21+
```
22+
npm install -g typescript@next
23+
```
1124

1225
## Contribute
1326

@@ -63,7 +76,8 @@ jake runtests # Run tests using the built compiler and test infrastructu
6376
# Use host=<hostName> or tests=<testPath>.
6477
jake runtests-browser # Runs the tests using the built run.js file. Syntax is jake runtests. Optional
6578
parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
66-
jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests.
79+
jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests.
80+
jake lint # Runs tslint on the TypeScript source.
6781
jake -T # List the above commands.
6882
```
6983

bin/tsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('./tsc.js')
2+
require('../lib/tsc.js')

bin/tsserver

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('./tsserver.js')
2+
require('../lib/tsserver.js')
12.7 KB
Binary file not shown.
91.9 KB
Binary file not shown.
19 KB
Binary file not shown.
211 KB
Binary file not shown.

0 commit comments

Comments
 (0)