@typescript-deploys/pr-build 5.8.0-pr-60755-11 → 5.8.0-pr-60795-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
@@ -5502,21 +5502,7 @@ function getNormalizedPathComponents(path, currentDirectory) {
5502
5502
  return reducePathComponents(getPathComponents(path, currentDirectory));
5503
5503
  }
5504
5504
  function getNormalizedAbsolutePath(fileName, currentDirectory) {
5505
- fileName = normalizeSlashes(fileName);
5506
- if (isNotNormalizedOrAbsolute(fileName)) {
5507
- return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
5508
- }
5509
- return fileName;
5510
- }
5511
- function isNotNormalizedOrAbsolute(s) {
5512
- if (getEncodedRootLength(s) === 0) {
5513
- return true;
5514
- }
5515
- const lastChar = s.charCodeAt(s.length - 1);
5516
- if (lastChar === 47 /* slash */) {
5517
- return true;
5518
- }
5519
- return relativePathSegmentRegExp.test(s);
5505
+ return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
5520
5506
  }
5521
5507
  function normalizePath(path) {
5522
5508
  path = normalizeSlashes(path);
@@ -45144,9 +45130,7 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
45144
45130
  if (!baseUrl && !paths && !getResolvePackageJsonImports(compilerOptions) || relativePreference === 0 /* Relative */) {
45145
45131
  return pathsOnly ? void 0 : relativePath;
45146
45132
  }
45147
- const currentDirectory = host.getCurrentDirectory();
45148
- const basePath = getPathsBasePath(compilerOptions, host) ?? baseUrl ?? currentDirectory;
45149
- const baseDirectory = getNormalizedAbsolutePath(basePath, currentDirectory);
45133
+ const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
45150
45134
  const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName);
45151
45135
  if (!relativeToBaseUrl) {
45152
45136
  return pathsOnly ? void 0 : relativePath;
@@ -70230,6 +70214,7 @@ function createTypeChecker(host) {
70230
70214
  if (checkDerived) {
70231
70215
  return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
70232
70216
  }
70217
+ type = type.flags & 2 /* Unknown */ ? unknownUnionType : type;
70233
70218
  const trueType2 = getNarrowedType(
70234
70219
  type,
70235
70220
  candidate,
@@ -70238,7 +70223,7 @@ function createTypeChecker(host) {
70238
70223
  /*checkDerived*/
70239
70224
  false
70240
70225
  );
70241
- return filterType(type, (t) => !isTypeSubsetOf(t, trueType2));
70226
+ return recombineUnknownType(filterType(type, (t) => !isTypeSubsetOf(t, trueType2)));
70242
70227
  }
70243
70228
  if (type.flags & 3 /* AnyOrUnknown */) {
70244
70229
  return candidate;
@@ -125390,7 +125375,7 @@ function getBuildInfo2(state) {
125390
125375
  var _a, _b;
125391
125376
  const currentDirectory = state.program.getCurrentDirectory();
125392
125377
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
125393
- const latestChangedDtsFile = state.latestChangedDtsFile ? relativePathToBuildInfo(state.latestChangedDtsFile) : void 0;
125378
+ const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
125394
125379
  const fileNames = [];
125395
125380
  const fileNameToFileId = /* @__PURE__ */ new Map();
125396
125381
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
@@ -125532,15 +125517,9 @@ function getBuildInfo2(state) {
125532
125517
  version
125533
125518
  };
125534
125519
  return buildInfo;
125535
- function relativePathToBuildInfo(path) {
125520
+ function relativeToBuildInfoEnsuringAbsolutePath(path) {
125536
125521
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
125537
125522
  }
125538
- function relativePathToBuildInfoOrOriginalValue(path) {
125539
- if (typeof path === "string") {
125540
- return relativePathToBuildInfo(path);
125541
- }
125542
- return void 0;
125543
- }
125544
125523
  function relativeToBuildInfo(path) {
125545
125524
  return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName));
125546
125525
  }
@@ -125605,10 +125584,10 @@ function getBuildInfo2(state) {
125605
125584
  if (option.type === "list") {
125606
125585
  const values = value;
125607
125586
  if (option.element.isFilePath && values.length) {
125608
- return mapDefined(values, relativePathToBuildInfoOrOriginalValue);
125587
+ return values.map(relativeToBuildInfoEnsuringAbsolutePath);
125609
125588
  }
125610
125589
  } else if (option.isFilePath) {
125611
- return relativePathToBuildInfoOrOriginalValue(value);
125590
+ return relativeToBuildInfoEnsuringAbsolutePath(value);
125612
125591
  }
125613
125592
  }
125614
125593
  return value;
package/lib/typescript.js CHANGED
@@ -8876,21 +8876,7 @@ function getNormalizedPathComponents(path, currentDirectory) {
8876
8876
  return reducePathComponents(getPathComponents(path, currentDirectory));
8877
8877
  }
8878
8878
  function getNormalizedAbsolutePath(fileName, currentDirectory) {
8879
- fileName = normalizeSlashes(fileName);
8880
- if (isNotNormalizedOrAbsolute(fileName)) {
8881
- return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
8882
- }
8883
- return fileName;
8884
- }
8885
- function isNotNormalizedOrAbsolute(s) {
8886
- if (getEncodedRootLength(s) === 0) {
8887
- return true;
8888
- }
8889
- const lastChar = s.charCodeAt(s.length - 1);
8890
- if (lastChar === 47 /* slash */) {
8891
- return true;
8892
- }
8893
- return relativePathSegmentRegExp.test(s);
8879
+ return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
8894
8880
  }
8895
8881
  function normalizePath(path) {
8896
8882
  path = normalizeSlashes(path);
@@ -49733,9 +49719,7 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
49733
49719
  if (!baseUrl && !paths && !getResolvePackageJsonImports(compilerOptions) || relativePreference === 0 /* Relative */) {
49734
49720
  return pathsOnly ? void 0 : relativePath;
49735
49721
  }
49736
- const currentDirectory = host.getCurrentDirectory();
49737
- const basePath = getPathsBasePath(compilerOptions, host) ?? baseUrl ?? currentDirectory;
49738
- const baseDirectory = getNormalizedAbsolutePath(basePath, currentDirectory);
49722
+ const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
49739
49723
  const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName);
49740
49724
  if (!relativeToBaseUrl) {
49741
49725
  return pathsOnly ? void 0 : relativePath;
@@ -74834,6 +74818,7 @@ function createTypeChecker(host) {
74834
74818
  if (checkDerived) {
74835
74819
  return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
74836
74820
  }
74821
+ type = type.flags & 2 /* Unknown */ ? unknownUnionType : type;
74837
74822
  const trueType2 = getNarrowedType(
74838
74823
  type,
74839
74824
  candidate,
@@ -74842,7 +74827,7 @@ function createTypeChecker(host) {
74842
74827
  /*checkDerived*/
74843
74828
  false
74844
74829
  );
74845
- return filterType(type, (t) => !isTypeSubsetOf(t, trueType2));
74830
+ return recombineUnknownType(filterType(type, (t) => !isTypeSubsetOf(t, trueType2)));
74846
74831
  }
74847
74832
  if (type.flags & 3 /* AnyOrUnknown */) {
74848
74833
  return candidate;
@@ -130262,7 +130247,7 @@ function getBuildInfo2(state) {
130262
130247
  var _a, _b;
130263
130248
  const currentDirectory = state.program.getCurrentDirectory();
130264
130249
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
130265
- const latestChangedDtsFile = state.latestChangedDtsFile ? relativePathToBuildInfo(state.latestChangedDtsFile) : void 0;
130250
+ const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
130266
130251
  const fileNames = [];
130267
130252
  const fileNameToFileId = /* @__PURE__ */ new Map();
130268
130253
  const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));
@@ -130404,15 +130389,9 @@ function getBuildInfo2(state) {
130404
130389
  version
130405
130390
  };
130406
130391
  return buildInfo;
130407
- function relativePathToBuildInfo(path) {
130392
+ function relativeToBuildInfoEnsuringAbsolutePath(path) {
130408
130393
  return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));
130409
130394
  }
130410
- function relativePathToBuildInfoOrOriginalValue(path) {
130411
- if (typeof path === "string") {
130412
- return relativePathToBuildInfo(path);
130413
- }
130414
- return void 0;
130415
- }
130416
130395
  function relativeToBuildInfo(path) {
130417
130396
  return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName));
130418
130397
  }
@@ -130477,10 +130456,10 @@ function getBuildInfo2(state) {
130477
130456
  if (option.type === "list") {
130478
130457
  const values = value;
130479
130458
  if (option.element.isFilePath && values.length) {
130480
- return mapDefined(values, relativePathToBuildInfoOrOriginalValue);
130459
+ return values.map(relativeToBuildInfoEnsuringAbsolutePath);
130481
130460
  }
130482
130461
  } else if (option.isFilePath) {
130483
- return relativePathToBuildInfoOrOriginalValue(value);
130462
+ return relativeToBuildInfoEnsuringAbsolutePath(value);
130484
130463
  }
130485
130464
  }
130486
130465
  return value;
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-60755-11",
5
+ "version": "5.8.0-pr-60795-8",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -40,48 +40,48 @@
40
40
  ],
41
41
  "devDependencies": {
42
42
  "@dprint/formatter": "^0.4.1",
43
- "@dprint/typescript": "0.93.0",
43
+ "@dprint/typescript": "0.93.3",
44
44
  "@esfx/canceltoken": "^1.0.0",
45
- "@eslint/js": "^9.11.1",
45
+ "@eslint/js": "^9.17.0",
46
46
  "@octokit/rest": "^21.0.2",
47
47
  "@types/chai": "^4.3.20",
48
- "@types/diff": "^5.2.2",
48
+ "@types/diff": "^5.2.3",
49
49
  "@types/minimist": "^1.2.5",
50
- "@types/mocha": "^10.0.8",
50
+ "@types/mocha": "^10.0.10",
51
51
  "@types/ms": "^0.7.34",
52
52
  "@types/node": "latest",
53
53
  "@types/source-map-support": "^0.5.10",
54
54
  "@types/which": "^3.0.4",
55
- "@typescript-eslint/rule-tester": "^8.8.0",
56
- "@typescript-eslint/type-utils": "^8.8.0",
57
- "@typescript-eslint/utils": "^8.8.0",
55
+ "@typescript-eslint/rule-tester": "^8.18.1",
56
+ "@typescript-eslint/type-utils": "^8.18.1",
57
+ "@typescript-eslint/utils": "^8.18.1",
58
58
  "azure-devops-node-api": "^14.1.0",
59
- "c8": "^10.1.2",
59
+ "c8": "^10.1.3",
60
60
  "chai": "^4.5.0",
61
61
  "chalk": "^4.1.2",
62
62
  "chokidar": "^3.6.0",
63
63
  "diff": "^5.2.0",
64
- "dprint": "^0.47.2",
64
+ "dprint": "^0.47.6",
65
65
  "esbuild": "^0.24.0",
66
- "eslint": "^9.11.1",
66
+ "eslint": "^9.17.0",
67
67
  "eslint-formatter-autolinkable-stylish": "^1.4.0",
68
- "eslint-plugin-regexp": "^2.6.0",
69
- "fast-xml-parser": "^4.5.0",
68
+ "eslint-plugin-regexp": "^2.7.0",
69
+ "fast-xml-parser": "^4.5.1",
70
70
  "glob": "^10.4.5",
71
- "globals": "^15.9.0",
71
+ "globals": "^15.13.0",
72
72
  "hereby": "^1.10.0",
73
73
  "jsonc-parser": "^3.3.1",
74
- "knip": "^5.30.6",
74
+ "knip": "^5.41.0",
75
75
  "minimist": "^1.2.8",
76
- "mocha": "^10.7.3",
76
+ "mocha": "^10.8.2",
77
77
  "mocha-fivemat-progress-reporter": "^0.1.0",
78
- "monocart-coverage-reports": "^2.11.0",
78
+ "monocart-coverage-reports": "^2.11.4",
79
79
  "ms": "^2.1.3",
80
- "playwright": "^1.47.2",
80
+ "playwright": "^1.49.1",
81
81
  "source-map-support": "^0.5.21",
82
- "tslib": "^2.7.0",
83
- "typescript": "^5.6.2",
84
- "typescript-eslint": "^8.8.0",
82
+ "tslib": "^2.8.1",
83
+ "typescript": "^5.7.2",
84
+ "typescript-eslint": "^8.18.1",
85
85
  "which": "^3.0.1"
86
86
  },
87
87
  "overrides": {