wix-incubator/lerna-script

latest not working on "older" versions

Opened this issue · 2 comments

say I have a fixed version dependency of

  "managedDependencies": {
    "package1": "1.1.0"
  },
  "autoselect": {
    "versionDiff": [
      "patch"
    ]
  }

in my release git branch.

meanwhile, my develop git branch has moved forward to be using

  "managedDependencies": {
    "package1": "1.2.0"
  },
  "autoselect": {
    "versionDiff": [
      "patch"
    ]
  }

now I had to port back some changes to package1, so it gets a new version "1.1.1".

the problem is:
above execution of "latest" won't find this version in the remote registry (artifactory pro, it's correctly published there). package1 stays "1.1.0" on "latest", the output is as follows:

info lerna-script executing task: "latest"
info latest checking for latest dependencies
info latest
info latest nothing selected, exiting...

what am I doing wrong? is this a bug?

I think this could be resolved with dist-tags. we should be able to parameterize and not only use "latest" but any dist-tag, which I did in the PR.

Thinking about it again, it would be even better if we would not have to specify a dist-tag at all, but parse the versions of all available dist-tags for a matching version! Given that it was previously published with a specific dist-tag like so:

lerna publish --dist-tag=<tag>