Lerna does not bump my pre-releases after subsequent commits in the same PR.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 2.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 50
Description
Current Behavior
I use the default next branch for my prerelease(s).
Suppose I have 3 independent packages:
@pkg/foo:0.1.0@pkg/bar:0.1.0- Has dependency"@pkg/foo": "workspace:*"@pkg/baz:0.1.0- Has dependency"@pkg/foo": "workspace:*"
With my next prerelease with patch bump. As part of my first commit in my PR (next), I do a change to all packages. The bump is done accordingly:
@pkg/foo:0.1.1-next.0@pkg/bar:0.1.1-next.0@pkg/baz:0.1.1-next.0
However, in my 2nd commit in the same PR, if I do another commit that only changes @pkg/baz. The bump only happens to that package (i.e. @pkg/baz:0.1.1-next.1), but it's dependant package @pkg/foo will revert back to its original version (i.e. @pkg/foo:0.1.0). Therefore, when I try to install pnpm add @pkg/baz:0.1.0@next, I get the following error:
ERR_PNPM_NO_MATCHING_VERSION No matching version found for @pkg/foo:0.1.0
This error happened while installing the dependencies of @pkg/baz:0.1.1-next.1
The latest release of @pkg/foo is "0.1.1-next.0".
Expected Behavior
The expected outcome should be to use the latest pre-release next version for its dependent packages as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the scenario with the three independent packages, a next prerelease, and two commits in the same pull request. Trace Lerna's prerelease and dependent-package versioning flow; done means the second bump preserves the latest prerelease versions for dependencies and pnpm add can install the resulting package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100