Skip to content

Commit

Permalink
Merge branch 'master' into convertToEsModule
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Hanson committed Jan 9, 2018
2 parents 4df53c1 + fed34cd commit 53c9bf2
Show file tree
Hide file tree
Showing 1,269 changed files with 190,291 additions and 88,411 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ internal/
!tests/baselines/reference/project/nodeModules*/**/*
.idea
yarn.lock
yarn-error.log
.parallelperf.*
tests/cases/user/*/package-lock.json
tests/cases/user/*/node_modules/
Expand Down
5 changes: 0 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@
path = tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
url = https://github.com/Microsoft/TypeScript-React-Starter
ignore = all
shallow = true
[submodule "tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter"]
path = tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
url = https://github.com/Microsoft/TypeScript-Node-Starter.git
ignore = all
shallow = true
[submodule "tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter"]
path = tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
url = https://github.com/Microsoft/TypeScript-React-Native-Starter.git
ignore = all
shallow = true
[submodule "tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter"]
path = tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
url = https://github.com/Microsoft/TypeScript-Vue-Starter.git
ignore = all
shallow = true
[submodule "tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter"]
path = tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
url = https://github.com/Microsoft/TypeScript-WeChat-Starter.git
ignore = all
shallow = true
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ branches:
- master
- release-2.5
- release-2.6
- release-2.7

install:
- npm uninstall typescript --no-save
Expand Down
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ Issues that ask questions answered in the FAQ will be closed without elaboration

## 2. Search for Duplicates

