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

Update dependency prettier-plugin-java to v2 #83

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 2, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prettier-plugin-java (source) 1.6.2 -> 2.6.0 age adoption passing confidence

Release Notes

jhipster/prettier-java (prettier-plugin-java)

v2.6.0

Compare Source

Enhancements

Fixes

Misc

v2.5.0

Compare Source

Enhancements

Fixes

Miscellaneous

v2.4.0

Compare Source

Enhancements

v2.3.1

Compare Source

Fixes

v2.3.0

Compare Source

Enhancements

  • Break long lines on type arguments (#​584)
  • Break and indent binary expression with cast properly (#​587)
  • Adjust indentation of multiline string (Issue #​593 fixed with #​596)
  • Improves binary expression formatting (#​594)
  • Supports JLS annotation style (#​586

Thanks to @​jtkiesel for all of these contributions !

Fixes

v2.2.0

Compare Source

Enhancements

  • Upgrade prettier version to Prettier v3

v2.1.0

Compare Source

Enhancements

// Input
/**
 * @​prettier
 */
public class Example {

  private int test = -1;
}

// Output with require-pragma option activated
/**
 * @​prettier
 */
public class Example {

  private int test = -1;
}

// Input
public class Example {

  private int test = -1;
}

// Output with require-pragma option activated
public class Example {

  private int test = -1;
}

Fixes

// Input
class Example {

  void example() {
    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      new Object().someMethod();

    Object[] aParticularlyLongAndObnoxiousNameForIllustrativePurposes2 =
      new Object[] { new Object(), new Object() };

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes3 =
      SomeClass.someStaticMethod();

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      someMethod().anotherMethod();

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      anotherValue != null ? anotherValue : new Object();
  }
}

// Output
class Example {

  void example() {
    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      new Object().someMethod();

    Object[] aParticularlyLongAndObnoxiousNameForIllustrativePurposes2 =
      new Object[] { new Object(), new Object() };

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes3 =
      SomeClass.someStaticMethod();

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      someMethod().anotherMethod();

    Object aParticularlyLongAndObnoxiousNameForIllustrativePurposes =
      anotherValue != null ? anotherValue : new Object();
  }
}

v2.0.0

Compare Source

Breaking changes

  • Drop support of Node.js 12

Enhancements

// Input
class T {

  void test(Buyer other) {
    return switch (other) {
      case null -> true;
      case Buyer b && this.bestPrice > b.bestPrice -> true;
      case Buyer b && this.bestPrice > b.bestPrice -> {
        return true;
      }
      case (Buyer b && this.bestPrice > b.bestPrice) -> true;
      case Buyer b &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice -> true;
      case Buyer b &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice -> {
        return true;
      }
      case (
          Buyer b &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice
        ) -> true;
      case (
          Buyer b &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice
        ) -> {
        return true;
      }
      default -> false;
    };
  }
}

// Output
class T {

  void test(Buyer other) {
    return switch (other) {
      case null -> true;
      case Buyer b && this.bestPrice > b.bestPrice -> true;
      case Buyer b && this.bestPrice > b.bestPrice -> {
        return true;
      }
      case (Buyer b && this.bestPrice > b.bestPrice) -> true;
      case Buyer b &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice -> true;
      case Buyer b &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice &&
        this.bestPrice > b.bestPrice -> {
        return true;
      }
      case (
          Buyer b &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice
        ) -> true;
      case (
          Buyer b &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice &&
          this.bestPrice > b.bestPrice
        ) -> {
        return true;
      }
      default -> false;
    };
  }
}

Fixes

  • Fix parsing of escaped spaces in strings (Issue #​541 closed with #​543)
public class Test {

  public static final String REGEX = "^\s$";
}
// Input
open module org.myorg.module {
  requires some.required.module;

  exports org.myorg.module.exportpackage1;
  exports org.myorg.module.exportpackage2;
}
// Prettier 1.6.2
open module org.myorg.module {
  requires some.required.module;

  exports org.myorg.module.exportpackage1;
  exports org.myorg.module.exportpackage2;
}
// Prettier 1.6.3
open module org.myorg.module {
  requires some.required.module;

  exports org.myorg.module.exportpackage1;
  exports org.myorg.module.exportpackage2;
}

Misc

  • doc: add VSCode Java import order configuration (#​546)
    Thanks to @​derkoe for the contribution

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/prettier-plugin-java-2.x branch from 6e26692 to 5cc405b Compare February 23, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant