Skip to content

Commit 8d249ea

Browse files
Merge remote-tracking branch 'origin/master' into release-4.1
2 parents f6a0f15 + 53bc006 commit 8d249ea

File tree

950 files changed

+38561
-14351
lines changed

Some content is hidden

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

950 files changed

+38561
-14351
lines changed

.eslintrc.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"@typescript-eslint/adjacent-overload-signatures": "error",
1818
"@typescript-eslint/array-type": "error",
1919

20-
"camelcase": "off",
20+
"brace-style": "off",
21+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
22+
2123
"@typescript-eslint/naming-convention": [
2224
"error",
2325
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
@@ -32,6 +34,10 @@
3234
],
3335

3436
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
37+
38+
"no-duplicate-imports": "off",
39+
"@typescript-eslint/no-duplicate-imports": "error",
40+
3541
"@typescript-eslint/no-inferrable-types": "error",
3642
"@typescript-eslint/no-misused-new": "error",
3743
"@typescript-eslint/no-this-alias": "error",
@@ -86,7 +92,6 @@
8692
"jsdoc/check-alignment": "error",
8793

8894
// eslint
89-
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
9095
"constructor-super": "error",
9196
"curly": ["error", "multi-line"],
9297
"dot-notation": "error",
@@ -95,7 +100,6 @@
95100
"new-parens": "error",
96101
"no-caller": "error",
97102
"no-duplicate-case": "error",
98-
"no-duplicate-imports": "error",
99103
"no-empty": "error",
100104
"no-eval": "error",
101105
"no-extra-bind": "error",

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
- name: Linter
4343
run: npm run lint:ci
4444

45+
- name: Adding playwright
46+
run: npm install --no-save --no-package-lock playwright
47+
4548
- name: Validate the browser can import TypeScript
4649
run: gulp test-browser-integration
4750

.github/workflows/nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup and publish nightly
2323
run: |
2424
npm whoami
25-
npm i
25+
npm ci
2626
gulp configure-nightly
2727
gulp LKG
2828
gulp runtests-parallel

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob
3333
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
3434
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
3535
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md).
36-
* Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
37-
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)).
36+
* Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true),
37+
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec-archived.md)).
3838

3939
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
4040
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected])
@@ -78,8 +78,6 @@ gulp LKG # Replace the last known good with the built one.
7878
# Bootstrapping step to be executed when the built compiler reaches a stable state.
7979
gulp tests # Build the test infrastructure using the built compiler.
8080
gulp runtests # Run tests using the built compiler and test infrastructure.
81-
# Some low-value tests are skipped when not on a CI machine - you can use the
82-
# --skipPercent=0 command to override this behavior and run all tests locally.
8381
# You can override the specific suite runner used or specify a test for this command.
8482
# Use --tests=<testPath> for a specific test and/or --runner=<runnerName> for a specific suite.
8583
# Valid runners include conformance, compiler, fourslash, project, user, and docker

package-lock.json

Lines changed: 729 additions & 1060 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
"@types/through2": "latest",
5555
"@types/travis-fold": "latest",
5656
"@types/xml2js": "^0.4.0",
57-
"@typescript-eslint/eslint-plugin": "^3.6.1-alpha.1",
58-
"@typescript-eslint/experimental-utils": "^3.4.1-alpha.1",
59-
"@typescript-eslint/parser": "^3.4.1-alpha.1",
57+
"@typescript-eslint/eslint-plugin": "4.5.0",
58+
"@typescript-eslint/experimental-utils": "4.5.0",
59+
"@typescript-eslint/parser": "4.5.0",
6060
"async": "latest",
6161
"azure-devops-node-api": "^10.1.0",
6262
"browser-resolve": "^1.11.2",
@@ -66,10 +66,10 @@
6666
"convert-source-map": "latest",
6767
"del": "5.1.0",
6868
"diff": "^4.0.2",
69-
"eslint": "6.8.0",
70-
"eslint-formatter-autolinkable-stylish": "1.1.2",
71-
"eslint-plugin-import": "2.20.2",
72-
"eslint-plugin-jsdoc": "22.1.0",
69+
"eslint": "7.12.1",
70+
"eslint-formatter-autolinkable-stylish": "1.1.4",
71+
"eslint-plugin-import": "2.22.1",
72+
"eslint-plugin-jsdoc": "30.7.6",
7373
"eslint-plugin-no-null": "1.0.2",
7474
"fancy-log": "latest",
7575
"fs-extra": "^9.0.0",
@@ -88,7 +88,6 @@
8888
"mocha-fivemat-progress-reporter": "latest",
8989
"ms": "latest",
9090
"node-fetch": "^2.6.0",
91-
"playwright": "0.12.1",
9291
"plugin-error": "latest",
9392
"pretty-hrtime": "^1.0.3",
9493
"prex": "^0.4.3",

scripts/browserIntegrationTest.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
const playwright = require("playwright");
1+
// @ts-check
22
const chalk = require("chalk");
33
const { join } = require("path");
44
const { readFileSync } = require("fs");
5+
try {
6+
// eslint-disable-next-line import/no-extraneous-dependencies
7+
require("playwright");
8+
}
9+
catch (error) {
10+
throw new Error("Playwright is expected to be installed manually before running this script");
11+
}
12+
13+
// eslint-disable-next-line import/no-extraneous-dependencies
14+
const playwright = require("playwright");
515

616
// Turning this on will leave the Chromium browser open, giving you the
717
// chance to open up the web inspector.
818
const debugging = false;
919

1020
(async () => {
11-
for (const browserType of ["chromium", "firefox", "webkit"]) {
21+
for (const browserType of ["chromium", "firefox"]) {
1222
const browser = await playwright[browserType].launch({ headless: !debugging });
1323
const context = await browser.newContext();
1424
const page = await context.newPage();
@@ -21,7 +31,6 @@ const debugging = false;
2131

2232
page.on("error", errorCaught);
2333
page.on("pageerror", errorCaught);
24-
page.on("console", log => console[log._type](log._text));
2534

2635
await page.setContent(`
2736
<html>
@@ -35,5 +44,14 @@ const debugging = false;
3544
else {
3645
console.log("Not closing the browser, you'll need to exit the process in your terminal manually");
3746
}
47+
console.log(`${browserType} :+1:`);
3848
}
3949
})();
50+
51+
process.on("unhandledRejection", (/** @type {any}*/ err) => {
52+
if (err) {
53+
console.error(err.stack || err.message);
54+
}
55+
process.exit(1);
56+
});
57+

scripts/produceLKG.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ async function produceLKG() {
1515
await copyLibFiles();
1616
await copyLocalizedDiagnostics();
1717
await copyTypesMap();
18-
await buildProtocol();
1918
await copyScriptOutputs();
2019
await copyDeclarationOutputs();
20+
await buildProtocol();
2121
await writeGitAttributes();
2222
}
2323

scripts/tsconfig.eslint.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)