如何解决如何自动化 NodeJS/npm 依赖更新?
我正在维护一些大型 NodeJS 应用程序(微服务、应用程序),它们消耗许多(至少 100 多个)依赖项。 更新这些依赖项以修复安全漏洞迫使我花费宝贵的开发时间。
有什么方法可以跨存储库自动更新包吗?We're using GitLab for SCM.
我想到了一些选项,例如:
-
Separating out core dependencies into a base level library
。 Maintain a repository that specifies security-cleared dependency versions and repositories to be updated whenever the cleared list changes.
任何其他建议/示例?
解决方法
只是为了帮助列出问题中提到的方法:
1. Separating core dependencies into a "Core" library.
- 这可以减少更新次数。但是基于“Core”的库还是有自己的依赖,容易出现漏洞,需要手动重复更新周期。这种方法只会拖延手动更新。
2. Maintain a repository that specifies security-cleared dependency versions and repositories to be updated whenever the cleared list changes.
- 这里有几个选项:
-
Article 通过管道脚本实现自动化
- GitHub:使用 next-update + Hub CLI
- GitLab:使用 next-update + Lab CLI
- 实施 dependabot-core(GitHub) 或 dependabot-gitlab(GitLab)
- 实施renovate。
-
Article 通过管道脚本实现自动化
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。