A utility for upgrading your codebase to the latest version of Flow.
yarn add flow-upgrade. We expect
prettier to be installed as a peer dependency wherever you are running
You can then run:
yarn run flow-upgrade <current flow version> <target flow version>
You may also use
npx flow-upgrade <current flow version> <target flow version>
We also supply the
yarn run flow-codemod <codemod name>
If you just want to run a codemod without specifying Flow versions.
By default, Flow will only upgrade files that have an
// @flow header comment.
yarn create flow-upgrade --all
Path to a
.prettierrc file to use.
Upgrade codemods rely upon
prettier to print the resulting code after transformation.
If this is not provided, we will just use the defaults.