Skip to content

Commit a221e69

Browse files
committed
Refresh incremental baselines for persisted library options
Library options are now preserved in build info, changing existing snapshots throughout the incremental suite. All new regressions now match fresh compilation without known-bug allowances.
1 parent 865f41f commit a221e69

206 files changed

Lines changed: 2237 additions & 897 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tsc/internal/execute/tsctests/tscbuild_test.go‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,13 +1063,12 @@ func TestBuildExactOptionalPropertyTypes(t *testing.T) {
10631063
}
10641064

10651065
type compilerOptionChangeTest struct {
1066-
option string
1067-
name string
1068-
values [2]any
1069-
options map[string]any
1070-
files FileMap
1071-
roots []string
1072-
expectedDiff string
1066+
option string
1067+
name string
1068+
values [2]any
1069+
options map[string]any
1070+
files FileMap
1071+
roots []string
10731072
}
10741073

10751074
func TestBuildOptionChangeShapeSignature(t *testing.T) {
@@ -1174,13 +1173,12 @@ func testCompilerOptionChanges(t *testing.T, tests []compilerOptionChangeTest) {
11741173
edits: []*tscEdit{
11751174
noChange,
11761175
{
1177-
caption: "change " + test.option + " without changing source files",
1178-
expectedDiff: test.expectedDiff,
1176+
caption: "change " + test.option + " without changing source files",
11791177
edit: func(sys *TestSys) {
11801178
sys.writeFileNoError(configPath, config(test.values[1-direction]))
11811179
},
11821180
},
1183-
{caption: noChange.caption, expectedDiff: test.expectedDiff},
1181+
noChange,
11841182
{
11851183
caption: "force rebuild with the same compiler options",
11861184
commandLineArgs: []string{"--build", "producer", "--verbose", "--force"},

‎tsc/testdata/baselines/reference/tsbuild/compilerOptionChanges/allowArbitraryExtensions-build-direction-0.js‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ declare const console: { log(msg: any): void; };
7676
export declare const result: any;
7777

7878
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo] *new*
79-
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../index.ts","../styles.d.css.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"ade73a776296d5caf71a4247dda83bca-export declare const result: any;\n","impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n"],"fileIdsList":[[3]],"options":{"allowArbitraryExtensions":false,"composite":true,"emitDeclarationOnly":true,"declaration":true,"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[2,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":22,"end":36,"code":6263,"category":1,"messageKey":"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","messageArgs":["./styles.css","/home/src/workspaces/project/producer/styles.d.css.ts"]}]]],"latestChangedDtsFile":"./index.d.ts"}
79+
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../index.ts","../styles.d.css.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"ade73a776296d5caf71a4247dda83bca-export declare const result: any;\n","impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n"],"fileIdsList":[[3]],"options":{"allowArbitraryExtensions":false,"composite":true,"emitDeclarationOnly":true,"declaration":true,"lib":["lib.es2020.d.ts"],"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[2,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":22,"end":36,"code":6263,"category":1,"messageKey":"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","messageArgs":["./styles.css","/home/src/workspaces/project/producer/styles.d.css.ts"]}]]],"latestChangedDtsFile":"./index.d.ts"}
8080
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
8181
{
8282
"version": "FakeTSVersion",
@@ -138,6 +138,9 @@ export declare const result: any;
138138
"composite": true,
139139
"emitDeclarationOnly": true,
140140
"declaration": true,
141+
"lib": [
142+
"lib.es2020.d.ts"
143+
],
141144
"module": 99,
142145
"moduleResolution": 100,
143146
"outDir": "./",
@@ -169,7 +172,7 @@ export declare const result: any;
169172
]
170173
],
171174
"latestChangedDtsFile": "./index.d.ts",
172-
"size": 1734
175+
"size": 1760
173176
}
174177

175178
producer/tsconfig.json::
@@ -247,7 +250,7 @@ export declare const result: {
247250
};
248251

