From 82bfe5ad93c90b7c33ac330faef9c24fc4a63311 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 12 Mar 2021 12:28:20 -0800 Subject: [PATCH] Fix issue with some baselines for tsbuildinfo not getting generated (#43218) --- src/testRunner/unittests/tsbuild/helpers.ts | 10 +- src/testRunner/unittests/tsc/helpers.ts | 11 +- .../tsbuild/sample1/initial-build/sample.js | 2 +- .../when-logic-specifies-tsBuildInfoFile.js | 2 +- ...mit-any-files-on-error-with-incremental.js | 236 ++++++++++++-- ...e-of-program-emit-with-outDir-specified.js | 105 +++++- ...e-down-stream-project-and-then-fixes-it.js | 115 ++++++- .../with-noEmitOnError-with-incremental.js | 300 ++++++++++++++++- .../with-noEmitOnError-with-incremental.js | 304 +++++++++++++++++- .../with-noEmitOnError-with-incremental.js | 296 ++++++++++++++++- .../with-noEmitOnError-with-incremental.js | 300 ++++++++++++++++- .../with-noEmitOnError-with-incremental.js | 300 ++++++++++++++++- .../with-noEmitOnError-with-incremental.js | 304 +++++++++++++++++- 13 files changed, 2173 insertions(+), 112 deletions(-) diff --git a/src/testRunner/unittests/tsbuild/helpers.ts b/src/testRunner/unittests/tsbuild/helpers.ts index 14f6270625..f2f06c0ef3 100644 --- a/src/testRunner/unittests/tsbuild/helpers.ts +++ b/src/testRunner/unittests/tsbuild/helpers.ts @@ -186,7 +186,7 @@ interface Symbol { } } - export function generateSourceMapBaselineFiles(sys: System & { writtenFiles: ReadonlyCollection; }) { + export function generateSourceMapBaselineFiles(sys: System & { writtenFiles: ReadonlyCollection; }) { const mapFileNames = mapDefinedIterator(sys.writtenFiles.keys(), f => f.endsWith(".map") ? f : undefined); while (true) { const result = mapFileNames.next(); @@ -297,14 +297,18 @@ interface Symbol { } } + export function toPathWithSystem(sys: System, fileName: string): Path { + return toPath(fileName, sys.getCurrentDirectory(), createGetCanonicalFileName(sys.useCaseSensitiveFileNames)); + } + export function baselineBuildInfo( options: CompilerOptions, - sys: System & { writtenFiles: ReadonlyCollection; }, + sys: System & { writtenFiles: ReadonlyCollection; }, originalReadCall?: System["readFile"], originalWriteFile?: System["writeFile"], ) { const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - if (!buildInfoPath || !sys.writtenFiles.has(buildInfoPath)) return; + if (!buildInfoPath || !sys.writtenFiles.has(toPathWithSystem(sys, buildInfoPath))) return; if (!sys.fileExists(buildInfoPath)) return; const buildInfo = getBuildInfo((originalReadCall || sys.readFile).call(sys, buildInfoPath, "utf8")!); diff --git a/src/testRunner/unittests/tsc/helpers.ts b/src/testRunner/unittests/tsc/helpers.ts index a18abf08c0..12ea95cc26 100644 --- a/src/testRunner/unittests/tsc/helpers.ts +++ b/src/testRunner/unittests/tsc/helpers.ts @@ -1,6 +1,6 @@ namespace ts { export type TscCompileSystem = fakes.System & { - writtenFiles: Set; + writtenFiles: Set; baseLine(): { file: string; text: string; }; }; @@ -42,7 +42,7 @@ namespace ts { return !!(program as Program | EmitAndSemanticDiagnosticsBuilderProgram).getCompilerOptions; } export function commandLineCallbacks( - sys: System & { writtenFiles: ReadonlyCollection; }, + sys: System & { writtenFiles: ReadonlyCollection; }, originalReadCall?: System["readFile"], originalWriteFile?: System["writeFile"], ): CommandLineCallbacks { @@ -84,11 +84,12 @@ namespace ts { // Create system const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc" }) as TscCompileSystem; fakes.patchHostForBuildInfoReadWrite(sys); - const writtenFiles = sys.writtenFiles = new Set(); + const writtenFiles = sys.writtenFiles = new Set(); const originalWriteFile = sys.writeFile; sys.writeFile = (fileName, content, writeByteOrderMark) => { - assert.isFalse(writtenFiles.has(fileName)); - writtenFiles.add(fileName); + const path = toPathWithSystem(sys, fileName); + assert.isFalse(writtenFiles.has(path)); + writtenFiles.add(path); return originalWriteFile.call(sys, fileName, content, writeByteOrderMark); }; const actualReadFileMap: MapLike = {}; diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js index 2f152effae..c1c2c9fef5 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js @@ -140,7 +140,7 @@ export declare const World = "hello"; //// [/src/core/anotherModule.d.ts.map] {"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} -//// [/src/core/anotherModule.d.ts.map.baseline.txt] +//// [/src/core/anothermodule.d.ts.map.baseline.txt] =================================================================== JsFile: anotherModule.d.ts mapUrl: anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js index c0033cc955..a8a02134a4 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js @@ -141,7 +141,7 @@ export declare const World = "hello"; //// [/src/core/anotherModule.d.ts.map] {"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} -//// [/src/core/anotherModule.d.ts.map.baseline.txt] +//// [/src/core/anothermodule.d.ts.map.baseline.txt] =================================================================== JsFile: anotherModule.d.ts mapUrl: anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js index 0180e84f40..fba1fa3d33 100644 --- a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js +++ b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js @@ -170,7 +170,7 @@ Output:: [12:00:48 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -[12:01:07 AM] Found 0 errors. Watching for file changes. +[12:01:09 AM] Found 0 errors. Watching for file changes. @@ -229,6 +229,66 @@ console.log("hi"); //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1783 +} + Change:: Semantic Error @@ -240,18 +300,18 @@ const a: string = 10; Output:: >> Screen clear -[12:01:11 AM] File change detected. Starting incremental compilation... +[12:01:13 AM] File change detected. Starting incremental compilation... -[12:01:12 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' +[12:01:14 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' -[12:01:13 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:15 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:17 AM] Found 1 error. Watching for file changes. +[12:01:22 AM] Found 1 error. Watching for file changes. @@ -288,6 +348,84 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1946 +} + Change:: No change @@ -296,18 +434,18 @@ Input:: Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:26 AM] File change detected. Starting incremental compilation... -[12:01:22 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' +[12:01:27 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' -[12:01:23 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:28 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:24 AM] Found 1 error. Watching for file changes. +[12:01:29 AM] Found 1 error. Watching for file changes. @@ -351,15 +489,15 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:28 AM] File change detected. Starting incremental compilation... +[12:01:33 AM] File change detected. Starting incremental compilation... -[12:01:29 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' +[12:01:34 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' -[12:01:30 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:35 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -[12:01:38 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:43 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'... -[12:01:39 AM] Found 0 errors. Watching for file changes. +[12:01:47 AM] Found 0 errors. Watching for file changes. @@ -404,6 +542,66 @@ var a = "hello"; //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1774 +} + Change:: No change @@ -412,15 +610,15 @@ Input:: Output:: >> Screen clear -[12:01:43 AM] File change detected. Starting incremental compilation... +[12:01:51 AM] File change detected. Starting incremental compilation... -[12:01:44 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' +[12:01:52 AM] Project 'tsconfig.json' is out of date because oldest output 'dev-build/shared/types/db.js' is older than newest input 'src/main.ts' -[12:01:45 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:53 AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -[12:01:47 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'... +[12:01:55 AM] Updating unchanged output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'... -[12:01:48 AM] Found 0 errors. Watching for file changes. +[12:01:56 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js index 408aecc176..ce43cb7f17 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js @@ -38,7 +38,7 @@ Output:: [12:00:30 AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... -[12:00:44 AM] Found 0 errors. Watching for file changes. +[12:00:46 AM] Found 0 errors. Watching for file changes. @@ -102,6 +102,49 @@ export declare function multiply(a: number, b: number): number; //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","signature":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n","affectsGlobalScope":false},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","affectsGlobalScope":false}],"options":{"composite":true,"outDir":"./","watch":true,"configFilePath":"../tsconfig.json"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../anothermodule.ts", + "../index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n", + "affectsGlobalScope": false + }, + "../index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "affectsGlobalScope": false + } + }, + "options": { + "composite": true, + "outDir": "./", + "watch": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../anothermodule.ts", + "../index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1681 +} + Change:: No change @@ -135,15 +178,15 @@ export const y = 10; Output:: >> Screen clear -[12:00:47 AM] File change detected. Starting incremental compilation... +[12:00:49 AM] File change detected. Starting incremental compilation... -[12:00:48 AM] Project 'sample1/core/tsconfig.json' is out of date because oldest output 'sample1/core/outDir/anotherModule.js' is older than newest input 'sample1/core/file3.ts' +[12:00:50 AM] Project 'sample1/core/tsconfig.json' is out of date because oldest output 'sample1/core/outDir/anotherModule.js' is older than newest input 'sample1/core/file3.ts' -[12:00:49 AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... +[12:00:51 AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... -[12:00:58 AM] Updating unchanged output timestamps of project '/user/username/projects/sample1/core/tsconfig.json'... +[12:01:00 AM] Updating unchanged output timestamps of project '/user/username/projects/sample1/core/tsconfig.json'... -[12:00:59 AM] Found 0 errors. Watching for file changes. +[12:01:04 AM] Found 0 errors. Watching for file changes. @@ -184,6 +227,56 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../anothermodule.ts","../file3.ts","../index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","signature":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n","affectsGlobalScope":false},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n","affectsGlobalScope":false},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","affectsGlobalScope":false}],"options":{"composite":true,"outDir":"./","watch":true,"configFilePath":"../tsconfig.json"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../anothermodule.ts", + "../file3.ts", + "../index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../anothermodule.ts": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n", + "affectsGlobalScope": false + }, + "../file3.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n", + "affectsGlobalScope": false + }, + "../index.ts": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "affectsGlobalScope": false + } + }, + "options": { + "composite": true, + "outDir": "./", + "watch": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../../a/lib/lib.d.ts", + "../anothermodule.ts", + "../file3.ts", + "../index.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1829 +} + //// [/user/username/projects/sample1/core/outDir/file3.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js index 0c58c3ff6e..d1267d1551 100644 --- a/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js +++ b/tests/baselines/reference/tsbuild/watchMode/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js @@ -42,7 +42,7 @@ Output:: >> Screen clear [12:00:29 AM] Starting compilation in watch mode... -[12:00:38 AM] Found 0 errors. Watching for file changes. +[12:00:40 AM] Found 0 errors. Watching for file changes. @@ -113,6 +113,41 @@ export {}; //// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./library.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","signature":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}","signature":"-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","affectsGlobalScope":false}],"options":{"composite":true,"watch":true,"configFilePath":"./tsconfig.json"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./library.ts": { + "version": "5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "composite": true, + "watch": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1401 +} + //// [/user/username/projects/sample1/App/app.js] "use strict"; exports.__esModule = true; @@ -141,7 +176,7 @@ export function createSomeObject(): SomeObject Output:: >> Screen clear -[12:00:42 AM] File change detected. Starting incremental compilation... +[12:00:44 AM] File change detected. Starting incremental compilation... App/app.ts:2:20 - error TS2551: Property 'message' does not exist on type 'SomeObject'. Did you mean 'message2'? @@ -153,7 +188,7 @@ Output::    ~~~~~~~~ 'message2' is declared here. -[12:00:52 AM] Found 1 error. Watching for file changes. +[12:00:57 AM] Found 1 error. Watching for file changes. @@ -222,6 +257,41 @@ export {}; //// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./library.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","signature":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-9741349880-\ninterface SomeObject\n{\n message2: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message2: \"new Object\"\n };\n}","signature":"1956297931-interface SomeObject {\n message2: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","affectsGlobalScope":false}],"options":{"composite":true,"watch":true,"configFilePath":"./tsconfig.json"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./library.ts": { + "version": "-9741349880-\ninterface SomeObject\n{\n message2: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message2: \"new Object\"\n };\n}", + "signature": "1956297931-interface SomeObject {\n message2: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "composite": true, + "watch": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1403 +} + Change:: Fix error @@ -243,9 +313,9 @@ export function createSomeObject(): SomeObject Output:: >> Screen clear -[12:00:56 AM] File change detected. Starting incremental compilation... +[12:01:01 AM] File change detected. Starting incremental compilation... -[12:01:09 AM] Found 0 errors. Watching for file changes. +[12:01:17 AM] Found 0 errors. Watching for file changes. @@ -314,4 +384,39 @@ export {}; //// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./library.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","signature":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}","signature":"-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","affectsGlobalScope":false}],"options":{"composite":true,"watch":true,"configFilePath":"./tsconfig.json"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./library.ts": { + "version": "5256469508-\ninterface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "-18933614215-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "composite": true, + "watch": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./library.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1401 +} + //// [/user/username/projects/sample1/App/app.js] file written with same contents diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js index 866cdf3cfa..d512673b4d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js @@ -92,6 +92,81 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1883 +} + Change:: No change @@ -100,7 +175,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -112,7 +187,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -162,9 +237,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:04 AM] Found 0 errors. Watching for file changes. +[12:01:06 AM] Found 0 errors. Watching for file changes. @@ -205,6 +280,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1832 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -235,14 +371,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:08 AM] File change detected. Starting incremental compilation... +[12:01:13 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:12 AM] Found 1 error. Watching for file changes. +[12:01:17 AM] Found 1 error. Watching for file changes. @@ -283,6 +419,85 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1995 +} + Change:: No change @@ -291,14 +506,14 @@ Input:: Output:: >> Screen clear -[12:01:16 AM] File change detected. Starting incremental compilation... +[12:01:24 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:17 AM] Found 1 error. Watching for file changes. +[12:01:25 AM] Found 1 error. Watching for file changes. @@ -346,9 +561,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:29 AM] File change detected. Starting incremental compilation... -[12:01:28 AM] Found 0 errors. Watching for file changes. +[12:01:36 AM] Found 0 errors. Watching for file changes. @@ -389,6 +604,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1823 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -403,9 +679,9 @@ Input:: Output:: >> Screen clear -[12:01:32 AM] File change detected. Starting incremental compilation... +[12:01:43 AM] File change detected. Starting incremental compilation... -[12:01:33 AM] Found 0 errors. Watching for file changes. +[12:01:44 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js index a09c4c6e16..9a8f7ec013 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -92,6 +92,82 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1902 +} + Change:: No change @@ -100,7 +176,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -112,7 +188,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -162,9 +238,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:10 AM] Found 0 errors. Watching for file changes. +[12:01:12 AM] Found 0 errors. Watching for file changes. @@ -205,6 +281,68 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1851 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -249,14 +387,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:14 AM] File change detected. Starting incremental compilation... +[12:01:19 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:18 AM] Found 1 error. Watching for file changes. +[12:01:23 AM] Found 1 error. Watching for file changes. @@ -297,6 +435,86 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 2014 +} + Change:: No change @@ -305,14 +523,14 @@ Input:: Output:: >> Screen clear -[12:01:22 AM] File change detected. Starting incremental compilation... +[12:01:30 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:23 AM] Found 1 error. Watching for file changes. +[12:01:31 AM] Found 1 error. Watching for file changes. @@ -360,9 +578,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:27 AM] File change detected. Starting incremental compilation... +[12:01:35 AM] File change detected. Starting incremental compilation... -[12:01:37 AM] Found 0 errors. Watching for file changes. +[12:01:45 AM] Found 0 errors. Watching for file changes. @@ -403,6 +621,68 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1842 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -418,9 +698,9 @@ Input:: Output:: >> Screen clear -[12:01:41 AM] File change detected. Starting incremental compilation... +[12:01:52 AM] File change detected. Starting incremental compilation... -[12:01:42 AM] Found 0 errors. Watching for file changes. +[12:01:53 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js index 1c96891521..3d695b26c7 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js @@ -98,6 +98,80 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1834 +} + Change:: No change @@ -106,7 +180,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -118,7 +192,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -168,9 +242,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:04 AM] Found 0 errors. Watching for file changes. +[12:01:06 AM] Found 0 errors. Watching for file changes. @@ -211,6 +285,66 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1783 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -241,14 +375,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:08 AM] File change detected. Starting incremental compilation... +[12:01:13 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:12 AM] Found 1 error. Watching for file changes. +[12:01:17 AM] Found 1 error. Watching for file changes. @@ -289,6 +423,84 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1946 +} + Change:: No change @@ -297,14 +509,14 @@ Input:: Output:: >> Screen clear -[12:01:16 AM] File change detected. Starting incremental compilation... +[12:01:24 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:17 AM] Found 1 error. Watching for file changes. +[12:01:25 AM] Found 1 error. Watching for file changes. @@ -352,9 +564,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:29 AM] File change detected. Starting incremental compilation... -[12:01:28 AM] Found 0 errors. Watching for file changes. +[12:01:36 AM] Found 0 errors. Watching for file changes. @@ -395,6 +607,66 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1774 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -409,9 +681,9 @@ Input:: Output:: >> Screen clear -[12:01:32 AM] File change detected. Starting incremental compilation... +[12:01:43 AM] File change detected. Starting incremental compilation... -[12:01:33 AM] Found 0 errors. Watching for file changes. +[12:01:44 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js index 2b73ac3d32..47336285a8 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js @@ -92,6 +92,81 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1853 +} + Change:: No change @@ -100,7 +175,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -112,7 +187,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -162,9 +237,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:10 AM] Found 0 errors. Watching for file changes. +[12:01:12 AM] Found 0 errors. Watching for file changes. @@ -205,6 +280,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1802 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -249,14 +385,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:14 AM] File change detected. Starting incremental compilation... +[12:01:19 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:18 AM] Found 1 error. Watching for file changes. +[12:01:23 AM] Found 1 error. Watching for file changes. @@ -297,6 +433,85 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1965 +} + Change:: No change @@ -305,14 +520,14 @@ Input:: Output:: >> Screen clear -[12:01:22 AM] File change detected. Starting incremental compilation... +[12:01:30 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:23 AM] Found 1 error. Watching for file changes. +[12:01:31 AM] Found 1 error. Watching for file changes. @@ -360,9 +575,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:27 AM] File change detected. Starting incremental compilation... +[12:01:35 AM] File change detected. Starting incremental compilation... -[12:01:37 AM] Found 0 errors. Watching for file changes. +[12:01:45 AM] Found 0 errors. Watching for file changes. @@ -403,6 +618,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1793 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -418,9 +694,9 @@ Input:: Output:: >> Screen clear -[12:01:41 AM] File change detected. Starting incremental compilation... +[12:01:52 AM] File change detected. Starting incremental compilation... -[12:01:42 AM] Found 0 errors. Watching for file changes. +[12:01:53 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js index fa46e3080f..e842f99b93 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js @@ -92,6 +92,81 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1857 +} + Change:: No change @@ -100,7 +175,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -112,7 +187,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -162,9 +237,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:04 AM] Found 0 errors. Watching for file changes. +[12:01:06 AM] Found 0 errors. Watching for file changes. @@ -205,6 +280,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1806 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -235,14 +371,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:08 AM] File change detected. Starting incremental compilation... +[12:01:13 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:12 AM] Found 1 error. Watching for file changes. +[12:01:17 AM] Found 1 error. Watching for file changes. @@ -283,6 +419,85 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1969 +} + Change:: No change @@ -291,14 +506,14 @@ Input:: Output:: >> Screen clear -[12:01:16 AM] File change detected. Starting incremental compilation... +[12:01:24 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:17 AM] Found 1 error. Watching for file changes. +[12:01:25 AM] Found 1 error. Watching for file changes. @@ -346,9 +561,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:21 AM] File change detected. Starting incremental compilation... +[12:01:29 AM] File change detected. Starting incremental compilation... -[12:01:28 AM] Found 0 errors. Watching for file changes. +[12:01:36 AM] Found 0 errors. Watching for file changes. @@ -389,6 +604,67 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1797 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -403,9 +679,9 @@ Input:: Output:: >> Screen clear -[12:01:32 AM] File change detected. Starting incremental compilation... +[12:01:43 AM] File change detected. Starting incremental compilation... -[12:01:33 AM] Found 0 errors. Watching for file changes. +[12:01:44 AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js index 8b04b20920..5b88abf0e1 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -92,6 +92,82 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[[2,1],[3,1],[4,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "2626879346-import { A } from \"../shared/types/db\";\r\nconst a = {\r\n lastName: 'sdsd'\r\n;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + 1 + ], + [ + "../src/main.ts", + 1 + ], + [ + "../src/other.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1876 +} + Change:: No change @@ -100,7 +176,7 @@ Input:: Output:: >> Screen clear -[12:00:41 AM] File change detected. Starting incremental compilation... +[12:00:43 AM] File change detected. Starting incremental compilation... src/main.ts:4:1 - error TS1005: ',' expected. @@ -112,7 +188,7 @@ Output::    ~ The parser expected to find a '}' to match the '{' token here. -[12:00:42 AM] Found 1 error. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. @@ -162,9 +238,9 @@ const a = { Output:: >> Screen clear -[12:00:46 AM] File change detected. Starting incremental compilation... +[12:00:48 AM] File change detected. Starting incremental compilation... -[12:01:10 AM] Found 0 errors. Watching for file changes. +[12:01:12 AM] Found 0 errors. Watching for file changes. @@ -205,6 +281,68 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1825 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; exports.__esModule = true; @@ -249,14 +387,14 @@ const a: string = 10; Output:: >> Screen clear -[12:01:14 AM] File change detected. Starting incremental compilation... +[12:01:19 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:18 AM] Found 1 error. Watching for file changes. +[12:01:23 AM] Found 1 error. Watching for file changes. @@ -297,6 +435,86 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[[3,1]]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + 1 + ] + ] + }, + "version": "FakeTSVersion", + "size": 1988 +} + Change:: No change @@ -305,14 +523,14 @@ Input:: Output:: >> Screen clear -[12:01:22 AM] File change detected. Starting incremental compilation... +[12:01:30 AM] File change detected. Starting incremental compilation... src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. 2 const a: string = 10;    ~ -[12:01:23 AM] Found 1 error. Watching for file changes. +[12:01:31 AM] Found 1 error. Watching for file changes. @@ -360,9 +578,9 @@ const a: string = "hello"; Output:: >> Screen clear -[12:01:27 AM] File change detected. Starting incremental compilation... +[12:01:35 AM] File change detected. Starting incremental compilation... -[12:01:37 AM] Found 0 errors. Watching for file changes. +[12:01:45 AM] Found 0 errors. Watching for file changes. @@ -403,6 +621,68 @@ exitCode:: ExitStatus.undefined //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] {"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","signature":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9621097780-export interface A {\r\n name: string;\r\n}","signature":"-5014788164-export interface A {\n name: string;\n}\n","affectsGlobalScope":false},{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n","affectsGlobalScope":false},{"version":"11373096570-console.log(\"hi\");\r\nexport { }","signature":"-3531856636-export {};\n","affectsGlobalScope":false}],"options":{"outDir":"./","noEmitOnError":true,"isolatedModules":true,"declaration":true,"watch":true,"incremental":true,"configFilePath":"../tsconfig.json"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../shared/types/db.ts": { + "version": "-9621097780-export interface A {\r\n name: string;\r\n}", + "signature": "-5014788164-export interface A {\n name: string;\n}\n", + "affectsGlobalScope": false + }, + "../src/main.ts": { + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + }, + "../src/other.ts": { + "version": "11373096570-console.log(\"hi\");\r\nexport { }", + "signature": "-3531856636-export {};\n", + "affectsGlobalScope": false + } + }, + "options": { + "outDir": "./", + "noEmitOnError": true, + "isolatedModules": true, + "declaration": true, + "watch": true, + "incremental": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1816 +} + //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; exports.__esModule = true; @@ -418,9 +698,9 @@ Input:: Output:: >> Screen clear -[12:01:41 AM] File change detected. Starting incremental compilation... +[12:01:52 AM] File change detected. Starting incremental compilation... -[12:01:42 AM] Found 0 errors. Watching for file changes. +[12:01:53 AM] Found 0 errors. Watching for file changes.