@typescript-deploys/pr-build 5.4.0-pr-55061-8 → 5.4.0-pr-56301-7

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.20231110`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231113`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -73947,6 +73947,9 @@ function createTypeChecker(host) {
73947
73947
  }
73948
73948
  switch (node.operand.kind) {
73949
73949
  case 9 /* NumericLiteral */:
73950
+ if (operandType === numberType) {
73951
+ return numberType;
73952
+ }
73950
73953
  switch (node.operator) {
73951
73954
  case 41 /* MinusToken */:
73952
73955
  return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text));
package/lib/tsserver.js CHANGED
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
2330
2330
 
2331
2331
  // src/compiler/corePublic.ts
2332
2332
  var versionMajorMinor = "5.4";
2333
- var version = `${versionMajorMinor}.0-insiders.20231110`;
2333
+ var version = `${versionMajorMinor}.0-insiders.20231113`;
2334
2334
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2335
2335
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2336
2336
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -78655,6 +78655,9 @@ function createTypeChecker(host) {
78655
78655
  }
78656
78656
  switch (node.operand.kind) {
78657
78657
  case 9 /* NumericLiteral */:
78658
+ if (operandType === numberType) {
78659
+ return numberType;
78660
+ }
78658
78661
  switch (node.operator) {
78659
78662
  case 41 /* MinusToken */:
78660
78663
  return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text));
@@ -145046,6 +145049,13 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
145046
145049
  return sourceFile;
145047
145050
  }
145048
145051
  function synchronizeHostData() {
145052
+ if (host.updateFromProject && !host.updateFromProjectInProgress) {
145053
+ host.updateFromProject();
145054
+ } else {
145055
+ synchronizeHostDataWorker();
145056
+ }
145057
+ }
145058
+ function synchronizeHostDataWorker() {
145049
145059
  var _a2, _b, _c;
145050
145060
  Debug.assert(languageServiceMode !== 2 /* Syntactic */);
145051
145061
  if (host.getProjectVersion) {
@@ -160044,13 +160054,9 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
160044
160054
  }
160045
160055
  return scope;
160046
160056
  }
160047
- function isInDifferentLineWithContextToken(contextToken2, position2) {
160048
- return sourceFile.getLineEndOfPosition(contextToken2.getEnd()) < position2;
160049
- }
160050
160057
  function isCompletionListBlocker(contextToken2) {
160051
160058
  const start3 = timestamp();
160052
- const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || // GH#54729 ignore this case when current position is in a newline
160053
- isSolelyIdentifierDefinitionLocation(contextToken2) && !isInDifferentLineWithContextToken(contextToken2, position) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);
160059
+ const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || isSolelyIdentifierDefinitionLocation(contextToken2) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);
160054
160060
  log("getCompletionsAtPosition: isCompletionListBlocker: " + (timestamp() - start3));
160055
160061
  return result;
160056
160062
  }
@@ -176821,6 +176827,8 @@ var Project3 = class _Project {
176821
176827
  this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
176822
176828
  /** @internal */
176823
176829
  this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache;
176830
+ /** @internal */
176831
+ this.updateFromProjectInProgress = false;
176824
176832
  this.projectName = projectName;
176825
176833
  this.directoryStructureHost = directoryStructureHost;
176826
176834
  this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
@@ -177565,6 +177573,10 @@ var Project3 = class _Project {
177565
177573
  onDiscoveredSymlink() {
177566
177574
  this.hasAddedOrRemovedSymlinks = true;
177567
177575
  }
177576
+ /** @internal */
177577
+ updateFromProject() {
177578
+ updateProjectIfDirty(this);
177579
+ }
177568
177580
  /**
177569
177581
  * Updates set of files that contribute to this project
177570
177582
  * @returns: true if set of files in the project stays the same and false - otherwise.
@@ -177723,8 +177735,10 @@ var Project3 = class _Project {
177723
177735
  this.hasInvalidatedResolutions = hasInvalidatedResolutions;
177724
177736
  this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;
177725
177737
  this.resolutionCache.startCachingPerDirectoryResolution();
177726
- this.program = this.languageService.getProgram();
177727
177738
  this.dirty = false;
177739
+ this.updateFromProjectInProgress = true;
177740
+ this.program = this.languageService.getProgram();
177741
+ this.updateFromProjectInProgress = false;
177728
177742
  (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution");
177729
177743
  this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);
177730
177744
  (_b = tracing) == null ? void 0 : _b.pop();
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.20231110`;
38
+ version = `${versionMajorMinor}.0-insiders.20231113`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -76420,6 +76420,9 @@ ${lanes.join("\n")}
76420
76420
  }
76421
76421
  switch (node.operand.kind) {
76422
76422
  case 9 /* NumericLiteral */:
76423
+ if (operandType === numberType) {
76424
+ return numberType;
76425
+ }
76423
76426
  switch (node.operator) {
76424
76427
  case 41 /* MinusToken */:
76425
76428
  return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text));
@@ -142987,6 +142990,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142987
142990
  return sourceFile;
142988
142991
  }