249252
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo] *modified*
250-
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../styles.d.css.ts","../index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n",{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"380463a97ab08897fc216074e4a9ef84-export declare const result: {\n value: string;\n};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowArbitraryExtensions":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"}
253+
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../styles.d.css.ts","../index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n",{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"380463a97ab08897fc216074e4a9ef84-export declare const result: {\n value: string;\n};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowArbitraryExtensions":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"lib":["lib.es2020.d.ts"],"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"}
251254
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
252255
{
253256
"version": "FakeTSVersion",
@@ -309,6 +312,9 @@ export declare const result: {
309312
"composite": true,
310313
"emitDeclarationOnly": true,
311314
"declaration": true,
315+
"lib": [
316+
"lib.es2020.d.ts"
317+
],
312318
"module": 99,
313319
"moduleResolution": 100,
314320
"outDir": "./",
@@ -322,7 +328,7 @@ export declare const result: {
322328
]
323329
},
324330
"latestChangedDtsFile": "./index.d.ts",
325-
"size": 1498
331+
"size": 1524
326332
}
327333

328334
producer/tsconfig.json::

‎tsc/testdata/baselines/reference/tsbuild/compilerOptionChanges/allowArbitraryExtensions-build-direction-1.js‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export declare const result: {
7070
};
7171

7272
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo] *new*
73-
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../styles.d.css.ts","../index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n",{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"380463a97ab08897fc216074e4a9ef84-export declare const result: {\n value: string;\n};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowArbitraryExtensions":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"}
73+
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../styles.d.css.ts","../index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n",{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"380463a97ab08897fc216074e4a9ef84-export declare const result: {\n value: string;\n};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowArbitraryExtensions":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"lib":["lib.es2020.d.ts"],"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"}
7474
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
7575
{
7676
"version": "FakeTSVersion",
@@ -132,6 +132,9 @@ export declare const result: {
132132
"composite": true,
133133
"emitDeclarationOnly": true,
134134
"declaration": true,
135+
"lib": [
136+
"lib.es2020.d.ts"
137+
],
135138
"module": 99,
136139
"moduleResolution": 100,
137140
"outDir": "./",
@@ -145,7 +148,7 @@ export declare const result: {
145148
]
146149
},
147150
"latestChangedDtsFile": "./index.d.ts",
148-
"size": 1498
151+
"size": 1524
149152
}
150153

151154
producer/tsconfig.json::
@@ -216,7 +219,7 @@ Found 1 error in producer/index.ts:1
216219
export declare const result: any;
217220

218221
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo] *modified*
219-
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../index.ts","../styles.d.css.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"ade73a776296d5caf71a4247dda83bca-export declare const result: any;\n","impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n"],"fileIdsList":[[3]],"options":{"allowArbitraryExtensions":false,"composite":true,"emitDeclarationOnly":true,"declaration":true,"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[2,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":22,"end":36,"code":6263,"category":1,"messageKey":"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","messageArgs":["./styles.css","/home/src/workspaces/project/producer/styles.d.css.ts"]}]]],"latestChangedDtsFile":"./index.d.ts"}
222+
{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2020.d.ts","../index.ts","../styles.d.css.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fcb63f6bd996adc273725edd89b2e1d9-import { input } from './styles.css';\nexport const result = input;\n","signature":"ade73a776296d5caf71a4247dda83bca-export declare const result: any;\n","impliedNodeFormat":1},"c95e011ba1b3a0844a0e5701255bbbdb-export declare const input: { value: string };\n"],"fileIdsList":[[3]],"options":{"allowArbitraryExtensions":false,"composite":true,"emitDeclarationOnly":true,"declaration":true,"lib":["lib.es2020.d.ts"],"module":99,"moduleResolution":100,"outDir":"./","rootDir":"..","strict":true,"target":7},"referencedMap":[[2,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":22,"end":36,"code":6263,"category":1,"messageKey":"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","messageArgs":["./styles.css","/home/src/workspaces/project/producer/styles.d.css.ts"]}]]],"latestChangedDtsFile":"./index.d.ts"}
220223
//// [/home/src/workspaces/project/producer/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
221224
{
222225
"version": "FakeTSVersion",
@@ -278,6 +281,9 @@ export declare const result: any;
278281
"composite": true,
279282
"emitDeclarationOnly": true,
280283
"declaration": true,
284+
"lib": [
285+
"lib.es2020.d.ts"
286+
],
281287
"module": 99,
282288
"moduleResolution": 100,
283289
"outDir": "./",
@@ -309,7 +315,7 @@ export declare const result: any;
309315
]
310316
],
311317
"latestChangedDtsFile": "./index.d.ts",
312-
"size": 1734
318+
"size": 1760
313319
}
314320

315321
producer/tsconfig.json::

0 commit comments

Comments
 (0)