Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release-4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Nov 2, 2020
2 parents f6a0f15 + 53bc006 commit 8d249ea
Show file tree
Hide file tree
Showing 950 changed files with 38,561 additions and 14,351 deletions.
10 changes: 7 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",

"camelcase": "off",
"brace-style": "off",
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],

"@typescript-eslint/naming-convention": [
"error",
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
Expand All @@ -32,6 +34,10 @@
],

"@typescript-eslint/consistent-type-definitions": ["error", "interface"],

"no-duplicate-imports": "off",
"@typescript-eslint/no-duplicate-imports": "error",

"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-this-alias": "error",
Expand Down Expand Up @@ -86,7 +92,6 @@
"jsdoc/check-alignment": "error",

// eslint
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"constructor-super": "error",
"curly": ["error", "multi-line"],
"dot-notation": "error",
Expand All @@ -95,7 +100,6 @@
"new-parens": "error",
"no-caller": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-eval": "error",
"no-extra-bind": "error",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Linter
run: npm run lint:ci

- name: Adding playwright
run: npm install --no-save --no-package-lock playwright

- name: Validate the browser can import TypeScript
run: gulp test-browser-integration

2 changes: 1 addition & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup and publish nightly
run: |
npm whoami
npm i
npm ci
gulp configure-nightly
gulp LKG
gulp runtests-parallel
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md).
* Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
[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)).
* Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true),
[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)).

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

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"@types/through2": "latest",
"@types/travis-fold": "latest",
"@types/xml2js": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^3.6.1-alpha.1",
"@typescript-eslint/experimental-utils": "^3.4.1-alpha.1",
"@typescript-eslint/parser": "^3.4.1-alpha.1",
"@typescript-eslint/eslint-plugin": "4.5.0",
"@typescript-eslint/experimental-utils": "4.5.0",
"@typescript-eslint/parser": "4.5.0",
"async": "latest",
"azure-devops-node-api": "^10.1.0",
"browser-resolve": "^1.11.2",
Expand All @@ -66,10 +66,10 @@
"convert-source-map": "latest",
"del": "5.1.0",
"diff": "^4.0.2",
"eslint": "6.8.0",
"eslint-formatter-autolinkable-stylish": "1.1.2",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jsdoc": "22.1.0",
"eslint": "7.12.1",
"eslint-formatter-autolinkable-stylish": "1.1.4",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-no-null": "1.0.2",
"fancy-log": "latest",
"fs-extra": "^9.0.0",
Expand All @@ -88,7 +88,6 @@
"mocha-fivemat-progress-reporter": "latest",
"ms": "latest",
"node-fetch": "^2.6.0",
"playwright": "0.12.1",
"plugin-error": "latest",
"pretty-hrtime": "^1.0.3",
"prex": "^0.4.3",
Expand Down
24 changes: 21 additions & 3 deletions scripts/browserIntegrationTest.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
const playwright = require("playwright");
// @ts-check
const chalk = require("chalk");
const { join } = require("path");
const { readFileSync } = require("fs");
try {
// eslint-disable-next-line import/no-extraneous-dependencies
require("playwright");
}
catch (error) {
throw new Error("Playwright is expected to be installed manually before running this script");
}

// eslint-disable-next-line import/no-extraneous-dependencies
const playwright = require("playwright");

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

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

page.on("error", errorCaught);
page.on("pageerror", errorCaught);
page.on("console", log => console[log._type](log._text));

await page.setContent(`
<html>
Expand All @@ -35,5 +44,14 @@ const debugging = false;
else {
console.log("Not closing the browser, you'll need to exit the process in your terminal manually");
}
console.log(`${browserType} :+1:`);
}
})();

process.on("unhandledRejection", (/** @type {any}*/ err) => {
if (err) {
console.error(err.stack || err.message);
}
process.exit(1);
});

2 changes: 1 addition & 1 deletion scripts/produceLKG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ async function produceLKG() {
await copyLibFiles();
await copyLocalizedDiagnostics();
await copyTypesMap();
await buildProtocol();
await copyScriptOutputs();
await copyDeclarationOutputs();
await buildProtocol();
await writeGitAttributes();
}

Expand Down
4 changes: 0 additions & 4 deletions scripts/tsconfig.eslint.json

This file was deleted.

Loading

0 comments on commit 8d249ea

Please sign in to comment.