Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jan 8, 2021
2 parents 0c00853 + 042bf4e commit 8207911
Show file tree
Hide file tree
Showing 1,984 changed files with 228,963 additions and 193,035 deletions.
69 changes: 49 additions & 20 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,70 @@ about: Create a report to help us improve TypeScript
title: ''
labels: ''
assignees: ''

---
# Bug Report

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
<!--
Please fill in each section completely. Thank you!
-->

Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
### 🔎 Search Terms

Please fill in the *entire* template below.
<!--
What search terms did you use when trying to find an existing bug report?
List them here so people in the future can find this one more easily.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?
"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs
If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
Note: The TypeScript Playground can be used to try older versions of TypeScript.
Please keep and fill in the line that best applies:
-->
**TypeScript Version:** 3.7.x-dev.201xxxxx
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
<!--
A link to a TypeScript Playground "Share" link which shows this behavior
The TypeScript Workbench can be used for more complex setups, try
https://www.typescriptlang.org/dev/bug-workbench/
As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA)

**Code**
### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
// We can quickly address your report if:
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
// - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
// - We have to pare too much extraneous code.
// - We have to clone a large repo and validate that the problem isn't elsewhere.
// - The sample is confusing or doesn't clearly demonstrate what's wrong.
```

**Expected behavior:**
### 🙁 Actual behavior

**Actual behavior:**
<!-- What happened, and why it was wrong -->

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
### 🙂 Expected behavior

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
<!-- What you expected to happen instead, and why -->
60 changes: 36 additions & 24 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,56 @@ about: Suggest an idea
title: ''
labels: ''
assignees: ''

---
# Suggestion

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.
Please help us by doing the following steps before logging an issue:
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
* Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ
<!--
Please fill in each section completely. Thank you!
-->

## Search Terms
## 🔍 Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
<!--
💡 Did you know? TypeScript has over 2,000 open suggestions!
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
## Suggestion
Replace the text below:
-->

<!-- A summary of what you'd like to see added or changed -->
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

## Use Cases
## ✅ Viability Checklist

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
We always recommend reviewing the TypeScript design goals before investing time writing
a proposal for ideas outside the scope of the project.
-->

## Examples

<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

<!--
If you were announcing this feature in a blog post, what's a short explanation that shows
a developer why this feature improves the language?
-->

## 💻 Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
What workarounds are you using in the meantime?
-->
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/lib_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Library change
about: Fix or improve issues with built-in type definitions like `lib.dom.d.ts`, `lib.es6.d.ts`, etc.
title: ''
labels: ''
assignees: ''
---
# lib Update Request

<!--
Please fill in each section completely. Thank you!
Are you here for one of these commonly-requested lib changes?
* Object.keys - see https://stackoverflow.com/questions/55012174/
* Array methods - see https://github.com/microsoft/TypeScript/issues/36554
* parseInt, parseFloat, isFinite, isNaN, etc. - see https://github.com/microsoft/TypeScript/issues/4002
The DOM lib is maintained elsewhere and you can skip a step by filing issues/PRs for the DOM at that repo.
See https://github.com/microsoft/TypeScript-DOM-lib-generator
-->

## Configuration Check

<!--
If you're missing common new methods like Array.includes, you may have a misconfigured project.
Try setting `lib: "es2020"` and checking whether the type you want is present.
You can diagnose further by running `tsc` with `--listFilesOnly` or `--showConfig`.
Conversely, if you are seeing built-in methods you expect to *not* see, check your 'lib' setting
or review your dependencies for lib/reference directives that might be polluting
your global scope. This is common when using the 'node' type library. See https://github.com/microsoft/TypeScript/issues/40184
Replace the text below:
-->
My compilation *target* is `ES2015` and my *lib* is `the default`.

## Missing / Incorrect Definition

<!--
What property, method, function, etc is missing or incorrect?
-->

## Sample Code

<!--
What's some code using this that should work, but doesn't?
-->

## Documentation Link

<!--
Link to relevant documentation (e.g. MDN, W3C, ECMAScript Spec) to consult for this property.
Note that lib.dom.d.ts intentionally does not include browser-specific extensions
or early experimental features.
-->
29 changes: 29 additions & 0 deletions .github/workflows/accept-baselines-fix-lints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Accept Baselines and Fix Lints

on:
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use node version 12
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/

- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
run: |
git config user.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
npm install
gulp runtests-parallel --ci --fix || true
gulp baseline-accept
git add ./src
git add ./tests/baselines/reference
git diff --cached
git commit -m "Update Baselines and/or Applied Lint Fixes"
git push
2 changes: 2 additions & 0 deletions .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
npm test
env:
CI: true
- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Validate the browser can import TypeScript
run: gulp test-browser-integration
- name: LKG, clean, and pack
Expand Down
15 changes: 12 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,25 @@ import { f as g } from "file1";
var x = g();
```

## Managing the Baselines
## Managing the baselines

Compiler tests generate baselines: one file each for the emitted `.js`, the errors produced by the compiler, the type of each expression, and symbol for each identifier. Additionally, some tests generate baselines for the source map output.
Most tests generate "baselines" to find differences in output.
As an example, compiler tests usually emit one file each for

- the `.js` and `.d.ts` output (all in the same `.js` output file),
- the errors produced by the compiler (in an `.errors.txt` file),
- the types of each expression (in a `.types` file),
- the symbols for each identifier (in a `.symbols` file), and
- the source map outputs for files if a test opts into them (in a `.js.map` file).

When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use

```Shell
gulp diff
git diff --diff-filter=AM --no-index ./tests/baselines/reference ./tests/baselines/local
```

Alternatively, you can set the `DIFF` environment variable and run `gulp diff`, or manually run your favorite folder diffing tool between `tests/baselines/reference` and `tests/baselines/local`. Our team largely uses Beyond Compare and WinMerge.

After verifying that the changes in the baselines are correct, run

```Shell
Expand Down
3 changes: 3 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ const watchLssl = () => watch([
"src/services/**/*.ts",
"src/server/tsconfig.json",
"src/server/**/*.ts",
"src/webServer/tsconfig.json",
"src/webServer/**/*.ts",
"src/tsserver/tsconfig.json",
"src/tsserver/**/*.ts",
], buildLssl);
Expand Down Expand Up @@ -590,6 +592,7 @@ task("LKG").description = "Makes a new LKG out of the built js files";
task("LKG").flags = {
" --built": "Compile using the built version of the compiler.",
};
task("lkg", series("LKG"));

const generateSpec = () => exec("cscript", ["//nologo", "scripts/word2md.js", path.resolve("doc/TypeScript Language Specification - ARCHIVED.docx"), path.resolve("doc/spec-ARCHIVED.md")]);
task("generate-spec", series(buildScripts, generateSpec));
Expand Down
5 changes: 3 additions & 2 deletions doc/handbook/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# The TypeScript Handbook

The contents of the TypeScript Handbook can be read from [its GitHub repository](https://github.com/Microsoft/TypeScript-Handbook).
Issues and pull requests should be directed there.
The contents of the TypeScript Handbook can be found in the
[TypeScript website repository](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/documentation).
Issues and pull requests should be directed there.

0 comments on commit 8207911

Please sign in to comment.