Skip to content

Commit d4a534b

Browse files
committed
Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28086
2 parents 7eff4b2 + c5ee5ea commit d4a534b

File tree

2,633 files changed

+147718
-252849
lines changed

Some content is hidden

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

2,633 files changed

+147718
-252849
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please fill in the *entire* template below.
1616
-->
1717

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

2121
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
2222
**Search Terms:**

.github/ISSUE_TEMPLATE/Feature_request.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ What shortcomings exist with current approaches?
3232
## Checklist
3333

3434
My suggestion meets these guidelines:
35-
* [ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
35+
36+
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
3637
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
3738
* [ ] This could be implemented without emitting different JS based on the types of the expressions
38-
* [ ] This isn't a runtime feature (e.g. new expression-level syntax)
39+
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
40+
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
3941

CONTRIBUTING.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,26 @@ Your pull request should:
8282
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
8383

8484
## Contributing `lib.d.ts` fixes
85-
86-
The library sources are in: [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib)
8785

88-
Library files in `built/local/` are updated by running
89-
```Shell
86+
There are three relevant locations to be aware of when it comes to TypeScript's library declaration files:
87+
88+
* `src/lib`: the location of the sources themselves.
89+
* `lib`: the location of the last-known-good (LKG) versions of the files which are updated periodically.
90+
* `built/local`: the build output location, including where `src/lib` files will be copied to.
91+
92+
Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib). **Most** of these files can be updated by hand, with the exception of any generated files (see below).
93+
94+
Library files in `built/local/` are updated automatically by running the standard build task:
95+
96+
```sh
9097
jake
9198
```
9299

93-
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
100+
The files in `lib/` are used to bootstrap compilation and usually **should not** be updated unless publishing a new version or updating the LKG.
94101

95-
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
102+
### Modifying generated library files
96103

97-
These two files represent the DOM typings and are auto-generated. To make any modifications to them, please submit a PR to https://github.com/Microsoft/TSJS-lib-generator
104+
The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` both represent type declarations for the DOM and are auto-generated. To make any modifications to them, you will have to direct changes to https://github.com/Microsoft/TSJS-lib-generator
98105

99106
## Running the Tests
100107

@@ -137,10 +144,10 @@ You can specify which browser to use for debugging. Currently Chrome and IE are
137144
jake runtests-browser tests=2dArrays browser=chrome
138145
```
139146

140-
You can debug with VS Code or Node instead with `jake runtests debug=true`:
147+
You can debug with VS Code or Node instead with `jake runtests inspect=true`:
141148

142149
```Shell
143-
jake runtests tests=2dArrays debug=true
150+
jake runtests tests=2dArrays inspect=true
144151
```
145152

146153
## Adding a Test
@@ -153,7 +160,7 @@ The supported names and values are the same as those supported in the compiler i
153160
They are useful for tests relating to modules.
154161
See below for examples.
155162

156-
**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.
163+
**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.
157164
**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.
158165

159166
### Tests for multiple files

Gulpfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const exec = require("./scripts/build/exec");
2626
const browserify = require("./scripts/build/browserify");
2727
const prepend = require("./scripts/build/prepend");
2828
const { removeSourceMaps } = require("./scripts/build/sourcemaps");
29-
const { CancellationTokenSource, CancelError, delay, Semaphore } = require("prex");
29+
const { CancellationTokenSource, CancelError, delay, Semaphore } = require("prex");
3030
const { libraryTargets, generateLibs } = require("./scripts/build/lib");
3131
const { runConsoleTests, cleanTestDirs, writeTestConfigFile, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require("./scripts/build/tests");
3232

@@ -117,7 +117,8 @@ const generatedLCGFile = "built/local/enu/diagnosticMessages.generated.json.lcg"
117117
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
118118
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
119119
*/
120-
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"]
120+
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]
121+
.map(f => f.toLowerCase())
121122
.map(f => `built/local/${f}/diagnosticMessages.generated.json`)
122123
.concat(generatedLCGFile);
123124

Jakefile.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ else if (process.env.PATH !== undefined) {
2424

2525
const host = process.env.TYPESCRIPT_HOST || process.env.host || "node";
2626

27-
const locales = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-TW"];
28-
2927
const defaultTestTimeout = 40000;
3028

3129
let useDebugMode = true;
@@ -147,14 +145,14 @@ task(TaskNames.local, [
147145
task("default", [TaskNames.local]);
148146

149147
const RunTestsPrereqs = [TaskNames.lib, Paths.servicesDefinitionFile, Paths.typescriptDefinitionFile, Paths.tsserverLibraryDefinitionFile];
150-
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true.");
148+
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... i[nspect]=true.");
151149
task(TaskNames.runtestsParallel, RunTestsPrereqs, function () {
152150
tsbuild([ConfigFileFor.runjs], true, () => {
153151
runConsoleTests("min", /*parallel*/ true);
154152
});
155153
}, { async: true });
156154

157-
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true.");
155+
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... i[nspect]=true.");
158156
task(TaskNames.runtests, RunTestsPrereqs, function () {
159157
tsbuild([ConfigFileFor.runjs], true, () => {
160158
runConsoleTests('mocha-fivemat-progress-reporter', /*runInParallel*/ false);
@@ -520,7 +518,6 @@ function runConsoleTests(defaultReporter, runInParallel) {
520518
}
521519

522520
let testTimeout = process.env.timeout || defaultTestTimeout;
523-
const debug = process.env.debug || process.env["debug-brk"] || process.env.d;
524521
const inspect = process.env.inspect || process.env["inspect-brk"] || process.env.i;
525522
const runners = process.env.runners || process.env.runner || process.env.ru;
526523
const tests = process.env.test || process.env.tests || process.env.t;
@@ -710,19 +707,6 @@ const Travis = {
710707
}
711708
};
712709

713-
function buildLocalizedTargets() {
714-
/**
715-
* The localization target produces the two following transformations:
716-
* 1. 'src\loc\lcl\<locale>\diagnosticMessages.generated.json.lcl' => 'built\local\<locale>\diagnosticMessages.generated.json'
717-
* convert localized resources into a .json file the compiler can understand
718-
* 2. 'src\compiler\diagnosticMessages.generated.json' => 'built\local\ENU\diagnosticMessages.generated.json.lcg'
719-
* generate the lcg file (source of messages to localize) from the diagnosticMessages.generated.json
720-
*/
721-
const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]
722-
.map(f => path.join(Paths.builtLocal,f))
723-
.concat(path.dirname(Paths.generatedLCGFile));
724-
}
725-
726710
function toNs(diff) {
727711
return diff[0] * 1e9 + diff[1];
728712
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
2929
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
3030
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
3131
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
32-
* Join the [#typescript](https://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
32+
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
3333
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
3434
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
3535
[pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).

0 commit comments

Comments
 (0)