ensureProjectStructuresUptoDate() {
    let hasChanges = this.pendingEnsureProjectForOpenFiles;
    this.pendingProjectUpdates.clear();
    const updateGraph = (project) => {
      hasChanges = updateProjectIfDirty(project) || hasChanges;
    };
    this.externalProjects.forEach(updateGraph);
    this.configuredProjects.forEach(updateGraph);
    this.inferredProjects.forEach(updateGraph);
    if (hasChanges) {
      this.ensureProjectForOpenFiles();
    }
  }
Ensures the project structures are upto date
This means,
- we go through all the projects and update them if they are dirty
- if updates reflect some change in structure or there was pending request to ensure projects for open files
  ensure that each open script info has project