142989
142992
  function synchronizeHostData() {
142993
+ if (host.updateFromProject && !host.updateFromProjectInProgress) {
142994
+ host.updateFromProject();
142995
+ } else {
142996
+ synchronizeHostDataWorker();
142997
+ }
142998
+ }
142999
+ function synchronizeHostDataWorker() {
142990
143000
  var _a2, _b, _c;
142991
143001
  Debug.assert(languageServiceMode !== 2 /* Syntactic */);
142992
143002
  if (host.getProjectVersion) {
@@ -159258,13 +159268,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
159258
159268
  }
159259
159269
  return scope;
159260
159270
  }
159261
- function isInDifferentLineWithContextToken(contextToken2, position2) {
159262
- return sourceFile.getLineEndOfPosition(contextToken2.getEnd()) < position2;
159263
- }
159264
159271
  function isCompletionListBlocker(contextToken2) {
159265
159272
  const start2 = timestamp();
159266
- const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || // GH#54729 ignore this case when current position is in a newline
159267
- isSolelyIdentifierDefinitionLocation(contextToken2) && !isInDifferentLineWithContextToken(contextToken2, position) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);
159273
+ const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || isSolelyIdentifierDefinitionLocation(contextToken2) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);
159268
159274
  log("getCompletionsAtPosition: isCompletionListBlocker: " + (timestamp() - start2));
159269
159275
  return result;
159270
159276
  }
@@ -174152,6 +174158,8 @@ ${options.prefix}` : "\n" : options.prefix
174152
174158
  this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
174153
174159
  /** @internal */
174154
174160
  this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache;
174161
+ /** @internal */
174162
+ this.updateFromProjectInProgress = false;
174155
174163
  this.projectName = projectName;
174156
174164
  this.directoryStructureHost = directoryStructureHost;
174157
174165
  this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
@@ -174896,6 +174904,10 @@ ${options.prefix}` : "\n" : options.prefix
174896
174904
  onDiscoveredSymlink() {
174897
174905
  this.hasAddedOrRemovedSymlinks = true;
174898
174906
  }
174907
+ /** @internal */
174908
+ updateFromProject() {
174909
+ updateProjectIfDirty(this);
174910
+ }
174899
174911
  /**
174900
174912
  * Updates set of files that contribute to this project
174901
174913
  * @returns: true if set of files in the project stays the same and false - otherwise.
@@ -175054,8 +175066,10 @@ ${options.prefix}` : "\n" : options.prefix
175054
175066
  this.hasInvalidatedResolutions = hasInvalidatedResolutions;
175055
175067
  this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;
175056
175068
  this.resolutionCache.startCachingPerDirectoryResolution();
175057
- this.program = this.languageService.getProgram();
175058
175069
  this.dirty = false;
175070
+ this.updateFromProjectInProgress = true;
175071
+ this.program = this.languageService.getProgram();
175072
+ this.updateFromProjectInProgress = false;
175059
175073
  (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution");
175060
175074
  this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);
175061
175075
  (_b = tracing) == null ? void 0 : _b.pop();
@@ -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.20231110`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231113`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
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-55061-8",
5
+ "version": "5.4.0-pr-56301-7",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "7d6ad0a046f626292c3f7837023619b421f7b199"
118
+ "gitHead": "b196684ca20864d35919dfa131d6cd753ab8c8d5"
119
119
  }