@typescript-deploys/pr-build 5.8.0-pr-60994-8 → 5.8.0-pr-61034-8

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 CHANGED
@@ -6824,6 +6824,7 @@ var Diagnostics = {
6824
6824
  This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),
6825
6825
  This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),
6826
6826
  Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
6827
+ Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'."),
6827
6828
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6828
6829
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6829
6830
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -49189,7 +49190,7 @@ function createTypeChecker(host) {
49189
49190
  moduleReference
49190
49191
  );
49191
49192
  }
49192
- if (errorNode && (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */)) {
49193
+ if (errorNode && (moduleKind === 100 /* Node16 */ || moduleKind === 101 /* Node18 */)) {
49193
49194
  const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
49194
49195
  const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
49195
49196
  if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
@@ -61082,12 +61083,6 @@ function createTypeChecker(host) {
61082
61083
  const name = getNameOfDeclaration(prop.valueDeclaration);
61083
61084
  type = prop.escapedName === "default" /* Default */ ? getStringLiteralType("default") : name && getLiteralTypeFromPropertyName(name) || (!isKnownSymbol(prop) ? getStringLiteralType(symbolName(prop)) : void 0);
61084
61085
  }
61085
- if (type && type.flags & 1048576 /* Union */) {
61086
- const unionType = type;
61087
- if (unionType.types.length > 0) {
61088
- type = unionType.types[0];
61089
- }
61090
- }
61091
61086
  if (type && type.flags & include) {
61092
61087
  return type;
61093
61088
  }
@@ -85303,6 +85298,9 @@ function createTypeChecker(host) {
85303
85298
  isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
85304
85299
  );
85305
85300
  }
85301
+ if (moduleKind === 199 /* NodeNext */ && !isImportAttributes2) {
85302
+ return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts);
85303
+ }
85306
85304
  if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
85307
85305
  return grammarErrorOnNode(
85308
85306
  node,
@@ -121269,11 +121267,13 @@ function createCreateProgramOptions(rootNames, options, host, oldProgram, config
121269
121267
  typeScriptVersion: typeScriptVersion2
121270
121268
  };
121271
121269
  }
121272
- function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
121270
+ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
121273
121271
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
121274
- const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
121275
- const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions;
121276
- let { oldProgram } = createProgramOptions;
121272
+ let _createProgramOptions = isArray(_rootNamesOrOptions) ? createCreateProgramOptions(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : _rootNamesOrOptions;
121273
+ const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2, host: createProgramOptionsHost } = _createProgramOptions;
121274
+ let { oldProgram } = _createProgramOptions;
121275
+ _createProgramOptions = void 0;
121276
+ _rootNamesOrOptions = void 0;
121277
121277
  for (const option of commandLineOptionOfCustomType) {
121278
121278
  if (hasProperty(options, option.name)) {
121279
121279
  if (typeof options[option.name] === "string") {
@@ -121313,7 +121313,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121313
121313
  true
121314
121314
  );
121315
121315
  mark("beforeProgram");
121316
- const host = createProgramOptions.host || createCompilerHost(options);
121316
+ const host = createProgramOptionsHost || createCompilerHost(options);
121317
121317
  const configParsingHost = parseConfigHostFromCompilerHostLike(host);
121318
121318
  let skipDefaultLib = options.noLib;
121319
121319
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
package/lib/typescript.js CHANGED
@@ -10210,6 +10210,7 @@ var Diagnostics = {
10210
10210
  This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),
10211
10211
  This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),
10212
10212
  Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
10213
+ Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'."),
10213
10214
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
10214
10215
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
10215
10216
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -53799,7 +53800,7 @@ function createTypeChecker(host) {
53799
53800
  moduleReference
53800
53801
  );
53801
53802
  }
53802
- if (errorNode && (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */)) {
53803
+ if (errorNode && (moduleKind === 100 /* Node16 */ || moduleKind === 101 /* Node18 */)) {
53803
53804
  const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
53804
53805
  const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
53805
53806
  if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
@@ -65692,12 +65693,6 @@ function createTypeChecker(host) {
65692
65693
  const name = getNameOfDeclaration(prop.valueDeclaration);
65693
65694
  type = prop.escapedName === "default" /* Default */ ? getStringLiteralType("default") : name && getLiteralTypeFromPropertyName(name) || (!isKnownSymbol(prop) ? getStringLiteralType(symbolName(prop)) : void 0);
65694
65695
  }
65695
- if (type && type.flags & 1048576 /* Union */) {
65696
- const unionType = type;
65697
- if (unionType.types.length > 0) {
65698
- type = unionType.types[0];
65699
- }
65700
- }
65701
65696
  if (type && type.flags & include) {
65702
65697
  return type;
65703
65698
  }
@@ -89913,6 +89908,9 @@ function createTypeChecker(host) {
89913
89908
  isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
89914
89909
  );
89915
89910
  }
89911
+ if (moduleKind === 199 /* NodeNext */ && !isImportAttributes2) {
89912
+ return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts);
89913
+ }
89916
89914
  if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
89917
89915
  return grammarErrorOnNode(
89918
89916
  node,
@@ -126118,11 +126116,13 @@ function createCreateProgramOptions(rootNames, options, host, oldProgram, config
126118
126116
  typeScriptVersion: typeScriptVersion3
126119
126117
  };
126120
126118
  }
126121
- function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
126119
+ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
126122
126120
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
126123
- const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
126124
- const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions;
126125
- let { oldProgram } = createProgramOptions;
126121
+ let _createProgramOptions = isArray(_rootNamesOrOptions) ? createCreateProgramOptions(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : _rootNamesOrOptions;
126122
+ const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3, host: createProgramOptionsHost } = _createProgramOptions;
126123
+ let { oldProgram } = _createProgramOptions;
126124
+ _createProgramOptions = void 0;
126125
+ _rootNamesOrOptions = void 0;
126126
126126
  for (const option of commandLineOptionOfCustomType) {
126127
126127
  if (hasProperty(options, option.name)) {
126128
126128
  if (typeof options[option.name] === "string") {
@@ -126162,7 +126162,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126162
126162
  true
126163
126163
  );
126164
126164
  mark("beforeProgram");
126165
- const host = createProgramOptions.host || createCompilerHost(options);
126165
+ const host = createProgramOptionsHost || createCompilerHost(options);
126166
126166
  const configParsingHost = parseConfigHostFromCompilerHostLike(host);
126167
126167
  let skipDefaultLib = options.noLib;
126168
126168
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
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.8.0-pr-60994-8",
5
+ "version": "5.8.0-pr-61034-8",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [