Skip to content

Commit 7d56837

Browse files
committed
Merge branch 'master' into optionsDescription
2 parents 2752bfb + 4b3cd6a commit 7d56837

File tree

3,320 files changed

+155379
-80975
lines changed

Some content is hidden

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

3,320 files changed

+155379
-80975
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ internal/
5757
!tests/cases/projects/NodeModulesSearch/**/*
5858
!tests/baselines/reference/project/nodeModules*/**/*
5959
.idea
60+
yarn.lock

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ branches:
1717
only:
1818
- master
1919
- release-2.1
20+
- release-2.2
2021

2122
install:
2223
- npm uninstall typescript

Gulpfile.ts

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ declare module "gulp-typescript" {
2121
import * as insert from "gulp-insert";
2222
import * as sourcemaps from "gulp-sourcemaps";
2323
import Q = require("q");
24-
declare global {
25-
// `del` further depends on `Promise` (and is also not included), so we just, patch the global scope's Promise to Q's (which we already include in our deps because gulp depends on it)
26-
type Promise<T> = Q.Promise<T>;
27-
}
2824
import del = require("del");
2925
import mkdirP = require("mkdirp");
3026
import minimist = require("minimist");
@@ -41,7 +37,7 @@ const {runTestsInParallel} = mochaParallel;
4137
Error.stackTraceLimit = 1000;
4238

4339
const cmdLineOptions = minimist(process.argv.slice(2), {
44-
boolean: ["debug", "light", "colors", "lint", "soft"],
40+
boolean: ["debug", "inspect", "light", "colors", "lint", "soft"],
4541
string: ["browser", "tests", "host", "reporter", "stackTraceLimit"],
4642
alias: {
4743
d: "debug",
@@ -57,6 +53,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
5753
soft: false,
5854
colors: process.env.colors || process.env.color || true,
5955
debug: process.env.debug || process.env.d,
56+
inspect: process.env.inspect,
6057
host: process.env.TYPESCRIPT_HOST || process.env.host || "node",
6158
browser: process.env.browser || process.env.b || "IE",
6259
tests: process.env.test || process.env.tests || process.env.t,
@@ -138,6 +135,14 @@ const es2017LibrarySourceMap = es2017LibrarySource.map(function(source) {
138135
return { target: "lib." + source, sources: ["header.d.ts", source] };
139136
});
140137

138+
const esnextLibrarySource = [
139+
"esnext.asynciterable.d.ts"
140+
];
141+
142+
const esnextLibrarySourceMap = esnextLibrarySource.map(function (source) {
143+
return { target: "lib." + source, sources: ["header.d.ts", source] };
144+
});
145+
141146
const hostsLibrarySources = ["dom.generated.d.ts", "webworker.importscripts.d.ts", "scripthost.d.ts"];
142147

143148
const librarySourceMap = [
@@ -152,11 +157,12 @@ const librarySourceMap = [
152157
{ target: "lib.es2015.d.ts", sources: ["header.d.ts", "es2015.d.ts"] },
153158
{ target: "lib.es2016.d.ts", sources: ["header.d.ts", "es2016.d.ts"] },
154159
{ target: "lib.es2017.d.ts", sources: ["header.d.ts", "es2017.d.ts"] },
160+
{ target: "lib.esnext.d.ts", sources: ["header.d.ts", "esnext.d.ts"] },
155161

156162
// JavaScript + all host library
157163
{ target: "lib.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(hostsLibrarySources) },
158164
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(es2015LibrarySources, hostsLibrarySources, "dom.iterable.d.ts") }
159-
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap);
165+
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, esnextLibrarySourceMap);
160166

161167
const libraryTargets = librarySourceMap.map(function(f) {
162168
return path.join(builtLocalDirectory, f.target);
@@ -384,7 +390,7 @@ gulp.task(builtLocalCompiler, false, [servicesFile], () => {
384390
.pipe(localCompilerProject())
385391
.pipe(prependCopyright())
386392
.pipe(sourcemaps.write("."))
387-
.pipe(gulp.dest("."));
393+
.pipe(gulp.dest("src/compiler"));
388394
});
389395

390396
gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
@@ -410,13 +416,13 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
410416
file.path = nodeDefinitionsFile;
411417
return content + "\r\nexport = ts;";
412418
}))
413-
.pipe(gulp.dest(".")),
419+
.pipe(gulp.dest("src/services")),
414420
completedDts.pipe(clone())
415421
.pipe(insert.transform((content, file) => {
416422
file.path = nodeStandaloneDefinitionsFile;
417423
return content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
418424
}))
419-
]).pipe(gulp.dest("."));
425+
]).pipe(gulp.dest("src/services"));
420426
});
421427

