typescript 4.6.0-dev.20220105 → 4.6.0-dev.20220106

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
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.6";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220105";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
package/lib/tsserver.js CHANGED
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20220105";
103
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -171306,6 +171306,9 @@ var ts;
171306
171306
  }
171307
171307
  return;
171308
171308
  }
171309
+ this.writeMessage(msg);
171310
+ };
171311
+ Session.prototype.writeMessage = function (msg) {
171309
171312
  var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
171310
171313
  ts.perfLogger.logEvent("Response message size: " + msgText.length);
171311
171314
  this.host.write(msgText);
@@ -175345,12 +175348,40 @@ var ts;
175345
175348
  };
175346
175349
  return IOSession;
175347
175350
  }(server.Session));
175351
+ var IpcIOSession = /** @class */ (function (_super) {
175352
+ __extends(IpcIOSession, _super);
175353
+ function IpcIOSession() {
175354
+ return _super !== null && _super.apply(this, arguments) || this;
175355
+ }
175356
+ IpcIOSession.prototype.writeMessage = function (msg) {
175357
+ var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
175358
+ if (verboseLogging) {
175359
+ var json = JSON.stringify(msg);
175360
+ logger.info(msg.type + ":" + server.indent(json));
175361
+ }
175362
+ process.send(msg);
175363
+ };
175364
+ IpcIOSession.prototype.parseMessage = function (message) {
175365
+ return message;
175366
+ };
175367
+ IpcIOSession.prototype.toStringMessage = function (message) {
175368
+ return JSON.stringify(message, undefined, 2);
175369
+ };
175370
+ IpcIOSession.prototype.listen = function () {
175371
+ var _this = this;
175372
+ process.on("message", function (e) {
175373
+ _this.onMessage(e);
175374
+ });
175375
+ };
175376
+ return IpcIOSession;
175377
+ }(IOSession));
175348
175378
  var eventPort = parseEventPort(server.findArgument("--eventPort"));
175349
175379
  var typingSafeListLocation = server.findArgument(server.Arguments.TypingSafeListLocation); // TODO: GH#18217
175350
175380
  var typesMapLocation = server.findArgument(server.Arguments.TypesMapLocation) || ts.combinePaths(ts.getDirectoryPath(ts.sys.getExecutingFilePath()), "typesMap.json");
175351
175381
  var npmLocation = server.findArgument(server.Arguments.NpmLocation);
175352
175382
  var validateDefaultNpmLocation = server.hasArgument(server.Arguments.ValidateDefaultNpmLocation);
175353
175383
  var disableAutomaticTypingAcquisition = server.hasArgument("--disableAutomaticTypingAcquisition");
175384
+ var useNodeIpc = server.hasArgument("--useNodeIpc");
175354
175385
  var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
175355
175386
  var commandLineTraceDir = server.findArgument("--traceDirectory");
175356
175387
  var traceDir = commandLineTraceDir
@@ -175359,7 +175390,7 @@ var ts;
175359
175390
  if (traceDir) {
175360
175391
  ts.startTracing("server", traceDir);
175361
175392
  }
175362
- var ioSession = new IOSession();
175393
+ var ioSession = useNodeIpc ? new IpcIOSession() : new IOSession();
175363
175394
  process.on("uncaughtException", function (err) {
175364
175395
  ioSession.logError(err, "unknown");
175365
175396
  });
@@ -10487,6 +10487,7 @@ declare namespace ts.server {
10487
10487
  logError(err: Error, cmd: string): void;
10488
10488
  private logErrorWorker;
10489
10489
  send(msg: protocol.Message): void;
10490
+ protected writeMessage(msg: protocol.Message): void;
10490
10491
  event<T extends object>(body: T, eventName: string): void;
10491
10492
  /** @deprecated */
10492
10493
  output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void;
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -171500,6 +171500,9 @@ var ts;
171500
171500
  }
171501
171501
  return;
171502
171502
  }
171503
+ this.writeMessage(msg);
171504
+ };
171505
+ Session.prototype.writeMessage = function (msg) {
171503
171506
  var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
171504
171507
  ts.perfLogger.logEvent("Response message size: " + msgText.length);
171505
171508
  this.host.write(msgText);
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -89,7 +89,7 @@ var ts;
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-dev.20220105";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220106";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.6.0-dev.20220105",
5
+ "version": "4.6.0-dev.20220106",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [