← All recipes
Moderne licensed

Coerce process.exit() and process.exitCode to integer

Recipe IDorg.openrewrite.node.migrate.process.coerce-process-exit-codeArtifact@openrewrite/recipes-nodejs

Wraps non-integer values passed to process.exit() or assigned to process.exitCode with Math.trunc() to avoid the DEP0164 deprecation warning about implicit coercion to integer.

Single recipeDEP0164Proprietary

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.process.coerce-process-exit-code

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs