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

Cannot spot the changed packages correctly when a custom version provided as command parameter #3991

Open
afshin-hoseini opened this issue Apr 17, 2024 · 0 comments

Comments

@afshin-hoseini
Copy link

Current Behavior

Lerna cannot detect changed packages when publishing with a custom version, provided as publish command's parameter. But can figure out when providing the same custom version using prompt.

Expected Behavior

It should spot the changes the same way in either ways.

Steps to Reproduce

  • I got two packages ( pkg-a and pkg-b ), where pkg-b depends on pkg-a.
  • I published both of them with 10.3.0-ticket-1234-1 as version.
  • I apply some changes on pkg-b and commit it.
  • When I run npx lerna publish and then select the custom version option from the prompt, and input the next version as 10.3.0-ticket-1234-2, it identifies pkg-b as the only changed package, which is correct.
  • However, if I provide the version along with the command like npx lerna publish 10.3.0-ticket-1234-2, it cannot identify the changed packages correctly and wanna publish both pkg-a and pkg-b.

Failure Logs / Configuration

lerna.json

{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "10.3.0-ticket-1234-1",
  "packages": [
    "packages/*"
  ]
}

Environment

  System:
    OS: macOS 14.4.1
    CPU: (12) arm64 Apple M2 Pro
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.20 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Utilities:
    Git: 2.39.3 - /usr/bin/git
  npmPackages:
    lerna: 8.1.2 => 8.1.2 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant