Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] When publishing, the changelog is getting the same version added twice #943

Open
joezappie opened this issue Feb 10, 2023 · 0 comments

Comments

@joezappie
Copy link

joezappie commented Feb 10, 2023

I made a test repo to play around with Lerna changelogs but noticed that everytime I publish, the changelog gets the same version entry added twice in a row.

Here is my sample repo:
https://github.com/jrj2211/test-lerna

Example:
brave_5BuJyTA6La

This is the command I'm running:

PS C:\Users\joeja\Documents\GitHub\test-lerna> npx lerna publish

Lerna.json

{
  "ci": false,
  "version": "1.2.2",
  "command": {
    "publish": {
      "allowBranch": [
        "main"
      ],
      "message": "chore(release): publish %s",
      "conventionalCommits": true
    }
  },
  "useWorkspaces": false,
  "packages": [
    "."
  ],
  "ignoreChanges": [
    "**/changelog.md",
    "**/CHANGELOG.md",
    "**/package-lock.json",
    "**/yarn.lock",
    "**/test/**",
    "lerna.json",
    "readme.md"
  ]
}
Full publish output
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
lerna notice cli v6.4.1
lerna info publish rooted leaf detected, skipping synthetic root lifecycles
lerna info current version 1.2.1
lerna info Looking for changed packages since v1.2.1
lerna info ignoring diff in paths matching [
lerna info ignoring diff in paths matching   '**/changelog.md',
lerna info ignoring diff in paths matching   '**/CHANGELOG.md',
lerna info ignoring diff in paths matching   '**/package-lock.json',
lerna info ignoring diff in paths matching   '**/yarn.lock',
lerna info ignoring diff in paths matching   '**/test/**',
lerna info ignoring diff in paths matching   'lerna.json',
lerna info ignoring diff in paths matching   'readme.md'
lerna info ignoring diff in paths matching ]
lerna info getChangelogConfig Successfully resolved preset "conventional-changelog-angular"

Changes:
 - @jrj2211/test-lerna: 1.2.1 => 1.2.2

? Are you sure you want to publish these packages? Yes
lerna info execute Skipping releases
lerna info git Pushing tags...
lerna info publish Publishing packages to npm...
lerna WARN ENOLICENSE Package @jrj2211/test-lerna is missing a license.
lerna WARN ENOLICENSE One way to fix this is to add a LICENSE.md file to the root of this repository.
lerna WARN ENOLICENSE See https://choosealicense.com for additional guidance.
lerna success published @jrj2211/test-lerna 1.2.2
lerna notice
lerna notice package: @jrj2211/[email protected]
lerna notice === Tarball Contents ===
lerna notice 69B   index.js
lerna notice 438B  lerna.json
lerna notice 606B  package.json
lerna notice 47B   .vscode/settings.json
lerna notice 1.9kB CHANGELOG.md
lerna notice === Tarball Details ===
lerna notice name:          @jrj2211/test-lerna
lerna notice version:       1.2.2
lerna notice filename:      jrj2211-test-lerna-1.2.2.tgz
lerna notice package size:  1.2 kB
lerna notice unpacked size: 3.0 kB
lerna notice shasum:        0f7d0b929cf4384301d549ee49b81d82ac715282
lerna notice integrity:     sha512-1JvmiX58XAxHi[...]kU7fkyi7ZGHZQ==
lerna notice total files:   5
lerna notice
Successfully published:
 - @jrj2211/[email protected]
lerna success published 1 package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant