Skip to content

Commit 7be3922

Browse files
committed
Inline Function (#31)
1 parent 84076a5 commit 7be3922

File tree

156 files changed

+3611
-1347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+3611
-1347
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Here's a checklist you might find useful.
55
* [ ] There is an associated issue that is labeled
66
'Bug' or 'help wanted' or is in the Community milestone
77
* [ ] Code is up-to-date with the `master` branch
8-
* [ ] You've successfully run `jake runtests` locally
8+
* [ ] You've successfully run `gulp runtests` locally
99
* [ ] You've signed the CLA
1010
* [ ] There are new or updated unit tests validating the change
1111

CONTRIBUTING.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The TypeScript repository is relatively large. To save some time, you might want
5555

5656
### Using local builds
5757

58-
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`.
58+
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`.
5959

6060
## Contributing bug fixes
6161

@@ -104,7 +104,7 @@ Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/
104104
Library files in `built/local/` are updated automatically by running the standard build task:
105105

106106
```sh
107-
jake
107+
gulp
108108
```
109109

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

116116
## Running the Tests
117117

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

120120
```Shell
121-
jake runtests-parallel
121+
gulp runtests-parallel
122122
```
123123

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

126126
```Shell
127-
jake runtests tests=<regex>
127+
gulp runtests --tests=<regex>
128128
```
129129

130130
e.g. to run all compiler baseline tests:
131131

132132
```Shell
133-
jake runtests tests=compiler
133+
gulp runtests --tests=compiler
134134
```
135135

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

138138
```Shell
139-
jake runtests tests=2dArrays
139+
gulp runtests --tests=2dArrays
140140
```
141141

142142
## Debugging the tests
143143

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

147147
```Shell
148-
jake runtests-browser tests=2dArrays
148+
gulp runtests-browser --tests=2dArrays
149149
```
150150

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

153153
```Shell
154-
jake runtests-browser tests=2dArrays browser=chrome
154+
gulp runtests-browser --tests=2dArrays --browser=chrome
155155
```
156156

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

159159
```Shell
160-
jake runtests tests=2dArrays inspect=true
160+
gulp runtests --tests=2dArrays --inspect=true
161161
```
162162

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

199199
```Shell
200-
jake diff
200+
gulp diff
201201
```
202202

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

205205
```Shell
206-
jake baseline-accept
206+
gulp baseline-accept
207207
```
208208

209209
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.
210210

211211
## Localization
212212

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

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

Gulpfile.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ task("watch-tsserver").flags = {
232232
" --built": "Compile using the built version of the compiler."
233233
}
234234

235-
task("min", series(lkgPreBuild, parallel(buildTsc, buildServer)));
235+
task("min", series(preBuild, parallel(buildTsc, buildServer)));
236236
task("min").description = "Builds only tsc and tsserver";
237237
task("min").flags = {
238238
" --built": "Compile using the built version of the compiler."
@@ -375,7 +375,7 @@ task("lint").flags = {
375375

376376
const buildFoldStart = async () => { if (fold.isTravis()) console.log(fold.start("build")); };
377377
const buildFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("build")); };
378-
task("local", series(buildFoldStart, lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd));
378+
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd));
379379
task("local").description = "Builds the full compiler and services";
380380
task("local").flags = {
381381
" --built": "Compile using the built version of the compiler."
@@ -473,22 +473,23 @@ task("diff").description = "Diffs the compiler baselines using the diff tool spe
473473
task("diff-rwc", () => exec(getDiffTool(), [refRwcBaseline, localRwcBaseline], { ignoreExitCode: true }));
474474
task("diff-rwc").description = "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable";
475475

476-
const baselineAccept = subfolder => merge2(
477-
src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**`, `!${localBaseline}${subfolder}/**/*.delete`], { base: localBaseline })
476+
/**
477+
* @param {string} localBaseline Path to the local copy of the baselines
478+
* @param {string} refBaseline Path to the reference copy of the baselines
479+
*/
480+
const baselineAccept = (localBaseline, refBaseline) => merge2(
481+
src([`${localBaseline}/**`, `!${localBaseline}/**/*.delete`], { base: localBaseline })
478482
.pipe(dest(refBaseline)),
479-
src([`${localBaseline}${subfolder ? `${subfolder}/` : ``}**/*.delete`], { base: localBaseline, read: false })
483+
src([`${localBaseline}/**/*.delete`], { base: localBaseline, read: false })
480484
.pipe(rm())
481485
.pipe(rename({ extname: "" }))
482486
.pipe(rm(refBaseline)));
483-
task("baseline-accept", () => baselineAccept(""));
487+
task("baseline-accept", () => baselineAccept(localBaseline, refBaseline));
484488
task("baseline-accept").description = "Makes the most recent test results the new baseline, overwriting the old baseline";
485489

486-
task("baseline-accept-rwc", () => baselineAccept("rwc"));
490+
task("baseline-accept-rwc", () => baselineAccept(localRwcBaseline, refRwcBaseline));
487491
task("baseline-accept-rwc").description = "Makes the most recent rwc test results the new baseline, overwriting the old baseline";
488492

489-
task("baseline-accept-test262", () => baselineAccept("test262"));
490-
task("baseline-accept-test262").description = "Makes the most recent test262 test results the new baseline, overwriting the old baseline";
491-
492493
// TODO(rbuckton): Determine if 'webhost' is still in use.
493494
const buildWebHost = () => buildProject("tests/webhost/webtsc.tsconfig.json");
494495
task("webhost", series(lkgPreBuild, buildWebHost));

0 commit comments

Comments
 (0)