Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump com.github.zafarkhaja:java-semver from 0.9.0 to 0.10.2 #17925

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 15, 2024

Bumps com.github.zafarkhaja:java-semver from 0.9.0 to 0.10.2.

Release notes

Sourced from com.github.zafarkhaja:java-semver's releases.

v0.10.2

In this release...

  • Fixed Version.toBuilder() bug (#68)

v0.10.1

In this release...

  • Fixed backward compatibility of Version's getters

v0.10.0

In this long overdue release...

  • The Version class has been almost completely rewritten through refactoring, along with its unit tests. The overall class structure has been made more readable and coherent. The code has been polished and the Javadoc comments have been considerably improved. Some minor requested features, like serializability, have been added and all known bugs have been fixed.

  • The public API has undergone a complete overhaul. Almost all of the methods have been deprecated; most of them were just renamed for the sake of consistency and/or common practices, and a couple of them, like incrementBuildMetadata(), didn't comply with the specification conceptually. A dozen or so new methods have been added, as well.

  • The equals(), hashCode() and compareTo() methods have been repurposed for complete equality, including build metadata.

  • The Version.Builder class has been also completely refactored and updated with new methods, so that it's more useful.

For a more detailed list of changes please see the CHANGELOG or the commit history v0.9.0...v0.10.0.

P.S. I strove to make this release as backward compatible as possible, so even though there are some drastic changes in this release, the migration process should be pretty straightforward and painless.

Changelog

Sourced from com.github.zafarkhaja:java-semver's changelog.

v0.10.2 (Jan 14, 2024)

  • Fixed Version.toBuilder() bug (#68)

v0.10.1 (Jan 12, 2024)

  • Fixed backward compatibility of Version's getters

v0.10.0 (Jan 10, 2024)

  • Made Version serializable (#47)
  • Enhanced Version.Builder class
  • Widened numeric identifiers to long
  • Replaced Version's static factory methods with Version.parse() and Version.of()
  • Created Version.tryParse() method which returns Optional<Version>
  • Created Version.isValid() method (#26)
  • Updated version parser to accept partial versions, such as 1 or 1.2 (#15)
  • Renamed and enhanced Version's getter methods
  • Renamed and enhanced Version's "incrementor" methods
  • Changed Version.satisfies(Expression)'s parameter to Predicate<Version>
  • Created Version.isPreRelease() method
  • Created Version.isStable() method
  • Created Version.isPublicApiStable() method
  • Created Version.isPublicApiCompatibleWith(Version) method
  • Created methods to check versions' compatibility (#21)
  • Refactored Version's comparators and "comparator" methods
  • Deprecated Version.BUILD_AWARE_ORDER comparator
  • Updated Range Expressions parser to support double-symbol && and || operators (#23)
  • Fixed Exceptions' getMessage() method (#38)
  • Performed major code and documentation improvements
  • Fixed various bugs and warnings, improved stability
  • Added Automatic-Module-Name to MANIFEST for JPMS support
  • Upgraded Java support to 1.8
  • Migrated to JUnit 5
  • Added CONTRIBUTING.md
  • Added .editorconfig file
  • Included LICENSE in the JAR artifact (#44)
  • Improved deployment support
  • Updated project dependencies
  • Removed Travis CI integration
Commits
  • 75b5abe Update for public release 0.10.2
  • 6614896 Fix Version.toBuilder() bug
  • da52637 Update for public release 0.10.1
  • 2b77b5b Fix backward compatibility of Version's getters
  • 7fb445e Update for public release 0.10.0
  • 21293c7 Tidy up CHANGELOG.md
  • 03ba2df Update maven dependencies
  • 34ffe72 Support double-symbol && and || operators in Ranges
  • 121c5e3 Simplify Range Expressions section in README
  • 77c78c2 Reword Version's main Javadoc comment
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [com.github.zafarkhaja:java-semver](https://github.com/zafarkhaja/jsemver) from 0.9.0 to 0.10.2.
- [Release notes](https://github.com/zafarkhaja/jsemver/releases)
- [Changelog](https://github.com/zafarkhaja/jsemver/blob/master/CHANGELOG.md)
- [Commits](zafarkhaja/jsemver@v0.9.0...v0.10.2)

---
updated-dependencies:
- dependency-name: com.github.zafarkhaja:java-semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file maven labels Jan 15, 2024
@kroepke kroepke self-assigned this Mar 5, 2024
@kroepke kroepke requested a review from a team March 7, 2024 15:43
@@ -0,0 +1,9 @@
type = "c"
message = "Update com.github.zafarkhaja:java-semver from 0.9.0 to 0.10.2."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't do changelog entries for dependency updates. Exceptions are security fixes.

@@ -178,7 +178,8 @@ private OkHttpClient addAuthenticationIfPresent(URI host, OkHttpClient okHttpCli

private Optional<SearchVersion> parseVersion(VersionResponse versionResponse) {
try {
final com.github.zafarkhaja.semver.Version version = com.github.zafarkhaja.semver.Version.valueOf(versionResponse.number());
String version1 = versionResponse.number();
final com.github.zafarkhaja.semver.Version version = Version.parse(version1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline version1.

case JsonTokenId.ID_NUMBER_INT:
return Version.forIntegers(p.getIntValue());
int major = p.getIntValue();
return Version.of(major);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline major.

@@ -114,10 +114,11 @@ public void doRun() {
final VersionCheckResponse versionCheckResponse = objectMapper.readValue(response.body().byteStream(), VersionCheckResponse.class);

final VersionResponse version = versionCheckResponse.version;
final com.github.zafarkhaja.semver.Version reportedVersion = com.github.zafarkhaja.semver.Version.forIntegers(version.major, version.minor, version.patch);
final com.github.zafarkhaja.semver.Version reportedVersion = Version.of(version.major, version.minor, version.patch);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we shorten the variable type to Version?


LOG.debug("Version check reports current version: " + versionCheckResponse);
if (reportedVersion.greaterThan(ServerVersion.VERSION.getVersion())) {
Version other = ServerVersion.VERSION.getVersion();
if (reportedVersion.isHigherThan(other)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline other.

final String qualifier = version.getPreReleaseVersion();
final String buildMetadata = version.getBuildMetadata();
String version1 = versionProperties.getProperty(propertyName);
final com.github.zafarkhaja.semver.Version version = com.github.zafarkhaja.semver.Version.parse(version1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline version1.

} else {
// If this is a pre-release version, use the major.minor.patch version for comparison with the other.
// This allows plugins to require a server version of 2.1.0 and it still gets loaded on a 2.1.0-beta.2 server.
// See: https://github.com/Graylog2/graylog2-server/issues/2462
return com.github.zafarkhaja.semver.Version.valueOf(version.getNormalVersion()).greaterThanOrEqualTo(other.getVersion());
String version1 = version.toStableVersion().toString();
com.github.zafarkhaja.semver.Version version2 = com.github.zafarkhaja.semver.Version.parse(version1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline version1.

@bernd
Copy link
Member

bernd commented Aug 22, 2024

@kroepke Can you please address my comments and fix the conflicts? I would be good if we can get this update into 6.1. Thanks!

@kroepke kroepke requested a review from bernd August 22, 2024 09:33
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

@bernd bernd merged commit be90077 into master Aug 23, 2024
6 checks passed
@bernd bernd deleted the dependabot/maven/com.github.zafarkhaja-java-semver-0.10.2 branch August 23, 2024 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants