Skip to content

Commit f195bd5

Browse files
author
Kanchalai Tanglertsampan
committed
Merge branch 'master' into fix10193
2 parents a5a7169 + 631ab0a commit f195bd5

File tree

5,920 files changed

+440251
-262101
lines changed

Some content is hidden

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

5,920 files changed

+440251
-262101
lines changed

.gitignore

Lines 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

.travis.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: node_js
33
node_js:
44
- 'stable'
55
- '4'
6-
- '0.10'
76

87
sudo: false
98

@@ -12,18 +11,11 @@ env:
1211

1312
matrix:
1413
fast_finish: true
15-
include:
16-
- os: osx
17-
node_js: stable
18-
osx_image: xcode7.3
19-
env: workerCount=2
20-
allow_failures:
21-
- os: osx
2214

2315
branches:
2416
only:
2517
- master
26-
- transforms
18+
- release-2.0
2719

2820
install:
2921
- npm uninstall typescript

CONTRIBUTING.md

Lines changed: 0 additions & 4 deletions
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 [[email protected]](mailto:[email protected]) 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.

Gulpfile.ts

Lines changed: 40 additions & 11 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",
@@ -416,9 +418,35 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
416418
]).pipe(gulp.dest(builtLocalDirectory));
417419
});
418420

421+
// cancellationToken.js
422+
const cancellationTokenJs = path.join(builtLocalDirectory, "cancellationToken.js");
423+
gulp.task(cancellationTokenJs, false, [servicesFile], () => {
424+
const cancellationTokenProject = tsc.createProject("src/server/cancellationToken/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
425+
return cancellationTokenProject.src()
426+
.pipe(newer(cancellationTokenJs))
427+
.pipe(sourcemaps.init())
428+
.pipe(tsc(cancellationTokenProject))
429+
.pipe(prependCopyright())
430+
.pipe(sourcemaps.write("."))
431+
.pipe(gulp.dest(builtLocalDirectory));
432+
});
433+
434+
// typingsInstallerFile.js
435+
const typingsInstallerJs = path.join(builtLocalDirectory, "typingsInstaller.js");
436+
gulp.task(typingsInstallerJs, false, [servicesFile], () => {
437+
const cancellationTokenProject = tsc.createProject("src/server/typingsInstaller/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
438+
return cancellationTokenProject.src()
439+
.pipe(newer(typingsInstallerJs))
440+
.pipe(sourcemaps.init())
441+
.pipe(tsc(cancellationTokenProject))
442+
.pipe(prependCopyright())
443+
.pipe(sourcemaps.write("."))
444+
.pipe(gulp.dest(builtLocalDirectory));
445+
});
446+
419447
const serverFile = path.join(builtLocalDirectory, "tsserver.js");
420448

421-
gulp.task(serverFile, false, [servicesFile], () => {
449+
gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationTokenJs], () => {
422450
const serverProject = tsc.createProject("src/server/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/true));
423451
return serverProject.src()
424452
.pipe(newer(serverFile))
@@ -452,7 +480,6 @@ gulp.task("lssl", "Builds language service server library", [tsserverLibraryFile
452480
gulp.task("local", "Builds the full compiler and services", [builtLocalCompiler, servicesFile, serverFile, builtGeneratedDiagnosticMessagesJSON, tsserverLibraryFile]);
453481
gulp.task("tsc", "Builds only the compiler", [builtLocalCompiler]);
454482

455-
456483
// Generate Markdown spec
457484
const word2mdJs = path.join(scriptsDirectory, "word2md.js");
458485
const word2mdTs = path.join(scriptsDirectory, "word2md.ts");
@@ -491,7 +518,7 @@ gulp.task("useDebugMode", false, [], (done) => { useDebugMode = true; done(); })
491518
gulp.task("dontUseDebugMode", false, [], (done) => { useDebugMode = false; done(); });
492519

493520
gulp.task("VerifyLKG", false, [], () => {
494-
const expectedFiles = [builtLocalCompiler, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile].concat(libraryTargets);
521+
const expectedFiles = [builtLocalCompiler, servicesFile, serverFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, tsserverLibraryFile, tsserverLibraryDefinitionFile, typingsInstallerJs, cancellationTokenJs].concat(libraryTargets);
495522
const missingFiles = expectedFiles.filter(function(f) {
496523
return !fs.existsSync(f);
497524
});
@@ -551,14 +578,15 @@ function restoreSavedNodeEnv() {
551578
process.env.NODE_ENV = savedNodeEnv;
552579
}
553580

554-
let testTimeout = 20000;
581+
let testTimeout = 40000;
555582
function runConsoleTests(defaultReporter: string, runInParallel: boolean, done: (e?: any) => void) {
556583
const lintFlag = cmdLineOptions["lint"];
557584
cleanTestDirs((err) => {
558585
if (err) { console.error(err); failWithStatus(err, 1); }
559586
const debug = cmdLineOptions["debug"];
560587
const tests = cmdLineOptions["tests"];
561588
const light = cmdLineOptions["light"];
589+
const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
562590
const testConfigFile = "test.config";
563591
if (fs.existsSync(testConfigFile)) {
564592
fs.unlinkSync(testConfigFile);
@@ -578,7 +606,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
578606
}
579607

580608
if (tests || light || taskConfigsFolder) {
581-
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount);
609+
writeTestConfigFile(tests, light, taskConfigsFolder, workerCount, stackTraceLimit);
582610
}
583611

584612
if (tests && tests.toLocaleLowerCase() === "rwc") {
@@ -727,6 +755,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
727755
sourcemaps: {
728756
"built/local/_stream_0.js": originalMap,
729757
"built/local/bundle.js": maps,
758+
"node_modules/source-map-support/source-map-support.js": undefined,
730759
}
731760
});
732761
const finalMap = chain.apply();
@@ -756,8 +785,8 @@ function cleanTestDirs(done: (e?: any) => void) {
756785
}
757786

758787
// used to pass data from jake command line directly to run.js
759-
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number) {
760-
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 });
761790
console.log("Running tests with config: " + testConfigContents);
762791
fs.writeFileSync("test.config", testConfigContents);
763792
}
@@ -887,7 +916,7 @@ gulp.task(loggedIOJsPath, false, [], (done) => {
887916
const temp = path.join(builtLocalDirectory, "temp");
888917
mkdirP(temp, (err) => {
889918
if (err) { console.error(err); done(err); process.exit(1); };
890-
exec(host, [LKGCompiler, "--outdir", temp, loggedIOpath], () => {
919+
exec(host, [LKGCompiler, "--types --outdir", temp, loggedIOpath], () => {
891920
fs.renameSync(path.join(temp, "/harness/loggedIO.js"), loggedIOJsPath);
892921
del(temp).then(() => done(), done);
893922
}, done);
@@ -908,8 +937,8 @@ gulp.task(instrumenterJsPath, false, [servicesFile], () => {
908937
.pipe(gulp.dest("."));
909938
});
910939

911-
gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", [loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
912-
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);
913942
});
914943

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

0 commit comments

Comments
 (0)