Skip to content

Commit

Permalink
Catch and log error from semver-interect, but otherwise continue (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArvinH authored and snyamathi committed Mar 16, 2018
1 parent 18176f7 commit de77398
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lerna-semver-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ function getCommonRange (compoundRanges) {
}, {});

forEach(majorVersions, (ranges, majorVersion) => {
majorVersions[majorVersion] = intersect(...ranges);
try {
majorVersions[majorVersion] = intersect(...ranges);
} catch(e) {
// bypass the error happened in intersect function
// let the `duplicates` object return by Sync funtion handle the warning
}
});

return majorVersions;
Expand Down

0 comments on commit de77398

Please sign in to comment.