Skip to content

Commit 7b29ccb

Browse files
committed
Test baseline updates showing extra work we do in absense of using info from d.ts emit
1 parent dcdc654 commit 7b29ccb

10 files changed

+91
-210
lines changed

tests/baselines/reference/tscWatch/emit/emit-file-content/should-emit-specified-file.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ Program files::
225225
Semantic diagnostics in builder refreshed for::
226226
/a/b/f1.ts
227227
/a/b/f2.ts
228+
/a/b/f3.ts
228229

229230
Shape signatures in builder refreshed for::
230231
/a/b/f1.ts (computed .d.ts)
231232
/a/b/f2.ts (computed .d.ts)
233+
/a/b/f3.ts (used version)
232234

233235
exitCode:: ExitStatus.undefined

tests/baselines/reference/tscWatch/emit/emit-for-configured-projects/should-return-cascaded-affected-file-list.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,14 @@ Program files::
272272
Semantic diagnostics in builder refreshed for::
273273
/a/b/moduleFile1.ts
274274
/a/b/file1Consumer1.ts
275+
/a/b/file1Consumer1Consumer1.ts
275276
/a/b/file1Consumer2.ts
276277

277278
Shape signatures in builder refreshed for::
278279
/a/b/modulefile1.ts (computed .d.ts)
279280
/a/b/file1consumer2.ts (computed .d.ts)
280281
/a/b/file1consumer1.ts (computed .d.ts)
282+
/a/b/file1consumer1consumer1.ts (used version)
281283

282284
exitCode:: ExitStatus.undefined
283285

tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes-with-incremental.js

Lines changed: 11 additions & 66 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/file-not-exporting-a-deep-multilevel-import-that-changes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,14 @@ Semantic diagnostics in builder refreshed for::
324324
/user/username/projects/myproject/b.ts
325325
/user/username/projects/myproject/c.ts
326326
/user/username/projects/myproject/d.ts
327+
/user/username/projects/myproject/e.ts
327328

328329
Shape signatures in builder refreshed for::
329330
/user/username/projects/myproject/a.ts (computed .d.ts)
330331
/user/username/projects/myproject/b.ts (computed .d.ts)
331332
/user/username/projects/myproject/c.ts (used version)
332333
/user/username/projects/myproject/d.ts (used version)
334+
/user/username/projects/myproject/e.ts (used version)
333335

334336
exitCode:: ExitStatus.undefined
335337

tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes-with-incremental.js

Lines changed: 22 additions & 57 deletions
Large diffs are not rendered by default.

tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/file-not-exporting-a-deep-multilevel-import-that-changes.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Output::
235235
>> Screen clear
236236
[12:00:54 AM] File change detected. Starting incremental compilation...
237237

