From 93d34632fe5d241a1df2ad31cf7a73a10be70144 Mon Sep 17 00:00:00 2001 From: GNQG Date: Thu, 2 Feb 2023 10:48:50 +0900 Subject: [PATCH] fix(plugin-commands-audit): AUDIT_TABLE_OPTIONS not to overwrite TABLE_OPTIONS (#6019) * fix(plugin-commands-audit): fix AUDIT_TABLE_OPTIONS not to overwrite TABLE_OPTIONS * docs: update changesets --- .changeset/tidy-peas-grin.md | 5 +++++ lockfile/plugin-commands-audit/src/audit.ts | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/tidy-peas-grin.md 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