【问题标题】:npm audit only for production dependencies?npm audit 仅适用于生产依赖项?
【发布时间】:2018-10-25 10:07:05
【问题描述】:

目前,在项目中运行npm audit 时,它会同时检查dependenciesdevDependencies。我正在寻找一种只检查dependencies 的方法。目前有办法吗?

【问题讨论】:

  • 我暂时找不到任何东西,但显然,有一个关于它的 PR 提交 - github.com/npm/npm/pull/20594
  • 太棒了,所以这只是时间问题。谢谢!

标签: node.js security npm audit


【解决方案1】:

在 npm 6.10.0 中发布了对 --production 标志的支持

https://github.com/npm/cli/pull/202

npm audit --production

【讨论】:

    猜你喜欢
    • 2016-06-25
    • 1970-01-01
    • 2022-08-18
    • 2020-12-28
    • 2021-03-17
    • 1970-01-01
    • 1970-01-01
    • 2016-08-18
    相关资源
    最近更新 更多