[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one.
[Search the existing issues](https://github.com/Microsoft/TypeScript/search?type=Issues) before logging a new one.

Some search tips:
* *Don't* restrict your search to only open issues. An issue with a title similar to yours may have been closed as a duplicate of one with a less-findable title.
* Check for synonyms. For example, if your bug involves an interface, it likely also occurs with type aliases or classes.
* Search for the title of the issue you're about to log. This sounds obvious but 80% of the time this is sufficient to find a duplicate when one exists.
* Read more than the first page of results. Many bugs here use the same words so relevancy sorting is not particularly strong.
* If you have a crash, search for the first few topmost function names shown in the call stack.

## 3. Do you have a question?

Expand Down Expand Up @@ -183,3 +190,10 @@ jake baseline-accept
```

to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines.

## Localization

All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in [`diagnosticInformationMap.generated.ts`](./src/compiler/diagnosticInformationMap.generated.ts).

See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).
33 changes: 25 additions & 8 deletions Gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,14 @@ const es2017LibrarySource = [
const es2017LibrarySourceMap = es2017LibrarySource.map(source =>
({ target: "lib." + source, sources: ["header.d.ts", source] }));

const es2018LibrarySource = [];
const es2018LibrarySourceMap = es2018LibrarySource.map(source =>
({ target: "lib." + source, sources: ["header.d.ts", source] }));

const esnextLibrarySource = [
"esnext.asynciterable.d.ts"
"esnext.asynciterable.d.ts",
"esnext.array.d.ts",
"esnext.promise.d.ts"
];

const esnextLibrarySourceMap = esnextLibrarySource.map(source =>
Expand All @@ -166,15 +172,17 @@ const librarySourceMap = [
{ target: "lib.es2015.d.ts", sources: ["header.d.ts", "es2015.d.ts"] },
{ target: "lib.es2016.d.ts", sources: ["header.d.ts", "es2016.d.ts"] },
{ target: "lib.es2017.d.ts", sources: ["header.d.ts", "es2017.d.ts"] },
{ target: "lib.es2018.d.ts", sources: ["header.d.ts", "es2018.d.ts"] },
{ target: "lib.esnext.d.ts", sources: ["header.d.ts", "esnext.d.ts"] },

// JavaScript + all host library
{ target: "lib.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(hostsLibrarySources) },
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(es2015LibrarySources, hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2016.full.d.ts", sources: ["header.d.ts", "es2016.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2017.full.d.ts", sources: ["header.d.ts", "es2017.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2018.full.d.ts", sources: ["header.d.ts", "es2018.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.esnext.full.d.ts", sources: ["header.d.ts", "esnext.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, esnextLibrarySourceMap);
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, es2018LibrarySourceMap, esnextLibrarySourceMap);

const libraryTargets = librarySourceMap.map(f =>
path.join(builtLocalDirectory, f.target));
Expand Down Expand Up @@ -673,14 +681,14 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
workerCount = cmdLineOptions.workers;
}

if (tests || runners || light || taskConfigsFolder) {
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit);
}

if (tests && tests.toLocaleLowerCase() === "rwc") {
testTimeout = 400000;
}

if (tests || runners || light || testTimeout || taskConfigsFolder) {
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout);
}

const colors = cmdLineOptions.colors;
const reporter = cmdLineOptions.reporter || defaultReporter;

Expand Down Expand Up @@ -865,8 +873,17 @@ function cleanTestDirs(done: (e?: any) => void) {
}

// used to pass data from jake command line directly to run.js
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, runner: runners ? runners.split(",") : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder, noColor: !cmdLineOptions.colors });
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string, timeout?: number) {
const testConfigContents = JSON.stringify({
test: tests ? [tests] : undefined,
runner: runners ? runners.split(",") : undefined,
light,
workerCount,
stackTraceLimit,
taskConfigsFolder,
noColor: !cmdLineOptions.colors,
timeout,
});
console.log("Running tests with config: " + testConfigContents);
fs.writeFileSync("test.config", testConfigContents);
}
Expand Down
29 changes: 21 additions & 8 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ var harnessSources = harnessCoreSources.concat([
"textStorage.ts",
"moduleResolution.ts",
"tsconfigParsing.ts",
"asserts.ts",
"builder.ts",
"commandLineParsing.ts",
"configurationExtension.ts",
Expand Down Expand Up @@ -205,8 +206,16 @@ var es2017LibrarySourceMap = es2017LibrarySource.map(function (source) {
return { target: "lib." + source, sources: ["header.d.ts", source] };
});

var es2018LibrarySource = [];

var es2018LibrarySourceMap = es2018LibrarySource.map(function (source) {
return { target: "lib." + source, sources: ["header.d.ts", source] };
});

var esnextLibrarySource = [
"esnext.asynciterable.d.ts"
"esnext.asynciterable.d.ts",
"esnext.array.d.ts",
"esnext.promise.d.ts"
];

var esnextLibrarySourceMap = esnextLibrarySource.map(function (source) {
Expand All @@ -227,15 +236,17 @@ var librarySourceMap = [
{ target: "lib.es2015.d.ts", sources: ["header.d.ts", "es2015.d.ts"] },
{ target: "lib.es2016.d.ts", sources: ["header.d.ts", "es2016.d.ts"] },
{ target: "lib.es2017.d.ts", sources: ["header.d.ts", "es2017.d.ts"] },
{ target: "lib.es2018.d.ts", sources: ["header.d.ts", "es2018.d.ts"] },
{ target: "lib.esnext.d.ts", sources: ["header.d.ts", "esnext.d.ts"] },

// JavaScript + all host library
{ target: "lib.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(hostsLibrarySources) },
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(es2015LibrarySources, hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2016.full.d.ts", sources: ["header.d.ts", "es2016.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2017.full.d.ts", sources: ["header.d.ts", "es2017.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.es2018.full.d.ts", sources: ["header.d.ts", "es2018.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
{ target: "lib.esnext.full.d.ts", sources: ["header.d.ts", "esnext.d.ts"].concat(hostsLibrarySources, "dom.iterable.d.ts") },
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, esnextLibrarySourceMap);
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, es2018LibrarySourceMap, esnextLibrarySourceMap);

var libraryTargets = librarySourceMap.map(function (f) {
return path.join(builtLocalDirectory, f.target);
Expand Down Expand Up @@ -848,15 +859,16 @@ function cleanTestDirs() {
}

// used to pass data from jake command line directly to run.js
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors) {
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout) {
var testConfigContents = JSON.stringify({
runners: runners ? runners.split(",") : undefined,
test: tests ? [tests] : undefined,
light: light,
workerCount: workerCount,
taskConfigsFolder: taskConfigsFolder,
stackTraceLimit: stackTraceLimit,
noColor: !colors
noColor: !colors,
timeout: testTimeout
});
fs.writeFileSync('test.config', testConfigContents);
}
Expand Down Expand Up @@ -898,14 +910,14 @@ function runConsoleTests(defaultReporter, runInParallel) {
workerCount = process.env.workerCount || process.env.p || os.cpus().length;
}

if (tests || runners || light || taskConfigsFolder) {
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors);
}

if (tests && tests.toLocaleLowerCase() === "rwc") {
testTimeout = 800000;
}

if (tests || runners || light || testTimeout || taskConfigsFolder) {
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout);
}

var colorsFlag = process.env.color || process.env.colors;
var colors = colorsFlag !== "false" && colorsFlag !== "0";
var reporter = process.env.reporter || process.env.r || defaultReporter;
Expand Down Expand Up @@ -1192,6 +1204,7 @@ var tslintRules = [
"debugAssertRule",
"nextLineRule",
"noBomRule",
"noDoubleSpaceRule",
"noIncrementDecrementRule",
"noInOperatorRule",
"noTypeAssertionWhitespaceRule",
Expand Down
2 changes: 2 additions & 0 deletions issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
**Expected behavior:**

**Actual behavior:**

**Related:**
2 changes: 0 additions & 2 deletions lib/cancellationToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,3 @@ function createCancellationToken(args) {
}
}
module.exports = createCancellationToken;

//# sourceMappingURL=cancellationToken.js.map
Loading

0 comments on commit 53c9bf2

Please sign in to comment.