JaidenAshmore / java-dynamic-sqs-listener

Java SQS Listener library built to be customisable and dynamic during runtime
MIT License
50 stars 12 forks source link

Update dependency prettier-plugin-java to v1 - autoclosed #373

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 2 years ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prettier-plugin-java 0.8.3 -> 1.6.2 age adoption passing confidence

Release Notes

jhipster/prettier-java ### [`v1.6.2`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#Latest-v162) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/prettier-plugin-java@1.6.1...prettier-plugin-java@1.6.2) #### Fixes - Fix parsing of nested sealed and non-sealed classes & interfaces inside interfaces (Issue [#​533](https://togithub.com/jhipster/prettier-java/issues/533) closed with [#​538](https://togithub.com/jhipster/prettier-java/pull/538)) ```java public interface Test { sealed interface Inner {} public static sealed abstract class SealedParent {} non-sealed interface Inner {} public static non-sealed abstract class SealedParent {} final static class SealedChild extends SealedParent {} } ``` - Fix incorrect reformating of type bounds in a generic extends clause (Issue [#​536](https://togithub.com/jhipster/prettier-java/issues/536) closed with [#​537](https://togithub.com/jhipster/prettier-java/pull/537)) ```java // Input public class Foo { public void example(U u) {} public void example(U u) {} } // Prettier 1.6.1 public class Foo { public void example(U u) {} public void example(U u) {} } // Prettier 1.6.2 public class Foo { public void example(U u) {} public void example(U u) {} } ``` ### [`v1.6.1`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v161) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/prettier-plugin-java@1.6.0...prettier-plugin-java@1.6.1) #### Fixes - Fix parsing of nested sealed and non-sealed classes (Issue [#​522](https://togithub.com/jhipster/prettier-java/issues/522) closed with [#​523](https://togithub.com/jhipster/prettier-java/pull/523)) ```java // Input public class SealedClasses { public static sealed abstract class SealedParent permits SealedChild {} final static class SealedChild extends SealedParent {} } // Output public class NestedSealedClasses { public abstract static sealed class SealedParent permits SealedChild {} static final class SealedChild extends SealedParent {} } ``` ### [`v1.6.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v160) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/prettier-plugin-java@1.5.0...prettier-plugin-java@1.6.0) #### Enhancements - Improve formatting of records parameters with annotations ```java // Input public record Record( @​JsonSerialize(using = StatusSerializer.class, nullsUsing = NullSerializer.class) @​Schema(type = "integer", description = "Some fancy description") Status status, @​NotNull Integer number ) {} public record Record( @​JsonSerialize(using = StatusSerializer.class, nullsUsing = NullSerializer.class) @​Schema(type = "integer", description = "Some fancy description") // comment Status status, // another comment @​NotNull Integer number ) {} // Prettier v1.5.0 public record Record( @​JsonSerialize( using = StatusSerializer.class, nullsUsing = NullSerializer.class ) @​Schema( type = "integer", description = "Some fancy description" ) Status status, @​NotNull Integer number ) {} public record Record( @​JsonSerialize( using = StatusSerializer.class, nullsUsing = NullSerializer.class ) @​Schema(type = "integer", description = "Some fancy description") // comment Status status, // another comment @​NotNull Integer number ) {} // Prettier v1.6.0 public record Record( @​JsonSerialize( using = StatusSerializer.class, nullsUsing = NullSerializer.class ) @​Schema(type = "integer", description = "Some fancy description") Status status, @​NotNull Integer number ) {} public record Record( @​JsonSerialize( using = StatusSerializer.class, nullsUsing = NullSerializer.class ) @​Schema(type = "integer", description = "Some fancy description") // comment Status status, // another comment @​NotNull Integer number ) {} ``` #### Fixes - Fix casting with additional bounds ```java // Input class Example { void should_cast_with_single_element() { var myElem = (int) othrElement; var myElem = (A) othrElement; var myElem = (A) (othrElement, value) -> othrElement + value; var myElem = (Aaeaozeaonzeoazneaozenazonelkadndpndpazdpazdpazdpazdpazeazpeaazdpazdpazpdazdpa) othrElement; } void should_cast_with_additional_bounds() { foo((A & B) obj); foo((A & B & C) obj); foo((Aaeaozeaonzeoazneaozenazone & Bazoieoainzeonaozenoazne & Cjneazeanezoanezoanzeoaneonazeono) obj); foo((Aaeaozeaonzeoazneaozenazone & Bazoieoainzeonaozenoazne & Cjneazeanezoanezoanzeoaneonazeono) (othrElement, value) -> othrElement + value); } } // Prettier v1.5.0 class Example { void should_cast_with_single_element() { var myElem = (int) othrElement; var myElem = (A) othrElement; var myElem = (A) (othrElement, value) -> othrElement + value; var myElem = (Aaeaozeaonzeoazneaozenazonelkadndpndpazdpazdpazdpazdpazeazpeaazdpazdpazpdazdpa) othrElement; } void should_cast_with_additional_bounds() { foo((A) & B obj); foo((A) & B& C obj); foo( (Aaeaozeaonzeoazneaozenazone) & Bazoieoainzeonaozenoazne& Cjneazeanezoanezoanzeoaneonazeono obj ); foo( (Aaeaozeaonzeoazneaozenazone) & Bazoieoainzeonaozenoazne& Cjneazeanezoanezoanzeoaneonazeono ( othrElement, value ) -> othrElement + value ); } } // Prettier v1.6.0 class Example { void should_cast_with_single_element() { var myElem = (int) othrElement; var myElem = (A) othrElement; var myElem = (A) (othrElement, value) -> othrElement + value; var myElem = (Aaeaozeaonzeoazneaozenazonelkadndpndpazdpazdpazdpazdpazeazpeaazdpazdpazpdazdpa) othrElement; } void should_cast_with_additional_bounds() { foo((A & B) obj); foo((A & B & C) obj); foo( ( Aaeaozeaonzeoazneaozenazone & Bazoieoainzeonaozenoazne & Cjneazeanezoanezoanzeoaneonazeono ) obj ); foo( ( Aaeaozeaonzeoazneaozenazone & Bazoieoainzeonaozenoazne & Cjneazeanezoanezoanzeoaneonazeono ) (othrElement, value) -> othrElement + value ); } } ``` ### [`v1.5.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v150) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.4.0...prettier-plugin-java@1.5.0) #### Enhancements - Split record parameters on several lines if they do not fit on a single line ([#​509](https://togithub.com/jhipster/prettier-java/pull/509)) ```java // Input public record Person( String firstName, String lastName, String email, String phoneNumber, String streetAddress, String city, String state, String zipCode ) {} // Prettier 1.4.0 public record Person( String firstName, String lastName, String email, String phoneNumber, String streetAddress, String city, String state, String zipCode ) {} // Prettier 1.5.0 public record Person( String firstName, String lastName, String email, String phoneNumber, String streetAddress, String city, String state, String zipCode ) {} ``` - Support pattern matching in switch statements preview feature ([#​511](https://togithub.com/jhipster/prettier-java/pull/511)) ```java // Input class T { static String formatterPatternSwitch(Object o) { return switch (o) { case Integer i -> String.format("int %d", i); case Long l -> String.format("long %d", l); case Double d -> String.format("double %f", d); case String s -> String.format("String %s", s); case TOTO -> String.format("TOTO %s", o); case null -> String.format("Null !"); case default -> String.format("Default !"); default -> o.toString(); }; } } // Output class T { static String formatterPatternSwitch(Object o) { return switch (o) { case Integer i -> String.format("int %d", i); case Long l -> String.format("long %d", l); case Double d -> String.format("double %f", d); case String s -> String.format("String %s", s); case TOTO -> String.format("TOTO %s", o); case null -> String.format("Null !"); case default -> String.format("Default !"); default -> o.toString(); }; } } ``` - Improve printing of class with long typeParameterList ([#​512](https://togithub.com/jhipster/prettier-java/pull/512)) ```java // Input public class ComplexGenericClass, BEANTYPE, CONFIG extends BeanConfig> {} // Prettier 1.4.0 public class ComplexGenericClass, BEANTYPE, CONFIG extends BeanConfig> {} // Prettier 1.5.0 public class ComplexGenericClass< BEAN extends AbstractBean & BeanItemSelect, BEANTYPE, CONFIG extends BeanConfig > {} ``` ### [`v1.4.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v140) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.3.1...v1.4.0) #### Enhancements - Improve method invocation with lambda parameters ([#​497](https://togithub.com/jhipster/prettier-java/pull/497)) #### Fixes - Fix parsing of static imports of yield methods ([#​499](https://togithub.com/jhipster/prettier-java/pull/499)) - Improve java-parser types signatures ([#​496](https://togithub.com/jhipster/prettier-java/pull/496)) ### [`v1.3.1`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v131) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.3.0...v1.3.1) #### Fixes - Fix interface member detection to support inner records (From [@​rnorth](https://togithub.com/rnorth): [#​492](https://togithub.com/jhipster/prettier-java/pull/492)) - Remove yarn-error.log file from releases ### [`v1.3.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v130) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.2.0...v1.3.0) #### Enhancements - Add a space after generic constructor type parameters ([#​485](https://togithub.com/jhipster/prettier-java/pull/485)) ```java // Input public GenericConstructor(T genericParameter) {} // Prettier 1.2.0 public GenericConstructor(T genericParameter) {} // Prettier 1.2.1 public GenericConstructor(T genericParameter) {} ``` ### [`v1.2.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v120) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.1.1...v1.2.0) #### Enhancements - Supports of instance of pattern matching ([#​476](https://togithub.com/jhipster/prettier-java/pull/476)) ```java // Input if (o instanceof Integer i || p instanceof Point || q instanceof Circle c || r instanceof Square) { formatted = String.format("int %d", i); } else if (o instanceof Long l) { formatted = String.format("long %d", l); } else if (o instanceof Double d) { formatted = String.format("double %f", d); } else if (o instanceof String s) { formatted = String.format("String %s", s); } // Output if ( o instanceof Integer i || p instanceof Point || q instanceof Circle c || r instanceof Square ) { formatted = String.format("int %d", i); } else if (o instanceof Long l) { formatted = String.format("long %d", l); } else if (o instanceof Double d) { formatted = String.format("double %f", d); } else if (o instanceof String s) { formatted = String.format("String %s", s); } ``` - Supports of sealed classes and interfaces ([#​478](https://togithub.com/jhipster/prettier-java/pull/478)) ```java // Input public sealed class Rectangle implements Shape permits Square { private final double length; private final double height; public Rectangle(double length, double height) { this.length = length; this.height = height; } @​Override public double area() { return length * height; } } // Output public sealed class Rectangle implements Shape permits Square { private final double length; private final double height; public Rectangle(double length, double height) { this.length = length; this.height = height; } @​Override public double area() { return length * height; } } ``` #### Miscallenous - Add [copy/pastable Checkstyle configuration](./docs/checkstyle/checkstyle.xml) compatible with Prettier ([#​477](https://togithub.com/jhipster/prettier-java/pull/477)) ### [`v1.1.1`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v111) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.1.0...v1.1.1) #### Fixes - Fix parsing records inside class declarations and records with simplified constructors ([#​470](https://togithub.com/jhipster/prettier-java/pull/470)) #### Miscallenous - Update links to Chevrotain library (From [@​Austin-Scott](https://togithub.com/Austin-Scott): [#​472](https://togithub.com/jhipster/prettier-java/pull/472)) ### [`v1.1.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v110) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.0.2...v1.1.0) #### Enhancements - Supports of Records ([#​460](https://togithub.com/jhipster/prettier-java/pull/460)) ```java // Input public record Pet( @​NotNull String name, int age, String... others, Object @​Nullable... errorMessageArgs ) { public Pet { if (age < 0) { throw new IllegalArgumentException("Age cannot be negative"); } if (name == null || name.isBlank()) { throw new IllegalArgumentException("Name cannot be blank"); } } public void test() {} } // Output public record Pet( @​NotNull String name, int age, String... others, Object @​Nullable... errorMessageArgs ) { public Pet { if (age < 0) { throw new IllegalArgumentException("Age cannot be negative"); } if (name == null || name.isBlank()) { throw new IllegalArgumentException("Name cannot be blank"); } } public void test() {} } ``` ### [`v1.0.2`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v102) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.0.1...v1.0.2) #### Fixes - Keep space between annotation and type identifiers in unannClassType expressions ([#​455](https://togithub.com/jhipster/prettier-java/pull/455)) ```java // Input class T { SomeClass.@​Valid SomeInnerClass someInnerClass = someClass.getInteractions().get(0); void process( Map.@​NonNull Entry entry, @​NonNull Map context ) {} } // Prettier 1.0.1 class T { SomeClass.@​ValidSomeInnerClass someInnerClass = someClass .getInteractions() .get(0); void process( Map.@​NonNullEntry entry, @​NonNull Map context ) {} } // Prettier 1.0.2 class T { SomeClass.@​Valid SomeInnerClass someInnerClass = someClass .getInteractions() .get(0); void process( Map.@​NonNull Entry entry, @​NonNull Map context ) {} } ``` - Fix inconsistent indentation between chained method on method and new object ([#​456](https://togithub.com/jhipster/prettier-java/pull/456)) ```java // Input class T { public void method() { new Foo(stuff, thing, "auaaaaaaaaa some very long stuff", "some more").bar(10); foo(stuff, thing, "some very longuuuuuuuuuuuuuu stuff", "some more").bar(10); } } // Prettier 1.0.1 class T { public void method() { new Foo(stuff, thing, "auaaaaaaaaa some very long stuff", "some more") .bar(10); foo(stuff, thing, "some very longuuuuuuuuuuuuuu stuff", "some more") .bar(10); } } // Prettier 1.0.2 class T { public void method() { new Foo(stuff, thing, "auaaaaaaaaa some very long stuff", "some more") .bar(10); foo(stuff, thing, "some very longuuuuuuuuuuuuuu stuff", "some more") .bar(10); } } ``` - Fix unstable formatting for method invocations with only comments ([#​457](https://togithub.com/jhipster/prettier-java/pull/457)) ```java // Input class T { public void method() { Arrays.asList(// a // b // c // d ); } } // Prettier 1.0.1 class T { public void method() { Arrays.asList(// b // a // c // d ); } } // Prettier 1.0.2 class T { public void method() { Arrays.asList( // a // b // c // d ); } } ``` #### Miscellaneous - Update lodash dependency to 4.17.21 ([#​458](https://togithub.com/jhipster/prettier-java/pull/458)) ### [`v1.0.1`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v101) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v1.0.0...v1.0.1) #### Fixes - Correct spaces emplacement in multi-value switch expression case label ([#​440](https://togithub.com/jhipster/prettier-java/pull/440)) ```java // Input public class Test { public void test(TestEnum testEnum) { switch (testEnum) { case FOO -> System.out.println("Foo!"); case BAR, BAZ -> System.out.println("Not Foo!"); } } } // Prettier 1.0.0 public class Test { public void test(TestEnum testEnum) { switch (testEnum) { case FOO -> System.out.println("Foo!"); case BAR ,BAZ -> System.out.println("Not Foo!"); } } } // Prettier 1.0.1 public class Test { public void test(TestEnum testEnum) { switch (testEnum) { case FOO -> System.out.println("Foo!"); case BAR, BAZ -> System.out.println("Not Foo!"); } } } ``` #### Miscellaneous - Update prettier dependency to 2.2.1 ### [`v1.0.0`](https://togithub.com/jhipster/prettier-java/blob/HEAD/CHANGELOG.md#v100) [Compare Source](https://togithub.com/jhipster/prettier-java/compare/v0.8.3...v1.0.0) #### Enhancements - Support of Java 15 ! πŸš€ - Support of Text blocks - Support of new switch rules and yield statements - Improve throws rendering (From [@​jhaber](https://togithub.com/jhaber): [#​384](https://togithub.com/jhipster/prettier-java/pull/384)) ```java // Input void throwException7(String string1, String string2, String string3, String string4) throws RuntimeException { throw new RuntimeException(); } // Prettier 0.8.3 void throwException7( String string1, String string2, String string3, String string4 ) throws RuntimeException { throw new RuntimeException(); } // Prettier 1.0.0 void throwException7( String string1, String string2, String string3, String string4 ) throws RuntimeException { throw new RuntimeException(); } ``` #### Fixes - Parsing of unannPrimitiveType in primary ([#​421](https://togithub.com/jhipster/prettier-java/pull/421)) #### Miscellaneous - Update dependencies

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.