Files
tsgo/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit.js

372 lines
21 KiB
TypeScript

currentDirectory::/user/username/projects/sample1
useCaseSensitiveFileNames::true
Input::
//// [/user/username/projects/sample1/core/anotherModule.ts] *new*
export const World = "hello";
//// [/user/username/projects/sample1/core/index.ts] *new*
export const someString: string = "HELLO WORLD";
export function leftPad(s: string, n: number) { return s + n; }
export function multiply(a: number, b: number) { return a * b; }
//// [/user/username/projects/sample1/core/some_decl.d.ts] *new*
declare const dts: any;
//// [/user/username/projects/sample1/core/tsconfig.json] *new*
{
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true,
"skipDefaultLibCheck": true,
},
}
//// [/user/username/projects/sample1/logic/index.ts] *new*
import * as c from '../core/index';
export function getSecondsInDay() {
return c.multiply(10, 15);
}
import * as mod from '../core/anotherModule';
export const m = mod;
//// [/user/username/projects/sample1/logic/tsconfig.json] *new*
{
"compilerOptions": {
"composite": true,
"declaration": true,
"sourceMap": true,
"skipDefaultLibCheck": true,
},
"references": [
{ "path": "../core" },
],
}
//// [/user/username/projects/sample1/tests/index.ts] *new*
import * as c from '../core/index';
import * as logic from '../logic/index';
c.leftPad("", 10);
logic.getSecondsInDay();
import * as mod from '../core/anotherModule';
export const m = mod;
//// [/user/username/projects/sample1/tests/tsconfig.json] *new*
{
"references": [
{ "path": "../core" },
{ "path": "../logic" },
],
"files": ["index.ts"],
"compilerOptions": {
"composite": true,
"declaration": true,
"skipDefaultLibCheck": true,
},
}
tsgo --b -w core --verbose
ExitStatus:: Success
Output::
[HH:MM:SS AM] Starting compilation in watch mode...
[HH:MM:SS AM] Projects in this build:
* core/tsconfig.json
[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist
[HH:MM:SS AM] Building project 'core/tsconfig.json'...
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
/// <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> {}
interface SymbolConstructor {
(desc?: string | number): symbol;
for(name: string): symbol;
readonly toStringTag: symbol;
}
declare var Symbol: SymbolConstructor;
interface Symbol {
readonly [Symbol.toStringTag]: string;
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new*
export declare const World = "hello";
//# sourceMappingURL=anotherModule.d.ts.map
//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new*
{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"}
//// [/user/username/projects/sample1/core/anotherModule.js] *new*
export const World = "hello";
//// [/user/username/projects/sample1/core/index.d.ts] *new*
export declare const someString: string;
export declare function leftPad(s: string, n: number): string;
export declare function multiply(a: number, b: number): number;
//# sourceMappingURL=index.d.ts.map
//// [/user/username/projects/sample1/core/index.d.ts.map] *new*
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"}
//// [/user/username/projects/sample1/core/index.js] *new*
export const someString = "HELLO WORLD";
export function leftPad(s, n) { return s + n; }
export function multiply(a, b) { return a * b; }
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new*
{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"}
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
"root": [
{
"files": [
"./anotherModule.ts",
"./index.ts",
"./some_decl.d.ts"
],
"original": [
2,
4
]
}
],
"fileNames": [
"lib.es2025.full.d.ts",
"./anotherModule.ts",
"./index.ts",
"./some_decl.d.ts"
],
"fileInfos": [
{
"fileName": "lib.es2025.full.d.ts",
"version": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"signature": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true,
"impliedNodeFormat": "CommonJS",
"original": {
"version": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true,
"impliedNodeFormat": 1
}
},
{
"fileName": "./anotherModule.ts",
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
"impliedNodeFormat": "CommonJS",
"original": {
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
"impliedNodeFormat": 1
}
},
{
"fileName": "./index.ts",
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
"impliedNodeFormat": "CommonJS",
"original": {
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
"impliedNodeFormat": 1
}
},
{
"fileName": "./some_decl.d.ts",
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"affectsGlobalScope": true,
"impliedNodeFormat": "CommonJS",
"original": {
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"affectsGlobalScope": true,
"impliedNodeFormat": 1
}
}
],
"options": {
"composite": true,
"declaration": true,
"declarationMap": true,
"skipDefaultLibCheck": true
},
"latestChangedDtsFile": "./index.d.ts",
"size": 1830
}
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
/user/username/projects/sample1
/user/username/projects/sample1/core (recursive)
core/tsconfig.json::
SemanticDiagnostics::
*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
*refresh* /user/username/projects/sample1/core/anotherModule.ts
*refresh* /user/username/projects/sample1/core/index.ts
*refresh* /user/username/projects/sample1/core/some_decl.d.ts
Signatures::
(stored at emit) /user/username/projects/sample1/core/anotherModule.ts
(stored at emit) /user/username/projects/sample1/core/index.ts
Edit [0]:: no change
Output::
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
/user/username/projects/sample1
/user/username/projects/sample1/core (recursive)
Edit [1]:: Add new file
//// [/user/username/projects/sample1/core/file3.ts] *new*
export const y = 10;
Output::
[HH:MM:SS AM] File change detected. Starting incremental compilation...
[HH:MM:SS AM] Projects in this build:
* core/tsconfig.json
[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output 'core/tsconfig.tsbuildinfo' is older than input 'core/file3.ts'
[HH:MM:SS AM] Building project 'core/tsconfig.json'...
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
//// [/user/username/projects/sample1/core/file3.d.ts] *new*
export declare const y = 10;
//# sourceMappingURL=file3.d.ts.map
//// [/user/username/projects/sample1/core/file3.d.ts.map] *new*
{"version":3,"file":"file3.d.ts","sourceRoot":"","sources":["file3.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"}
//// [/user/username/projects/sample1/core/file3.js] *new*
export const y = 10;
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified*
{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2025.full.d.ts","./anotherModule.ts","./file3.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","signature":"7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./file3.d.ts"}
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
"root": [
{
"files": [
"./anotherModule.ts",
"./file3.ts",
"./index.ts",
"./some_decl.d.ts"
],
"original": [
2,
5
]
}
],
"fileNames": [
"lib.es2025.full.d.ts",
"./anotherModule.ts",
"./file3.ts",
"./index.ts",
"./some_decl.d.ts"
],
"fileInfos": [
{
"fileName": "lib.es2025.full.d.ts",
"version": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"signature": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true,
"impliedNodeFormat": "CommonJS",
"original": {
"version": "8859c12c614ce56ba9a18e58384a198f-/// <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> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };",
"affectsGlobalScope": true,
"impliedNodeFormat": 1
}
},
{
"fileName": "./anotherModule.ts",
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
"impliedNodeFormat": "CommonJS",
"original": {
"version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";",
"signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",
"impliedNodeFormat": 1
}
},
{
"fileName": "./file3.ts",
"version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;",
"signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n",
"impliedNodeFormat": "CommonJS",
"original": {
"version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;",
"signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n",
"impliedNodeFormat": 1
}
},
{
"fileName": "./index.ts",
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
"impliedNodeFormat": "CommonJS",
"original": {
"version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }",
"signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n",
"impliedNodeFormat": 1
}
},
{
"fileName": "./some_decl.d.ts",
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"affectsGlobalScope": true,
"impliedNodeFormat": "CommonJS",
"original": {
"version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;",
"affectsGlobalScope": true,
"impliedNodeFormat": 1
}
}
],
"options": {
"composite": true,
"declaration": true,
"declarationMap": true,
"skipDefaultLibCheck": true
},
"latestChangedDtsFile": "./file3.d.ts",
"size": 2011
}
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
/user/username/projects/sample1
/user/username/projects/sample1/core (recursive)
core/tsconfig.json::
SemanticDiagnostics::
*refresh* /user/username/projects/sample1/core/file3.ts
Signatures::
(computed .d.ts) /user/username/projects/sample1/core/file3.ts
Edit [2]:: no change
Output::
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
/user/username/projects/sample1
/user/username/projects/sample1/core (recursive)