Skip to content

Commit 14231af

Browse files
committedJun 16, 2021
Bump version to 4.3.3 and LKG
1 parent 89a171e commit 14231af

8 files changed

+251
-110
lines changed
 

‎lib/tsc.js

+29-18
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
6565
var ts;
6666
(function (ts) {
6767
ts.versionMajorMinor = "4.3";
68-
ts.version = "4.3.2";
68+
ts.version = "4.3.3";
6969
var NativeCollections;
7070
(function (NativeCollections) {
7171
function tryGetNativeMap() {
@@ -23614,8 +23614,8 @@ var ts;
2361423614
visitNode(cbNode, node.typeExpression) ||
2361523615
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
2361623616
: visitNode(cbNode, node.typeExpression) ||
23617-
visitNode(cbNode, node.name)) ||
23618-
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
23617+
visitNode(cbNode, node.name) ||
23618+
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
2361923619
case 320:
2362023620
return visitNode(cbNode, node.tagName) ||
2362123621
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -49122,8 +49122,7 @@ var ts;
4912249122
return type;
4912349123
}
4912449124
function maybeTypeParameterReference(node) {
49125-
return !(node.kind === 158 ||
49126-
node.parent.kind === 174 && node.parent.typeArguments && node === node.parent.typeName ||
49125+
return !(node.parent.kind === 174 && node.parent.typeArguments && node === node.parent.typeName ||
4912749126
node.parent.kind === 196 && node.parent.typeArguments && node === node.parent.qualifier);
4912849127
}
4912949128
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -49148,7 +49147,10 @@ var ts;
4914849147
return true;
4914949148
case 166:
4915049149
case 165:
49151-
return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
49150+
return !node.type && !!node.body ||
49151+
ts.some(node.typeParameters, containsReference) ||
49152+
ts.some(node.parameters, containsReference) ||
49153+
!!node.type && containsReference(node.type);
4915249154
}
4915349155
return !!ts.forEachChild(node, containsReference);
4915449156
}
@@ -53779,12 +53781,13 @@ var ts;
5377953781
applyToReturnTypes(source, target, inferFromTypes);
5378053782
}
5378153783
function inferFromIndexTypes(source, target) {
53784+
var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32) ? 8 : 0;
5378253785
var targetStringIndexType = getIndexTypeOfType(target, 0);
5378353786
if (targetStringIndexType) {
5378453787
var sourceIndexType = getIndexTypeOfType(source, 0) ||
5378553788
getImplicitIndexTypeOfType(source, 0);
5378653789
if (sourceIndexType) {
53787-
inferFromTypes(sourceIndexType, targetStringIndexType);
53790+
inferWithPriority(sourceIndexType, targetStringIndexType, priority);
5378853791
}
5378953792
}
5379053793
var targetNumberIndexType = getIndexTypeOfType(target, 1);
@@ -53793,7 +53796,7 @@ var ts;
5379353796
getIndexTypeOfType(source, 0) ||
5379453797
getImplicitIndexTypeOfType(source, 1);
5379553798
if (sourceIndexType) {
53796-
inferFromTypes(sourceIndexType, targetNumberIndexType);
53799+
inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
5379753800
}
5379853801
}
5379953802
}
@@ -72176,6 +72179,7 @@ var ts;
7217672179
case 120:
7217772180
case 121:
7217872181
case 125:
72182+
case 156:
7217972183
case 84:
7218072184
case 133:
7218172185
case 142:
@@ -87991,11 +87995,14 @@ var ts;
8799187995
if (nextNode.kind === 11) {
8799287996
return 0;
8799387997
}
87994-
else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
87995-
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
87996-
}
87997-
else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
87998-
return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
87998+
else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
87999+
if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
88000+
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
88001+
}
88002+
else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
88003+
return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
88004+
}
88005+
return format & 65536 ? 1 : 0;
8799988006
}
8800088007
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
8800188008
return 1;
@@ -88541,10 +88548,11 @@ var ts;
8854188548
}
8854288549
exitComment();
8854388550
}
88551+
function originalNodesHaveSameParent(nodeA, nodeB) {
88552+
nodeA = ts.getOriginalNode(nodeA);
88553+
return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
88554+
}
8854488555
function siblingNodePositionsAreComparable(previousNode, nextNode) {
88545-
if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
88546-
return false;
88547-
}
8854888556
if (nextNode.pos < previousNode.end) {
8854988557
return false;
8855088558
}
@@ -93180,8 +93188,11 @@ var ts;
9318093188
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
9318193189
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
9318293190
var name = _a[_i];
93183-
var optionInfo = optionsNameMap.get(name.toLowerCase());
93184-
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
93191+
var optionKey = name.toLowerCase();
93192+
var optionInfo = optionsNameMap.get(optionKey);
93193+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
93194+
optionKey === "strict" ||
93195+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
9318593196
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
9318693197
}
9318793198
}

‎lib/tsserver.js

+44-18
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var ts;
9696
// The following is baselined as a literal template type without intervention
9797
/** The version of the TypeScript compiler release */
9898
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
99-
ts.version = "4.3.2";
99+
ts.version = "4.3.3";
100100
/* @internal */
101101
var Comparison;
102102
(function (Comparison) {
@@ -29268,8 +29268,8 @@ var ts;
2926829268
visitNode(cbNode, node.typeExpression) ||
2926929269
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
2927029270
: visitNode(cbNode, node.typeExpression) ||
29271-
visitNode(cbNode, node.name)) ||
29272-
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
29271+
visitNode(cbNode, node.name) ||
29272+
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
2927329273
case 320 /* JSDocAuthorTag */:
2927429274
return visitNode(cbNode, node.tagName) ||
2927529275
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
@@ -37382,6 +37382,8 @@ var ts;
3738237382
{
3738337383
name: "strict",
3738437384
type: "boolean",
37385+
// Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
37386+
// The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
3738537387
showInSimplifiedHelpView: true,
3738637388
category: ts.Diagnostics.Strict_Type_Checking_Options,
3738737389
description: ts.Diagnostics.Enable_all_strict_type_checking_options
@@ -59168,8 +59170,7 @@ var ts;
5916859170
return type;
5916959171
}
5917059172
function maybeTypeParameterReference(node) {
59171-
return !(node.kind === 158 /* QualifiedName */ ||
59172-
node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
59173+
return !(node.parent.kind === 174 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName ||
5917359174
node.parent.kind === 196 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
5917459175
}
5917559176
function isTypeParameterPossiblyReferenced(tp, node) {
@@ -59197,7 +59198,10 @@ var ts;
5919759198
return true;
5919859199
case 166 /* MethodDeclaration */:
5919959200
case 165 /* MethodSignature */:
59200-
return (!node.type && !!node.body) || !!ts.forEachChild(node, containsReference);
59201+
return !node.type && !!node.body ||
59202+
ts.some(node.typeParameters, containsReference) ||
59203+
ts.some(node.parameters, containsReference) ||
59204+
!!node.type && containsReference(node.type);
5920159205
}
5920259206
return !!ts.forEachChild(node, containsReference);
5920359207
}
@@ -64580,12 +64584,14 @@ var ts;
6458064584
applyToReturnTypes(source, target, inferFromTypes);
6458164585
}
6458264586
function inferFromIndexTypes(source, target) {
64587+
// Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables
64588+
var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
6458364589
var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */);
6458464590
if (targetStringIndexType) {
6458564591
var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) ||
6458664592
getImplicitIndexTypeOfType(source, 0 /* String */);
6458764593
if (sourceIndexType) {
64588-
inferFromTypes(sourceIndexType, targetStringIndexType);
64594+
inferWithPriority(sourceIndexType, targetStringIndexType, priority);
6458964595
}
6459064596
}
6459164597
var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */);
@@ -64594,7 +64600,7 @@ var ts;
6459464600
getIndexTypeOfType(source, 0 /* String */) ||
6459564601
getImplicitIndexTypeOfType(source, 1 /* Number */);
6459664602
if (sourceIndexType) {
64597-
inferFromTypes(sourceIndexType, targetNumberIndexType);
64603+
inferWithPriority(sourceIndexType, targetNumberIndexType, priority);
6459864604
}
6459964605
}
6460064606
}
@@ -85910,6 +85916,7 @@ var ts;
8591085916
case 120 /* PrivateKeyword */:
8591185917
case 121 /* ProtectedKeyword */:
8591285918
case 125 /* AbstractKeyword */:
85919+
case 156 /* OverrideKeyword */:
8591385920
case 84 /* ConstKeyword */:
8591485921
case 133 /* DeclareKeyword */:
8591585922
case 142 /* ReadonlyKeyword */:
@@ -107102,11 +107109,21 @@ var ts;
107102107109
// JsxText will be written with its leading whitespace, so don't add more manually.
107103107110
return 0;
107104107111
}
107105-
else if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
107106-
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
107107-
}
107108-
else if (!preserveSourceNewlines && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
107109-
return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
107112+
else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
107113+
if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
107114+
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
107115+
}
107116+
// If `preserveSourceNewlines` is `false` we do not intend to preserve the effective lines between the
107117+
// previous and next node. Instead we naively check whether nodes are on separate lines within the
107118+
// same node parent. If so, we intend to preserve a single line terminator. This is less precise and
107119+
// expensive than checking with `preserveSourceNewlines` as above, but the goal is not to preserve the
107120+
// effective source lines between two sibling nodes.
107121+
else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
107122+
return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
107123+
}
107124+
// If the two nodes are not comparable, add a line terminator based on the format that can indicate
107125+
// whether new lines are preferred or not.
107126+
return format & 65536 /* PreferNewLine */ ? 1 : 0;
107110107127
}
107111107128
else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
107112107129
return 1;
@@ -107746,10 +107763,13 @@ var ts;
107746107763
}
107747107764
exitComment();
107748107765
}
107766+
function originalNodesHaveSameParent(nodeA, nodeB) {
107767+
nodeA = ts.getOriginalNode(nodeA);
107768+
// For performance, do not call `getOriginalNode` for `nodeB` if `nodeA` doesn't even
107769+
// have a parent node.
107770+
return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
107771+
}
107749107772
function siblingNodePositionsAreComparable(previousNode, nextNode) {
107750-
if (ts.nodeIsSynthesized(previousNode) || ts.nodeIsSynthesized(nextNode)) {
107751-
return false;
107752-
}
107753107773
if (nextNode.pos < previousNode.end) {
107754107774
return false;
107755107775
}
@@ -113122,8 +113142,14 @@ var ts;
113122113142
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
113123113143
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
113124113144
var name = _a[_i];
113125-
var optionInfo = optionsNameMap.get(name.toLowerCase());
113126-
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) || name === "skipLibCheck" || name === "skipDefaultLibCheck") {
113145+
var optionKey = name.toLowerCase();
113146+
var optionInfo = optionsNameMap.get(optionKey);
113147+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
113148+
// We need to store `strict`, even though it won't be examined directly, so that the
113149+
// flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
113150+
optionKey === "strict" ||
113151+
// We need to store these to determine whether `lib` files need to be rechecked.
113152+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
113127113153
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
113128113154
}
113129113155
}

0 commit comments

Comments
 (0)