Skip to content

Commit e3626f6

Browse files
authored
chore(cloudformation-diff): fix typo in formatTable (#20302)
Fix typo in method name s/calculcate/calculate ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fc874d8 commit e3626f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: packages/@aws-cdk/cloudformation-diff/lib/format-table.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as table from 'table';
1010
export function formatTable(cells: string[][], columns: number | undefined): string {
1111
return table.table(cells, {
1212
border: TABLE_BORDER_CHARACTERS,
13-
columns: buildColumnConfig(columns !== undefined ? calculcateColumnWidths(cells, columns) : undefined),
13+
columns: buildColumnConfig(columns !== undefined ? calculateColumnWidths(cells, columns) : undefined),
1414
drawHorizontalLine: (line) => {
1515
// Numbering like this: [line 0] [header = row[0]] [line 1] [row 1] [line 2] [content 2] [line 3]
1616
return (line < 2 || line === cells.length) || lineBetween(cells[line - 1], cells[line]);
@@ -48,7 +48,7 @@ function buildColumnConfig(widths: number[] | undefined): { [index: number]: tab
4848
* than the fair share is evenly distributed over all columns that exceed their
4949
* fair share.
5050
*/
51-
function calculcateColumnWidths(rows: string[][], terminalWidth: number): number[] {
51+
function calculateColumnWidths(rows: string[][], terminalWidth: number): number[] {
5252
// The terminal is sometimes reported to be 0. Also if the terminal is VERY narrow,
5353
// just assume a reasonable minimum size.
5454
terminalWidth = Math.max(terminalWidth, 40);

0 commit comments

Comments
 (0)