zoukankan      html  css  js  c++  java
  • 关于npm audit fix

    https://blog.csdn.net/weixin_40817115/article/details/81007774

    npm audit : npm@5.10.0 & npm@6,允许开发人员分析复杂的代码,并查明特定的漏洞和缺陷。

    npm audit fix :npm@6.1.0,  检测项目依赖中的漏洞并自动安装需要更新的有漏洞的依赖,而不必再自己进行跟踪和修复。

    同时,官网中还提供了一些其他的命令,整理如下:

    1. 运行audit fix,但是只更新pkglock, 不更新node_modules:

    $ npm audit fix --package-lock-only
    2. 只更新dependencies中安装的包,跳过devDependencies中的包:

    $ npm audit fix --only=prod
    3.运行命令,得到audit fix将会更新的内容,并且输出json格式的安装信息,但是并不真的安装更新:

    $ npm audit fix --dry-run --json
    4. 得到json格式的详细检测报告

    $ npm audit --json
    附:

    npm-audit 官网地址:https://docs.npmjs.com/cli/audit
    ---------------------
    作者:奋斗的小绿萝
    来源:CSDN
    原文:https://blog.csdn.net/weixin_40817115/article/details/81007774
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    vbscript 过滤 特殊字符
    C#3.0新体验(五)Lambda表达式
    C#3.0新体验(三)对象与集合初始化器收
    C#3.0新体验(四)匿名类型
    郁闷啊
    9.15
    谈话是需要对手的
    中秋节啊
    照片
    回家的 感受
  • 原文地址:https://www.cnblogs.com/lhuser/p/11107520.html
Copyright © 2011-2022 走看看