@typescript-deploys/pr-build 4.6.0-pr-45974-9 → 4.7.0-pr-45974-15

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.
@@ -85,11 +85,11 @@ var ts;
85
85
  (function (ts) {
86
86
  // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
87
87
  // If changing the text in this section, be sure to test `configurePrerelease` too.
88
- ts.versionMajorMinor = "4.6";
88
+ ts.versionMajorMinor = "4.7";
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-insiders.20220211";
92
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220214";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -42461,7 +42461,13 @@ var ts;
42461
42461
  onlyRecordFailures = true;
42462
42462
  }
42463
42463
  }
42464
- return loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson);
42464
+ // esm mode relative imports shouldn't do any directory lookups (either inside `package.json`
42465
+ // files or implicit `index.js`es). This is a notable depature from cjs norms, where `./foo/pkg`
42466
+ // could have been redirected by `./foo/pkg/package.json` to an arbitrary location!
42467
+ if (!(state.features & NodeResolutionFeatures.EsmMode)) {
42468
+ return loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson);
42469
+ }
42470
+ return undefined;
42465
42471
  }
42466
42472
  /*@internal*/
42467
42473
  ts.nodeModulesPathPart = "/node_modules/";
@@ -43173,6 +43179,14 @@ var ts;
43173
43179
  }
43174
43180
  var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
43175
43181
  loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
43182
+ if (!pathAndExtension && packageInfo
43183
+ && packageInfo.packageJsonContent.exports === undefined
43184
+ && packageInfo.packageJsonContent.main === undefined
43185
+ && state.features & NodeResolutionFeatures.EsmMode) {
43186
+ // EsmMode disables index lookup in `loadNodeModuleFromDirectoryWorker` generally, however non-relative package resolutions still assume
43187
+ // a default `index.js` entrypoint if no `main` or `exports` are present
43188
+ pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
43189
+ }
43176
43190
  return withPackageId(packageInfo, pathAndExtension);
43177
43191
  };
43178
43192
  if (rest !== "") { // If "rest" is empty, we just did this search above.
@@ -44167,7 +44181,7 @@ var ts;
44167
44181
  return ts.isDottedName(expr)
44168
44182
  || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression)
44169
44183
  || ts.isBinaryExpression(expr) && expr.operatorToken.kind === 27 /* CommaToken */ && isNarrowableReference(expr.right)
44170
- || ts.isElementAccessExpression(expr) && (ts.isStringOrNumericLiteralLike(expr.argumentExpression) || ts.isIdentifier(expr.argumentExpression)) && isNarrowableReference(expr.expression)
44184
+ || ts.isElementAccessExpression(expr) && (ts.isStringOrNumericLiteralLike(expr.argumentExpression) || ts.isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression)
44171
44185
  || ts.isAssignmentExpression(expr) && isNarrowableReference(expr.left);
44172
44186
  }
44173
44187
  function containsNarrowableReference(expr) {
@@ -50390,8 +50404,15 @@ var ts;
50390
50404
  return res;
50391
50405
  }
50392
50406
  var candidates = ts.mapDefined(symbol.declarations, function (d) {
50393
- if (!ts.isAmbientModule(d) && d.parent && hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) {
50394
- return getSymbolOfNode(d.parent);
50407
+ if (!ts.isAmbientModule(d) && d.parent) {
50408
+ // direct children of a module
50409
+ if (hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) {
50410
+ return getSymbolOfNode(d.parent);
50411
+ }
50412
+ // export ='d member of an ambient module
50413
+ if (ts.isModuleBlock(d.parent) && d.parent.parent && resolveExternalModuleSymbol(getSymbolOfNode(d.parent.parent)) === symbol) {
50414
+ return getSymbolOfNode(d.parent.parent);
50415
+ }
50395
50416
  }
50396
50417
  if (ts.isClassExpression(d) && ts.isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 63 /* EqualsToken */ && ts.isAccessExpression(d.parent.left) && ts.isEntityNameExpression(d.parent.left.expression)) {
50397
50418
  if (ts.isModuleExportsAccessExpression(d.parent.left) || ts.isExportsIdentifier(d.parent.left.expression)) {
@@ -63126,9 +63147,11 @@ var ts;
63126
63147
  isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
63127
63148
  return true;
63128
63149
  }
63129
- if (s & 32768 /* Undefined */ && (!strictNullChecks || t & (32768 /* Undefined */ | 16384 /* Void */)))
63150
+ // In non-strictNullChecks mode, `undefined` and `null` are assignable to anything except `never`.
63151
+ // Since unions and intersections may reduce to `never`, we exclude them here.
63152
+ if (s & 32768 /* Undefined */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & (32768 /* Undefined */ | 16384 /* Void */)))
63130
63153
  return true;
63131
- if (s & 65536 /* Null */ && (!strictNullChecks || t & 65536 /* Null */))
63154
+ if (s & 65536 /* Null */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & 65536 /* Null */))
63132
63155
  return true;
63133
63156
  if (s & 524288 /* Object */ && t & 67108864 /* NonPrimitive */)
63134
63157
  return true;
@@ -64584,6 +64607,11 @@ var ts;
64584
64607
  }
64585
64608
  if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && source.target === target.target &&
64586
64609
  !isTupleType(source) && !(ts.getObjectFlags(source) & 4096 /* MarkerType */ || ts.getObjectFlags(target) & 4096 /* MarkerType */)) {
64610
+ // When strictNullChecks is disabled, the element type of the empty array literal is undefinedWideningType,
64611
+ // and an empty array literal wouldn't be assignable to a `never[]` without this check.
64612
+ if (isEmptyArrayLiteralType(source)) {
64613
+ return -1 /* True */;
64614
+ }
64587
64615
  // We have type references to the same generic type, and the type references are not marker
64588
64616
  // type references (which are intended by be compared structurally). Obtain the variance
64589
64617
  // information for the type parameters and relate the type arguments accordingly.
@@ -64890,6 +64918,15 @@ var ts;
64890
64918
  }
64891
64919
  return 0 /* False */;
64892
64920
  }
64921
+ // Ensure {readonly a: whatever} is not a subtype of {a: whatever},
64922
+ // while {a: whatever} is a subtype of {readonly a: whatever}.
64923
+ // This ensures the subtype relationship is ordered, and preventing declaration order
64924
+ // from deciding which type "wins" in union subtype reduction.
64925
+ // They're still assignable to one another, since `readonly` doesn't affect assignability.
64926
+ if ((relation === subtypeRelation || relation === strictSubtypeRelation) &&
64927
+ !!(sourcePropFlags & 64 /* Readonly */) && !(targetPropFlags & 64 /* Readonly */)) {
64928
+ return 0 /* False */;
64929
+ }
64893
64930
  // If the target comes from a partial union prop, allow `undefined` in the target type
64894
64931
  var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState);
