gpt4 book ai didi

git - 我应该在 git 中保留 flow-typed/npm 文件夹版本吗?

转载 作者:太空狗 更新时间:2023-10-29 13:57:52 25 4
gpt4 key购买 nike

我在我的项目中使用流类型并通过 flow-typed 获取第三方库定义命令行界面。

运行 flow-typed install 将所有为 package.json 中的依赖项创建的定义放入/flow-typed/npm 文件夹。

所以我想知道我是应该提交这个文件夹还是忽略它。由于您可能想将其他流类型定义添加到流类型文件夹中,我猜测/flow-typed/npm 文件夹应该被忽略并且/flow-typed 应该保留在版本控制中但不确定是否真的。有什么想法吗?

最佳答案

一般建议是将它们 checkin 源代码管理:https://github.com/flow-typed/flow-typed/wiki/FAQs#why-do-i-need-to-commit-the-libdefs-that-flow-typed-installs-for-my-project

Libdefs in flow-typed are tagged at both Flow and library version when they are installed, but libdefs themselves can improve over time. For example, they may have a bug or there may be an improvement to their accuracy or completeness.

When a libdef is improved or updated in flow-typed, there's some chance that the change could introduce new Flow errors into your project. As good as it is to find new issues, we also want to make sure that Flow-errors in your project are consistent and predictable over time.

So if/when you wish to upgrade a libdef that you've already checked in to your project's version control, you can do so explicitly with the flow-typed install --overwrite command.

关于git - 我应该在 git 中保留 flow-typed/npm 文件夹版本吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54327236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com