Migrate express-request-id to an inline middleware
Recipe ID
org.openrewrite.node.migrate.express-request-id.migrate-express-request-id-to-nativeArtifact@openrewrite/recipes-nodejsReplaces the express-request-id middleware with an equivalent inline middleware built on randomUUID() from node:crypto, then removes the dependency from each package.json that no longer needs it.
Composite recipeexpress-request-idProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.node.migrate.express-request-id.migrate-express-request-id-to-nativeIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejsDefinition
This recipe runs the following recipes in order.
- Replace
express-request-idwith an inline middlewareorg.openrewrite.node.migrate.express-request-id.replace-express-request-id - Remove unused
express-request-iddependencyorg.openrewrite.node.migrate.express-request-id.remove-unused-express-request-id-dependency