New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install command support pass through repositories #4142
Comments
The correct thing here would be to build a proxy for where the cache is generated from, and the cli searches for lib defs there. If they cannot be found then it will search in flow-typed/flow-typed repo. But digging into the code it doesn't support that because that cache is hardcoded right now to run git pulls to update the cache as well as using the git version to make version signing (though this seem to matter less). |
Do you want to request a feature or report a bug?
feature
What is the current behavior?
Currently when I run
flow-typed install
it will always install lib defs from the preconfigured src destination being what's in the cache dir${homeDir}/.flow-typed
. There is an option to target a custom cache dir but most of the time a user of flow-typed wouldn't use that because that tries to pull all lib defs from that particular custom dir.The copy from src to dest is here
Cache dir query is done here
What is the expected behavior?
What I'd like to see is a bypass source location option where
flow-typed
can try to first query defs from there before looking in the cache dir which ultimately is pulled from the flow-typed repo.If this is a feature request, what is motivation or use case for changing the behavior?
This opens up a lot of doors for teams to build their own configs and custom defs that can be easily shared without copying and pasting everywhere.
.flowconfig
that teams can use in the future when creating new repos and in the future we can enable some kind offlow-typed init
command that installs it if they are pulling from a custom sourceDoubts
flow-typed install --customDir=~/some-place
or it's a config file?[libs]
section in.flowconfig
that point to it like@node_modules/@scope/private-types
The text was updated successfully, but these errors were encountered: