Install packages separately

This commit is contained in:
Jason Ramsay committed 2016-08-30 13:41:24 -07:00
1 parent 199e533059
commit 24ef426fbb
2 files changed
+31 -16

No files matched your search

+10 -1
View File
@@ -312,7 +312,7 @@ namespace ts.server {
// - newProgram is different from the old program and structure of the old program was not reused.
if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
hasChanges = true;
this.projectService.typingsCache.invalidateCachedTypingsForProject(this);
//this.projectService.typingsCache.invalidateCachedTypingsForProject(this);
if (oldProgram) {
for (const f of oldProgram.getSourceFiles()) {
if (this.program.getSourceFileByPath(f.path)) {
@@ -405,16 +405,25 @@ namespace ts.server {
const added: string[] = [];
const removed: string[] = [];
let invalidateTypings = false;
for (const id in currentFiles) {
if (hasProperty(currentFiles, id) && !hasProperty(lastReportedFileNames, id)) {
added.push(id);
if (this.typingFiles.indexOf(id) < 0) {
invalidateTypings = true;
break;
}
}
}
for (const id in lastReportedFileNames) {
if (hasProperty(lastReportedFileNames, id) && !hasProperty(currentFiles, id)) {
removed.push(id);
invalidateTypings = true;
}
}
if (invalidateTypings) {
this.projectService.typingsCache.invalidateCachedTypingsForProject(this);
}
this.lastReportedFileNames = currentFiles;
this.lastReportedFileNames = currentFiles;