question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need a `flow-typed install` CLI command

See original GitHub issue

We need some kind of baseline command that can be used to just explicitly find + install a library definition for a given “package@version” and flow version. Something like flow-typed --flowVersion=0.22 underscore@1.0.0.

It’s pretty easy to add new commands to the CLI – check out the other PRs (https://github.com/flowtype/flow-typed/pull/15, https://github.com/flowtype/flow-typed/pull/23) that do this as an example.

For matching a package@version to a libdef in the repository: I’ve actually already written getMatchingLibdefs() inside npm/src/commands/libdefsForPkg.js over in https://github.com/flowtype/flow-typed/pull/23 . Given that that PR might warrant more discussion before it’s ready to land, it seems fine to just steal that code and put it somewhere general for re-use (which I would then be happy to rebase #23 on top of if this lands first).

Other than that, this command would just create a directory called flow-typed and download/install the appropriate library definitions into it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffmocommented, Apr 20, 2016

Checkpoint! @splodingsocks’s Flow PR for the aforementioned integration landed: https://github.com/facebook/flow/pull/1640

0reactions
jeffmocommented, May 10, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

flow-typed/flow-typed: A central repository for Flow ... - GitHub
The flow-typed repo is a collection of high-quality library definitions, tests to ensure that definitions remain high quality, and tooling to make it...
Read more >
Flow CLI
The flow command line tool is made to be easy-to-use for simple cases. Using the command flow will type-check your current directory if...
Read more >
2.2 install-types · flow-mono-cli - Immowelt Group
Installs typings from the flow-typed repository into your mono-repo packages. Supports argument propagation to the flow-typed install commands.
Read more >
flow-typed - npm
A repository of high quality flow type definitions. Latest version: 3.8.0, last published: 6 months ago. Start using flow-typed in your ...
Read more >
flow-typed | Yarn - Package Manager
Added support for Yarn monorepos (#4140) · New --skipCache option for install command (#4170) · Add @babel/eslint-parser@7.16.3 · Add @babel/plugin-syntax-flow@ ...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found