Skip to content

[Transforms] Merge master 06/06/2016 #8991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 224 commits into from
Jun 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
20d8a94
Remove check narrowing only certain types, add test showing issues wi…
weswigham Feb 25, 2016
a2feb0e
string literal case test
weswigham Mar 11, 2016
92bf91d
Reconcile fix with CFA work
weswigham Apr 26, 2016
73d4aae
Defaultable -> NotNarrowable to align with use
weswigham Apr 26, 2016
70733da
Missed a defaultable in comments
weswigham Apr 26, 2016
a80529b
Add test for narrowing to unions of string literals
weswigham Apr 26, 2016
21587aa
Rewrite isInStringLiteral to accomodate for unterminated strings
mhegazy May 2, 2016
0a277a1
Refactor signatureHelp to expose helper functions
mhegazy May 2, 2016
060f2a8
Add support for completion in string literals
mhegazy May 2, 2016
7b0d664
Remove unused check
mhegazy May 2, 2016
4464a41
Merge branch 'master' into stringLiteralCompletions
mhegazy May 3, 2016
291ad33
Use const instead of let
mhegazy May 3, 2016
e5a32b7
Fix error
mhegazy May 3, 2016
02f30ff
Formatting changes
mhegazy May 3, 2016
b9ab4d3
Use shorthand properties
mhegazy May 3, 2016
f657e3c
Merge branch 'master' into stringLiteralCompletions
mhegazy May 8, 2016
81ee968
Add failing test for #8738
evansb May 22, 2016
63291d1
Sort baseline reference identifier by name
evansb May 22, 2016
9a4b6ab
Detects assignment to internal module export clause, fixes #8738
evansb May 22, 2016
4e415eb
add SharedArrayBuffer
YuichiNukiyama May 23, 2016
269ebda
Factor out assignment op check
evansb May 23, 2016
ec60ac9
Add test for composite assignment
evansb May 23, 2016
ebd4ce6
Factor out the behaviour and handles x++ and ++x
evansb May 23, 2016
f1ac06f
Handles ES3 default as identifier name
evansb May 23, 2016
eca9437
Fix missing else statement
evansb May 23, 2016
47eac4f
isNameOfExportedDeclarationInNonES6Module
evansb May 24, 2016
3b7814b
Reorder options alphabetically
mhegazy May 27, 2016
5d9c871
Mark diagnostics, and skipDefaultLibCheck as internal
mhegazy May 27, 2016
fa16a99
Allow an import of "foo.js" to be matched by a file "foo.ts"
May 31, 2016
a0546a9
Improve loadModuleFromFile code
May 31, 2016
f4d6b67
Respond to PR comments
May 31, 2016
d4b8889
Respond to more PR comments
May 31, 2016
9179f4c
Fix test
Jun 1, 2016
d111a0f
Merge branch 'master' into narrow-all-types
sandersn Jun 1, 2016
9a620bf
Actually merge from master
sandersn Jun 1, 2016
9575b3c
Revert to old tryLoad implementation
Jun 1, 2016
0e96c5e
Run fixupParentReferences when parsing isolated jsDocComment
zhengbli Jun 2, 2016
92177be
initial revision of unit test support for project system in tsserver
vladima Jun 2, 2016
3b19825
Allow wildcard ("*") patterns in ambient module declarations
Jun 2, 2016
2517238
Add non-widening forms of null and undefined
ahejlsberg Jun 2, 2016
5f3f2d3
Create separate control flows for property declarations with initiali…
ahejlsberg Jun 2, 2016
706683d
Add regression test
ahejlsberg Jun 2, 2016
4281bf5
Allow trailing commas in function parameter and argument lists
Jun 2, 2016
9f087cb
Merge pull request #8941 from Microsoft/controlFlowPropertyDeclarations
ahejlsberg Jun 2, 2016
20bab14
Add tests
ahejlsberg Jun 2, 2016
ef0f6c8
Merge pull request #7235 from weswigham/narrow-all-types
sandersn Jun 2, 2016
fb2df77
Remove unused variable
ahejlsberg Jun 2, 2016
7e00d7e
Merge pull request #8931 from Microsoft/tsserver-projectsystem-tests
vladima Jun 2, 2016
d41ac8a
Add null check and CR feedback
zhengbli Jun 2, 2016
7e9cb46
Support shorthand ambient module declarations
Jun 2, 2016
fc3e040
Revert "Merge pull request #7235 from weswigham/narrow-all-types"
sandersn Jun 2, 2016
e2a1a78
reuse the fixupParentReferences function
zhengbli Jun 2, 2016
24f15a4
Merge pull request #8946 from Microsoft/revert-narrow-all-types
sandersn Jun 2, 2016
131f759
Merge pull request #8930 from zhengbli/i8676
zhengbli Jun 2, 2016
3853555
Merge pull request #8944 from Microsoft/reviseWidening
ahejlsberg Jun 2, 2016
bcc9220
Improve typing of && operator with --strictNullChecks
ahejlsberg Jun 3, 2016
13698a9
Add test
ahejlsberg Jun 3, 2016
094f97e
Respond to PR comments
Jun 3, 2016
1541ebe
Respond to PR comments
Jun 3, 2016
ed6bfcd
Add merging tests
Jun 3, 2016
c8ced67
Use a function `stringify` to simplify calls to `JSON.stringify(xyz, …
Jun 3, 2016
8b0974a
Update tests
Jun 3, 2016
2bed32d
Fix mistake
Jun 3, 2016
e412f52
Include indent in navigation bar protocol
Jun 3, 2016
baebf2b
Merge pull request #8959 from Microsoft/stringify
Jun 3, 2016
3aaa4ea
Merge pull request #8957 from Microsoft/navbar_indent
Jun 3, 2016
39c4e8a
Remove unnecessary restrictions in property access narrowing
ahejlsberg Jun 4, 2016
a5e9071
Fix fourslash test
ahejlsberg Jun 4, 2016
87ee72b
Add regression test
ahejlsberg Jun 4, 2016
6dcd587
Merge pull request #8962 from Microsoft/propertyAccessNarrowing
ahejlsberg Jun 4, 2016
bb7818b
Consider property declarations to be control flow containers
ahejlsberg Jun 4, 2016
3b1effb
Adding regression test
ahejlsberg Jun 4, 2016
18a8758
Remove restriction on --target es5 and --module es6
mhegazy Jun 5, 2016
f5ab9d7
change type definition for Object.create
plantain-00 Jun 5, 2016
2fc2f5c
Fix signature help
Jun 6, 2016
f832488
Add "implicit any" warning for shorthand ambient modules
Jun 6, 2016
543b484
Remove trailing whitespace
Jun 3, 2016
13ddc34
Merge pull request #8979 from Microsoft/trailing_whitespace
Jun 6, 2016
447e583
Merge pull request #8974 from plantain-00/change_type_definition_for_…
mhegazy Jun 6, 2016
d9ec512
Support using string values in enums for CompilerOptions in transpile…
Jun 6, 2016
e05e112
Remove trailing whitespace in jakefile
Jun 6, 2016
1cbcdaf
Merge branch 'master' into transforms_mergemaster
Jun 6, 2016
52138e0
Make `jake runtests-browser` support test regexes with spaces
Jun 6, 2016
f215ac9
Add another test
Jun 6, 2016
a918730
factor out isJsxOrTsxExtension
Jun 6, 2016
cd1b9f0
Merge pull request #8989 from Microsoft/jakefile_whitespace
Jun 6, 2016
704f987
Move to a conformance test
Jun 6, 2016
9761c3b
Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-ty…
weswigham Jun 6, 2016
26b1ab4
Use inclusive flag, as originally done, but include almost everything
weswigham Jun 6, 2016
693cb9c
Add additional tests
Jun 6, 2016
2918c18
Merge pull request #8992 from Microsoft/runtests-browser-spaces
Jun 6, 2016
1fe8a08
Respond to PR comments
Jun 6, 2016
941c863
Fix typo
Jun 6, 2016
bfafecc
Merge pull request #8993 from weswigham/refix-primitive-narrowing
sandersn Jun 6, 2016
52d8a78
Merge pull request #8970 from Microsoft/propertyControlFlow
ahejlsberg Jun 7, 2016
3052913
add tests for tsserver project system
zhengbli Jun 7, 2016
53a5b42
Merge pull request #8994 from Microsoft/typo
Jun 7, 2016
ed48e58
Fix test
Jun 7, 2016
849ab7c
Merge pull request #8942 from Microsoft/param_trailing_commas
Jun 7, 2016
843aa6c
Allow case comparison to undefined and null in strict null checking mode
sandersn Jun 7, 2016
b4f1214
Remove incorrectly added tests
sandersn Jun 7, 2016
715ca12
Merge branch 'master' into transforms_mergemaster
Jun 7, 2016
5fef080
Merge pull request #9003 from Microsoft/caseUndefinedAndNull
sandersn Jun 7, 2016
d941177
check if moduleResolution when verifying that program can be reused
vladima Jun 7, 2016
6913c32
Merge pull request #9009 from Microsoft/reusing-program-missing-check
vladima Jun 7, 2016
37949a3
more tests for module resolution change and exclude
zhengbli Jun 7, 2016
78792df
Fix linting issues
zhengbli Jun 7, 2016
17cc206
Merge JSDoc of assignments from function expressions
sandersn Jun 7, 2016
8b7fb8e
Merge pull request #8739 from evansb/fix-8738
vladima Jun 7, 2016
6a243e3
Allow nested assignments in type guards
ahejlsberg Jun 8, 2016
cdf5b7a
Add tests
ahejlsberg Jun 8, 2016
cdf4cde
Merge pull request #9002 from zhengbli/moreTsserverTests
zhengbli Jun 8, 2016
6bf5f11
Improve order of parameter's merged jsdoc
sandersn Jun 8, 2016
65bbeb1
Force LF newlines for LKG builds/non debug builds
DickvdBrink Jun 8, 2016
d694146
Merge branch 'master' into transforms_mergemaster
Jun 8, 2016
83971d0
Create intersection types in type guards for unrelated types
ahejlsberg Jun 8, 2016
9832f62
Split commentsFunction test into expr/decl
sandersn Jun 8, 2016
1fe6626
Remove TODO comments
sandersn Jun 8, 2016
ea1bdff
Accept new baselines
ahejlsberg Jun 8, 2016
a57ee29
Add tests
ahejlsberg Jun 8, 2016
404650d
Merge pull request #9026 from DickvdBrink/lkg-newlines
mhegazy Jun 8, 2016
97270ce
Merge branch 'master' into reorderOptions
mhegazy Jun 8, 2016
7eb5f4b
Remove comments
mhegazy Jun 8, 2016
179d423
Merge pull request #9010 from Microsoft/merge-jsdoc-of-assignment-and…
sandersn Jun 8, 2016
d8667ae
Fix test helper
Jun 8, 2016
9027da4
Merge branch 'master' into stringLiteralCompletions
mhegazy Jun 8, 2016
899f667
Recognize relative path using in outDir property (#9025)
yuit Jun 8, 2016
cc5dd5b
Add comments
mhegazy Jun 8, 2016
d36d2b3
Merge pull request #8771 from YuichiNukiyama/fix8505
mhegazy Jun 8, 2016
6b8109a
Merge pull request #8850 from Microsoft/reorderOptions
mhegazy Jun 8, 2016
9fac99e
Add test case
sandersn Jun 8, 2016
17b5415
Merge pull request #8428 from Microsoft/stringLiteralCompletions
mhegazy Jun 8, 2016
de8ddd6
Return trace when exception happens
zhengbli Jun 8, 2016
1ebb85a
Merge branch 'master' into transforms_mergemaster
Jun 8, 2016
5a0ae4a
Remove Long-Done TODO
weswigham Jun 8, 2016
8f39f05
Merge pull request #9032 from zhengbli/printTrace
zhengbli Jun 8, 2016
7c1b28f
Allow primitive type guards with typeof on right
sandersn Jun 8, 2016
11377f9
Primitive type guards are now order independent
sandersn Jun 8, 2016
454ab50
Merge pull request #9035 from weswigham/patch-6
weswigham Jun 8, 2016
aeb1d97
Merge pull request #8949 from Microsoft/strictNullLogicalAnd
ahejlsberg Jun 8, 2016
b3c5c1d
Merge pull request #9013 from Microsoft/typeGuardNestedAssignment
ahejlsberg Jun 8, 2016
d182a59
Fix comments in tests
ahejlsberg Jun 8, 2016
8360bc7
Add handleing for classes
mhegazy Jun 8, 2016
33137f6
Add more tests for target=es5 module=es6
mhegazy Jun 8, 2016
6446827
addExportToArgumentListKind
mhegazy Jun 8, 2016
e7954cc
Merge branch 'transforms' into transforms_mergemaster
Jun 9, 2016
f42d8b8
Accept baseline
mhegazy Jun 9, 2016
475c1c2
Add more tests
mhegazy Jun 9, 2016
82505ea
Merge pull request #9040 from Microsoft/addExportToArgumentListKind
mhegazy Jun 9, 2016
f74a41a
wip-fixing transforms
Jun 9, 2016
19baf1f
Adds progress indicators to the runtests-parallel build task.
rbuckton Jun 9, 2016
8fc3422
Fixed typo
rbuckton Jun 9, 2016
b1a7498
Fix comment
ahejlsberg Jun 9, 2016
c14d711
Merge pull request #9043 from Microsoft/parallelTestProgress
rbuckton Jun 9, 2016
9e12290
Merge pull request #9031 from Microsoft/typeGuardIntersectionTypes
ahejlsberg Jun 9, 2016
0aa2fe3
Add test for out-of-range error
Jun 9, 2016
b08fe6f
Use proper method of not resolving alias
Jun 9, 2016
9ef9b74
Fix module loading error
Jun 9, 2016
59d27ed
Port 8739
Jun 9, 2016
c404ea7
Merge branch 'transforms_mergemaster' of https://github.com/Microsoft…
Jun 9, 2016
75b8293
Merge pull request #8988 from Microsoft/transpile_options
Jun 9, 2016
3ab1e27
Update tests
Jun 9, 2016
d36d9a3
Merge branch 'master' into transforms_mergemaster
Jun 9, 2016
06300e2
Update baselines
Jun 9, 2016
7a2ef42
Contextually type return statement in async function
Jun 9, 2016
3492542
Remove stale files
mhegazy Jun 9, 2016
5e72b8a
Undo change
Jun 9, 2016
03371c0
Improve perf
Jun 9, 2016
559b49b
Improve tests
Jun 9, 2016
3954e99
Merge pull request #9056 from Microsoft/async_function_return_type
Jun 9, 2016
512c671
Merge pull request #8895 from Microsoft/strip_extension
Jun 9, 2016
75c1d77
Merge branch 'master' into shorthand_ambient_module
Jun 9, 2016
88be1ac
Fix sourcemaps for debugging tests
weswigham Jun 9, 2016
b521fd5
Allow --sourceRoot with --inlineSources option
sheetalkamat Jun 9, 2016
0c64b0c
this in parameter initializers resolves to class
sandersn Jun 9, 2016
302cea8
Merge pull request #9054 from Microsoft/quick_info_meaning
Jun 9, 2016
9fa9710
Add tests for more kinds of import/export
Jun 9, 2016
a88366d
Merge branch 'master' into shorthand_ambient_module
Jun 9, 2016
9ffd00d
Merge pull request #8939 from Microsoft/pattern_ambient_modules
Jun 9, 2016
d0f669e
Merge pull request #9059 from Microsoft/remove-tsservicesinbrowser
weswigham Jun 9, 2016
574a64d
Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)
yuit Jun 9, 2016
e307295
Resolve function-this in parameter initialisers when explicitly provided
sandersn Jun 9, 2016
a4991b9
Merge pull request #9057 from Microsoft/sourceRootWithInlineSources
sheetalkamat Jun 9, 2016
a1e4b31
Allow null/undefined guard with null/undefined on left
sandersn Jun 9, 2016
f0a430a
Code review comments
mhegazy Jun 9, 2016
86a6959
Merge branch 'master' into primitive-type-guards-are-order-independent
sandersn Jun 9, 2016
2b46656
Merge pull request #9061 from Microsoft/fix-this-resolution-in-parame…
sandersn Jun 9, 2016
6923cba
Update more diagnostic messages ES6->2015
texastoland Jun 10, 2016
5af8ba8
Fixes an issue with runtests-parallel when global mocha is not instal…
rbuckton Jun 10, 2016
a1e4135
Merge pull request #9066 from Microsoft/fixRuntestsParallel
rbuckton Jun 10, 2016
6687f2c
Merge pull request #9065 from AppShipIt/8996-es6-diagnostic-messages
mhegazy Jun 10, 2016
e6eb36e
Update LKG
mhegazy Jun 10, 2016
ff6e025
Merge branch 'master' into shorthand_ambient_module
Jun 10, 2016
d973f4d
Merge branch 'master' into shorthand_ambient_module
Jun 10, 2016
077dfff
Add tests
Jun 10, 2016
71b7d44
Merge pull request #8945 from Microsoft/shorthand_ambient_module
Jun 10, 2016
97d7aa5
Merge pull request #9042 from Microsoft/ES6ModulesES5Target
mhegazy Jun 10, 2016
5ae0602
fix baselines
vladima Jun 10, 2016
72d64e1
Merge pull request #9084 from Microsoft/fixBaselines
vladima Jun 10, 2016
b027b4f
Recommend runtests-parallel in CONTRIBUTING
sandersn Jun 10, 2016
ccd4552
Merge pull request #9089 from Microsoft/recommend-runtests-parallel-i…
sandersn Jun 10, 2016
81d1ccf
Only inlineSourceMap when debugging through jake-browser (#9080)
yuit Jun 11, 2016
7a022ee
Manually port tests from PR 8470
Jun 11, 2016
6153422
minor fix: add missing return clause
plantain-00 Jun 13, 2016
d4b0dc8
Support using string values in enums for CompilerOptions in transpile…
Jun 6, 2016
cbd72fc
Support using string values in enums for CompilerOptions in transpile…
Jun 13, 2016
9afb10c
Fix test helper
Jun 8, 2016
64f875c
Add test for out-of-range error
Jun 9, 2016
121ab44
Fix module loading error
Jun 9, 2016
fb050f1
Use camel-case instead of snake-case (#9134)
yuit Jun 13, 2016
6f63799
Merge pull request #9129 from plantain-00/minor_fix_add_missing_retur…
mhegazy Jun 13, 2016
34c3f68
Manually add tests for PR 8988
Jun 13, 2016
784b841
Allow wildcard ("*") patterns in ambient module declarations
Jun 2, 2016
d44ae78
Respond to PR comments
Jun 3, 2016
28014a2
Add another test
Jun 6, 2016
abf33f6
Improve perf
Jun 9, 2016
e5a197f
Improve tests
Jun 9, 2016
8b09312
Merge pull request #9036 from Microsoft/primitive-type-guards-are-ord…
sandersn Jun 13, 2016
cad23ad
Merge branch 'master' into transforms_mergemaster
Jun 13, 2016
9c8aa62
Update baseline from merging with master
Jun 13, 2016
d5d2f8c
Address PR comment
Jun 13, 2016
9415385
Update baseline
Jun 13, 2016
55c5ab7
Refactor how we retrieve binding-name cache in module transformer
Jun 13, 2016
9752699
Temporary accept so we get a clean run-tests result
Jun 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ tests/webhost/*.d.ts
tests/webhost/webtsc.js
tests/cases/**/*.js
tests/cases/**/*.js.map
tests/cases/**/*.d.ts
*.config
scripts/debug.bat
scripts/run.bat
Expand All @@ -51,3 +50,4 @@ internal/
**/.vs
**/.vscode
!**/.vscode/tasks.json
!tests/cases/projects/projectOption/**/node_modules
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ These two files represent the DOM typings and are auto-generated. To make any mo

## Running the Tests

To run all tests, invoke the `runtests` target using jake:
To run all tests, invoke the `runtests-parallel` target using jake:

```Shell
jake runtests
jake runtests-parallel
```

This run will all tests; to run only a specific subset of tests, use:
Expand Down
119 changes: 65 additions & 54 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var os = require("os");
var path = require("path");
var child_process = require("child_process");
var Linter = require("tslint");
var runTestsInParallel = require("./scripts/mocha-parallel").runTestsInParallel;

// Variables
var compilerDirectory = "src/compiler/";
Expand Down Expand Up @@ -212,7 +213,10 @@ var es2016LibrarySourceMap = es2016LibrarySource.map(function (source) {
return { target: "lib." + source, sources: ["header.d.ts", source] };
});

var es2017LibrarySource = ["es2017.object.d.ts"];
var es2017LibrarySource = [
"es2017.object.d.ts",
"es2017.sharedmemory.d.ts"
];

var es2017LibrarySourceMap = es2017LibrarySource.map(function (source) {
return { target: "lib." + source, sources: ["header.d.ts", source] };
Expand Down Expand Up @@ -296,6 +300,7 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
* @param {boolean} opts.noResolve: true if compiler should not include non-rooted files in compilation
* @param {boolean} opts.stripInternal: true if compiler should remove declarations marked as @internal
* @param {boolean} opts.noMapRoot: true if compiler omit mapRoot option
* @param {boolean} opts.inlineSourceMap: true if compiler should inline sourceMap
* @param callback: a function to execute after the compilation process ends
*/
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts, callback) {
Expand Down Expand Up @@ -337,10 +342,16 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
}

if (useDebugMode) {
options += " -sourcemap";
if (!opts.noMapRoot) {
options += " -mapRoot file:///" + path.resolve(path.dirname(outFile));
if (opts.inlineSourceMap) {
options += " --inlineSourceMap --inlineSources";
} else {
options += " -sourcemap";
if (!opts.noMapRoot) {
options += " -mapRoot file:///" + path.resolve(path.dirname(outFile));
}
}
} else {
options += " --newLine LF";
}

if (opts.stripInternal) {
Expand Down Expand Up @@ -517,7 +528,13 @@ var nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_s
compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources),
/*prefixes*/ [copyright],
/*useBuiltCompiler*/ true,
{ noOutFile: false, generateDeclarations: true, preserveConstEnums: true, keepComments: true, noResolve: false, stripInternal: true },
/*opts*/ { noOutFile: false,
generateDeclarations: true,
preserveConstEnums: true,
keepComments: true,
noResolve: false,
stripInternal: true
},
/*callback*/ function () {
jake.cpR(servicesFile, nodePackageFile, {silent: true});

Expand All @@ -540,16 +557,21 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
});

compileFile(servicesFileInBrowserTest, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources),
/*prefixes*/ [copyright],
/*useBuiltCompiler*/ true,
{ noOutFile: false, generateDeclarations: true, preserveConstEnums: true, keepComments: true, noResolve: false, stripInternal: true, noMapRoot: true },
/*callback*/ function () {
var content = fs.readFileSync(servicesFileInBrowserTest).toString();
var i = content.lastIndexOf("\n");
fs.writeFileSync(servicesFileInBrowserTest, content.substring(0, i) + "\r\n//# sourceURL=../built/local/typeScriptServices.js" + content.substring(i));
});

compileFile(
servicesFileInBrowserTest,
servicesSources,
[builtLocalDirectory, copyright].concat(servicesSources),
/*prefixes*/ [copyright],
/*useBuiltCompiler*/ true,
{ noOutFile: false,
generateDeclarations: true,
preserveConstEnums: true,
keepComments: true,
noResolve: false,
stripInternal: true,
noMapRoot: true,
inlineSourceMap: true
});

var serverFile = path.join(builtLocalDirectory, "tsserver.js");
compileFile(serverFile, serverSources,[builtLocalDirectory, copyright].concat(serverSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true);
Expand Down Expand Up @@ -650,7 +672,13 @@ directory(builtLocalDirectory);

// Task to build the tests infrastructure using the built compiler
var run = path.join(builtLocalDirectory, "run.js");
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
compileFile(
/*outFile*/ run,
/*source*/ harnessSources,
/*prereqs*/ [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources),
/*prefixes*/ [],
/*useBuiltCompiler:*/ true,
/*opts*/ { inlineSourceMap: true });

var internalTests = "internal/";

Expand Down Expand Up @@ -774,51 +802,34 @@ function runConsoleTests(defaultReporter, runInParallel) {
tests = tests ? ' -g "' + tests + '"' : '';
var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
console.log(cmd);

var savedNodeEnv = process.env.NODE_ENV;
process.env.NODE_ENV = "development";
exec(cmd, function () {
process.env.NODE_ENV = savedNodeEnv;
runLinter();
finish();
}, function(e, status) {
process.env.NODE_ENV = savedNodeEnv;
finish(status);
});

}
else {
// run task to load all tests and partition them between workers
var cmd = "mocha " + " -R min " + colors + run;
console.log(cmd);
exec(cmd, function() {
// read all configuration files and spawn a worker for every config
var configFiles = fs.readdirSync(taskConfigsFolder);
var counter = configFiles.length;
var firstErrorStatus;
// schedule work for chunks
configFiles.forEach(function (f) {
var configPath = path.join(taskConfigsFolder, f);
var workerCmd = "mocha" + " -t " + testTimeout + " -R " + reporter + " " + colors + " " + run + " --config='" + configPath + "'";
console.log(workerCmd);
exec(workerCmd, finishWorker, finishWorker)
});

function finishWorker(e, errorStatus) {
counter--;
if (firstErrorStatus === undefined && errorStatus !== undefined) {
firstErrorStatus = errorStatus;
}
if (counter !== 0) {
complete();
}
else {
// last worker clean everything and runs linter in case if there were no errors
deleteTemporaryProjectOutput();
jake.rmRf(taskConfigsFolder);
if (firstErrorStatus === undefined) {
runLinter();
complete();
}
else {
failWithStatus(firstErrorStatus);
}
}
var savedNodeEnv = process.env.NODE_ENV;
process.env.NODE_ENV = "development";
runTestsInParallel(taskConfigsFolder, run, { testTimeout: testTimeout, noColors: colors === " --no-colors " }, function (err) {
process.env.NODE_ENV = savedNodeEnv;

// last worker clean everything and runs linter in case if there were no errors
deleteTemporaryProjectOutput();
jake.rmRf(taskConfigsFolder);
if (err) {
fail(err);
}
else {
runLinter();
complete();
}
});
}
Expand Down Expand Up @@ -873,7 +884,7 @@ compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile

desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function() {
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -o built/local/bundle.js';
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -d -o built/local/bundle.js';
exec(cmd);
}, {async: true});

Expand All @@ -894,7 +905,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFi
}

tests = tests ? tests : '';
var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests;
var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + JSON.stringify(tests);
console.log(cmd);
exec(cmd);
}, {async: true});
Expand Down
14 changes: 13 additions & 1 deletion lib/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,24 @@ interface ObjectConstructor {
*/
getOwnPropertyNames(o: any): string[];

/**
* Creates an object that has null prototype.
* @param o Object to use as a prototype. May be null
*/
create(o: null): any;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties?: PropertyDescriptorMap): any;
create(o: any, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down
3 changes: 2 additions & 1 deletion lib/lib.es2017.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ and limitations under the License.

/// <reference no-default-lib="true"/>
/// <reference path="lib.es2016.d.ts" />
/// <reference path="lib.es2017.object.d.ts" />
/// <reference path="lib.es2017.object.d.ts" />
/// <reference path="lib.es2017.sharedmemory.d.ts" />
43 changes: 43 additions & 0 deletions lib/lib.es2017.sharedmemory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/// <reference no-default-lib="true"/>
/// <reference path="lib.es2015.symbol.d.ts" />
/// <reference path="lib.es2015.symbol.wellknown.d.ts" />

interface SharedArrayBuffer {
/**
* Read-only. The length of the ArrayBuffer (in bytes).
*/
readonly byteLength: number;

/*
* The SharedArrayBuffer constructor's length property whose value is 1.
*/
length: number;
/**
* Returns a section of an SharedArrayBuffer.
*/
slice(begin:number, end?:number): SharedArrayBuffer;
readonly [Symbol.species]: SharedArrayBuffer;
readonly [Symbol.toStringTag]: "SharedArrayBuffer";
}

interface SharedArrayBufferConstructor {
readonly prototype: SharedArrayBuffer;
new (byteLength: number): SharedArrayBuffer;
}

declare var SharedArrayBuffer: SharedArrayBufferConstructor;
14 changes: 13 additions & 1 deletion lib/lib.es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,24 @@ interface ObjectConstructor {
*/
getOwnPropertyNames(o: any): string[];

/**
* Creates an object that has null prototype.
* @param o Object to use as a prototype. May be null
*/
create(o: null): any;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties?: PropertyDescriptorMap): any;
create(o: any, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down
14 changes: 13 additions & 1 deletion lib/lib.es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,24 @@ interface ObjectConstructor {
*/
getOwnPropertyNames(o: any): string[];

/**
* Creates an object that has null prototype.
* @param o Object to use as a prototype. May be null
*/
create(o: null): any;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
*/
create<T>(o: T): T;

/**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
* @param properties JavaScript object that contains one or more property descriptors.
*/
create(o: any, properties?: PropertyDescriptorMap): any;
create(o: any, properties: PropertyDescriptorMap): any;

/**
* Adds a property to an object, or modifies attributes of an existing property.
Expand Down
Loading