Skip to content

Commit 2fc014a

Browse files
committed
Accept new LKG
1 parent c8c0428 commit 2fc014a

12 files changed

+69726
-31356
lines changed

Jakefile.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/// <reference types="jake" />
44

55
const fs = require("fs");
6-
const fs2 = require("fs-extra");
76
const os = require("os");
87
const path = require("path");
98
const fold = require("travis-fold");

lib/cancellationToken.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/protocol.d.ts

+49-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ declare namespace ts.server.protocol {
458458
scope: OrganizeImportsScope;
459459
}
460460
interface OrganizeImportsResponse extends Response {
461-
edits: ReadonlyArray<FileCodeEdits>;
461+
body: ReadonlyArray<FileCodeEdits>;
462462
}
463463
interface GetEditsForFileRenameRequest extends Request {
464464
command: CommandTypes.GetEditsForFileRename;
@@ -469,7 +469,7 @@ declare namespace ts.server.protocol {
469469
readonly newFilePath: string;
470470
}
471471
interface GetEditsForFileRenameResponse extends Response {
472-
edits: ReadonlyArray<FileCodeEdits>;
472+
body: ReadonlyArray<FileCodeEdits>;
473473
}
474474
/**
475475
* Request for the available codefixes at a specific position.
@@ -2255,6 +2255,7 @@ declare namespace ts.server.protocol {
22552255

22562256
interface TextInsertion {
22572257
newText: string;
2258+
/** The position in newText the caret should point to after the insertion. */
22582259
caretOffset: number;
22592260
}
22602261

@@ -2270,9 +2271,13 @@ declare namespace ts.server.protocol {
22702271
}
22712272

22722273
enum OutliningSpanKind {
2274+
/** Single or multi-line comments */
22732275
Comment = "comment",
2276+
/** Sections marked by '// #region' and '// #endregion' comments */
22742277
Region = "region",
2278+
/** Declarations and expressions */
22752279
Code = "code",
2280+
/** Contiguous blocks of import declarations */
22762281
Imports = "imports"
22772282
}
22782283