422428
// cancellationToken.js
@@ -442,7 +448,7 @@ gulp.task(typingsInstallerJs, false, [servicesFile], () => {
442448
.pipe(cancellationTokenProject())
443449
.pipe(prependCopyright())
444450
.pipe(sourcemaps.write("."))
445-
.pipe(gulp.dest("."));
451+
.pipe(gulp.dest("src/server/typingsInstaller"));
446452
});
447453

448454
const serverFile = path.join(builtLocalDirectory, "tsserver.js");
@@ -455,7 +461,7 @@ gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationToke
455461
.pipe(serverProject())
456462
.pipe(prependCopyright())
457463
.pipe(sourcemaps.write("."))
458-
.pipe(gulp.dest("."));
464+
.pipe(gulp.dest("src/server"));
459465
});
460466

461467
const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
@@ -471,12 +477,12 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
471477
return merge2([
472478
js.pipe(prependCopyright())
473479
.pipe(sourcemaps.write("."))
474-
.pipe(gulp.dest(".")),
480+
.pipe(gulp.dest("src/server")),
475481
dts.pipe(prependCopyright(/*outputCopyright*/true))
476482
.pipe(insert.transform((content) => {
477483
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
478484
}))
479-
.pipe(gulp.dest("."))
485+
.pipe(gulp.dest("src/server"))
480486
]);
481487
});
482488

@@ -550,7 +556,7 @@ gulp.task(run, false, [servicesFile], () => {
550556
.pipe(sourcemaps.init())
551557
.pipe(testProject())
552558
.pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
553-
.pipe(gulp.dest("."));
559+
.pipe(gulp.dest("src/harness"));
554560
});
555561

556562
const internalTests = "internal/";
@@ -588,6 +594,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
588594
cleanTestDirs((err) => {
589595
if (err) { console.error(err); failWithStatus(err, 1); }
590596
const debug = cmdLineOptions["debug"];
597+
const inspect = cmdLineOptions["inspect"];
591598
const tests = cmdLineOptions["tests"];
592599
const light = cmdLineOptions["light"];
593600
const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
@@ -624,7 +631,10 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
624631
// default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
625632
if (!runInParallel) {
626633
const args = [];
627-
if (debug) {
634+
if (inspect) {
635+
args.push("--inspect");
636+
}
637+
if (inspect || debug) {
628638
args.push("--debug-brk");
629639
}
630640
args.push("-R", reporter);
@@ -768,7 +778,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
768778
});
769779
}))
770780
.pipe(sourcemaps.write(".", { includeContent: false }))
771-
.pipe(gulp.dest("."));
781+
.pipe(gulp.dest("src/harness"));
772782
});
773783

774784

@@ -950,7 +960,7 @@ gulp.task("update-sublime", "Updates the sublime plugin's tsserver", ["local", s
950960
});
951961

952962
gulp.task("build-rules", "Compiles tslint rules to js", () => {
953-
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs" }, /*useBuiltCompiler*/ false);
963+
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs", "lib": ["es6"] }, /*useBuiltCompiler*/ false);
954964
const dest = path.join(builtLocalDirectory, "tslint");
955965
return gulp.src("scripts/tslint/**/*.ts")
956966
.pipe(newer({

0 commit comments

Comments
 (0)