@typescript-deploys/pr-build 5.4.0-pr-57114-8 → 5.4.0-pr-57122-12

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
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.4";
21
- var version = `${versionMajorMinor}.0-insiders.20240121`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240122`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3960,6 +3960,9 @@ var defaultChunkLevels = { Low: 32, Medium: 64, High: 256 };
3960
3960
  var pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
3961
3961
  var unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
3962
3962
  function setCustomPollingValues(system) {
3963
+ if (!system.getEnvironmentVariable) {
3964
+ return;
3965
+ }
3963
3966
  const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);
3964
3967
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
3965
3968
  unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds;
@@ -43248,7 +43251,7 @@ function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory,
43248
43251
  return processEnding(shortest, allowedEndings, compilerOptions);
43249
43252
  }
43250
43253
  function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
43251
- if (!host.readFile) {
43254
+ if (!host.fileExists || !host.readFile) {
43252
43255
  return void 0;
43253
43256
  }
43254
43257
  const parts = getNodeModulePathParts(path);
@@ -43355,6 +43358,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
43355
43358
  }
43356
43359
  }
43357
43360
  function tryGetAnyFileFromPath(host, path) {
43361
+ if (!host.fileExists)
43362
+ return;
43358
43363
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 /* JSON */ }]));
43359
43364
  for (const e of extensions) {
43360
43365
  const fullPath = path + e;
@@ -55304,11 +55309,15 @@ function createTypeChecker(host) {
55304
55309
  return type.resolvedApparentType || (type.resolvedApparentType = getResolvedApparentTypeOfMappedType(type));
55305
55310
  }
55306
55311
  function getResolvedApparentTypeOfMappedType(type) {
55307
- const typeVariable = getHomomorphicTypeVariable(type);
55308
- if (typeVariable && !type.declaration.nameType) {
55309
- const constraint = getConstraintOfTypeParameter(typeVariable);
55310
- if (constraint && everyType(constraint, isArrayOrTupleType)) {
55311
- return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper));
55312
+ const target = type.target ?? type;
55313
+ const typeVariable = getHomomorphicTypeVariable(target);
55314
+ if (typeVariable && !target.declaration.nameType) {
55315
+ const constraint = getConstraintTypeFromMappedType(type);
55316
+ if (constraint.flags & 4194304 /* Index */) {
55317
+ const baseConstraint = getBaseConstraintOfType(constraint.type);
55318
+ if (baseConstraint && everyType(baseConstraint, isArrayOrTupleType)) {
55319
+ return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
55320
+ }
55312
55321
  }
55313
55322
  }
55314
55323
  return type;
@@ -78792,7 +78801,7 @@ function createTypeChecker(host) {
78792
78801
  }
78793
78802
  }
78794
78803
  function helper(condExpr2, body2) {
78795
- const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : isPrefixUnaryExpression(condExpr2) ? condExpr2.operand : condExpr2;
78804
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
78796
78805
  if (isModuleExportsAccessExpression(location)) {
78797
78806
  return;
78798
78807
  }
@@ -78804,8 +78813,7 @@ function createTypeChecker(host) {
78804
78813
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
78805
78814
  if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast)
78806
78815
  return;
78807
- const testedType = isPrefixUnaryExpression(condExpr2) ? checkExpression(location) : type;
78808
- const callSignatures = getSignaturesOfType(testedType, 0 /* Call */);
78816
+ const callSignatures = getSignaturesOfType(type, 0 /* Call */);
78809
78817
  const isPromise = !!getAwaitedTypeOfPromise(type);
78810
78818
  if (callSignatures.length === 0 && !isPromise) {
78811
78819
  return;
package/lib/tsserver.js CHANGED
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
2340
2340
 
2341
2341
  // src/compiler/corePublic.ts
2342
2342
  var versionMajorMinor = "5.4";
2343
- var version = `${versionMajorMinor}.0-insiders.20240121`;
2343
+ var version = `${versionMajorMinor}.0-insiders.20240122`;
2344
2344
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2345
2345
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2346
2346
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7503,6 +7503,9 @@ var defaultChunkLevels = { Low: 32, Medium: 64, High: 256 };
7503
7503
  var pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
7504
7504
  var unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
7505
7505
  function setCustomPollingValues(system) {
7506
+ if (!system.getEnvironmentVariable) {
7507
+ return;
7508
+ }
7506
7509
  const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);
7507
7510
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
7508
7511
  unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds;
@@ -47983,7 +47986,7 @@ function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory,
47983
47986
  return processEnding(shortest, allowedEndings, compilerOptions);
47984
47987
  }
47985
47988
  function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
47986
- if (!host.readFile) {
47989
+ if (!host.fileExists || !host.readFile) {
47987
47990
  return void 0;
47988
47991
  }
47989
47992
  const parts = getNodeModulePathParts(path);
@@ -48090,6 +48093,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
48090
48093
  }
48091
48094
  }
48092
48095
  function tryGetAnyFileFromPath(host, path) {
48096
+ if (!host.fileExists)
48097
+ return;
48093
48098
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 /* JSON */ }]));
48094
48099
  for (const e of extensions) {
48095
48100
  const fullPath = path + e;
@@ -60039,11 +60044,15 @@ function createTypeChecker(host) {
60039
60044
  return type.resolvedApparentType || (type.resolvedApparentType = getResolvedApparentTypeOfMappedType(type));
60040
60045
  }
60041
60046
  function getResolvedApparentTypeOfMappedType(type) {
60042
- const typeVariable = getHomomorphicTypeVariable(type);
60043
- if (typeVariable && !type.declaration.nameType) {
60044
- const constraint = getConstraintOfTypeParameter(typeVariable);
60045
- if (constraint && everyType(constraint, isArrayOrTupleType)) {
60046
- return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper));
60047
+ const target = type.target ?? type;
60048
+ const typeVariable = getHomomorphicTypeVariable(target);
60049
+ if (typeVariable && !target.declaration.nameType) {
60050
+ const constraint = getConstraintTypeFromMappedType(type);
60051
+ if (constraint.flags & 4194304 /* Index */) {
60052
+ const baseConstraint = getBaseConstraintOfType(constraint.type);
60053
+ if (baseConstraint && everyType(baseConstraint, isArrayOrTupleType)) {
60054
+ return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
60055
+ }
60047
60056
  }
60048
60057
  }
60049
60058
  return type;
@@ -83527,7 +83536,7 @@ function createTypeChecker(host) {
83527
83536
  }
83528
83537
  }
83529
83538
  function helper(condExpr2, body2) {
83530
- const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : isPrefixUnaryExpression(condExpr2) ? condExpr2.operand : condExpr2;
83539
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
83531
83540
  if (isModuleExportsAccessExpression(location)) {
83532
83541
  return;
83533
83542
  }
@@ -83539,8 +83548,7 @@ function createTypeChecker(host) {
83539
83548
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
83540
83549
  if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast)
83541
83550
  return;
83542
- const testedType = isPrefixUnaryExpression(condExpr2) ? checkExpression(location) : type;
83543
- const callSignatures = getSignaturesOfType(testedType, 0 /* Call */);
83551
+ const callSignatures = getSignaturesOfType(type, 0 /* Call */);
83544
83552
  const isPromise = !!getAwaitedTypeOfPromise(type);
83545
83553
  if (callSignatures.length === 0 && !isPromise) {
83546
83554
  return;
@@ -134970,6 +134978,9 @@ function findPackageJson(directory, host) {
134970
134978
  return packageJson;
134971
134979
  }
134972
134980
  function getPackageJsonsVisibleToFile(fileName, host) {
134981
+ if (!host.fileExists) {
134982
+ return [];
134983
+ }
134973
134984
  const packageJsons = [];
134974
134985
  forEachAncestorDirectory(getDirectoryPath(fileName), (ancestor) => {
134975
134986
  const packageJsonFileName = combinePaths(ancestor, "package.json");
@@ -163399,6 +163410,8 @@ function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDire
163399
163410
  }
163400
163411
  }
163401
163412
  function enumerateNodeModulesVisibleToScript(host, scriptPath) {
163413
+ if (!host.readFile || !host.fileExists)
163414
+ return emptyArray;
163402
163415
  const result = [];
163403
163416
  for (const packageJson of findPackageJsons(scriptPath, host)) {
163404
163417
  const contents = readJson(packageJson, host);
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.4";
38
- version = `${versionMajorMinor}.0-insiders.20240121`;
38
+ version = `${versionMajorMinor}.0-insiders.20240122`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -5238,6 +5238,9 @@ ${lanes.join("\n")}
5238
5238
  };
5239
5239
  }
5240
5240
  function setCustomPollingValues(system) {
5241
+ if (!system.getEnvironmentVariable) {
5242
+ return;
5243
+ }
5241
5244
  const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);
5242
5245
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
5243
5246
  unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds;
@@ -45836,7 +45839,7 @@ ${lanes.join("\n")}
45836
45839
  return processEnding(shortest, allowedEndings, compilerOptions);
45837
45840
  }
45838
45841
  function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
45839
- if (!host.readFile) {
45842
+ if (!host.fileExists || !host.readFile) {
45840
45843
  return void 0;
45841
45844
  }
45842
45845
  const parts = getNodeModulePathParts(path);
@@ -45943,6 +45946,8 @@ ${lanes.join("\n")}
45943
45946
  }
45944
45947
  }
45945
45948
  function tryGetAnyFileFromPath(host, path) {
45949
+ if (!host.fileExists)
45950
+ return;
45946
45951
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 /* JSON */ }]));
45947
45952
  for (const e of extensions) {
45948
45953
  const fullPath = path + e;
@@ -57793,11 +57798,15 @@ ${lanes.join("\n")}
57793
57798
  return type.resolvedApparentType || (type.resolvedApparentType = getResolvedApparentTypeOfMappedType(type));
57794
57799
  }
57795
57800
  function getResolvedApparentTypeOfMappedType(type) {
57796
- const typeVariable = getHomomorphicTypeVariable(type);
57797
- if (typeVariable && !type.declaration.nameType) {
57798
- const constraint = getConstraintOfTypeParameter(typeVariable);
57799
- if (constraint && everyType(constraint, isArrayOrTupleType)) {
57800
- return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper));
57801
+ const target = type.target ?? type;
57802
+ const typeVariable = getHomomorphicTypeVariable(target);
57803
+ if (typeVariable && !target.declaration.nameType) {
57804
+ const constraint = getConstraintTypeFromMappedType(type);
57805
+ if (constraint.flags & 4194304 /* Index */) {
57806
+ const baseConstraint = getBaseConstraintOfType(constraint.type);
57807
+ if (baseConstraint && everyType(baseConstraint, isArrayOrTupleType)) {
57808
+ return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
57809
+ }
57801
57810
  }
57802
57811
  }
57803
57812
  return type;
@@ -81281,7 +81290,7 @@ ${lanes.join("\n")}
81281
81290
  }
81282
81291
  }
81283
81292
  function helper(condExpr2, body2) {
81284
- const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : isPrefixUnaryExpression(condExpr2) ? condExpr2.operand : condExpr2;
81293
+ const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
81285
81294
  if (isModuleExportsAccessExpression(location)) {
81286
81295
  return;
81287
81296
  }
@@ -81293,8 +81302,7 @@ ${lanes.join("\n")}
81293
81302
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
81294
81303
  if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast)
81295
81304
  return;
81296
- const testedType = isPrefixUnaryExpression(condExpr2) ? checkExpression(location) : type;
81297
- const callSignatures = getSignaturesOfType(testedType, 0 /* Call */);
81305
+ const callSignatures = getSignaturesOfType(type, 0 /* Call */);
81298
81306
  const isPromise = !!getAwaitedTypeOfPromise(type);
81299
81307
  if (callSignatures.length === 0 && !isPromise) {
81300
81308
  return;
@@ -133216,6 +133224,9 @@ ${lanes.join("\n")}
133216
133224
  return packageJson;
133217
133225
  }
133218
133226
  function getPackageJsonsVisibleToFile(fileName, host) {
133227
+ if (!host.fileExists) {
133228
+ return [];
133229
+ }
133219
133230
  const packageJsons = [];
133220
133231
  forEachAncestorDirectory(getDirectoryPath(fileName), (ancestor) => {
133221
133232
  const packageJsonFileName = combinePaths(ancestor, "package.json");
@@ -162665,6 +162676,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
162665
162676
  }
162666
162677
  }
162667
162678
  function enumerateNodeModulesVisibleToScript(host, scriptPath) {
162679
+ if (!host.readFile || !host.fileExists)
162680
+ return emptyArray;
162668
162681
  const result = [];
162669
162682
  for (const packageJson of findPackageJsons(scriptPath, host)) {
162670
162683
  const contents = readJson(packageJson, host);
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.4";
57
- var version = `${versionMajorMinor}.0-insiders.20240121`;
57
+ var version = `${versionMajorMinor}.0-insiders.20240122`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -3375,6 +3375,9 @@ var defaultChunkLevels = { Low: 32, Medium: 64, High: 256 };
3375
3375
  var pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);
3376
3376
  var unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);
3377
3377
  function setCustomPollingValues(system) {
3378
+ if (!system.getEnvironmentVariable) {
3379
+ return;
3380
+ }
3378
3381
  const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);
3379
3382
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
3380
3383
  unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds;
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.4.0-pr-57114-8",
5
+ "version": "5.4.0-pr-57122-12",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "75cebdfb67c0785301f10a8fe3986e50430c87ac"
117
+ "gitHead": "ecb1a62f5afa6d60894c8662f03341cf81c26d6d"
118
118
  }