fix: use a more detailed cyclic depedencies warning (#3569) (#3573)

This commit is contained in:
javier-garcia-meteologica
2021-07-01 21:58:55 +02:00
committed by GitHub
parent f5ec0a96f2
commit 5565dd5f42
3 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-installation": minor
---
Use a more detailed cyclic dependencies warning

View File

@@ -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,
})
}

View File

@@ -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(),
})
})