@@ -2286,27 +2291,56 @@ declare namespace ts.server.protocol {
22862291
enum ScriptElementKind {
22872292
unknown = "",
22882293
warning = "warning",
2294+
/** predefined type (void) or keyword (class) */
22892295
keyword = "keyword",
2296+
/** top level script node */
22902297
scriptElement = "script",
2298+
/** module foo {} */
22912299
moduleElement = "module",
2300+
/** class X {} */
22922301
classElement = "class",
2302+
/** var x = class X {} */
22932303
localClassElement = "local class",
2304+
/** interface Y {} */
22942305
interfaceElement = "interface",
2306+
/** type T = ... */
22952307
typeElement = "type",
2308+
/** enum E */
22962309
enumElement = "enum",
22972310
enumMemberElement = "enum member",
2311+
/**
2312+
* Inside module and script only
2313+
* const v = ..
2314+
*/
22982315
variableElement = "var",
2316+
/** Inside function */
22992317
localVariableElement = "local var",
2318+
/**
2319+
* Inside module and script only
2320+
* function f() { }
2321+
*/
23002322
functionElement = "function",
2323+
/** Inside function */
23012324
localFunctionElement = "local function",
2325+
/** class X { [public|private]* foo() {} } */
23022326
memberFunctionElement = "method",
2327+
/** class X { [public|private]* [get|set] foo:number; } */
23032328
memberGetAccessorElement = "getter",
23042329
memberSetAccessorElement = "setter",
2330+
/**
2331+
* class X { [public|private]* foo:number; }
2332+
* interface Y { foo:number; }
2333+
*/
23052334
memberVariableElement = "property",
2335+
/** class X { constructor() { } } */
23062336
constructorImplementationElement = "constructor",
2337+
/** interface Y { ():number; } */
23072338
callSignatureElement = "call",
2339+
/** interface Y { []:number; } */
23082340
indexSignatureElement = "index",
2341+
/** interface Y { new():Y; } */
23092342
constructSignatureElement = "construct",
2343+
/** function foo(*Y*: string) */
23102344
parameterElement = "parameter",
23112345
typeParameterElement = "type parameter",
23122346
primitiveType = "primitive type",
@@ -2316,7 +2350,11 @@ declare namespace ts.server.protocol {
23162350
letElement = "let",
23172351
directory = "directory",
23182352
externalModuleName = "external module name",
2353+
/**
2354+
* <JsxTagName attribute1 attribute2={0} />
2355+
*/
23192356
jsxAttribute = "JSX attribute",
2357+
/** String literal */
23202358
string = "string"
23212359
}
23222360

@@ -2339,6 +2377,11 @@ declare namespace ts.server.protocol {
23392377
text?: string;
23402378
}
23412379

2380+
/**
2381+
* Type of objects whose values are all of the same type.
2382+
* The `in` and `for-in` operators can *not* be safely used,
2383+
* since `Object.prototype` may be modified by outside code.
2384+
*/
23422385
interface MapLike<T> {
23432386
[index: string]: T;
23442387
}
@@ -2348,9 +2391,13 @@ declare namespace ts.server.protocol {
23482391
}
23492392

23502393
interface ProjectReference {
2394+
/** A normalized path on disk */
23512395
path: string;
2396+
/** The path as the user originally wrote it */
23522397
originalPath?: string;
2398+
/** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
23532399
prepend?: boolean;
2400+
/** True if it is intended that this reference form a circularity */
23542401
circular?: boolean;
23552402
}
23562403

lib/tsc.js

+27-19
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
"use strict";"use strict";
2-
var __assign = (this && this.__assign) || Object.assign || function(t) {
3-
for (var s, i = 1, n = arguments.length; i < n; i++) {
4-
s = arguments[i];
5-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6-
t[p] = s[p];
7-
}
8-
return t;
2+
var __assign = (this && this.__assign) || function () {
3+
__assign = Object.assign || function(t) {
4+
for (var s, i = 1, n = arguments.length; i < n; i++) {
5+
s = arguments[i];
6+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7+
t[p] = s[p];
8+
}
9+
return t;
10+
};
11+
return __assign.apply(this, arguments);
912
};
1013
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
1114
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
@@ -53963,7 +53966,7 @@ var ts;
5396353966
name: "typescript:assign",
5396453967
scoped: false,
5396553968
priority: 1,
53966-
text: "\n var __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };"
53969+
text: "\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"
5396753970
};
5396853971
function createAssignHelper(context, attributesSegments) {
5396953972
if (context.getCompilerOptions().target >= 2) {
@@ -56440,7 +56443,7 @@ var ts;
5644056443
name: "typescript:extends",
5644156444
scoped: false,
5644256445
priority: 0,
56443-
text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
56446+
text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"
5644456447
};
5644556448
var templateObjectHelper = {
5644656449
name: "typescript:makeTemplateObject",
@@ -61783,13 +61786,17 @@ var ts;
6178361786
var offsetLine_1 = writer.getLine();
6178461787
var firstLineColumnOffset_1 = writer.getColumn();
6178561788
var originalMap_1 = parsed;
61789+
var sourcesDirectoryPath_1 = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
61790+
var resolvedPathCache_1 = ts.createMap();
6178661791
ts.sourcemaps.calculateDecodedMappings(originalMap_1, function (raw) {
6178761792
var rawPath = originalMap_1.sources[raw.sourceIndex];
6178861793
var relativePath = originalMap_1.sourceRoot ? ts.combinePaths(originalMap_1.sourceRoot, rawPath) : rawPath;
6178961794
var combinedPath = ts.combinePaths(ts.getDirectoryPath(node.sourceMapPath), relativePath);
61790-
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
61791-
var resolvedPath = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, combinedPath, host.getCurrentDirectory(), host.getCanonicalFileName, true);
61792-
var absolutePath = ts.getNormalizedAbsolutePath(resolvedPath, sourcesDirectoryPath);
61795+
if (!resolvedPathCache_1.has(combinedPath)) {
61796+
resolvedPathCache_1.set(combinedPath, ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath_1, combinedPath, host.getCurrentDirectory(), host.getCanonicalFileName, true));
61797+
}
61798+
var resolvedPath = resolvedPathCache_1.get(combinedPath);
61799+
var absolutePath = ts.getNormalizedAbsolutePath(resolvedPath, sourcesDirectoryPath_1);
6179361800
setupSourceEntry(absolutePath, originalMap_1.sourcesContent ? originalMap_1.sourcesContent[raw.sourceIndex] : null);
6179461801
var newIndex = sourceMapData.sourceMapSources.indexOf(resolvedPath);
6179561802
encodeLastRecordedSourceMapSpan();
@@ -70335,11 +70342,6 @@ var ts;
7033570342
}
7033670343
ts.createSolutionBuilder = createSolutionBuilder;
7033770344
function getUpToDateStatus(host, project) {
70338-
if (project === undefined) {
70339-
return {
70340-
type: UpToDateStatusType.Unbuildable, reason: "File deleted mid-build"
70341-
};
70342-
}
7034370345
if (project === undefined) {
7034470346
return { type: UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
7034570347
}
@@ -70415,6 +70417,7 @@ var ts;
7041570417
}
7041670418
var pseudoUpToDate = false;
7041770419
var usesPrepend = false;
70420+
var upstreamChangedProject;
7041870421
if (project.projectReferences && host.parseConfigFile) {
7041970422
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
7042070423
var ref = _d[_c];
@@ -70438,6 +70441,7 @@ var ts;
7043870441
}
7043970442
if (refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
7044070443
pseudoUpToDate = true;
70444+
upstreamChangedProject = ref.path;
7044170445
continue;
7044270446
}
7044370447
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
@@ -70461,8 +70465,12 @@ var ts;
7046170465
newerInputFileName: newestInputFileName
7046270466
};
7046370467
}
70464-
if (usesPrepend) {
70465-
pseudoUpToDate = false;
70468+
if (usesPrepend && pseudoUpToDate) {
70469+
return {
70470+
type: UpToDateStatusType.OutOfDateWithUpstream,
70471+
outOfDateOutputFileName: oldestOutputFileName,
70472+
newerProjectName: upstreamChangedProject
70473+
};
7046670474
}
7046770475
return {
7046870476
type: pseudoUpToDate ? UpToDateStatusType.UpToDateWithUpstreamTypes : UpToDateStatusType.UpToDate,

0 commit comments

Comments
 (0)