gpt4 book ai didi

npm - Lerna publish 将 gitHead 键添加到 package.jsons

转载 作者:行者123 更新时间:2023-12-04 11:36:41 24 4
gpt4 key购买 nike

我的 lerna 存储库中的根 package.json 中有以下脚本:

"scripts": {
"lerna:changed": "npx lerna changed",
"lerna:diff": "npx lerna diff",
"lerna:publish": "npx lerna publish"
}
运行 npm run lerna:publish 后,我在所有包(不是 root.json)的 package.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"
}

最佳答案

更新:似乎在发布阶段将 gitHead 添加为临时键。我的发布创建了标签并将它们提交到 GIT,但是我到我的注册表的部署失败了,这可能就是清理没有发生的原因。

关于npm - Lerna publish 将 gitHead 键添加到 package.jsons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57983774/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com