TODO: watch, - watch files, cache timestamps, mutate on program update
TODO: Non Incremental buildInfo addition and use

May be add package.json to buildInfo and use that for package.json lookups
This commit is contained in:
Sheetal Nandi
2024-06-14 12:32:43 -07:00
parent 1eb1223b07
commit 6756f239e7
11 changed files with 1352 additions and 35 deletions
+56 -35
View File
@@ -1591,44 +1591,14 @@ function getUpToDateStatusWorker<T extends BuilderProgram>(state: SolutionBuilde
let buildInfoVersionMap: ReturnType<typeof getBuildInfoFileVersionMap> | undefined;
// Get timestamps of input files
for (const inputFile of project.fileNames) {
const inputTime = getModifiedTime(state, inputFile);
if (inputTime === missingFileModifiedTime) {
return {
type: UpToDateStatusType.Unbuildable,
reason: `${inputFile} does not exist`,
};
}
const inputPath = toPath(state, inputFile);
// If an buildInfo is older than the newest input, we can stop checking
if (buildInfoTime < inputTime) {
let version: string | undefined;
let currentVersion: string | undefined;
if (incrementalBuildInfo) {
// Read files and see if they are same, read is anyways cached
if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);
const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath);
version = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath);
const text = version ? state.readFileWithCache(resolvedInputPath ?? inputFile) : undefined;
currentVersion = text !== undefined ? getSourceFileVersionAsHashFromText(host, text) : undefined;
if (version && version === currentVersion) pseudoInputUpToDate = true;
}
if (!version || version !== currentVersion) {
return {
type: UpToDateStatusType.OutOfDateWithSelf,
outOfDateOutputFileName: buildInfoPath,
newerInputFileName: inputFile,
};
}
}
if (inputTime > newestInputFileTime) {
const statusOrInputInfo = verifyInputFile(inputFile);
if (isUpToDateStatus(statusOrInputInfo)) return statusOrInputInfo;
if (statusOrInputInfo.inputTime > newestInputFileTime) {
newestInputFileName = inputFile;
newestInputFileTime = inputTime;
newestInputFileTime = statusOrInputInfo.inputTime;
}
seenRoots.add(inputPath);
seenRoots.add(statusOrInputInfo.inputPath);
}
let existingRoot;
@@ -1748,6 +1718,18 @@ function getUpToDateStatusWorker<T extends BuilderProgram>(state: SolutionBuilde
);
if (dependentPackageFileStatus) return dependentPackageFileStatus;
// Check if all the additional files in the program are uptodate with buildInfo
if (incrementalBuildInfo) {
// DO we watch these?
buildInfoVersionMap ??= getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);
const additionalFilesStatus = forEachEntry(buildInfoVersionMap.fileInfos, (_version, path) => {
if (seenRoots.has(path)) return undefined;
const statusOrInputInfo = verifyInputFile(path);
return isUpToDateStatus(statusOrInputInfo) ? statusOrInputInfo : undefined;
});
if (additionalFilesStatus) return additionalFilesStatus;
}
// Up to date
return {
type: pseudoUpToDate ?
@@ -1759,6 +1741,45 @@ function getUpToDateStatusWorker<T extends BuilderProgram>(state: SolutionBuilde
newestInputFileName,
oldestOutputFileName,
};
function verifyInputFile(inputFile: string): UpToDateStatus | { inputTime: Date; inputPath: Path; } {
const inputTime = getModifiedTime(state, inputFile);
if (inputTime === missingFileModifiedTime) {
return {
type: UpToDateStatusType.Unbuildable,
reason: `${inputFile} does not exist`,
};
}
const inputPath = toPath(state, inputFile);
// If an buildInfo is older than the newest input, we can stop checking
if (buildInfoTime < inputTime) {
let version: string | undefined;
let currentVersion: string | undefined;
if (incrementalBuildInfo) {
// Read files and see if they are same, read is anyways cached
buildInfoVersionMap ??= getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);
const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath);
version = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath);
const text = version ? state.readFileWithCache(resolvedInputPath ?? inputFile) : undefined;
currentVersion = text !== undefined ? getSourceFileVersionAsHashFromText(host, text) : undefined;
if (version && version === currentVersion) pseudoInputUpToDate = true;
}
if (!version || version !== currentVersion) {
return {
type: UpToDateStatusType.OutOfDateWithSelf,
outOfDateOutputFileName: buildInfoPath,
newerInputFileName: inputFile,
};
}
}
return { inputTime, inputPath };
}
function isUpToDateStatus(statusOrInputInfo: ReturnType<typeof verifyInputFile>): statusOrInputInfo is UpToDateStatus {
return !!(statusOrInputInfo as UpToDateStatus).type;
}
}
function hasSameBuildInfo<T extends BuilderProgram>(state: SolutionBuilderState<T>, buildInfoCacheEntry: BuildInfoCacheEntry, resolvedRefPath: ResolvedConfigFilePath) {
@@ -4,6 +4,7 @@ import { Symlink } from "../../_namespaces/vfs.js";
import { jsonToReadableText } from "../helpers.js";
import {
noChangeOnlyRuns,
noChangeRun,
verifyTsc,
} from "../helpers/tsc.js";
import { verifyTscWatch } from "../helpers/tscWatch.js";
@@ -198,3 +199,36 @@ describe("unittests:: tsbuild:: moduleResolution:: resolution sharing", () => {
}],
});
});
describe("unittests:: tsbuild:: moduleResolution:: handles additional file update sheetal", () => {
[{ incremental: true }, {}].forEach(compilerOptions => {
[{}, { outFile: "../outFile.js" }].forEach(outFileOptions => {
verifyTsc({
scenario: "moduleResolution",
subScenario: `${outFileOptions.outFile ? "outFile" : "multiFile"}/handles additional file update${compilerOptions.incremental ? " with incremental" : ""}`,
fs: () =>
loadProjectFromFiles({
"/src/projects/a/src/index.ts": "",
"/src/projects/a/tsconfig.json": jsonToReadableText({
compilerOptions: { strict: true, ...compilerOptions, ...outFileOptions },
}),
"/src/projects/node_modules/@types/pg/index.d.ts": "export function foo(): void;",
"/src/projects/node_modules/@types/pg/package.json": jsonToReadableText({
name: "@types/pg",
types: "index.d.ts",
}),
}),
commandLineArgs: ["-b", "/src/projects/a", "--verbose", "--traceResolution", "--explainFiles"],
edits: [
noChangeRun,
{
caption: "update package",
edit: fs => {
fs.writeFileSync("/src/projects/node_modules/@types/pg/index.d.ts", "export function foo(): void; export function bar(): void;");
},
},
],
});
});
});
});
@@ -229,4 +229,38 @@ describe("unittests:: tsbuildWatch:: watchMode:: moduleResolution", () => {
},
],
});
describe("unittests:: tsbuild:: moduleResolution:: handles additional file update sheetal", () => {
[{ incremental: true }, {}].forEach(compilerOptions => {
[{}, { outFile: "../outFile.js" }].forEach(outFileOptions => {
verifyTscWatch({
scenario: "moduleResolution",
subScenario: `${outFileOptions.outFile ? "outFile" : "multiFile"}/handles additional file update${compilerOptions.incremental ? " with incremental" : ""}`,
sys: () =>
createWatchedSystem({
"/src/projects/a/src/index.ts": "",
"/src/projects/a/tsconfig.json": jsonToReadableText({
compilerOptions: { strict: true, ...compilerOptions, ...outFileOptions },
}),
"/src/projects/node_modules/@types/pg/index.d.ts": "export function foo(): void;",
"/src/projects/node_modules/@types/pg/package.json": jsonToReadableText({
name: "@types/pg",
types: "index.d.ts",
}),
[libFile.path]: libFile.content,
}, { currentDirectory: "/src/projects/a" }),
commandLineArgs: ["-b", "-w", "--verbose", "--traceResolution", "--explainFiles"],
edits: [
{
caption: "update package",
edit: sys => {
sys.appendFile("/src/projects/node_modules/@types/pg/index.d.ts", "export function bar(): void;");
},
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
},
],
});
});
});
});
});
@@ -0,0 +1,208 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Input::
//// [/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; }
interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"incremental": true
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output file 'src/projects/a/tsconfig.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/a/src/index.js]
"use strict";
//// [/src/projects/a/tsconfig.tsbuildinfo]
{"fileNames":["../../../lib/lib.d.ts","./src/index.ts","../node_modules/@types/pg/index.d.ts"],"fileInfos":[{"version":"3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5381-","-691057527-export function foo(): void;"],"root":[2],"options":{"strict":true},"version":"FakeTSVersion"}
//// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../../lib/lib.d.ts",
"./src/index.ts",
"../node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../../lib/lib.d.ts": {
"original": {
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true
},
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true
},
"./src/index.ts": {
"version": "5381-",
"signature": "5381-"
},
"../node_modules/@types/pg/index.d.ts": {
"version": "-691057527-export function foo(): void;",
"signature": "-691057527-export function foo(): void;"
}
},
"root": [
[
2,
"./src/index.ts"
]
],
"options": {
"strict": true
},
"version": "FakeTSVersion",
"size": 701
}
Change:: no-change-run
Input::
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/a/tsconfig.tsbuildinfo'
exitCode:: ExitStatus.Success
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void; export function bar(): void;
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output 'src/projects/a/tsconfig.tsbuildinfo' is older than input 'src/projects/node_modules/@types/pg/index.d.ts'
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/a/tsconfig.tsbuildinfo]
{"fileNames":["../../../lib/lib.d.ts","./src/index.ts","../node_modules/@types/pg/index.d.ts"],"fileInfos":[{"version":"3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"5381-","-10634348642-export function foo(): void; export function bar(): void;"],"root":[2],"options":{"strict":true},"version":"FakeTSVersion"}
//// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../../lib/lib.d.ts",
"./src/index.ts",
"../node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../../lib/lib.d.ts": {
"original": {
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true
},
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true
},
"./src/index.ts": {
"version": "5381-",
"signature": "5381-"
},
"../node_modules/@types/pg/index.d.ts": {
"version": "-10634348642-export function foo(): void; export function bar(): void;",
"signature": "-10634348642-export function foo(): void; export function bar(): void;"
}
},
"root": [
[
2,
"./src/index.ts"
]
],
"options": {
"strict": true
},
"version": "FakeTSVersion",
"size": 732
}
@@ -0,0 +1,117 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Input::
//// [/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; }
interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output file 'src/projects/a/tsconfig.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/a/src/index.js]
"use strict";
//// [/src/projects/a/tsconfig.tsbuildinfo]
{"root":["./src/index.ts"],"version":"FakeTSVersion"}
//// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"root": [
"./src/index.ts"
],
"version": "FakeTSVersion",
"size": 53
}
Change:: no-change-run
Input::
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/a/src/index.js'
exitCode:: ExitStatus.Success
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void; export function bar(): void;
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/a/src/index.js'
exitCode:: ExitStatus.Success
@@ -0,0 +1,184 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Input::
//// [/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; }
interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"incremental": true,
"outFile": "../outFile.js"
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output file 'src/projects/outFile.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/outFile.js]
"use strict";
//// [/src/projects/outFile.tsbuildinfo]
{"fileNames":["../../lib/lib.d.ts","./a/src/index.ts","./node_modules/@types/pg/index.d.ts"],"fileInfos":["3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","5381-","-691057527-export function foo(): void;"],"root":[2],"options":{"outFile":"./outFile.js","strict":true},"version":"FakeTSVersion"}
//// [/src/projects/outFile.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../lib/lib.d.ts",
"./a/src/index.ts",
"./node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../lib/lib.d.ts": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"./a/src/index.ts": "5381-",
"./node_modules/@types/pg/index.d.ts": "-691057527-export function foo(): void;"
},
"root": [
[
2,
"./a/src/index.ts"
]
],
"options": {
"outFile": "./outFile.js",
"strict": true
},
"version": "FakeTSVersion",
"size": 686
}
Change:: no-change-run
Input::
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/outFile.tsbuildinfo'
exitCode:: ExitStatus.Success
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void; export function bar(): void;
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output 'src/projects/outFile.tsbuildinfo' is older than input 'src/projects/node_modules/@types/pg/index.d.ts'
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/outFile.js] file written with same contents
//// [/src/projects/outFile.tsbuildinfo]
{"fileNames":["../../lib/lib.d.ts","./a/src/index.ts","./node_modules/@types/pg/index.d.ts"],"fileInfos":["3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","5381-","-10634348642-export function foo(): void; export function bar(): void;"],"root":[2],"options":{"outFile":"./outFile.js","strict":true},"version":"FakeTSVersion"}
//// [/src/projects/outFile.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../lib/lib.d.ts",
"./a/src/index.ts",
"./node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../lib/lib.d.ts": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
"./a/src/index.ts": "5381-",
"./node_modules/@types/pg/index.d.ts": "-10634348642-export function foo(): void; export function bar(): void;"
},
"root": [
[
2,
"./a/src/index.ts"
]
],
"options": {
"outFile": "./outFile.js",
"strict": true
},
"version": "FakeTSVersion",
"size": 717
}
@@ -0,0 +1,118 @@
currentDirectory:: / useCaseSensitiveFileNames: false
Input::
//// [/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; }
interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"outFile": "../outFile.js"
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is out of date because output file 'src/projects/outFile.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
lib/lib.d.ts
Default library for target 'es5'
src/projects/a/src/index.ts
Matched by default include pattern '**/*'
src/projects/node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
exitCode:: ExitStatus.Success
//// [/src/projects/outFile.js]
"use strict";
//// [/src/projects/outFile.tsbuildinfo]
{"root":["./a/src/index.ts"],"version":"FakeTSVersion"}
//// [/src/projects/outFile.tsbuildinfo.readable.baseline.txt]
{
"root": [
"./a/src/index.ts"
],
"version": "FakeTSVersion",
"size": 55
}
Change:: no-change-run
Input::
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/outFile.js'
exitCode:: ExitStatus.Success
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void; export function bar(): void;
Output::
/lib/tsc -b /src/projects/a --verbose --traceResolution --explainFiles
[HH:MM:SS AM] Projects in this build:
* src/projects/a/tsconfig.json
[HH:MM:SS AM] Project 'src/projects/a/tsconfig.json' is up to date because newest input 'src/projects/a/src/index.ts' is older than output 'src/projects/outFile.js'
exitCode:: ExitStatus.Success
@@ -0,0 +1,170 @@
currentDirectory:: /src/projects/a useCaseSensitiveFileNames: false
Input::
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"incremental": true
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
//// [/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; }
/a/lib/tsc.js -b -w --verbose --traceResolution --explainFiles
Output::
>> Screen clear
[HH:MM:SS AM] Starting compilation in watch mode...
[HH:MM:SS AM] Projects in this build:
* tsconfig.json
[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
../../../a/lib/lib.d.ts
Default library for target 'es5'
src/index.ts
Matched by default include pattern '**/*'
../node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/src/projects/a/src/index.js]
"use strict";
//// [/src/projects/a/tsconfig.tsbuildinfo]
{"fileNames":["../../../a/lib/lib.d.ts","./src/index.ts","../node_modules/@types/pg/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},"5381-","-691057527-export function foo(): void;"],"root":[2],"options":{"strict":true},"version":"FakeTSVersion"}
//// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../../a/lib/lib.d.ts",
"./src/index.ts",
"../node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../../a/lib/lib.d.ts": {
"original": {
"version": "-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }",
"affectsGlobalScope": true
},
"version": "-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }",
"signature": "-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }",
"affectsGlobalScope": true
},
"./src/index.ts": {
"version": "5381-",
"signature": "5381-"
},
"../node_modules/@types/pg/index.d.ts": {
"version": "-691057527-export function foo(): void;",
"signature": "-691057527-export function foo(): void;"
}
},
"root": [
[
2,
"./src/index.ts"
]
],
"options": {
"strict": true
},
"version": "FakeTSVersion",
"size": 623
}
FsWatches::
/src/projects/a/src/index.ts: *new*
{}
/src/projects/a/tsconfig.json: *new*
{}
/src/projects/node_modules/@types/pg/package.json: *new*
{}
FsWatchesRecursive::
/src/projects/a: *new*
{}
Program root files: [
"/src/projects/a/src/index.ts"
]
Program options: {
"strict": true,
"incremental": true,
"watch": true,
"explainFiles": true,
"traceResolution": true,
"tscBuild": true,
"configFilePath": "/src/projects/a/tsconfig.json"
}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Shape signatures in builder refreshed for::
/a/lib/lib.d.ts (used version)
/src/projects/a/src/index.ts (used version)
/src/projects/node_modules/@types/pg/index.d.ts (used version)
exitCode:: ExitStatus.undefined
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;export function bar(): void;
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
exitCode:: ExitStatus.undefined
@@ -0,0 +1,138 @@
currentDirectory:: /src/projects/a useCaseSensitiveFileNames: false
Input::
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
//// [/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; }
/a/lib/tsc.js -b -w --verbose --traceResolution --explainFiles
Output::
>> Screen clear
[HH:MM:SS AM] Starting compilation in watch mode...
[HH:MM:SS AM] Projects in this build:
* tsconfig.json
[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
../../../a/lib/lib.d.ts
Default library for target 'es5'
src/index.ts
Matched by default include pattern '**/*'
../node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/src/projects/a/src/index.js]
"use strict";
//// [/src/projects/a/tsconfig.tsbuildinfo]
{"root":["./src/index.ts"],"version":"FakeTSVersion"}
//// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"root": [
"./src/index.ts"
],
"version": "FakeTSVersion",
"size": 53
}
FsWatches::
/src/projects/a/src/index.ts: *new*
{}
/src/projects/a/tsconfig.json: *new*
{}
/src/projects/node_modules/@types/pg/package.json: *new*
{}
FsWatchesRecursive::
/src/projects/a: *new*
{}
Program root files: [
"/src/projects/a/src/index.ts"
]
Program options: {
"strict": true,
"watch": true,
"explainFiles": true,
"traceResolution": true,
"tscBuild": true,
"configFilePath": "/src/projects/a/tsconfig.json"
}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Shape signatures in builder refreshed for::
/a/lib/lib.d.ts (used version)
/src/projects/a/src/index.ts (used version)
/src/projects/node_modules/@types/pg/index.d.ts (used version)
exitCode:: ExitStatus.undefined
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;export function bar(): void;
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
exitCode:: ExitStatus.undefined
@@ -0,0 +1,156 @@
currentDirectory:: /src/projects/a useCaseSensitiveFileNames: false
Input::
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"incremental": true,
"outFile": "../outFile.js"
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
//// [/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; }
/a/lib/tsc.js -b -w --verbose --traceResolution --explainFiles
Output::
>> Screen clear
[HH:MM:SS AM] Starting compilation in watch mode...
[HH:MM:SS AM] Projects in this build:
* tsconfig.json
[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../outFile.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
../../../a/lib/lib.d.ts
Default library for target 'es5'
src/index.ts
Matched by default include pattern '**/*'
../node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/src/projects/outFile.js]
"use strict";
//// [/src/projects/outFile.tsbuildinfo]
{"fileNames":["../../a/lib/lib.d.ts","./a/src/index.ts","./node_modules/@types/pg/index.d.ts"],"fileInfos":["-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","5381-","-691057527-export function foo(): void;"],"root":[2],"options":{"outFile":"./outFile.js","strict":true},"version":"FakeTSVersion"}
//// [/src/projects/outFile.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
"../../a/lib/lib.d.ts",
"./a/src/index.ts",
"./node_modules/@types/pg/index.d.ts"
],
"fileInfos": {
"../../a/lib/lib.d.ts": "-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }",
"./a/src/index.ts": "5381-",
"./node_modules/@types/pg/index.d.ts": "-691057527-export function foo(): void;"
},
"root": [
[
2,
"./a/src/index.ts"
]
],
"options": {
"outFile": "./outFile.js",
"strict": true
},
"version": "FakeTSVersion",
"size": 608
}
FsWatches::
/src/projects/a/src/index.ts: *new*
{}
/src/projects/a/tsconfig.json: *new*
{}
/src/projects/node_modules/@types/pg/package.json: *new*
{}
FsWatchesRecursive::
/src/projects/a: *new*
{}
Program root files: [
"/src/projects/a/src/index.ts"
]
Program options: {
"strict": true,
"incremental": true,
"outFile": "/src/projects/outFile.js",
"watch": true,
"explainFiles": true,
"traceResolution": true,
"tscBuild": true,
"configFilePath": "/src/projects/a/tsconfig.json"
}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
No shapes updated in the builder::
exitCode:: ExitStatus.undefined
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;export function bar(): void;
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
exitCode:: ExitStatus.undefined
@@ -0,0 +1,137 @@
currentDirectory:: /src/projects/a useCaseSensitiveFileNames: false
Input::
//// [/src/projects/a/src/index.ts]
//// [/src/projects/a/tsconfig.json]
{
"compilerOptions": {
"strict": true,
"outFile": "../outFile.js"
}
}
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;
//// [/src/projects/node_modules/@types/pg/package.json]
{
"name": "@types/pg",
"types": "index.d.ts"
}
//// [/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; }
/a/lib/tsc.js -b -w --verbose --traceResolution --explainFiles
Output::
>> Screen clear
[HH:MM:SS AM] Starting compilation in watch mode...
[HH:MM:SS AM] Projects in this build:
* tsconfig.json
[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../outFile.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project '/src/projects/a/tsconfig.json'...
======== Resolving type reference directive 'pg', containing file '/src/projects/a/__inferred type names__.ts', root directory '/src/projects/a/node_modules/@types,/src/projects/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ========
Resolving with primary search path '/src/projects/a/node_modules/@types, /src/projects/node_modules/@types, /src/node_modules/@types, /node_modules/@types'.
Directory '/src/projects/a/node_modules/@types' does not exist, skipping all lookups in it.
Found 'package.json' at '/src/projects/node_modules/@types/pg/package.json'.
'package.json' does not have a 'typesVersions' field.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references '/src/projects/node_modules/@types/pg/index.d.ts'.
File '/src/projects/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result.
Resolving real path for '/src/projects/node_modules/@types/pg/index.d.ts', result '/src/projects/node_modules/@types/pg/index.d.ts'.
======== Type reference directive 'pg' was successfully resolved to '/src/projects/node_modules/@types/pg/index.d.ts', primary: true. ========
../../../a/lib/lib.d.ts
Default library for target 'es5'
src/index.ts
Matched by default include pattern '**/*'
../node_modules/@types/pg/index.d.ts
Entry point for implicit type library 'pg'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/src/projects/outFile.js]
"use strict";
//// [/src/projects/outFile.tsbuildinfo]
{"root":["./a/src/index.ts"],"version":"FakeTSVersion"}
//// [/src/projects/outFile.tsbuildinfo.readable.baseline.txt]
{
"root": [
"./a/src/index.ts"
],
"version": "FakeTSVersion",
"size": 55
}
FsWatches::
/src/projects/a/src/index.ts: *new*
{}
/src/projects/a/tsconfig.json: *new*
{}
/src/projects/node_modules/@types/pg/package.json: *new*
{}
FsWatchesRecursive::
/src/projects/a: *new*
{}
Program root files: [
"/src/projects/a/src/index.ts"
]
Program options: {
"strict": true,
"outFile": "/src/projects/outFile.js",
"watch": true,
"explainFiles": true,
"traceResolution": true,
"tscBuild": true,
"configFilePath": "/src/projects/a/tsconfig.json"
}
Program structureReused: Not
Program files::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
Semantic diagnostics in builder refreshed for::
/a/lib/lib.d.ts
/src/projects/a/src/index.ts
/src/projects/node_modules/@types/pg/index.d.ts
No shapes updated in the builder::
exitCode:: ExitStatus.undefined
Change:: update package
Input::
//// [/src/projects/node_modules/@types/pg/index.d.ts]
export function foo(): void;export function bar(): void;
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
exitCode:: ExitStatus.undefined