diff --git a/.changeset/thirty-adults-invite.md b/.changeset/thirty-adults-invite.md new file mode 100644 index 0000000000..89e3774813 --- /dev/null +++ b/.changeset/thirty-adults-invite.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-installation": minor +--- + +Use a more detailed cyclic dependencies warning diff --git a/packages/plugin-commands-installation/src/installDeps.ts b/packages/plugin-commands-installation/src/installDeps.ts index 5a104bcc52..6b80215ea8 100644 --- a/packages/plugin-commands-installation/src/installDeps.ts +++ b/packages/plugin-commands-installation/src/installDeps.ts @@ -129,7 +129,7 @@ when running add/update with the --workspace option') ? `: ${sequencedGraph.cycles.map(deps => deps.join(', ')).join('; ')}` : '' logger.warn({ - message: `There are cyclic dependencies${cyclicDependenciesInfo}`, + message: `There are cyclic workspace dependencies${cyclicDependenciesInfo}`, prefix: opts.workspaceDir, }) } diff --git a/packages/plugin-commands-installation/test/warnCyclicDependencies.ts b/packages/plugin-commands-installation/test/warnCyclicDependencies.ts index 8077096565..6799638e01 100644 --- a/packages/plugin-commands-installation/test/warnCyclicDependencies.ts +++ b/packages/plugin-commands-installation/test/warnCyclicDependencies.ts @@ -38,7 +38,7 @@ test('should warn about cyclic dependencies', async () => { expect(logger.warn).toHaveBeenCalledTimes(1) expect(logger.warn).toHaveBeenCalledWith({ - message: expect.stringMatching(/^There are cyclic dependencies: /), + message: expect.stringMatching(/^There are cyclic workspace dependencies: /), prefix: process.cwd(), }) })