64895
64932
  if (!related) {
@@ -67831,9 +67868,9 @@ var ts;
67831
67868
  if (ts.isStringOrNumericLiteralLike(node.argumentExpression)) {
67832
67869
  return ts.escapeLeadingUnderscores(node.argumentExpression.text);
67833
67870
  }
67834
- if (ts.isIdentifier(node.argumentExpression)) {
67835
- var symbol = getResolvedSymbol(node.argumentExpression);
67836
- if (!isConstVariable(symbol))
67871
+ if (ts.isEntityNameExpression(node.argumentExpression)) {
67872
+ var symbol = resolveEntityName(node.argumentExpression, 111551 /* Value */, /*ignoreErrors*/ true);
67873
+ if (!symbol || !isConstVariable(symbol))
67837
67874
  return undefined;
67838
67875
  var declaration = symbol.valueDeclaration;
67839
67876
  if (declaration === undefined)
@@ -347,6 +347,7 @@
347
347
  "Cannot_start_a_function_call_in_a_type_annotation_1441": "无法在类型注释中启动函数调用。",
348
348
  "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "无法更新项目 \"{0}\" 的输出,因为读取文件 \"{1}\" 时出错",
349
349
  "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "无法使用 JSX,除非提供了 \"--jsx\" 标志。",
350
+ "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269": "在提供 “--isolatedModules” 标志时,无法在类型或仅类型命名空间上使用“导出导入”。",
350
351
  "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "当 \"--module\" 为 \"none\" 时无法使用导入、导出或模块扩大。",
351
352
  "Cannot_use_namespace_0_as_a_type_2709": "不能将命名空间“{0}”用作类型。",
352
353
  "Cannot_use_namespace_0_as_a_value_2708": "不能将命名空间“{0}”用作值。",
@@ -500,7 +501,9 @@
500
501
  "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "以下标识符的定义与另一个文件中的定义冲突: {0}",
501
502
  "Delete_all_unused_declarations_95024": "删除未使用的所有声明",
502
503
  "Delete_all_unused_imports_95147": "删除所有未使用的导入",
504
+ "Delete_all_unused_param_tags_95172": "删除所有未使用的 “@param” 标记",
503
505
  "Delete_the_outputs_of_all_projects_6365": "删除所有项目的输出",
506
+ "Delete_unused_param_tag_0_95171": "删除未使用的 “@param” 标记“{0}”",
504
507
  "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[已弃用] 请改用 \"--jsxFactory\"。已 \"react\" JSX 发出设为目标时,请指定要为 createElement 调用的对象",
505
508
  "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[已弃用] 请改用 \"--outFile\"。连接并发出到单个文件的输出",
506
509
  "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[已弃用] 请改用 \"--skipLibCheck\"。请跳过默认库声明文件的类型检查。",
@@ -1180,6 +1183,7 @@
1180
1183
  "Remove_unused_destructuring_declaration_90039": "删除未使用的解构声明",
1181
1184
  "Remove_unused_label_95053": "删除未使用的标签",
1182
1185
  "Remove_variable_statement_90010": "删除变量语句",
1186
+ "Rename_param_tag_name_0_to_1_95173": "将 “@param” 标记名称“{0}”重命名为“{1}”",
1183
1187
  "Replace_0_with_Promise_1_90036": "将 \"{0}\" 替换为 \"Promise<{1}>\"",
1184
1188
  "Replace_all_unused_infer_with_unknown_90031": "将所有未使用的 \"infer\" 替换为 \"unknown\"",
1185
1189
  "Replace_import_with_0_95015": "用“{0}”替换导入。",
@@ -54,7 +54,7 @@
54
54
  "A_module_cannot_have_multiple_default_exports_2528": "一個模組不得有多個預設匯出。",
55
55
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "命名空間宣告的所在檔案位置,不得與其要合併的類別或函式不同。",
56
56
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "命名空間宣告的位置不得先於其要合併的類別或函式。",
57
- "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "只有命名空間或模組才允許命名空間宣告。",
57
+ "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "命名空間宣告只允許在命名空間或模組的頂層。",
58
58
  "A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384": "具有型別引數的 'new' 運算式後面必須永遠接著以括號括住的引數清單。",
59
59
  "A_non_dry_build_would_build_project_0_6357": "非 -dry 組建會建置專案 '{0}'",
60
60
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry 組建會刪除下列檔案: {0}",
@@ -199,7 +199,8 @@
199
199
  "An_export_assignment_cannot_be_used_in_a_namespace_1063": "命名空間中不可使用匯出指派。",
200
200
  "An_export_assignment_cannot_have_modifiers_1120": "匯出指派不得有修飾元。",
201
201
  "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231": "匯出指派必須位於檔案或模組宣告的最上層。",
202
- "An_export_declaration_can_only_be_used_in_a_module_1233": "匯出宣告只可用於模組中。",
202
+ "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474": "匯出宣告只能在模組的頂層使用。",
203
+ "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233": "匯出宣告只能在命名空間或模組的頂層使用。",
203
204
  "An_export_declaration_cannot_have_modifiers_1193": "匯出宣告不得有修飾元。",
204
205
  "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345": "無法對 'void' 類型的運算式測試真實性。",
205
206
  "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "擴充的 Unicode 逸出值必須介於 0x0 與 0x10FFFF (不含) 之間。",
@@ -208,7 +209,8 @@
208
209
  "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379": "匯入別名不能參考使用 'export type' 匯出的宣告。",
209
210
  "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380": "匯入別名不能參考使用 'import type' 匯入的宣告。",
210
211
  "An_import_alias_cannot_use_import_type_1392": "匯入別名不能使用 'import type'",
211
- "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232": "匯入宣告只可用於命名空間或模組中。",
212
+ "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473": "匯入宣告只能在模組的頂層使用。",
213
+ "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232": "匯入宣告只能在命名空間或模組的頂層使用。",
212
214
  "An_import_declaration_cannot_have_modifiers_1191": "匯入宣告不得有修飾元。",
213
215
  "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691": "匯入路徑的結尾不得為 '{0}' 副檔名。請考慮改為匯入 '{1}'。",
214
216
  "An_index_signature_cannot_have_a_rest_parameter_1017": "索引簽章不得有剩餘參數。",
@@ -345,6 +347,7 @@
345
347
  "Cannot_start_a_function_call_in_a_type_annotation_1441": "無法在類型註釋中啟動函式呼叫。",
346
348
  "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376": "因為讀取檔案 '{1}' 時發生錯誤,所以無法更新專案 '{0}' 的輸出",
347
349
  "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004": "除非有提供 '--jsx' 旗標,否則無法使用 JSX。",
350
+ "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269": "提供 '--isolatedModules' 旗標時,無法在類型或僅類型命名空間上使用 'export import'。",
348
351
  "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148": "當 '--module' 為 'none' 時,無法使用匯入、匯出或模組增強指定。",
349
352
  "Cannot_use_namespace_0_as_a_type_2709": "不得使用命名空間 '{0}' 作為類型。",
350
353
  "Cannot_use_namespace_0_as_a_value_2708": "不得使用命名空間 '{0}' 作為值。",
@@ -498,7 +501,9 @@
498
501
  "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200": "下列識別碼的定義與其他檔案中的定義衝突: {0}",
499
502
  "Delete_all_unused_declarations_95024": "刪除所有未使用的宣告",
500
503
  "Delete_all_unused_imports_95147": "刪除所有未使用的匯入",
504
+ "Delete_all_unused_param_tags_95172": "刪除所有未使用的 '@param' 標籤",
501
505
  "Delete_the_outputs_of_all_projects_6365": "刪除所有專案的輸出",
506
+ "Delete_unused_param_tag_0_95171": "刪除未使用的 '@param' 標記 '{0}'",
502
507
  "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[即將淘汰] 請改用 '--jsxFactory'。當目標為 'react' JSX 發出時,為 createElement 指定所叫用的物件",
503
508
  "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[即將淘汰] 請改用 '--outFile'。 串連輸出並將其發出到單一檔案",
504
509
  "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[即將淘汰] 請改用 '--skipLibCheck'。跳過預設程式庫宣告檔案的類型檢查。",
@@ -1178,6 +1183,7 @@
1178
1183
  "Remove_unused_destructuring_declaration_90039": "移除未使用的解構宣告",
1179
1184
  "Remove_unused_label_95053": "移除未使用的標籤",
1180
1185
  "Remove_variable_statement_90010": "移除變數陳述式",
1186
+ "Rename_param_tag_name_0_to_1_95173": "將 '@param' 標籤名稱 '{0}' 重新命名為'{1}'",
1181
1187
  "Replace_0_with_Promise_1_90036": "將 '{0}' 取代為 'Promise<{1}>'",
1182
1188
  "Replace_all_unused_infer_with_unknown_90031": "以 'unknown' 取代所有未使用的 'infer'",
1183
1189
  "Replace_import_with_0_95015": "以 '{0}' 取代匯入。",
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": "4.6.0-pr-45974-9",
5
+ "version": "4.7.0-pr-45974-15",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [