Skip to content

Commit 5e27c35

Browse files
committed
Merge pull request #9 from typescript-ruby/ts_version_update
Updated TS to v1.6.2
2 parents 3e7b2a3 + e931356 commit 5e27c35

27 files changed

+201960
-96107
lines changed

CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.5.3.1 2015-09-30 11:34:00+0300
2+
* Updated Typescript to v1.6.2
3+
14
## v1.5.3.1 2015-09-02 11:28:00+0300
25
* Updated Typescript to v1.5.3
36
* Added support of different tsc.js path for 1.6 prerelease Typescript

lib/typescript-src.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ def tsc_path
2727

2828
# @return [Pathname]
2929
def js_path
30-
bin_tsc = typescript_path.join('bin/tsc.js')
30+
bin_tsc = typescript_path.join('lib/tsc.js')
3131
if ::File.exist?(bin_tsc)
3232
bin_tsc
3333
else
34-
typescript_path.join('lib/tsc.js')
34+
typescript_path.join('bin/tsc.js')
3535
end
3636
end
3737

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
root = true
3+
4+
[{src,scripts}/**.{ts,json,js}]
5+
end_of_line = crlf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.js linguist-language=TypeScript
2+
* -text
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
TypeScript is authored by:
2+
3+
* Adam Freidin
4+
* Ahmad Farid
5+
* Anders Hejlsberg
6+
* Arnav Singh
7+
* Arthur Ozga
8+
* Basarat Ali Syed
9+
* Ben Duffield
10+
* Bill Ticehurst
11+
* Bryan Forbes
12+
* Caitlin Potter
13+
* Chris Bubernak
14+
* Colby Russell
15+
* Colin Snover
16+
* Cyrus Najmabadi
17+
* Dan Quirk
18+
* Daniel Rosenwasser
19+
* David Li
20+
* Dick van den Brink
21+
* Dirk Bäumer
22+
* Frank Wallis
23+
* Gabriel Isenberg
24+
* Gilad Peleg
25+
* Guillaume Salles
26+
* Harald Niesche
27+
* Ingvar Stepanyan
28+
* Ivo Gabe de Wolff
29+
* James Whitney
30+
* Jason Freeman
31+
* Jason Ramsay
32+
* Jed Mao
33+
* Johannes Rieken
34+
* Jonathan Bond-Caron
35+
* Jonathan Park
36+
* Jonathan Turner
37+
* Josh Kalderimis
38+
* Kagami Sascha Rosylight
39+
* Keith Mashinter
40+
* Kenji Imamula
41+
* Lorant Pinter
42+
* Masahiro Wakame
43+
* Max Deepfield
44+
* Micah Zoltu
45+
* Mohamed Hegazy
46+
* Oleg Mihailik
47+
* Oleksandr Chekhovskyi
48+
* Paul van Brenk
49+
* Pedro Maltez
50+
* Philip Bulley
51+
* piloopin
52+
* Ron Buckton
53+
* Ryan Cavanaugh
54+
* Sheetal Nandi
55+
* Shengping Zhong
56+
* Shyyko Serhiy
57+
* Simon Hürlimann
58+
* Solal Pirelli
59+
* Stan Thomas
60+
* Steve Lucco
61+
* Tien Hoanhtien
62+
* Tingan Ho
63+
* togru
64+
* Tomas Grubliauskas
65+
* TruongSinh Tran-Nguyen
66+
* Vladimir Matveev
67+
* Wesley Wigham
68+
* Yui Tanglertsampan
69+
* Zev Spitz
70+
* Zhengbo Li
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,105 @@
1-
## Contributing bug fixes
2-
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.
3-
4-
## Contributing features
5-
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (marked as "Milestone == Community" by a TypeScript coordinator with the message "Approved") in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
6-
7-
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
8-
9-
## Legal
10-
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright.
11-
12-
Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to <[email protected]>. Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request. Please note that we're currently only accepting pull requests of bug fixes rather than new features.
13-
14-
## Housekeeping
15-
Your pull request should:
16-
17-
* Include a description of what your change intends to do
18-
* Be a child commit of a reasonably recent commit in the **master** branch
19-
* Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
20-
* It is desirable, but not necessary, for the tests to pass at each commit
21-
* Have clear commit messages
22-
* e.g. "Refactor feature", "Fix issue", "Add tests for issue"
23-
* Include adequate tests
24-
* At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why
25-
* Tests should include reasonable permutations of the target fix/change
26-
* Include baseline changes with your change
27-
* All changed code must have 100% code coverage
28-
* Follow the code conventions descriped in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
29-
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
30-
31-
## Running the Tests
32-
To run all tests, invoke the runtests target using jake:
33-
34-
`jake runtests`
35-
36-
This run will all tests; to run only a specific subset of tests, use:
37-
38-
`jake runtests tests=<regex>`
39-
40-
e.g. to run all compiler baseline tests:
41-
42-
`jake runtests tests=compiler`
43-
44-
or to run specifc test:tests\cases\compiler\2dArrays.ts
45-
46-
`jake runtests tests=2dArrays`
47-
48-
## Adding a Test
49-
To add a new testcase, simply place a .ts file in tests\cases\compiler containing code that exemplifies the bugfix or change you are making.
50-
51-
These files support metadata tags in the format // @name: value . The supported names and values are:
52-
53-
* comments, sourcemap, noimplicitany, declaration: true or false (corresponds to the compiler command-line options of the same name)
54-
* target: ES3 or ES5 (same as compiler)
55-
* out, outDir: path (same as compiler)
56-
* module: local, commonjs, or amd (local corresponds to not passing any compiler --module flag)
57-
58-
**Note** that if you have a test corresponding to a specific spec compliance item, you can place it in tests\cases\conformance in an appropriately-named subfolder.
59-
**Note** that filenames here must be distinct from all other compiler testcase names, so you may have to work a bit to find a unique name if it's something common.
60-
61-
## Managing the Baselines
62-
Compiler testcases generate baselines that track the emitted .js, the errors produced by the compiler, and the type of each expression in the file. Additionally, some testcases opt in to baselining the source map output.
63-
64-
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
65-
66-
`jake diff`
67-
68-
After verifying that the changes in the baselines are correct, run
69-
70-
`jake baseline-accept`
71-
72-
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.
73-
74-
**Note** that baseline-accept should only be run after a full test run! Accepting baselines after running a subset of tests will delete baseline files for the tests that didn't run.
1+
## Contributing bug fixes
2+
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.
3+
4+
## Contributing features
5+
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (marked as "Milestone == Community" by a TypeScript coordinator with the message "Approved") in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
6+
7+
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
8+
9+
## Legal
10+
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright.
11+
12+
Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to <[email protected]>. Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request. Please note that we're currently only accepting pull requests of bug fixes rather than new features.
13+
14+
## Housekeeping
15+
Your pull request should:
16+
17+
* Include a description of what your change intends to do
18+
* Be a child commit of a reasonably recent commit in the **master** branch
19+
* Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
20+
* It is desirable, but not necessary, for the tests to pass at each commit
21+
* Have clear commit messages
22+
* e.g. "Refactor feature", "Fix issue", "Add tests for issue"
23+
* Include adequate tests
24+
* At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why
25+
* Tests should include reasonable permutations of the target fix/change
26+
* Include baseline changes with your change
27+
* All changed code must have 100% code coverage
28+
* Follow the code conventions descriped in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
29+
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
30+
31+
## Running the Tests
32+
To run all tests, invoke the runtests target using jake:
33+
34+
```Shell
35+
jake runtests
36+
```
37+
38+
This run will all tests; to run only a specific subset of tests, use:
39+
40+
```Shell
41+
jake runtests tests=<regex>
42+
```
43+
44+
e.g. to run all compiler baseline tests:
45+
46+
```Shell
47+
jake runtests tests=compiler
48+
```
49+
50+
or to run specifc test: `tests\cases\compiler\2dArrays.ts`
51+
52+
```Shell
53+
jake runtests tests=2dArrays
54+
```
55+
56+
## Adding a Test
57+
To add a new testcase, simply place a `.ts` file in `tests\cases\compiler` containing code that exemplifies the bugfix or change you are making.
58+
59+
These files support metadata tags in the format `// @metaDataName: value`. The supported names and values are:
60+
61+
* `comments`, `sourcemap`, `noimplicitany`, `declaration`: true or false (corresponds to the compiler command-line options of the same name)
62+
* `target`: ES3 or ES5 (same as compiler)
63+
* `out`, outDir: path (same as compiler)
64+
* `module`: local, commonjs, or amd (local corresponds to not passing any compiler --module flag)
65+
* `fileName`: path
66+
* These tags delimit sections of a file to be used as separate compilation units. They are useful for tests relating to modules. See below for examples.
67+
68+
**Note** that if you have a test corresponding to a specific spec compliance item, you can place it in `tests\cases\conformance` in an appropriately-named subfolder.
69+
**Note** that filenames here must be distinct from all other compiler testcase names, so you may have to work a bit to find a unique name if it's something common.
70+
71+
### Tests for multiple files
72+
73+
When one needs to test for scenarios which require multiple files, it is useful to use the `fileName` metadata tag as such:
74+
75+
```TypeScript
76+
// @fileName: file1.ts
77+
export function f() {
78+
}
79+
80+
// @fileName: file2.ts
81+
import { f as g } from "file1";
82+
83+
var x = g();
84+
```
85+
86+
One can also write a project test, but it is slightly more involved.
87+
88+
## Managing the Baselines
89+
Compiler testcases generate baselines that track the emitted `.js`, the errors produced by the compiler, and the type of each expression in the file. Additionally, some testcases opt in to baselining the source map output.
90+
91+
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
92+
93+
```Shell
94+
jake diff
95+
```
96+
97+
After verifying that the changes in the baselines are correct, run
98+
99+
```Shell
100+
jake baseline-accept
101+
```
102+
103+
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.
104+
105+
**Note** that baseline-accept should only be run after a full test run! Accepting baselines after running a subset of tests will delete baseline files for the tests that didn't run.

0 commit comments

Comments
 (0)