Skip to content

chore(deps): update dependency prettier-plugin-java to v2

Renovate requested to merge renovate/prettier-plugin-java-2.x into main

This MR contains the following updates:

Package Type Update Change
prettier-plugin-java devDependencies major ^1.6.1 -> ^2.0.0

Dependency Lookup Warnings

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


Release Notes

jhipster/prettier-java

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 MR becomes conflicted, or you tick the rebase/retry checkbox.

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


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

This MR has been generated by Renovate Bot.

Merge request reports