You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-5
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,21 @@
1
1
## Contributing bug fixes
2
+
2
3
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
4
5
## Contributing features
6
+
5
7
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
8
7
9
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
8
10
9
11
## Legal
12
+
10
13
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
14
12
15
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 <cla@microsoft.com>. Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request.
13
16
14
17
## Housekeeping
18
+
15
19
Your pull request should:
16
20
17
21
* Include a description of what your change intends to do
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.
79
84
80
85
These files support metadata tags in the format `// @metaDataName: value`. The supported names and values are:
81
86
82
-
*`comments`, `sourcemap`, `noimplicitany`, `declaration`: true or false (corresponds to the compiler command-line options of the same name)
83
-
*`target`: ES3or ES5 (same as compiler)
84
-
*`out`, outDir: path (same as compiler)
85
-
*`module`: local, commonjs, or amd(local corresponds to not passing any compiler --module flag)
87
+
*`comments`, `sourcemap`, `noimplicitany`, `declaration`: `true` or `false` (corresponds to the compiler command-line options of the same name)
88
+
*`target`: `ES3`, `ES5`, `ES6`, `ES2015`, or `ES7` (same as compiler)
89
+
*`outFile`, `out`, `outDir`: path (same as compiler)
90
+
*`module`: `local`, `commonjs`, or `amd`, `umd`, `system`, `es6`(local corresponds to not passing any compiler `--module` flag)
86
91
*`fileName`: path
87
92
* 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.
88
93
@@ -107,6 +112,7 @@ var x = g();
107
112
One can also write a project test, but it is slightly more involved.
108
113
109
114
## Managing the Baselines
115
+
110
116
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.
111
117
112
118
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
@@ -123,4 +129,4 @@ jake baseline-accept
123
129
124
130
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.
125
131
126
-
**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.
132
+
**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