static exportMapToAdjacencyList(initialExportMap) {
    const adjacencyList = new Map();
    // BFS
    function visitNode(exportMap) {
      if (!exportMap) {
        return;
      }
      exportMap.imports.forEach((v, importedPath) => {
        const from = exportMap.path;
        const to = importedPath;

        // Ignore type-only imports, because we care only about SCCs of value imports
        const toTraverse = [...v.declarations].filter(({ isOnlyImportingTypes }) => !isOnlyImportingTypes);
        if (toTraverse.length === 0) { return; }

        if (!adjacencyList.has(from)) {
          adjacencyList.set(from, new Set());
        }

        if (adjacencyList.get(from).has(to)) {
          return; // prevent endless loop
        }
        adjacencyList.get(from).add(to);
        visitNode(v.getter());
      });
    }
    visitNode(initialExportMap);
    // Fill gaps
    adjacencyList.forEach((values) => {
      values.forEach((value) => {
        if (!adjacencyList.has(value)) {
          adjacencyList.set(value, new Set());
        }
      });
    });
    return adjacencyList;
  }
@returns {Map<string, Set<string>>} for each dep, what are its direct deps