Skip to content

Commit

Permalink
fix(manager/npm): use --config.ignore-scripts=true for pnpm dedupe (
Browse files Browse the repository at this point in the history
  • Loading branch information
liby committed Oct 15, 2023
1 parent 805e727 commit 526ebe6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/usage/configuration-options.md
Expand Up @@ -2973,7 +2973,7 @@ Table with options:
| `gomodUpdateImportPaths` | Update source import paths on major module updates, using [mod](https://github.com/marwan-at-work/mod). |
| `helmUpdateSubChartArchives` | Update subchart archives in the `/charts` folder. |
| `npmDedupe` | Run `npm dedupe` after `package-lock.json` updates. |
| `pnpmDedupe` | Run `pnpm dedupe` after `pnpm-lock.yaml` updates. |
| `pnpmDedupe` | Run `pnpm dedupe --config.ignore-scripts=true` after `pnpm-lock.yaml` updates. |
| `yarnDedupeFewer` | Run `yarn-deduplicate --strategy fewer` after `yarn.lock` updates. |
| `yarnDedupeHighest` | Run `yarn-deduplicate --strategy highest` (`yarn dedupe --strategy highest` for Yarn >=2.2.0) after `yarn.lock` updates. |

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/npm/post-update/pnpm.spec.ts
Expand Up @@ -84,7 +84,7 @@ describe('modules/manager/npm/post-update/pnpm', () => {
cmd: 'pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile',
},
{
cmd: 'pnpm dedupe',
cmd: 'pnpm dedupe --config.ignore-scripts=true',
},
]);
});
Expand Down
3 changes: 1 addition & 2 deletions lib/modules/manager/npm/post-update/pnpm.ts
Expand Up @@ -79,8 +79,7 @@ export async function generateLockFile(

// postUpdateOptions
if (config.postUpdateOptions?.includes('pnpmDedupe')) {
logger.debug('Performing pnpm dedupe');
commands.push('pnpm dedupe');
commands.push('pnpm dedupe --config.ignore-scripts=true');
}

if (upgrades.find((upgrade) => upgrade.isLockFileMaintenance)) {
Expand Down

0 comments on commit 526ebe6

Please sign in to comment.