Skip to content

Commit

Permalink
Merge branch 'master' into Destructuring_assignment_assignability_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed Apr 26, 2019
2 parents 9eb45ea + 89386dd commit d88c01e
Show file tree
Hide file tree
Showing 1,603 changed files with 363,022 additions and 40,324 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Expand Up @@ -16,7 +16,7 @@ Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.3.0-dev.201xxxxx
**TypeScript Version:** 3.4.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
Expand Down
6 changes: 2 additions & 4 deletions .github/pull_request_template.md
Expand Up @@ -2,11 +2,9 @@
Thank you for submitting a pull request!
Here's a checklist you might find useful.
* [ ] There is an associated issue that is labeled
'Bug' or 'help wanted' or is in the Community milestone
* [ ] There is an associated issue that is labeled 'Bug' or 'help wanted'
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] You've successfully run `gulp runtests` locally
* [ ] There are new or updated unit tests validating the change
Refer to CONTRIBUTING.MD for more details.
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Expand Up @@ -121,6 +121,7 @@ Ken Howard <ken@simplicatedweb.com>
Kevin Lang <klang2012@gmail.com>
kimamula <kenji.imamula@gmail.com> # Kenji Imamula
Kitson Kelly <me@kitsonkelly.com>
Krishnadas Babu <krishnadas100033@gmail.com>
Klaus Meinhardt <klaus.meinhardt1@gmail.com>
Kyle Kelley <rgbkrk@gmail.com>
Lorant Pinter <lorant.pinter@prezi.com>
Expand Down
5 changes: 4 additions & 1 deletion .npmignore
Expand Up @@ -12,7 +12,11 @@ tests
tslint.json
Jakefile.js
.editorconfig
.failed-tests
.git
.git/
.gitattributes
.github/
.gitmodules
.settings/
.travis.yml
Expand All @@ -23,6 +27,5 @@ Jakefile.js
test.config
package-lock.json
yarn.lock
.github/
CONTRIBUTING.md
TEST-results.xml
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -3,9 +3,7 @@ language: node_js
node_js:
- 'node'
- '10'
- '6'

sudo: false
- '8'

env:
- workerCount=3 timeout=600000
Expand Down
38 changes: 24 additions & 14 deletions CONTRIBUTING.md
Expand Up @@ -47,6 +47,16 @@ In general, things we find useful when reviewing suggestions are:

# Instructions for Contributing Code

## Tips

### Faster clones

The TypeScript repository is relatively large. To save some time, you might want to clone it without the repo's full history using `git clone --depth=1`.

### Using local builds

Run `gulp` to build a version of the compiler/language service that reflects changes you've made. You can then run `node <repo-root>/built/local/tsc.js` in place of `tsc` in your project. For example, to run `tsc --watch` from within the root of the repository on a file called `test.ts`, you can run `node ./built/local/tsc.js --watch test.ts`.

## Contributing bug fixes

TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
Expand Down Expand Up @@ -94,7 +104,7 @@ Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/
Library files in `built/local/` are updated automatically by running the standard build task:

```sh
jake
gulp
```

The files in `lib/` are used to bootstrap compilation and usually **should not** be updated unless publishing a new version or updating the LKG.
Expand All @@ -105,49 +115,49 @@ The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` bo

## Running the Tests

To run all tests, invoke the `runtests-parallel` target using jake:
To run all tests, invoke the `runtests-parallel` target using gulp:

```Shell
jake runtests-parallel
gulp runtests-parallel
```

This will run all tests; to run only a specific subset of tests, use:

```Shell
jake runtests tests=<regex>
gulp runtests --tests=<regex>
```

e.g. to run all compiler baseline tests:

```Shell
jake runtests tests=compiler
gulp runtests --tests=compiler
```

or to run a specific test: `tests\cases\compiler\2dArrays.ts`

```Shell
jake runtests tests=2dArrays
gulp runtests --tests=2dArrays
```

## Debugging the tests

To debug the tests, invoke the `runtests-browser` task from jake.
To debug the tests, invoke the `runtests-browser` task from gulp.
You will probably only want to debug one test at a time:

```Shell
jake runtests-browser tests=2dArrays
gulp runtests-browser --tests=2dArrays
```

You can specify which browser to use for debugging. Currently Chrome and IE are supported:

```Shell
jake runtests-browser tests=2dArrays browser=chrome
gulp runtests-browser --tests=2dArrays --browser=chrome
```

You can debug with VS Code or Node instead with `jake runtests inspect=true`:
You can debug with VS Code or Node instead with `gulp runtests --inspect=true`:

```Shell
jake runtests tests=2dArrays inspect=true
gulp runtests --tests=2dArrays --inspect=true
```

## Adding a Test
Expand Down Expand Up @@ -187,20 +197,20 @@ Compiler testcases generate baselines that track the emitted `.js`, the errors p
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use

```Shell
jake diff
gulp diff
```

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

```Shell
jake baseline-accept
gulp baseline-accept
```

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.

## Localization

All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`.
If you make changes to it, run `gulp generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`.

See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).

0 comments on commit d88c01e

Please sign in to comment.