238-
[[90m12:01:13 AM[0m] Found 0 errors. Watching for file changes.
238+
[[90m12:01:16 AM[0m] Found 0 errors. Watching for file changes.
239239

240240

241241

@@ -255,6 +255,7 @@ export interface Coords {
255255
//// [/user/username/projects/myproject/b.d.ts] file written with same contents
256256
//// [/user/username/projects/myproject/c.d.ts] file written with same contents
257257
//// [/user/username/projects/myproject/d.d.ts] file written with same contents
258+
//// [/user/username/projects/myproject/e.d.ts] file written with same contents
258259

259260

260261
Program root files: [
@@ -283,12 +284,14 @@ Semantic diagnostics in builder refreshed for::
283284
/user/username/projects/myproject/b.ts
284285
/user/username/projects/myproject/c.ts
285286
/user/username/projects/myproject/d.ts
287+
/user/username/projects/myproject/e.ts
286288

287289
Shape signatures in builder refreshed for::
288290
/user/username/projects/myproject/a.ts (computed .d.ts)
289291
/user/username/projects/myproject/b.ts (computed .d.ts)
290292
/user/username/projects/myproject/c.ts (computed .d.ts during emit)
291293
/user/username/projects/myproject/d.ts (computed .d.ts during emit)
294+
/user/username/projects/myproject/e.ts (computed .d.ts during emit)
292295

293296
exitCode:: ExitStatus.undefined
294297

@@ -315,7 +318,7 @@ Before running Timeout callback:: count: 1
315318
After running Timeout callback:: count: 0
316319
Output::
317320
>> Screen clear
318-
[[90m12:01:17 AM[0m] File change detected. Starting incremental compilation...
321+
[[90m12:01:20 AM[0m] File change detected. Starting incremental compilation...
319322

320323
c.ts:6:13 - error TS2353: Object literal may only specify known properties, and 'x' does not exist in type 'Coords'.
321324

@@ -332,7 +335,7 @@ Output::
332335
2 getPoint().c.x;
333336
   ~
334337

335-
[[90m12:01:36 AM[0m] Found 2 errors. Watching for file changes.
338+
[[90m12:01:42 AM[0m] Found 2 errors. Watching for file changes.
336339

337340

338341

@@ -352,6 +355,7 @@ export interface Coords {
352355
//// [/user/username/projects/myproject/b.d.ts] file written with same contents
353356
//// [/user/username/projects/myproject/c.d.ts] file written with same contents
354357
//// [/user/username/projects/myproject/d.d.ts] file written with same contents
358+
//// [/user/username/projects/myproject/e.d.ts] file written with same contents
355359

356360

357361
Program root files: [
@@ -380,12 +384,14 @@ Semantic diagnostics in builder refreshed for::
380384
/user/username/projects/myproject/b.ts
381385
/user/username/projects/myproject/c.ts
382386
/user/username/projects/myproject/d.ts
387+
/user/username/projects/myproject/e.ts
383388

384389
Shape signatures in builder refreshed for::
385390
/user/username/projects/myproject/a.ts (computed .d.ts)
386391
/user/username/projects/myproject/b.ts (computed .d.ts)
387392
/user/username/projects/myproject/c.ts (computed .d.ts during emit)
388393
/user/username/projects/myproject/d.ts (computed .d.ts during emit)
394+
/user/username/projects/myproject/e.ts (computed .d.ts during emit)
389395

390396
exitCode:: ExitStatus.undefined
391397

@@ -412,9 +418,9 @@ Before running Timeout callback:: count: 1
412418
After running Timeout callback:: count: 0
413419
Output::
414420
>> Screen clear
415-
[[90m12:01:40 AM[0m] File change detected. Starting incremental compilation...
421+
[[90m12:01:46 AM[0m] File change detected. Starting incremental compilation...
416422

417-
[[90m12:01:59 AM[0m] Found 0 errors. Watching for file changes.
423+
[[90m12:02:08 AM[0m] Found 0 errors. Watching for file changes.
418424

419425

420426

@@ -434,6 +440,7 @@ export interface Coords {
434440
//// [/user/username/projects/myproject/b.d.ts] file written with same contents
435441
//// [/user/username/projects/myproject/c.d.ts] file written with same contents
436442
//// [/user/username/projects/myproject/d.d.ts] file written with same contents
443+
//// [/user/username/projects/myproject/e.d.ts] file written with same contents
437444

438445

439446
Program root files: [
@@ -462,11 +469,13 @@ Semantic diagnostics in builder refreshed for::
462469
/user/username/projects/myproject/b.ts
463470
/user/username/projects/myproject/c.ts
464471
/user/username/projects/myproject/d.ts
472+
/user/username/projects/myproject/e.ts
465473

466474
Shape signatures in builder refreshed for::
467475
/user/username/projects/myproject/a.ts (computed .d.ts)
468476
/user/username/projects/myproject/b.ts (computed .d.ts)
469477
/user/username/projects/myproject/c.ts (computed .d.ts during emit)
470478
/user/username/projects/myproject/d.ts (computed .d.ts during emit)
479+
/user/username/projects/myproject/e.ts (computed .d.ts during emit)
471480

472481
exitCode:: ExitStatus.undefined

tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export declare class A {
9191

9292

9393
//// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo]
94-
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-7264743946-export class A {}","signature":"-8728835846-export declare class A {\n}\n"}],"root":[2],"options":{"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
94+
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-7264743946-export class A {}","signature":"-8728835846-export declare class A {\n}\n"}],"root":[2],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
9595

9696
//// [/user/username/projects/transitiveReferences/a/tsconfig.tsbuildinfo.readable.baseline.txt]
9797
{
@@ -129,15 +129,14 @@ export declare class A {
129129
"composite": true
130130
},
131131
"referencedMap": {},
132-
"exportedModulesMap": {},
133132
"semanticDiagnosticsPerFile": [
134133
"../../../../../a/lib/lib.d.ts",
135134
"./index.ts"
136135
],
137136
"latestChangedDtsFile": "./index.d.ts"
138137
},
139138
"version": "FakeTSVersion",
140-
"size": 767
139+
"size": 743
141140
}
142141

143142
//// [/user/username/projects/transitiveReferences/b/index.js]
@@ -154,7 +153,7 @@ export declare const b: A;
154153

155154

156155
//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo]
157-
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-2591036212-import {A} from '@ref/a';\nexport const b = new A();","signature":"-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n"}],"root":[3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
156+
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"-2591036212-import {A} from '@ref/a';\nexport const b = new A();","signature":"-9732944696-import { A } from '@ref/a';\nexport declare const b: A;\n"}],"root":[3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
158157

159158
//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt]
160159
{
@@ -206,11 +205,6 @@ export declare const b: A;
206205
"../a/index.d.ts"
207206
]
208207
},
209-
"exportedModulesMap": {
210-
"./index.ts": [
211-
"../a/index.d.ts"
212-
]
213-
},
214208
"semanticDiagnosticsPerFile": [
215209
"../../../../../a/lib/lib.d.ts",
216210
"../a/index.d.ts",
@@ -219,7 +213,7 @@ export declare const b: A;
219213
"latestChangedDtsFile": "./index.d.ts"
220214
},
221215
"version": "FakeTSVersion",
222-
"size": 924
216+
"size": 895
223217
}
224218

225219
//// [/user/username/projects/transitiveReferences/c/index.js]
@@ -402,7 +396,7 @@ export declare function gfoo(): void;
402396

403397

404398
//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo]
405-
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }","signature":"4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n"}],"root":[3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
399+
{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../a/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8728835846-export declare class A {\n}\n",{"version":"1841609480-import {A} from '@ref/a';\nexport const b = new A();export function gfoo() { }","signature":"4376023469-import { A } from '@ref/a';\nexport declare const b: A;\nexport declare function gfoo(): void;\n"}],"root":[3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"}
406400

407401
//// [/user/username/projects/transitiveReferences/b/tsconfig.tsbuildinfo.readable.baseline.txt]
408402
{
@@ -454,11 +448,6 @@ export declare function gfoo(): void;
454448
"../a/index.d.ts"
455449
]
456450
},
457-
"exportedModulesMap": {
458-
"./index.ts": [
459-
"../a/index.d.ts"
460-
]
461-
},
462451
"semanticDiagnosticsPerFile": [
463452
"../../../../../a/lib/lib.d.ts",
464453
"../a/index.d.ts",
@@ -467,7 +456,7 @@ export declare function gfoo(): void;
467456
"latestChangedDtsFile": "./index.d.ts"
468457
},
469458
"version": "FakeTSVersion",
470-
"size": 987
459+
"size": 958
471460
}
472461

473462

@@ -1044,10 +1033,12 @@ Program files::
10441033
Semantic diagnostics in builder refreshed for::
10451034
/user/username/projects/transitiveReferences/nrefs/a.d.ts
10461035
/user/username/projects/transitiveReferences/b/index.d.ts
1036+
/user/username/projects/transitiveReferences/c/index.ts
10471037
10481038
Shape signatures in builder refreshed for::
10491039
/user/username/projects/transitivereferences/nrefs/a.d.ts (used version)
10501040
/user/username/projects/transitivereferences/b/index.d.ts (used version)
1041+
/user/username/projects/transitivereferences/c/index.ts (used version)
10511042
10521043
Dependencies for::
10531044
/a/lib/lib.d.ts:
@@ -1653,10 +1644,12 @@ Program files::
16531644
Semantic diagnostics in builder refreshed for::
16541645
/user/username/projects/transitiveReferences/a/index.ts
16551646
/user/username/projects/transitiveReferences/b/index.d.ts
1647+
/user/username/projects/transitiveReferences/c/index.ts
16561648

16571649
Shape signatures in builder refreshed for::
16581650
/user/username/projects/transitivereferences/a/index.ts (computed .d.ts)
16591651
/user/username/projects/transitivereferences/b/index.d.ts (used version)
1652+
/user/username/projects/transitivereferences/c/index.ts (used version)
16601653

16611654
Dependencies for::
16621655
/a/lib/lib.d.ts:

0 commit comments

Comments
 (0)