MCPcopy Create free account
hub / github.com/nodejs/node / watchPackageJsonFiles

Function watchPackageJsonFiles

test/fixtures/snapshot/typescript.js:125400–125407  ·  view source on GitHub ↗
(state, resolved, resolvedPath, parsed)

Source from the content-addressed store, hash-verified

125398 });
125399 }
125400 function watchPackageJsonFiles(state, resolved, resolvedPath, parsed) {
125401 if (!state.watch || !state.lastCachedPackageJsonLookups)
125402 return;
125403 ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
125404 createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
125405 onDeleteValue: ts.closeFileWatcher,
125406 });
125407 }
125408 function startWatching(state, buildOrder) {
125409 if (!state.watchAllProjectsPending)
125410 return;

Callers 2

startWatchingFunction · 0.85

Calls 4

getMethod · 0.65
watchFileMethod · 0.45

Tested by

no test coverage detected