Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 833a46c

Browse filesBrowse files
committed
merge with origin/master
2 parents a9d97ae + 9950b98 commit 833a46c
Copy full SHA for 833a46c

4,948 files changed

+168,063-95,913Lines changed: 168063 additions & 95913 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ test-args.txt
99
\#*\#
1010
.\#*
1111
tests/baselines/local/*
12+
tests/baselines/local.old/*
1213
tests/services/baselines/local/*
1314
tests/baselines/prototyping/local/*
1415
tests/baselines/rwc/*
1516
tests/baselines/test262/*
1617
tests/baselines/reference/projectOutput/*
1718
tests/baselines/local/projectOutput/*
19+
tests/baselines/reference/testresults.tap
1820
tests/services/baselines/prototyping/local/*
1921
tests/services/browser/typescriptServices.js
2022
scripts/authors.js
@@ -52,3 +54,4 @@ internal/
5254
!tests/cases/projects/projectOption/**/node_modules
5355
!tests/cases/projects/NodeModulesSearch/**/*
5456
!tests/baselines/reference/project/nodeModules*/**/*
57+
.idea
Collapse file

‎.travis.yml‎

Copy file name to clipboardExpand all lines: .travis.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ matrix:
2323
branches:
2424
only:
2525
- master
26-
- transforms
26+
- release-2.0
2727

2828
install:
2929
- npm uninstall typescript
Collapse file

‎CONTRIBUTING.md‎

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
-4Lines changed: 0 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ In general, things we find useful when reviewing suggestions are:
4040

4141
# Instructions for Contributing Code
4242

43-
## Code of Conduct
44-
45-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
46-
4743
## Contributing bug fixes
4844

4945
TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
Collapse file

‎Gulpfile.ts‎

Copy file name to clipboardExpand all lines: Gulpfile.ts
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ const gulp = helpMaker(originalGulp);
3939
const mochaParallel = require("./scripts/mocha-parallel.js");
4040
const {runTestsInParallel} = mochaParallel;
4141

42+
Error.stackTraceLimit = 1000;
43+
4244
const cmdLineOptions = minimist(process.argv.slice(2), {
4345
boolean: ["debug", "light", "colors", "lint", "soft"],
44-
string: ["browser", "tests", "host", "reporter"],
46+
string: ["browser", "tests", "host", "reporter", "stackTraceLimit"],
4547
alias: {
4648
d: "debug",
4749
t: "tests",
@@ -584,6 +586,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
584586
const debug = cmdLineOptions["debug"];
585587
const tests = cmdLineOptions["tests"];
586588
const light = cmdLineOptions["light"];
589+
const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
587590
const testConfigFile = "test.config";
588591
if (fs.existsSync(testConfigFile)) {
589592
fs.unlinkSync(testConfigFile);
@@ -603,7 +606,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
603606
}
604607

605608
if (tests || light || taskConfigsFolder) {
606-
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount);
609+
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
607610
}
608611

609612
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -752,6 +755,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
752755
sourcemaps: {
753756
"built/local/_stream_0.js": originalMap,
754757
"built/local/bundle.js": maps,
758+
"node_modules/source-map-support/source-map-support.js": undefined,
755759
}
756760
});
757761
const finalMap = chain.apply();
@@ -781,8 +785,8 @@ function cleanTestDirs(done: (e?: any) => void) {
781785
}
782786

783787
// used to pass data from jake command line directly to run.js
784-
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number) {
785-
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light: light, workerCount: workerCount, taskConfigsFolder: taskConfigsFolder });
788+
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
789+
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder });
786790
console.log("Running tests with config: " + testConfigContents);
787791
fs.writeFileSync("test.config", testConfigContents);
788792
}
@@ -912,7 +916,7 @@ gulp.task(loggedIOJsPath, false, [], (done) => {
912916
const temp = path.join(builtLocalDirectory, "temp");
913917
mkdirP(temp, (err) => {
914918
if (err) { console.error(err); done(err); process.exit(1); };
915-
exec(host, [LKGCompiler, "--outdir", temp, loggedIOpath], () => {
919+
exec(host, [LKGCompiler, "--types --outdir", temp, loggedIOpath], () => {
916920
fs.renameSync(path.join(temp, "/harness/loggedIO.js"), loggedIOJsPath);
917921
del(temp).then(() => done(), done);
918922
}, done);
@@ -933,8 +937,8 @@ gulp.task(instrumenterJsPath, false, [servicesFile], () => {
933937
.pipe(gulp.dest("."));
934938
});
935939

936-
gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", [loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
937-
exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalDirectory, compilerFilename], done, done);
940+
gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
941+
exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalCompiler], done, done);
938942
});
939943

