Skip to content

Commit 794c574

Browse files
Merge pull request #7978 from Microsoft/bump-1.8.10
Bump 1.8 branch to 1.8.10
2 parents f4ddf4b + 39181e6 commit 794c574

File tree

8 files changed

+84
-20
lines changed

8 files changed

+84
-20
lines changed

lib/tsc.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10486,6 +10486,7 @@ var ts;
1048610486
var hasAsyncFunctions;
1048710487
var hasDecorators;
1048810488
var hasParameterDecorators;
10489+
var hasJsxSpreadAttribute;
1048910490
var inStrictMode;
1049010491
var symbolCount = 0;
1049110492
var Symbol;
@@ -10516,6 +10517,7 @@ var ts;
1051610517
hasAsyncFunctions = false;
1051710518
hasDecorators = false;
1051810519
hasParameterDecorators = false;
10520+
hasJsxSpreadAttribute = false;
1051910521
}
1052010522
return bindSourceFile;
1052110523
function createSymbol(flags, name) {
@@ -10729,6 +10731,9 @@ var ts;
1072910731
if (hasAsyncFunctions) {
1073010732
flags |= 33554432;
1073110733
}
10734+
if (hasJsxSpreadAttribute) {
10735+
flags |= 1073741824;
10736+
}
1073210737
}
1073310738
node.flags = flags;
1073410739
if (saveState) {
@@ -11291,6 +11296,9 @@ var ts;
1129111296
return bindPropertyOrMethodOrAccessor(node, 4, 107455);
1129211297
case 250:
1129311298
return bindPropertyOrMethodOrAccessor(node, 8, 107455);
11299+
case 242:
11300+
hasJsxSpreadAttribute = true;
11301+
return;
1129411302
case 148:
1129511303
case 149:
1129611304
case 150:
@@ -26673,6 +26681,7 @@ var ts;
2667326681
};
2667426682
function emitFiles(resolver, host, targetSourceFile) {
2667526683
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
26684+
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
2667626685
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
2667726686
var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
2667826687
var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};";
@@ -26752,6 +26761,7 @@ var ts;
2675226761
var decoratedClassAliases;
2675326762
var convertedLoopState;
2675426763
var extendsEmitted;
26764+
var assignEmitted;
2675526765
var decorateEmitted;
2675626766
var paramEmitted;
2675726767
var awaiterEmitted;
@@ -26816,6 +26826,7 @@ var ts;
2681626826
decorateEmitted = false;
2681726827
paramEmitted = false;
2681826828
awaiterEmitted = false;
26829+
assignEmitted = false;
2681926830
tempFlags = 0;
2682026831
tempVariables = undefined;
2682126832
tempParameters = undefined;
@@ -27278,8 +27289,7 @@ var ts;
2727827289
else {
2727927290
var attrs = openingNode.attributes;
2728027291
if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) {
27281-
emitExpressionIdentifier(syntheticReactRef);
27282-
write(".__spread(");
27292+
write("__assign(");
2728327293
var haveOpenedObjectLiteral = false;
2728427294
for (var i = 0; i < attrs.length; i++) {
2728527295
if (attrs[i].kind === 242) {
@@ -32092,10 +32102,14 @@ var ts;
3209232102
}
3209332103
function emitEmitHelpers(node) {
3209432104
if (!compilerOptions.noEmitHelpers) {
32095-
if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) {
32105+
if (languageVersion < 2 && !extendsEmitted && node.flags & 4194304) {
3209632106
writeLines(extendsHelper);
3209732107
extendsEmitted = true;
3209832108
}
32109+
if (compilerOptions.jsx !== 1 && !assignEmitted && (node.flags & 1073741824)) {
32110+
writeLines(assignHelper);
32111+
assignEmitted = true;
32112+
}
3209932113
if (!decorateEmitted && node.flags & 8388608) {
3210032114
writeLines(decorateHelper);
3210132115
if (compilerOptions.emitDecoratorMetadata) {
@@ -32528,7 +32542,7 @@ var ts;
3252832542
ts.ioWriteTime = 0;
3252932543
ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
3253032544
var emptyArray = [];
32531-
ts.version = "1.8.9";
32545+
ts.version = "1.8.10";
3253232546
function findConfigFile(searchPath, fileExists) {
3253332547
var fileName = "tsconfig.json";
3253432548
while (true) {

lib/tsserver.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11111,6 +11111,7 @@ var ts;
1111111111
var hasAsyncFunctions;
1111211112
var hasDecorators;
1111311113
var hasParameterDecorators;
11114+
var hasJsxSpreadAttribute;
1111411115
var inStrictMode;
1111511116
var symbolCount = 0;
1111611117
var Symbol;
@@ -11141,6 +11142,7 @@ var ts;
1114111142
hasAsyncFunctions = false;
1114211143
hasDecorators = false;
1114311144
hasParameterDecorators = false;
11145+
hasJsxSpreadAttribute = false;
1114411146
}
1114511147
return bindSourceFile;
1114611148
function createSymbol(flags, name) {
@@ -11354,6 +11356,9 @@ var ts;
1135411356
if (hasAsyncFunctions) {
1135511357
flags |= 33554432;
1135611358
}
11359+
if (hasJsxSpreadAttribute) {
11360+
flags |= 1073741824;
11361+
}
1135711362
}
1135811363
node.flags = flags;
1135911364
if (saveState) {
@@ -11916,6 +11921,9 @@ var ts;
1191611921
return bindPropertyOrMethodOrAccessor(node, 4, 107455);
1191711922
case 250:
1191811923
return bindPropertyOrMethodOrAccessor(node, 8, 107455);
11924+
case 242:
11925+
hasJsxSpreadAttribute = true;
11926+
return;
1191911927
case 148:
1192011928
case 149:
1192111929
case 150:
@@ -27298,6 +27306,7 @@ var ts;
2729827306
};
2729927307
function emitFiles(resolver, host, targetSourceFile) {
2730027308
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
27309+
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
2730127310
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
2730227311
var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
2730327312
var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};";
@@ -27377,6 +27386,7 @@ var ts;
2737727386
var decoratedClassAliases;
2737827387
var convertedLoopState;
2737927388
var extendsEmitted;
27389+
var assignEmitted;
2738027390
var decorateEmitted;
2738127391
var paramEmitted;
2738227392
var awaiterEmitted;
@@ -27441,6 +27451,7 @@ var ts;
2744127451
decorateEmitted = false;
2744227452
paramEmitted = false;
2744327453
awaiterEmitted = false;
27454+
assignEmitted = false;
2744427455
tempFlags = 0;
2744527456
tempVariables = undefined;
2744627457
tempParameters = undefined;
@@ -27903,8 +27914,7 @@ var ts;
2790327914
else {
2790427915
var attrs = openingNode.attributes;
2790527916
if (ts.forEach(attrs, function (attr) { return attr.kind === 242; })) {
27906-
emitExpressionIdentifier(syntheticReactRef);
27907-
write(".__spread(");
27917+
write("__assign(");
2790827918
var haveOpenedObjectLiteral = false;
2790927919
for (var i = 0; i < attrs.length; i++) {
2791027920
if (attrs[i].kind === 242) {
@@ -32717,10 +32727,14 @@ var ts;
3271732727
}
3271832728
function emitEmitHelpers(node) {
3271932729
if (!compilerOptions.noEmitHelpers) {
32720-
if ((languageVersion < 2) && (!extendsEmitted && node.flags & 4194304)) {
32730+
if (languageVersion < 2 && !extendsEmitted && node.flags & 4194304) {
3272132731
writeLines(extendsHelper);
3272232732
extendsEmitted = true;
3272332733
}
32734+
if (compilerOptions.jsx !== 1 && !assignEmitted && (node.flags & 1073741824)) {
32735+
writeLines(assignHelper);
32736+
assignEmitted = true;
32737+
}
3272432738
if (!decorateEmitted && node.flags & 8388608) {
3272532739
writeLines(decorateHelper);
3272632740
if (compilerOptions.emitDecoratorMetadata) {
@@ -33153,7 +33167,7 @@ var ts;
3315333167
ts.ioWriteTime = 0;
3315433168
ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
3315533169
var emptyArray = [];
33156-
ts.version = "1.8.9";
33170+
ts.version = "1.8.10";
3315733171
function findConfigFile(searchPath, fileExists) {
3315833172
var fileName = "tsconfig.json";
3315933173
while (true) {

lib/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ declare namespace ts {
360360
HasDecorators = 8388608,
361361
HasParamDecorators = 16777216,
362362
HasAsyncFunctions = 33554432,
363+
HasJsxSpreadAttribute = 1073741824,
363364
Modifier = 1022,
364365
AccessibilityModifier = 56,
365366
BlockScoped = 24576,

lib/typescript.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ var ts;
383383
NodeFlags[NodeFlags["HasDecorators"] = 8388608] = "HasDecorators";
384384
NodeFlags[NodeFlags["HasParamDecorators"] = 16777216] = "HasParamDecorators";
385385
NodeFlags[NodeFlags["HasAsyncFunctions"] = 33554432] = "HasAsyncFunctions";
386+
// This was picked out from the 'master' branch.
387+
// To keep the flags consistent, we're skipping a few ahead.
388+
NodeFlags[NodeFlags["HasJsxSpreadAttribute"] = 1073741824] = "HasJsxSpreadAttribute";
386389
NodeFlags[NodeFlags["Modifier"] = 1022] = "Modifier";
387390
NodeFlags[NodeFlags["AccessibilityModifier"] = 56] = "AccessibilityModifier";
388391
NodeFlags[NodeFlags["BlockScoped"] = 24576] = "BlockScoped";
@@ -13267,6 +13270,7 @@ var ts;
1326713270
var hasAsyncFunctions;
1326813271
var hasDecorators;
1326913272
var hasParameterDecorators;
13273+
var hasJsxSpreadAttribute;
1327013274
// If this file is an external module, then it is automatically in strict-mode according to
1327113275
// ES6. If it is not an external module, then we'll determine if it is in strict mode or
1327213276
// not depending on if we see "use strict" in certain places (or if we hit a class/namespace).
@@ -13300,6 +13304,7 @@ var ts;
1330013304
hasAsyncFunctions = false;
1330113305
hasDecorators = false;
1330213306
hasParameterDecorators = false;
13307+
hasJsxSpreadAttribute = false;
1330313308
}
1330413309
return bindSourceFile;
1330513310
function createSymbol(flags, name) {
@@ -13592,6 +13597,9 @@ var ts;
1359213597
if (hasAsyncFunctions) {
1359313598
flags |= 33554432 /* HasAsyncFunctions */;
1359413599
}
13600+
if (hasJsxSpreadAttribute) {
13601+
flags |= 1073741824 /* HasJsxSpreadAttribute */;
13602+
}
1359513603
}
1359613604
node.flags = flags;
1359713605
if (saveState) {
@@ -14281,6 +14289,9 @@ var ts;
1428114289
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */);
1428214290
case 250 /* EnumMember */:
1428314291
return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */);
14292+
case 242 /* JsxSpreadAttribute */:
14293+
hasJsxSpreadAttribute = true;
14294+
return;
1428414295
case 148 /* CallSignature */:
1428514296
case 149 /* ConstructSignature */:
1428614297
case 150 /* IndexSignature */:
@@ -32450,6 +32461,7 @@ var ts;
3245032461
function emitFiles(resolver, host, targetSourceFile) {
3245132462
// emit output for the __extends helper function
3245232463
var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};";
32464+
var assignHelper = "\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};";
3245332465
// emit output for the __decorate helper function
3245432466
var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};";
3245532467
// emit output for the __metadata helper function
@@ -32539,6 +32551,7 @@ var ts;
3253932551
var decoratedClassAliases;
3254032552
var convertedLoopState;
3254132553
var extendsEmitted;
32554+
var assignEmitted;
3254232555
var decorateEmitted;
3254332556
var paramEmitted;
3254432557
var awaiterEmitted;
@@ -32609,6 +32622,7 @@ var ts;
3260932622
decorateEmitted = false;
3261032623
paramEmitted = false;
3261132624
awaiterEmitted = false;
32625+
assignEmitted = false;
3261232626
tempFlags = 0;
3261332627
tempVariables = undefined;
3261432628
tempParameters = undefined;
@@ -33165,11 +33179,10 @@ var ts;
3316533179
}
3316633180
else {
3316733181
// Either emit one big object literal (no spread attribs), or
33168-
// a call to React.__spread
33182+
// a call to the __assign helper
3316933183
var attrs = openingNode.attributes;
3317033184
if (ts.forEach(attrs, function (attr) { return attr.kind === 242 /* JsxSpreadAttribute */; })) {
33171-
emitExpressionIdentifier(syntheticReactRef);
33172-
write(".__spread(");
33185+
write("__assign(");
3317333186
var haveOpenedObjectLiteral = false;
3317433187
for (var i = 0; i < attrs.length; i++) {
3317533188
if (attrs[i].kind === 242 /* JsxSpreadAttribute */) {
@@ -38850,10 +38863,14 @@ var ts;
3885038863
if (!compilerOptions.noEmitHelpers) {
3885138864
// Only Emit __extends function when target ES5.
3885238865
// For target ES6 and above, we can emit classDeclaration as is.
38853-
if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && node.flags & 4194304 /* HasClassExtends */)) {
38866+
if (languageVersion < 2 /* ES6 */ && !extendsEmitted && node.flags & 4194304 /* HasClassExtends */) {
3885438867
writeLines(extendsHelper);
3885538868
extendsEmitted = true;
3885638869
}
38870+
if (compilerOptions.jsx !== 1 /* Preserve */ && !assignEmitted && (node.flags & 1073741824 /* HasJsxSpreadAttribute */)) {
38871+
writeLines(assignHelper);
38872+
assignEmitted = true;
38873+
}
3885738874
if (!decorateEmitted && node.flags & 8388608 /* HasDecorators */) {
3885838875
writeLines(decorateHelper);
3885938876
if (compilerOptions.emitDecoratorMetadata) {
@@ -39343,7 +39360,7 @@ var ts;
3934339360
/* @internal */ ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
3934439361
/** The version of the TypeScript compiler release */
3934539362
var emptyArray = [];
39346-
ts.version = "1.8.9";
39363+
ts.version = "1.8.10";
3934739364
function findConfigFile(searchPath, fileExists) {
3934839365
var fileName = "tsconfig.json";
3934939366
while (true) {

lib/typescriptServices.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ declare namespace ts {
360360
HasDecorators = 8388608,
361361
HasParamDecorators = 16777216,
362362
HasAsyncFunctions = 33554432,
363+
HasJsxSpreadAttribute = 1073741824,
363364
Modifier = 1022,
364365
AccessibilityModifier = 56,
365366
BlockScoped = 24576,

0 commit comments

Comments
 (0)