diff --git a/.changeset/tidy-peas-grin.md b/.changeset/tidy-peas-grin.md new file mode 100644 index 0000000000..7f3db3c702 --- /dev/null +++ b/.changeset/tidy-peas-grin.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-audit": patch +--- + +Fix AUDIT_TABLE_OPTIONS not to overwrite TABLE_OPTIONS, which prevents breaking other table outputs such like `pnpm outdated` [#6017](https://github.com/pnpm/pnpm/issues/6017). diff --git a/lockfile/plugin-commands-audit/src/audit.ts b/lockfile/plugin-commands-audit/src/audit.ts index 6b5042c47f..f9da28fd50 100644 --- a/lockfile/plugin-commands-audit/src/audit.ts +++ b/lockfile/plugin-commands-audit/src/audit.ts @@ -29,11 +29,13 @@ const AUDIT_COLOR = { critical: chalk.bold.red, } -const AUDIT_TABLE_OPTIONS = TABLE_OPTIONS -AUDIT_TABLE_OPTIONS.columns = { - 1: { - width: 54, // = table width of 80 - wrapWord: true, +const AUDIT_TABLE_OPTIONS = { + ...TABLE_OPTIONS, + columns: { + 1: { + width: 54, // = table width of 80 + wrapWord: true, + }, }, } // eslint-enable