Improve Flow Version Detection
UNCAUGHT ERROR: Error: Failed to find a flow-bin dependency in package.json.
Please install flow-bin: `npm install --save-dev flow-bin
I do not have flow-bin in my package.json as flow is part of a build-common dev-dependency of ours that we share over multiple modules.
flow-typed should instead do a require.resolve('flow-bin') to find the flow-bin folder and then load its package.json to detect the current version.
this would remove the need for all the complex flow version number checks in this area of the code, and would allow my workflow to work with flow-typed.
Currently ,the tool really only lets me use flow-typed inside of my common repo, and i'm unable to use it in any per-module repo.
I've recently been trying to do this for a lot of projects in my orgs, and I've noticed that unfortunately it seems like a common assumption across a lot of tools that things will be in devDependencies. For example with prettier as a transitive dependency, VSCode format on save was failing to work, and I think its eslint integration wasn't working either... Hopefully people will become more aware of the need for build-common dev dependencies.