Commit a1dffde
committed
Replace withNewerVersions with supersedes
This commit removes withNewerVersions and replaces the one usage of it
with a new function supersedes, which checks whether an update matches
another while having a newer nextVersion.
withNewerVersions was a little awkward to update to work with us having
changed some Versions to VersionWithFirstSeens, because it accepts a
list of Versions (rather than just producing one).
It was originally added in response to [this PR
comment](#1667 (comment)),
but we reckon replacing it with a slightly different check of the
group and artifact IDs makes for clearer, more explicit code. We
think (though it’s somewhat hard to tell) that this doesn’t remove any
existing functionality: part of the argument for adding
withNewerVersions in the first place was to support Update.Group, but it
appears to only be called for Update.Singles.1 parent 0d83ea8 commit a1dffde
File tree
2 files changed
+4
-9
lines changed- modules/core/src/main/scala/org/scalasteward/core
- data
- nurture
2 files changed
+4
-9
lines changedLines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
0 commit comments