1
0
Эх сурвалжийг харах

update to latest typescript

Alex Dima 3 жил өмнө
parent
commit
d6f84c6e3b

+ 3 - 3
package-lock.json

@@ -461,9 +461,9 @@
 			}
 		},
 		"typescript": {
-			"version": "4.4.2",
-			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz",
-			"integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==",
+			"version": "4.4.3",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz",
+			"integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==",
 			"dev": true
 		},
 		"which": {

+ 1 - 1
package.json

@@ -32,7 +32,7 @@
 		"pretty-quick": "^3.1.0",
 		"requirejs": "^2.3.6",
 		"terser": "^5.6.0",
-		"typescript": "^4.4.2"
+		"typescript": "^4.4.3"
 	},
 	"husky": {
 		"hooks": {

+ 12 - 5
src/lib/typescriptServices-amd.js

@@ -297,7 +297,7 @@ var ts;
     // The following is baselined as a literal template type without intervention
     /** The version of the TypeScript compiler release */
     // eslint-disable-next-line @typescript-eslint/no-inferrable-types
-    ts.version = "4.4.2";
+    ts.version = "4.4.3";
     /* @internal */
     var Comparison;
     (function (Comparison) {
@@ -117645,6 +117645,10 @@ var ts;
                 });
                 parsedConfigs = undefined;
             }
+            if (packageJsonMap) {
+                ts.clearMap(packageJsonMap, ts.closeFileWatcher);
+                packageJsonMap = undefined;
+            }
         }
         function getCurrentBuilderProgram() {
             return builderProgram;
@@ -126708,13 +126712,16 @@ var ts;
                         case 204 /* PropertyAccessExpression */:
                             propertyAccessToConvert = parent;
                             node = propertyAccessToConvert.expression;
-                            if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
-                                node.end === contextToken.pos &&
-                                node.getChildCount(sourceFile) &&
-                                ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
+                            var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
+                            if (ts.nodeIsMissing(leftmostAccessExpression) ||
+                                ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
+                                    node.end === contextToken.pos &&
+                                    node.getChildCount(sourceFile) &&
+                                    ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
                                 // This is likely dot from incorrectly parsed expression and user is starting to write spread
                                 // eg: Math.min(./**/)
                                 // const x = function (./**/) {}
+                                // ({./**/})
                                 return undefined;
                             }
                             break;

+ 12 - 5
src/lib/typescriptServices.js

@@ -297,7 +297,7 @@ var ts;
     // The following is baselined as a literal template type without intervention
     /** The version of the TypeScript compiler release */
     // eslint-disable-next-line @typescript-eslint/no-inferrable-types
-    ts.version = "4.4.2";
+    ts.version = "4.4.3";
     /* @internal */
     var Comparison;
     (function (Comparison) {
@@ -117645,6 +117645,10 @@ var ts;
                 });
                 parsedConfigs = undefined;
             }
+            if (packageJsonMap) {
+                ts.clearMap(packageJsonMap, ts.closeFileWatcher);
+                packageJsonMap = undefined;
+            }
         }
         function getCurrentBuilderProgram() {
             return builderProgram;
@@ -126708,13 +126712,16 @@ var ts;
                         case 204 /* PropertyAccessExpression */:
                             propertyAccessToConvert = parent;
                             node = propertyAccessToConvert.expression;
-                            if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
-                                node.end === contextToken.pos &&
-                                node.getChildCount(sourceFile) &&
-                                ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
+                            var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
+                            if (ts.nodeIsMissing(leftmostAccessExpression) ||
+                                ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
+                                    node.end === contextToken.pos &&
+                                    node.getChildCount(sourceFile) &&
+                                    ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
                                 // This is likely dot from incorrectly parsed expression and user is starting to write spread
                                 // eg: Math.min(./**/)
                                 // const x = function (./**/) {}
+                                // ({./**/})
                                 return undefined;
                             }
                             break;

+ 1 - 1
src/lib/typescriptServicesMetadata.ts

@@ -2,4 +2,4 @@
 // **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`
 //
 
-export const typescriptVersion = "4.4.2";
+export const typescriptVersion = "4.4.3";