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

Function onPackageJsonChange

test/fixtures/snapshot/typescript.js:123873–123881  ·  view source on GitHub ↗
(fileName, eventKind, path)

Source from the content-addressed store, hash-verified

123871 watchFilePath(packageJsonPath, packageJsonPath, onPackageJsonChange, ts.PollingInterval.High, watchOptions, ts.WatchType.PackageJson);
123872 }
123873 function onPackageJsonChange(fileName, eventKind, path) {
123874 updateCachedSystemWithFile(fileName, path, eventKind);
123875 // package.json changes invalidate module resolution and can change the set of loaded files
123876 // so if we witness a change to one, we have to do a full reload
123877 reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
123878 changesAffectResolution = true;
123879 // Update the program
123880 scheduleProgramUpdate();
123881 }
123882 function onMissingFileChange(fileName, eventKind, missingFilePath) {
123883 updateCachedSystemWithFile(fileName, missingFilePath, eventKind);
123884 if (eventKind === ts.FileWatcherEventKind.Created && missingFilesMap.has(missingFilePath)) {

Callers

nothing calls this directly

Calls 2

scheduleProgramUpdateFunction · 0.85

Tested by

no test coverage detected