MCPcopy Index your code
hub / github.com/nodejs/node / createStateBuildOrder

Function createStateBuildOrder

test/fixtures/snapshot/typescript.js:124320–124351  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

124318 return state.buildOrder || createStateBuildOrder(state);
124319 }
124320 function createStateBuildOrder(state) {
124321 var buildOrder = createBuildOrder(state, state.rootNames.map(function (f) { return resolveProjectName(state, f); }));
124322 // Clear all to ResolvedConfigFilePaths cache to start fresh
124323 state.resolvedConfigFilePaths.clear();
124324 // TODO(rbuckton): Should be a `Set`, but that requires changing the code below that uses `mutateMapSkippingNewValues`
124325 var currentProjects = new ts.Map(getBuildOrderFromAnyBuildOrder(buildOrder).map(function (resolved) { return [toResolvedConfigFilePath(state, resolved), true]; }));
124326 var noopOnDelete = { onDeleteValue: ts.noop };
124327 // Config file cache
124328 ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
124329 ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
124330 ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
124331 ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
124332 ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
124333 ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
124334 ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
124335 // Remove watches for the program no longer in the solution
124336 if (state.watch) {
124337 ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
124338 state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
124339 watcher.projects.forEach(function (project) {
124340 if (!currentProjects.has(project)) {
124341 watcher.projects.delete(project);
124342 }
124343 });
124344 watcher.close();
124345 });
124346 ts.mutateMapSkippingNewValues(state.allWatchedWildcardDirectories, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcherOf); } });
124347 ts.mutateMapSkippingNewValues(state.allWatchedInputFiles, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcher); } });
124348 ts.mutateMapSkippingNewValues(state.allWatchedPackageJsonFiles, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcher); } });
124349 }
124350 return state.buildOrder = buildOrder;
124351 }
124352 function getBuildOrderFor(state, project, onlyReferences) {
124353 var resolvedProject = project && resolveProjectName(state, project);
124354 var buildOrderFromState = getBuildOrder(state);

Callers 1

getBuildOrderFunction · 0.85

Calls 10

createBuildOrderFunction · 0.85
resolveProjectNameFunction · 0.85
toResolvedConfigFilePathFunction · 0.85
mapMethod · 0.65
clearMethod · 0.65
forEachMethod · 0.65
hasMethod · 0.65
deleteMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…