940944
gulp.task("update-sublime", "Updates the sublime plugin's tsserver", ["local", serverFile], () => {
Collapse file

‎Jakefile.js‎

Copy file name to clipboardExpand all lines: Jakefile.js
+78-20Lines changed: 78 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,20 @@ var compilerSources = [
6666
"utilities.ts",
6767
"binder.ts",
6868
"checker.ts",
69+
"factory.ts",
70+
"visitor.ts",
71+
"transformers/destructuring.ts",
72+
"transformers/ts.ts",
73+
"transformers/module/es6.ts",
74+
"transformers/module/system.ts",
75+
"transformers/module/module.ts",
76+
"transformers/jsx.ts",
77+
"transformers/es7.ts",
78+
"transformers/generators.ts",
79+
"transformers/es6.ts",
80+
"transformer.ts",
6981
"sourcemap.ts",
82+
"comments.ts",
7083
"declarationEmitter.ts",
7184
"emitter.ts",
7285
"program.ts",
@@ -87,7 +100,20 @@ var servicesSources = [
87100
"utilities.ts",
88101
"binder.ts",
89102
"checker.ts",
103+
"factory.ts",
104+
"visitor.ts",
105+
"transformers/destructuring.ts",
106+
"transformers/ts.ts",
107+
"transformers/module/es6.ts",
108+
"transformers/module/system.ts",
109+
"transformers/module/module.ts",
110+
"transformers/jsx.ts",
111+
"transformers/es7.ts",
112+
"transformers/generators.ts",
113+
"transformers/es6.ts",
114+
"transformer.ts",
90115
"sourcemap.ts",
116+
"comments.ts",
91117
"declarationEmitter.ts",
92118
"emitter.ts",
93119
"program.ts",
@@ -96,15 +122,29 @@ var servicesSources = [
96122
].map(function (f) {
97123
return path.join(compilerDirectory, f);
98124
}).concat([
125+
"types.ts",
126+
"utilities.ts",
99127
"breakpoints.ts",
128+
"classifier.ts",
129+
"completions.ts",
130+
"documentHighlights.ts",
131+
"documentRegistry.ts",
132+
"findAllReferences.ts",
133+
"goToDefinition.ts",
134+
"goToImplementation.ts",
135+
"jsDoc.ts",
136+
"jsTyping.ts",
100137
"navigateTo.ts",
101138
"navigationBar.ts",
102139
"outliningElementsCollector.ts",
103140
"patternMatcher.ts",
141+
"preProcess.ts",
142+
"rename.ts",
104143
"services.ts",
105144
"shims.ts",
106145
"signatureHelp.ts",
107-
"utilities.ts",
146+
"symbolDisplay.ts",
147+
"transpile.ts",
108148
"formatting/formatting.ts",
109149
"formatting/formattingContext.ts",
110150
"formatting/formattingRequestKind.ts",
@@ -207,6 +247,7 @@ var harnessSources = harnessCoreSources.concat([
207247
"moduleResolution.ts",
208248
"tsconfigParsing.ts",
209249
"commandLineParsing.ts",
250+
"configurationExtension.ts",
210251
"convertCompilerOptionsFromJson.ts",
211252
"convertTypingOptionsFromJson.ts",
212253
"tsserverProjectSystem.ts",
@@ -346,7 +387,10 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
346387
* @param callback: a function to execute after the compilation process ends
347388
*/
348389
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts, callback) {
349-
file(outFile, prereqs, function () {
390+
file(outFile, prereqs, function() {
391+
if (process.env.USE_TRANSFORMS === "false") {
392+
useBuiltCompiler = false;
393+
}
350394
var startCompileTime = mark();
351395
opts = opts || {};
352396
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
@@ -790,8 +834,14 @@ function cleanTestDirs() {
790834
}
791835

792836
// used to pass data from jake command line directly to run.js
793-
function writeTestConfigFile(tests, light, taskConfigsFolder, workerCount) {
794-
var testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light: light, workerCount: workerCount, taskConfigsFolder: taskConfigsFolder });
837+
function writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit) {
838+
var testConfigContents = JSON.stringify({
839+
test: tests ? [tests] : undefined,
840+
light: light,
841+
workerCount: workerCount,
842+
taskConfigsFolder: taskConfigsFolder,
843+
stackTraceLimit: stackTraceLimit
844+
});
795845
fs.writeFileSync('test.config', testConfigContents);
796846
}
797847

@@ -802,10 +852,15 @@ function deleteTemporaryProjectOutput() {
802852
}
803853

804854
function runConsoleTests(defaultReporter, runInParallel) {
805-
cleanTestDirs();
855+
var dirty = process.env.dirty;
856+
if (!dirty) {
857+
cleanTestDirs();
858+
}
859+
806860
var debug = process.env.debug || process.env.d;
807861
tests = process.env.test || process.env.tests || process.env.t;
808862
var light = process.env.light || false;
863+
var stackTraceLimit = process.env.stackTraceLimit;
809864
var testConfigFile = 'test.config';
810865
if (fs.existsSync(testConfigFile)) {
811866
fs.unlinkSync(testConfigFile);
@@ -825,7 +880,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
825880
}
826881

827882
if (tests || light || taskConfigsFolder) {
828-
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount);
883+
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
829884
}
830885

831886
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -894,7 +949,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
894949
}
895950
}
896951
function runLinter() {
897-
if (!lintFlag) {
952+
if (!lintFlag || dirty) {
898953
return;
899954
}
900955
var lint = jake.Task['lint'];
@@ -911,8 +966,8 @@ task("runtests-parallel", ["build-rules", "tests", builtLocalDirectory], functio
911966
runConsoleTests('min', /*runInParallel*/ true);
912967
}, { async: true });
913968

914-
desc("Runs the tests using the built run.js file. Optional arguments are: t[ests]=regex r[eporter]=[list|spec|json|<more>] d[ebug]=true color[s]=false lint=true bail=false.");
915-
task("runtests", ["build-rules", "tests", builtLocalDirectory], function () {
969+
desc("Runs the tests using the built run.js file. Optional arguments are: t[ests]=regex r[eporter]=[list|spec|json|<more>] d[ebug]=true color[s]=false lint=true bail=false dirty=false.");
970+
task("runtests", ["build-rules", "tests", builtLocalDirectory], function() {
916971
runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false);
917972
}, { async: true });
918973

@@ -929,8 +984,8 @@ var nodeServerInFile = "tests/webTestServer.ts";
929984
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true });
930985

931986
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
932-
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function () {
933-
var cmd = 'browserify built/local/run.js -d -o built/local/bundle.js';
987+
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function() {
988+
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -d -o built/local/bundle.js';
934989
exec(cmd);
935990
}, { async: true });
936991

@@ -996,15 +1051,18 @@ function acceptBaseline(containerFolder) {
9961051
var deleteEnding = '.delete';
9971052
for (var i in files) {
9981053
var filename = files[i];
999-
if (filename.substr(filename.length - deleteEnding.length) === deleteEnding) {
1000-
filename = filename.substr(0, filename.length - deleteEnding.length);
1001-
fs.unlinkSync(path.join(targetFolder, filename));
1002-
} else {
1003-
var target = path.join(targetFolder, filename);
1004-
if (fs.existsSync(target)) {
1005-
fs.unlinkSync(target);
1054+
var fullLocalPath = path.join(sourceFolder, filename);
1055+
if (fs.statSync(fullLocalPath).isFile()) {
1056+
if (filename.substr(filename.length - deleteEnding.length) === deleteEnding) {
1057+
filename = filename.substr(0, filename.length - deleteEnding.length);
1058+
fs.unlinkSync(path.join(targetFolder, filename));
1059+
} else {
1060+
var target = path.join(targetFolder, filename);
1061+
if (fs.existsSync(target)) {
1062+
fs.unlinkSync(target);
1063+
}
1064+
fs.renameSync(path.join(sourceFolder, filename), target);
10061065
}
1007-
fs.renameSync(path.join(sourceFolder, filename), target);
10081066
}
10091067
}
10101068
}
@@ -1043,7 +1101,7 @@ var loggedIOJsPath = builtLocalDirectory + 'loggedIO.js';
10431101
file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function () {
10441102
var temp = builtLocalDirectory + 'temp';
10451103
jake.mkdirP(temp);
1046-
var options = "--outdir " + temp + ' ' + loggedIOpath;
1104+
var options = "--types --outdir " + temp + ' ' + loggedIOpath;
10471105
var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " ";
10481106
console.log(cmd + "\n");
10491107
var ex = jake.createExec([cmd]);
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
3030
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
3131
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
3232
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
33-
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
33+
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
34+
[pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
3435

36+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
37+
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
38+
with any additional questions or comments.
3539

3640
## Documentation
3741

@@ -91,4 +95,4 @@ node built/local/tsc.js hello.ts
9195

9296
## Roadmap
9397

94-
For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
98+
For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
Collapse file

‎lib/lib.es2015.collection.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2015.collection.d.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface Map<K, V> {
2020
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
2121
get(key: K): V | undefined;
2222
has(key: K): boolean;
23-
set(key: K, value?: V): this;
23+
set(key: K, value: V): this;
2424
readonly size: number;
2525
}
2626

@@ -35,7 +35,7 @@ interface WeakMap<K, V> {
3535
delete(key: K): boolean;
3636
get(key: K): V | undefined;
3737
has(key: K): boolean;
38-
set(key: K, value?: V): this;
38+
set(key: K, value: V): this;
3939
}
4040

4141
interface WeakMapConstructor {
Collapse file

‎lib/lib.es2015.proxy.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2015.proxy.d.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface ProxyHandler<T> {
1919
setPrototypeOf? (target: T, v: any): boolean;
2020
isExtensible? (target: T): boolean;
2121
preventExtensions? (target: T): boolean;
22-
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
22+
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
2323
has? (target: T, p: PropertyKey): boolean;
2424
get? (target: T, p: PropertyKey, receiver: any): any;
2525
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
@@ -35,4 +35,4 @@ interface ProxyConstructor {
3535
revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
3636
new <T>(target: T, handler: ProxyHandler<T>): T
3737
}
38-
declare var Proxy: ProxyConstructor;
38+
declare var Proxy: ProxyConstructor;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.