Skip to content

Commit

Permalink
fix: ignore workspace in version or range
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Jul 11, 2021
1 parent ec7c3b6 commit 96284e8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/checks/checkDirectDuplicateDependencies.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion dist/index-node12-dev.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node12-dev.cjs.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion dist/index-node12.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node12.cjs.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/checks/checkDirectDuplicateDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export function checkDirectDuplicateDependencies(

versions.forEach((version, index) => {
if (version.startsWith('file:') || range.startsWith('file:')) return;
// https://yarnpkg.com/features/workspaces#workspace-ranges-workspace
if (
version.startsWith('workspace:') ||
range.startsWith('workspace:')
) {
return;
}

if (semver.intersects(version, range)) {
return;
Expand Down

0 comments on commit 96284e8

Please sign in to comment.