我的 lerna 存储库中的根 package.json 中有以下脚本:
"scripts": {
    "lerna:changed": "npx lerna changed",
    "lerna:diff": "npx lerna diff",
    "lerna:publish": "npx lerna publish"
  }
运行npm run lerna:publish后,我在所有包的 package.json 文件(不是 root.json)中看到一个gitHead键。当涉及到版本控制时,这成为一个大问题,因为添加此更改后所有包都会受到影响。为什么会发生这种情况?我该如何阻止它?
我曾经在我的根 package.json 文件中有一个发布命令,我知道这最初可能会导致这个问题,但我已经将其删除了。现在,我的子包的 package.json 文件基本上如下所示:
{
  "name": "@myProject/appOne",
  "version": "0.0.15-alpha.0",
  "description": "",
  "main": "index.js",
  "directories": {
    "lib": "lib"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
| 归档时间: | 
 | 
| 查看次数: | 2662 次 | 
| 最近记录: |