diff --git a/docs/changelog/8-75-2-Release.md b/docs/changelog/8-75-2-Release.md new file mode 100644 index 0000000000..2ce02caa69 --- /dev/null +++ b/docs/changelog/8-75-2-Release.md @@ -0,0 +1,36 @@ +--- +description: What's changed in OpenRewrite version 8.75.2. +--- + +# 8.75.2 release (2026-03-09) + +_Total recipe count: 4202_ + +:::info +This changelog only shows what recipes have been added, removed, or changed. OpenRewrite may do releases that do not include these types of changes. To see these changes, please go to the [releases page](https://github.com/openrewrite/rewrite/releases). +::: + +## Corresponding CLI version + +* Stable CLI version `v3.57.12` +* Staging CLI version: `v3.57.14` + +## New Recipes + +* [org.openrewrite.gitlab.AddArtifactsExpireIn](https://docs.openrewrite.org/recipes/gitlab/addartifactsexpirein): Set `artifacts:expire_in` in `.gitlab-ci.yml` to prevent storage bloat from indefinitely stored artifacts. +* [org.openrewrite.gitlab.AddCache](https://docs.openrewrite.org/recipes/gitlab/addcache): Add `cache` configuration to `.gitlab-ci.yml` for faster builds. +* [org.openrewrite.gitlab.AddDefaultKeyword](https://docs.openrewrite.org/recipes/gitlab/adddefaultkeyword): Add or update a keyword in the `default` section of `.gitlab-ci.yml`. +* [org.openrewrite.gitlab.AddInterruptible](https://docs.openrewrite.org/recipes/gitlab/addinterruptible): Set `interruptible: true` in `.gitlab-ci.yml` to allow pipelines to be cancelled when superseded. +* [org.openrewrite.gitlab.AddRetry](https://docs.openrewrite.org/recipes/gitlab/addretry): Add `retry` configuration to `.gitlab-ci.yml` for resilience against infrastructure failures. +* [org.openrewrite.gitlab.AddTimeout](https://docs.openrewrite.org/recipes/gitlab/addtimeout): Set `timeout` in `.gitlab-ci.yml` to prevent jobs from hanging indefinitely. +* [org.openrewrite.gitlab.AddWorkflowRules](https://docs.openrewrite.org/recipes/gitlab/addworkflowrules): Add `workflow:rules` to `.gitlab-ci.yml` to control pipeline creation. +* [org.openrewrite.gitlab.BestPractices](https://docs.openrewrite.org/recipes/gitlab/bestpractices): Apply GitLab CI/CD best practices to `.gitlab-ci.yml`. This includes adding `workflow:rules` to prevent duplicate pipelines, setting `interruptible: true` and `retry` in the `default` section, configuring `artifacts:expire_in`, and setting a job `timeout`. +* [org.openrewrite.java.logging.slf4j.MessageFormatToParameterizedLogging](https://docs.openrewrite.org/recipes/java/logging/slf4j/messageformattoparameterizedlogging): Replace `MessageFormat.format()` calls in SLF4J logging statements with parameterized placeholders for improved performance. +* [org.openrewrite.java.logging.slf4j.RemoveUnnecessaryLogLevelGuards](https://docs.openrewrite.org/recipes/java/logging/slf4j/removeunnecessaryloglevelguards): Remove `if` statement guards around SLF4J logging calls when parameterized logging makes them unnecessary. +* [org.openrewrite.java.logging.slf4j.StringFormatToParameterizedLogging](https://docs.openrewrite.org/recipes/java/logging/slf4j/stringformattoparameterizedlogging): Replace `String.format()` calls in SLF4J logging statements with parameterized placeholders for improved performance. +* [org.openrewrite.java.migrate.lombok.UseAllArgsConstructor](https://docs.openrewrite.org/recipes/java/migrate/lombok/useallargsconstructor): Prefer the Lombok `@AllArgsConstructor` annotation over explicitly written out constructors that assign all non-static fields. +* [org.openrewrite.java.migrate.lombok.UseRequiredArgsConstructor](https://docs.openrewrite.org/recipes/java/migrate/lombok/userequiredargsconstructor): Prefer the Lombok `@RequiredArgsConstructor` annotation over explicitly written out constructors that only assign final fields. +* [org.openrewrite.java.spring.boot4.RenameDeprecatedStartersManagedVersions](https://docs.openrewrite.org/recipes/java/spring/boot4/renamedeprecatedstartersmanagedversions): Renames deprecated Spring Boot starters to their new names without adding explicit versions, for use in projects where the `io.spring.dependency-management` plugin manages versions via BOM. +* [org.openrewrite.java.testing.mockito.ReplaceMockitoTestExecutionListener](https://docs.openrewrite.org/recipes/java/testing/mockito/replacemockitotestexecutionlistener): Replace `@TestExecutionListeners(MockitoTestExecutionListener.class)` with the appropriate Mockito initialization for the test framework in use: `@ExtendWith(MockitoExtension.class)` for JUnit 5, `@RunWith(MockitoJUnitRunner.class)` for JUnit 4, or `MockitoAnnotations.openMocks(this)` for TestNG. +* [org.openrewrite.java.testing.mockito.ReplacePowerMockDependencies](https://docs.openrewrite.org/recipes/java/testing/mockito/replacepowermockdependencies): Replaces PowerMock API dependencies with `mockito-inline` when `mockStatic()`, `whenNew()`, or `@PrepareForTest` usage is detected, or `mockito-core` otherwise. PowerMock features like static mocking, constructor mocking, and final class mocking require the inline mock maker which is bundled in `mockito-inline` for Mockito 3.x/4.x. + diff --git a/docs/recipes/javascript/README.md b/docs/recipes/javascript/README.md index 12d0883bb3..ce94840433 100644 --- a/docs/recipes/javascript/README.md +++ b/docs/recipes/javascript/README.md @@ -6,15 +6,10 @@ description: Javascript OpenRewrite recipes. ## Categories -* [Cleanup](/recipes/javascript/cleanup) -* [Dependencies](/recipes/javascript/dependencies) -* [Format](/recipes/javascript/format) -* [Migrate](/recipes/javascript/migrate) * [Search](/recipes/javascript/search) ## Recipes -* [Change import](./change-import.md) * [Change method name](./changemethodname.md) * [Change type](./changetype.md) * [Delete method argument](./deletemethodargument.md) diff --git a/docs/recipes/javascript/change-import.md b/docs/recipes/javascript/change-import.md deleted file mode 100644 index 7e643eaeb2..0000000000 --- a/docs/recipes/javascript/change-import.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_label: "Change import" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Change import - -**org.openrewrite.javascript.change-import** - -_Changes an import from one module/member to another, updating all type attributions._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.change-import](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.change-import), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | oldModule | The module to change imports from | `react-dom/test-utils` | -| `null` | oldMember | The member to change (or 'default' for default imports, '*' for namespace imports) | `act` | -| `null` | newModule | The module to change imports to | `react` | -| `null` | newMember | *Optional*. The new member name. If not specified, keeps the same member name. | `act` | -| `null` | newAlias | *Optional*. Optional alias for the new import. Required when newMember is 'default' or '*'. | | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.change-import -``` diff --git a/docs/recipes/javascript/cleanup/README.md b/docs/recipes/javascript/cleanup/README.md deleted file mode 100644 index bca5006cbf..0000000000 --- a/docs/recipes/javascript/cleanup/README.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -description: Cleanup OpenRewrite recipes. ---- - -# Cleanup - -## Recipes - -* [Add radix to `parseInt`](./add-parse-int-radix.md) -* [Detect async callbacks in synchronous array methods](./async-callback-in-sync-array-method.md) -* [Order imports](./order-imports.md) -* [Prefer optional chaining](./prefer-optional-chain.md) -* [Use object property shorthand](./use-object-property-shorthand.md) - - diff --git a/docs/recipes/javascript/cleanup/add-parse-int-radix.md b/docs/recipes/javascript/cleanup/add-parse-int-radix.md deleted file mode 100644 index a934d645d0..0000000000 --- a/docs/recipes/javascript/cleanup/add-parse-int-radix.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Add radix to `parseInt`" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Add radix to `parseInt` - -**org.openrewrite.javascript.cleanup.add-parse-int-radix** - -_Adds the radix parameter (base 10) to `parseInt()` calls that are missing it, preventing potential parsing issues._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.cleanup.add-parse-int-radix](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.cleanup.add-parse-int-radix), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.cleanup.add-parse-int-radix -``` diff --git a/docs/recipes/javascript/cleanup/async-callback-in-sync-array-method.md b/docs/recipes/javascript/cleanup/async-callback-in-sync-array-method.md deleted file mode 100644 index 6e30276d76..0000000000 --- a/docs/recipes/javascript/cleanup/async-callback-in-sync-array-method.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_label: "Detect async callbacks in synchronous array methods" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Detect async callbacks in synchronous array methods - -**org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method** - -_Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy._ - -### Tags - -* [async](/reference/recipes-by-tag#async) -* [bug](/reference/recipes-by-tag#bug) -* [cleanup](/reference/recipes-by-tag#cleanup) -* [typescript](/reference/recipes-by-tag#typescript) -* [javascript](/reference/recipes-by-tag#javascript) - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method -``` diff --git a/docs/recipes/javascript/cleanup/order-imports.md b/docs/recipes/javascript/cleanup/order-imports.md deleted file mode 100644 index 87cc8e49dc..0000000000 --- a/docs/recipes/javascript/cleanup/order-imports.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Order imports" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Order imports - -**org.openrewrite.javascript.cleanup.order-imports** - -_Sort imports by category and module path. Categories: side-effect, namespace, default, named, type. Within each category, imports are sorted alphabetically by module path. Named specifiers within each import are also sorted alphabetically._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.cleanup.order-imports](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.cleanup.order-imports), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.cleanup.order-imports -``` diff --git a/docs/recipes/javascript/cleanup/prefer-optional-chain.md b/docs/recipes/javascript/cleanup/prefer-optional-chain.md deleted file mode 100644 index 6e0cc57859..0000000000 --- a/docs/recipes/javascript/cleanup/prefer-optional-chain.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Prefer optional chaining" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Prefer optional chaining - -**org.openrewrite.javascript.cleanup.prefer-optional-chain** - -_Converts ternary expressions like `foo ? foo.bar : undefined` to use optional chaining syntax `foo?.bar`._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.cleanup.prefer-optional-chain](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.cleanup.prefer-optional-chain), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.cleanup.prefer-optional-chain -``` diff --git a/docs/recipes/javascript/cleanup/use-object-property-shorthand.md b/docs/recipes/javascript/cleanup/use-object-property-shorthand.md deleted file mode 100644 index 832f4125d8..0000000000 --- a/docs/recipes/javascript/cleanup/use-object-property-shorthand.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Use object property shorthand" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Use object property shorthand - -**org.openrewrite.javascript.cleanup.use-object-property-shorthand** - -_Simplifies object properties where the property name and value/variable name are the same (e.g., `{ x: x }` becomes `{ x }`). Applies to both destructuring patterns and object literals._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.cleanup.use-object-property-shorthand](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.cleanup.use-object-property-shorthand), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.cleanup.use-object-property-shorthand -``` diff --git a/docs/recipes/javascript/dependencies/README.md b/docs/recipes/javascript/dependencies/README.md deleted file mode 100644 index 154192622f..0000000000 --- a/docs/recipes/javascript/dependencies/README.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: Dependencies OpenRewrite recipes. ---- - -# Dependencies - -## Recipes - -* [Add npm dependency](./add-dependency.md) -* [Find Node.js dependency](./find-dependency.md) -* [Upgrade npm dependency version](./upgrade-dependency-version.md) -* [Upgrade transitive npm dependency version](./upgrade-transitive-dependency-version.md) - - diff --git a/docs/recipes/javascript/dependencies/add-dependency.md b/docs/recipes/javascript/dependencies/add-dependency.md deleted file mode 100644 index c824895493..0000000000 --- a/docs/recipes/javascript/dependencies/add-dependency.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_label: "Add npm dependency" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Add npm dependency - -**org.openrewrite.javascript.dependencies.add-dependency** - -_Adds a new dependency to `package.json` and updates the lock file by running the package manager._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.dependencies.add-dependency](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.dependencies.add-dependency), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | packageName | The name of the npm package to add (e.g., `lodash`, `@types/node`) | `lodash` | -| `null` | version | The version constraint to set (e.g., `^5.0.0`, `~2.1.0`, `3.0.0`) | `^5.0.0` | -| `null` | scope | *Optional*. The dependency scope: `dependencies`, `devDependencies`, `peerDependencies`, or `optionalDependencies` | `dependencies` | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.dependencies.add-dependency -``` diff --git a/docs/recipes/javascript/dependencies/find-dependency.md b/docs/recipes/javascript/dependencies/find-dependency.md deleted file mode 100644 index f57deba2a6..0000000000 --- a/docs/recipes/javascript/dependencies/find-dependency.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_label: "Find Node.js dependency" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Find Node.js dependency - -**org.openrewrite.javascript.dependencies.find-dependency** - -_Finds dependencies in a project's `package.json`. Can find both direct dependencies and dependencies that transitively include the target package. This recipe is commonly used as a precondition for other recipes._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.dependencies.find-dependency](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.dependencies.find-dependency), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | packageName | The name of the npm package to find. Supports glob patterns. | `lodash` | -| `null` | version | *Optional*. An exact version number or semver selector used to select the version number. Leave empty to match any version. | `^18.0.0` | -| `null` | onlyDirect | *Optional*. If true (default), only matches dependencies that directly match the package name. If false, also marks direct dependencies that have the target package as a transitive dependency. | `true` | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.dependencies.find-dependency -``` diff --git a/docs/recipes/javascript/dependencies/upgrade-dependency-version.md b/docs/recipes/javascript/dependencies/upgrade-dependency-version.md deleted file mode 100644 index 2bcda36913..0000000000 --- a/docs/recipes/javascript/dependencies/upgrade-dependency-version.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -sidebar_label: "Upgrade npm dependency version" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Upgrade npm dependency version - -**org.openrewrite.javascript.dependencies.upgrade-dependency-version** - -_Upgrades the version of a direct dependency in `package.json` and updates the lock file by running the package manager._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.dependencies.upgrade-dependency-version](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.dependencies.upgrade-dependency-version), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | packageName | The name of the npm package to upgrade (e.g., `lodash`, `@types/node`) | `lodash` | -| `null` | newVersion | The version constraint to set (e.g., `^5.0.0`, `~2.1.0`, `3.0.0`) | `^5.0.0` | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.dependencies.upgrade-dependency-version -``` diff --git a/docs/recipes/javascript/dependencies/upgrade-transitive-dependency-version.md b/docs/recipes/javascript/dependencies/upgrade-transitive-dependency-version.md deleted file mode 100644 index 34c2cf4a47..0000000000 --- a/docs/recipes/javascript/dependencies/upgrade-transitive-dependency-version.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_label: "Upgrade transitive npm dependency version" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Upgrade transitive npm dependency version - -**org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version** - -_Upgrades the version of a transitive dependency by adding override/resolution entries to `package.json` and updates the lock file by running the package manager._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | packageName | The name of the npm package to upgrade (e.g., `lodash`, `@types/node`) | `lodash` | -| `null` | newVersion | The version constraint to set (e.g., `^5.0.0`, `~2.1.0`, `3.0.0`) | `^5.0.0` | -| `null` | dependencyPath | *Optional*. Optional path to scope the override to a specific dependency chain. Use '>' as separator (e.g., 'express>accepts'). When not specified, applies globally to all transitive occurrences. | `express>accepts` | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version -``` diff --git a/docs/recipes/javascript/format/README.md b/docs/recipes/javascript/format/README.md deleted file mode 100644 index d64e1bc88b..0000000000 --- a/docs/recipes/javascript/format/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -description: Format OpenRewrite recipes. ---- - -# Format - -## Recipes - -* [Auto-format JavaScript/TypeScript code](./auto-format.md) - - diff --git a/docs/recipes/javascript/format/auto-format.md b/docs/recipes/javascript/format/auto-format.md deleted file mode 100644 index 59cdfc8c70..0000000000 --- a/docs/recipes/javascript/format/auto-format.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Auto-format JavaScript/TypeScript code" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Auto-format JavaScript/TypeScript code - -**org.openrewrite.javascript.format.auto-format** - -_Format JavaScript and TypeScript code using formatting rules auto-detected from the project's existing code style._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.format.auto-format](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.format.auto-format), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.format.auto-format -``` diff --git a/docs/recipes/javascript/migrate/README.md b/docs/recipes/javascript/migrate/README.md deleted file mode 100644 index 4e5cf01c73..0000000000 --- a/docs/recipes/javascript/migrate/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -description: Migrate OpenRewrite recipes. ---- - -# Migrate - -## Categories - -* [Es6](/recipes/javascript/migrate/es6) -* [Typescript](/recipes/javascript/migrate/typescript) - - diff --git a/docs/recipes/javascript/migrate/es6/README.md b/docs/recipes/javascript/migrate/es6/README.md deleted file mode 100644 index 3ad0cbe566..0000000000 --- a/docs/recipes/javascript/migrate/es6/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -description: Es6 OpenRewrite recipes. ---- - -# Es6 - -## Recipes - -* [Modernize octal escape sequences](./modernize-octal-escape-sequences.md) -* [Modernize octal literals](./modernize-octal-literals.md) -* [Remove duplicate object keys](./remove-duplicate-object-keys.md) - - diff --git a/docs/recipes/javascript/migrate/es6/modernize-octal-escape-sequences.md b/docs/recipes/javascript/migrate/es6/modernize-octal-escape-sequences.md deleted file mode 100644 index 7386242b49..0000000000 --- a/docs/recipes/javascript/migrate/es6/modernize-octal-escape-sequences.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -sidebar_label: "Modernize octal escape sequences" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Modernize octal escape sequences - -**org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences** - -_Convert old-style octal escape sequences (e.g., `\0`, `\123`) to modern hex escape sequences (e.g., `\x00`, `\x53`) or Unicode escape sequences (e.g., `\u0000`, `\u0053`)._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - -## Options - -| Type | Name | Description | Example | -| --- | --- | --- | --- | -| `null` | useUnicodeEscapes | *Optional*. Use Unicode escape sequences (`\uXXXX`) instead of hex escape sequences (`\xXX`). Default is `false`. | `true` | - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences -``` diff --git a/docs/recipes/javascript/migrate/es6/modernize-octal-literals.md b/docs/recipes/javascript/migrate/es6/modernize-octal-literals.md deleted file mode 100644 index 8444707c22..0000000000 --- a/docs/recipes/javascript/migrate/es6/modernize-octal-literals.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Modernize octal literals" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Modernize octal literals - -**org.openrewrite.javascript.migrate.es6.modernize-octal-literals** - -_Convert old-style octal literals (e.g., `0777`) to modern ES6 syntax (e.g., `0o777`)._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.migrate.es6.modernize-octal-literals](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.migrate.es6.modernize-octal-literals), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.migrate.es6.modernize-octal-literals -``` diff --git a/docs/recipes/javascript/migrate/es6/remove-duplicate-object-keys.md b/docs/recipes/javascript/migrate/es6/remove-duplicate-object-keys.md deleted file mode 100644 index 2e5941767a..0000000000 --- a/docs/recipes/javascript/migrate/es6/remove-duplicate-object-keys.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Remove duplicate object keys" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Remove duplicate object keys - -**org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys** - -_Remove duplicate keys in object literals, keeping only the last occurrence (last-wins semantics)._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys -``` diff --git a/docs/recipes/javascript/migrate/typescript/README.md b/docs/recipes/javascript/migrate/typescript/README.md deleted file mode 100644 index fc27fa1a37..0000000000 --- a/docs/recipes/javascript/migrate/typescript/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -description: Typescript OpenRewrite recipes. ---- - -# Typescript - -## Recipes - -* [Convert `export =` to `export default`](./export-assignment-to-export-default.md) - - diff --git a/docs/recipes/javascript/migrate/typescript/export-assignment-to-export-default.md b/docs/recipes/javascript/migrate/typescript/export-assignment-to-export-default.md deleted file mode 100644 index ffb5016b10..0000000000 --- a/docs/recipes/javascript/migrate/typescript/export-assignment-to-export-default.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_label: "Convert `export =` to `export default`" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Convert `export =` to `export default` - -**org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default** - -_Converts TypeScript `export =` syntax to ES module `export default` syntax for compatibility with ECMAScript modules._ - -## Recipe source - -[GitHub: rewrite+org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default](https://github.com/search?type=code&q=repo:openrewrite/rewrite+org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default), -[Issue Tracker](https://github.com/openrewrite/rewrite/issues), -[Maven Central](https://central.sonatype.com/artifact/org.openrewrite/rewrite-javascript/) - -This recipe is available under the [Moderne Source Available License](https://docs.moderne.io/licensing/moderne-source-available-license). - - -## Usage - -In order to run JavaScript recipes, you will need to use the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro). -For JavaScript specific configuration instructions, please see our [configuring JavaScript guide](https://docs.moderne.io/user-documentation/moderne-cli/how-to-guides/javascript). - -Once the CLI is installed, you can install this JavaScript recipe package by running the following command: - -```shell title="Install the recipe package" -mod config recipes npm install @openrewrite/rewrite -``` - -Then, you can run the recipe via: - -```shell title="Run the recipe" -mod run . --recipe org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default -``` diff --git a/docs/reference/all-recipes.md b/docs/reference/all-recipes.md index 31c82f3c78..95e30c7d6d 100644 --- a/docs/reference/all-recipes.md +++ b/docs/reference/all-recipes.md @@ -6,7 +6,7 @@ description: A comprehensive list of all recipes organized by module. _This doc contains all recipes grouped by their module._ -Total recipes: 4217 +Total recipes: 4202 ## io.moderne.recipe:rewrite-devcenter @@ -9190,7 +9190,7 @@ _18 recipes_ _License: Unknown_ -_1263 recipes_ +_1248 recipes_ * [ai.timefold.solver.migration.ChangeVersion](/recipes/ai/timefold/solver/migration/changeversion.md) * **Change the Timefold version** @@ -12450,51 +12450,6 @@ _1263 recipes_ * [org.openrewrite.java.testing.truth.MigrateTruthToAssertJ](/recipes/java/testing/truth/migratetruthtoassertj.md) * **Migrate Google Truth to AssertJ** * Migrate Google Truth assertions to AssertJ assertions. -* [org.openrewrite.javascript.change-import](/recipes/javascript/change-import.md) - * **Change import** - * Changes an import from one module/member to another, updating all type attributions. -* [org.openrewrite.javascript.cleanup.add-parse-int-radix](/recipes/javascript/cleanup/add-parse-int-radix.md) - * **Add radix to `parseInt`** - * Adds the radix parameter (base 10) to `parseInt()` calls that are missing it, preventing potential parsing issues. -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. -* [org.openrewrite.javascript.cleanup.order-imports](/recipes/javascript/cleanup/order-imports.md) - * **Order imports** - * Sort imports by category and module path. Categories: side-effect, namespace, default, named, type. Within each category, imports are sorted alphabetically by module path. Named specifiers within each import are also sorted alphabetically. -* [org.openrewrite.javascript.cleanup.prefer-optional-chain](/recipes/javascript/cleanup/prefer-optional-chain.md) - * **Prefer optional chaining** - * Converts ternary expressions like `foo ? foo.bar : undefined` to use optional chaining syntax `foo?.bar`. -* [org.openrewrite.javascript.cleanup.use-object-property-shorthand](/recipes/javascript/cleanup/use-object-property-shorthand.md) - * **Use object property shorthand** - * Simplifies object properties where the property name and value/variable name are the same (e.g., `\{ x: x \}` becomes `\{ x \}`). Applies to both destructuring patterns and object literals. -* [org.openrewrite.javascript.dependencies.add-dependency](/recipes/javascript/dependencies/add-dependency.md) - * **Add npm dependency** - * Adds a new dependency to `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.dependencies.find-dependency](/recipes/javascript/dependencies/find-dependency.md) - * **Find Node.js dependency** - * Finds dependencies in a project's `package.json`. Can find both direct dependencies and dependencies that transitively include the target package. This recipe is commonly used as a precondition for other recipes. -* [org.openrewrite.javascript.dependencies.upgrade-dependency-version](/recipes/javascript/dependencies/upgrade-dependency-version.md) - * **Upgrade npm dependency version** - * Upgrades the version of a direct dependency in `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version](/recipes/javascript/dependencies/upgrade-transitive-dependency-version.md) - * **Upgrade transitive npm dependency version** - * Upgrades the version of a transitive dependency by adding override/resolution entries to `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.format.auto-format](/recipes/javascript/format/auto-format.md) - * **Auto-format JavaScript/TypeScript code** - * Format JavaScript and TypeScript code using formatting rules auto-detected from the project's existing code style. -* [org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences](/recipes/javascript/migrate/es6/modernize-octal-escape-sequences.md) - * **Modernize octal escape sequences** - * Convert old-style octal escape sequences (e.g., `\0`, `\123`) to modern hex escape sequences (e.g., `\x00`, `\x53`) or Unicode escape sequences (e.g., `\u0000`, `\u0053`). -* [org.openrewrite.javascript.migrate.es6.modernize-octal-literals](/recipes/javascript/migrate/es6/modernize-octal-literals.md) - * **Modernize octal literals** - * Convert old-style octal literals (e.g., `0777`) to modern ES6 syntax (e.g., `0o777`). -* [org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys](/recipes/javascript/migrate/es6/remove-duplicate-object-keys.md) - * **Remove duplicate object keys** - * Remove duplicate keys in object literals, keeping only the last occurrence (last-wins semantics). -* [org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default](/recipes/javascript/migrate/typescript/export-assignment-to-export-default.md) - * **Convert `export =` to `export default`** - * Converts TypeScript `export =` syntax to ES module `export default` syntax for compatibility with ECMAScript modules. * [org.openrewrite.jenkins.CommonsLang3ToApiPlugin](/recipes/jenkins/commonslang3toapiplugin.md) * **Use commons-lang3 API Plugin** * Updates `pom.xml` to depend on `commons-lang3-api` and exclude `commons-lang3` where it is brought in transitively. diff --git a/docs/reference/moderne-recipes.md b/docs/reference/moderne-recipes.md index 6f86d71da3..d846c29b03 100644 --- a/docs/reference/moderne-recipes.md +++ b/docs/reference/moderne-recipes.md @@ -997,12 +997,402 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full ## rewrite-migrate-python +* [org.openrewrite.python.migrate.DetectPercentFormatting](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/detectpercentformatting) + * **Detect `%` string formatting** + * Detect usage of %-style string formatting which could be migrated to f-strings (Python 3.6+). Manual review is recommended for conversion. +* [org.openrewrite.python.migrate.DetectStrFormat](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/detectstrformat) + * **Detect `str.format()` string formatting** + * Detect usage of str.format() method which could be migrated to f-strings (Python 3.6+). Manual review is recommended for conversion. +* [org.openrewrite.python.migrate.FindAifcModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findaifcmodule) + * **Find deprecated `aifc` module usage** + * The `aifc` module was deprecated in Python 3.11 and removed in Python 3.13. Use third-party audio libraries instead. +* [org.openrewrite.python.migrate.FindAsyncioCoroutineDecorator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findasynciocoroutinedecorator) + * **Find deprecated `@asyncio.coroutine` decorator** + * Find usage of the deprecated `@asyncio.coroutine` decorator which was removed in Python 3.11. Convert to `async def` syntax with `await` instead of `yield from`. +* [org.openrewrite.python.migrate.FindAudioopModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findaudioopmodule) + * **Find deprecated `audioop` module usage** + * The `audioop` module was deprecated in Python 3.11 and removed in Python 3.13. Use pydub, numpy, or scipy for audio operations. +* [org.openrewrite.python.migrate.FindCgiModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findcgimodule) + * **Find deprecated `cgi` module usage** + * The `cgi` module was deprecated in Python 3.11 and removed in Python 3.13. Use `urllib.parse` for query string parsing, `html.escape()` for escaping, and web frameworks or `email.message` for form handling. +* [org.openrewrite.python.migrate.FindCgitbModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findcgitbmodule) + * **Find deprecated `cgitb` module usage** + * The `cgitb` module was deprecated in Python 3.11 and removed in Python 3.13. Use the standard `logging` and `traceback` modules for error handling. +* [org.openrewrite.python.migrate.FindChunkModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findchunkmodule) + * **Find deprecated `chunk` module usage** + * The `chunk` module was deprecated in Python 3.11 and removed in Python 3.13. Implement IFF chunk reading manually or use specialized libraries. +* [org.openrewrite.python.migrate.FindCryptModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findcryptmodule) + * **Find deprecated `crypt` module usage** + * The `crypt` module was deprecated in Python 3.11 and removed in Python 3.13. Use `bcrypt`, `argon2-cffi`, or `passlib` instead. +* [org.openrewrite.python.migrate.FindDistutilsUsage](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/finddistutilsusage) + * **Find deprecated distutils module usage** + * Find imports of the deprecated `distutils` module which was removed in Python 3.12. Migrate to `setuptools` or other modern build tools. +* [org.openrewrite.python.migrate.FindElementGetchildren](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findelementgetchildren) + * **Find deprecated `Element.getchildren()` usage** + * Find usage of `getchildren()` method on XML Element objects. Deprecated in Python 3.9. Use `list(element)` instead. +* [org.openrewrite.python.migrate.FindFunctoolsCmpToKey](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findfunctoolscmptokey) + * **Find `functools.cmp_to_key()` usage** + * Find usage of `functools.cmp_to_key()` which is a Python 2 compatibility function. Consider using a key function directly. * [org.openrewrite.python.migrate.FindFutureImports](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findfutureimports) * **Find `__future__` imports** * Find `__future__` imports and add a search marker. +* [org.openrewrite.python.migrate.FindImghdrModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findimghdrmodule) + * **Find deprecated `imghdr` module usage** + * The `imghdr` module was deprecated in Python 3.11 and removed in Python 3.13. Use `filetype`, `python-magic`, or `Pillow` instead. +* [org.openrewrite.python.migrate.FindImpUsage](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findimpusage) + * **Find deprecated imp module usage** + * Find imports of the deprecated `imp` module which was removed in Python 3.12. Migrate to `importlib`. +* [org.openrewrite.python.migrate.FindMailcapModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findmailcapmodule) + * **Find deprecated `mailcap` module usage** + * The `mailcap` module was deprecated in Python 3.11 and removed in Python 3.13. Use `mimetypes` module for MIME type handling. +* [org.openrewrite.python.migrate.FindMsilibModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findmsilibmodule) + * **Find deprecated `msilib` module usage** + * The `msilib` module was deprecated in Python 3.11 and removed in Python 3.13. Use platform-specific tools for MSI creation. +* [org.openrewrite.python.migrate.FindNisModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findnismodule) + * **Find deprecated `nis` module usage** + * The `nis` module was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement. +* [org.openrewrite.python.migrate.FindNntplibModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findnntplibmodule) + * **Find deprecated `nntplib` module usage** + * The `nntplib` module was deprecated in Python 3.11 and removed in Python 3.13. NNTP is largely obsolete; consider alternatives if needed. +* [org.openrewrite.python.migrate.FindOsPopen](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findospopen) + * **Find deprecated `os.popen()` usage** + * `os.popen()` has been deprecated since Python 3.6. Use `subprocess.run()` or `subprocess.Popen()` instead for better control over process creation and output handling. +* [org.openrewrite.python.migrate.FindOsSpawn](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findosspawn) + * **Find deprecated `os.spawn*()` usage** + * The `os.spawn*()` family of functions are deprecated. Use `subprocess.run()` or `subprocess.Popen()` instead. +* [org.openrewrite.python.migrate.FindOssaudiodevModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findossaudiodevmodule) + * **Find deprecated `ossaudiodev` module usage** + * The `ossaudiodev` module was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement. +* [org.openrewrite.python.migrate.FindPathlibLinkTo](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findpathliblinkto) + * **Find deprecated `Path.link_to()` usage** + * Find usage of `Path.link_to()` which was deprecated in Python 3.10 and removed in 3.12. Use `hardlink_to()` instead (note: argument order is reversed). +* [org.openrewrite.python.migrate.FindPipesModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findpipesmodule) + * **Find deprecated `pipes` module usage** + * The `pipes` module was deprecated in Python 3.11 and removed in Python 3.13. Use subprocess with shlex.quote() for shell escaping. +* [org.openrewrite.python.migrate.FindRemovedModules312](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findremovedmodules312) + * **Find modules removed in Python 3.12** + * Find imports of modules that were removed in Python 3.12, including asynchat, asyncore, and smtpd. +* [org.openrewrite.python.migrate.FindSndhdrModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findsndhdrmodule) + * **Find deprecated `sndhdr` module usage** + * The `sndhdr` module was deprecated in Python 3.11 and removed in Python 3.13. Use `filetype` or audio libraries like `pydub` instead. +* [org.openrewrite.python.migrate.FindSocketGetFQDN](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findsocketgetfqdn) + * **Find `socket.getfqdn()` usage** + * Find usage of `socket.getfqdn()` which can be slow and unreliable. Consider using `socket.gethostname()` instead. +* [org.openrewrite.python.migrate.FindSpwdModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findspwdmodule) + * **Find deprecated `spwd` module usage** + * The `spwd` module was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement. +* [org.openrewrite.python.migrate.FindSslMatchHostname](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findsslmatchhostname) + * **Find deprecated `ssl.match_hostname()`** + * Find usage of the deprecated `ssl.match_hostname()` function which was removed in Python 3.12. Use `ssl.SSLContext.check_hostname` instead. +* [org.openrewrite.python.migrate.FindSunauModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findsunaumodule) + * **Find deprecated `sunau` module usage** + * The `sunau` module was deprecated in Python 3.11 and removed in Python 3.13. Use `soundfile` or `pydub` instead. +* [org.openrewrite.python.migrate.FindTelnetlibModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findtelnetlibmodule) + * **Find deprecated `telnetlib` module usage** + * The `telnetlib` module was deprecated in Python 3.11 and removed in Python 3.13. Consider using `telnetlib3` from PyPI, direct socket usage, or SSH-based alternatives like paramiko. +* [org.openrewrite.python.migrate.FindTempfileMktemp](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findtempfilemktemp) + * **Find deprecated `tempfile.mktemp()` usage** + * Find usage of `tempfile.mktemp()` which is deprecated due to security concerns (race condition). Use `mkstemp()` or `NamedTemporaryFile()` instead. +* [org.openrewrite.python.migrate.FindUrllibParseSplitFunctions](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findurllibparsesplitfunctions) + * **Find deprecated urllib.parse split functions** + * Find usage of deprecated urllib.parse split functions (splithost, splitport, etc.) removed in Python 3.14. Use urlparse() instead. +* [org.openrewrite.python.migrate.FindUrllibParseToBytes](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findurllibparsetobytes) + * **Find deprecated `urllib.parse.to_bytes()` usage** + * Find usage of `urllib.parse.to_bytes()` which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly. +* [org.openrewrite.python.migrate.FindUuModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/finduumodule) + * **Find deprecated `uu` module usage** + * The `uu` module was deprecated in Python 3.11 and removed in Python 3.13. Use `base64` module instead for encoding binary data. +* [org.openrewrite.python.migrate.FindXdrlibModule](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/findxdrlibmodule) + * **Find deprecated `xdrlib` module usage** + * The `xdrlib` module was deprecated in Python 3.11 and removed in Python 3.13. Use `struct` module for binary packing/unpacking. +* [org.openrewrite.python.migrate.MigrateAsyncioCoroutine](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/migrateasynciocoroutine) + * **Migrate `@asyncio.coroutine` to `async def`** + * Migrate functions using the deprecated `@asyncio.coroutine` decorator to use `async def` syntax. Also transforms `yield from` to `await`. The decorator was removed in Python 3.11. * [org.openrewrite.python.migrate.MigrateToPyprojectToml](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/migratetopyprojecttoml) * **Migrate to `pyproject.toml`** * Migrate Python projects from `requirements.txt` and/or `setup.cfg` to `pyproject.toml` with `hatchling` build backend. +* [org.openrewrite.python.migrate.ReplaceArrayFromstring](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacearrayfromstring) + * **Replace `array.fromstring()` with `array.frombytes()`** + * Replace `fromstring()` with `frombytes()` on array objects. The fromstring() method was deprecated in Python 3.2 and removed in 3.14. +* [org.openrewrite.python.migrate.ReplaceArrayTostring](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacearraytostring) + * **Replace `array.tostring()` with `array.tobytes()`** + * Replace `tostring()` with `tobytes()` on array objects. The tostring() method was deprecated in Python 3.2 and removed in 3.14. +* [org.openrewrite.python.migrate.ReplaceAstBytes](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceastbytes) + * **Replace `ast.Bytes` with `ast.Constant`** + * The `ast.Bytes` node type was deprecated in Python 3.8 and removed in Python 3.14. Replace with `ast.Constant` and check `isinstance(node.value, bytes)`. +* [org.openrewrite.python.migrate.ReplaceAstEllipsis](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceastellipsis) + * **Replace `ast.Ellipsis` with `ast.Constant`** + * The `ast.Ellipsis` node type was deprecated in Python 3.8 and removed in Python 3.14. Replace with `ast.Constant` and check `node.value is ...`. +* [org.openrewrite.python.migrate.ReplaceAstNameConstant](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceastnameconstant) + * **Replace `ast.NameConstant` with `ast.Constant`** + * The `ast.NameConstant` node type was deprecated in Python 3.8 and removed in Python 3.14. Replace with `ast.Constant` and check `node.value in (True, False, None)`. +* [org.openrewrite.python.migrate.ReplaceAstNum](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceastnum) + * **Replace `ast.Num` with `ast.Constant`** + * The `ast.Num` node type was deprecated in Python 3.8 and removed in Python 3.14. Replace with `ast.Constant` and check `isinstance(node.value, (int, float, complex))`. +* [org.openrewrite.python.migrate.ReplaceAstStr](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceaststr) + * **Replace `ast.Str` with `ast.Constant`** + * The `ast.Str` node type was deprecated in Python 3.8 and removed in Python 3.14. Replace with `ast.Constant` and check `isinstance(node.value, str)`. +* [org.openrewrite.python.migrate.ReplaceBase64Decodestring](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacebase64decodestring) + * **Replace `base64.decodestring()` with `base64.decodebytes()`** + * Replace `base64.decodestring()` with `base64.decodebytes()`. The decodestring() method was deprecated in Python 3.1 and removed in 3.9. +* [org.openrewrite.python.migrate.ReplaceBase64Encodestring](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacebase64encodestring) + * **Replace `base64.encodestring()` with `base64.encodebytes()`** + * Replace `base64.encodestring()` with `base64.encodebytes()`. The encodestring() method was deprecated in Python 3.1 and removed in 3.9. +* [org.openrewrite.python.migrate.ReplaceCalendarConstants](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacecalendarconstants) + * **Replace deprecated calendar constants with uppercase** + * Replace deprecated mixed-case calendar constants like `calendar.January` with their uppercase equivalents like `calendar.JANUARY`. The mixed-case constants were deprecated in Python 3.12. +* [org.openrewrite.python.migrate.ReplaceCgiEscape](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacecgiescape) + * **Replace `cgi.escape()` with `html.escape()`** + * Replace `cgi.escape()` with `html.escape()`. cgi.escape() was deprecated in Python 3.2 and removed in Python 3.8. +* [org.openrewrite.python.migrate.ReplaceCollectionsAbcImports](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacecollectionsabcimports) + * **Replace `collections` ABC imports with `collections.abc`** + * Migrate deprecated abstract base class imports from `collections` to `collections.abc`. These imports were deprecated in Python 3.3 and removed in Python 3.10. +* [org.openrewrite.python.migrate.ReplaceConditionNotifyAll](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceconditionnotifyall) + * **Replace `Condition.notifyAll()` with `Condition.notify_all()`** + * Replace `notifyAll()` method calls with `notify_all()`. The camelCase version was deprecated in Python 3.10 and removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceConfigparserReadfp](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceconfigparserreadfp) + * **Replace `ConfigParser.readfp()` with `read_file()`** + * The `ConfigParser.readfp()` method was deprecated in Python 3.2 and removed in Python 3.13. Replace with `read_file()`. +* [org.openrewrite.python.migrate.ReplaceConfigparserSafeConfigParser](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceconfigparsersafeconfigparser) + * **Replace `configparser.SafeConfigParser` with `ConfigParser`** + * The `configparser.SafeConfigParser` class was deprecated in Python 3.2 and removed in Python 3.12. Replace with `configparser.ConfigParser`. +* [org.openrewrite.python.migrate.ReplaceDatetimeUtcFromTimestamp](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacedatetimeutcfromtimestamp) + * **Replace `datetime.utcfromtimestamp()` with `datetime.fromtimestamp(ts, UTC)`** + * The `datetime.utcfromtimestamp()` method is deprecated in Python 3.12. Replace it with `datetime.fromtimestamp(ts, datetime.UTC)` for timezone-aware datetime objects. +* [org.openrewrite.python.migrate.ReplaceDatetimeUtcNow](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacedatetimeutcnow) + * **Replace `datetime.utcnow()` with `datetime.now(UTC)`** + * The `datetime.utcnow()` method is deprecated in Python 3.12. Replace it with `datetime.now(datetime.UTC)` for timezone-aware datetime objects. +* [org.openrewrite.python.migrate.ReplaceDistutilsVersion](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacedistutilsversion) + * **Replace deprecated distutils.version usage** + * Detect usage of deprecated `distutils.version.LooseVersion` and `distutils.version.StrictVersion`. These should be migrated to `packaging.version.Version`. Note: Manual migration is required as `packaging.version.Version` is not a drop-in replacement. +* [org.openrewrite.python.migrate.ReplaceElementGetiterator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceelementgetiterator) + * **Replace `Element.getiterator()` with `Element.iter()`** + * Replace `getiterator()` with `iter()` on XML Element objects. The getiterator() method was deprecated in Python 3.9. +* [org.openrewrite.python.migrate.ReplaceEventIsSet](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceeventisset) + * **Replace `Event.isSet()` with `Event.is_set()`** + * Replace `isSet()` method calls with `is_set()`. The camelCase version was deprecated in Python 3.10 and removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceGettextDeprecations](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacegettextdeprecations) + * **Replace deprecated gettext l*gettext() functions** + * Replace deprecated gettext functions like `lgettext()` with their modern equivalents like `gettext()`. The l*gettext() functions were removed in Python 3.11. +* [org.openrewrite.python.migrate.ReplaceImpImport](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceimpimport) + * **Replace `import imp` with `import importlib`** + * Replace `import imp` with `import importlib` for code that only uses imp.reload(). Also replaces `from imp import reload`. +* [org.openrewrite.python.migrate.ReplaceImpReload](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceimpreload) + * **Replace `imp.reload()` with `importlib.reload()`** + * Replace `imp.reload()` with `importlib.reload()`. This is a direct 1:1 replacement with identical behavior. +* [org.openrewrite.python.migrate.ReplaceInspectGetargspec](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceinspectgetargspec) + * **Replace `inspect.getargspec()` with `inspect.getfullargspec()`** + * The `inspect.getargspec()` function was deprecated in Python 3.0 and removed in Python 3.11. Replace with `inspect.getfullargspec()`. Note that code accessing the `keywords` field must be updated to use `varkw`. +* [org.openrewrite.python.migrate.ReplaceLocaleResetlocale](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacelocaleresetlocale) + * **Replace `locale.resetlocale()` with `locale.setlocale(LC_ALL, '')`** + * The `locale.resetlocale()` function was deprecated in Python 3.11 and removed in Python 3.13. Replace with `locale.setlocale(locale.LC_ALL, '')`. +* [org.openrewrite.python.migrate.ReplaceLoggingWarn](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceloggingwarn) + * **Replace `logging.warn()` with `logging.warning()`** + * Replace `warn()` calls with `warning()`. The warn() method was deprecated in Python 3.3. +* [org.openrewrite.python.migrate.ReplacePkgutilFindLoader](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacepkgutilfindloader) + * **Replace `pkgutil.find_loader()` with `importlib.util.find_spec()`** + * The `pkgutil.find_loader()` function was deprecated in Python 3.12. Replace with `importlib.util.find_spec()`. Note: returns ModuleSpec, use .loader for loader. +* [org.openrewrite.python.migrate.ReplacePkgutilGetLoader](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacepkgutilgetloader) + * **Replace `pkgutil.get_loader()` with `importlib.util.find_spec()`** + * The `pkgutil.get_loader()` function was deprecated in Python 3.12. Replace with `importlib.util.find_spec()`. Note: returns ModuleSpec, use .loader for loader. +* [org.openrewrite.python.migrate.ReplaceStrFormatWithFString](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacestrformatwithfstring) + * **Replace `str.format()` with f-string** + * Replace `"...".format(...)` calls with f-strings (Python 3.6+). Only converts cases where the format string is a literal and the conversion is safe. +* [org.openrewrite.python.migrate.ReplaceThreadGetName](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadgetname) + * **Replace `Thread.getName()` with `Thread.name`** + * Replace `getName()` method calls with the `name` property. Deprecated in Python 3.10, removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceThreadIsDaemon](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadisdaemon) + * **Replace `Thread.isDaemon()` with `Thread.daemon`** + * Replace `isDaemon()` method calls with the `daemon` property. Deprecated in Python 3.10, removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceThreadSetDaemon](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadsetdaemon) + * **Replace `Thread.setDaemon()` with `Thread.daemon = ...`** + * Replace `setDaemon()` method calls with `daemon` property assignment. Deprecated in Python 3.10, removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceThreadSetName](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadsetname) + * **Replace `Thread.setName()` with `Thread.name = ...`** + * Replace `setName()` method calls with `name` property assignment. Deprecated in Python 3.10, removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceThreadingActiveCount](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadingactivecount) + * **Replace `threading.activeCount()` with `threading.active_count()`** + * Replace `threading.activeCount()` with `threading.active_count()`. The camelCase version was deprecated in Python 3.10 and removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceThreadingCurrentThread](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacethreadingcurrentthread) + * **Replace `threading.currentThread()` with `threading.current_thread()`** + * Replace `threading.currentThread()` with `threading.current_thread()`. The camelCase version was deprecated in Python 3.10 and removed in 3.12. +* [org.openrewrite.python.migrate.ReplaceTypingAbstractSetWithCollectionsAbcSet](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingabstractsetwithcollectionsabcset) + * **Replace `typing.AbstractSet` with `collections.abc.Set`** + * Replace `typing.AbstractSet` with `collections.abc.Set`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingAsyncContextManagerWithContextlib](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingasynccontextmanagerwithcontextlib) + * **Replace `typing.AsyncContextManager` with `contextlib.AbstractAsyncContextManager`** + * Replace `typing.AsyncContextManager` with `contextlib.AbstractAsyncContextManager`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingAsyncGeneratorWithCollectionsAbcAsyncGenerator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingasyncgeneratorwithcollectionsabcasyncgenerator) + * **Replace `typing.AsyncGenerator` with `collections.abc.AsyncGenerator`** + * Replace `typing.AsyncGenerator` with `collections.abc.AsyncGenerator`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingAsyncIterableWithCollectionsAbcAsyncIterable](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingasynciterablewithcollectionsabcasynciterable) + * **Replace `typing.AsyncIterable` with `collections.abc.AsyncIterable`** + * Replace `typing.AsyncIterable` with `collections.abc.AsyncIterable`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingAsyncIteratorWithCollectionsAbcAsyncIterator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingasynciteratorwithcollectionsabcasynciterator) + * **Replace `typing.AsyncIterator` with `collections.abc.AsyncIterator`** + * Replace `typing.AsyncIterator` with `collections.abc.AsyncIterator`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingAwaitableWithCollectionsAbcAwaitable](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingawaitablewithcollectionsabcawaitable) + * **Replace `typing.Awaitable` with `collections.abc.Awaitable`** + * Replace `typing.Awaitable` with `collections.abc.Awaitable`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingCallableWithCollectionsAbcCallable](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcallablewithcollectionsabccallable) + * **Replace `typing.Callable` with `collections.abc.Callable`** + * PEP 585 deprecated `typing.Callable` in Python 3.9. Replace with `collections.abc.Callable` for type annotations. +* [org.openrewrite.python.migrate.ReplaceTypingChainMapWithCollectionsChainMap](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingchainmapwithcollectionschainmap) + * **Replace `typing.ChainMap` with `collections.ChainMap`** + * Replace `typing.ChainMap` with `collections.ChainMap`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingCollectionWithCollectionsAbcCollection](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcollectionwithcollectionsabccollection) + * **Replace `typing.Collection` with `collections.abc.Collection`** + * Replace `typing.Collection` with `collections.abc.Collection`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingContainerWithCollectionsAbcContainer](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcontainerwithcollectionsabccontainer) + * **Replace `typing.Container` with `collections.abc.Container`** + * Replace `typing.Container` with `collections.abc.Container`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingContextManagerWithContextlib](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcontextmanagerwithcontextlib) + * **Replace `typing.ContextManager` with `contextlib.AbstractContextManager`** + * Replace `typing.ContextManager` with `contextlib.AbstractContextManager`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingCoroutineWithCollectionsAbcCoroutine](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcoroutinewithcollectionsabccoroutine) + * **Replace `typing.Coroutine` with `collections.abc.Coroutine`** + * Replace `typing.Coroutine` with `collections.abc.Coroutine`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingCounterWithCollectionsCounter](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingcounterwithcollectionscounter) + * **Replace `typing.Counter` with `collections.Counter`** + * Replace `typing.Counter` with `collections.Counter`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingDefaultDictWithCollectionsDefaultdict](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingdefaultdictwithcollectionsdefaultdict) + * **Replace `typing.DefaultDict` with `collections.defaultdict`** + * Replace `typing.DefaultDict` with `collections.defaultdict`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingDequeWithCollectionsDeque](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingdequewithcollectionsdeque) + * **Replace `typing.Deque` with `collections.deque`** + * Replace `typing.Deque` with `collections.deque`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingDictWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingdictwithbuiltin) + * **Replace `typing.Dict` with `dict`** + * Replace `typing.Dict` with the built-in `dict` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingDictWithDict](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingdictwithdict) + * **Replace `typing.Dict` with `dict`** + * PEP 585 deprecated `typing.Dict` in Python 3.9. Replace with the built-in `dict` type for generic annotations. +* [org.openrewrite.python.migrate.ReplaceTypingFrozenSetWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingfrozensetwithbuiltin) + * **Replace `typing.FrozenSet` with `frozenset`** + * Replace `typing.FrozenSet` with the built-in `frozenset` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingGeneratorWithCollectionsAbcGenerator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypinggeneratorwithcollectionsabcgenerator) + * **Replace `typing.Generator` with `collections.abc.Generator`** + * Replace `typing.Generator` with `collections.abc.Generator`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingItemsViewWithCollectionsAbcItemsView](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingitemsviewwithcollectionsabcitemsview) + * **Replace `typing.ItemsView` with `collections.abc.ItemsView`** + * Replace `typing.ItemsView` with `collections.abc.ItemsView`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingIterableWithCollectionsAbcIterable](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingiterablewithcollectionsabciterable) + * **Replace `typing.Iterable` with `collections.abc.Iterable`** + * Replace `typing.Iterable` with `collections.abc.Iterable`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingIteratorWithCollectionsAbcIterator](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingiteratorwithcollectionsabciterator) + * **Replace `typing.Iterator` with `collections.abc.Iterator`** + * Replace `typing.Iterator` with `collections.abc.Iterator`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingKeysViewWithCollectionsAbcKeysView](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingkeysviewwithcollectionsabckeysview) + * **Replace `typing.KeysView` with `collections.abc.KeysView`** + * Replace `typing.KeysView` with `collections.abc.KeysView`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingListWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypinglistwithbuiltin) + * **Replace `typing.List` with `list`** + * Replace `typing.List` with the built-in `list` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingListWithList](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypinglistwithlist) + * **Replace `typing.List` with `list`** + * PEP 585 deprecated `typing.List` in Python 3.9. Replace with the built-in `list` type for generic annotations. +* [org.openrewrite.python.migrate.ReplaceTypingMappingViewWithCollectionsAbcMappingView](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmappingviewwithcollectionsabcmappingview) + * **Replace `typing.MappingView` with `collections.abc.MappingView`** + * Replace `typing.MappingView` with `collections.abc.MappingView`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingMappingWithCollectionsAbcMapping](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmappingwithcollectionsabcmapping) + * **Replace `typing.Mapping` with `collections.abc.Mapping`** + * Replace `typing.Mapping` with `collections.abc.Mapping`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingMatchWithReMatch](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmatchwithrematch) + * **Replace `typing.Match` with `re.Match`** + * Replace `typing.Match` with `re.Match`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingMutableMappingWithCollectionsAbcMutableMapping](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmutablemappingwithcollectionsabcmutablemapping) + * **Replace `typing.MutableMapping` with `collections.abc.MutableMapping`** + * Replace `typing.MutableMapping` with `collections.abc.MutableMapping`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingMutableSequenceWithCollectionsAbcMutableSequence](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmutablesequencewithcollectionsabcmutablesequence) + * **Replace `typing.MutableSequence` with `collections.abc.MutableSequence`** + * Replace `typing.MutableSequence` with `collections.abc.MutableSequence`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingMutableSetWithCollectionsAbcMutableSet](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingmutablesetwithcollectionsabcmutableset) + * **Replace `typing.MutableSet` with `collections.abc.MutableSet`** + * Replace `typing.MutableSet` with `collections.abc.MutableSet`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingoptionalwithunion) + * **Replace `typing.Optional[X]` with `X | None`** + * PEP 604 introduced the `|` operator for union types in Python 3.10. Replace `Optional[X]` with the more concise `X | None` syntax. +* [org.openrewrite.python.migrate.ReplaceTypingOrderedDictWithCollectionsOrderedDict](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingordereddictwithcollectionsordereddict) + * **Replace `typing.OrderedDict` with `collections.OrderedDict`** + * Replace `typing.OrderedDict` with `collections.OrderedDict`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingPatternWithRePattern](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingpatternwithrepattern) + * **Replace `typing.Pattern` with `re.Pattern`** + * Replace `typing.Pattern` with `re.Pattern`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingReversibleWithCollectionsAbcReversible](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingreversiblewithcollectionsabcreversible) + * **Replace `typing.Reversible` with `collections.abc.Reversible`** + * Replace `typing.Reversible` with `collections.abc.Reversible`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingSequenceWithCollectionsAbcSequence](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingsequencewithcollectionsabcsequence) + * **Replace `typing.Sequence` with `collections.abc.Sequence`** + * Replace `typing.Sequence` with `collections.abc.Sequence`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingSetWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingsetwithbuiltin) + * **Replace `typing.Set` with `set`** + * Replace `typing.Set` with the built-in `set` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingSetWithSet](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingsetwithset) + * **Replace `typing.Set` with `set`** + * PEP 585 deprecated `typing.Set` in Python 3.9. Replace with the built-in `set` type for generic annotations. +* [org.openrewrite.python.migrate.ReplaceTypingText](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingtext) + * **Replace `typing.Text` with `str`** + * `typing.Text` is deprecated as of Python 3.11. It was an alias for `str` for Python 2/3 compatibility. Replace with `str`. +* [org.openrewrite.python.migrate.ReplaceTypingTupleWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingtuplewithbuiltin) + * **Replace `typing.Tuple` with `tuple`** + * Replace `typing.Tuple` with the built-in `tuple` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingTupleWithTuple](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingtuplewithtuple) + * **Replace `typing.Tuple` with `tuple`** + * PEP 585 deprecated `typing.Tuple` in Python 3.9. Replace with the built-in `tuple` type for generic annotations. +* [org.openrewrite.python.migrate.ReplaceTypingTypeWithBuiltin](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingtypewithbuiltin) + * **Replace `typing.Type` with `type`** + * Replace `typing.Type` with the built-in `type` type. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingunionwithpipe) + * **Replace `typing.Union[X, Y]` with `X | Y`** + * PEP 604 introduced the `|` operator for union types in Python 3.10. Replace `Union[X, Y, ...]` with the more concise `X | Y | ...` syntax. +* [org.openrewrite.python.migrate.ReplaceTypingValuesViewWithCollectionsAbcValuesView](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replacetypingvaluesviewwithcollectionsabcvaluesview) + * **Replace `typing.ValuesView` with `collections.abc.ValuesView`** + * Replace `typing.ValuesView` with `collections.abc.ValuesView`. Available in Python 3.9+ (PEP 585). +* [org.openrewrite.python.migrate.ReplaceUnittestDeprecatedAliases](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/replaceunittestdeprecatedaliases) + * **Replace deprecated unittest method aliases** + * Replace deprecated unittest.TestCase method aliases like `assertEquals` with their modern equivalents like `assertEqual`. These aliases were removed in Python 3.11/3.12. +* [org.openrewrite.python.migrate.UpgradeToPython310](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython310) + * **Upgrade to Python 3.10** + * Migrate deprecated APIs and adopt new syntax for Python 3.10 compatibility. This includes adopting PEP 604 union type syntax (`X | Y`) and other modernizations between Python 3.9 and 3.10. +* [org.openrewrite.python.migrate.UpgradeToPython311](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython311) + * **Upgrade to Python 3.11** + * Migrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11. +* [org.openrewrite.python.migrate.UpgradeToPython312](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython312) + * **Upgrade to Python 3.12** + * Migrate deprecated and removed APIs for Python 3.12 compatibility. This includes detecting usage of the removed `imp` module and other legacy modules that were removed in Python 3.12. +* [org.openrewrite.python.migrate.UpgradeToPython313](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython313) + * **Upgrade to Python 3.13** + * Migrate deprecated and removed APIs for Python 3.13 compatibility. This includes detecting usage of modules removed in PEP 594 ('dead batteries') and other API changes between Python 3.12 and 3.13. +* [org.openrewrite.python.migrate.UpgradeToPython314](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython314) + * **Upgrade to Python 3.14** + * Migrate deprecated and removed APIs for Python 3.14 compatibility. This includes replacing deprecated AST node types with `ast.Constant` and other API changes between Python 3.13 and 3.14. +* [org.openrewrite.python.migrate.UpgradeToPython38](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython38) + * **Upgrade to Python 3.8** + * Migrate deprecated APIs and detect legacy patterns for Python 3.8 compatibility. +* [org.openrewrite.python.migrate.UpgradeToPython39](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/upgradetopython39) + * **Upgrade to Python 3.9** + * Migrate deprecated APIs for Python 3.9 compatibility. This includes PEP 585 built-in generics, removed base64 functions, and deprecated XML Element methods. +* [org.openrewrite.python.migrate.langchain.FindDeprecatedLangchainAgents](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/finddeprecatedlangchainagents) + * **Find deprecated LangChain agent patterns** + * Find usage of deprecated LangChain agent patterns including `initialize_agent`, `AgentExecutor`, and `LLMChain`. These were deprecated in LangChain v0.2 and removed in v1.0. +* [org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/findlangchaincreatereactagent) + * **Find `create_react_agent` usage (replace with `create_agent`)** + * Find `from langgraph.prebuilt import create_react_agent` which should be replaced with `from langchain.agents import create_agent` in LangChain v1.0. +* [org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImports](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/replacelangchainclassicimports) + * **Replace `langchain` legacy imports with `langchain_classic`** + * Migrate legacy chain, retriever, and indexing imports from `langchain` to `langchain_classic`. These were moved in LangChain v1.0. +* [org.openrewrite.python.migrate.langchain.ReplaceLangchainCommunityImports](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/replacelangchaincommunityimports) + * **Replace `langchain` imports with `langchain_community`** + * Migrate third-party integration imports from `langchain` to `langchain_community`. These integrations were moved in LangChain v0.2. +* [org.openrewrite.python.migrate.langchain.ReplaceLangchainProviderImports](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/replacelangchainproviderimports) + * **Replace `langchain_community` imports with provider packages** + * Migrate provider-specific imports from `langchain_community` to dedicated provider packages like `langchain_openai`, `langchain_anthropic`, etc. +* [org.openrewrite.python.migrate.langchain.UpgradeToLangChain02](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/upgradetolangchain02) + * **Upgrade to LangChain 0.2** + * Migrate to LangChain 0.2 by updating imports from `langchain` to `langchain_community` and provider-specific packages. +* [org.openrewrite.python.migrate.langchain.UpgradeToLangChain1](https://docs.moderne.io/user-documentation/recipes/recipe-catalog/python/migrate/langchain/upgradetolangchain1) + * **Upgrade to LangChain 1.0** + * Migrate to LangChain 1.0 by applying all v0.2 migrations and then moving legacy functionality to `langchain_classic`. ## rewrite-nodejs diff --git a/docs/reference/recipes-by-tag.md b/docs/reference/recipes-by-tag.md index ac01448667..0cd9aa8733 100644 --- a/docs/reference/recipes-by-tag.md +++ b/docs/reference/recipes-by-tag.md @@ -6,7 +6,7 @@ description: An autogenerated list of all recipe tags and the recipes within eac _This doc contains all recipe tags and the recipes that are tagged with them._ -Total tags: 254 +Total tags: 249 ## 5to6 @@ -257,14 +257,6 @@ _11 recipes_ * **Migrate Google Truth to AssertJ** * Migrate Google Truth assertions to AssertJ assertions. -## async - -_1 recipe_ - -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. - ## authentication _2 recipes_ @@ -566,14 +558,6 @@ _1 recipe_ * **Migrate Brave API to OpenTelemetry API** * Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents. -## bug - -_1 recipe_ - -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. - ## build _2 recipes_ @@ -656,14 +640,6 @@ _3 recipes_ * **Replace Spring Kafka with Quarkus Kafka Client** * Migrates `spring-kafka` to `quarkus-kafka-client` when no reactor dependencies are present. -## cleanup - -_1 recipe_ - -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. - ## cloud _17 recipes_ @@ -3365,14 +3341,6 @@ _1 recipe_ * **Migrate to JavaEE8** * These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods. -## javascript - -_1 recipe_ - -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. - ## javax _37 recipes_ @@ -7634,14 +7602,6 @@ _1 recipe_ * **Migrate Google Truth to AssertJ** * Migrate Google Truth assertions to AssertJ assertions. -## typescript - -_1 recipe_ - -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. - ## unaffected _1 recipe_ diff --git a/docs/reference/standalone-recipes.md b/docs/reference/standalone-recipes.md index f02b0fbbee..6fce0b0933 100644 --- a/docs/reference/standalone-recipes.md +++ b/docs/reference/standalone-recipes.md @@ -6,7 +6,7 @@ description: An autogenerated list of recipes that are not included in any compo _This doc contains recipes that are not included as part of any larger composite recipe. These recipes can be run independently and are not bundled with other recipes._ -Total standalone recipes: 1005 +Total standalone recipes: 990 ## org.openrewrite.meta:rewrite-analysis @@ -3002,51 +3002,6 @@ Total standalone recipes: 1005 * [org.openrewrite.java.testing.testcontainers.TestContainersBestPractices](/recipes/java/testing/testcontainers/testcontainersbestpractices.md) * **Testcontainers best practices** * Apply best practices to Testcontainers usage. -* [org.openrewrite.javascript.change-import](/recipes/javascript/change-import.md) - * **Change import** - * Changes an import from one module/member to another, updating all type attributions. -* [org.openrewrite.javascript.cleanup.add-parse-int-radix](/recipes/javascript/cleanup/add-parse-int-radix.md) - * **Add radix to `parseInt`** - * Adds the radix parameter (base 10) to `parseInt()` calls that are missing it, preventing potential parsing issues. -* [org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method](/recipes/javascript/cleanup/async-callback-in-sync-array-method.md) - * **Detect async callbacks in synchronous array methods** - * Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy. -* [org.openrewrite.javascript.cleanup.order-imports](/recipes/javascript/cleanup/order-imports.md) - * **Order imports** - * Sort imports by category and module path. Categories: side-effect, namespace, default, named, type. Within each category, imports are sorted alphabetically by module path. Named specifiers within each import are also sorted alphabetically. -* [org.openrewrite.javascript.cleanup.prefer-optional-chain](/recipes/javascript/cleanup/prefer-optional-chain.md) - * **Prefer optional chaining** - * Converts ternary expressions like `foo ? foo.bar : undefined` to use optional chaining syntax `foo?.bar`. -* [org.openrewrite.javascript.cleanup.use-object-property-shorthand](/recipes/javascript/cleanup/use-object-property-shorthand.md) - * **Use object property shorthand** - * Simplifies object properties where the property name and value/variable name are the same (e.g., `\{ x: x \}` becomes `\{ x \}`). Applies to both destructuring patterns and object literals. -* [org.openrewrite.javascript.dependencies.add-dependency](/recipes/javascript/dependencies/add-dependency.md) - * **Add npm dependency** - * Adds a new dependency to `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.dependencies.find-dependency](/recipes/javascript/dependencies/find-dependency.md) - * **Find Node.js dependency** - * Finds dependencies in a project's `package.json`. Can find both direct dependencies and dependencies that transitively include the target package. This recipe is commonly used as a precondition for other recipes. -* [org.openrewrite.javascript.dependencies.upgrade-dependency-version](/recipes/javascript/dependencies/upgrade-dependency-version.md) - * **Upgrade npm dependency version** - * Upgrades the version of a direct dependency in `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.dependencies.upgrade-transitive-dependency-version](/recipes/javascript/dependencies/upgrade-transitive-dependency-version.md) - * **Upgrade transitive npm dependency version** - * Upgrades the version of a transitive dependency by adding override/resolution entries to `package.json` and updates the lock file by running the package manager. -* [org.openrewrite.javascript.format.auto-format](/recipes/javascript/format/auto-format.md) - * **Auto-format JavaScript/TypeScript code** - * Format JavaScript and TypeScript code using formatting rules auto-detected from the project's existing code style. -* [org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequences](/recipes/javascript/migrate/es6/modernize-octal-escape-sequences.md) - * **Modernize octal escape sequences** - * Convert old-style octal escape sequences (e.g., `\0`, `\123`) to modern hex escape sequences (e.g., `\x00`, `\x53`) or Unicode escape sequences (e.g., `\u0000`, `\u0053`). -* [org.openrewrite.javascript.migrate.es6.modernize-octal-literals](/recipes/javascript/migrate/es6/modernize-octal-literals.md) - * **Modernize octal literals** - * Convert old-style octal literals (e.g., `0777`) to modern ES6 syntax (e.g., `0o777`). -* [org.openrewrite.javascript.migrate.es6.remove-duplicate-object-keys](/recipes/javascript/migrate/es6/remove-duplicate-object-keys.md) - * **Remove duplicate object keys** - * Remove duplicate keys in object literals, keeping only the last occurrence (last-wins semantics). -* [org.openrewrite.javascript.migrate.typescript.export-assignment-to-export-default](/recipes/javascript/migrate/typescript/export-assignment-to-export-default.md) - * **Convert `export =` to `export default`** - * Converts TypeScript `export =` syntax to ES module `export default` syntax for compatibility with ECMAScript modules. * [org.openrewrite.jenkins.CommonsLang3ToApiPlugin](/recipes/jenkins/commonslang3toapiplugin.md) * **Use commons-lang3 API Plugin** * Updates `pom.xml` to depend on `commons-lang3-api` and exclude `commons-lang3` where it is brought in transitively. diff --git a/sidebars.ts b/sidebars.ts index 24d024c07c..ade66692d0 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -190,6 +190,7 @@ const sidebars: SidebarsConfig = { keywords: ['changelog'], }, items: [ + 'changelog/8-75-2-Release', 'changelog/8-74-1-Release', 'changelog/8-73-0-Release', 'changelog/8-72-0-Release', diff --git a/src/plugins/latest-versions.js b/src/plugins/latest-versions.js index 54b0e04d94..6f8db41167 100644 --- a/src/plugins/latest-versions.js +++ b/src/plugins/latest-versions.js @@ -40,7 +40,6 @@ const latestVersions = { "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_ALL}}": "1.23.10", "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_ANDROID}}": "0.15.7", "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_APACHE}}": "2.23.1", - "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_AZUL}}": "0.8.5", "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_CIRCLECI}}": "3.9.8", "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_CODEMODS}}": "0.24.4", "{{VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_CODEMODS_NG}}": "0.18.1",