Skip to content

Commit 1cad4a8

Browse files
committed
Publish 2.7.4
1 parent e703f12 commit 1cad4a8

11 files changed

+241
-67
lines changed

lib/tsc.js

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ var ts;
132132
var ts;
133133
(function (ts) {
134134
ts.versionMajorMinor = "2.7";
135-
ts.version = ts.versionMajorMinor + ".2-dev.20180325";
135+
ts.version = ts.versionMajorMinor + ".2";
136136
})(ts || (ts = {}));
137137
(function (ts) {
138-
ts.version_plus = "2.7.3";
138+
ts.version_plus = "2.7.4";
139139
})(ts || (ts = {}));
140140
(function (ts) {
141141
function isExternalModuleNameRelative(moduleName) {
@@ -54184,6 +54184,7 @@ var ts;
5418454184
var rootFileNames;
5418554185
var dependencyMap;
5418654186
var pathWeightMap;
54187+
var visitedBlocks;
5418754188
function createMap() {
5418854189
var map = Object.create(null);
5418954190
map["__"] = undefined;
@@ -54194,12 +54195,14 @@ var ts;
5419454195
sourceFiles = program.getSourceFiles();
5419554196
rootFileNames = program.getRootFileNames();
5419654197
checker = program.getTypeChecker();
54198+
visitedBlocks = [];
5419754199
buildDependencyMap();
5419854200
var result = sortOnDependency();
5419954201
sourceFiles = null;
5420054202
rootFileNames = null;
5420154203
checker = null;
5420254204
dependencyMap = null;
54205+
visitedBlocks = null;
5420354206
return result;
5420454207
}
5420554208
ts.reorderSourceFiles = reorderSourceFiles;
@@ -54445,7 +54448,7 @@ var ts;
5444554448
function visitDecorators(decorators) {
5444654449
for (var _i = 0, decorators_2 = decorators; _i < decorators_2.length; _i++) {
5444754450
var decorator = decorators_2[_i];
54448-
visitExpression(decorator.expression);
54451+
visitCallExpression(decorator.expression);
5444954452
}
5445054453
}
5445154454
function visitExpression(expression) {
@@ -54455,7 +54458,8 @@ var ts;
5445554458
switch (expression.kind) {
5445654459
case 183:
5445754460
case 182:
54458-
visitCallExpression(expression);
54461+
visitCallArguments(expression);
54462+
visitCallExpression(expression.expression);
5445954463
break;
5446054464
case 71:
5446154465
checkDependencyAtLocation(expression);
@@ -54573,13 +54577,15 @@ var ts;
5457354577
}
5457454578
});
5457554579
}
54576-
function visitCallExpression(callExpression) {
54580+
function visitCallArguments(callExpression) {
5457754581
if (callExpression.arguments) {
5457854582
callExpression.arguments.forEach(function (argument) {
5457954583
visitExpression(argument);
5458054584
});
5458154585
}
54582-
var expression = escapeParenthesized(callExpression.expression);
54586+
}
54587+
function visitCallExpression(expression) {
54588+
expression = escapeParenthesized(expression);
5458354589
visitExpression(expression);
5458454590
switch (expression.kind) {
5458554591
case 187:
@@ -54588,10 +54594,61 @@ var ts;
5458854594
break;
5458954595
case 180:
5459054596
case 71:
54591-
var callerFileName = getSourceFileOfNode(callExpression).fileName;
54597+
var callerFileName = getSourceFileOfNode(expression).fileName;
5459254598
checkCallTarget(callerFileName, expression);
5459354599
break;
54600+
case 182:
54601+
visitReturnedFunction(expression.expression);
54602+
break;
54603+
}
54604+
}
54605+
function visitReturnedFunction(expression) {
54606+
expression = escapeParenthesized(expression);
54607+
var returnExpressions = [];
54608+
if (expression.kind === 182) {
54609+
var expressions = visitReturnedFunction(expression.expression);
54610+
for (var _i = 0, expressions_2 = expressions; _i < expressions_2.length; _i++) {
54611+
var returnExpression = expressions_2[_i];
54612+
var returns = visitReturnedFunction(returnExpression);
54613+
returnExpressions = returnExpressions.concat(returns);
54614+
}
54615+
return returnExpressions;
54616+
}
54617+
var functionBlocks = [];
54618+
switch (expression.kind) {
54619+
case 187:
54620+
functionBlocks.push(expression.body);
54621+
break;
54622+
case 180:
54623+
case 71:
54624+
var callerFileName = getSourceFileOfNode(expression).fileName;
54625+
var declarations = [];
54626+
getForwardDeclarations(expression, declarations, callerFileName);
54627+
for (var _a = 0, declarations_9 = declarations; _a < declarations_9.length; _a++) {
54628+
var declaration = declarations_9[_a];
54629+
var sourceFile = getSourceFileOfNode(declaration);
54630+
if (!sourceFile || sourceFile.isDeclarationFile) {
54631+
continue;
54632+
}
54633+
if (declaration.kind === 229 ||
54634+
declaration.kind === 152) {
54635+
functionBlocks.push(declaration.body);
54636+
}
54637+
}
54638+
break;
5459454639
}
54640+
for (var _b = 0, functionBlocks_1 = functionBlocks; _b < functionBlocks_1.length; _b++) {
54641+
var block = functionBlocks_1[_b];
54642+
for (var _c = 0, _d = block.statements; _c < _d.length; _c++) {
54643+
var statement = _d[_c];
54644+
if (statement.kind === 220) {
54645+
var returnExpression = statement.expression;
54646+
returnExpressions.push(returnExpression);
54647+
visitCallExpression(returnExpression);
54648+
}
54649+
}
54650+
}
54651+
return returnExpressions;
5459554652
}
5459654653
function escapeParenthesized(expression) {
5459754654
if (expression.kind === 186) {
@@ -54602,11 +54659,11 @@ var ts;
5460254659
function checkCallTarget(callerFileName, target) {
5460354660
var declarations = [];
5460454661
getForwardDeclarations(target, declarations, callerFileName);
54605-
for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
54606-
var declaration = declarations_9[_i];
54662+
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
54663+
var declaration = declarations_10[_i];
5460754664
var sourceFile = getSourceFileOfNode(declaration);
5460854665
if (!sourceFile || sourceFile.isDeclarationFile) {
54609-
return;
54666+
continue;
5461054667
}
5461154668
addDependency(callerFileName, sourceFile.fileName);
5461254669
if (declaration.kind === 229 ||
@@ -54686,14 +54743,15 @@ var ts;
5468654743
}
5468754744
}
5468854745
function visitBlock(block) {
54689-
if (!block || block.visitedBySorting) {
54746+
if (!block || visitedBlocks.indexOf(block) != -1) {
5469054747
return;
5469154748
}
54692-
block.visitedBySorting = true;
54749+
visitedBlocks.push(block);
5469354750
for (var _i = 0, _a = block.statements; _i < _a.length; _i++) {
5469454751
var statement = _a[_i];
5469554752
visitStatement(statement);
5469654753
}
54754+
visitedBlocks.pop();
5469754755
}
5469854756
function visitVariableList(variables) {
5469954757
if (!variables) {

lib/tsserver.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,10 +1303,10 @@ var ts;
13031303
var ts;
13041304
(function (ts) {
13051305
ts.versionMajorMinor = "2.7";
1306-
ts.version = ts.versionMajorMinor + ".2-dev.20180325";
1306+
ts.version = ts.versionMajorMinor + ".2";
13071307
})(ts || (ts = {}));
13081308
(function (ts) {
1309-
ts.version_plus = "2.7.3";
1309+
ts.version_plus = "2.7.4";
13101310
})(ts || (ts = {}));
13111311
(function (ts) {
13121312
function isExternalModuleNameRelative(moduleName) {

lib/tsserverlibrary.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ declare namespace ts {
28222822
const version: string;
28232823
}
28242824
declare namespace ts {
2825-
const version_plus = "2.7.3";
2825+
const version_plus = "2.7.4";
28262826
}
28272827
declare namespace ts {
28282828
function isExternalModuleNameRelative(moduleName: string): boolean;

lib/tsserverlibrary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,10 +1515,10 @@ var ts;
15151515
// If changing the text in this section, be sure to test `configureNightly` too.
15161516
ts.versionMajorMinor = "2.7";
15171517
/** The version of the TypeScript compiler release */
1518-
ts.version = ts.versionMajorMinor + ".2-dev.20180325";
1518+
ts.version = ts.versionMajorMinor + ".2";
15191519
})(ts || (ts = {}));
15201520
(function (ts) {
1521-
ts.version_plus = "2.7.3";
1521+
ts.version_plus = "2.7.4";
15221522
})(ts || (ts = {}));
15231523
(function (ts) {
15241524
function isExternalModuleNameRelative(moduleName) {

lib/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ declare namespace ts {
28222822
const version: string;
28232823
}
28242824
declare namespace ts {
2825-
const version_plus = "2.7.3";
2825+
const version_plus = "2.7.4";
28262826
}
28272827
declare namespace ts {
28282828
function isExternalModuleNameRelative(moduleName: string): boolean;

0 commit comments

Comments
 (0)