Skip to content

Commit bd9f39d

Browse files
committed
Merge branch 'master' into add-codefix-cannot-find-name-in-for-loop
2 parents 41ebeec + 3e68561 commit bd9f39d

File tree

1,356 files changed

+59704
-12938
lines changed

Some content is hidden

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

1,356 files changed

+59704
-12938
lines changed

.dockerignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
node_modules
2+
.node_modules
3+
built/*
4+
test-args.txt
5+
~*.docx
6+
\#*\#
7+
.\#*
8+
src/harness/*.js
9+
src/compiler/diagnosticInformationMap.generated.ts
10+
src/compiler/diagnosticMessages.generated.json
11+
src/parser/diagnosticInformationMap.generated.ts
12+
src/parser/diagnosticMessages.generated.json
13+
rwc-report.html
14+
*.swp
15+
build.json
16+
*.actual
17+
*.config
18+
scripts/debug.bat
19+
scripts/run.bat
20+
scripts/word2md.js
21+
scripts/buildProtocol.js
22+
scripts/ior.js
23+
scripts/authors.js
24+
scripts/configurePrerelease.js
25+
scripts/open-user-pr.js
26+
scripts/open-cherry-pick-pr.js
27+
scripts/processDiagnosticMessages.d.ts
28+
scripts/processDiagnosticMessages.js
29+
scripts/produceLKG.js
30+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
31+
scripts/generateLocalizedDiagnosticMessages.js
32+
scripts/*.js.map
33+
scripts/typings/
34+
coverage/
35+
internal/
36+
**/.DS_Store
37+
.settings
38+
**/.vs
39+
.idea
40+
yarn.lock
41+
yarn-error.log
42+
.parallelperf.*
43+
.failed-tests
44+
TEST-results.xml
45+
package-lock.json
46+
tests
47+
.vscode
48+
.git

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tests/webTestServer.js.map
3434
tests/webhost/*.d.ts
3535
tests/webhost/webtsc.js
3636
tests/cases/**/*.js
37+
!tests/cases/docker/*.js/
3738
tests/cases/**/*.js.map
3839
*.config
3940
scripts/debug.bat
@@ -44,6 +45,7 @@ scripts/ior.js
4445
scripts/authors.js
4546
scripts/configurePrerelease.js
4647
scripts/open-user-pr.js
48+
scripts/open-cherry-pick-pr.js
4749
scripts/processDiagnosticMessages.d.ts
4850
scripts/processDiagnosticMessages.js
4951
scripts/produceLKG.js

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ package-lock.json
2929
yarn.lock
3030
CONTRIBUTING.md
3131
TEST-results.xml
32+
.dockerignore
33+
Dockerfile

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--install.no-lockfile true

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# We use this dockerfile to build a packed tarfile which we import in our `docker` tests
2+
FROM node:current
3+
COPY . /typescript
4+
WORKDIR /typescript
5+
RUN npm install
6+
RUN npm i -g gulp-cli
7+
RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack .

Gulpfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ task("runtests").flags = {
415415
" --no-lint": "Disables lint",
416416
" --timeout=<ms>": "Overrides the default test timeout.",
417417
" --built": "Compile using the built version of the compiler.",
418+
" --shards": "Total number of shards running tests (default: 1)",
419+
" --shardId": "1-based ID of this shard (default: 1)",
418420
}
419421

420422
const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ false);
@@ -429,6 +431,9 @@ task("runtests-parallel").flags = {
429431
" --workers=<number>": "The number of parallel workers to use.",
430432
" --timeout=<ms>": "Overrides the default test timeout.",
431433
" --built": "Compile using the built version of the compiler.",
434+
" --skipPercent=<number>": "Skip expensive tests with <percent> chance to miss an edit. Default 5%.",
435+
" --shards": "Total number of shards running tests (default: 1)",
436+
" --shardId": "1-based ID of this shard (default: 1)",
432437
};
433438

434439
task("diff", () => exec(getDiffTool(), [refBaseline, localBaseline], { ignoreExitCode: true }));

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
2+
# TypeScript
3+
4+
[![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
15
[![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
26
[![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs)
37
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
48
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
59

6-
# TypeScript
710

8-
[![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
911

1012
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
1113

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "https://www.typescriptlang.org/",
5-
"version": "3.5.0",
5+
"version": "3.6.0",
66
"license": "Apache-2.0",
77
"description": "TypeScript is a language for application scale JavaScript development",
88
"keywords": [
@@ -48,11 +48,13 @@
4848
"@types/mocha": "latest",
4949
"@types/ms": "latest",
5050
"@types/node": "8.5.5",
51+
"@types/node-fetch": "^2.3.4",
5152
"@types/q": "latest",
5253
"@types/source-map-support": "latest",
5354
"@types/through2": "latest",
5455
"@types/travis-fold": "latest",
5556
"@types/xml2js": "^0.4.0",
57+
"azure-devops-node-api": "^8.0.0",
5658
"browser-resolve": "^1.11.2",
5759
"browserify": "latest",
5860
"chai": "latest",
@@ -74,11 +76,13 @@
7476
"mocha": "latest",
7577
"mocha-fivemat-progress-reporter": "latest",
7678
"ms": "latest",
79+
"node-fetch": "^2.6.0",
7780
"plugin-error": "latest",
7881
"pretty-hrtime": "^1.0.3",
7982
"prex": "^0.4.3",
8083
"q": "latest",
8184
"remove-internal": "^2.9.2",
85+
"simple-git": "^1.113.0",
8286
"source-map-support": "latest",
8387
"through2": "latest",
8488
"travis-fold": "latest",
@@ -99,7 +103,8 @@
99103
"gulp": "gulp",
100104
"jake": "gulp",
101105
"lint": "gulp lint",
102-
"setup-hooks": "node scripts/link-hooks.js"
106+
"setup-hooks": "node scripts/link-hooks.js",
107+
"update-costly-tests": "node scripts/costly-tests.js"
103108
},
104109
"browser": {
105110
"fs": false,

scripts/build/options.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const os = require("os");
55
/** @type {CommandLineOptions} */
66
module.exports = minimist(process.argv.slice(2), {
77
boolean: ["debug", "dirty", "inspect", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"],
8-
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout"],
8+
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
99
alias: {
1010
"b": "browser",
1111
"d": "debug", "debug-brk": "debug",
@@ -14,6 +14,7 @@ module.exports = minimist(process.argv.slice(2), {
1414
"ru": "runners", "runner": "runners",
1515
"r": "reporter",
1616
"c": "colors", "color": "colors",
17+
"skip-percent": "skipPercent",
1718
"w": "workers",
1819
"f": "fix"
1920
},
@@ -69,4 +70,4 @@ if (module.exports.built) {
6970
*
7071
* @typedef {import("minimist").ParsedArgs & TypedOptions} CommandLineOptions
7172
*/
72-
void 0;
73+
void 0;

scripts/build/tests.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
3131
const inspect = cmdLineOptions.inspect;
3232
const runners = cmdLineOptions.runners;
3333
const light = cmdLineOptions.light;
34+
const skipPercent = process.env.CI === "true" ? 0 : cmdLineOptions.skipPercent;
3435
const stackTraceLimit = cmdLineOptions.stackTraceLimit;
3536
const testConfigFile = "test.config";
3637
const failed = cmdLineOptions.failed;
3738
const keepFailed = cmdLineOptions.keepFailed;
39+
const shards = +cmdLineOptions.shards || undefined;
40+
const shardId = +cmdLineOptions.shardId || undefined;
3841
if (!cmdLineOptions.dirty) {
3942
await cleanTestDirs();
4043
cancelToken.throwIfCancellationRequested();
@@ -62,8 +65,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
6265
testTimeout = 400000;
6366
}
6467

65-
if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed) {
66-
writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed);
68+
if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed || skipPercent !== undefined || shards || shardId) {
69+
writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed, shards, shardId);
6770
}
6871

6972
const colors = cmdLineOptions.colors;
@@ -158,23 +161,29 @@ exports.cleanTestDirs = cleanTestDirs;
158161
* @param {string} tests
159162
* @param {string} runners
160163
* @param {boolean} light
164+
* @param {string} skipPercent
161165
* @param {string} [taskConfigsFolder]
162166
* @param {string | number} [workerCount]
163167
* @param {string} [stackTraceLimit]
164168
* @param {string | number} [timeout]
165169
* @param {boolean} [keepFailed]
170+
* @param {number | undefined} [shards]
171+
* @param {number | undefined} [shardId]
166172
*/
167-
function writeTestConfigFile(tests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed) {
173+
function writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed, shards, shardId) {
168174
const testConfigContents = JSON.stringify({
169175
test: tests ? [tests] : undefined,
170176
runners: runners ? runners.split(",") : undefined,
171177
light,
178+
skipPercent,
172179
workerCount,
173180
stackTraceLimit,
174181
taskConfigsFolder,
175182
noColor: !cmdLineOptions.colors,
176183
timeout,
177-
keepFailed
184+
keepFailed,
185+
shards,
186+
shardId
178187
});
179188
log.info("Running tests with config: " + testConfigContents);
180189
fs.writeFileSync("test.config", testConfigContents);

0 commit comments

Comments
 (0)