【问题标题】:why is Lerna always publishing all my packages?为什么 Lerna 总是发布我所有的包?
【发布时间】:2020-07-15 13:19:44
【问题描述】:

我为我的“开源”库here 设置了一个小项目,该项目使用 Lerna 自动发布此类项目。出于某种原因,我无法理解每次lerna publish 在 CI 中运行时,每个包都会遇到问题。

预期行为

只有实际更改的包才会被发布

当前行为

所有包总是被发布

可能的解决方案

??????♂️

重现步骤(针对错误)

下载my repo,运行lerna updated,我的两个包都在那里

lerna.json

{
  "packages": ["packages/*"],
  "version": "independent",
  "npmClient": "yarn",
  "command": {
    "publish": {
      "ignoreChanges": [
        "**/CHANGELOG.md",
        "**/node_modules/**",
        "**/package.json",
        "**/*.md",
        "**/*.spec.*",
        "**/*.stories.*"
      ],
      "conventionalCommits": true,
      "message": "chore(release): publish",
      "registry": "https://registry.npmjs.org"
    }
  }
}

上下文

我的semver不是很连贯

您的环境

打字稿存储库

|可执行文件 |版本 | | ---: | :--- | | lerna --version | 3.22.1 | | npm --version | 6.14.4 | | yarn --version | 1.22.4 | | node --version | 13.12.0 |

|操作系统 |版本 | | macOS 卡塔利娜 | 10.15.5 |

【问题讨论】:

标签: typescript lerna


【解决方案1】:

可能有点晚了,但这对我有用:

lerna publish --include-merged-tags

【讨论】:

    猜你喜欢
    • 2020-05-27
    • 2013-05-09
    • 1970-01-01
    • 2022-01-20
    • 2020-09-13
    • 2012-08-23
    • 1970-01-01
    • 1970-01-01
    • 2016-01-19
    相关资源
    最近更新 更多