Skip to content

Commit d973f4d

Browse files
author
Andy Hanson
committed
Merge branch 'master' into shorthand_ambient_module
2 parents ff6e025 + e6eb36e commit d973f4d

64 files changed

Lines changed: 274854 additions & 271511 deletions

File tree

Some content is hidden

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

Jakefile.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
313313
}
314314

315315
if (useDebugMode) {
316-
options += " -sourcemap";
317-
if (!opts.noMapRoot) {
318-
options += " -mapRoot file:///" + path.resolve(path.dirname(outFile));
319-
}
316+
options += " --inlineSourceMap --inlineSources";
320317
} else {
321318
options += " --newLine LF";
322319
}
@@ -486,7 +483,6 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename);
486483
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
487484

488485
var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
489-
var servicesFileInBrowserTest = path.join(builtLocalDirectory, "typescriptServicesInBrowserTest.js");
490486
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
491487
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
492488
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
@@ -518,16 +514,6 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
518514
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
519515
});
520516

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

532518
var serverFile = path.join(builtLocalDirectory, "tsserver.js");
533519
compileFile(serverFile, serverSources,[builtLocalDirectory, copyright].concat(serverSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true);
@@ -740,16 +726,25 @@ function runConsoleTests(defaultReporter, runInParallel) {
740726
tests = tests ? ' -g "' + tests + '"' : '';
741727
var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
742728
console.log(cmd);
729+
730+
var savedNodeEnv = process.env.NODE_ENV;
731+
process.env.NODE_ENV = "development";
743732
exec(cmd, function () {
733+
process.env.NODE_ENV = savedNodeEnv;
744734
runLinter();
745735
finish();
746736
}, function(e, status) {
737+
process.env.NODE_ENV = savedNodeEnv;
747738
finish(status);
748739
});
749740

750741
}
751742
else {
743+
var savedNodeEnv = process.env.NODE_ENV;
744+
process.env.NODE_ENV = "development";
752745
runTestsInParallel(taskConfigsFolder, run, { testTimeout: testTimeout, noColors: colors === " --no-colors " }, function (err) {
746+
process.env.NODE_ENV = savedNodeEnv;
747+
753748
// last worker clean everything and runs linter in case if there were no errors
754749
deleteTemporaryProjectOutput();
755750
jake.rmRf(taskConfigsFolder);
@@ -813,12 +808,12 @@ compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile
813808

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

820815
desc("Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], port=, browser=[chrome|IE]");
821-
task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFileInBrowserTest], function() {
816+
task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFile], function() {
822817
cleanTestDirs();
823818
host = "node";
824819
port = process.env.port || process.env.p || '8888';

lib/lib.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,24 @@ interface ObjectConstructor {
152152
*/
153153
getOwnPropertyNames(o: any): string[];
154154

155+
/**
156+
* Creates an object that has null prototype.
157+
* @param o Object to use as a prototype. May be null
158+
*/
159+
create(o: null): any;
160+
161+
/**
162+
* Creates an object that has the specified prototype, and that optionally contains specified properties.
163+
* @param o Object to use as a prototype. May be null
164+
*/
165+
create<T>(o: T): T;
166+
155167
/**
156168
* Creates an object that has the specified prototype, and that optionally contains specified properties.
157169
* @param o Object to use as a prototype. May be null
158170
* @param properties JavaScript object that contains one or more property descriptors.
159171
*/
160-
create(o: any, properties?: PropertyDescriptorMap): any;
172+
create(o: any, properties: PropertyDescriptorMap): any;
161173

162174
/**
163175
* Adds a property to an object, or modifies attributes of an existing property.

lib/lib.es2017.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ and limitations under the License.
1515

1616
/// <reference no-default-lib="true"/>
1717
/// <reference path="lib.es2016.d.ts" />
18-
/// <reference path="lib.es2017.object.d.ts" />
18+
/// <reference path="lib.es2017.object.d.ts" />
19+
/// <reference path="lib.es2017.sharedmemory.d.ts" />

lib/lib.es2017.sharedmemory.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
/// <reference no-default-lib="true"/>
17+
/// <reference path="lib.es2015.symbol.d.ts" />
18+
/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
19+
20+
interface SharedArrayBuffer {
21+
/**
22+
* Read-only. The length of the ArrayBuffer (in bytes).
23+
*/
24+
readonly byteLength: number;
25+
26+
/*
27+
* The SharedArrayBuffer constructor's length property whose value is 1.
28+
*/
29+
length: number;
30+
/**
31+
* Returns a section of an SharedArrayBuffer.
32+
*/
33+
slice(begin:number, end?:number): SharedArrayBuffer;
34+
readonly [Symbol.species]: SharedArrayBuffer;
35+
readonly [Symbol.toStringTag]: "SharedArrayBuffer";
36+
}
37+
38+
interface SharedArrayBufferConstructor {
39+
readonly prototype: SharedArrayBuffer;
40+
new (byteLength: number): SharedArrayBuffer;
41+
}
42+
43+
declare var SharedArrayBuffer: SharedArrayBufferConstructor;

lib/lib.es5.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,24 @@ interface ObjectConstructor {
152152
*/
153153
getOwnPropertyNames(o: any): string[];
154154

155+
/**
156+
* Creates an object that has null prototype.
157+
* @param o Object to use as a prototype. May be null
158+
*/
159+
create(o: null): any;
160+
161+
/**
162+
* Creates an object that has the specified prototype, and that optionally contains specified properties.
163+
* @param o Object to use as a prototype. May be null
164+
*/
165+
create<T>(o: T): T;
166+
155167
/**
156168
* Creates an object that has the specified prototype, and that optionally contains specified properties.
157169
* @param o Object to use as a prototype. May be null
158170
* @param properties JavaScript object that contains one or more property descriptors.
159171
*/
160-
create(o: any, properties?: PropertyDescriptorMap): any;
172+
create(o: any, properties: PropertyDescriptorMap): any;
161173

162174
/**
163175
* Adds a property to an object, or modifies attributes of an existing property.

lib/lib.es6.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,24 @@ interface ObjectConstructor {
152152
*/
153153
getOwnPropertyNames(o: any): string[];
154154

155+
/**
156+
* Creates an object that has null prototype.
157+
* @param o Object to use as a prototype. May be null
158+
*/
159+
create(o: null): any;
160+
161+
/**
162+
* Creates an object that has the specified prototype, and that optionally contains specified properties.
163+
* @param o Object to use as a prototype. May be null
164+
*/
165+
create<T>(o: T): T;
166+
155167
/**
156168
* Creates an object that has the specified prototype, and that optionally contains specified properties.
157169
* @param o Object to use as a prototype. May be null
158170
* @param properties JavaScript object that contains one or more property descriptors.
159171
*/
160-
create(o: any, properties?: PropertyDescriptorMap): any;
172+
create(o: any, properties: PropertyDescriptorMap): any;
161173

162174
/**
163175
* Adds a property to an object, or modifies attributes of an existing property.

0 commit comments

Comments
 (0)