Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into es3
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Apr 11, 2019
2 parents f90b59c + ff95909 commit fecbd7a
Show file tree
Hide file tree
Showing 1,178 changed files with 283,308 additions and 33,828 deletions.
6 changes: 2 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
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
5 changes: 4 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ language: node_js
node_js:
- 'node'
- '10'
- '6'

sudo: false
- '8'

env:
- workerCount=3 timeout=600000
Expand Down
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The TypeScript repository is relatively large. To save some time, you might want

### Using local builds

Run `gulp build` 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`.
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

Expand Down Expand Up @@ -104,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 @@ -115,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 @@ -197,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).
Loading

0 comments on commit fecbd7a

Please sign in to comment.