Why did package-lock.json change the integrity hash from sha1 to sha512?

后端 未结 7 1033
日久生厌
日久生厌 2021-01-31 23:50

I just generated a new npm lockfile, package-lock.json, as part of my typical workflow. But I noticed that this time all of the integrity hashes have been changed from sha1 to s

7条回答
  •  Happy的楠姐
    2021-02-01 00:35

    As @Daniel Cumings I also had to remove the package-lock.json to get rid of the sha1 hashes. Here's the Windows CLI commands for reference, which does the same as Daniel's script:

    npm i -g npm
    rd /s /q "node_modules"
    del package-lock.json
    npm cache clear --force
    npm i
    

提交回复
热议问题