Skip to content

Commit 7dbea0e

Browse files
committed
Merge branch 'master' into fix2-getConstraintOfIndexedAccess
2 parents 71b7429 + ee87cf4 commit 7dbea0e

1,088 files changed

Lines changed: 40552 additions & 11783 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ internal/
5858
!tests/baselines/reference/project/nodeModules*/**/*
5959
.idea
6060
yarn.lock
61+
yarn-error.log
6162
.parallelperf.*
6263
tests/cases/user/*/package-lock.json
6364
tests/cases/user/*/node_modules/

.gitmodules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,19 @@
22
path = tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
33
url = https://github.com/Microsoft/TypeScript-React-Starter
44
ignore = all
5-
shallow = true
65
[submodule "tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter"]
76
path = tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
87
url = https://github.com/Microsoft/TypeScript-Node-Starter.git
98
ignore = all
10-
shallow = true
119
[submodule "tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter"]
1210
path = tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
1311
url = https://github.com/Microsoft/TypeScript-React-Native-Starter.git
1412
ignore = all
15-
shallow = true
1613
[submodule "tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter"]
1714
path = tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
1815
url = https://github.com/Microsoft/TypeScript-Vue-Starter.git
1916
ignore = all
20-
shallow = true
2117
[submodule "tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter"]
2218
path = tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
2319
url = https://github.com/Microsoft/TypeScript-WeChat-Starter.git
2420
ignore = all
25-
shallow = true

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ branches:
1818
- master
1919
- release-2.5
2020
- release-2.6
21+
- release-2.7
2122

2223
install:
2324
- npm uninstall typescript --no-save

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ Issues that ask questions answered in the FAQ will be closed without elaboration
88

99
## 2. Search for Duplicates
1010

11-
[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one.
11+
[Search the existing issues](https://github.com/Microsoft/TypeScript/search?type=Issues) before logging a new one.
12+
13+
Some search tips:
14+
* *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.
15+
* Check for synonyms. For example, if your bug involves an interface, it likely also occurs with type aliases or classes.
16+
* 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.
17+
* Read more than the first page of results. Many bugs here use the same words so relevancy sorting is not particularly strong.
18+
* If you have a crash, search for the first few topmost function names shown in the call stack.
1219

1320
## 3. Do you have a question?
1421

@@ -183,3 +190,10 @@ jake baseline-accept
183190
```
184191

185192
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.
193+
194+
## Localization
195+
196+
All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
197+
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).
198+
199+
See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).

Gulpfile.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ const es2018LibrarySourceMap = es2018LibrarySource.map(source =>
150150
({ target: "lib." + source, sources: ["header.d.ts", source] }));
151151

152152
const esnextLibrarySource = [
153-
"esnext.asynciterable.d.ts"
153+
"esnext.asynciterable.d.ts",
154+
"esnext.array.d.ts",
155+
"esnext.promise.d.ts"
154156
];
155157

156158
const esnextLibrarySourceMap = esnextLibrarySource.map(source =>
@@ -679,14 +681,14 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
679681
workerCount = cmdLineOptions.workers;
680682
}
681683

682-
if (tests || runners || light || taskConfigsFolder) {
683-
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit);
684-
}
685-
686684
if (tests && tests.toLocaleLowerCase() === "rwc") {
687685
testTimeout = 400000;
688686
}
689687

688+
if (tests || runners || light || testTimeout || taskConfigsFolder) {
689+
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout);
690+
}
691+
690692
const colors = cmdLineOptions.colors;
691693
const reporter = cmdLineOptions.reporter || defaultReporter;
692694

@@ -871,8 +873,17 @@ function cleanTestDirs(done: (e?: any) => void) {
871873
}
872874

873875
// used to pass data from jake command line directly to run.js
874-
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
875-
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, runner: runners ? runners.split(",") : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder, noColor: !cmdLineOptions.colors });
876+
function writeTestConfigFile(tests: string, runners: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string, timeout?: number) {
877+
const testConfigContents = JSON.stringify({
878+
test: tests ? [tests] : undefined,
879+
runner: runners ? runners.split(",") : undefined,
880+
light,
881+
workerCount,
882+
stackTraceLimit,
883+
taskConfigsFolder,
884+
noColor: !cmdLineOptions.colors,
885+
timeout,
886+
});
876887
console.log("Running tests with config: " + testConfigContents);
877888
fs.writeFileSync("test.config", testConfigContents);
878889
}

Jakefile.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ var harnessSources = harnessCoreSources.concat([
130130
"textStorage.ts",
131131
"moduleResolution.ts",
132132
"tsconfigParsing.ts",
133+
"asserts.ts",
133134
"builder.ts",
134135
"commandLineParsing.ts",
135136
"configurationExtension.ts",
@@ -212,7 +213,9 @@ var es2018LibrarySourceMap = es2018LibrarySource.map(function (source) {
212213
});
213214

214215
var esnextLibrarySource = [
215-
"esnext.asynciterable.d.ts"
216+
"esnext.asynciterable.d.ts",
217+
"esnext.array.d.ts",
218+
"esnext.promise.d.ts"
216219
];
217220

218221
var esnextLibrarySourceMap = esnextLibrarySource.map(function (source) {
@@ -795,7 +798,7 @@ compileFile(
795798
/*prereqs*/[builtLocalDirectory, tscFile, tsserverLibraryFile].concat(libraryTargets).concat(servicesSources).concat(harnessSources),
796799
/*prefixes*/[],
797800
/*useBuiltCompiler:*/ true,
798-
/*opts*/ { types: ["node", "mocha"], lib: "es6" });
801+
/*opts*/ { types: ["node", "mocha", "chai"], lib: "es6" });
799802

800803
var internalTests = "internal/";
801804

@@ -856,15 +859,16 @@ function cleanTestDirs() {
856859
}
857860

858861
// used to pass data from jake command line directly to run.js
859-
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors) {
862+
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout) {
860863
var testConfigContents = JSON.stringify({
861864
runners: runners ? runners.split(",") : undefined,
862865
test: tests ? [tests] : undefined,
863866
light: light,
864867
workerCount: workerCount,
865868
taskConfigsFolder: taskConfigsFolder,
866869
stackTraceLimit: stackTraceLimit,
867-
noColor: !colors
870+
noColor: !colors,
871+
timeout: testTimeout
868872
});
869873
fs.writeFileSync('test.config', testConfigContents);
870874
}
@@ -906,14 +910,14 @@ function runConsoleTests(defaultReporter, runInParallel) {
906910
workerCount = process.env.workerCount || process.env.p || os.cpus().length;
907911
}
908912

909-
if (tests || runners || light || taskConfigsFolder) {
910-
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors);
911-
}
912-
913913
if (tests && tests.toLocaleLowerCase() === "rwc") {
914914
testTimeout = 800000;
915915
}
916916

917+
if (tests || runners || light || testTimeout || taskConfigsFolder) {
918+
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, colors, testTimeout);
919+
}
920+
917921
var colorsFlag = process.env.color || process.env.colors;
918922
var colors = colorsFlag !== "false" && colorsFlag !== "0";
919923
var reporter = process.env.reporter || process.env.r || defaultReporter;
@@ -1200,6 +1204,7 @@ var tslintRules = [
12001204
"debugAssertRule",
12011205
"nextLineRule",
12021206
"noBomRule",
1207+
"noDoubleSpaceRule",
12031208
"noIncrementDecrementRule",
12041209
"noInOperatorRule",
12051210
"noTypeAssertionWhitespaceRule",

issue_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
**Expected behavior:**
1616

1717
**Actual behavior:**
18+
19+
**Related:**

0 commit comments

Comments
 (0)