Skip to content

Commit a54969e

Browse files
committed
fixup! Combine sequential logging statements in getAllOutputAsChunks and replace 'asFlat' with 'asLines'
1 parent 13517a3 commit a54969e

10 files changed

Lines changed: 196 additions & 196 deletions

File tree

libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,31 +176,31 @@ exports[`ConfigurationFile error cases Throws an error when a requested file doe
176176
177177
exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist 2`] = `
178178
Array [
179-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.",
179+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]",
180180
]
181181
`;
182182
183183
exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist async 1`] = `"File does not exist: <project root>/lib/test/errorCases/folderThatDoesntExist/config.json"`;
184184
185185
exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist async 2`] = `
186186
Array [
187-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.",
187+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]",
188188
]
189189
`;
190190
191191
exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved 1`] = `"In file \\"<project root>/lib/test/errorCases/extendsNotExist/config.json\\", file referenced in \\"extends\\" property (\\"./config2.json\\") cannot be resolved."`;
192192
193193
exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved 2`] = `
194194
Array [
195-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/extendsNotExist/config2.json\\" not found.",
195+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]",
196196
]
197197
`;
198198
199199
exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved async 1`] = `"In file \\"<project root>/lib/test/errorCases/extendsNotExist/config.json\\", file referenced in \\"extends\\" property (\\"./config2.json\\") cannot be resolved."`;
200200
201201
exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved async 2`] = `
202202
Array [
203-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/extendsNotExist/config2.json\\" not found.",
203+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]",
204204
]
205205
`;
206206
@@ -218,72 +218,72 @@ exports[`ConfigurationFile error cases Throws an error when there is a circular
218218
219219
exports[`ConfigurationFile error cases returns undefined when the file doesn't exist for tryLoadConfigurationFileForProject 1`] = `
220220
Array [
221-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.",
221+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]",
222222
]
223223
`;
224224
225225
exports[`ConfigurationFile error cases returns undefined when the file doesn't exist for tryLoadConfigurationFileForProjectAsync 1`] = `
226226
Array [
227-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.",
227+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]",
228228
]
229229
`;
230230
231231
exports[`ConfigurationFile error cases throws an error when the file doesn't exist 1`] = `"File does not exist: <project root>/lib/test/errorCases/invalidType/notExist.json"`;
232232
233233
exports[`ConfigurationFile error cases throws an error when the file doesn't exist 2`] = `
234234
Array [
235-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.",
235+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]",
236236
]
237237
`;
238238
239239
exports[`ConfigurationFile error cases throws an error when the file doesn't exist async 1`] = `"File does not exist: <project root>/lib/test/errorCases/invalidType/notExist.json"`;
240240
241241
exports[`ConfigurationFile error cases throws an error when the file doesn't exist async 2`] = `
242242
Array [
243-
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.",
243+
"[ debug] Configuration file \\"<project root>/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]",
244244
]
245245
`;
246246
247247
exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig 1`] = `
248248
Array [
249-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
249+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
250250
]
251251
`;
252252
253253
exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig async 1`] = `
254254
Array [
255-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
255+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
256256
]
257257
`;
258258
259259
exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig via tryLoadConfigurationFileForProject 1`] = `
260260
Array [
261-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
261+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
262262
]
263263
`;
264264
265265
exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig via tryLoadConfigurationFileForProjectAsync 1`] = `
266266
Array [
267-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
267+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
268268
]
269269
`;
270270
271271
exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file 1`] = `"File does not exist: <project root>/lib/test/project-referencing-rig/config/notExist.json"`;
272272
273273
exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file 2`] = `
274274
Array [
275-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
276-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.",
277-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" not found.",
275+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
276+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]",
277+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]",
278278
]
279279
`;
280280
281281
exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file async 1`] = `"File does not exist: <project root>/lib/test/project-referencing-rig/config/notExist.json"`;
282282
283283
exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file async 2`] = `
284284
Array [
285-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").",
286-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.",
287-
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" not found.",
285+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]",
286+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]",
287+
"[ debug] Configuration file \\"<project root>/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]",
288288
]
289289
`;

libraries/localization-utilities/src/parsers/test/__snapshots__/parseResx.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Object {
3535

3636
exports[`parseResx fails to parse a RESX file with a duplicate string: terminal output 1`] = `
3737
Array [
38-
"[ error] test.resx(6,45): Duplicate string value \\"stringA\\"",
38+
"[ error] test.resx(6,45): Duplicate string value \\"stringA\\"[n]",
3939
]
4040
`;
4141

@@ -50,7 +50,7 @@ Object {
5050

5151
exports[`parseResx ignoreMissingResxComments when set to false, warns on a missing comment: terminal output 1`] = `
5252
Array [
53-
"[warning] test.resx(3,59): Missing string comment in <data> element",
53+
"[warning] test.resx(3,59): Missing string comment in <data> element[n]",
5454
]
5555
`;
5656
@@ -113,7 +113,7 @@ Object {
113113
114114
exports[`parseResx prints an error on invalid XML: terminal output 1`] = `
115115
Array [
116-
"[ error] test.resx(3,41): Found unexpected non-empty text node in RESX <data> element",
116+
"[ error] test.resx(3,41): Found unexpected non-empty text node in RESX <data> element[n]",
117117
]
118118
`;
119119

libraries/operation-graph/src/test/__snapshots__/OperationExecutionManager.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,54 @@ exports[`OperationExecutionManager constructor throws if a dependency is not in
44

55
exports[`OperationExecutionManager executeAsync single pass blocks on failure 1`] = `
66
Array [
7-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
7+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
88
]
99
`;
1010

1111
exports[`OperationExecutionManager executeAsync single pass does not track noops 1`] = `
1212
Array [
13-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
13+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
1414
]
1515
`;
1616

1717
exports[`OperationExecutionManager executeAsync single pass executes in order 1`] = `
1818
Array [
19-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
19+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
2020
]
2121
`;
2222

2323
exports[`OperationExecutionManager executeAsync single pass handles empty input 1`] = `
2424
Array [
25-
"[verbose] Executing a maximum of 0 simultaneous tasks...",
25+
"[verbose] Executing a maximum of 0 simultaneous tasks...[n]",
2626
]
2727
`;
2828

2929
exports[`OperationExecutionManager executeAsync single pass handles trivial input 1`] = `
3030
Array [
31-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
31+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
3232
]
3333
`;
3434

3535
exports[`OperationExecutionManager executeAsync single pass respects concurrency 1`] = `
3636
Array [
37-
"[verbose] Executing a maximum of 2 simultaneous tasks...",
37+
"[verbose] Executing a maximum of 2 simultaneous tasks...[n]",
3838
]
3939
`;
4040

4141
exports[`OperationExecutionManager executeAsync single pass respects priority order 1`] = `
4242
Array [
43-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
43+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
4444
]
4545
`;
4646

4747
exports[`OperationExecutionManager executeAsync watch mode executes in order: first 1`] = `
4848
Array [
49-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
49+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
5050
]
5151
`;
5252

5353
exports[`OperationExecutionManager executeAsync watch mode executes in order: second 1`] = `
5454
Array [
55-
"[verbose] Executing a maximum of 1 simultaneous tasks...",
55+
"[verbose] Executing a maximum of 1 simultaneous tasks...[n]",
5656
]
5757
`;

libraries/rush-lib/src/api/test/__snapshots__/RushProjectConfiguration.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Map {
3232

3333
exports[`RushProjectConfiguration operationSettingsByOperationName does not allow one outputFolderName to be under another 1`] = `
3434
Array [
35-
"[ error] The project \\"test-project-d\\" has a \\"config/rush-project.json\\" configuration that defines two operations in the same command whose \\"outputFolderNames\\" would overlap. Operations outputs in the same command must be disjoint so that they can be independently cached. The \\"a/b\\" path overlaps between these operations: \\"_phase:b\\", \\"_phase:a\\"",
35+
"[ error] The project \\"test-project-d\\" has a \\"config/rush-project.json\\" configuration that defines two operations in the same command whose \\"outputFolderNames\\" would overlap. Operations outputs in the same command must be disjoint so that they can be independently cached. The \\"a/b\\" path overlaps between these operations: \\"_phase:b\\", \\"_phase:a\\"[n]",
3636
]
3737
`;
3838

@@ -60,18 +60,18 @@ exports[`RushProjectConfiguration operationSettingsByOperationName throws an err
6060
6161
exports[`RushProjectConfiguration operationSettingsByOperationName validates mix of existent and nonexistent parameters 1`] = `
6262
Array [
63-
"[ error] The project \\"test-project-g\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param. Valid parameters for this operation are: --production, --verbose.",
63+
"[ error] The project \\"test-project-g\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param. Valid parameters for this operation are: --production, --verbose.[n]",
6464
]
6565
`;
6666
6767
exports[`RushProjectConfiguration operationSettingsByOperationName validates nonexistent parameters when operation has valid parameters 1`] = `
6868
Array [
69-
"[ error] The project \\"test-project-f\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param, --another-nonexistent. Valid parameters for this operation are: --production, --verbose.",
69+
"[ error] The project \\"test-project-f\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param, --another-nonexistent. Valid parameters for this operation are: --production, --verbose.[n]",
7070
]
7171
`;
7272
7373
exports[`RushProjectConfiguration operationSettingsByOperationName validates that parameters in parameterNamesToIgnore exist for the operation 1`] = `
7474
Array [
75-
"[ error] The project \\"test-project-e\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --invalid-parameter, --another-invalid, -malformed-parameter. Valid parameters for this operation are: (none).",
75+
"[ error] The project \\"test-project-e\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --invalid-parameter, --another-invalid, -malformed-parameter. Valid parameters for this operation are: (none).[n]",
7676
]
7777
`;

libraries/rush-lib/src/logic/operations/test/__snapshots__/OperationMetadataManager.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ Array [
1111

1212
exports[`OperationMetadataManager should restore chunked stderr 1`] = `
1313
Array [
14-
"[ error] chunk1",
15-
"[ error] chunk2",
14+
"[ error] chunk1[n]",
15+
"[ error] chunk2[n]",
1616
]
1717
`;
1818

1919
exports[`OperationMetadataManager should restore chunked stdout 1`] = `
2020
Array [
21-
"[ log] chunk1",
22-
"[ log] chunk2",
21+
"[ log] chunk1[n]",
22+
"[ log] chunk2[n]",
2323
]
2424
`;
2525

2626
exports[`OperationMetadataManager should restore mixed chunked output 1`] = `
2727
Array [
28-
"[ log] logged to stdout",
29-
"[ error] logged to stderr",
28+
"[ log] logged to stdout[n]",
29+
"[ error] logged to stderr[n]",
3030
]
3131
`;

libraries/rush-lib/src/logic/pnpm/test/__snapshots__/PnpmShrinkwrapFile.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`PnpmShrinkwrapFile Check is workspace project modified pnpm lockfile major version 9 sha1 integrity can be handled when disallowInsecureSha1 1`] = `
44
Array [
5-
"[ error] Error: An integrity field with \\"sha1\\" was detected in the pnpm-lock.yaml file located in subspace default; this conflicts with the \\"disallowInsecureSha1\\" policy from pnpm-config.json.",
6-
"[ error] ",
5+
"[ error] Error: An integrity field with \\"sha1\\" was detected in the pnpm-lock.yaml file located in subspace default; this conflicts with the \\"disallowInsecureSha1\\" policy from pnpm-config.json.[n]",
6+
"[ error] [n]",
77
]
88
`;

libraries/rush-lib/src/logic/test/__snapshots__/ProjectImpactGraphGenerator.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project
9393
9494
exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""packages""): Terminal Output 1`] = `
9595
Array [
96-
"[ log] ",
97-
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default]",
96+
"[ log] [n]",
97+
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]",
9898
]
9999
`;
100100
@@ -167,8 +167,8 @@ exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project
167167
168168
exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""repo""): Terminal Output 1`] = `
169169
Array [
170-
"[ log] ",
171-
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default]",
170+
"[ log] [n]",
171+
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]",
172172
]
173173
`;
174174
@@ -267,8 +267,8 @@ exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project
267267
268268
exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""workspacePackages""): Terminal Output 1`] = `
269269
Array [
270-
"[ log] ",
271-
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default]",
270+
"[ log] [n]",
271+
"[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]",
272272
]
273273
`;
274274

0 commit comments

Comments
 (0)