Skip to content

Commit 48c67cb

Browse files
author
Andy Hanson
committed
Merge branch 'master' into import_directory
2 parents f0a532d + 9812ab5 commit 48c67cb

File tree

4,441 files changed

+146096
-58467
lines changed

Some content is hidden

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

4,441 files changed

+146096
-58467
lines changed

.gitignore

Lines changed: 2 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

.travis.yml

Lines 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

Gulpfile.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ 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"],
4446
string: ["browser", "tests", "host", "reporter"],
@@ -727,6 +729,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
727729
sourcemaps: {
728730
"built/local/_stream_0.js": originalMap,
729731
"built/local/bundle.js": maps,
732+
"node_modules/source-map-support/source-map-support.js": undefined,
730733
}
731734
});
732735
const finalMap = chain.apply();

Jakefile.js

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,20 @@ var compilerSources = [
6464
"utilities.ts",
6565
"binder.ts",
6666
"checker.ts",
67+
"factory.ts",
68+
"visitor.ts",
69+
"transformers/destructuring.ts",
70+
"transformers/ts.ts",
71+
"transformers/module/es6.ts",
72+
"transformers/module/system.ts",
73+
"transformers/module/module.ts",
74+
"transformers/jsx.ts",
75+
"transformers/es7.ts",
76+
"transformers/generators.ts",
77+
"transformers/es6.ts",
78+
"transformer.ts",
6779
"sourcemap.ts",
80+
"comments.ts",
6881
"declarationEmitter.ts",
6982
"emitter.ts",
7083
"program.ts",
@@ -85,7 +98,20 @@ var servicesSources = [
8598
"utilities.ts",
8699
"binder.ts",
87100
"checker.ts",
101+
"factory.ts",
102+
"visitor.ts",
103+
"transformers/destructuring.ts",
104+
"transformers/ts.ts",
105+
"transformers/module/es6.ts",
106+
"transformers/module/system.ts",
107+
"transformers/module/module.ts",
108+
"transformers/jsx.ts",
109+
"transformers/es7.ts",
110+
"transformers/generators.ts",
111+
"transformers/es6.ts",
112+
"transformer.ts",
88113
"sourcemap.ts",
114+
"comments.ts",
89115
"declarationEmitter.ts",
90116
"emitter.ts",
91117
"program.ts",
@@ -94,15 +120,28 @@ var servicesSources = [
94120
].map(function (f) {
95121
return path.join(compilerDirectory, f);
96122
}).concat([
123+
"types.ts",
124+
"utilities.ts",
97125
"breakpoints.ts",
126+
"classifier.ts",
127+
"completions.ts",
128+
"documentHighlights.ts",
129+
"documentRegistry.ts",
130+
"findAllReferences.ts",
131+
"goToDefinition.ts",
132+
"jsDoc.ts",
133+
"jsTyping.ts",
98134
"navigateTo.ts",
99135
"navigationBar.ts",
100136
"outliningElementsCollector.ts",
101137
"patternMatcher.ts",
138+
"preProcess.ts",
139+
"rename.ts",
102140
"services.ts",
103141
"shims.ts",
104142
"signatureHelp.ts",
105-
"utilities.ts",
143+
"symbolDisplay.ts",
144+
"transpile.ts",
106145
"formatting/formatting.ts",
107146
"formatting/formattingContext.ts",
108147
"formatting/formattingRequestKind.ts",
@@ -307,7 +346,10 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
307346
* @param callback: a function to execute after the compilation process ends
308347
*/
309348
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts, callback) {
310-
file(outFile, prereqs, function () {
349+
file(outFile, prereqs, function() {
350+
if (process.env.USE_TRANSFORMS === "false") {
351+
useBuiltCompiler = false;
352+
}
311353
var startCompileTime = mark();
312354
opts = opts || {};
313355
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
@@ -745,8 +787,14 @@ function cleanTestDirs() {
745787
}
746788

747789
// used to pass data from jake command line directly to run.js
748-
function writeTestConfigFile(tests, light, taskConfigsFolder, workerCount) {
749-
var testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light: light, workerCount: workerCount, taskConfigsFolder: taskConfigsFolder });
790+
function writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit) {
791+
var testConfigContents = JSON.stringify({
792+
test: tests ? [tests] : undefined,
793+
light: light,
794+
workerCount: workerCount,
795+
taskConfigsFolder: taskConfigsFolder,
796+
stackTraceLimit: stackTraceLimit
797+
});
750798
fs.writeFileSync('test.config', testConfigContents);
751799
}
752800

@@ -757,10 +805,15 @@ function deleteTemporaryProjectOutput() {
757805
}
758806

759807
function runConsoleTests(defaultReporter, runInParallel) {
760-
cleanTestDirs();
808+
var dirty = process.env.dirty;
809+
if (!dirty) {
810+
cleanTestDirs();
811+
}
812+
761813
var debug = process.env.debug || process.env.d;
762814
tests = process.env.test || process.env.tests || process.env.t;
763815
var light = process.env.light || false;
816+
var stackTraceLimit = process.env.stackTraceLimit;
764817
var testConfigFile = 'test.config';
765818
if (fs.existsSync(testConfigFile)) {
766819
fs.unlinkSync(testConfigFile);
@@ -780,7 +833,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
780833
}
781834

782835
if (tests || light || taskConfigsFolder) {
783-
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount);
836+
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
784837
}
785838

786839
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -849,7 +902,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
849902
}
850903
}
851904
function runLinter() {
852-
if (!lintFlag) {
905+
if (!lintFlag || dirty) {
853906
return;
854907
}
855908
var lint = jake.Task['lint'];
@@ -866,8 +919,8 @@ task("runtests-parallel", ["build-rules", "tests", builtLocalDirectory], functio
866919
runConsoleTests('min', /*runInParallel*/ true);
867920
}, { async: true });
868921

869-
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.");
870-
task("runtests", ["build-rules", "tests", builtLocalDirectory], function () {
922+
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.");
923+
task("runtests", ["build-rules", "tests", builtLocalDirectory], function() {
871924
runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false);
872925
}, { async: true });
873926

@@ -884,8 +937,8 @@ var nodeServerInFile = "tests/webTestServer.ts";
884937
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true });
885938

886939
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
887-
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function () {
888-
var cmd = 'browserify built/local/run.js -d -o built/local/bundle.js';
940+
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function() {
941+
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -d -o built/local/bundle.js';
889942
exec(cmd);
890943
}, { async: true });
891944

@@ -951,15 +1004,18 @@ function acceptBaseline(containerFolder) {
9511004
var deleteEnding = '.delete';
9521005
for (var i in files) {
9531006
var filename = files[i];
954-
if (filename.substr(filename.length - deleteEnding.length) === deleteEnding) {
955-
filename = filename.substr(0, filename.length - deleteEnding.length);
956-
fs.unlinkSync(path.join(targetFolder, filename));
957-
} else {
958-
var target = path.join(targetFolder, filename);
959-
if (fs.existsSync(target)) {
960-
fs.unlinkSync(target);
1007+
var fullLocalPath = path.join(sourceFolder, filename);
1008+
if (fs.statSync(fullLocalPath).isFile()) {
1009+
if (filename.substr(filename.length - deleteEnding.length) === deleteEnding) {
1010+
filename = filename.substr(0, filename.length - deleteEnding.length);
1011+
fs.unlinkSync(path.join(targetFolder, filename));
1012+
} else {
1013+
var target = path.join(targetFolder, filename);
1014+
if (fs.existsSync(target)) {
1015+
fs.unlinkSync(target);
1016+
}
1017+
fs.renameSync(path.join(sourceFolder, filename), target);
9611018
}
962-
fs.renameSync(path.join(sourceFolder, filename), target);
9631019
}
9641020
}
9651021
}

lib/lib.es2015.collection.d.ts

Lines 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

@@ -36,7 +36,7 @@ interface WeakMap<K, V> {
3636
delete(key: K): boolean;
3737
get(key: K): V | undefined;
3838
has(key: K): boolean;
39-
set(key: K, value?: V): this;
39+
set(key: K, value: V): this;
4040
}
4141

4242
interface WeakMapConstructor {

0 commit comments

Comments
 (0)