@typescript-deploys/pr-build 5.3.0-pr-55576-6 → 5.3.0-pr-54647-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +1 -1
- package/lib/tsserver.js +7 -3
- package/lib/typescript.js +7 -3
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -7688,7 +7688,7 @@ var Diagnostics = {
|
|
|
7688
7688
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7689
7689
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7690
7690
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7691
|
-
|
|
7691
|
+
Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
|
|
7692
7692
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
7693
7693
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7694
7694
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
package/lib/tsserver.js
CHANGED
|
@@ -11207,7 +11207,7 @@ var Diagnostics = {
|
|
|
11207
11207
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
11208
11208
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
11209
11209
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
11210
|
-
|
|
11210
|
+
Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
|
|
11211
11211
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
11212
11212
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
11213
11213
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -140407,12 +140407,16 @@ function getRefactorActionsToConvertToTemplateString(context) {
|
|
|
140407
140407
|
const { file, startPosition } = context;
|
|
140408
140408
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
140409
140409
|
const maybeBinary = getParentBinaryExpression(node);
|
|
140410
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
140410
140411
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
140411
|
-
if (
|
|
140412
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
140413
|
+
return emptyArray;
|
|
140414
|
+
}
|
|
140415
|
+
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
140412
140416
|
refactorInfo.actions.push(convertStringAction);
|
|
140413
140417
|
return [refactorInfo];
|
|
140414
140418
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
140415
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
140419
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
|
|
140416
140420
|
return [refactorInfo];
|
|
140417
140421
|
}
|
|
140418
140422
|
return emptyArray;
|
package/lib/typescript.js
CHANGED
|
@@ -8990,7 +8990,7 @@ ${lanes.join("\n")}
|
|
|
8990
8990
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
8991
8991
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
8992
8992
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
8993
|
-
|
|
8993
|
+
Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
|
|
8994
8994
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
8995
8995
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
8996
8996
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -138869,12 +138869,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
138869
138869
|
const { file, startPosition } = context;
|
|
138870
138870
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
138871
138871
|
const maybeBinary = getParentBinaryExpression(node);
|
|
138872
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
138872
138873
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
138873
|
-
if (
|
|
138874
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
138875
|
+
return emptyArray;
|
|
138876
|
+
}
|
|
138877
|
+
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
138874
138878
|
refactorInfo.actions.push(convertStringAction);
|
|
138875
138879
|
return [refactorInfo];
|
|
138876
138880
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
138877
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
138881
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
|
|
138878
138882
|
return [refactorInfo];
|
|
138879
138883
|
}
|
|
138880
138884
|
return emptyArray;
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -7065,7 +7065,7 @@ var Diagnostics = {
|
|
|
7065
7065
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7066
7066
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7067
7067
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7068
|
-
|
|
7068
|
+
Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
|
|
7069
7069
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
7070
7070
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7071
7071
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-54647-9",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "130952dca545d5f8d12a02fe7260d80874d37ad1"
|
|
117
117
|
}
|