From 5d8170b08fad5be16fb9420d57d0b8466249fd4a Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 23 Dec 2024 15:22:22 +0100 Subject: [PATCH] Update generated changelog & recipe list --- docs/changelog/8-42-0-Release.md | 58 +++++++++++++++---------------- docs/reference/moderne-recipes.md | 14 +++++++- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/docs/changelog/8-42-0-Release.md b/docs/changelog/8-42-0-Release.md index 3ff02423f..c3851aa7c 100644 --- a/docs/changelog/8-42-0-Release.md +++ b/docs/changelog/8-42-0-Release.md @@ -8,35 +8,35 @@ This changelog only shows what recipes have been added, removed, or changed. Ope ## New Recipes -* [org.openrewrite.codemods.migrate.angular.v18](https://docs.openrewrite.org/recipes/codemods/migrate/angular/v18): Upgrade to Angular v18 -* [org.openrewrite.codemods.migrate.angular.v19](https://docs.openrewrite.org/recipes/codemods/migrate/angular/v19): Upgrade to Angular v19 -* [org.openrewrite.gitlab.AddStages](https://docs.openrewrite.org/recipes/gitlab/addstages): Add or Update the set of stages defined in `.gitlab-ci.yml`. -* [org.openrewrite.gradle.AddJUnitPlatformLauncher](https://docs.openrewrite.org/recipes/gradle/addjunitplatformlauncher): Add the JUnit Platform Launcher to the buildscript dependencies. -* [org.openrewrite.gradle.RemoveRedundantDependencyVersions](https://docs.openrewrite.org/recipes/gradle/removeredundantdependencyversions): Remove explicitly-specified dependency versions that are managed by a Gradle `platform`/`enforcedPlatform`. -* [org.openrewrite.java.boot3.ReplaceMockBeanAndSpyBean](https://docs.openrewrite.org/recipes/java/boot3/replacemockbeanandspybean): Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`. -* [org.openrewrite.java.logging.log4j.LoggerSetLevelToConfiguratorRecipe](https://docs.openrewrite.org/recipes/java/logging/log4j/loggersetleveltoconfiguratorrecipe): Converts `org.apache.log4j.Logger.setLevel` to `org.apache.logging.log4j.core.config.Configurator.setLevel`. -* [org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException](https://docs.openrewrite.org/recipes/java/migrate/illegalargumentexceptiontoalreadyconnectedexception): Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+. -* [org.openrewrite.java.migrate.joda.NoJodaTime](https://docs.openrewrite.org/recipes/java/migrate/joda/nojodatime): Before Java 8, Java lacked a robust date and time library, leading to the widespread use of Joda-Time to fill this gap. With the release of Java 8, the `java.time` package was introduced, incorporating most of Joda-Time's concepts. Features deemed too specialized or bulky for `java.time` were included in the ThreeTen-Extra library. This recipe migrates Joda-Time types to `java.time` and `threeten-extra` types. -* [org.openrewrite.java.migrate.lang.ExplicitRecordImport](https://docs.openrewrite.org/recipes/java/migrate/lang/explicitrecordimport): Add explicit import for `Record` classes when upgrading past Java 14+, to avoid conflicts with `java.lang.Record`. -* [org.openrewrite.java.migrate.lombok.UseLombokGetter](https://docs.openrewrite.org/recipes/java/migrate/lombok/uselombokgetter): Convert trivial getter methods to `@Getter` annotations on their respective fields. -* [org.openrewrite.java.migrate.lombok.UseLombokSetter](https://docs.openrewrite.org/recipes/java/migrate/lombok/uselomboksetter): Convert trivial setter methods to `@Setter` annotations on their respective fields. -* [org.openrewrite.java.testing.easymock.EasyMockToMockito](https://docs.openrewrite.org/recipes/java/testing/easymock/easymocktomockito): This recipe will apply changes commonly needed when migrating from EasyMock to Mockito. -* [org.openrewrite.java.testing.easymock.EasyMockVerifyToMockitoVerify](https://docs.openrewrite.org/recipes/java/testing/easymock/easymockverifytomockitoverify): Replace `EasyMock.verify(dependency)` with individual `Mockito.verify(dependency).method()` calls based on expected methods. -* [org.openrewrite.java.testing.easymock.RemoveExtendsEasyMockSupport](https://docs.openrewrite.org/recipes/java/testing/easymock/removeextendseasymocksupport): Modify test classes by removing extends EasyMockSupport and replacing EasyMock methods with Mockito equivalents. -* [org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports](https://docs.openrewrite.org/recipes/java/testing/hamcrest/consistenthamcrestmatcherimports): Use consistent imports for Hamcrest matchers, and remove wrapping `is(Matcher)` calls ahead of further changes. -* [org.openrewrite.java.testing.hamcrest.HamcrestInstanceOfToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/hamcrestinstanceoftojunit5): Migrate from Hamcrest `instanceOf` and `isA` matcher to JUnit5 `assertInstanceOf` assertion. -* [org.openrewrite.java.testing.hamcrest.HamcrestMatcherToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/hamcrestmatchertojunit5): Migrate from Hamcrest `Matcher` to JUnit 5 assertions. -* [org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/migratehamcresttojunit5): Migrate Hamcrest `assertThat(..)` to JUnit Jupiter `Assertions`. -* [org.openrewrite.java.testing.mockito.NoInitializationForInjectMock](https://docs.openrewrite.org/recipes/java/testing/mockito/noinitializationforinjectmock): Removes unnecessary initialization for fields annotated with `@InjectMocks` in Mockito tests. -* [org.openrewrite.java.testing.mockito.RemoveTimesZeroAndOne](https://docs.openrewrite.org/recipes/java/testing/mockito/removetimeszeroandone): Remove `Mockito.times(0)` and `Mockito.times(0)` from `Mockito.verify()` calls. -* [org.openrewrite.java.testing.testng.TestNgAssertEqualsToAssertThat](https://docs.openrewrite.org/recipes/java/testing/testng/testngassertequalstoassertthat): Convert TestNG-style `assertEquals()` to AssertJ's `assertThat().isEqualTo()`. -* [org.openrewrite.java.testing.testng.TestNgAssertNotEqualsToAssertThat](https://docs.openrewrite.org/recipes/java/testing/testng/testngassertnotequalstoassertthat): Convert TestNG-style `assertNotEquals()` to AssertJ's `assertThat().isNotEqualTo()`. -* [org.openrewrite.java.testing.testng.TestNgToAssertj](https://docs.openrewrite.org/recipes/java/testing/testng/testngtoassertj): Convert assertions from `org.testng.Assert` to `org.assertj.core.api.Assertions`. -* [org.openrewrite.kubernetes.search.FindHarcodedIPAddresses](https://docs.openrewrite.org/recipes/kubernetes/search/findharcodedipaddresses): Find hardcoded IP address anywhere in text-based files. -* [org.openrewrite.openapi.swagger.MigrateApiImplicitParamDataTypeClass](https://docs.openrewrite.org/recipes/openapi/swagger/migrateapiimplicitparamdatatypeclass): Migrate `@ApiImplicitParam(dataTypeClass=Foo.class)` to `@Parameter(schema=@Schema(implementation=Foo.class))`. -* [org.openrewrite.reactive.reactor.ReactorBestPractices](https://docs.openrewrite.org/recipes/reactive/reactor/reactorbestpractices): This recipe applies best practices for using Reactor. -* [org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes](https://docs.openrewrite.org/recipes/staticanalysis/urlequalshashcoderecipes): Uses of `equals()` and `hashCode()` cause `java.net.URL` to make blocking internet connections. Instead, use `java.net.URI`. -* [org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLEqualsRecipe](https://docs.openrewrite.org/recipes/staticanalysis/urlequalshashcoderecipesusdurlequalsrecipe): Uses of `equals()` cause `java.net.URL` to make blocking internet connections. Instead, use `java.net.URI`. +* [org.openrewrite.codemods.migrate.angular.v18](https://docs.openrewrite.org/recipes/codemods/migrate/angular/v18): Upgrade to Angular v18 +* [org.openrewrite.codemods.migrate.angular.v19](https://docs.openrewrite.org/recipes/codemods/migrate/angular/v19): Upgrade to Angular v19 +* [org.openrewrite.gitlab.AddStages](https://docs.openrewrite.org/recipes/gitlab/addstages): Add or Update the set of stages defined in `.gitlab-ci.yml`. +* [org.openrewrite.gradle.AddJUnitPlatformLauncher](https://docs.openrewrite.org/recipes/gradle/addjunitplatformlauncher): Add the JUnit Platform Launcher to the buildscript dependencies. +* [org.openrewrite.gradle.RemoveRedundantDependencyVersions](https://docs.openrewrite.org/recipes/gradle/removeredundantdependencyversions): Remove explicitly-specified dependency versions that are managed by a Gradle `platform`/`enforcedPlatform`. +* [org.openrewrite.java.boot3.ReplaceMockBeanAndSpyBean](https://docs.openrewrite.org/recipes/java/boot3/replacemockbeanandspybean): Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`. +* [org.openrewrite.java.logging.log4j.LoggerSetLevelToConfiguratorRecipe](https://docs.openrewrite.org/recipes/java/logging/log4j/loggersetleveltoconfiguratorrecipe): Converts `org.apache.log4j.Logger.setLevel` to `org.apache.logging.log4j.core.config.Configurator.setLevel`. +* [org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException](https://docs.openrewrite.org/recipes/java/migrate/illegalargumentexceptiontoalreadyconnectedexception): Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+. +* [org.openrewrite.java.migrate.joda.NoJodaTime](https://docs.openrewrite.org/recipes/java/migrate/joda/nojodatime): Before Java 8, Java lacked a robust date and time library, leading to the widespread use of Joda-Time to fill this gap. With the release of Java 8, the `java.time` package was introduced, incorporating most of Joda-Time's concepts. Features deemed too specialized or bulky for `java.time` were included in the ThreeTen-Extra library. This recipe migrates Joda-Time types to `java.time` and `threeten-extra` types. +* [org.openrewrite.java.migrate.lang.ExplicitRecordImport](https://docs.openrewrite.org/recipes/java/migrate/lang/explicitrecordimport): Add explicit import for `Record` classes when upgrading past Java 14+, to avoid conflicts with `java.lang.Record`. +* [org.openrewrite.java.migrate.lombok.UseLombokGetter](https://docs.openrewrite.org/recipes/java/migrate/lombok/uselombokgetter): Convert trivial getter methods to `@Getter` annotations on their respective fields. +* [org.openrewrite.java.migrate.lombok.UseLombokSetter](https://docs.openrewrite.org/recipes/java/migrate/lombok/uselomboksetter): Convert trivial setter methods to `@Setter` annotations on their respective fields. +* [org.openrewrite.java.testing.easymock.EasyMockToMockito](https://docs.openrewrite.org/recipes/java/testing/easymock/easymocktomockito): This recipe will apply changes commonly needed when migrating from EasyMock to Mockito. +* [org.openrewrite.java.testing.easymock.EasyMockVerifyToMockitoVerify](https://docs.openrewrite.org/recipes/java/testing/easymock/easymockverifytomockitoverify): Replace `EasyMock.verify(dependency)` with individual `Mockito.verify(dependency).method()` calls based on expected methods. +* [org.openrewrite.java.testing.easymock.RemoveExtendsEasyMockSupport](https://docs.openrewrite.org/recipes/java/testing/easymock/removeextendseasymocksupport): Modify test classes by removing extends EasyMockSupport and replacing EasyMock methods with Mockito equivalents. +* [org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports](https://docs.openrewrite.org/recipes/java/testing/hamcrest/consistenthamcrestmatcherimports): Use consistent imports for Hamcrest matchers, and remove wrapping `is(Matcher)` calls ahead of further changes. +* [org.openrewrite.java.testing.hamcrest.HamcrestInstanceOfToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/hamcrestinstanceoftojunit5): Migrate from Hamcrest `instanceOf` and `isA` matcher to JUnit5 `assertInstanceOf` assertion. +* [org.openrewrite.java.testing.hamcrest.HamcrestMatcherToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/hamcrestmatchertojunit5): Migrate from Hamcrest `Matcher` to JUnit 5 assertions. +* [org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5](https://docs.openrewrite.org/recipes/java/testing/hamcrest/migratehamcresttojunit5): Migrate Hamcrest `assertThat(..)` to JUnit Jupiter `Assertions`. +* [org.openrewrite.java.testing.mockito.NoInitializationForInjectMock](https://docs.openrewrite.org/recipes/java/testing/mockito/noinitializationforinjectmock): Removes unnecessary initialization for fields annotated with `@InjectMocks` in Mockito tests. +* [org.openrewrite.java.testing.mockito.RemoveTimesZeroAndOne](https://docs.openrewrite.org/recipes/java/testing/mockito/removetimeszeroandone): Remove `Mockito.times(0)` and `Mockito.times(0)` from `Mockito.verify()` calls. +* [org.openrewrite.java.testing.testng.TestNgAssertEqualsToAssertThat](https://docs.openrewrite.org/recipes/java/testing/testng/testngassertequalstoassertthat): Convert TestNG-style `assertEquals()` to AssertJ's `assertThat().isEqualTo()`. +* [org.openrewrite.java.testing.testng.TestNgAssertNotEqualsToAssertThat](https://docs.openrewrite.org/recipes/java/testing/testng/testngassertnotequalstoassertthat): Convert TestNG-style `assertNotEquals()` to AssertJ's `assertThat().isNotEqualTo()`. +* [org.openrewrite.java.testing.testng.TestNgToAssertj](https://docs.openrewrite.org/recipes/java/testing/testng/testngtoassertj): Convert assertions from `org.testng.Assert` to `org.assertj.core.api.Assertions`. +* [org.openrewrite.kubernetes.search.FindHarcodedIPAddresses](https://docs.openrewrite.org/recipes/kubernetes/search/findharcodedipaddresses): Find hardcoded IP address anywhere in text-based files. +* [org.openrewrite.openapi.swagger.MigrateApiImplicitParamDataTypeClass](https://docs.openrewrite.org/recipes/openapi/swagger/migrateapiimplicitparamdatatypeclass): Migrate `@ApiImplicitParam(dataTypeClass=Foo.class)` to `@Parameter(schema=@Schema(implementation=Foo.class))`. +* [org.openrewrite.reactive.reactor.ReactorBestPractices](https://docs.openrewrite.org/recipes/reactive/reactor/reactorbestpractices): This recipe applies best practices for using Reactor. +* [org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes](https://docs.openrewrite.org/recipes/staticanalysis/urlequalshashcoderecipes): Uses of `equals()` and `hashCode()` cause `java.net.URL` to make blocking internet connections. Instead, use `java.net.URI`. +* [org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLEqualsRecipe](https://docs.openrewrite.org/recipes/staticanalysis/urlequalshashcoderecipesusdurlequalsrecipe): Uses of `equals()` cause `java.net.URL` to make blocking internet connections. Instead, use `java.net.URI`. * [org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLHashCodeRecipe](https://docs.openrewrite.org/recipes/staticanalysis/urlequalshashcoderecipesusdurlhashcoderecipe): Uses of `hashCode()` cause `java.net.URL` to make blocking internet connections. Instead, use `java.net.URI`. ## Changed Recipes diff --git a/docs/reference/moderne-recipes.md b/docs/reference/moderne-recipes.md index 4fa9caf7e..1111ff421 100644 --- a/docs/reference/moderne-recipes.md +++ b/docs/reference/moderne-recipes.md @@ -56,6 +56,7 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Converts components to use the v4 adapter module](../recipes/codemods/migrate/mui/adapterv) * [Deprecated hierarchy separator in title property](../recipes/codemods/cleanup/storybook/hierarchyseparator) * [Disallow Jasmine globals](../recipes/codemods/cleanup/jest/nojasmineglobals) +* [Disallow `if` statements as the only statement in `if` blocks without `else`.](../recipes/codemods/cleanup/javascript/nolonelyif) * [Disallow `new Array()`.](../recipes/codemods/cleanup/javascript/nonewarray) * [Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals](../recipes/codemods/cleanup/javascript/prefernumericliterals) * [Disallow alias methods](../recipes/codemods/cleanup/jest/noaliasmethods) @@ -67,7 +68,6 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Disallow equal signs explicitly at the beginning of regular expressions](../recipes/codemods/cleanup/javascript/nodivregex) * [Disallow extra closing tags for components without children](../recipes/codemods/format/jsxselfclosingcomp) * [Disallow extra closing tags for components without children](../recipes/codemods/cleanup/react/selfclosingcomp) -* [Disallow if statements as the only statement in else blocks](../recipes/codemods/cleanup/javascript/nolonelyif) * [Disallow initializing variables to undefined](../recipes/codemods/cleanup/javascript/noundefinit) * [Disallow leading or trailing decimal points in numeric literals](../recipes/codemods/format/nofloatingdecimal) * [Disallow member access from `await` expression.](../recipes/codemods/cleanup/javascript/noawaitexpressionmember) @@ -497,6 +497,8 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Update to Angular v15](../recipes/codemods/migrate/angular/v15) * [Update to Angular v16](../recipes/codemods/migrate/angular/v16) * [Update to Angular v17](../recipes/codemods/migrate/angular/v17) +* [Update to Angular v18](../recipes/codemods/migrate/angular/v18) +* [Update to Angular v19](../recipes/codemods/migrate/angular/v19) * [Upgrade Angular versions](../recipes/codemods/migrate/angular/applyangularcli) ## rewrite-concourse @@ -553,6 +555,7 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full ## rewrite-java-security +* [Dependency insight for C#](../recipes/csharp/dependencies/dependencyinsight) * [Enable CSRF attack prevention](../recipes/java/security/spring/csrfprotection) * [Find AWS secrets](../recipes/java/security/secrets/findawssecrets) * [Find Artifactory secrets](../recipes/java/security/secrets/findartifactorysecrets) @@ -578,7 +581,10 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Find Telegram secrets](../recipes/java/security/secrets/findtelegramsecrets) * [Find Twilio secrets](../recipes/java/security/secrets/findtwiliosecrets) * [Find Twitter secrets](../recipes/java/security/secrets/findtwittersecrets) +* [Find and fix vulnerable Nuget dependencies](../recipes/csharp/dependencies/dependencyvulnerabilitycheck) +* [Find and fix vulnerable dependencies](../recipes/java/dependencies/dependencyvulnerabilitycheck) * [Find generic secrets](../recipes/java/security/secrets/findgenericsecrets) +* [Find licenses in use in third-party dependencies](../recipes/java/dependencies/dependencylicensecheck) * [Find passwords used in URLs](../recipes/java/security/secrets/findpasswordinurlsecrets) * [Find secrets](../recipes/java/security/secrets/findsecrets) * [Find secrets with regular expressions](../recipes/java/security/secrets/findsecretsbypattern) @@ -600,11 +606,14 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Remediate OWASP A06:2021 Vulnerable and outdated components](../recipes/java/security/owaspa06) * [Remediate OWASP A08:2021 Software and data integrity failures](../recipes/java/security/owaspa08) * [Remediate vulnerabilities from the OWASP Top Ten](../recipes/java/security/owasptopten) +* [Remove unused dependencies](../recipes/java/dependencies/removeunuseddependencies) * [Secure Spring service exporters](../recipes/java/security/spring/insecurespringserviceexporter) * [Secure random](../recipes/java/security/securerandom) * [Secure the use of Jackson default typing](../recipes/java/security/marshalling/securejacksondefaulttyping) * [Secure the use of SnakeYAML's constructor](../recipes/java/security/marshalling/securesnakeyamlconstructor) * [SecureRandom seeds are not constant or predictable](../recipes/java/security/securerandomprefersdefaultseed) +* [Software bill of materials](../recipes/java/dependencies/softwarebillofmaterials) +* [Upgrade C# dependency versions](../recipes/csharp/dependencies/upgradedependencyversion) * [Use `Files#createTempDirectory`](../recipes/java/security/usefilescreatetempdirectory) * [Use secure temporary file creation](../recipes/java/security/securetempfilecreation) * [XML parser XXE vulnerability](../recipes/java/security/xmlparserxxevulnerability) @@ -629,6 +638,7 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Find disallowed image tags](../recipes/kubernetes/search/finddisallowedimagetags) * [Find exceeds resource limit](../recipes/kubernetes/resource/findexceedsresourcevalue) * [Find exceeds resource ratio](../recipes/kubernetes/resource/findexceedsresourceratio) +* [Find hardcoded IP addresses](../recipes/kubernetes/search/findharcodedipaddresses) * [Find image by name](../recipes/kubernetes/search/findimage) * [Find label](../recipes/kubernetes/search/findmissingorinvalidlabel) * [Find missing configuration](../recipes/kubernetes/search/findresourcemissingconfiguration) @@ -676,6 +686,7 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full ## rewrite-reactive-streams * [Migrate to Reactor 3.5](../recipes/reactive/reactor/upgradereactor_3_5) +* [Reactor Best Practices](../recipes/reactive/reactor/reactorbestpractices) * [Replace `DirectProcessor.create()` with `Sinks.many().multicast().directBestEffort()`](../recipes/reactive/reactor/reactorprocessorcreatetosinkrecipes$directprocessorcreatetosinkrecipe) * [Replace `EmitterProcessor.create()` with `Sinks.many().multicast().onBackpressureBuffer()`](../recipes/reactive/reactor/reactorprocessorcreatetosinkrecipes$emitterprocessorcreatetosinkrecipe) * [Replace `EmitterProcessor.create(Boolean)` with `Sinks.many().multicast().onBackpressureBuffer(Queues.SMALL_BUFFER_SIZE, Boolean)`](../recipes/reactive/reactor/reactorprocessorcreatetosinkrecipes$emitterprocessorcreatebooleantosinkrecipe) @@ -826,3 +837,4 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full * [Set Azure Storage Account default network access to deny](../recipes/terraform/azure/setazurestorageaccountdefaultnetworkaccesstodeny) * [Use HTTPS for Cloudfront distribution](../recipes/terraform/aws/usehttpsforcloudfrontdistribution) * [Use a long enough byte length for `random` resources](../recipes/terraform/securerandom) +