Skip to content

Commit

Permalink
Bump version to 4.5.5 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Jan 20, 2022
1 parent c5ce170 commit 55e13e9
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 206 deletions.
29 changes: 19 additions & 10 deletions lib/tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var ts;
(function (ts) {
ts.versionMajorMinor = "4.5";
ts.version = "4.5.4";
ts.version = "4.5.5";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
Expand Down Expand Up @@ -12247,7 +12247,7 @@ var ts;
}
ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
function getExternalModuleRequireArgument(node) {
return isRequireVariableDeclaration(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
}
ts.getExternalModuleRequireArgument = getExternalModuleRequireArgument;
function isInternalModuleImportEqualsDeclaration(node) {
Expand Down Expand Up @@ -12301,17 +12301,26 @@ var ts;
return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg);
}
ts.isRequireCall = isRequireCall;
function isRequireVariableDeclaration(node) {
function isVariableDeclarationInitializedToRequire(node) {
return isVariableDeclarationInitializedWithRequireHelper(node, false);
}
ts.isVariableDeclarationInitializedToRequire = isVariableDeclarationInitializedToRequire;
function isVariableDeclarationInitializedToBareOrAccessedRequire(node) {
return isVariableDeclarationInitializedWithRequireHelper(node, true);
}
ts.isVariableDeclarationInitializedToBareOrAccessedRequire = isVariableDeclarationInitializedToBareOrAccessedRequire;
function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {
if (node.kind === 202) {
node = node.parent.parent;
}
return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), true);
return ts.isVariableDeclaration(node) &&
!!node.initializer &&
isRequireCall(allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, true);
}
ts.isRequireVariableDeclaration = isRequireVariableDeclaration;
function isRequireVariableStatement(node) {
return ts.isVariableStatement(node)
&& node.declarationList.declarations.length > 0
&& ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl); });
&& ts.every(node.declarationList.declarations, function (decl) { return isVariableDeclarationInitializedToRequire(decl); });
}
ts.isRequireVariableStatement = isRequireVariableStatement;
function isSingleOrDoubleQuote(charCode) {
Expand Down Expand Up @@ -37770,7 +37779,7 @@ var ts;
checkStrictModeEvalOrArguments(node, node.name);
}
if (!ts.isBindingPattern(node.name)) {
if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node) && !ts.getJSDocTypeTag(node)) {
if (ts.isInJSFile(node) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node) && !ts.getJSDocTypeTag(node)) {
declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
}
else if (ts.isBlockOrCatchScoped(node)) {
Expand Down Expand Up @@ -40045,7 +40054,7 @@ var ts;
&& isAliasableOrJsExpression(node.parent.right)
|| node.kind === 295
|| node.kind === 294 && isAliasableOrJsExpression(node.initializer)
|| ts.isRequireVariableDeclaration(node);
|| ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
}
function isAliasableOrJsExpression(e) {
return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
Expand Down Expand Up @@ -40901,7 +40910,7 @@ var ts;
if (!sigs || !sigs.length) {
sigs = getSignaturesOfStructuredType(type, 1);
}
if ((sigs && sigs.length) || getPropertyOfType(type, "default")) {
if ((sigs && sigs.length) || getPropertyOfType(type, "default", true)) {
var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
}
Expand Down Expand Up @@ -67235,7 +67244,7 @@ var ts;
return;
}
var symbol = getSymbolOfNode(node);
if (symbol.flags & 2097152 && ts.isRequireVariableDeclaration(node)) {
if (symbol.flags & 2097152 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)) {
checkAliasSymbol(node);
return;
}
Expand Down
Loading

0 comments on commit 55e13e9

Please sign in to comment.