When directory watcher is invoked with any file from node_modules package, invalidate for file paths in that package (#43974)

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
This commit is contained in:
Sheetal Nandi 2021-05-06 09:48:26 -07:00 committed by GitHub
parent e0d7703cf3
commit 233f28ca27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 625 additions and 19 deletions

View file

@ -1150,7 +1150,7 @@ namespace ts {
}
const resolvedFromFile = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state);
if (resolvedFromFile) {
const packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile) : undefined;
const packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile.path) : undefined;
const packageInfo = packageDirectory ? getPackageJsonInfo(packageDirectory, /*onlyRecordFailures*/ false, state) : undefined;
return withPackageId(packageInfo, resolvedFromFile);
}
@ -1184,8 +1184,9 @@ namespace ts {
* For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: "@types/foo"
* For `/node_modules/foo/bar/index.d.ts` this is packageDirectory: "foo"
*/
function parseNodeModuleFromPath(resolved: PathAndExtension): string | undefined {
const path = normalizePath(resolved.path);
/* @internal */
export function parseNodeModuleFromPath(resolved: string): string | undefined {
const path = normalizePath(resolved);
const idx = path.lastIndexOf(nodeModulesPathPart);
if (idx === -1) {
return undefined;

View file

@ -153,9 +153,9 @@ namespace ts {
const resolvedFileToResolution = createMultiMap<ResolutionWithFailedLookupLocations>();
let hasChangedAutomaticTypeDirectiveNames = false;
const failedLookupChecks: Path[] = [];
const startsWithPathChecks: Path[] = [];
const isInDirectoryChecks: Path[] = [];
let failedLookupChecks: Path[] | undefined;
let startsWithPathChecks: Set<Path> | undefined;
let isInDirectoryChecks: Path[] | undefined;
const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory!()); // TODO: GH#18217
const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost();
@ -248,9 +248,9 @@ namespace ts {
resolvedTypeReferenceDirectives.clear();
resolvedFileToResolution.clear();
resolutionsWithFailedLookups.length = 0;
failedLookupChecks.length = 0;
startsWithPathChecks.length = 0;
isInDirectoryChecks.length = 0;
failedLookupChecks = undefined;
startsWithPathChecks = undefined;
isInDirectoryChecks = undefined;
// perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update
// (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution)
clearPerDirectoryResolutions();
@ -766,7 +766,7 @@ namespace ts {
if (isCreatingWatchedDirectory) {
// Watching directory is created
// Invalidate any resolution has failed lookup in this directory
isInDirectoryChecks.push(fileOrDirectoryPath);
(isInDirectoryChecks ||= []).push(fileOrDirectoryPath);
}
else {
// If something to do with folder/file starting with "." in node_modules folder, skip it
@ -785,8 +785,8 @@ namespace ts {
if (isNodeModulesAtTypesDirectory(fileOrDirectoryPath) || isNodeModulesDirectory(fileOrDirectoryPath) ||
isNodeModulesAtTypesDirectory(dirOfFileOrDirectory) || isNodeModulesDirectory(dirOfFileOrDirectory)) {
// Invalidate any resolution from this directory
failedLookupChecks.push(fileOrDirectoryPath);
startsWithPathChecks.push(fileOrDirectoryPath);
(failedLookupChecks ||= []).push(fileOrDirectoryPath);
(startsWithPathChecks ||= new Set()).add(fileOrDirectoryPath);
}
else {
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
@ -797,21 +797,27 @@ namespace ts {
return false;
}
// Resolution need to be invalidated if failed lookup location is same as the file or directory getting created
failedLookupChecks.push(fileOrDirectoryPath);
(failedLookupChecks ||= []).push(fileOrDirectoryPath);
// If the invalidated file is from a node_modules package, invalidate everything else
// in the package since we might not get notifications for other files in the package.
// This hardens our logic against unreliable file watchers.
const packagePath = parseNodeModuleFromPath(fileOrDirectoryPath);
if (packagePath) (startsWithPathChecks ||= new Set()).add(packagePath as Path);
}
}
resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
}
function invalidateResolutionsOfFailedLookupLocations() {
if (!failedLookupChecks.length && !startsWithPathChecks.length && !isInDirectoryChecks.length) {
if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) {
return false;
}
const invalidated = invalidateResolutions(resolutionsWithFailedLookups, canInvalidateFailedLookupResolution);
failedLookupChecks.length = 0;
startsWithPathChecks.length = 0;
isInDirectoryChecks.length = 0;
failedLookupChecks = undefined;
startsWithPathChecks = undefined;
isInDirectoryChecks = undefined;
return invalidated;
}
@ -819,8 +825,8 @@ namespace ts {
return resolution.failedLookupLocations.some(location => {
const locationPath = resolutionHost.toPath(location);
return contains(failedLookupChecks, locationPath) ||
startsWithPathChecks.some(fileOrDirectoryPath => startsWith(locationPath, fileOrDirectoryPath)) ||
isInDirectoryChecks.some(fileOrDirectoryPath => isInDirectoryPath(fileOrDirectoryPath, locationPath));
firstDefinedIterator(startsWithPathChecks?.keys() || emptyIterator, fileOrDirectoryPath => startsWith(locationPath, fileOrDirectoryPath) ? true : undefined) ||
isInDirectoryChecks?.some(fileOrDirectoryPath => isInDirectoryPath(fileOrDirectoryPath, locationPath));
});
}

View file

@ -449,5 +449,84 @@ declare namespace myapp {
},
changes: emptyArray
});
describe("works when installing something in node_modules or @types when there is no notification from fs for index file", () => {
function getNodeAtTypes() {
const nodeAtTypesIndex: File = {
path: `${projectRoot}/node_modules/@types/node/index.d.ts`,
content: `/// <reference path="base.d.ts" />`
};
const nodeAtTypesBase: File = {
path: `${projectRoot}/node_modules/@types/node/base.d.ts`,
content: `// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
/// <reference path="ts3.6/base.d.ts" />`
};
const nodeAtTypes36Base: File = {
path: `${projectRoot}/node_modules/@types/node/ts3.6/base.d.ts`,
content: `/// <reference path="../globals.d.ts" />`
};
const nodeAtTypesGlobals: File = {
path: `${projectRoot}/node_modules/@types/node/globals.d.ts`,
content: `declare var process: NodeJS.Process;
declare namespace NodeJS {
interface Process {
on(msg: string): void;
}
}`
};
return { nodeAtTypesIndex, nodeAtTypesBase, nodeAtTypes36Base, nodeAtTypesGlobals };
}
verifyTscWatch({
scenario,
subScenario: "works when installing something in node_modules or @types when there is no notification from fs for index file",
commandLineArgs: ["--w", `--extendedDiagnostics`],
sys: () => {
const file: File = {
path: `${projectRoot}/worker.ts`,
content: `process.on("uncaughtException");`
};
const tsconfig: File = {
path: `${projectRoot}/tsconfig.json`,
content: "{}"
};
const { nodeAtTypesIndex, nodeAtTypesBase, nodeAtTypes36Base, nodeAtTypesGlobals } = getNodeAtTypes();
return createWatchedSystem([file, libFile, tsconfig, nodeAtTypesIndex, nodeAtTypesBase, nodeAtTypes36Base, nodeAtTypesGlobals], { currentDirectory: projectRoot });
},
changes: [
{
caption: "npm ci step one: remove all node_modules files",
change: sys => sys.deleteFolder(`${projectRoot}/node_modules/@types`, /*recursive*/ true),
timeouts: runQueuedTimeoutCallbacks,
},
{
caption: `npm ci step two: create atTypes but something else in the @types folder`,
change: sys => sys.ensureFileOrFolder({
path: `${projectRoot}/node_modules/@types/mocha/index.d.ts`,
content: `export const foo = 10;`
}),
timeouts: runQueuedTimeoutCallbacks
},
{
caption: `npm ci step three: create atTypes node folder`,
change: sys => sys.ensureFileOrFolder({ path: `${projectRoot}/node_modules/@types/node` }),
timeouts: runQueuedTimeoutCallbacks
},
{
caption: `npm ci step four: create atTypes write all the files but dont invoke watcher for index.d.ts`,
change: sys => {
const { nodeAtTypesIndex, nodeAtTypesBase, nodeAtTypes36Base, nodeAtTypesGlobals } = getNodeAtTypes();
sys.ensureFileOrFolder(nodeAtTypesBase);
sys.ensureFileOrFolder(nodeAtTypesIndex, /*ignoreWatchInvokedWithTriggerAsFileCreate*/ true);
sys.ensureFileOrFolder(nodeAtTypes36Base, /*ignoreWatchInvokedWithTriggerAsFileCreate*/ true);
sys.ensureFileOrFolder(nodeAtTypesGlobals, /*ignoreWatchInvokedWithTriggerAsFileCreate*/ true);
},
timeouts: sys => {
sys.runQueuedTimeoutCallbacks(); // update failed lookups
sys.runQueuedTimeoutCallbacks(); // actual program update
},
},
]
});
});
});
}

View file

@ -0,0 +1,520 @@
Input::
//// [/user/username/projects/myproject/worker.ts]
process.on("uncaughtException");
//// [/a/lib/lib.d.ts]
/// <reference no-default-lib="true"/>
interface Boolean {}
interface Function {}
interface CallableFunction {}
interface NewableFunction {}
interface IArguments {}
interface Number { toExponential: any; }
interface Object {}
interface RegExp {}
interface String { charAt: any; }
interface Array<T> { length: number; [n: number]: T; }
//// [/user/username/projects/myproject/tsconfig.json]
{}
//// [/user/username/projects/myproject/node_modules/@types/node/index.d.ts]
/// <reference path="base.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/base.d.ts]
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
/// <reference path="ts3.6/base.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts]
/// <reference path="../globals.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/globals.d.ts]
declare var process: NodeJS.Process;
declare namespace NodeJS {
interface Process {
on(msg: string): void;
}
}
/a/lib/tsc.js --w --extendedDiagnostics
Output::
[12:00:37 AM] Starting compilation in watch mode...
Current directory: /user/username/projects/myproject CaseSensitiveFileNames: false
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Config file
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/worker.ts"]
options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/worker.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
[12:00:40 AM] Found 0 errors. Watching for file changes.
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Program root files: ["/user/username/projects/myproject/worker.ts"]
Program options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/index.d.ts
WatchedFiles::
/user/username/projects/myproject/tsconfig.json:
{"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250}
/user/username/projects/myproject/worker.ts:
{"fileName":"/user/username/projects/myproject/worker.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/index.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/index.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/base.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/base.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/globals.d.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
FsWatches::
FsWatchesRecursive::
/user/username/projects/myproject/node_modules:
{"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject/node_modules/@types:
{"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject:
{"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/worker.js]
process.on("uncaughtException");
Change:: npm ci step one: remove all node_modules files
Input::
//// [/user/username/projects/myproject/node_modules/@types/node/index.d.ts] deleted
//// [/user/username/projects/myproject/node_modules/@types/node/base.d.ts] deleted
//// [/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts] deleted
//// [/user/username/projects/myproject/node_modules/@types/node/globals.d.ts] deleted
Output::
FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file
Scheduling update
Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/node_modules/@types/node/ts3.6
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
[12:00:48 AM] File change detected. Starting incremental compilation...
Reloading new file names and options
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/worker.ts"]
options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file
FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file
FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file
FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file
worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
1 process.on("uncaughtException");
  ~~~~~~~
[12:00:52 AM] Found 1 error. Watching for file changes.
Program root files: ["/user/username/projects/myproject/worker.ts"]
Program options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
WatchedFiles::
/user/username/projects/myproject/tsconfig.json:
{"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250}
/user/username/projects/myproject/worker.ts:
{"fileName":"/user/username/projects/myproject/worker.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
FsWatches::
FsWatchesRecursive::
/user/username/projects/myproject/node_modules:
{"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject/node_modules/@types:
{"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject:
{"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/worker.js] file written with same contents
Change:: npm ci step two: create atTypes but something else in the @types folder
Input::
//// [/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts]
export const foo = 10;
Output::
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
[12:00:59 AM] File change detected. Starting incremental compilation...
Reloading new file names and options
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/worker.ts"]
options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts 250 undefined Source file
worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
1 process.on("uncaughtException");
  ~~~~~~~
[12:01:00 AM] Found 1 error. Watching for file changes.
Program root files: ["/user/username/projects/myproject/worker.ts"]
Program options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts
Semantic diagnostics in builder refreshed for::
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts
WatchedFiles::
/user/username/projects/myproject/tsconfig.json:
{"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250}
/user/username/projects/myproject/worker.ts:
{"fileName":"/user/username/projects/myproject/worker.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts","pollingInterval":250}
FsWatches::
FsWatchesRecursive::
/user/username/projects/myproject/node_modules:
{"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject/node_modules/@types:
{"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject:
{"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
exitCode:: ExitStatus.undefined
Change:: npm ci step three: create atTypes node folder
Input::
Output::
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
[12:01:03 AM] File change detected. Starting incremental compilation...
Reloading new file names and options
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/worker.ts"]
options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
error TS2688: Cannot find type definition file for 'node'.
The file is in the program because:
Entry point for implicit type library 'node'
[12:01:04 AM] Found 1 error. Watching for file changes.
Program root files: ["/user/username/projects/myproject/worker.ts"]
Program options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts
Semantic diagnostics in builder refreshed for::
WatchedFiles::
/user/username/projects/myproject/tsconfig.json:
{"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250}
/user/username/projects/myproject/worker.ts:
{"fileName":"/user/username/projects/myproject/worker.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts","pollingInterval":250}
FsWatches::
FsWatchesRecursive::
/user/username/projects/myproject/node_modules:
{"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject/node_modules/@types:
{"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject:
{"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
exitCode:: ExitStatus.undefined
Change:: npm ci step four: create atTypes write all the files but dont invoke watcher for index.d.ts
Input::
//// [/user/username/projects/myproject/node_modules/@types/node/base.d.ts]
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
/// <reference path="ts3.6/base.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/index.d.ts]
/// <reference path="base.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts]
/// <reference path="../globals.d.ts" />
//// [/user/username/projects/myproject/node_modules/@types/node/globals.d.ts]
declare var process: NodeJS.Process;
declare namespace NodeJS {
interface Process {
on(msg: string): void;
}
}
Output::
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Scheduling invalidateFailedLookup
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
Scheduling update
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations
DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/node_modules/@types/node/ts3.6
Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory
Scheduling update
[12:01:15 AM] File change detected. Starting incremental compilation...
Reloading new file names and options
Synchronizing program
CreatingProgramWith::
roots: ["/user/username/projects/myproject/worker.ts"]
options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file
[12:01:19 AM] Found 0 errors. Watching for file changes.
Program root files: ["/user/username/projects/myproject/worker.ts"]
Program options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"}
Program structureReused: SafeModules
Program files::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/user/username/projects/myproject/worker.ts
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/base.d.ts
/user/username/projects/myproject/node_modules/@types/node/index.d.ts
WatchedFiles::
/user/username/projects/myproject/tsconfig.json:
{"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250}
/user/username/projects/myproject/worker.ts:
{"fileName":"/user/username/projects/myproject/worker.ts","pollingInterval":250}
/a/lib/lib.d.ts:
{"fileName":"/a/lib/lib.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/mocha/index.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/index.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/index.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/base.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/base.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts","pollingInterval":250}
/user/username/projects/myproject/node_modules/@types/node/globals.d.ts:
{"fileName":"/user/username/projects/myproject/node_modules/@types/node/globals.d.ts","pollingInterval":250}
FsWatches::
FsWatchesRecursive::
/user/username/projects/myproject/node_modules:
{"directoryName":"/user/username/projects/myproject/node_modules","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject/node_modules/@types:
{"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
/user/username/projects/myproject:
{"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}}
exitCode:: ExitStatus.undefined
//// [/user/username/projects/myproject/worker.js] file written with same contents