Update LKG

This commit is contained in:
Mohamed Hegazy 2017-05-22 13:30:16 -07:00
parent 6b64feebdf
commit e2cc27bec2
5 changed files with 27 additions and 4 deletions

View File

@ -74779,6 +74779,11 @@ var ts;
return;
}
var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
if (this.projectService.allowLocalPluginLoads) {
var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
searchPaths.unshift(local);
}
if (options.plugins) {
for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
var pluginConfigEntry = _a[_i];
@ -75163,6 +75168,7 @@ var ts;
this.eventHandler = opts.eventHandler;
this.globalPlugins = opts.globalPlugins || server.emptyArray;
this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);
@ -76743,7 +76749,8 @@ var ts;
throttleWaitMilliseconds: throttleWaitMilliseconds,
eventHandler: this.eventHandler,
globalPlugins: opts.globalPlugins,
pluginProbeLocations: opts.pluginProbeLocations
pluginProbeLocations: opts.pluginProbeLocations,
allowLocalPluginLoads: opts.allowLocalPluginLoads
};
this.projectService = new server.ProjectService(settings);
this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
@ -78995,7 +79002,8 @@ var ts;
logger: logger,
canUseEvents: canUseEvents,
globalPlugins: options.globalPlugins,
pluginProbeLocations: options.pluginProbeLocations
pluginProbeLocations: options.pluginProbeLocations,
allowLocalPluginLoads: options.allowLocalPluginLoads
}) || this;
if (telemetryEnabled && typingsInstaller) {
typingsInstaller.setTelemetrySender(_this);
@ -79269,6 +79277,7 @@ var ts;
var typingSafeListLocation = server.findArgument("--typingSafeListLocation");
var globalPlugins = (server.findArgument("--globalPlugins") || "").split(",");
var pluginProbeLocations = (server.findArgument("--pluginProbeLocations") || "").split(",");
var allowLocalPluginLoads = server.hasArgument("--allowLocalPluginLoads");
var useSingleInferredProject = server.hasArgument("--useSingleInferredProject");
var disableAutomaticTypingAcquisition = server.hasArgument("--disableAutomaticTypingAcquisition");
var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
@ -79284,7 +79293,8 @@ var ts;
telemetryEnabled: telemetryEnabled,
logger: logger,
globalPlugins: globalPlugins,
pluginProbeLocations: pluginProbeLocations
pluginProbeLocations: pluginProbeLocations,
allowLocalPluginLoads: allowLocalPluginLoads
};
var ioSession = new IOSession(options);
process.on("uncaughtException", function (err) {

View File

@ -482,6 +482,7 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
name?: DeclarationName;
}
interface NamedDeclaration extends Declaration {
name?: DeclarationName;
@ -4470,6 +4471,7 @@ declare namespace ts.server {
throttleWaitMilliseconds?: number;
globalPlugins?: string[];
pluginProbeLocations?: string[];
allowLocalPluginLoads?: boolean;
}
class Session implements EventSender {
private readonly gcTimer;
@ -5048,6 +5050,7 @@ declare namespace ts.server {
throttleWaitMilliseconds?: number;
globalPlugins?: string[];
pluginProbeLocations?: string[];
allowLocalPluginLoads?: boolean;
}
class ProjectService {
readonly typingsCache: TypingsCache;
@ -5077,6 +5080,7 @@ declare namespace ts.server {
private readonly eventHandler?;
readonly globalPlugins: ReadonlyArray<string>;
readonly pluginProbeLocations: ReadonlyArray<string>;
readonly allowLocalPluginLoads: boolean;
constructor(opts: ProjectServiceOptions);
ensureInferredProjectsUpToDate_TestOnly(): void;
getCompilerOptionsForInferredProjects(): CompilerOptions;

View File

@ -73059,7 +73059,8 @@ var ts;
throttleWaitMilliseconds: throttleWaitMilliseconds,
eventHandler: this.eventHandler,
globalPlugins: opts.globalPlugins,
pluginProbeLocations: opts.pluginProbeLocations
pluginProbeLocations: opts.pluginProbeLocations,
allowLocalPluginLoads: opts.allowLocalPluginLoads
};
this.projectService = new server.ProjectService(settings);
this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
@ -76584,6 +76585,11 @@ var ts;
return;
}
var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
if (this.projectService.allowLocalPluginLoads) {
var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
searchPaths.unshift(local);
}
if (options.plugins) {
for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
var pluginConfigEntry = _a[_i];
@ -76968,6 +76974,7 @@ var ts;
this.eventHandler = opts.eventHandler;
this.globalPlugins = opts.globalPlugins || server.emptyArray;
this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);

1
lib/typescript.d.ts vendored
View File

@ -491,6 +491,7 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
name?: DeclarationName;
}
interface NamedDeclaration extends Declaration {
name?: DeclarationName;

View File

@ -491,6 +491,7 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
name?: DeclarationName;
}
interface NamedDeclaration extends Declaration {
name?: DeclarationName;